query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
2e640b2819e0e2483ca2c8015eacce77
Show the application dashboard.
[ { "docid": "90376f7e37dc913171bd3e76bc685bd7", "score": "0.0", "text": "public function comingSoon()\n {\n $this->pageData['PageTitle'] = config('app.name').'.com - Coming Soon';\n\n return view('app.comingsoon')->with(['pageData' => $this->pageData]);\n }", "title": "" } ]
[ { "docid": "cd1b144d4d39474625ee6a23827816bf", "score": "0.7724842", "text": "public function showDashboard()\n {\n $this->layout->content = View::make('layouts.master2');\n $this->layout->bodyclass = \"home-page\";\n $this->layout->content->content2 = View::make('dashboard');\n\n $dash = new DashboardController();\n $dash->setDataVars($this->layout->content);\n }", "title": "" }, { "docid": "2a36410f99394a94788421d16e0a5bfd", "score": "0.7659345", "text": "public function index()\n {\n return view('prosper.core::screens.dashboard');\n }", "title": "" }, { "docid": "983401da9c628c15988a00b3965fd93d", "score": "0.7463237", "text": "public function dashboard()\n\t{\n\t\treturn view('admin/dashboard');\n\t}", "title": "" }, { "docid": "42219416288d24b2f633a271a6c8dea0", "score": "0.7431037", "text": "public function dashboard()\n\t{\n\t\t$data['page_id'] = 2;\n\t\t$data['page_tag'] = \"Dashboard - Tienda Virtual\";\n\t\t$data['page_title'] = \"Dashboard - Tienda Virtual\";\n\t\t$data['page_name'] = \"dashboard\";\n\t\t$data['page_functions_js'] = \"functions_dashboard.js\";\n\t\t$this->views->getView($this,\"dashboard\",$data);\n\t}", "title": "" }, { "docid": "b4efc7497d285ffe85f6abf186a02114", "score": "0.7406752", "text": "public function dashboard()\n {\n return view('admin.dashboard', ['active' => 'dashboard']);\n }", "title": "" }, { "docid": "32a3035fe57517d96dffece0b0f01be9", "score": "0.73841095", "text": "public function index(){\n $data['page_name'] = \"Dashboard\";\n $data['page_description'] = \"Control panel\";\n\n return view('backend.dashboard', $data);\n }", "title": "" }, { "docid": "c06bc33c70f007550d116ccc31fb2c96", "score": "0.73761266", "text": "public function dashboardAction()\n {\n return $this->render('@hypno/dash/dashboard.html.twig');\n }", "title": "" }, { "docid": "f4951c28f30b52d1385fa4c903757b87", "score": "0.7358393", "text": "public function index()\n {\n $this->isLoggedIn();\n $this->global['pageTitle'] = 'CodeInsect : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "6ee16091d9a851a3bee6d689ae966a00", "score": "0.73577094", "text": "public function showDashboard()\n {\n return view('content.account.index.dashboard');\n }", "title": "" }, { "docid": "8aa53f22668237494708d85388af3164", "score": "0.7344472", "text": "public function dashboard()\n {\n \n return view('dashboard');\n }", "title": "" }, { "docid": "05753ae7d7fc17660047e9674f8f008d", "score": "0.73420244", "text": "public function dashboard()\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "638d571f9495c145e1a7fa53dc025dc2", "score": "0.73274565", "text": "public function index()\n {\n config(['app.name' => 'Admin Dashboard | AIMS']);\n\n return view('admin.index');\n }", "title": "" }, { "docid": "33e9b2fb70491ccd4f15fe4a99f80cfa", "score": "0.7319888", "text": "public function dashboard()\n {\n return view('admin.admin');\n }", "title": "" }, { "docid": "2768602f25937d7b2bc1d11cf5c08f27", "score": "0.73159176", "text": "public function index()\n {\n $this -> load -> helper('general_helper');\n validate();\n\n $this ->data['sidebar_links'] = sidebar_links();\n $this -> load -> view(\"dashboard\", $this ->data);\n \n }", "title": "" }, { "docid": "cc0e8c5c2a495b2fae643141feb85846", "score": "0.7310774", "text": "public function index()\n {\n return view('backend.dashboard');\n }", "title": "" }, { "docid": "6c48dd25393a4edc5153404a9e4b2a5f", "score": "0.7299222", "text": "public function dashBoard()\n {\n return view('home.dashboard', ['pageTitle' => \"Dashboard\"]);\n }", "title": "" }, { "docid": "91c79517bfcadd08b13066f73b422289", "score": "0.7283838", "text": "public function dashboard()\n {\n return view('layouts.master');\n }", "title": "" }, { "docid": "f35435d2f30122f82d38462795b69a7d", "score": "0.72835", "text": "public function index() {\n return view('admin::dashboard');\n }", "title": "" }, { "docid": "b07fddb733c3120c2f8ac0c0f0658b75", "score": "0.7283344", "text": "public function admin_inventaris_dashboard() {\n\t\t\treturn View::make('admin_inventaris.index');\n\t\t}", "title": "" }, { "docid": "f079b32635b61b0cc49f747280ceddc6", "score": "0.7282408", "text": "public function dashboard()\n {\n\n return view(\"Retailer::dashboard\");\n }", "title": "" }, { "docid": "958a264635e8ad32c1a6317b929494ce", "score": "0.72799504", "text": "public function dashboard()\n {\n # code...\n return view('admin-pages.dashboard');\n }", "title": "" }, { "docid": "b090cbe86b3df44f4bb238f14e9542f2", "score": "0.72789633", "text": "public function index()\n {\n return view('backend.dashboard');\n }", "title": "" }, { "docid": "319ee9649b9dcb8a6b65c68472c0a071", "score": "0.72748274", "text": "public function dashboard()\n {\n $sidebar = new MenuController();\n $user = $sidebar->maerialUserData();\n $items = $sidebar->materialMenu();\n return view('material.dashboard', compact('items', 'user'));\n }", "title": "" }, { "docid": "523e7db87ff5be97cb8b5cbf7aa5b4c8", "score": "0.72602284", "text": "public function index()\n {\n $this->dashboard();\n }", "title": "" }, { "docid": "a58d6bcc908df68ca86869c724cf79fc", "score": "0.72572994", "text": "function getDashboardPage()\n {\n return view('artist.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7251768", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "30e92d4d4499cef20f08174037d45d03", "score": "0.7243194", "text": "public function dashboard()\n {\n return view('admin::pages.dashboard');\n }", "title": "" }, { "docid": "d50ecf960f177c48617186d10a8f0e98", "score": "0.72392154", "text": "public function dashboard()\n {\n return view('dashboard::dashboard');\n }", "title": "" }, { "docid": "a119baedf4b9eac8df302f19bcd1f0b0", "score": "0.723321", "text": "public function index()\n {\n $user = Auth::user();\n $token = JWTAuth::fromUser($user);\n $editionIsOpen = Edition::current()->isOpen();\n return view('admin.dashboard', compact('user', 'token', 'editionIsOpen'));\n }", "title": "" }, { "docid": "8bbb36f43d2cc9ce421185f652c7a356", "score": "0.7227998", "text": "function dashboard(){\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "1a4c7f7f60f11a41ee90d4c89198f474", "score": "0.720516", "text": "public function dashboard()\n {\n if (auth()->check() && auth()->user()->hasRole('admin')) {\n $title = 'Admin Dashboard';\n } else {\n $title = 'User Dashboard';\n }\n return view('backend/dashboard', compact('title'));\n }", "title": "" }, { "docid": "c5ae3a25c3f1ba1214dd5ae2f0ce6d1a", "score": "0.71931875", "text": "public function index()\n {\n $database = new HomeController;\n $statistik = $database->getData();\n\n return view('admin.dashboard', compact('statistik'));\n }", "title": "" }, { "docid": "5777e924852d7f29c1d7a66679186323", "score": "0.7187338", "text": "public function index() {\n $this->checkLogin();\n //this is Dashboard\n $dashboard_home = view('admin.pages.dashboard_home');\n return view('admin.admin_master')\n ->with('admin_main_content', $dashboard_home);\n }", "title": "" }, { "docid": "c0b6936cd174a94d839e93eb6a4abbb6", "score": "0.7187093", "text": "public function actionDashboard() {\n if (isset(user()->id)) {\n $this->layout = 'mainDashboard';\n $this->render('index');\n } else {\n $this->redirect(Yii::app()->user->returnUrl);\n }\n }", "title": "" }, { "docid": "078066c91854b1c24cdb00c2309dc331", "score": "0.7179255", "text": "public function index()\n\t{\n\t\treturn view('dashboard');\n\t}", "title": "" }, { "docid": "8ad805a4a99f1aec86236738ad619332", "score": "0.7172503", "text": "public function index()\n {\n if (Menu::hasAccess(\"applications\")) {\n $applications = Marriage_Profile::orderby('id', 'desc')->get();\n return View('admin.applications.index', [\n 'applications' => $applications,\n ]);\n } else {\n return View('error');\n }\n }", "title": "" }, { "docid": "9f710502755ba2fc292078e7780670b8", "score": "0.7166511", "text": "public function getIndex()\n {\n // Show the page\n return View::make('kit::backend.dashboard');\n }", "title": "" }, { "docid": "710a9a48c97b89b3d4b1a084de4d7995", "score": "0.7165059", "text": "public function index()\n {\n $this->global['pageTitle'] = 'Dashboard';\n\n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "cc5631d18cc220c247c4f5c2cea5863a", "score": "0.7161846", "text": "public function index()\n {\n return view('Admin.Dashboard');\n }", "title": "" }, { "docid": "0190bcad77c3804deb6308ed97179dec", "score": "0.7153424", "text": "public function index()\n {\n return view('frontend.dashboard');\n }", "title": "" }, { "docid": "900661415248261a4175aa50e8e64d51", "score": "0.7144185", "text": "public function index()\n {\n return view('admin.layouts.dashboard');\n }", "title": "" }, { "docid": "ddc179229162427733a3025046237815", "score": "0.7139485", "text": "public function index()\n {\n $data[\"title\"] = \"Admin: Dashboard\";\n return view('backend/dashboard')->withData($data);\n }", "title": "" }, { "docid": "de44d818db7f9af240976e4c3bfaf0e3", "score": "0.7136977", "text": "public function index() {\n return view('panel.dashboard');;\n }", "title": "" }, { "docid": "dc50af2aef83e99d7a83c50f03b72521", "score": "0.7132746", "text": "public function index()\n {\n return view('admin.dashboard.index');\n }", "title": "" }, { "docid": "dc50af2aef83e99d7a83c50f03b72521", "score": "0.7132746", "text": "public function index()\n {\n return view('admin.dashboard.index');\n }", "title": "" }, { "docid": "6526edd75159e0c6cd516c3389f7f3e0", "score": "0.71270895", "text": "public function index()\n {\n return view('AdminDashboard.master');\n }", "title": "" }, { "docid": "59634c05d061a7a8ca7ae13064d9347d", "score": "0.71256", "text": "function index()\n\t{\n\t\t$data[\"title\"] = \"DashBoard\";\n\t\t$data[\"content\"] = \"Welcome to dashboard\";\n\t\t$this->template->build_admin_output($data);\t\t\t\t\t\n\t}", "title": "" }, { "docid": "cfe0e6d40e0e7e7eaa254923573aad02", "score": "0.7125076", "text": "public function dashboard()\n {\n # code...\n return view('cms.dashboard');\n }", "title": "" }, { "docid": "f43d958eb08bedf4c749a37f5f5242cd", "score": "0.7123116", "text": "public function index()\n {\n return view('admin::dashboard.index');\n }", "title": "" }, { "docid": "1b53ff0fe3911f027a1261cf4ac51d7c", "score": "0.711491", "text": "public function view()\n\t{\n\t\tAjde::app()->getDocument()->setTitle(\"Admin dashboard\");\n\t\treturn $this->render();\n\t}", "title": "" }, { "docid": "3fd7ee20f2f65bfb6adcebd47464c5b2", "score": "0.71077615", "text": "public function index()\n {\n \treturn view('admin.dashboard');\n }", "title": "" }, { "docid": "37d1dd3fefe9bb8044d42ddd92805b05", "score": "0.7093927", "text": "public function index()\n {\n if (Laratrust::hasRole('admin')) return $this->adminDashboard();\n return view('home');\n }", "title": "" }, { "docid": "73c3519fbb871cd1823307c10ae729c9", "score": "0.7088577", "text": "public function index()\n {\n $this->view->render('dashboard/index', 'Dashboard');\n }", "title": "" }, { "docid": "1563f2bf90a59132109446388bb0ef05", "score": "0.7076479", "text": "public function index()\n {\n return view('admin.dashboard.home');\n }", "title": "" }, { "docid": "c9e82b04a5cffddf30be74e089a4641e", "score": "0.70751685", "text": "public function show()\n {\n return view('dashboard::show');\n }", "title": "" }, { "docid": "c9e82b04a5cffddf30be74e089a4641e", "score": "0.70751685", "text": "public function show()\n {\n return view('dashboard::show');\n }", "title": "" }, { "docid": "f2cfa9fa759eb0c6c0d19ea078129b1c", "score": "0.7064562", "text": "public function index() {\n $data = array(\n 'title' => 'Dashboard',\n 'active' => 'dashboard',\n 'meta' => 'dashboard'\n );\n $data['ap_list'] = DB::table('applicant_info')->get();\n return view('admin.view_ap')->with($data);\n }", "title": "" }, { "docid": "9777db4b3ad8b885955b960814273a10", "score": "0.70617485", "text": "public function index()\n {\n \t# code...\n \treturn view('admin-pages.dashboard');\n }", "title": "" }, { "docid": "5de502e80507b382afe5e1853601be7a", "score": "0.7060981", "text": "public function getIndex()\n\t{\n\t\t// Show the page\n\t\treturn View::make('backend/dashboard');\n\t}", "title": "" }, { "docid": "36176a5c258c21d1ee586c51cdf32ccc", "score": "0.70521593", "text": "public function index()\n {\n $alreadyAllocated = true;\n $dashboards = Auth ::user() -> dashboards() -> get();\n if(!count($dashboards))\n {\n $alreadyAllocated = false;\n $dashboards = Dashboard::all();\n }\n return view('Setting.dashboard.index', compact('dashboards','alreadyAllocated'));\n }", "title": "" }, { "docid": "b8ab277eff4f8b7873b64ec326d37048", "score": "0.70432395", "text": "public function index()\n {\n return view('admin/pages/dashboard');\n }", "title": "" }, { "docid": "877242d4ac695319072cb35b41341f27", "score": "0.7040986", "text": "public function index() {\n $this->checkIfLogin();\n \n return view(\"dashboard.index\");\n }", "title": "" }, { "docid": "82491c9fd2ca516322b5a07834c96986", "score": "0.70377827", "text": "public function index()\n {\n return view('admin.dashboard.index',['title'=>'Admin Dashboard',]);\n }", "title": "" }, { "docid": "03fd6ccdd91d81405f35b1284a08a676", "score": "0.70327556", "text": "public function index()\n {\n // main dashbord for home page view\n return view('admin_panel.component.home',['title' => 'Home',\n 'titleSmall' =>\"\"]);\n }", "title": "" }, { "docid": "0b6cef7f364e81e5e09d7692000b1279", "score": "0.70201063", "text": "public function dashboard() {\n\n\t}", "title": "" }, { "docid": "7835d0ab5d9ff7467d22bc7c470f41f5", "score": "0.7011759", "text": "public function dashboard(){\n return view('Admin.pages.dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.700917", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "8e1c7e045a96e5123f0f96a93db6bfaa", "score": "0.7001134", "text": "public function index()\n {\n return view('user.dashboard');\n }", "title": "" }, { "docid": "d93e4f229e1a1656419efb4bfb8c2925", "score": "0.6992121", "text": "public function index()\n {\n return view('Admin/dashboard');\n }", "title": "" }, { "docid": "d3ee6c4452c9a12387a1373432cf07c4", "score": "0.69905925", "text": "public function index()\n {\n return view('pages.dashboard');\n }", "title": "" }, { "docid": "601e3cefae20bf7a64fb6e988caedeac", "score": "0.69844925", "text": "public function index()\n {\n return view('layouts.dashboard');\n }", "title": "" }, { "docid": "f300be1420248bb3aecab306c4c18952", "score": "0.6981775", "text": "public function index()\n {\n return view('account.dashboard.index');\n }", "title": "" }, { "docid": "dfa5cc2fed9dc87babf250ae3a54ec3b", "score": "0.69784814", "text": "public function index()\n {\n return view('modules.admin.dashboard.content');\n }", "title": "" }, { "docid": "46f468fc71b810b20d0e453c145b59f4", "score": "0.6978473", "text": "public function index(){\n $this->dashboard();\n }", "title": "" }, { "docid": "6c52bf57c006dce9e7d54107e52ca776", "score": "0.6973914", "text": "public function index()\n {\n $this->initIndex();\n $this->template\n ->title(\"Dashboard\")\n ->set_layout('main')\n ->build('index', $this->data);\n }", "title": "" }, { "docid": "d562a058e3f9210ef233edce659bf1e1", "score": "0.696792", "text": "public function index()\n {\n return view('karyawan.content.dashboard');\n }", "title": "" }, { "docid": "101c96b3d272b7764b19aa8ad5948ef1", "score": "0.6966955", "text": "public function runApp()\n {\n echo $this->showPage();\n }", "title": "" }, { "docid": "7251a4f885752c886f006e22a9ae8a12", "score": "0.6956507", "text": "public function index()\n {\n $data = [\"title\" => \"Dashboard\"];\n return view('pages.dashboard', $data);\n }", "title": "" }, { "docid": "a76dd26956f5d7109cf1ff60dcb0078b", "score": "0.69556135", "text": "public function getDashboard(){\n \treturn View::make('Administration.dashboard',array(\n \t\t'MainMenu' => View::make('Menu.MainMenu',array(\n \t\t\t'MoreMenu' => Util::getMenu()\n \t\t))\n \t));\n\t}", "title": "" }, { "docid": "c16750bc7c126a55354202a6b7e31d53", "score": "0.6954589", "text": "public function index()\n {\n return view('admin.apps.index');\n }", "title": "" }, { "docid": "87239afa1bee94639a9471d58bbe76b2", "score": "0.69512624", "text": "public function displayDashboard()\n {\n $this->restrict(3);\n $User = $this->session->read('User');\n $posts = $this->posts_manager->listAll($User->getIdUser());\n $categories = $this->categories_manager->listAll();\n $comments = $this->comments_manager->listAll();\n $this->render('dashboard', ['head'=>['title'=>'Tableau de bord', 'meta_description'=>''], 'page'=>'dashboard', 'posts'=>$posts, 'categories'=>$categories, 'comments'=>$comments], 'admin');\n }", "title": "" }, { "docid": "02ed814a0fc71ff6579d0397724d4745", "score": "0.69429356", "text": "public function dashboard()\n {\n \n }", "title": "" }, { "docid": "29c82764a996279434871d7e4ebc132d", "score": "0.6940077", "text": "public function index()\n {\n $this->middleware('auth');\n return view('pages.admin.admin_dash');\n }", "title": "" }, { "docid": "2b5593b4af9be225b5166a23d9f3d08e", "score": "0.6937456", "text": "public function index()\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "2b5593b4af9be225b5166a23d9f3d08e", "score": "0.6937456", "text": "public function index()\n {\n return view('dashboard.index');\n }", "title": "" }, { "docid": "36b54a95f9c3ced3dbb7ecaf09673d2f", "score": "0.6933042", "text": "public function index()\n {\n if (Laratrust::hasRole('admin')) return $this->adminDashboard();\n if (Laratrust::hasRole('member')) return $this->memberDashboard();\n return view('home');\n }", "title": "" }, { "docid": "4f8e2bb31b5ee402ea67bab05e1f4c9f", "score": "0.6931435", "text": "public function show()\n {\n $user = Auth::user();\n\n $apiToken = $user->api_token;\n $timetables = $user->timetables;\n\n return view('dashboard', compact('apiToken', 'timetables'));\n }", "title": "" }, { "docid": "4790d9247c195165b9011960a577b01d", "score": "0.69298714", "text": "public function index() {\n\n\n $data = array(\n 'title' => 'dashboard',\n 'script' => 'dashboard'\n );\n\n $this->template->render('dashboard/index', $data);\n }", "title": "" }, { "docid": "45830dcb46aab211dea89cce974989b2", "score": "0.69076604", "text": "public function index()\n\t{\n\t\tView::share('title', \\Config::get('panel::app.dashboardTitle', 'Tres Tristes Tigres'));\n\t\treturn View::make('panel::' . $this->_views_dir . '.login');\n\t}", "title": "" }, { "docid": "111798fdb836be26f1ce0684c56a6d32", "score": "0.6903853", "text": "public function admin()\n {\n return view('admin.dashboard', $this->admin->getIndexData());\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "06ec3b32b9b222f39c5dee97c3ecbb36", "score": "0.7939633", "text": "public function create()\n\t{\n\t\treturn view('admin.resource.create');\n\t}", "title": "" }, { "docid": "1e65cd3b7532e9fb4c8629f59550be03", "score": "0.7734893", "text": "public function create()\n\t{\n\t\treturn view('admin.resources.create');\n\t}", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "63ad7fad99855a56a3b8abf3768cf47e", "score": "0.76252395", "text": "public function create()\n {\n return $this->showForm(\"create\");\n }", "title": "" }, { "docid": "139c49a6b5671df4af660eea4515972f", "score": "0.7600047", "text": "public function create()\n {\n return view('resources/form');\n }", "title": "" }, { "docid": "a6c7271eaebfd5b50fc91fc80fb19496", "score": "0.7468657", "text": "public function create()\n\t{\n\t\treturn view('forms.create');\n\t}", "title": "" }, { "docid": "6839a79b61064ed2d6b3c87e3aff015a", "score": "0.7459504", "text": "public function create()\n\t\t{\n\t\t\t\t// redirect to the form for creating a new entry inside the db\n\t\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "c21d88e95f75db4b51a6283406449c62", "score": "0.74483985", "text": "public function create()\n {\n //\n return view('resources.create');\n }", "title": "" }, { "docid": "53d013f46afef2a72260a723badd83b2", "score": "0.7388776", "text": "public function ShowForm() {\n return view('create');\n }", "title": "" }, { "docid": "b8d67d3c176a25f495b53af4d1b3e1a3", "score": "0.7346452", "text": "public function new()\n {\n $this->addBreadcrumb($this->instance, 'new');\n $this->authorize('create', $this->resourceType);\n\n return $this->view('new')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('isUpdate', false);\n }", "title": "" }, { "docid": "b02f187b18d57a59d040d78094241c78", "score": "0.73457384", "text": "public function create_new()\n\t{\n\t\treturn View::make('admin.suppliers.create_supplier_form'); \n\t}", "title": "" }, { "docid": "4b843526f491cc00abff867e0dcae2bc", "score": "0.73384815", "text": "public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "a80df900a28f26c9116cae9aec9ae74b", "score": "0.7249939", "text": "public function create()\n\t{\n\t\treturn view(\"PO.form\");\n\t}", "title": "" }, { "docid": "6e54ebe7445f04b4e2540c09999df2ed", "score": "0.7249304", "text": "public function create()\n\t{\n\t\treturn view(\"retur-pembelian.form\");\n\t}", "title": "" }, { "docid": "7f97efa8cb776b86e66d91838826ac4e", "score": "0.72424", "text": "public function create()\n\t{\n\t\treturn View::make('forms.create');\n\t}", "title": "" }, { "docid": "8832246a5df8f4c7afcc8e46925833e8", "score": "0.72392076", "text": "public function create()\n {\n return view(self::VIEW_PATH_NAME . '.form');\n }", "title": "" }, { "docid": "83219f179e8e94a735c68ba031340531", "score": "0.7238169", "text": "public function create()\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "6cf89a013084a50bc3817996f9e0c883", "score": "0.72137976", "text": "public function actionCreate()\n {\n $this->renderPartial('form', array('scenario'=>'create'), false, true);\n }", "title": "" }, { "docid": "bff0d963f5957fded51be0c1b9cc5b0d", "score": "0.7155907", "text": "public function actionCreate()\r\n {\r\n $resource = new Resource();\r\n $typeResource = TypeResource::find()->all();\r\n \r\n\r\n if ($resource->load(Yii::$app->request->post()) && $resource->save()) {\r\n\r\n return $this->redirect(['view','id' => $resource->id]);\r\n\r\n }\r\n\r\n return $this->render('create',[\r\n 'resource' => $resource,\r\n 'typeResource' => $typeResource\r\n ]);\r\n }", "title": "" }, { "docid": "f94b74924ee0cca1c87e741d9a20dc31", "score": "0.7134313", "text": "public function create() {\n $viewData = $this->getDefaultViewData();\n $viewData[\"mode\"] = \"ADD\";\n $viewData[\"student\"] = new Student();\n\n return view('pages.students.form', $viewData);\n }", "title": "" }, { "docid": "9736289698140cf16452b76256ddbe3c", "score": "0.713098", "text": "public function create()\n {\n $permissions = PermissionGroup::get();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('roles.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('permissions', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "e1317794bf2d1789fb3df24f34664b93", "score": "0.7128814", "text": "public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }", "title": "" }, { "docid": "1d24e602d0fddfe9bed3a8265b26b901", "score": "0.7128243", "text": "protected function newAction()\n {\n return $this->renderForm('new');\n }", "title": "" }, { "docid": "da898f34b0c52bea25c9b79c320b2dda", "score": "0.71265686", "text": "public function create()\n {\n return view('paperforms.create');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "750adc77c36f18c747b430100ee399b2", "score": "0.7114242", "text": "public function create()\n\t{\n\t\treturn view('supir.create');\n\t}", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "e9b21b0a79fd33b3521e801165da14b6", "score": "0.71004754", "text": "public function create()\n {\n // HTML FORM TO SHOW THE FORM WHERE ROLE CAN BE CREATED\n }", "title": "" }, { "docid": "653c27662115e09b10c289bcc247b0ed", "score": "0.7085364", "text": "public function create()\n {\n return view('backend.Faces.form');\n }", "title": "" }, { "docid": "f95a7ddf5c279983b88920ab48796002", "score": "0.70726883", "text": "public function create()\n {\n return view('asset::Admin/Form');\n }", "title": "" }, { "docid": "44edfc8de23a19733eb2da7dd143c6af", "score": "0.7069517", "text": "public function create()\n {\n return view('backend.pragyansubject.addform');\n }", "title": "" }, { "docid": "aaf039b41e70ea5c5580f174d0a32a5e", "score": "0.70679444", "text": "public function create()\n {\n return view('admin.addnew');\n }", "title": "" }, { "docid": "b5c63b58d384c1cc1e048d0ed39e9059", "score": "0.70607215", "text": "public function create()\n {\n //display the create form of a new item\n return view('items.create_form');\n }", "title": "" }, { "docid": "2564f7e29b410c07eef4654312bbe9bc", "score": "0.7060122", "text": "public function create()\n {\n $data['action'] = 'penjualan.store';\n return view('penjualan.form', $data);\n }", "title": "" }, { "docid": "2a113ccb1bc187d2ab6a5b9b7f32db35", "score": "0.70526356", "text": "public function newAction()\n {\n $this->view->newOrdenForm = new NewOrdenForm(null,array('required'=>''));\n $this->view->clienteForm = new ClienteNewForm(null,array('required'=>''));\n }", "title": "" }, { "docid": "2b3d89889319d795b9c5394468d0ea54", "score": "0.7052032", "text": "public function create()\n {\n return view('frontend.formulir'); \n }", "title": "" }, { "docid": "91cae3ef8fac8cbaf75c5bcaed69ef7a", "score": "0.7050331", "text": "public function create()\n {\n return view('perjadin.create');\n }", "title": "" }, { "docid": "bb6992f3db8b85054e34d06ac94efe13", "score": "0.70479286", "text": "public function create()\n {\n return view('fish-mgmt/create');\n }", "title": "" }, { "docid": "c064473eb86d48e72f7ffb601c196ae9", "score": "0.70187074", "text": "public function create()\n {\n //\n return view('Partners/Admin/form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "f61bf3a97df7312aaecce2030ad738da", "score": "0.700798", "text": "public function create(){\n config(['global.icon_content_title' => 'icon-bookmark']);\n config(['global.text_content_title' => 'Add Supplier']);\n config(['global.parent_text_content_title' => 'Suppliers']);\n\n //set submit route\n config(['global.submit_link' => 'store.supplier']);\n //set index route\n config(['global.index_link' => '/suppliers']);\n\n return view('supplier.create');\n }", "title": "" }, { "docid": "64c776e59f1522c2eaee823d173e2039", "score": "0.7004277", "text": "public function create()\n\t{\n\t\treturn view('product.new');\n\t}", "title": "" }, { "docid": "6d8ac76b2319312ec6d7c116d3c07dd5", "score": "0.69991225", "text": "public function create()\n {\n return view(\"admin.dokter.form\");\n }", "title": "" }, { "docid": "cd66cdfb79b8372ac27d1bcfeebf98ed", "score": "0.6994213", "text": "public function create()\n\t{\n\t\t// return View::make('avverbi.create');\n\t\treturn View::make('avverbi.edit');\n\t}", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.698434", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "9dcc76daa4540b48df51e0c54a0f942e", "score": "0.6982116", "text": "public function create()\n {\n return view('escola.form');\n }", "title": "" }, { "docid": "b9dcd814df4a67ac3130f45aff38f1ee", "score": "0.6968916", "text": "public function create()\n {\n return view('nbform.create');\n }", "title": "" }, { "docid": "a2b4f48997315d69d4a978b07c86041b", "score": "0.696862", "text": "public function create()\n {\n return view('jamkerja.add');\n }", "title": "" }, { "docid": "3eabc09401aef2dfb0754b7c694a026f", "score": "0.6963395", "text": "public function create()\n\t{\n\t\treturn View::make('phanhois.create');\n\t}", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "12098cfc6ac9ec83d75a978a0c5abde4", "score": "0.6956841", "text": "public function showCreateForm()\n {\n return view('posts.new');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "aaad424e12d96a3efd02522d0acdf881", "score": "0.695643", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "219163df6bc3d5b0129ff62049e525c0", "score": "0.69501215", "text": "public function create()\n {\n return view('example.form');\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949657", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "e9d5ae41977e28632b79e3a6a94d5e87", "score": "0.69485426", "text": "public function create()\n {\n return view('Add');\n }", "title": "" }, { "docid": "bab776a4c16cf35a4a18dc0e698ea074", "score": "0.69469535", "text": "public function create()\n {\n return view(\"users.create_form\");\n }", "title": "" }, { "docid": "1c5fb8d39758b496bbe1461e2d19ee6b", "score": "0.6941957", "text": "public function newAction()\n {\n $entity = new Rio();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AppBundle:Rio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "14ece53d5ad54ed8cdddb207f598627a", "score": "0.6938155", "text": "public function create()\n {\n //adicionar\n $professores = Professor::all();\n $action = route('disciplinas.store');\n return view('admin.disciplinas.form', compact('action', 'professores'));\n }", "title": "" }, { "docid": "4dd85a7dd2279e41326acf30c85b837f", "score": "0.6929724", "text": "public function create()\n {\n return view('QuanTriVien.form');\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6928802", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "f36ee7fce6062ca5f8a13e9136a3aa5f", "score": "0.6926847", "text": "public function create()\n {\n //\n return view('admin.cars.add');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "a93a79fd5f85cdfcd02d43c4b981bd37", "score": "0.6917769", "text": "public function create()\n {\n return view('admin.rehber.create');\n\n }", "title": "" }, { "docid": "d08acefd41013b35198e14cd32167263", "score": "0.6913158", "text": "public function create()\n {\n //\n return view('hod.hod_form');\n }", "title": "" }, { "docid": "efa6db85e06a4cb8b256acb0956225d4", "score": "0.6907753", "text": "public function create()\n\t{\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "2d2afb827796ab149976949e6f7f1657", "score": "0.6902585", "text": "public function create()\n\t{\n\t\treturn View::make('penilaians.create');\n\t}", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.68951064", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "aa1b2912cd7ceea8a2b811ee2651b393", "score": "0.68948513", "text": "public function create()\n {\n return view(\"information.create\");\n }", "title": "" }, { "docid": "a097895685f56669e51313d103d810e7", "score": "0.6894119", "text": "public function create()\n {\n return view('sale-cow.form');\n }", "title": "" }, { "docid": "db3a97e80baaa42e7f0f5bbe728a3432", "score": "0.6890917", "text": "public function actionCreate()\n {\n $model = $this->findModel();\n\n $this->saveModel($model);\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "732fe73681252d8413ea359a6e09f8bb", "score": "0.6889954", "text": "public function create()\n {\n //\n return view('cars.new');\n }", "title": "" }, { "docid": "862bc40da984894b74df33cb4c0d4659", "score": "0.68857306", "text": "public function create()\n {\n return view ('anggota-new');\n }", "title": "" }, { "docid": "145cf1b2c8cc73b6dcddfbab958e798f", "score": "0.68844", "text": "public function create()\n {\n return view('ovhapi::create');\n }", "title": "" }, { "docid": "bfb90be64c471e95e334f369a13f5087", "score": "0.6882399", "text": "public function create()\n {\n //\n return view('Admin.Recom.add');\n }", "title": "" }, { "docid": "61dcb96ea6324e696f199e33bd9faa7f", "score": "0.6877785", "text": "public function create()\n\t{\n\t\t//add new car\n\t\treturn View::make('cars.create');\n\t}", "title": "" }, { "docid": "de77b116e66ae6b2ef708621f63ada16", "score": "0.6877583", "text": "public function create()\n {\n return view('manager.crud.create');\n }", "title": "" }, { "docid": "14cab6c0f95bbfd3db85915cbf823b72", "score": "0.6877049", "text": "public function create()\n\t{\n\t $config = $this->getFormData();\n\n return view('client.create', $config);\n\t}", "title": "" }, { "docid": "9337b2142bbd4240614c97696097e5e6", "score": "0.6876477", "text": "public function create()\n {\n return view( 'form.product', [\n 'isCreate' => true,\n 'categorys' => Category::all(),\n 'title' => 'New Product',\n 'product' => new Product(),\n 'navActive' => 'addProduct',\n ] );\n }", "title": "" }, { "docid": "f0df442854712f9c3ad7e77a1f7f3a88", "score": "0.68750143", "text": "public function create()\n {\n return view(\"cartera.create\");\n }", "title": "" }, { "docid": "a23b6ed7018a2e2dd2c29907dfbe28e0", "score": "0.6874092", "text": "public function create() {\n\t\treturn view( 'backend.career.create' );\n\t}", "title": "" }, { "docid": "15ba46136d8015267c72f493447d645a", "score": "0.6871153", "text": "public function create()\n {\n return view('materiku::create');\n }", "title": "" }, { "docid": "19bc1da827e1cabb7b0a120ffe2b00ed", "score": "0.6870422", "text": "public function create()\n {\n return view('additive/create');\n }", "title": "" }, { "docid": "e82caa6fdd89369a0306a198d2febd53", "score": "0.6865163", "text": "public function actionCreate()\n {\n $model = new ShowWith;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "354e1ae6b1f6e5a63b1294b3c9b61c1c", "score": "0.6864961", "text": "public function create()\n {\n return view('turno_new');\n }", "title": "" }, { "docid": "2a71d846a803ec0f01b511570f628c2f", "score": "0.686378", "text": "public function get_create()\n\t{\n\t\t$this->layout->title = 'New Relationship';\n\t\t$this->layout->content = View::make('relationships.create');\n\t}", "title": "" }, { "docid": "46163db00cf7d58cd76418e971c834ad", "score": "0.6862573", "text": "public function create()\n\t{\n\t\treturn view('palestra.create');\n\t}", "title": "" }, { "docid": "d46a9ae5fd9725a20632fb60f3ec32f6", "score": "0.6861084", "text": "public function adminCreate()\n {\n $configuration = $this->getFormFieldData();\n $configuration ['title_name'] = trans('app.file_upload');\n $configuration ['title'] = trans('app.resources');\n $configuration ['back_to_list'] = route('app.resources.index');\n return view('admin.adminForm',$configuration);\n }", "title": "" }, { "docid": "1c0601360736a4b5109044192d5528ed", "score": "0.68608975", "text": "public function create()\n {\n $data = array();\n $data['add'] = trans('main.add');\n return view('service.form', $data);\n }", "title": "" }, { "docid": "c2f03754ef7971403714c63774c1d964", "score": "0.68597066", "text": "public function create()\n {\n return view('modules.products.form');\n }", "title": "" }, { "docid": "68eac3e9797e63312bcbb06b4b9195ef", "score": "0.6857692", "text": "public function create()\n {\n return view('mineral.create');\n }", "title": "" }, { "docid": "b6cf76e82d6be800a92287cc947f7fa7", "score": "0.68555033", "text": "public function newAction()\n {\n $entity = new Plancapacitacion();\n $form = $this->createForm(new PlancapacitacionType(), $entity);\n\n // Incluimos camino de migas\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Capacitaciones\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>3)));\n $breadcrumbs->addItem(\"Plan de capacitaciones\", $this->get(\"router\")->generate(\"pantalla_capacitaciones\"));\n $breadcrumbs->addItem(\"Registrar plan\",\"\");\n \n return $this->render('CapacitacionBundle:Plancapacitacion:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" } ]
8090a02e327e3428104154d87afa67cb
znemozneni primeho vytvoreni instance
[ { "docid": "789c407c024f72fe1674470fe41e45b8", "score": "0.0", "text": "private function __construct() {\n // pripadna incializace vnitrnich promennych\n $this->atribut = null;\n }", "title": "" } ]
[ { "docid": "48ab1105260dff1fb9090734410b9c04", "score": "0.70072407", "text": "public function __construct() {\n\t\t//$this->instance = $instance;\n\t}", "title": "" }, { "docid": "37edb26d869af62488066f44bab302a4", "score": "0.66740346", "text": "public function __construct()\n {\n //Declaracion de constructor (VACIO)\n }", "title": "" }, { "docid": "1172322ac7cd097aab3cbe02d7eb40a8", "score": "0.6596506", "text": "public function __construct()\n {\n self::$instance = $this;\n }", "title": "" }, { "docid": "77e4acff4b60df331c2aa27d29036b94", "score": "0.6590901", "text": "public static function instance(){}", "title": "" }, { "docid": "77e4acff4b60df331c2aa27d29036b94", "score": "0.6590901", "text": "public static function instance(){}", "title": "" }, { "docid": "a39bd5c484e9ceb124f207deb3e6f6c7", "score": "0.6572074", "text": "public function __construct() {\r\n // rien à faire\r\n }", "title": "" }, { "docid": "ea13d0977dcf276de2608acce53b77de", "score": "0.6566517", "text": "public function __construct()\n {\n \n $this->objetA = new A; // je crée un objet issu de la classe A que je stock dans la proprite nommé $objetA\n echo \"s'execute automatiquement et détail: \";\n echo '<pre>'; var_dump($this->objetA);echo'</pre>';\n }", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.65248203", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.65248203", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.65248203", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.65248203", "text": "public function getInstance();", "title": "" }, { "docid": "0f2ba60cf83cdbd90c9f0b5539ae7b3e", "score": "0.65248203", "text": "public function getInstance();", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6518734", "text": "private function __construct(){}", "title": "" }, { "docid": "e49b05debbef64293835e6b0eb0f4184", "score": "0.65006363", "text": "public function __construct(){\n //in a real\n }", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.64928055", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.64928055", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.64928055", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.64928055", "text": "protected function __construct(){}", "title": "" }, { "docid": "21c87ec1b49ca87f7dd2476d8d563612", "score": "0.6490035", "text": "public function __construct(){\n\t $this->conexao = Conexao::getInstancia(); \n\t}", "title": "" }, { "docid": "4e83c7fab577a7a6acca49ccd7a8e5df", "score": "0.6479672", "text": "function __construct()\n {\n // Alles hier wird default bei Instanzierung aufgerufen\n }", "title": "" }, { "docid": "9e0df911f572aa88922b36dc1c90cb8f", "score": "0.6473144", "text": "public function __construct(){\n\t\techo \"ini adalah kelas coba\";\n\t}", "title": "" }, { "docid": "4526326ec7aa4ef98bb095f30cd1fb30", "score": "0.64141256", "text": "function __construct(){\n \n }", "title": "" }, { "docid": "752c34f65ca65b792064353ced2c28cc", "score": "0.6410363", "text": "public function __construct(){\r\n\t\t$this->vuePlageHoraire = new vuePlageHoraire();\r\n\t\t$this->modele = new dao();\r\n $this->vueAuthentification = new VueAuthentification();\r\n $this->ctrlCompte = new ControleurCompte();\r\n \t}", "title": "" }, { "docid": "1bb17d31bb3484e22677c92b15a7b749", "score": "0.6385619", "text": "public function __construct() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b32278ea69e8ef74b2848d767be27fbb", "score": "0.6372498", "text": "public function __construct() {\n \n }", "title": "" }, { "docid": "e091ab35a585c951c10a9a748301aaf3", "score": "0.63713926", "text": "public function __construct () {\r\n\t}", "title": "" }, { "docid": "bd2f16df0e9ad2d9537b34ff8d71aaa6", "score": "0.6364937", "text": "private function __construct( ){\r\n\t\t\tself::$log->debug( \"Creamos instancia de \".__CLASS__ );\r\n\t\t}", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.6348542", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.6348542", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "b2cb99f6e574d448011483c4ced1bfba", "score": "0.6343826", "text": "function __construct()\n {\n self::$Instance = $this;\n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.63430697", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.63430697", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.63430697", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "3e72c8db62e3ecaa632bfeeeb12d1ee5", "score": "0.63430697", "text": "function __construct() {\n \n }", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "1a547dcbcbc34a962cd30d4fc47c0e7a", "score": "0.63411385", "text": "public function __construct(){}", "title": "" }, { "docid": "2971a87b367a74741181094dff5b5c31", "score": "0.63410866", "text": "abstract protected static function _instance();", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.63357896", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.63357896", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.63357896", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "b5b645d2ccc6066661e0eadf98edee64", "score": "0.63291776", "text": "function __construct(){\r\n \r\n }", "title": "" }, { "docid": "9bd462025185b71c8ac7562a8fcc95c3", "score": "0.6313383", "text": "public function __construct() {\n\t\t}", "title": "" }, { "docid": "9bd462025185b71c8ac7562a8fcc95c3", "score": "0.6313383", "text": "public function __construct() {\n\t\t}", "title": "" }, { "docid": "874f752ed7c85c2d53a6a87693f72abb", "score": "0.63120425", "text": "public function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "c0dcaa1682f7d9771f4df2869c9b5ef0", "score": "0.6310503", "text": "public function __construct(){\n\t\t}", "title": "" }, { "docid": "7535729a6bb8c56b1a4b3aa92e79c198", "score": "0.6307596", "text": "function __construct() { }", "title": "" }, { "docid": "4e33211305398101ae2c45530f1d32fd", "score": "0.6305516", "text": "public function createInstance();", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.63026065", "text": "protected function __construct() {}", "title": "" }, { "docid": "20a727375393c052203b1fc99bc6b64b", "score": "0.62956375", "text": "function __construct() {\r\n \r\n }", "title": "" }, { "docid": "20a727375393c052203b1fc99bc6b64b", "score": "0.62956375", "text": "function __construct() {\r\n \r\n }", "title": "" }, { "docid": "5b764caee4458e246092a640b198429e", "score": "0.6294001", "text": "function __construct(){\r\n\t\t}", "title": "" }, { "docid": "c7e2c1b6bd8582f4da1de7e78a15e707", "score": "0.6291314", "text": "function __construct() {\r\n\t\t}", "title": "" }, { "docid": "5faa8178869b591b14a41bff97b2cf66", "score": "0.6290305", "text": "public function __construct()\n {\n $this->objetA = new A; // je cré un objet issu de la classa A que je stock dans la propriété nommé $objetA\n echo \"S'execute automatiquement et détail :\";\n echo '<pre>'; var_dump($this->objetA);echo '</pre>';\n }", "title": "" }, { "docid": "36eae8a686ce9f962f78abb4a14367a6", "score": "0.62860435", "text": "public function __construct( ) {\n \n }", "title": "" }, { "docid": "2b114f105ece0624bd6ec343cf35226d", "score": "0.628528", "text": "public function __construct() {\n }", "title": "" }, { "docid": "7b7993725df5808222f606a49a33e682", "score": "0.6283682", "text": "function __construct() {\n\n\t\t\n\t}", "title": "" }, { "docid": "15652faf24a621455e3ecc415eae96ec", "score": "0.6277789", "text": "private function __construct(){\r\n\t}", "title": "" }, { "docid": "15652faf24a621455e3ecc415eae96ec", "score": "0.6277789", "text": "private function __construct(){\r\n\t}", "title": "" }, { "docid": "b921bb8f29295baa526db8d62c46e636", "score": "0.6271941", "text": "private function __construct () {\r\n }", "title": "" } ]
ecf1c6abd94fe31b99d9904f78897cce
Zip the release if needed.
[ { "docid": "18c740ea83528e9d8ad420fc047b4dc7", "score": "0.5951105", "text": "protected function createZipArchive()\n {\n if (!$this->useZip) {\n return $this;\n }\n $this->consoleWriter->displayText(\"--- Creating zip archive...\", ConsoleWriter::COLOR_YELLOW);\n $installerZipFilename = self::INSTALLER_ZIP_FILENAME;\n $argTempProjectPath = escapeshellarg($this->tempProjectPath);\n $argInstallerZipFilename = escapeshellarg($installerZipFilename);\n $argProjectPath = escapeshellarg($this->projectPath);\n $cmd = \"cd {$argTempProjectPath} \\\n && zip -rq {$argInstallerZipFilename} . \\\n && cd -\";\n exec($cmd);\n\n if ($this->useInstaller) {\n exec(\"cd {$argProjectPath}/tools/build/Library/InstallUnpacker && php compile.php && cd -\");\n $zip = new ZipArchive();\n $zip->open(\"{$this->tempProjectPath}/{$this->zipFileName}\", ZipArchive::CREATE | ZipArchive::OVERWRITE);\n $zip->addFile(\"{$this->tempProjectPath}/{$installerZipFilename}\", $installerZipFilename);\n $zip->addFile(\"{$this->projectPath}/tools/build/Library/InstallUnpacker/index.php\", 'index.php');\n $zip->close();\n exec(\"rm {$argProjectPath}/tools/build/Library/InstallUnpacker/index.php\");\n } else {\n rename(\n \"{$this->tempProjectPath}/$installerZipFilename\",\n \"{$this->tempProjectPath}/{$this->zipFileName}\"\n );\n }\n $this->consoleWriter->displayText(\" DONE{$this->lineSeparator}\", ConsoleWriter::COLOR_GREEN);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "cbc4edef4755bf0109e4a388c8d84035", "score": "0.61036146", "text": "public function create_export_zip(){\n\t\t$this->usepcl = false;\n\t\t\n\t\tif(file_exists($this->export_path_zip)){\n\t\t\t@unlink($this->export_path_zip); //delete file to start with a fresh one\n\t\t}\n\t\t\n\t\tif(class_exists('ZipArchive')){\n\t\t\t$this->zip = new ZipArchive;\n\t\t\t$success = $this->zip->open($this->export_path_zip, ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);\n\t\t\t\n\t\t\tif($success !== true)\n\t\t\t\t$this->throw_error(__(\"Can't create zip file: \", 'revslider').$this->export_path_zip);\n\t\t}else{\n\t\t\t//fallback to pclzip\n\t\t\trequire_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');\n\t\t\t\n\t\t\t$this->pclzip = new PclZip($this->export_path_zip);\n\t\t\t\n\t\t\t//either the function uses die() or all is cool\n\t\t\t$this->usepcl = true;\n\t\t}\n\t}", "title": "" }, { "docid": "d9a0bb05e8f56402f5c2c8c4cef47c3d", "score": "0.5906194", "text": "public function zipBackups() {\n if($this->targetSubtitle instanceof Subtitle)\n S3Subtitle::zipBackups($this->uri, $this->targetSubtitle->getSubtitleName(true), $this->targetSubtitle->getSubtitleName(false));\n\n if($this->qaSubtitle instanceof Subtitle)\n S3Subtitle::zipBackups($this->uri, $this->qaSubtitle->getSubtitleName(true), $this->qaSubtitle->getSubtitleName(false));\n }", "title": "" }, { "docid": "314db0425265aaf910913561278db565", "score": "0.5703273", "text": "function assessment_pack_files($filesforzipping) {\n global $CFG;\n //create path for new zip file.\n $tempzip = tempnam($CFG->tempdir.'/', 'assessment_');\n //zip files\n $zipper = new zip_packer();\n if ($zipper->archive_to_pathname($filesforzipping, $tempzip)) {\n return $tempzip;\n }\n return false;\n}", "title": "" }, { "docid": "c58590aebb0558767f589fa458b25895", "score": "0.56652814", "text": "protected function compressApplicationOnMac()\n {\n (new Process(['zip', '-r', $this->buildPath.'/app.zip', '.'], $this->appPath))->mustRun();\n }", "title": "" }, { "docid": "05db0e56218706e72e18c20f2c982dd1", "score": "0.55580163", "text": "public function close_export_zip(){\n\t\tif(!$this->usepcl){\n\t\t\t$this->zip->close();\n\t\t}\n\t}", "title": "" }, { "docid": "fd01b9eaacb7619d247d9f7ea2f9f30f", "score": "0.54798853", "text": "public function __invoke()\n {\n if (Manifest::usesContainerImage($this->environment)) {\n return;\n }\n\n $appSizeInBytes = $this->getDirectorySize(Path::app());\n $appSizeInMegabytes = round($appSizeInBytes / 1048576, 2);\n\n Helpers::step('<options=bold>Compressing Application</> ('.$appSizeInMegabytes.'MB)');\n\n if (PHP_OS == 'Darwin') {\n $this->compressApplicationOnMac();\n\n return $this->ensureArchiveIsWithinSizeLimits($appSizeInBytes);\n }\n\n $archive = new ZipArchive();\n\n $archive->open($this->buildPath.'/app.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE);\n\n foreach (BuiltApplicationFiles::get($this->appPath) as $file) {\n $relativePathName = str_replace('\\\\', '/', $file->getRelativePathname());\n\n $archive->addFile($file->getRealPath(), $relativePathName);\n\n $archive->setExternalAttributesName(\n $relativePathName,\n ZipArchive::OPSYS_UNIX,\n ($this->getPermissions($file) & 0xFFFF) << 16\n );\n }\n\n $archive->close();\n\n $this->ensureArchiveIsWithinSizeLimits($appSizeInBytes);\n }", "title": "" }, { "docid": "2e88d1d09c997ce7fe3c390e5470abfd", "score": "0.5427079", "text": "function publication_zip_preview($zarc)\n{\nglobal $_POST;\nglobal $_FILES;\nglobal $site_servers;\nglobal $site_server_activ;\nglobal $folder;\n\n\n$vp=$zarc;\n\n\t\t$archive = new PclZip($_SERVER[\"DOCUMENT_ROOT\"].$vp);\n\t\tif ($archive->extract(PCLZIP_OPT_PATH,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder) == true) \n\t\t{\n\t\t\t$afiles=array();\n\n \t\t\t$dir = opendir ($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder);\n \t\t\twhile ($file = readdir ($dir)) \n \t\t\t{\n\t\t\t\tif($file <> \".\" && $file <> \"..\")\n \t\t\t{\n\t\t\t\t\tif (preg_match(\"/.jpg$|.jpeg$/i\",$file) and !preg_match(\"/thumb/i\",$file)) \n\t\t\t\t\t{ \n\t\t\t\t\t\t$file=result_file($file);\n\t\t\t\t\t\t$afiles[count($afiles)]=$file;\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@unlink($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file);\n\t\t\t\t\t}\n\t\t\t\t\tif (preg_match(\"/php/i\",$file)) \n\t\t\t\t\t{\n\t\t\t\t\t\t@unlink($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file);\n\t\t\t\t\t}\n \t\t\t}\n \t\t\t }\n \t\t\tclosedir ($dir);\n\t\t\t@unlink($_SERVER[\"DOCUMENT_ROOT\"].$vp);\n\n\t\t\tsort ($afiles);\n\t\t\treset ($afiles);\t\n\n\t\t\tfor($n=0;$n<count($afiles);$n++)\n\t\t\t{\n\t\t\t\t$file=$afiles[$n];\n\n\t\t\t\tphoto_resize($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/thumbs\".$n.\".jpg\",1);\n\t\t\t\tphoto_resize($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/thumbz\".$n.\".jpg\",2);\n\t\t\t\t\n\t\t\t\tpublication_watermark_add(0,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/thumbz\".$n.\".jpg\");\n\n\t\t\t\tif($n==0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tphoto_resize($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/thumb1.jpg\",1);\n\t\t\t\t\tphoto_resize($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/thumb2.jpg\",2);\n\t\t\t\t\tpublication_watermark_add(0,$_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/thumb2.jpg\");\n\t\t\t\t}\n\n\t\t\t\t@unlink($_SERVER[\"DOCUMENT_ROOT\"].site_root.$site_servers[$site_server_activ].\"/\".$folder.\"/\".$file);\n\t\t\t}\n\n\t\t}\n\n}", "title": "" }, { "docid": "5e587b522e98db0bdf37f2e888314684", "score": "0.5419064", "text": "function zip_close($zip) {}", "title": "" }, { "docid": "c5a266d760f45626089b4342b9275d36", "score": "0.54045963", "text": "public function updatePostcodesArchive()\n {\n $archive = file_get_contents('http://parlvid.mysociety.org/os/codepo_gb-2017-11.zip');\n if (!empty($archive)) {\n $this->writePostcodesArchive($archive);\n $this->decompressPostcodesArchive();\n }\n }", "title": "" }, { "docid": "3e3e64e7aba85505f51f2397820666b7", "score": "0.5350512", "text": "public static function cleanup()\n {\n /** @var string[] $releases */\n $releases = \\Deployer\\get('releases_list');\n\n $keep = \\Deployer\\get('keep_releases');\n\n if ($keep === -1) {\n // Keep unlimited releases.\n return;\n }\n\n while ($keep - 1 > 0) {\n array_shift($releases);\n --$keep;\n }\n\n foreach ($releases as $release) {\n \\Deployer\\run(\"rm -rf {{deploy_path}}/releases/$release\");\n }\n\n \\Deployer\\run('cd {{deploy_path}} && if [ -e release ]; then rm release; fi');\n \\Deployer\\run('cd {{deploy_path}} && if [ -h release ]; then rm release; fi');\n }", "title": "" }, { "docid": "6b85969f300e54fe21c9a6dc2d761f09", "score": "0.5350028", "text": "private function finish()\n {\n $fullPathMigrationFile = $this->backupPath . $this->migrationSqlFile;\n if(is_file($fullPathMigrationFile)){\n $zipFile = $this->backupPath . $this->dumpFileName;\n $zip = new \\ZipArchive();\n $zip->open($zipFile, \\ZipArchive::OVERWRITE | \\ZipArchive::CREATE);\n $zip->addFile($fullPathMigrationFile, $this->migrationSqlFile);\n $zip->close();\n @unlink($fullPathMigrationFile);\n }\n }", "title": "" }, { "docid": "e3327591f748e0e9ba26089b2067c1d0", "score": "0.53420895", "text": "public function extractArchive() {\r\n\r\n\t\t$base_Dir \t\t=JPath::clean( JPATH_BASE. '/media' );\r\n\r\n\t\t$archivename \t= $base_Dir . $this->_realname;\r\n\t\t$tmpdir \t\t= uniqid( 'install_' );\r\n\r\n\t\t$extractdir \t=JPath::clean( $base_Dir . $tmpdir );\r\n\t\t$archivename \t=JPath::clean( $archivename, false );\r\n\t\t$this->_unpackdir = $extractdir;\r\n\r\n\t\tif (preg_match( '/.zip$/', $archivename )) {\r\n\t\t\t// Extract functions\r\n\t\t\trequire_once( JPATH_ADMINISTRATOR . '/includes/pcl/pclzip.lib.php' );\r\n\t\t\trequire_once( JPATH_ADMINISTRATOR. '/includes/pcl/pclerror.lib.php' );\r\n\t\t\t$zipfile = new PclZip( $this->_uploadfile );\r\n\t\t\tif($this->_iswin) {\r\n\t\t\t\tdefine('OS_WINDOWS',1);\r\n\t\t\t} else {\r\n\t\t\t\tdefine('OS_WINDOWS',0);\r\n\t\t\t}\r\n\r\n\t\t\t$ret = $zipfile->extract( PCLZIP_OPT_PATH, $extractdir );\r\n\t\t\tif($ret == 0) {\r\n\t\t\t\t$this->errno = 1;\r\n\t\t\t\t$this->error = 'Unrecoverable error \"'.$zipfile->errorName(true).'\"';\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\trequire_once( JPATH_SITE . '/includes/Archive/Tar.php' );\r\n\t\t\t$archive = new Archive_Tar( $this->_uploadfile );\r\n\t\t\t$archive->setErrorHandling( PEAR_ERROR_PRINT );\r\n\r\n\t\t\tif (!$archive->extractModify( $extractdir, '' )) {\r\n\t\t\t\t$this->setError( 1, 'Extract Error' );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Try to find the correct install dir. in case that the package have subdirs\r\n\t\t// Save the install dir for later cleanup\r\n\t\tjimport('joomla.filesystem.folder');\r\n\t\t$this->_uploadfile =JFolder::files($extractdir, '' );\r\n\r\n\t\tif (count( $this->_uploadfile ) == 1) {\r\n\t\t\tif (is_dir( $extractdir . $this->_uploadfile[0] )) {\r\n\t\t\t\t$this->_unpackdir =JPath::clean( $extractdir . $this->_uploadfile[0] );\r\n\t\t\t\t$this->_uploadfile = JFolder::files( $extractdir, '' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "208ce9f87d15ec6b758eae67a6208c5b", "score": "0.53410536", "text": "function downloadZip($hits) { //{{{\n $zip = new Zip();\n $types = array(\"ms\" => 1, \"auth\" => 2, \"bib\" => 3);\n $db = new DB();\n \n foreach ($hits as $hit) {\n list ($name, $type) = explode(\"|\", $hit);\n $type = $types[$type];\n \n $db->getLatestVersionByName(bin2hex($name), $type);\n $results = $db->getResults();\n \n if (!$results) {\n continue;\n }\n \n $doc = $results[0];\n $versionName = getFilename($doc['versionPath'], $doc['versionUUID']);\n \n $zip->addFile($versionName, $doc['documentName']);\n }\n \n $zip->download();\n}", "title": "" }, { "docid": "4983b97a2d11332b848acb0cb8ccdc48", "score": "0.53241295", "text": "function archive(){\r\n\t\tif(!$this->zipdata) return \"\";\r\n\t\t$zds=implode('',$this->zipdata);\r\n\t\t$cds=implode('',$this->cdir);\r\n\t\t$zdsl=strlen($zds);\r\n\t\t$cdsl=strlen($cds);\r\n\t\t$this->zipfile= \r\n\t\t\t$zds\r\n\t\t\t.$cds\r\n\t\t\t.\"PK\\x05\\x06\\x00\\x00\\x00\\x00\"\r\n\t .pack('v2V2v'\r\n \t,$this->cnt\t\t\t// total # of entries \"on this disk\" \r\n \t,$this->cnt\t\t\t// total # of entries overall \r\n \t,$cdsl\t\t\t\t\t// size of central dir \r\n \t,$zdsl\t\t\t\t\t// offset to start of central dir \r\n \t,0);\t\t\t\t\t\t\t// .zip file comment length \r\n\t\treturn $this->zipfile;\r\n\t}", "title": "" }, { "docid": "2965f72817bac5cf46a4ee4f3b4b4aec", "score": "0.5283064", "text": "public function open_zip() {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/file.php' );\n\n\t\tWP_Filesystem();\n\n\t\t$this->umask = umask( 0 );\n\t\t$this->zip = new ZipArchive();\n\t\tif ( $this->zip->open( $this->zip_path, ZipArchive::CREATE ) !== true ) {\n\t\t\tthrow new Exception( 'Could not create zip archive' );\n\t\t}\n\t}", "title": "" }, { "docid": "d72d92a96cd712228d54cbf08e98e177", "score": "0.5282088", "text": "public function __destruct()\n {\n if (!empty($this->zip)) {\n $this->zip->close();\n }\n if (file_exists($this->zipFilePath)) {\n @unlink($this->zipFilePath);\n }\n }", "title": "" }, { "docid": "3d4c4ea31e2b05db324cdacd3fd0fa95", "score": "0.5265125", "text": "function dest()\n {\n foreach($this->FileToZip as $File)\n {\n unlink($File);\n }\n\n\n }", "title": "" }, { "docid": "625997bb32a1a49ae16bd7cc92bd4f78", "score": "0.52590376", "text": "function zip( $zip_file, $files_to_zip ) {\n\treturn Zippy::load()->create( $zip_file, $files_to_zip, true );\n}", "title": "" }, { "docid": "d591f6cac1f2b412311006497f644d4b", "score": "0.5243439", "text": "public function ZipforDownLoad($data){\n \t\t\t$file = md5(time());\n \t\t\t$zippath = 'zip/'.date('Ymd').'/';\n \t\t\t$path = 'zip/'.date('Ymd').'/'.$file .'/';\n\t \n\t if (!file_exists(UPLOAD_PATH.$path)){\n\t\t\t\tmkdir (UPLOAD_PATH.$path,0777,true);\n\t\t\t}\t\n\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\tmkdir (UPLOAD_PATH.$path.$key.'/',0777,true);\n\t\t\t\tforeach ($value as $filepath) {\n\t\t\t\t\tpreg_match('/\\/([^\\/]+\\.[a-z]+)[^\\/]*$/',$filepath,$match); \n\t\t\t\t\tcopy(PUBLIC_PATH.$filepath , UPLOAD_PATH.$path.$key.'/'.$match[1]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$zip = new \\ZipArchive();\n\t\t\t$zipfilepath = UPLOAD_PATH.$zippath.$file.'.zip';\n\t\t\t//var_dump($zipfilepath) ;die;\n\t\t\tif ($zip->open($zipfilepath, \\ZipArchive::CREATE) === TRUE) {\n\n\t\t\t\t$this->addFileToZip('./uploads/'.$path, $zip, $file.'/'); //调用方法,对要打包的根目录进行操作,并将ZipArchive的对象传递给方法\n\t\t\t\t$zip->close(); //关闭处理的zip文件\n\t\t\t}else{\n\t\t\t\treturn \"打包zip报错\";\n\t\t\t}\t\n\n\t\t\treturn '/uploads/'.$zippath.$file.'.zip';\n\t\t}", "title": "" }, { "docid": "936d24228f989716a5ef92f97e5bec70", "score": "0.5231965", "text": "public function push_zip_to_client(){\n\t\t$exportname = (!empty($this->slider_alias)) ? $this->slider_alias.'.zip' : 'slider_export.zip';\n\t\t\n\t\theader('Content-type: application/zip');\n\t\theader('Content-Disposition: attachment; filename='.$exportname);\n\t\theader('Pragma: no-cache');\n\t\theader('Expires: 0');\n\t\treadfile($this->export_path_zip);\n\t}", "title": "" }, { "docid": "870f6f334ae96efa4a7a60cf5fbf2913", "score": "0.5231046", "text": "public function publish()\n {\n if (Phar::canWrite()) {\n\n self::runEffect($this->beforeEffect);\n \n $pharFileName = $this->publishRoot.'/'.$this->name;\n\n if (is_file($pharFileName)) {\n unlink($pharFileName);\n }\n \n $phar = new Phar($pharFileName, FileSystemIterator::CURRENT_AS_FILEINFO | FileSystemIterator::KEY_AS_FILENAME, $this->name);\n \n if ($this->workVirtually === true) {\n $phar->startBuffering();\n }\n\n if (!is_null($this->filePattern)) {\n $phar->buildFromDirectory($this->sourceRoot, $this->filePattern);\n } else {\n $phar->buildFromDirectory($this->sourceRoot);\n }\n \n # set the stub\n $defaultStub = $phar->createDefaultStub($this->defaultStubFileName);\n $stub = \"#!/usr/bin/php \\n\".$defaultStub;\n $phar->setStub($stub);\n\n # do compressing if user wishes\n if (Phar::canCompress(Phar::GZ) && $this->compressMethod === 'GZ') {\n $phar->compressFiles(Phar::GZ);\n }\n \n chmod($pharFileName, 0770);\n\n if ($this->workVirtually === true) {\n $phar->stopBuffering();\n }\n\n self::runEffect($this->afterEffect);\n\n } else {\n self::consoleLog(\"FAILURE : PHAR is readonly. You must set 'phar.readonly=0' in your php.ini file.\");\n }\n }", "title": "" }, { "docid": "a01341f67fd3d1cc0fd36a835295dd54", "score": "0.51932645", "text": "function privDuplicate($p_archive_filename)\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, \"PclZip::privDuplicate\", \"archive_filename='$p_archive_filename'\");\r\n $v_result=1;\r\n\r\n // ----- Look if the $p_archive_filename exists\r\n if (!is_file($p_archive_filename))\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Archive to duplicate does not exist. End of duplicate.\");\r\n\r\n // ----- Nothing to duplicate, so duplicate is a success.\r\n $v_result = 1;\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Open the zip file\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Open file in binary read mode\");\r\n if (($v_result=$this->privOpenFd('wb')) != 1)\r\n {\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Open the temporary file in write mode\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Open file in binary read mode\");\r\n if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)\r\n {\r\n $this->privCloseFd();\r\n\r\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \\''.$p_archive_filename.'\\' in binary write mode');\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());\r\n return PclZip::errorCode();\r\n }\r\n\r\n // ----- Copy the files from the archive to the temporary file\r\n // TBC : Here I should better append the file and go back to erase the central dir\r\n $v_size = filesize($p_archive_filename);\r\n while ($v_size != 0)\r\n {\r\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, \"Read $v_read_size bytes\");\r\n $v_buffer = fread($v_zip_temp_fd, $v_read_size);\r\n @fwrite($this->zip_fd, $v_buffer, $v_read_size);\r\n $v_size -= $v_read_size;\r\n }\r\n\r\n // ----- Close\r\n $this->privCloseFd();\r\n\r\n // ----- Close the temporary file\r\n @fclose($v_zip_temp_fd);\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }", "title": "" }, { "docid": "32163d020aa79fdfe9495fb88cf6c173", "score": "0.5168575", "text": "function zip_write ($type, $name, $src){ \n $zip = new FixedZipArchive(); \n if (($ret=$zip->open($name, ZipArchive::CREATE|ZIPARCHIVE::OVERWRITE)) !== true){ \n } \n\n if ($type == \"SQL\"){ \n foreach ($src as $value) { \n exec (\"mysqldump --opt -h'xxx' -u'yyy' -p'zzz' db_name $value > $value.sql\"); \n $zip->addFile(\"./\".$value.\".sql\", $value.\".sql\"); \n unlink ($value.\".sql\"); \n } \n } \n elseif ($type == \"DIR\") { \n foreach ($src as $path => $newdir) { \n $dirContents = glob($path.'/*'); \n $zip->addEmptyDir($newdir); \n foreach ($dirContents as $file) { \n if (is_file($file)){ \n $zip->addFile($file, $newdir.'/'.basename($file)); \n } \n } \n } \n } \n $zip->close(); \n}", "title": "" }, { "docid": "a8795e335de656fcebab99b91c57b6d3", "score": "0.5155679", "text": "private function _archieve_and_download($filename)\n {\n $this->zip->archive(FCPATH.'/uploads/'.$filename);\n \n // prompt user to download the zip file\n $this->zip->download($filename);\n }", "title": "" }, { "docid": "3280084aca1f6fb50226c53749ebcc8f", "score": "0.5148117", "text": "function zipfile() {\n\t\t$this->files_data = '';\n\t\t$this->central_directory_headers = '';\n\t\t$this->num_entries = 0;\n\t\t$this->is_closed = false;\n\t}", "title": "" }, { "docid": "00324866d43583703f044d54b1b3470e", "score": "0.5143833", "text": "private function makeZip()\n {\n try {\n $pathRawTemplate = public_path() . '/template-raw';\n $zipper = new \\Madnest\\Madzipper\\Madzipper;\n $files = glob($pathRawTemplate);\n $zipper->make('awesome-website.zip')->add($files)->close();\n $this->deleteDir($pathRawTemplate);\n } catch (\\Exception $e) {\n dd($e->getMessage());\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "e94f06a1024ee624016dc2a05b2168d5", "score": "0.51390046", "text": "function PclZip($p_zipname)\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::PclZip', \"zipname=$p_zipname\");\r\n\r\n // ----- Tests the zlib\r\n if (!function_exists('gzopen'))\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 1, \"zlib extension seems to be missing\");\r\n die('Abort '.basename(__FILE__).' : Missing zlib extensions');\r\n }\r\n\r\n // ----- Set the attributes\r\n $this->zipname = $p_zipname;\r\n $this->zip_fd = 0;\r\n $this->magic_quotes_status = -1;\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1);\r\n return;\r\n }", "title": "" }, { "docid": "959a602eaa2753fd5f679206436de356", "score": "0.51274556", "text": "private function unzip() {\n\n $zip = new \\ZipArchive;\n\n $res = $zip->open($this->laravel_zip_file());\n \n if ($res === TRUE) {\n\n $zip->extractTo($this->laravel_dir());\n $zip->close();\n\n }\n }", "title": "" }, { "docid": "31cfce286ec32384b48c95d761960af5", "score": "0.50827533", "text": "public function __invoke()\n {\n Helpers::step('<options=bold>Extracting Assets</>');\n\n $this->ensureAssetDirectoryExists();\n\n (new Filesystem())->copyDirectory(\n $this->appPath.'/public',\n $this->buildPath.'/assets'\n );\n\n foreach (AssetFiles::get($this->appPath.'/public') as $file) {\n @unlink($file->getRealPath());\n }\n }", "title": "" }, { "docid": "28aa15c4a6a394bf86928b9ca35c4ac1", "score": "0.5082696", "text": "function privMerge(&$p_archive_to_add)\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, \"PclZip::privMerge\", \"archive='\".$p_archive_to_add->zipname.\"'\");\r\n $v_result=1;\r\n\r\n // ----- Look if the archive_to_add exists\r\n if (!is_file($p_archive_to_add->zipname))\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Archive to add does not exist. End of merge.\");\r\n\r\n // ----- Nothing to merge, so merge is a success\r\n $v_result = 1;\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Look if the archive exists\r\n if (!is_file($this->zipname))\r\n {\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Archive does not exist, duplicate the archive_to_add.\");\r\n\r\n // ----- Do a duplicate\r\n $v_result = $this->privDuplicate($p_archive_to_add->zipname);\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Open the zip file\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Open file in binary read mode\");\r\n if (($v_result=$this->privOpenFd('rb')) != 1)\r\n {\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Read the central directory informations\r\n $v_central_dir = array();\r\n if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)\r\n {\r\n $this->privCloseFd();\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Go to beginning of File\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, \"Position in zip : \".ftell($this->zip_fd).\"'\");\r\n @rewind($this->zip_fd);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, \"Position in zip : \".ftell($this->zip_fd).\"'\");\r\n\r\n // ----- Open the archive_to_add file\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Open archive_to_add in binary read mode\");\r\n if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)\r\n {\r\n $this->privCloseFd();\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Read the central directory informations\r\n $v_central_dir_to_add = array();\r\n if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)\r\n {\r\n $this->privCloseFd();\r\n $p_archive_to_add->privCloseFd();\r\n\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Go to beginning of File\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, \"Position in archive_to_add : \".ftell($p_archive_to_add->zip_fd).\"'\");\r\n @rewind($p_archive_to_add->zip_fd);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, \"Position in archive_to_add : \".ftell($p_archive_to_add->zip_fd).\"'\");\r\n\r\n // ----- Creates a temporay file\r\n $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';\r\n\r\n // ----- Open the temporary file in write mode\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, \"Open file in binary read mode\");\r\n if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)\r\n {\r\n $this->privCloseFd();\r\n $p_archive_to_add->privCloseFd();\r\n\r\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \\''.$v_zip_temp_name.'\\' in binary write mode');\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());\r\n return PclZip::errorCode();\r\n }\r\n\r\n // ----- Copy the files from the archive to the temporary file\r\n // TBC : Here I should better append the file and go back to erase the central dir\r\n $v_size = $v_central_dir['offset'];\r\n while ($v_size != 0)\r\n {\r\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, \"Read $v_read_size bytes\");\r\n $v_buffer = fread($this->zip_fd, $v_read_size);\r\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\r\n $v_size -= $v_read_size;\r\n }\r\n\r\n // ----- Copy the files from the archive_to_add into the temporary file\r\n $v_size = $v_central_dir_to_add['offset'];\r\n while ($v_size != 0)\r\n {\r\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, \"Read $v_read_size bytes\");\r\n $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);\r\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\r\n $v_size -= $v_read_size;\r\n }\r\n\r\n // ----- Store the offset of the central dir\r\n $v_offset = @ftell($v_zip_temp_fd);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, \"New offset of central dir : $v_offset\");\r\n\r\n // ----- Copy the block of file headers from the old archive\r\n $v_size = $v_central_dir['size'];\r\n while ($v_size != 0)\r\n {\r\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, \"Read $v_read_size bytes\");\r\n $v_buffer = @fread($this->zip_fd, $v_read_size);\r\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\r\n $v_size -= $v_read_size;\r\n }\r\n\r\n // ----- Copy the block of file headers from the archive_to_add\r\n $v_size = $v_central_dir_to_add['size'];\r\n while ($v_size != 0)\r\n {\r\n $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);\r\n //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, \"Read $v_read_size bytes\");\r\n $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);\r\n @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);\r\n $v_size -= $v_read_size;\r\n }\r\n\r\n // ----- Merge the file comments\r\n $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];\r\n\r\n // ----- Calculate the size of the (new) central header\r\n $v_size = @ftell($v_zip_temp_fd)-$v_offset;\r\n\r\n // ----- Swap the file descriptor\r\n // Here is a trick : I swap the temporary fd with the zip fd, in order to use\r\n // the following methods on the temporary fil and not the real archive fd\r\n $v_swap = $this->zip_fd;\r\n $this->zip_fd = $v_zip_temp_fd;\r\n $v_zip_temp_fd = $v_swap;\r\n\r\n // ----- Create the central dir footer\r\n if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)\r\n {\r\n $this->privCloseFd();\r\n $p_archive_to_add->privCloseFd();\r\n @fclose($v_zip_temp_fd);\r\n $this->zip_fd = null;\r\n\r\n // ----- Reset the file list\r\n unset($v_header_list);\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }\r\n\r\n // ----- Swap back the file descriptor\r\n $v_swap = $this->zip_fd;\r\n $this->zip_fd = $v_zip_temp_fd;\r\n $v_zip_temp_fd = $v_swap;\r\n\r\n // ----- Close\r\n $this->privCloseFd();\r\n $p_archive_to_add->privCloseFd();\r\n\r\n // ----- Close the temporary file\r\n @fclose($v_zip_temp_fd);\r\n\r\n // ----- Delete the zip file\r\n // TBC : I should test the result ...\r\n @unlink($this->zipname);\r\n\r\n // ----- Rename the temporary file\r\n // TBC : I should test the result ...\r\n //@rename($v_zip_temp_name, $this->zipname);\r\n PclZipUtilRename($v_zip_temp_name, $this->zipname);\r\n\r\n // ----- Return\r\n //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);\r\n return $v_result;\r\n }", "title": "" }, { "docid": "0e92a44bab04c4686e6e55ffbd53e3e5", "score": "0.50378954", "text": "function extract( $filename, $dest_dir ) {\n\t$zippy = Zippy::load();\n\n\t$site_package = $zippy->open( $filename );\n\tmkdir( $dest_dir );\n\t$site_package->extract( $dest_dir );\n}", "title": "" }, { "docid": "909a349bd48d07422f75478634bf048e", "score": "0.50275904", "text": "protected function cleanup()\n {\n BaseFileHelper::removeDirectory($this->getZipOutputPath());\n }", "title": "" }, { "docid": "241cc37dac3ccc936c623e4b0f88b23a", "score": "0.50216925", "text": "protected function publishFiles()\n {\n \t$this->info('Copying required files like Assets, Database migrations etc.');\n \t$this->call('vendor:publish', ['--provider' => FoundationServiceProvider::class]);\n }", "title": "" }, { "docid": "f9b57320f0f923bc33bae878360bf51d", "score": "0.50212663", "text": "function createZipArchive($type, $data) {\n // Create the Zip file\n $zipfile = 'survey_results_' . date('Ymd') . '.zip';\n $zipfilepath = '/tmp/' . $zipfile;\n $zip = new ZipArchive;\n $res = $zip->open($zipfilepath, ZipArchive::CREATE);\n \n if ($res !== TRUE) {\n die('Failed to create ZIP archive file');\n } else {\n $key_num = 0;\n $survey_list = array_keys($data);\n\n // Loop through data for each survey table\n foreach($data as $survey) {\n $flag = false;\n \n // Set current survey filename\n $survey_file = $survey_list[$key_num];\n\n // Create a temporary file\n // The memory threshold is set to 1 MB (1024 * 1024).\n // If the file gets larger than that, PHP would create a temporary file; \n // otherwise, all will happen in memory.\n $fd = fopen('php://temp/maxmemory:1048576', 'w');\n if (false === $fd) {\n die('Failed to create temporary file');\n }\n \n // Loop through rows of a given survey table\n foreach($survey as $row) {\n // Set field/column names as first row in the file\n if(!$flag) {\n // Format the data as tab-delimited values\n fputcsv($fd, array_keys($row), \"\\t\");\n fwrite($fd, \"\\r\\n\");\n $flag = true;\n }\n \n // Apply to every part of the data row a filter for any possible characters that will corrupt data output into tab-delimited format\n array_walk($row, 'cleanData');\n \n // Format the data as tab-delimited values\n foreach($row as $key => $value) {\n $value = html_entity_decode($value, ENT_QUOTES | ENT_XML1, 'UTF-8');\t// Convert all HTML entities to their applicable characters\n $row[$key] = $value;\n }\n \n // Add the row of data into the file\n fputcsv($fd, array_values($row), \"\\t\");\n fwrite($fd, \"\\r\\n\");\n }\n // Return to the start of the file stream\n rewind($fd);\n \n // Add the in-memory file to the archive, giving it a name\n $zip->addFromString('survey_' . $survey_file . '_results_' . date('Ymd') . '.txt', stream_get_contents($fd) );\n \n // Close the file\n fclose($fd);\n \n ++$key_num;\n }\n\n // Close the Zip archive\n $zip->close();\n \n // Generate the archive file for download\n header('Content-Type: application/zip');\n header('Content-disposition: attachment; filename='.$zipfile);\n header('Content-Length: ' . filesize($zipfilepath));\n readfile($zipfilepath);\n \n // Remove the Zip archive\n unlink($zipfilepath);\n }\n}", "title": "" }, { "docid": "d862aaf83219081ee33d21fc9132f73e", "score": "0.50197196", "text": "function modifyZipfile($zipFilename, $tag, $repoName) {\n\n $fileToModify = 'composer.json';\n\n $zip = new ZipArchive;\n\n if ($zip->open($zipFilename) === TRUE) {\n $shortestIndex = -1;\n $shortestIndexLength = -1;\n $fileToReplace = null;\n\n for( $i = 0; $i < $zip->numFiles; $i++ ){\n $stat = $zip->statIndex( $i );\n\n if (basename($stat['name']) == 'composer.json'){\n $length = strlen($stat['name']);\n if ($shortestIndex == -1 || $length < $shortestIndexLength) {\n $shortestIndex = $i;\n $shortestIndexLength = $length;\n $fileToReplace = $stat['name'];\n }\n }\n }\n\n if ($shortestIndex == -1) {\n //echo \"Failed to find the composer.json file, delete $zipFilename \\n\";\n //markFileToSkip($zipFilename);\n //$zip->close();\n //return ;\n echo \"Failed to find the composer.json file, creating it for $zipFilename \\n\";\n $contents = generateComposerJSON($repoName, $tag);\n $zip->addFromString(\"composer.json\", $contents);\n }\n else {\n //echo \"Found the file at $shortestIndex\\n\";\n $contents = $zip->getFromIndex($shortestIndex);\n \n $modifiedContents = modifyJson($contents, $tag);\n \n if ($modifiedContents) {\n echo \"Adding version tag $tag to file $zipFilename.\\n\";\n $zip->deleteName($fileToReplace); //Delete the old...\n $zip->addFromString($fileToReplace, $modifiedContents); //Write the new...\n }\n else{\n //File already contained a composer.json with a version entry in it\n }\n }\n \n $zip->close();//And write back to the filesystem.\n }\n else {\n echo 'failed to open';\n throw new \\Exception(\"Failed to open $zipFilename to check version info.\");\n }\n}", "title": "" }, { "docid": "fa49e516c9c01c376b97cc35274515cb", "score": "0.5007619", "text": "function createZip(array $filesToZip,string $zipFilePath){\n $zip = new ZipArchive;\n $res = $zip->open($zipFilePath, ZipArchive::CREATE);\n try {\n if ($res === true){\n foreach ($filesToZip as $file) {\n $zip->addFile($file, basename($file));\n }\n $zip->close();\n } else {\n throw new Exception(\"Error : zip file couldn't be created\");\n }\n } catch (Exception $e){\n if (PRODUCTION === false){\n echo $e->getMessage();\n }\n addToLog($e->getMessage());\n }\n}", "title": "" }, { "docid": "f2b0b78a72a6ec069123ae0964a0715e", "score": "0.50060004", "text": "function instant_ide_one_click_install() {\n\t\n\t$app = $_POST['context_menu_key'];\n\t\n\tif ( $app == 'install_wordpress' ) {\n\t\t\n\t\t$app_name = 'wordpress';\n\t\t$app_nicename = 'WordPress';\n\t\tfile_put_contents( IIDE_DIR . '/tmp/wordpress.zip', fopen( 'https://wordpress.org/latest.zip', 'r' ) );\n\t\t\n\t} elseif ( $app == 'install_october' ) {\n\t\t\n\t\t$app_name = 'october';\n\t\t$app_nicename = 'October';\n\t\tfile_put_contents( IIDE_DIR . '/tmp/october.zip', fopen( 'https://octobercms.com/download', 'r' ) );\n\t\t\n\t}\n\t\n\tif ( file_exists( IIDE_DIR . '/tmp/' . $app_name . '.zip' ) ) {\n\t\t\n\t\t// Initialize archive object\n\t\t$zip = new ZipArchive();\n\t\t\n\t\t$res = $zip->open( IIDE_DIR . '/tmp/' . $app_name . '.zip' );\n\t\t\n\t\tif ( $res === TRUE ) {\n\t\t\t\n\t\t\t$zip->extractTo( IIDE_DIR . '/tmp/' );\n\t\t\t$zip->close();\n\t\t\t\n\t\t\tif ( glob( IIDE_DIR . '/tmp/' . $app_name . '*' ) ) {\n\t\t\t\t\n\t\t\t\t$files = scandir( IIDE_DIR . '/tmp' );\n\t\t\t\t$app_file = '';\n\t\t\t\tforeach( $files as $file ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( strpos( $file, '.zip' ) !== false )\n\t\t\t\t\t\tunlink( IIDE_DIR . '/tmp/' . $file );\n\t\t\t\t\telseif ( strpos( $file, $app_name ) !== false )\n\t\t\t\t\t\t$app_file = $file;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$folder_name = $_POST['name'] != '' ? '/' . $_POST['name'] : '';\n\t\t\t\t\n\t\t\t\tif ( $app == 'install_october' )\n\t\t\t\t\tinstant_ide_copy_dir( IIDE_DIR . '/tmp/install-master/' . $app_file, PLATFORM_DIR_DEV_PATH . '/' . $_POST['rel_path'] );\n\t\t\t\telse\n\t\t\t\t\tinstant_ide_copy_dir( IIDE_DIR . '/tmp/' . $app_file, PLATFORM_DIR_DEV_PATH . '/' . $_POST['rel_path'] );\n\n\t\t\t\t\n\t\t\t\techo $app_nicename . ' Install Successful!';\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\techo 'Install Error: ' . $app_nicename . ' ZIP File Could Not Be Unzipped';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\techo 'Install Error: ' . $app_nicename . ' ZIP File Could Not Be Unzipped';\n\t\t\t\n\t\t}\n\t\n\t} else {\n\t\t\n\t\techo 'Install Error: ' . $app_nicename . ' Could Not Be Installed';\n\t\t\n\t}\n\t\n\tinstant_ide_cleanup_dir( IIDE_DIR . '/tmp/' );\n\t\n\texit();\n\t\n}", "title": "" }, { "docid": "8d471152144f06186bec4b786cdc1bb7", "score": "0.49949017", "text": "function zip_entry_close($zip_ent) {}", "title": "" }, { "docid": "4d69ad199e2b9fc1b9b827ef5b252bb6", "score": "0.4985047", "text": "public function UnZip(){\n\t\t$ZipFile = $this->NewCoreFilesZip;\n\t\t$zip = new ZipArchive();\n\n\t\tif ($zip->open($ZipFile) === TRUE) {\n\t\t\t\n\n\t\t\t\t\n\t\t$zip->extractTo('../');\n\n\t\t\t\n\t\t\t$zip->close();\n\t\t\techo 'Success!!!';\n\t\t} else {\n\t\t\techo 'failed';\n\t\t}\n\t}", "title": "" }, { "docid": "b91fe30c0f0f60f1bf5a3f465e3a2193", "score": "0.49833676", "text": "function zip_entry_compressionmethod($zip_entry) {}", "title": "" }, { "docid": "d6973846825414991c15dcc655e2d17e", "score": "0.49731877", "text": "function cacheRepo($repo, $zipsDirectory, $accessToken = null) {\n\n $ignoreList = array();\n \n if (file_exists(\"ignoreList.txt\") == true) {\n $ignoreList = file(\"ignoreList.txt\", FILE_IGNORE_NEW_LINES);\n }\n \n $tagPath = \"https://api.github.com/repos/\".$repo.\"/tags\";\n \n if ($accessToken) {\n $tagPath .= '?access_token='.$accessToken;\n }\n\n $fileContents = file_get_contents($tagPath);\n \n if (!$fileContents) {\n echo \"Failed to get tag list for repo \".$repo;\n exit(0);\n }\n\n $tagContentArray = json_decode($fileContents, true);\n\n $count = 0;\n\n foreach ($tagContentArray as $tagContent) {\n\n $tagName = $tagContent['name'];\n $zendReleasePrefix = 'release-';\n \n if (strpos($tagName, $zendReleasePrefix) === 0) {\n $tagName = substr($tagName, strlen($zendReleasePrefix));\n }\n \n $filename = str_replace(\"/\", \"_\", $repo);\n $filename .= '_'.$tagName.'.zip';\n\n $filename = $zipsDirectory.$filename;\n\n if (in_array($filename, $ignoreList) == true) {\n //echo \"File $filename is in the ignore list, skipping.\\n\";\n continue;\n }\n\n if (file_exists($filename) == false) {\n $url = $tagContent['zipball_url'];\n\n if ($accessToken) {\n $url .= '?access_token='.$accessToken;\n }\n\n downloadFile($url, $filename);\n }\n\n try {\n modifyZipfile($filename, $tagName, $repo);\n }\n catch(\\Exception $e) {\n throw new \\Exception(\"Error processing $filename: \".$e->getMessage(), $e->getCode(), $e);\n }\n\n //Hack to only do a few files at once.\n $count++;\n if ($count > 10) {\n return;\n }\n }\n}", "title": "" }, { "docid": "314535dbfefdd36124f233b5aa4fcfbe", "score": "0.49633336", "text": "public function prepare_deployment() {\n\n\n\t\t\t$this->clear_file_list();\n\t\t\t$this->create_github_deployment_list($this->_archiveName, $this->_archiveName, $this->_remotePath);\n\n\t\t\techo 'SUCCESS';\n }", "title": "" }, { "docid": "c6015e35ee90311da8059a8f7875268d", "score": "0.49508625", "text": "function close()\n {\n $this->zip->close();\n }", "title": "" }, { "docid": "25185cacdf20b459abb40d2774900e0f", "score": "0.49367172", "text": "function extractOneProjectUnderZIP($targetPath, $newName) {\n echo $newName;\n exportDataProject($newName);\n\n // INITIALISATION DE L'ARCHIVE ZIP\n $targetDir = $targetPath;\n if (is_dir($targetDir)) {\n // echo $targetDir.'</br>';\n // OUVERTRE DE L'ARCHIVE ZIP\n $zip = new ZipArchive();\n $zipName = $newName.'.zip';\n $rootDir = scandir($targetDir);\n if (isset($rootDir[2])) {\n // echo $targetDir.$rootDir[2].'/</br>';\n $codesDir = scandir($targetDir.$rootDir[2].'/');\n }\n if (isset($rootDir[3])) {\n $filesDir = scandir($targetDir.$rootDir[3].'/');\n }\n if (isset($rootDir[4])) {\n $picturesDir = scandir($targetDir.$rootDir[4].'/');\n }\n if (isset($rootDir[5])) {\n $reportDir = scandir($targetDir.$rootDir[5].'/');\n }\n if (isset($rootDir[6])) {\n $sharesDir = scandir($targetDir.$rootDir[6].'/');\n }\n\n // CREATION DE L'ARCHIVE ZIP\n if ($zip->open($zipName, ZipArchive::CREATE) !== TRUE) {\n exit(\"Impossible d'ouvrir le fichier '$zipName'\\n\");\n }\n\n $i = 2;\n $j = 2;\n while (isset($codesDir[$j])) {\n // echo $targetDir.'/'.$rootDir[$i].'/'.$codesDir[$j].'</br>';\n $zip->addFile($targetDir.'/'.$rootDir[$i].'/'.$codesDir[$j], $rootDir[$i].'/'.$codesDir[$j]);\n $j++;\n }\n $i++;\n $j = 2;\n // echo '</br>';\n while (isset($filesDir[$j])) {\n // echo $targetPath.$targetDir.'/'.$rootDir[$i].'/'.$filesDir[$j].'</br>';\n $zip->addFile($targetDir.'/'.$rootDir[$i].'/'.$filesDir[$j], $rootDir[$i].'/'.$filesDir[$j]);\n $j++;\n }\n $i++;\n $j = 2;\n // echo '</br>';\n while (isset($picturesDir[$j])) {\n // echo $targetDir.'/'.$rootDir[$i].'/'.$picturesDir[$j].'</br>';\n $zip->addFile($targetDir.'/'.$rootDir[$i].'/'.$picturesDir[$j], $rootDir[$i].'/'.$picturesDir[$j]);\n $j++;\n }\n $i++;\n $j = 2;\n // echo '</br>';\n while (isset($reportDir[$j])) {\n // echo $targetDir.'/'.$rootDir[$i].'/'.$reportDir[$j].'</br>';\n $zip->addFile($targetDir.'/'.$rootDir[$i].'/'.$reportDir[$j], $rootDir[$i].'/'.$reportDir[$j]);\n $j++;\n }\n $i++;\n $j = 2;\n // echo '</br>';\n while (isset($sharesDir[$j])) {\n // echo $targetDir.'/'.$rootDir[$i].'/'.$sharesDir[$j].'</br>';\n $zip->addFile($targetDir.'/'.$rootDir[$i].'/'.$sharesDir[$j], $rootDir[$i].'/'.$sharesDir[$j]);\n $j++;\n }\n\n $zip->addFile($newName.'.csv', basename($newName));\n\n // FERMETURE DE L'ARCHIVE ZIP\n $zip->close();\n\n } else {\n echo 'Le dossier situé à : '.$targetDir.' n\\'existe pas </br>';\n }\n }", "title": "" }, { "docid": "8a58ac2226f40a0fd0f18cf3c3190c9e", "score": "0.4923802", "text": "public static function download($name)\n\t{\n\t\tif (!static::$libraries[$name]) {\n\t\t\tApp\\Log::warning('Library does not exist: ' . $name);\n\t\t\tthrow new \\App\\Exceptions\\NoPermitted('LBL_PERMISSION_DENIED', 406);\n\t\t}\n\n\t\t$lib = static::$libraries[$name];\n\t\tif (file_exists($lib['dir'] . 'version.php')) {\n\t\t\tApp\\Log::info('Library has already been downloaded: ' . $name);\n\n\t\t\treturn false;\n\t\t}\n\t\t$path = static::TEMP_DIR . DIRECTORY_SEPARATOR . $lib['name'] . '.zip';\n\t\t$mode = AppConfig::developer('MISSING_LIBRARY_DEV_MODE') ? 'developer' : App\\Version::get($lib['name']);\n\t\t$compressedName = $lib['name'] . '-' . $mode;\n\t\tif (!file_exists($path)) {\n\t\t\tstream_context_set_default([\n\t\t\t\t'ssl' => [\n\t\t\t\t\t'verify_peer' => true,\n\t\t\t\t\t'verify_peer_name' => true,\n\t\t\t\t],\n\t\t\t]);\n\t\t\t$url = $lib['url'] . \"/archive/$mode.zip\";\n\t\t\t$headers = get_headers($url, 1);\n\t\t\tif (isset($headers['Status']) && strpos($headers['Status'], '302') !== false) {\n\t\t\t\tApp\\Log::trace('Started downloading library: ' . $name);\n\t\t\t\tif ($file = file_get_contents($url, false, stream_context_create(['ssl' => ['verify_peer' => true, 'verify_peer_name' => true]]))) {\n\t\t\t\t\tfile_put_contents($path, $file);\n\t\t\t\t\tApp\\Log::trace('Completed downloads library: ' . $name);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tApp\\Log::warning('Can not connect to the server' . $url);\n\t\t\t}\n\t\t}\n\t\tif (file_exists($path) && filesize($path) > 0) {\n\t\t\t$zip = \\App\\Zip::openFile($path, ['checkFiles' => false]);\n\t\t\t$zip->unzip([$compressedName => $lib['dir']]);\n\t\t\tunlink($path);\n\t\t} else {\n\t\t\tApp\\Log::warning('No import file: ' . $name);\n\t\t}\n\t}", "title": "" }, { "docid": "210e93748c07d6aaac27f53d51e18c02", "score": "0.49154058", "text": "public function createRelease()\n {\n if (!file_exists($this->destinationDir) && !mkdir($this->destinationDir, 0777, true)) {\n throw new BuildException(\"ERROR: can not create directory '{$this->destinationDir}'\");\n }\n $startTime = date('H:i:s');\n $this->consoleWriter->displayText(\n \"--- Script started at {$startTime}{$this->lineSeparator}{$this->lineSeparator}\",\n ConsoleWriter::COLOR_GREEN\n );\n $this->createTmpProjectDir()\n ->setFilesConstants()\n ->generateLicensesFile()\n ->runComposerInstall()\n ->createPackage();\n $endTime = date('H:i:s');\n $this->consoleWriter->displayText(\n \"{$this->lineSeparator}--- Script ended at {$endTime}{$this->lineSeparator}\",\n ConsoleWriter::COLOR_GREEN\n );\n\n if ($this->useZip) {\n $argReleaseZipFilePath = escapeshellarg(\"{$this->destinationDir}/{$this->zipFileName}\");\n $releaseSize = exec(\"du -hs {$argReleaseZipFilePath} | cut -f1\");\n } else {\n $argReleaseDirectoryPath = escapeshellarg(\"{$this->destinationDir}\");\n $releaseSize = exec(\"du -hs {$argReleaseDirectoryPath} | cut -f1\");\n }\n $this->consoleWriter->displayText(\n \"--- Release size: {$releaseSize}{$this->lineSeparator}\",\n ConsoleWriter::COLOR_GREEN\n );\n\n return $this;\n }", "title": "" }, { "docid": "5d8641809c2ed95880e3b3ec6a85fc0f", "score": "0.49111676", "text": "public function close_archive() {\n\t\ttry {\n\t\t\tif ( ! $this->zip->close() ) {\n\t\t\t\tthrow new Exception( 'Could not write the zip file' );\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\tthrow new Exception( $e->getMessage() );\n\t\t}\n\n\t\tumask( $this->umask );\n\n\t\treturn Main::get_exported_dir_url() . $this->zip_filename;\n\t}", "title": "" }, { "docid": "b6f6a6f05cfc289fb6108844fa8b721d", "score": "0.49097303", "text": "public static function compress_site_scripts() {\n\t\tglobal $wp_scripts, $wp_filesystem;\n\n\t\tif ( ! isset( $wp_filesystem ) ) {\n\t\t\tWR_Nitro_Pluggable::init_file_system();\n\t\t}\n\n\t\t// Get theme options.\n\t\t$wr_nitro_options = WR_Nitro::get_options();\n\n\t\t// Verify WordPress's $wp_scripts object.\n\t\tif ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get location to store compression file.\n\t\tif ( ! $path = self::get_location() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get upload directory info.\n\t\t$upload = wp_upload_dir();\n\n\t\t// Resolve all dependencies.\n\t\t$wp_scripts->all_deps( $wp_scripts->queue );\n\n\t\t// Get all scripts including dependencies.\n\t\t$scripts = $inline = $queue = $last_modification = array();\n\t\t$index = wp_generate_password( 8, false );\n\n\t\tforeach ( $wp_scripts->to_do as $handle ) {\n\t\t\t$skip = false;\n\n\t\t\t// Do not compress script without recognizable source.\n\t\t\tif ( ! is_string( $wp_scripts->registered[ $handle ]->src ) ) {\n\t\t\t\t$skip = true;\n\t\t\t}\n\n\t\t\t// Prepare source.\n\t\t\tif ( ! $skip ) {\n\t\t\t\t$source = current( explode( '?', $wp_scripts->registered[ $handle ]->src, 2 ) );\n\n\t\t\t\tif ( '//' == substr( $source, 0, 2 ) ) {\n\t\t\t\t\t$source = set_url_scheme( $source );\n\t\t\t\t}\n\n\t\t\t\tif ( preg_match( '#^(https?:|//)#i', $source ) ) {\n\t\t\t\t\t// Do not compress remote script.\n\t\t\t\t\tif ( stripos( $source, site_url() ) === false ) {\n\t\t\t\t\t\t$skip = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Do not compress dynamic generation script.\n\t\t\t\t\tif ( '.js' != substr( $source, -3 ) ) {\n\t\t\t\t\t\t$skip = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Do not compress scripts of Revolution Slider plugin.\n\t\t\t\tif ( false !== strpos( $source, '/plugins/revslider/' ) ) {\n\t\t\t\t\t$skip = true;\n\t\t\t\t}\n\n\t\t\t\t// Do not compress Isotope script of Visual Composer plugin.\n\t\t\t\telseif (\n\t\t\t\t\tfalse !== strpos( $source, '/plugins/js_composer/' )\n\t\t\t\t\t&&\n\t\t\t\t\tfalse !== strpos( $source, '/isotope.pkgd.' )\n\t\t\t\t) {\n\t\t\t\t\t$skip = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Determine the position the script should be loaded in.\n\t\t\t$position = 'header';\n\n\t\t\tif ( isset( $wp_scripts->registered[ $handle ]->extra['group'] ) && 1 == $wp_scripts->registered[ $handle ]->extra['group'] ) {\n\t\t\t\t$position = 'footer';\n\t\t\t} elseif ( isset( $wp_scripts->groups ) && isset( $wp_scripts->groups[ $handle ] ) && $wp_scripts->groups[ $handle ] > 0 ) {\n\t\t\t\t$position = 'footer';\n\t\t\t} elseif ( isset( $wp_scripts->in_footer ) && in_array( $handle, $wp_scripts->in_footer, true ) ) {\n\t\t\t\t$position = 'footer';\n\t\t\t}\n\n\t\t\t// Check if the script should be skipped.\n\t\t\t$queue[] = $handle;\n\n\t\t\tif ( $skip ) {\n\t\t\t\tif ( is_string( $wp_scripts->registered[ $handle ]->src ) ) {\n\t\t\t\t\tif ( isset( $last_position ) && $last_position == $position && isset( $last_index ) && $last_index == $index ) {\n\t\t\t\t\t\t$index = wp_generate_password( 8, false );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Generate handle for the compression.\n\t\t\t$compression = $position . '-' . $index;\n\n\t\t\t// Enqueue compression file.\n\t\t\tif ( ! in_array( $compression, $queue ) ) {\n\t\t\t\t$queue[] = $compression;\n\t\t\t}\n\n\t\t\t// Get last file mofication time.\n\t\t\t$source = ltrim( str_replace( site_url(), '', $source ), '/' );\n\t\t\t$tmp = filemtime( ABSPATH . $source );\n\n\t\t\tif ( ! isset( $last_modification[ $compression ] ) || $last_modification[ $compression ] < $tmp ) {\n\t\t\t\t$last_modification[ $compression ] = $tmp;\n\t\t\t}\n\n\t\t\t// Store script source.\n\t\t\t$scripts[ $compression ][] = $source;\n\n\t\t\t// Store associated inline scripts.\n\t\t\tif ( isset( $wp_scripts->registered[ $handle ]->extra['data'] ) && ! empty( $wp_scripts->registered[ $handle ]->extra['data'] ) ) {\n\t\t\t\tif ( ! isset( $inline[ $compression ] ) ) {\n\t\t\t\t\t$inline[ $compression ] = array();\n\t\t\t\t}\n\n\t\t\t\t$inline[ $compression ] = array_merge(\n\t\t\t\t\t$inline[ $compression ],\n\t\t\t\t\t( array ) $wp_scripts->registered[ $handle ]->extra['data']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Store handle of script being compressed for reference later.\n\t\t\tself::$compressed_handles[] = $handle;\n\n\t\t\t// Store last position and index.\n\t\t\t$last_position = $position;\n\t\t\t$last_index = $index;\n\t\t}\n\n\t\t// Make sure we have scripts to compress.\n\t\tif ( ! count( $scripts ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure we can connect to file system.\n\t\tif ( ! WR_Nitro_Pluggable::init_file_system() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Load minification library.\n\t\tif ( ! class_exists( 'JShrink_Minifier' ) ) {\n\t\t\tget_template_part( 'libraries/jshrink/minifier' );\n\t\t}\n\n\t\t// Loop thru scripts to compress.\n\t\tglobal $wp_filesystem;\n\n\t\tforeach ( $scripts as $handle => $sources ) {\n\t\t\t// Generate name for compression file.\n\t\t\t$compression = $path . '/' . md5( implode( $sources ) ) . '.js';\n\n\t\t\t// Make sure compression file not outdated if exists.\n\t\t\tunset( $num_files );\n\n\t\t\tif ( ! @is_file( $compression ) || filemtime( $compression ) < $last_modification[ $handle ] ) {\n\t\t\t\t// Loop thru script files to compress and combine.\n\t\t\t\t$compressed = '';\n\t\t\t\t$num_files = 1;\n\t\t\t\t$max_size = $wr_nitro_options['max_compression_size'] * 1000;\n\n\t\t\t\tforeach ( $sources as $source ) {\n\t\t\t\t\t// Read script file.\n\t\t\t\t\t$compressed .= ( $compressed == '' ? '' : \"\\n\" );\n\t\t\t\t\t$compressed .= \"/* {$source} */\\n\";\n\n\t\t\t\t\tif ( false !== strpos( $source, '.min.js' ) ) {\n\t\t\t\t\t\t$compressed .= $wp_filesystem->get_contents( ABSPATH . $source );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$compressed .= JShrink_Minifier::minify(\n\t\t\t\t\t\t\t$wp_filesystem->get_contents( ABSPATH . $source ),\n\t\t\t\t\t\t\tarray( 'flaggedComments' => false )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$compressed .= \"\\n\";\n\n\t\t\t\t\t// Check if compression size is greater than the maximum allowed size.\n\t\t\t\t\tif ( strlen( $compressed ) >= $max_size ) {\n\t\t\t\t\t\tif ( $num_files == 1 ) {\n\t\t\t\t\t\t\tif ( ! $wp_filesystem->put_contents( $compression, $compressed ) ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ( ! $wp_filesystem->put_contents( substr( $compression, 0, -3 ) . \"-{$num_files}.js\", $compressed ) ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Increase the total number of compression file.\n\t\t\t\t\t\t$num_files++;\n\n\t\t\t\t\t\t// Reset compressed content.\n\t\t\t\t\t\t$compressed = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Write compressed content to compression file.\n\t\t\t\tif ( $compressed != '' ) {\n\t\t\t\t\tif ( $num_files == 1 ) {\n\t\t\t\t\t\tif ( ! $wp_filesystem->put_contents( $compression, $compressed ) ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( ! $wp_filesystem->put_contents( substr( $compression, 0, -3 ) . \"-{$num_files}.js\", $compressed ) ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} elseif ( $num_files > 1 ) {\n\t\t\t\t\t$num_files--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load compression file.\n\t\t\tif ( ! isset( $num_files ) ) {\n\t\t\t\t$num_files = glob( substr( $compression, 0, -3 ) . '*.js' );\n\t\t\t\t$num_files = count( $num_files );\n\t\t\t}\n\n\t\t\t$position = substr( $handle, 0, strpos( $handle, '-' ) );\n\t\t\t$handling = $handle . ( $num_files > 1 ? '-1' : '' );\n\t\t\t$compression = str_replace( $upload['basedir'], $upload['baseurl'], $compression );\n\n\t\t\t$wp_scripts->add( $handling, $compression, array(), false, null );\n\n\t\t\tif ( 'footer' == $position ) {\n\t\t\t\t$wp_scripts->add_data( $handling, 'group', 1 );\n\t\t\t}\n\n\t\t\t// Set associated inline scripts.\n\t\t\tif ( isset( $inline[ $handle ] ) ) {\n\t\t\t\t$wp_scripts->add_data( $handling, 'data', implode( \"\\n\", $inline[ $handle ] ) );\n\t\t\t}\n\n\t\t\t// If there are more than 1 compression file, register every file depends on the preceding one.\n\t\t\tif ( $num_files > 1 ) {\n\t\t\t\tfor ( $i = 2; $i <= $num_files; $i++ ) {\n\t\t\t\t\t$handling = $handle . ( $i == $num_files ? '' : \"-{$i}\" );\n\t\t\t\t\t$compress = substr( $compression, 0, -3 ) . \"-{$i}.js\";\n\t\t\t\t\t$depends = array( $handle . '-' . ( $i - 1 ) );\n\n\t\t\t\t\t$wp_scripts->add( $handling, $compress, $depends, false, null );\n\n\t\t\t\t\tif ( 'footer' == $position ) {\n\t\t\t\t\t\t$wp_scripts->add_data( $handling, 'group', 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove all original scripts by unsetting required values.\n\t\tforeach ( self::$compressed_handles as $handle ) {\n\t\t\t$wp_scripts->registered[ $handle ]->src = false;\n\t\t\t$wp_scripts->registered[ $handle ]->deps = array();\n\t\t}\n\n\t\t// Reset scripts queue.\n\t\t$wp_scripts->reset();\n\n\t\t$wp_scripts->queue = $queue;\n\t\t$wp_scripts->to_do = array();\n\t}", "title": "" }, { "docid": "a802347754385897cdca3e3b5d1cf42f", "score": "0.4894409", "text": "function testArchiveSymlinkDirWithPclZip() {\n\n\t\t$this->backup->zip_command_path = false;\n\n\t\t$this->assertFileExists( $this->symlink );\n\n\t\t$this->backup->pcl_zip();\n\n\t\t$this->assertFileExists( $this->backup->archive_filepath() );\n\n\t\t$this->assertArchiveContains( $this->backup->archive_filepath(), array( basename( $this->symlink ) ) );\n\t\t$this->assertArchiveFileCount( $this->backup->archive_filepath(), 6 );\n\n\t\t$this->assertEmpty( $this->backup->errors() );\n\n\t}", "title": "" }, { "docid": "75dc67646d2fe18e6cc47e30d58835cc", "score": "0.48906484", "text": "private function _unzip_build($zip=FALSE,$temp='.')\n\t{\n\t\t// if no zip was passed, return error\n\t\tif ( ! $zip)\t\t\treturn FALSE;\n\n\t\t// create temp directory\n\t\tif ( ! $this->_create_temp_directory($temp)) \treturn FALSE;\n\n\t\t// initialize zip archive\n\t\t$z \t= new ZipArchive;\n\n\t\t// open zip file\n\t\tif ( ! $z->open($zip))\treturn FALSE;\n\n\t\t// extract build files into temp dir\n\t\t$z->extractTo($temp);\n\n\t\t// close zip\n\t\t$z->close();\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "9b132f94ac11ac36fcd67f74d49649d9", "score": "0.48881677", "text": "public function __invoke(ZipDatasetFiles $zipDatasetFiles)\n {\n $loggingContext['process_id'] = getmypid();\n $this->logger->info(\"ZipDatasetFilesHandler worker starting.\", $loggingContext);\n $datasetSubmissionId = $zipDatasetFiles->getDatasetSubmissionId();\n $datasetSubmission = $this->entityManager->getRepository(DatasetSubmission::class)->find($datasetSubmissionId);\n $udi = $datasetSubmission->getDataset()->getUdi();\n $destinationPath = $this->downloadDirectory . DIRECTORY_SEPARATOR . str_replace(':', '.', $udi) . '.zip';\n $loggingContext['UDI'] = $udi;\n $loggingContext['destination_path'] = $destinationPath;\n $fileset = $datasetSubmission->getFileset();\n if (!$fileset instanceof Fileset) {\n $this->logger->info('Not a fileset', $loggingContext);\n return;\n }\n $fileIds = array();\n foreach ($fileset->getProcessedFiles() as $file) {\n $fileIds[] = $file->getId();\n }\n $filesInfo = $this->fileRepository->getFilePathNameAndPhysicalPath($fileIds);\n try {\n $this->logger->info('Zipfile opened.', $loggingContext);\n $fileStream = fopen($destinationPath, 'w+');\n $outputStream = array('fileStream' => $fileStream);\n $this->zipFiles->start($outputStream, basename($destinationPath));\n foreach ($filesInfo as $fileItemInfo) {\n $this->logger->info(\"adding file: \" . $fileItemInfo['filePathName'] . '.', $loggingContext);\n $this->zipFiles->addFile($fileItemInfo['filePathName'], $this->datastore->getFile($fileItemInfo['physicalFilePath']));\n }\n $this->zipFiles->finish();\n $this->logger->info('Zipfile closed. ', $loggingContext);\n rewind($fileStream);\n $fileset = $datasetSubmission->getFileset();\n $fileset->setZipFilePath($destinationPath);\n $fileset->setZipFileSize(StreamInfo::getFileSize($outputStream));\n $fileset->setZipFileSha256Hash(StreamInfo::calculateHash($outputStream, DatasetSubmission::SHA256));\n fclose($fileStream);\n $this->entityManager->flush();\n } catch (\\Exception $exception) {\n $this->logger->error(sprintf('Unable to zip file. Message: %s', $exception->getMessage()), $loggingContext);\n return;\n }\n $this->logger->info(\"ZipDatasetFilesHandler worker finished.\", $loggingContext);\n }", "title": "" }, { "docid": "5f76a268448fa1869f887acb33f119c6", "score": "0.48724067", "text": "public function testCreateArchiveAndAddFiles()\n {\n $outputFromString = file_get_contents(__FILE__);\n $outputFromString2 = file_get_contents(\\dirname(__DIR__) . \\DIRECTORY_SEPARATOR . 'README.md');\n $outputFromFile = file_get_contents(\\dirname(__DIR__) . \\DIRECTORY_SEPARATOR . 'phpunit.xml');\n $outputFromStream = file_get_contents(\\dirname(__DIR__) . \\DIRECTORY_SEPARATOR . 'composer.json');\n\n $filenameFromString = basename(__FILE__);\n $filenameFromString2 = 'test_file.txt';\n $filenameFromFile = 'data/test file.txt';\n $filenameFromStream = 'data/ডিরেক্টরি/αρχείο.json';\n $emptyDirName = 'empty dir/пустой каталог/空目錄/ไดเรกทอรีที่ว่างเปล่า/';\n $emptyDirName2 = 'empty dir/пустой каталог/';\n $emptyDirName3 = 'empty dir/пустой каталог/ещё один пустой каталог/';\n\n $tempFile = tempnam(sys_get_temp_dir(), 'txt');\n file_put_contents($tempFile, $outputFromFile);\n\n $tempStream = tmpfile();\n fwrite($tempStream, $outputFromStream);\n\n $zipFile = new ZipFile();\n $zipFile\n ->addFromString($filenameFromString, $outputFromString)\n ->addFile($tempFile, $filenameFromFile)\n ->addFromStream($tempStream, $filenameFromStream)\n ->addEmptyDir($emptyDirName)\n ;\n $zipFile[$filenameFromString2] = $outputFromString2;\n $zipFile[$emptyDirName2] = null;\n $zipFile[$emptyDirName3] = 'this content ignoring';\n static::assertSame(\\count($zipFile), 7);\n $zipFile\n ->saveAsFile($this->outputFilename)\n ->close()\n ;\n unlink($tempFile);\n\n static::assertCorrectZipArchive($this->outputFilename);\n\n $zipFile->openFile($this->outputFilename);\n static::assertSame(\\count($zipFile), 7);\n static::assertSame($zipFile[$filenameFromString], $outputFromString);\n static::assertSame($zipFile[$filenameFromFile], $outputFromFile);\n static::assertSame($zipFile[$filenameFromStream], $outputFromStream);\n static::assertSame($zipFile[$filenameFromString2], $outputFromString2);\n static::assertTrue(isset($zipFile[$emptyDirName]));\n static::assertTrue(isset($zipFile[$emptyDirName2]));\n static::assertTrue(isset($zipFile[$emptyDirName3]));\n static::assertTrue($zipFile->isDirectory($emptyDirName));\n static::assertTrue($zipFile->isDirectory($emptyDirName2));\n static::assertTrue($zipFile->isDirectory($emptyDirName3));\n\n $listFiles = $zipFile->getListFiles();\n static::assertSame($listFiles[0], $filenameFromString);\n static::assertSame($listFiles[1], $filenameFromFile);\n static::assertSame($listFiles[2], $filenameFromStream);\n static::assertSame($listFiles[3], $emptyDirName);\n static::assertSame($listFiles[4], $filenameFromString2);\n static::assertSame($listFiles[5], $emptyDirName2);\n static::assertSame($listFiles[6], $emptyDirName3);\n\n $zipFile->close();\n }", "title": "" }, { "docid": "62495b1e27948098767c54d00b879a64", "score": "0.48690662", "text": "function zipFile($filename,$fAddTimePostfix = true)\r\n\t\t{\r\n\t\t$zipCommand\t\t\t\t\t= \"/usr/bin/zip -j\";\r\n\t\t$filename\t\t\t\t\t= escapeshellcmd($filename);\r\n\t\t$aFileName \t\t\t\t\t= t3lib_div::split_fileref($filename);\t\r\n\t\t$timePostfix\t\t\t\t= $fAddTimePostfix ? strftime(\"_%y%m%d_%H%M%S\",time()) : '';\r\n\t\t//$zipFileName\t\t\t\t= $aFileName['path'] . $aFileName['filebody'] . $timePostfix . '.zip';\r\n\t\t$zipFileName\t\t\t\t= 'typo3temp/' . $this->correctFileBody($aFileName['filebody'],true) . $timePostfix . '.zip';\n\t\t\r\n\t\t//debug(PATH_site);\r\n\t\tif(!is_file(PATH_site . $filename)) die (\"Sourcefile ($src) does not exist...\");\r\n\t\tif(!is_dir(PATH_site . $aFileName['path'])) die ($aFileName['path'] . ' is not a valid directory...');\r\n\r\n\t\t$fullZIPCommand = $zipCommand . ' ' . PATH_site . $this->quoteFileName($zipFileName) . \r\n\t\t\t' ' . PATH_site . $this->quoteFileName($filename);\r\n\t\t//debug($fullZIPCommand);\n\t\t\r\n\t\t$aTemp = array();\r\n\t\texec($fullZIPCommand,$aTemp,$returnValue);\n\t\tif($returnValue != 0) {\n\t\t\tt3lib_div::debug($fullZIPCommand,'$fullZIPCommand');\n\t\t\treturn false;\n\t\t}\r\n\t\t\r\n\t\treturn $zipFileName;\r\n\t}", "title": "" }, { "docid": "18e2036d0af5be25a387e217bd2f2c57", "score": "0.48552495", "text": "public function __construct()\r\n\t{\r\n\t\tAEUtilLogger::WriteLog(_AE_LOG_DEBUG, \"AEArchiverZip :: New instance\");\r\n\r\n\t\t// Get chunk override\r\n\t\t$registry =& AEFactory::getConfiguration();\r\n\t\tif( $registry->get('engine.archiver.common.chunk_size', 0) > 0 )\r\n\t\t{\r\n\t\t\t$this->AkeebaPackerZIP_CHUNK_SIZE = AKEEBA_CHUNK;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Try to use as much memory as it's possible for CRC32 calculation\r\n\t\t\t$memLimit = ini_get(\"memory_limit\");\r\n\t\t\t\r\n\t\t\tif(strstr($memLimit, 'M')) {\r\n\t\t\t\t$memLimit = (int)$memLimit * 1048576;\r\n\t\t\t} elseif(strstr($totalRAM, 'K')) {\r\n\t\t\t\t$memLimit = (int)$memLimit * 1024;\r\n\t\t\t} elseif(strstr($memLimit, 'G')) {\r\n\t\t\t\t$memLimit = (int)$memLimit * 1073741824;\r\n\t\t\t} else {\r\n\t\t\t\t$memLimit = (int)$memLimit;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( is_numeric($memLimit) && ($memLimit < 0) ) $memLimit = \"\"; // 1.2a3 -- Rare case with memory_limit < 0, e.g. -1Mb!\r\n\t\t\tif ( ($memLimit == \"\") ) {\r\n\t\t\t\t// No memory limit, use 2Mb chunks (fairly large, right?)\r\n\t\t\t\t$this->AkeebaPackerZIP_CHUNK_SIZE = 2097152;\r\n\t\t\t} elseif ( function_exists(\"memory_get_usage\") ) {\r\n\t\t\t\t// PHP can report memory usage, see if there's enough available memory; Joomla! alone eats about 5-6Mb! This code is called on files <= 1Mb\r\n\t\t\t\t$memLimit = $this->_return_bytes( $memLimit );\r\n\t\t\t\t$availableRAM = $memLimit - memory_get_usage();\r\n\r\n\t\t\t\tif ($availableRAM <= 0) {\r\n\t\t\t\t\t// Some PHP implemenations also return the size of the httpd footprint!\r\n\t\t\t\t\tif ( ($memLimit - 6291456) > 0 ) {\r\n\t\t\t\t\t\t$this->AkeebaPackerZIP_CHUNK_SIZE = $memLimit - 6291456;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->AkeebaPackerZIP_CHUNK_SIZE = 2097152;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->AkeebaPackerZIP_CHUNK_SIZE = $availableRAM * 0.5;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// PHP can't report memory usage, use a conservative 512Kb\r\n\t\t\t\t$this->AkeebaPackerZIP_CHUNK_SIZE = 524288;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// NEW 2.3: Should we enable Split ZIP feature?\r\n\t\t$fragmentsize = $registry->get('engine.archiver.common.part_size', 0);\r\n\t\tif($fragmentsize >= 65536)\r\n\t\t{\r\n\t\t\t// If the fragment size is AT LEAST 64Kb, enable Split ZIP\r\n\t\t\t$this->_useSplitZIP = true;\r\n\t\t\t$this->_fragmentSize = $fragmentsize;\r\n\t\t\t// Indicate that we have at least 1 part\r\n\t\t\t$statistics =& AEFactory::getStatistics();\r\n\t\t\t$statistics->updateMultipart(1);\r\n\t\t}\r\n\r\n\t\t// NEW 2.3: Should I use Symlink Target Storage?\r\n\t\t$dereferencesymlinks = $registry->get('engine.archiver.common.dereference_symlinks', true);\r\n\t\tif(!$dereferencesymlinks)\r\n\t\t{\r\n\t\t\t// We are told not to dereference symlinks. Are we on Windows?\r\n\t\t\tif (function_exists('php_uname'))\r\n\t\t\t{\r\n\t\t\t\t$isWindows = stristr(php_uname(), 'windows');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$isWindows = (DS == '\\\\');\r\n\t\t\t}\r\n\t\t\t// If we are not on Windows, enable symlink target storage\r\n\t\t\t$this->_symlink_store_target = !$isWindows;\r\n\t\t}\r\n\r\n\r\n\t\tAEUtilLogger::WriteLog(_AE_LOG_DEBUG, \"Chunk size for CRC is now \" . $this->AkeebaPackerZIP_CHUNK_SIZE . \" bytes\");\r\n\r\n\t\tparent::__construct();\r\n\t}", "title": "" }, { "docid": "41b54c696f32febeb7221aebdb80cf45", "score": "0.48504955", "text": "protected function loadRelease(): void\n {\n if (isset($this->release)) {\n return;\n }\n\n $data = Json::parse($this->client->fetch(self::API_RELEASE_URI)->content());\n\n if (!$data) {\n throw new RuntimeException('Cannot fetch latest Formwork release data');\n }\n\n $this->release = [\n 'name' => $data['name'],\n 'tag' => $data['tag_name'],\n 'date' => DateTimeImmutable::createFromFormat('Y-m-d\\TH:i:sO', $data['published_at'])->getTimestamp(),\n 'archive' => $data['zipball_url'],\n ];\n\n if ($this->options['preferDistAssets'] && !empty($data['assets'])) {\n $assetName = 'formwork-' . $data['tag_name'] . '.zip';\n $key = array_search($assetName, array_column($data['assets'], 'name'), true);\n\n if ($key !== false) {\n $this->release['archive'] = $data['assets'][$key]['browser_download_url'];\n }\n }\n }", "title": "" }, { "docid": "bc833f3ebd54b53102cf3c0216e7da07", "score": "0.484783", "text": "public function test()\n {\n $io = new \\QzPhp\\IO();\n $d = DIRECTORY_SEPARATOR;\n $storage = __DIR__ . $d . '..' . $d . '..' . $d . 'storage';\n $folder = $storage . $d . 'fromZip';\n $extractTo = $storage . $d . 'toZip';\n $file = $folder . $d . 'file.txt';\n $extractedFile = $extractTo . $d . 'file.txt';\n $zipFile = $storage . $d . 'zip.zip';\n mkdir($folder, 0777, true);\n touch($file);\n chmod($file, 0777);\n\n $io->zip($file, $zipFile);\n $io->unzip($zipFile, $extractTo);\n $this->assertFileExists($extractedFile);\n\n unlink($file);\n unlink($extractedFile);\n rmdir($folder);\n rmdir($extractTo);\n unlink($zipFile);\n }", "title": "" }, { "docid": "29acebb80b8c245af5d0587d4ad439fd", "score": "0.48262405", "text": "private function checkForZipArchive() {\n\t\tif (!in_array('zip', get_loaded_extensions())) {\n\t\t\t$this->markTestSkipped(\n\t\t\t\t'This PHP installation does not provide the ZIPArchive class.'\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "545e0b91dfb8c35933cc192ff4eb418c", "score": "0.48089832", "text": "function autoenable_drush_pm_post_download($request, $release) {\n $phase = drush_get_context('DRUSH_BOOTSTRAP_PHASE');\n if (($phase >= DRUSH_BOOTSTRAP_DRUPAL_SITE) &&\n drush_get_option('enable')) {\n if (file_exists($request['full_project_path'] . DIRECTORY_SEPARATOR . \n $request['name'] . '.info')) {\n drush_invoke('pm-enable', $request['name']); \n }\n }\n}", "title": "" }, { "docid": "158407adfac7b3e16d86bd94b32613f2", "score": "0.4802073", "text": "public function extractZipFile()\n {\n $zipDownloaded = $this->downloadIPTVZipFile->downloadZipFile();\n\n if (!isset($zipDownloaded)) {\n exit('[ERROR] : Fail to extract the ZIP archive ');\n }\n $this->zipArchive->open($zipDownloaded);\n $this->zipArchive->extractTo($this->extractPath);\n $this->zipArchive->close();\n\n echo \"ZIP archive downloaded.\";\n }", "title": "" }, { "docid": "6bb646acea8044c54f2ad107fb99a6ba", "score": "0.47820142", "text": "function create_zip($files = array(),$destination = '',$overwrite = false) \r\n{\r\n\t//if the zip file already exists and overwrite is false, return false\r\n\tif(file_exists($destination) && !$overwrite) \r\n\t{ \r\n\t\treturn false; \r\n\t}\r\n\t//vars\r\n\t$valid_files = array();\r\n\t//if files were passed in...\r\n\tif(is_array($files)) \r\n\t{\r\n\t\t//cycle through each file\r\n\t\tforeach($files as $file) \r\n\t\t{\r\n\t\t\t//make sure the file exists\r\n\t\t\tif(file_exists($file)) \r\n\t\t\t{\r\n\t\t\t\t$valid_files[] = $file;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t//if we have needed files\r\n\tif(count($valid_files)) \r\n\t{\r\n\t\t//create the archive\r\n\t\t$zip = new ZipArchive();\r\n\t\t$zipname = 'download.zip';\r\n\t\t\r\n\t\t//if($zip->open($destination,$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) \r\n\t\t//{\r\n\t\t//\treturn false;\r\n\t\t//}\r\n\t\t//add the files\r\n\t\t\r\n\t\t$zip->open($zipname, ZipArchive::CREATE);\r\n\t\tforeach($valid_files as $file) \r\n\t\t{\r\n\t\t\t$zip->addFile($file,$file);\r\n\t\t}\r\n\t\t\r\n\t\t//try\r\n\t\t//echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\r\n\t\t\r\n\t\t//close the zip\r\n\t\t$zip->close();\r\n\t\t\r\n\t\t//stream it\r\n\t\theader('Content-Type: application/zip');\r\n\t\theader('Content-disposition: attachment; filename=filename.zip');\r\n\t\theader('Content-Length: ' . filesize($zipfilename));\r\n\t\treadfile($zipname);\r\n\t\t//check to make sure the file exists\r\n\t\treturn file_exists($destination);\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "0d185b446d64c2e4741a7b74973dbe8a", "score": "0.47594458", "text": "private function publishAsset()\n {\n $tags = ['bakerflow_assets', 'seeds'];\n $this->call('vendor:publish', ['--provider' => BakerflowServiceProvider::class, '--tag' => $tags]);\n $this->call('vendor:publish', ['--provider' => ImageServiceProviderLaravel5::class]);\n }", "title": "" }, { "docid": "9bc2ad0ea64c592b76e98ff4e89bc09c", "score": "0.47441506", "text": "function createArchive() {\n\t\t$this->editArchive();\n\t}", "title": "" }, { "docid": "dc5cc0427f005fc311383c31c321a4f2", "score": "0.47438374", "text": "function remove_from_fractal_zip($filename) {}", "title": "" }, { "docid": "0ec44d50e9fbef219ef0f36fce138f44", "score": "0.47422197", "text": "public function run()\n {\n if ($this->getConfig()->release('enabled', false) == true) {\n $releasesDirectory = $this->getConfig()->release('directory', 'releases');\n $symlink = $this->getConfig()->release('symlink', 'current');\n\n $output = '';\n $result = $this->runCommandRemote('ls -1 ' . $releasesDirectory, $output);\n $releases = ($output == '') ? array() : explode(PHP_EOL, $output);\n\n if (count($releases) == 0) {\n Console::output('Release are not available for <dark_gray>' . $this->getConfig()->getHost() . '</dark_gray> ... <red>FAIL</red>');\n\n } else {\n rsort($releases);\n\n $releaseIsAvailable = false;\n if ($this->getRelease() == '') {\n $releaseId = $releases[0];\n $releaseIsAvailable = true;\n\n } else if ($this->getRelease() <= 0) {\r\n $index = $this->getRelease() * -1;\n if (isset($releases[$index])) {\n $releaseId = $releases[$index];\n $releaseIsAvailable = true;\n }\r\n } else {\r\n if (in_array($this->getRelease(), $releases)) {\n $releaseId = $this->getRelease();\n $releaseIsAvailable = true;\n }\r\n }\n\n if (!$releaseIsAvailable) {\n Console::output('Release <dark_gray>' . $this->getRelease() . '</dark_gray> is invalid or unavailable for <dark_gray>' . $this->getConfig()->getHost() . '</dark_gray> ... <red>FAIL</red>');\n\n } else {\n Console::output('Rollback release on <dark_gray>' . $this->getConfig()->getHost() . '</dark_gray>');\n $rollbackTo = $releasesDirectory . '/' . $releaseId;\n\n // Tasks\n $tasks = 1;\r\n $completedTasks = 0;\n $tasksToRun = $this->getConfig()->getTasks();\n $this->getConfig()->setReleaseId($releaseId);\n\n // Run Deploy Tasks\r\n foreach ($tasksToRun as $taskData) {\r\n $task = Factory::get($taskData, $this->getConfig(), true, self::STAGE_DEPLOY);\n $task->init();\n Console::output('Running <purple>' . $task->getName() . '</purple> ... ', 2, false);\n\n if ($task instanceOf RollbackAware) {\n $tasks++;\n $result = $task->run();\r\n\r\n if ($result == true) {\r\n Console::output('<green>OK</green>', 0);\r\n $completedTasks++;\r\n } else {\r\n Console::output('<red>FAIL</red>', 0);\r\n }\n } else {\n Console::output('<yellow>SKIPPED</yellow>', 0);\n }\r\n }\n\n // Changing Release\n Console::output('Running <purple>Rollback Release [id=' . $releaseId . ']</purple> ... ', 2, false);\n\n $userGroup = '';\n $resultFetch = $this->runCommandRemote('ls -ld ' . $rollbackTo . ' | awk \\'{print \\$3\":\"\\$4}\\'', $userGroup);\n $command = 'rm -f ' . $symlink\n . ' && '\n . 'ln -sf ' . $rollbackTo . ' ' . $symlink;\n\n if ($resultFetch) {\n \t $command .= ' && chown -h ' . $userGroup . ' ' . $symlink;\n }\n\n $result = $this->runCommandRemote($command);\n\n if ($result) {\n Console::output('<green>OK</green>', 0);\n $completedTasks++;\n } else {\n Console::output('<red>FAIL</red>', 0);\n }\n\n // Run Post Release Tasks\n $tasksToRun = $this->getConfig()->getTasks(AbstractTask::STAGE_POST_DEPLOY);\n foreach ($tasksToRun as $taskData) {\n \t$task = Factory::get($taskData, $this->getConfig(), true, self::STAGE_POST_DEPLOY);\n \t$task->init();\n \tConsole::output('Running <purple>' . $task->getName() . '</purple> ... ', 2, false);\n\n \tif ($task instanceOf RollbackAware) {\n \t\t$tasks++;\n \t\t$result = $task->run();\n\n \t\tif ($result == true) {\n \t\t\tConsole::output('<green>OK</green>', 0);\n \t\t\t$completedTasks++;\n \t\t} else {\n \t\t\tConsole::output('<red>FAIL</red>', 0);\n \t\t}\n \t} else {\n \t\tConsole::output('<yellow>SKIPPED</yellow>', 0);\n \t}\n \t}\n\n if ($completedTasks == $tasks) {\r\n $tasksColor = 'green';\r\n } else {\r\n $tasksColor = 'red';\r\n }\r\n\r\n Console::output('Release rollback on <dark_gray>' . $this->getConfig()->getHost() . '</dark_gray> compted: <' . $tasksColor . '>' . $completedTasks . '/' . $tasks . '</' . $tasksColor . '> tasks done.', 1, 3);\n }\n }\n\n return $result;\n\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "b5837210afbecdf4c139587784ea8d81", "score": "0.4739983", "text": "protected function need_archive_redirect()\n {\n }", "title": "" }, { "docid": "defc9ec9747315aafa1dfb59365ef88b", "score": "0.47359785", "text": "function archiveFiles($zip_path, $files, $exclude = false) {\n\t\t// -----------------------------------------------\n\t\t// $zip_path = <string> Zip file path\n\t\t// $files = <array> files to zip pathes or <string> for single file zip\n // $exclude = <array> optional - exclude specified files by extension, eg: [ \"bak\", \"zip\" ]\n\t\t// -----------------------------------------------\n\t\t// SAVES specified files into zip archive\n\t\t// -----------------------------------------------\n\t\t//echo \"ZIP FILE: $zip_path<br>\\n\";\n\t\tif(is_string($files)) { $files = [ $files ]; };\n\t\tif(is_array($files)) {\n\t\t\tif(file_exists($zip_path)) { unlink($zip_path); }; // Overwrite existing!\n\t\t\t$zip = new ZipArchive;\n\t\t\tif($zip->open($zip_path, ZipArchive::CREATE)) {\n\t\t\t\tforeach($files as $file) {\n if(file_exists($file) && !is_dir($file)) { // ommit folders patches if any\n if(!is_array($exclude) || count($exclude) == 0 || !in_array(path($file, \"extension\"), $excllude)) {\n // fix up folder root\n if(substr($file, 0, 3) == \"../\") {\n $zip_path = substr($file, 3);\n }\n else {\n $zip_path = $file;\n };\n // fix .name files & folders --> will be ranemed to _name\n $zip_path = explode(\"/\", $zip_path);\n foreach(array_keys($zip_path) as $i) {\n $part = $zip_path[$i];\n if(substr($part, 0, 1) == \".\") {\n $zip_path[$i] = \"_\".substr($part, 1);\n };\n };\n $zip_path = join(\"/\", $zip_path);\n // Add to zip\n //echo \"ZIP: $file -> $zip_path<br>\\n\";\n $zip->addFile($file, $zip_path);\n };\n };\n };\n\t\t\t\t$zip->close();\n\t\t\t\treturn $zip_path;\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo \"Zip saving error!<br>\";\n\t\t\t};\n\t\t}\n\t\telse {\n\t\t\techo \"zipFiles() input variable(s) error!<br>\";\n\t\t};\n\t}", "title": "" }, { "docid": "91d1ffe9964d78087352f2acb490a228", "score": "0.47310656", "text": "protected function exportToZip($zip)\r\n {\r\n $menuBuilder = MenubuilderModule::getInstance();\r\n\r\n $class = $this->menuClass;\r\n $model = new $class;\r\n $menuSource = Yii::getPathOfAlias($model->fileName()) . '.php';\r\n $menuFile = $menuBuilder->getDataPath() . DIRECTORY_SEPARATOR. 'exp_menus.php';\r\n\r\n if (!copy($menuSource, $menuFile))\r\n return;\r\n\r\n $class = $this->menuItemClass;\r\n $model = new $class;\r\n $menuItemsSource = Yii::getPathOfAlias($model->fileName()) . '.php';\r\n $menuItemsFile = $menuBuilder->getDataPath() . DIRECTORY_SEPARATOR. 'exp_menuitems.php';\r\n\r\n if (!copy($menuItemsSource, $menuItemsFile))\r\n return;\r\n\r\n $zip->addFile($menuFile, basename($menuFile));\r\n $zip->addFile($menuItemsFile, basename($menuItemsFile));\r\n $ok = $zip->close();\r\n if ($ok)\r\n {\r\n // unlink($menuFile);\r\n // unlink($menuItemFile);\r\n }\r\n }", "title": "" }, { "docid": "90e9118c00e94d5d9b6f6c884498756b", "score": "0.47309315", "text": "function upload_file_to_versions($file_name, $slug, $version) {\n \n global $folder_name;\n\n $ch = curl_init();\n \n $file = file_get_contents($file_name);\n \n $new_filename = \"{$slug}.{$version}.zip\";\n \n $url = 'https://deploy.nextpress.co/wp-json/wp/v2/media/';\n \n $username = $_ENV['VERSIONS_USERNAME'];\n $password = $_ENV['VERSIONS_PASSWORD'];\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $file);\n curl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Disposition: form-data; filename=\"' . $new_filename . '\"',\n 'Authorization: Basic ' . base64_encode($username . ':' . $password),\n ));\n\n $result = curl_exec($ch);\n\n if (!$result) {\n\n throw new \\Exception(curl_error($ch));\n\n } // end if;\n\n curl_close($ch);\n\n $upload = json_decode($result);\n\n if (!is_object($upload) || !property_exists($upload, 'id')) {\n\n throw new \\Exception(curl_error($ch));\n\n } // end if;\n\n $media_id = $upload->id;\n\n $url = 'https://deploy.nextpress.co/wp-json/realmedialibrary/v1/attachments/bulk/move';\n \n switch ($folder_name) {\n \n case 'stable':\n $folder_id = 1;\n break;\n \n case 'beta':\n $folder_id = 2;\n \n case 'experimental':\n $folder_id = 3;\n break;\n \n default:\n $folder_id = 2;\n break;\n \n } // end switch;\n \n $_mode = $release_mode == 'pending' ? 2 : 1;\n\n foreach (array($folder_id) as $folder) {\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array(\n 'ids' => array($media_id),\n 'to' => $folder,\n 'isCopy' => true,\n )));\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Authorization: Basic ' . base64_encode($username . ':' . $password),\n ));\n\n $result = curl_exec($ch);\n\n if (!$result) {\n\n throw new \\Exception(curl_error($ch));\n\n } // end if;\n\n curl_close($ch);\n\n } // end if;\n\n return $upload;\n\n}", "title": "" }, { "docid": "0b651a5423256b742a0407a31fc18037", "score": "0.4727593", "text": "public function __destruct()\n {\n $filepath = $this->stream->getRealPath();\n if ($this->buildIsFinalized === false && $filepath && file_exists($filepath)) {\n unlink($filepath);\n }\n }", "title": "" }, { "docid": "e74c10ebdcb9f33e7ded3d220e64e4e5", "score": "0.47151262", "text": "public function add_info_to_zip(){\n\t\tif(apply_filters('revslider_slider_pack_export', false)){\n\t\t\tif(!$this->usepcl){\n\t\t\t\t$this->zip->addFromString('info.cfg', md5($this->alias)); //add slider settings\n\t\t\t}else{\n\t\t\t\t$list = $this->pclzip->add(array(array(PCLZIP_ATT_FILE_NAME => 'info.cfg', PCLZIP_ATT_FILE_CONTENT => md5($this->alias))));\n\t\t\t\tif($list == 0){\n\t\t\t\t\tdie(\"ERROR : '\".$this->pclzip->errorInfo(true).\"'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2a602fa3c24c88d91cb3d574b312f1e3", "score": "0.4713932", "text": "function getZip()\n{\n $dir = \"uploadedimages/*\";\n $zipname = 'images.zip';\n $zip = new ZipArchive;\n $zip->open($zipname, ZipArchive::CREATE);\n foreach (glob($dir) as $file)\n $zip->addFile($file);\n $zip->close();\n $file_url = 'images.zip';\n header('Content-Type: application/octet-stream');\n header(\"Content-Transfer-Encoding: Binary\");\n header(\"Content-disposition: attachment; filename=\\\"\" . basename($file_url) . \"\\\"\");\n readfile($file_url); // do the double-download-dance (dirty but worky)\n unlink('images.zip');\n}", "title": "" }, { "docid": "d97deeb356dcde42ac0d6f345ca78ce9", "score": "0.4710193", "text": "public function add_svg_to_zip(){\n\t\tif(!empty($this->used_svg)){\n\t\t\t$c_url\t= content_url();\n\t\t\t$c_path\t= ABSPATH . 'wp-content';\n\t\t\t$ud\t\t= wp_upload_dir();\n\t\t\t$up_dir\t= $this->get_val($ud, 'baseurl');\n\t\t\t//$upload_dir\t= $this->get_val($ud, 'basedir').'/';\n\t\t\t$cont_url\t\t\t= $this->get_val($ud, 'baseurl');\n\t\t\t$cont_url2\t\t\t= (strpos($cont_url, 'http://') !== false) ? str_replace('http://', 'https://', $cont_url) : str_replace('https://', 'http://', $cont_url);\n\t\t\t$cont_url_no_www\t= str_replace('www.', '', $cont_url);\n\t\t\t$cont_url2_no_www\t= str_replace('www.', '', $cont_url2);\n\t\t\t\n\t\t\tforeach($this->used_svg as $file => $val){\n\t\t\t\tif(strpos($file, 'http') !== false){ //remove all up to wp-content folder\n\t\t\t\t\t$_checkpath = str_replace(array($cont_url.'/', $cont_url_no_www.'/', $cont_url2.'/', $cont_url2_no_www.'/'), '', $file);\n\t\t\t\t\t$checkpath = str_replace($c_url, '', $file);\n\t\t\t\t\t$checkpath2 = str_replace($up_dir, '', $file);\n\t\t\t\t\tif($checkpath2 === $file){ //we have an SVG like whiteboard, fallback to older export\n\t\t\t\t\t\t$checkpath2 = $checkpath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//check if file is in the upload folder, if yes, add it to the zip file\n\t\t\t\t\tif(strpos($file, $up_dir) !== false){\n\t\t\t\t\t\tif(!$this->usepcl){\n\t\t\t\t\t\t\t$add_checkpath = 'images/'.$_checkpath;\n\t\t\t\t\t\t\t$this->zip->addFile($c_path.$checkpath, $add_checkpath);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->pclzip->add($c_path.$checkpath, PCLZIP_OPT_REMOVE_PATH, $c_path, PCLZIP_OPT_ADD_PATH, $_checkpath);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$file = str_replace('/', '\\/', $file);\n\t\t\t\t\t$checkpath2 = str_replace('/', '\\/', str_replace('/revslider/assets/svg', '', $checkpath2));\n\t\t\t\t\t\n\t\t\t\t\tif(is_file($c_path.$checkpath)){\n\t\t\t\t\t\t$this->export_data = str_replace($file, $checkpath2, $this->export_data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8b75bca15045076f0fc885583cafff0c", "score": "0.46952102", "text": "public function zipFile($addFile , $mult = false){\n\t\n\t$down = new \\ZipArchive();\n /*\n * RUTA BASE /CARPETA/SUBCARPETA/ARCHIVO.PNG\n */\n $rutaBase = explode(\"/\", $addFile);\n /*\n\t* ARRAY([0]=>'CARPETA',[1]=>'SUBCARPETA',[2]=>'ARCHIVO.PNG')\n */\n\t$elem = count($rutaBase);\n\t/*\n\t* TAMANIO ARRAY() => 3 ELEMENTO')\n */\n\t$file_ext = $rutaBase[$elem - 1];\n\t/*\n\t* ARRAY(TAMANIO) - 1 = ARCHIVO.PNG \n */\n\t$file = preg_split('/([.])\\w+/', $file_ext);\n\t/*\n\t* ARCHIVO.PNG => ('/([.])\\w+/')\n\t* ARRAY([0]=>'ARCHIVO',[1]=>'PNG')\n */\n $fileName = $file[0];\n /*\n\t* FILE => ARCHIVO\n */\n\tarray_pop($rutaBase); \n\t/*\n\t* ARRAY([0]=>'CARPETA',[1]=>'SUBCARPETA')\n */\n\t$ruta = implode(\"/\", $rutaBase);\n\t/*\n\t* RUTA BASE /CARPETA/SUBCARPETA/\n */\n\t$srcBase = $ruta .\"/\". $fileName .\".zip\";\n\t/*\n\t* RUTA BASE /CARPETA/SUBCARPETA/ARCHIVO.ZIP\n */\n\n\ttry {\n\t\tif (!$down->open($srcBase, \\ZipArchive::CREATE)) {\n\n\t\t throw new \\Exception(' Upps !!');\n\n\t\t}else{\n\n\t\t\t/*\n\t\t\t* AQUI LO DE MULTIPLE FILE EN UN .ZIP\n\t\t\t*/\n\t\t\t$down->addFile( $addFile , $file_ext);\n\t\t\t$down->close();\n\t\t\t/*\n\t\t\t* RETURN LA RUTA FINAL DEL .ZIP\n\t\t\t*/\n\t\t\treturn $srcBase;\n\t\t}\n\t\t\n\t} catch (\\Exception $e) {\n \techo \"Dead File \" . $e->getMessage();\n }\n}", "title": "" }, { "docid": "23174493ca901ca7882067905ab13ab9", "score": "0.4685258", "text": "protected function publishAssets()\n {\n if (File::isDirectory($this->getSrcPath('assets'))) {\n $this->publishes([\n $this->getSrcPath('assets') => $this->getDestPath('assets')\n ], 'assets');\n }\n if (File::isDirectory($this->getSrcPath('assets_ex'))) {\n $this->publishes([\n $this->getSrcPath('assets_ex') => $this->getDestPath('assets_ex')\n ], 'assets_ex');\n }\n\n }", "title": "" }, { "docid": "c27c4bfbf59e3786b1a6ab70095a310e", "score": "0.46832305", "text": "function createzip() {\n \n$the_folder = 'my folder';\n$zip_file_name = 'archive.zip';\n \n$za = new ZipArchive;\n \n$res = $za->open($zip_file_name, ZipArchive::CREATE);\n \nif($res === TRUE) {\n$za->addDir($the_folder, basename($the_folder));\n$za->close();\n}\nelse\necho 'Could not create a zip archive';\n\n\n\n\n// $rootPath = realpath('my folder');\n// $zip = new ZipArchive;\n// $zip->open('file.zip', ZipArchive::CREATE);\n\n// // Initialize empty \"delete list\"\n// $filesToDelete = array();\n\n// // Create recursive directory iterator\n// $files = new RecursiveIteratorIterator(\n// new RecursiveDirectoryIterator($rootPath),\n// RecursiveIteratorIterator::LEAVES_ONLY\n// );\n\n// foreach ($files as $name => $file) {\n// // Get real path for current file\n// $filePath = $file->getRealPath();\n\n// // Add current file to archive\n// $zip->addFile($filePath);\n\n// // Add current file to \"delete list\" (if need)\n// if ($file->getFilename() != 'important.txt') \n// {\n// $filesToDelete[] = $filePath;\n// }\n// }\n\n// // Zip archive will be created only after closing object\n// $zip->close();\n\n\n\n\n}", "title": "" }, { "docid": "9faa66e67fc08e0066d99e43939346cb", "score": "0.46789548", "text": "function compressAttachment($srcName, $dstName)\r\n{\r\n $fp = fopen($srcName, \"r\");\r\n $data = fread($fp, filesize($srcName));\r\n fclose($fp);\r\n\r\n $zp = gzopen($dstName, \"wb9\");\r\n if (gzwrite($zp, $data)) {\r\n unlink($srcName);\r\n }\r\n gzclose($zp);\r\n}", "title": "" }, { "docid": "ecb663521df1920158031146931a3fea", "score": "0.4677311", "text": "function createZip($files = array(), $destination = '', $metadata = '', $overwrite = false) {\n \n // if zip already exists and overwrite is false, return false\n if (file_exists($destination) && !overwrite) { return false; }\n //vars\n $valid_files = array();\n // if files were passed in...\n if (is_array($files)) {\n // cycle through each file\n foreach ($files as $file) {\n // make sure the file exists\n if (file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n \n // if files check out...\n if (count($valid_files)) {\n // create archive\n $zip = new ZipArchive();\n if ($zip->open($destination, $overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n // add the files\n foreach($valid_files as $file) { \n $newfile = substr($file, 12); \n $zip->addFile($file, $newfile);\n }\n if (file_exists($metadata)) {\n $metasplit = substr($metadata, 5);\n $zip->addFile($metadata, $metasplit);\n }\n // close zip - finished\n $zip->close();\n // check file\n return file_exists($destination);\n }\n else\n {\n return false;\n }\n}", "title": "" }, { "docid": "c59e93d520e88f0704b06fb2590f3995", "score": "0.46754086", "text": "public function setup() {\n\t\tif (!file_exists($this->archive_directory)) {\n\t\t\tmkdir($this->archive_directory);\n\t\t}\n\t\tif (!file_exists($this->cache_directory)) {\n\t\t\tmkdir($this->cache_directory);\n\t\t}\n\t}", "title": "" }, { "docid": "d32373d9fecffaee5fe6a2326dba43ef", "score": "0.46702912", "text": "public function execute()\n {\n \n // Notify\n info(\" Extracting [$this->zip] to [$this->root]...\");\n \n // Do not overwrite existing\n if(file_exists($this->root) === TRUE) {\n return error(DIR_EXISTS);\n }// if\n\n // Escape Phar context (HACK...)\n $content = file_get_contents($this->zip);\n file_put_contents($this->zip, $content);\n\n // Extract source files to root\n $zip = new \\ZipArchive();\n if (($error = $zip->open($this->zip)) !== TRUE) {\n return error(ZIP_OPEN_FAILED.\":$error\");\n }// if \n \n // Extract source to root directory\n $zip->extractTo($this->root);\n $zip->close();\n\n info(\" Extracting [$this->zip] to [$this->root]...DONE\");\n \n // Finished\n return true;\n \n \n }", "title": "" }, { "docid": "5d7d5cc776072c99ebfc9a2855054d4e", "score": "0.46692663", "text": "function process_attachments() {\r\n\r\n require_once ABSPATH . '/wp-admin/includes/file.php';\r\n\r\n // Download attachments zip and extract it to local wp_dp_cs.\r\n $first_str_filename = '';\r\n $filename = $this->wp_upload_dir_path . 'temp-' . $this->demo_data_name . '-attachments.zip';\r\n if (copy($this->attachments_path, $filename)) {\r\n WP_Filesystem();\r\n $unzipfile = unzip_file($filename, $this->wp_upload_dir_path . '/' . $first_str_filename . '/');\r\n\r\n // Delete zip after completion.\r\n unlink($filename);\r\n\r\n // Return whether zip was extracted successfully or not.\r\n return $unzipfile;\r\n }\r\n }", "title": "" }, { "docid": "1fe9a6acc66c390c3c395d3fbfed3724", "score": "0.46635556", "text": "public function deploy() {\n\t\t$this->_maybe_add();\n\t\t$this->_maybe_commit();\n\t\t$this->_pull();\n\t\t$this->_maybe_push();\n\t}", "title": "" }, { "docid": "4288a2d541cb68046fa1f1b29aaccc92", "score": "0.46630687", "text": "private function _create_build()\n\t{\n\t\t// initialize variables\n\t\t$zip \t= $this->_build_directory.$this->_build.'/'.$this->_zip_filename;\t// This is the filepath for the zip file\n\t\t$dir \t= $this->_build_directory.$this->_build.'/';\t\t\t\t\t\t// This is the build's directory\n\t\t$temp \t= $this->_build_directory.'temp/'.$this->_client['domainbase'].'/';\t\t// This is the temp folder to create & store extracted zip files\n\t\t$sql\t= $this->_build_directory.$this->_build.'/database.sql';\n\t\t\n\t\t// unzip file\n\t\tif ( ! $this->_unzip_build($zip,$temp)):\n\t\t\treturn FALSE;\n\t\tendif;\n\t\t\n\t\tif( is_file($sql)):\n\t\t\tif( ! copy($sql,$temp.\"database.sql\")):\n\t\t\t\treturn FALSE;\n\t\t\tendif;\n\t\tendif;\n\t\t// replace strings in directory\n\t\t//$this->_string_replace($temp);\n\t\t\n\t\t// rezip files\n\t\t$this->_rezip($temp);\n\t\t\n\t\t// remove files from tmp\n\t\t$this->_delete_all_files($temp,array('website.tgz'));\n\t\t\n\t\t// add files to ftp\n\t\t$this->_add_files_to_ftp($temp,'\\public_html');\n\n\t\t// remove temp dir\n\t//\t$this->_remove_directory($temp);\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "9473cdcd5c7c7446548413ce05023b5e", "score": "0.46590865", "text": "function close() {\n\t\t$this->files_data .= $this->central_directory_headers . \"\\x50\\x4b\\x05\\x06\\x00\\x00\\x00\\x00\" . \n pack(\"v\", $this->num_entries). // total # of entries \"on this disk\" \n pack(\"v\", $this->num_entries). // total # of entries overall \n pack(\"V\", strlen($this->central_directory_headers)). // size of central dir \n pack(\"V\", strlen($this->files_data)). // offset to start of central dir \n \"\\x00\\x00\"; \n\n\t\tunset($this->central_directory_headers);\n\t\tunset($this->num_entries);\n\n\t\t$this->zip_file = $this->files_data;\n\t\t$this->is_closed = true;\n\t}", "title": "" }, { "docid": "bf3e4ef0cf0e1c26a2acc89b0edb7f63", "score": "0.46572262", "text": "public function processPackageUpload() {\n\n //fetch the upload, validate a few settings and copy the package to /project/temp\n $arrSource = class_carrier::getInstance()->getParam(\"provider_local_file\");\n\n $strTarget = \"/project/temp/\".generateSystemid().\".zip\";\n $objFilesystem = new class_filesystem();\n\n //Check file for correct filters\n $strSuffix = uniStrtolower(uniSubstr($arrSource[\"name\"], uniStrrpos($arrSource[\"name\"], \".\")));\n if(in_array($strSuffix, array(\".zip\"))) {\n if($objFilesystem->copyUpload($strTarget, $arrSource[\"tmp_name\"])) {\n class_logger::getInstance(class_logger::PACKAGEMANAGEMENT)->addLogRow(\"uploaded package \".$arrSource[\"name\"].\" to \".$strTarget, class_logger::$levelInfo);\n class_resourceloader::getInstance()->flushCache();\n class_classloader::getInstance()->flushCache();\n class_reflection::flushCache();\n\n return $strTarget;\n }\n }\n class_logger::getInstance(class_logger::PACKAGEMANAGEMENT)->addLogRow(\"error in uploaded package \".$arrSource[\"name\"].\" either wrong format or not writeable target folder\", class_logger::$levelInfo);\n @unlink($arrSource[\"tmp_name\"]);\n\n return null;\n }", "title": "" }, { "docid": "3da5548b0250272160f577f1c3cabf41", "score": "0.46556598", "text": "public function isActive()\n {\n return ! class_exists(\"ZipArchive\");\n }", "title": "" }, { "docid": "da13c465dd05e9bf4851b38347f6783c", "score": "0.46543863", "text": "function zip_open($filename) {}", "title": "" }, { "docid": "bf6c4e4922bd02c34475385eba44bc87", "score": "0.46419188", "text": "protected function movePackage()\n {\n $this->consoleWriter->displayText(\"--- Move package...\", ConsoleWriter::COLOR_YELLOW);\n $tmpDir = sys_get_temp_dir();\n $argTempProjectPath = escapeshellarg($this->tempProjectPath);\n\n if ($this->useZip) {\n rename(\n \"{$this->tempProjectPath}/{$this->zipFileName}\",\n \"{$this->destinationDir}/prestashop_$this->version.zip\"\n );\n } else {\n $argDestinationDir = escapeshellarg($this->destinationDir);\n exec(\"mv {$argTempProjectPath} {$argDestinationDir}\");\n }\n rename(\n \"{$tmpDir}/prestashop_$this->version.xml\",\n \"{$this->destinationDir}/prestashop_$this->version.xml\"\n );\n exec(\"rm -rf {$argTempProjectPath}\");\n $this->consoleWriter->displayText(\" DONE{$this->lineSeparator}\", ConsoleWriter::COLOR_GREEN);\n }", "title": "" }, { "docid": "205049fb1b34f2041a376664a928655c", "score": "0.46319047", "text": "function test($filename) {\n if (file_exists($filename)) {\n unlink($filename);\n }\n\n // Create the archive\n $zip = new \\ZipArchive();\n if ($zip->open($filename, \\ZipArchive::CREATE)!==TRUE) {\n exit(\"cannot open <$filename>\\n\");\n }\n\n // Currently, only the version of PHP running on Travis (>= 7.4.4) works with $start and $length\n // in ZipArchive::addFile correctly.\n // TODO: Remove this when Azure DevOps support it as well.\n if (getenv(\"TRAVIS\") == \"true\") {\n $ipsumStart = 2;\n $ipsumLength = 5;\n } else {\n $ipsumStart = $ipsumLength = 0;\n }\n\n // Fill the archive\n $zip->addFromString(\"testfilephp.txt\", \"#1 This is a test string added as testfilephp.txt.\\n\");\n $zip->addFromString(\"testfilephp2.txt\", \"#2 This is a test string added as testfilephp2.txt.\\n\");\n $zip->addFile(\"ziparchive_001.txt\", \"ipsum.txt\", $ipsumStart, $ipsumLength); // $start and $length must be ignored\n echo \"filename: \". strtolower($zip->filename) .\"\\n\";\n echo \"numfiles: \" . $zip->numFiles . \"\\n\";\n //echo \"status:\" . $zip->status . \"\\n\";\n $zip->close();\n\n // Open the archive again and list its contents\n list_entries($filename);\n\n // Clean up the created archive\n unlink($filename);\n}", "title": "" }, { "docid": "b6ccd2937a8cc044c13552453ef76c00", "score": "0.4629962", "text": "function com_release($module) {}", "title": "" }, { "docid": "160cfee9aedcf3bc5c380ae185d679ed", "score": "0.4619766", "text": "protected function getCompressClassName() {\n return 'ZipArchive';\n }", "title": "" }, { "docid": "cee64dd6e697a4d51bdaa63efb6bdcaf", "score": "0.46143717", "text": "function create_zip($files = array(),$tmp_dir, $destination = '', $overwrite = true) {\n //if the zip file already exists and overwrite is false, return false\n if(file_exists($tmp_dir.\"/\".$destination.'.zip') && !$overwrite) { return false; }\n //vars\n $valid_files = array();\n //if files were passed in...\n if(is_array($files)) {\n //cycle through each file\n foreach($files as $file) {\n //make sure the file exists\n if(file_exists($file)) {\n $valid_files[] = $file;\n }\n }\n }\n //if we have good files...\n if(count($valid_files)) {\n //create the archive\n $zip = new ZipArchive();\n if($zip->open($tmp_dir.\"/\".$destination.'.zip',$overwrite ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE::CREATE) !== true) {\n return false;\n }\n //add the files\n foreach($valid_files as $file) {\n $zip->addFile($file,$destination.\"/\".basename($file));\n }\n //debug\n //echo 'The zip archive contains ',$zip->numFiles,' files with a status of ',$zip->status;\n \n //close the zip -- done!\n $zip->close();\n \n //check to make sure the file exists\n return file_exists($tmp_dir.\"/\".$destination.'.zip');\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "e070942f7fcc3b35076d54e678b31e69", "score": "0.46130615", "text": "protected function __bootstrap_code()\r\n\t{\r\n\t\tif(!defined('_AKEEBA_COMPRESSION_THRESHOLD'))\r\n\t\t{\r\n\t\t\t$config =& AEFactory::getConfiguration();\r\n\t\t\tdefine(\"_AKEEBA_COMPRESSION_THRESHOLD\", $config->get('engine.archiver.common.big_file_threshold')); // Don't compress files over this size\r\n\t\t\tdefine(\"_AKEEBA_DIRECTORY_READ_CHUNK\", $config->get('engine.archiver.zip.cd_glue_chunk_size')); // How much data to read at once when finalizing ZIP archives\r\n\t\t}\r\n\t\tparent::__bootstrap_code();\r\n\t}", "title": "" }, { "docid": "43daa8d6f79dab262a2b3e3ba4636de1", "score": "0.45980003", "text": "function helper_doInstallPackage($package_file) \n {\n \t$vfolder =& v()->filesystem()->folder();\n \t\n VWP::RequireLibrary('vwp.archive.archive');\n $tempFolder = $vfolder->mktemp(\"install\");\n if (VWP::isWarning($tempFolder)) {\n return $tempFolder;\n }\n $arch = VArchive::getInstance();\n $result = $arch->extract($package_file,$tempFolder);\n if (VWP::isWarning($result)) {\n return $result;\n }\n $tmpv = parent::$_installer_versions;\n parent::$_installer_versions = array(array(),array());\n $result = $this->helper_doInstall($tempFolder);\n parent::$_installer_versions = $tmpv;\n $vfolder->delete($tempFolder);\n return $result;\n }", "title": "" }, { "docid": "2eba24b41e35ea49604bfd7c0581d0d5", "score": "0.45943707", "text": "private function extract_demo_data_zip() {\r\n\t\t$zip_file = wp_normalize_path( $this->demo_folder_path . $this->zip_file_name );\r\n\r\n\t\tAvada_Helper::init_filesystem();\r\n\r\n\t\t$unzipfile = unzip_file( $zip_file, $this->demo_folder_path );\r\n\t\tif ( ! $unzipfile ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "8f47255d4486e2825eb7d4fdd86feff1", "score": "0.45919132", "text": "public static function zip($files, $destination = '') {\n jimport('joomla.filesystem.archive');\n $zip_adapter = JArchive::getAdapter('zip'); // compression type\n $filesToZip = array();\n foreach ($files as $file) {\n $data = IWFile::read($file);\n $filesToZip[] = array('name' => IWFile::getName($file), 'data' => $data);\n }\n if (!$zip_adapter->create($destination, $filesToZip, array())) {\n JFactory::getApplication()->enqueueMessage(JText::_('COM_QUIPU_Ha ocurrido un error al crear el archivo.'), 'message');\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "63cb16e25e2db699230c306420eab57d", "score": "0.45818993", "text": "private function publishFiles()\n {\n $this->publishes([\n __DIR__.'/config/'.$this->_packageTag.'.php' => base_path('config/'.$this->_packageTag.'.php'),\n ], $this->_packageTag.'-config');\n\n $this->publishes([\n __DIR__.'/resources/lang' => base_path('resources/lang/vendor/'.$this->_packageTag),\n ], $this->_packageTag.'-lang');\n }", "title": "" }, { "docid": "b24dd473ff3e8f640c39f85e58371804", "score": "0.45809004", "text": "final public function zip($value,?string $local=null,?array $option=null):File\\Zip\n {\n $return = File\\Zip::new($value,['create'=>true]) ?: static::throw('cannotCreateZipArchive');\n\n if(!$return->addFiles($this,$option))\n static::throw('couldNotAddFilesToZipArchive');\n\n $return->commit();\n\n return $return;\n }", "title": "" }, { "docid": "70c08bef2570ee093b86ac302420e6b7", "score": "0.45727104", "text": "function testArchiveSymlinkDirWithZipArchive() {\n\n\t\t$this->backup->zip_command_path = false;\n\n\t\t$this->assertFileExists( $this->symlink );\n\n\t\t$this->backup->zip_archive();\n\n\t\t$this->assertFileExists( $this->backup->archive_filepath() );\n\n\t\t$this->assertArchiveContains( $this->backup->archive_filepath(), array( basename( $this->symlink ) ) );\n\t\t$this->assertArchiveFileCount( $this->backup->archive_filepath(), 6 );\n\n\t\t$this->assertEmpty( $this->backup->errors() );\n\n\t}", "title": "" }, { "docid": "843bb7ecc9c534383348e61d2e4627e7", "score": "0.4550091", "text": "public function filesToZip($sort=null,$orderby=null, $way=null) \n {\n //DebugBreak();\n $albumTable = $this->serviceLocator->get('Album\\Model\\AlbumTable');\n $albums = $albumTable->fetchAll(false, $orderby, $way);\n //$albumTable = new AlbumTable();\n //$album->\n switch ($sort) {\n case 'CSV':\n $csvFileName = ROOT_PATH.self::CSV_XML_DIRECTORY.\"albums.csv\";\n $csvFile = fopen($csvFileName,\"w\");\n\n $content = \"\";\n\n //$albums = $this->getAlbumTable()->fetchAll();\n \n foreach ($albums as $album) {\n $data = array($album->id, $album->artist, $album->title, $album->img);\n //$content .= implode(\",\", $data).PHP_EOL;\n if(!empty($album->img)) {\n $zipFiles[] = ROOT_PATH . self::ALBUMS_DIRECTORY. $album->img; \n }\n \n fputcsv($csvFile, $data);\n }\n\n fclose($csvFile);\n $zipFiles[] = $csvFileName; \n break;\n \n case 'XML':\n $xmlFileName = ROOT_PATH.self::CSV_XML_DIRECTORY.\"albums.xml\";\n foreach ($albums as $album) {\n $albumArray[\"album\"][] = array(\"id\" => $album->id, \"title\" => $album->title, \"artist\" => $album->artist, \"img\" => $album->img);\n \n if(!empty($album->img)) {\n $zipFiles[] = ROOT_PATH . self::ALBUMS_DIRECTORY. $album->img; \n }\n }\n $xmlWriter = new \\Zend\\Config\\Writer\\Xml();\n $xml = $xmlWriter->toString($albumArray);\n file_put_contents($xmlFileName,$xml);\n \n $zipFiles[] = $xmlFileName;\n break;\n\n }\n \n return $zipFiles;\n \n\n }", "title": "" }, { "docid": "6977a116b4e7e8a2257d0a0f8e862d35", "score": "0.45466378", "text": "public static function build () {\n self::log(sprintf('Identified %s target assets', count(self::$manifest)));\n\n foreach (self::$manifest as $target_asset => $source_asset_collection) {\n \n if (self::$conditional_build) {\n if (!self::conditional_test($target_asset)) {\n self::log(sprintf('Skipping %s (no matches)', $target_asset));\n continue;\n } else {\n self::log(sprintf('Conditional match: %s', $target_asset));\n }\n }\n\n self::log(sprintf('Building %s...', $target_asset));\n self::log(\"Step 1: Minify...\");\n\n foreach ($source_asset_collection as $source_asset) {\n self::log(sprintf(' |`-%s', $source_asset['file']));\n if (isset($source_asset['minify']) &&\n strtolower($source_asset['minify']) === 'no') {\n self::log(' | `-Skipping minification');\n } else {\n $temp_files[] = self::minify($source_asset['file']);\n }\n }\n\n self::log('Step 2: Concatenate...');\n\n self::concat($temp_files, $target_asset);\n\n self::log('Build successful' . \"\\n\");\n }\n }", "title": "" } ]
af0d4d0bfbb73d9cea54558dddc94be1
Returns the SHA1 hash of the body of the script.
[ { "docid": "a14dfb362d7ac156b8da2cd1094dc5f5", "score": "0.6440431", "text": "public function getScriptHash()\n {\n return $this->getArgument(0);\n }", "title": "" } ]
[ { "docid": "30d8aabafb9f98dc7f55ec561b72d542", "score": "0.7341345", "text": "public function getBodyHash()\n {\n return base64_encode(sha1($this->getBody(), true));\n }", "title": "" }, { "docid": "ac6489f010664c549ff4253d443da808", "score": "0.6630289", "text": "public function getSha1()\n\t{\n\t\treturn $this->getInfo('sha1');\n\t}", "title": "" }, { "docid": "ffb4dac246fa1e8b9bfbc29006cdb4a5", "score": "0.6491734", "text": "public function getSha1() {\n\t\treturn $this->mSha1;\n\t}", "title": "" }, { "docid": "f406f303d9111bfe3d5532e5a8e81653", "score": "0.647957", "text": "public function getSha1()\n {\n return $this->sha1;\n }", "title": "" }, { "docid": "f406f303d9111bfe3d5532e5a8e81653", "score": "0.647957", "text": "public function getSha1()\n {\n return $this->sha1;\n }", "title": "" }, { "docid": "d5ac2acd43e33e439494729404e29d43", "score": "0.6291973", "text": "public function getDistSha1Checksum();", "title": "" }, { "docid": "281ba56126a71cc1cc9875a948f1159a", "score": "0.6277089", "text": "public function hashCode()\n {\n return hash('md5', $this->script);\n }", "title": "" }, { "docid": "2b7470b8433ea1ee8b05d897e71ccd85", "score": "0.62072676", "text": "public function getHeadSha1(): string\n {\n return $this->headSha1;\n }", "title": "" }, { "docid": "51fd7138717245e92db5577ceadb9deb", "score": "0.59149086", "text": "public function getHash()\n {\n return hash('sha1', $this->id);\n }", "title": "" }, { "docid": "9d9b7c75d55d5a66d3eed12edbb6cb6f", "score": "0.5843596", "text": "public function getBaseSha1(): string\n {\n return $this->baseSha1;\n }", "title": "" }, { "docid": "683458a3496a6e88dbd1fdf758ac8cb2", "score": "0.57685477", "text": "public function getSourceDigest(){\n $data = $this->getHashes();\n return md5( implode(\"\\1\",$data) );\n }", "title": "" }, { "docid": "67c3b982c9587b6c0940e52c5bc02267", "score": "0.5761405", "text": "public function sha() {\n if ($this->sha === false) {\n $this->sha = sha1($this->header().$this->data());\n }\n\n return $this->sha;\n }", "title": "" }, { "docid": "10fdad38112554c7e5527dd10d4c55c0", "score": "0.5591027", "text": "final public function hash()\n {\n return md5($this->compile());\n }", "title": "" }, { "docid": "36069753ca1680bbecc89154ba45c663", "score": "0.55733955", "text": "public function calculatePageContentHash(): string\n {\n try{\n $pageContent = $this->geRkiRiscAreasPageContent();\n $crawler = new Crawler($pageContent);\n $pageBodyContent = $crawler->filter('body')->text();\n $hash = md5($pageBodyContent);\n\n }catch(Exception | TypeError $e){\n $this->logger->critical(\"Exception was thrown while calculating RKI risc area page content hash\", [\n \"exceptionCode\" => $e->getCode(),\n \"exceptionMessage\" => $e->getMessage(),\n ]);\n\n throw $e;\n }\n\n return $hash;\n }", "title": "" }, { "docid": "613fb6f7baad2ecd2c4dfb8a4ccd7410", "score": "0.55000913", "text": "public function hash()\n {\n return sha1(implode(',', $this->parts));\n }", "title": "" }, { "docid": "99ce6d5c0e56b474369c00792c1e77d4", "score": "0.549762", "text": "public function getMergeSha1(): string\n {\n return $this->mergeSha1;\n }", "title": "" }, { "docid": "ce311aec018a2783b8c55bc1f958f4ff", "score": "0.54098296", "text": "public function getHash()\n {\n return $this->getAlgorithm()->readSignature($this->reader);\n }", "title": "" }, { "docid": "b0c50ed7f54341e3a765953108ddaddd", "score": "0.5377239", "text": "public function getHash(): string;", "title": "" }, { "docid": "b0c50ed7f54341e3a765953108ddaddd", "score": "0.5377239", "text": "public function getHash(): string;", "title": "" }, { "docid": "b0c50ed7f54341e3a765953108ddaddd", "score": "0.5377239", "text": "public function getHash(): string;", "title": "" }, { "docid": "20838c9cc912ee709994f2f72c43ff4d", "score": "0.53738153", "text": "public function getHash() : string;", "title": "" }, { "docid": "3cbf5f6582a9ca6684a4ba61579239e7", "score": "0.53722", "text": "public function hash()\n {\n return sha1($this->url . '|' . $this->method);\n }", "title": "" }, { "docid": "c3015e89d477c28cc4d08855ffccc6f6", "score": "0.5302977", "text": "static function compile( $script )\n\t{\n\n\t\t$hash = md5( \"some kind of hash\" );\n\n\t\t$s = self::header( $hash );\n\n\t\t$node = $script->rootNode;\n\t\t$s .= $node->compile( $hash, $script );\n\n\t\t$s .= self::footer( $hash );\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "48da6e63b25bc0907d99de2573f7db80", "score": "0.5291694", "text": "protected function getSourceHash()\n {\n return md5($this->source);\n }", "title": "" }, { "docid": "87096b4dc77bf8393446bae61e0ca1ae", "score": "0.52487314", "text": "public function getHash()\n {\n return $this->Hash;\n }", "title": "" }, { "docid": "2326afa09c67676e144316b896cd8325", "score": "0.5241361", "text": "protected function getHash()\n\t{\n\t\t// Do not try to hash if bigger than 2 GB\n\t\tif ($this->filesize >= 2147483648)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn md5_file(TL_ROOT . '/' . $this->strFile);\n\t\t}\n\t}", "title": "" }, { "docid": "e0991ae5a5647fa344726ad3bc1646cd", "score": "0.5188475", "text": "public function getHash()\n\t{\n\t\treturn $this->hash;\n\t}", "title": "" }, { "docid": "928d28496ddd66783559d132d605d06a", "score": "0.5157684", "text": "private function contentMD5()\n {\n return base64_encode(\n md5(json_encode($this->options['form_params']), true)\n );\n }", "title": "" }, { "docid": "ae341dc7948d5dde214d4473ed4dbf80", "score": "0.5155192", "text": "function get_file_sha1($sFilename, $sBaseDir) {\r\n\t$sha1 = sha1_file($sFilename);\r\n\tif (!$sha1) {\r\n\t\tlogdata(\"ERROR: Failed to calculate SHA1 for the file $sFilename!\", 0);\r\n\t\tdie_on_error('Failed to calculate SHA1 for file');\r\n\t}\r\n\t$sFilename = exclude_basedir($sFilename, $sBaseDir);\r\n\tif ( $sFilename=='config.txt' ) {\r\n\t $sha1=sha1('x');\r\n\t}\r\n\treturn \"F $sha1 $sFilename\";\r\n}", "title": "" }, { "docid": "c7ed05ba60fb2dad27bee502ce25e364", "score": "0.51540977", "text": "public function getHash() {\n return $this->_Hash;\n }", "title": "" }, { "docid": "aa8e003f2ba8132c1c8b61c07228827b", "score": "0.51434726", "text": "public function payToScriptHash(ScriptInterface $p2shScript)\n {\n return ScriptFactory::create()\n ->op('OP_HASH160')\n ->push($p2shScript->getScriptHash())\n ->op('OP_EQUAL')\n ->getScript();\n }", "title": "" }, { "docid": "791ecb9aca2038903c4e7b4680d9bf48", "score": "0.5138267", "text": "public function getHash()\n {\n return $this->hash;\n }", "title": "" }, { "docid": "791ecb9aca2038903c4e7b4680d9bf48", "score": "0.5138267", "text": "public function getHash()\n {\n return $this->hash;\n }", "title": "" }, { "docid": "c3a6b9d050afb2da22cb4e4e93857281", "score": "0.5118822", "text": "function getBody() {\n if(!$this->body && !$this->notModified) {\n $this->createBody();\n $this->body = $this->getDocType() . \"\\r\\n\" . $this->body;\n if($this->isGzipBody()) {\n $this->body = \n \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\" .\n substr(gzcompress($this->body, 9), 0, -4); \n }\n }\n return $this->body;\n }", "title": "" }, { "docid": "b3948b178f5036f7ca19650e323ba7db", "score": "0.51160073", "text": "public function getHash() {\n return $this->hash;\n }", "title": "" }, { "docid": "1d2d8e632fb3f64f46bca03e87d78c6c", "score": "0.51046735", "text": "public function getChecksum(): string\n {\n return Checksum::request($this->getId(), (string)$this->getReferer());\n }", "title": "" }, { "docid": "e59050763d9f4f956337b79da5036d52", "score": "0.50974804", "text": "public function script(): string\n {\n return $this->script;\n }", "title": "" }, { "docid": "8f66ac35f1a43402ccc5c91301bb9e6f", "score": "0.5094062", "text": "public function generate_script_hash( string $script ): ?string {\n\t\t$sha384 = hash( 'sha384', $script, true );\n\t\tif ( ! $sha384 ) {\n\t\t\treturn null;\n\t\t}\n\t\t$hash = str_replace(\n\t\t\t[ '+', '/', '=' ],\n\t\t\t[ '-', '_', '.' ],\n\t\t\tbase64_encode( $sha384 ) // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode\n\t\t);\n\t\treturn 'sha384-' . $hash;\n\t}", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.50918525", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.50918525", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.50918525", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.50918525", "text": "public function getHash();", "title": "" }, { "docid": "7645680700e02b0d186ef85f5451328a", "score": "0.5066319", "text": "public function hashCode(): string { return md5($this->buffer); }", "title": "" }, { "docid": "a12e9ab6b9563b3c66baa32524e5b0a2", "score": "0.50604546", "text": "private function createEmailBody()\n {\n $ret = \n \"timestamp: \".$this->record->getTimestamp().\"\\n\".\n \"date: \".$this->record->getDate().\"\\n\".\n 'message: '.$this->record->getMessage().\"\\n\\n\".\n 'data: '.json_encode($this->record->getData(), Json::HUMAN).\"\\n\";\n\n return $ret.\"\\n\\nsha1: \".sha1($ret).\"\\n\";\n }", "title": "" }, { "docid": "265ce8d9cfdcf6248ad4694d021b2b55", "score": "0.5057575", "text": "public function body()\r\n {\r\n // Only get it once\r\n if (null === $this->body) {\r\n $this->body = @file_get_contents('php://input');\r\n }\r\n\r\n return $this->body;\r\n }", "title": "" }, { "docid": "436503caadc74ec243495cd9d3dedd76", "score": "0.5057521", "text": "private function _process_hash()\n\t{\n\t\n\t\t$concat = $this->_ci->config->item('ideal_form_merchant_key') . $this->_ci->config->item('ideal_form_merchant_id');\n\t\t$concat .= $this->_ci->config->item('ideal_form_sub_id') . $this->payment_total . $this->purchase_id;\n\t\t$concat .= self::PAYMENT_TYPE . date('Y-m-d\\TH:i:s', $this->valid_until) . '.SSSZ';\t\t\n\t\n\t\tforeach ($this->products as $product)\n\t\t{\n\t\t\t$concat .= $product['number'] . $product['description'] . $product['quantity'] . $product['price']; \n\t\t}\n\n\t\t$whitespace = array(\"\\t\", \"\\n\", \"\\r\", \" \");\n\t\t$concat = str_replace($whitespace, '', html_entity_decode($concat));\n\t\t\n\t\treturn sha1($concat);\n\t\n\t}", "title": "" }, { "docid": "2f7e185145c25230817777a2c35257b4", "score": "0.505684", "text": "public function getScript(): string\n {\n return $this->script;\n }", "title": "" }, { "docid": "c7ac6d6de214aec598b2f6be8f2e0ea9", "score": "0.50478923", "text": "public function get_apple_pay_request_sha_phrase() {\r\n\t\treturn $this->decodeValue($this->apple_pay_request_sha_phrase);\r\n\t}", "title": "" }, { "docid": "5e7ea1bd3a9a23d0274ae6c631d1d224", "score": "0.5040067", "text": "public function shortSha() {\n return substr($this->sha(), 0, 8);\n }", "title": "" }, { "docid": "f3d438c88f024606ce78a1834f6e89a6", "score": "0.5027929", "text": "public function getHash()\n {\n return $this->getValue('nb_site_target_section_hash');\n }", "title": "" }, { "docid": "71953e42366d6031055078587ce52320", "score": "0.50161", "text": "public function body()\n {\n // Only get it once\n if (null === $this->body) {\n $this->body = @file_get_contents('php://input');\n }\n\n return $this->body;\n }", "title": "" }, { "docid": "c5128e971d3b690f0d75dfa1de05549f", "score": "0.50013953", "text": "public function getRawBody(): string\n {\n if (!isset($this->raw_body)) {\n $this->loadContent();\n }\n\n return $this->raw_body;\n }", "title": "" }, { "docid": "14b9bb0a70bd1fb9c82755de266f6736", "score": "0.49979225", "text": "function criptografar($str) {\n return SHA1(MD5($str));\n}", "title": "" }, { "docid": "dc08498dfab1d32218848bfc62739fb0", "score": "0.49812698", "text": "function getHash() {\n\t\treturn $this->_Hash;\n\t}", "title": "" }, { "docid": "98e9c74783ffe2ee23ebc507feb39a2c", "score": "0.49678034", "text": "public static function body() {\n\t\tstatic $result = null;\n\t\tif($result === null) {\n\t\t\t$result = file_get_contents(self::REQUEST_BODY_STREAM);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "50dc3fd1c292894eff322ec9bc0be382", "score": "0.49431938", "text": "public static function sha1($data, $binaryOutput = false)\n {\n $data = self::normalize($data);\n $hash = hash('sha1', $data, $binaryOutput);\n return $hash;\n }", "title": "" }, { "docid": "b49183a272ebc4df585ea4f5d557a57b", "score": "0.49305934", "text": "public function hash()\n\t{\n\t return $this->sql_hash;\n }", "title": "" }, { "docid": "143ccab663fcf6657e32c12c2a03b996", "score": "0.49291772", "text": "function snagshout_hash($secret_key, $body = '') {\n return hash_hmac(\n 'sha512',\n $body . gmdate('Y-m-d H'),\n $secret_key\n );\n}", "title": "" }, { "docid": "e92d58198ddb2165e1b2887751dab1a8", "score": "0.49264494", "text": "protected function algo()\n {\n return 'sha1';\n }", "title": "" }, { "docid": "44d5f449519a15b7e30b85d1e6cfcc28", "score": "0.4915217", "text": "final public function getPropertyHash()\n {\n $values = '';\n foreach ($this->properties as $key => $property) {\n if ($property instanceof SnippetProperty) {\n $values .= '&' . $key . '=' . $property->getValue();\n }\n else {\n throw new \\modmore\\Alpacka\\Exceptions\\InvalidPropertyException($key . ' is not a proper property!');\n }\n }\n return sha1(sha1($values));\n }", "title": "" }, { "docid": "0c2434a3ac7eb8a1134255c9af158409", "score": "0.49067298", "text": "public function get_apple_pay_response_sha_phrase() {\r\n\t\treturn $this->decodeValue($this->apple_pay_response_sha_phrase);\r\n\t}", "title": "" }, { "docid": "ae034af04cc8e6090235fdc7e7685d05", "score": "0.4873222", "text": "public function generateChecksum($title)\n {\n $serviceId = $this->_cfg['serviceId'];\n $res = sha1(\"iMaat::{$serviceId}::{$title}\");\n\n return $res;\n }", "title": "" }, { "docid": "0e842d86964f9c14063f38820bf95aa3", "score": "0.4868807", "text": "public function getChecksum(): string\n\t{\n\t\t$strung_string = md5($this->_salt);\n\t\t$strung_string .= md5(var_export($this->_poison_constraints,true));\n\t\t$strung_string .= md5(var_export($this->_hash_table_from,true));\n\t\t$strung_string .= md5(var_export($this->_hash_table_to,true));\n\t\t$strung_string .= PASSWORD_ARGON2ID ?? '';\n\n\t\treturn md5($strung_string);\n\t}", "title": "" }, { "docid": "77345f6343f5485e1274379f26364548", "score": "0.48581213", "text": "protected function getHash()\n\t{\n\t\t$arrFiles = array();\n\n\t\tforeach (scan(TL_ROOT . '/' . $this->strFolder) as $strFile)\n\t\t{\n\t\t\tif ($strFile == '.svn' || $strFile == '.DS_Store')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arrFiles[] = $strFile;\n\t\t}\n\t\t\n\t\treturn md5(implode('-', $arrFiles));\n\t}", "title": "" }, { "docid": "b40b68ce60c311fd1ffb629e21dd2f4d", "score": "0.48521695", "text": "function get_commit_hash( $uri ) {\n $revision = '';\n $assets_path = get_template_directory() . '/assets.json';\n if ( file_exists( $assets_path ) ) {\n $assets = json_decode( file_get_contents( $assets_path ), true );\n if ( isset( $assets[$uri] ) ) $revision = substr( md5( $assets[$uri] ), 0, 7 );\n }\n return $revision;\n}", "title": "" }, { "docid": "b91d406bfe984ad6a9600b6de299ed5f", "score": "0.48408183", "text": "public function getHeaderHash()\n\t{\n\t\treturn $this->_header->headerHash;\n\t}", "title": "" }, { "docid": "6e585833051d92a4fba38e0b79053666", "score": "0.48350006", "text": "public function getRawBody() : string\n {\n if ($this->rawBody === null) {\n $this->rawBody = file_get_contents('php://input');\n }\n\n return $this->rawBody;\n }", "title": "" }, { "docid": "c48d720f1694328a4398551c818004a5", "score": "0.48334086", "text": "public function getBody()\n {\n $input = file_get_contents('php://input');\n return (!empty($input)) ? $input : '';\n }", "title": "" }, { "docid": "56d65011e740e811ebc46bffce124034", "score": "0.48302776", "text": "public function getScript() {\n return $this->script;\n }", "title": "" }, { "docid": "ae8d9832ce86e68a42d5185fb82d2087", "score": "0.4828857", "text": "public function getHash()\n {\n return $this->itemHash;\n }", "title": "" }, { "docid": "a62760849c6baee9b7477c56dc8e490a", "score": "0.4823945", "text": "protected function renderBodyBeginHtml(): string\n {\n $lines = [];\n if (!empty($this->jsFiles[self::POS_BODY_BEGIN])) {\n $lines[] = implode(\"\\n\", $this->jsFiles[self::POS_BODY_BEGIN]);\n }\n if (!empty($this->js[self::POS_BODY_BEGIN])) {\n $lines[] = Html::script(implode(\"\\n\", $this->js[self::POS_BODY_BEGIN]));\n }\n\n return empty($lines) ? '' : implode(\"\\n\", $lines) . \"\\n\";\n }", "title": "" }, { "docid": "c2ca37a690b630e713dc06ca9877278d", "score": "0.48237678", "text": "public function getChecksum()\n {\n $value = $this->get(self::checksum);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "e4afb8efabb31e13b2e7fbe8fbad3a9e", "score": "0.48212573", "text": "public function getHash()\n {\n return substr(\n md5($this->getMenu() . $this->getBreadcrumbs()),\n 0,\n 8\n );\n }", "title": "" }, { "docid": "1037533fb15477d8bfc283b46c9d3b56", "score": "0.48151907", "text": "public function getChecksum()\n {\n return md5_file($this->getRealPath());\n }", "title": "" }, { "docid": "0db7641fde0b8ffc24aa7bfad3bce7a0", "score": "0.48032367", "text": "public function getScript()\n {\n return $this->script;\n }", "title": "" }, { "docid": "0db7641fde0b8ffc24aa7bfad3bce7a0", "score": "0.48032367", "text": "public function getScript()\n {\n return $this->script;\n }", "title": "" }, { "docid": "0db7641fde0b8ffc24aa7bfad3bce7a0", "score": "0.48032367", "text": "public function getScript()\n {\n return $this->script;\n }", "title": "" }, { "docid": "0db7641fde0b8ffc24aa7bfad3bce7a0", "score": "0.48032367", "text": "public function getScript()\n {\n return $this->script;\n }", "title": "" }, { "docid": "0db7641fde0b8ffc24aa7bfad3bce7a0", "score": "0.48032367", "text": "public function getScript()\n {\n return $this->script;\n }", "title": "" }, { "docid": "8b7b9461fa23c46ce4ee95bfed25bf53", "score": "0.47766772", "text": "public function renderScriptBlock() {\n return (isset($this->scriptBlock)) ?\n $this->scriptBlock->render() : '';\n }", "title": "" }, { "docid": "3effd9725a92a63f9bc187a31787b986", "score": "0.47669393", "text": "public function getBody(): string;", "title": "" }, { "docid": "de7c1eb47d1f0f68744a71cb079949e8", "score": "0.47531658", "text": "public function getFileHash()\n {\n return $this->file_hash;\n }", "title": "" }, { "docid": "198405e62ff1655424cced09f7e26ec0", "score": "0.47522283", "text": "public function getHash() {\n\n return Tools::encrypt('pagecache_public_'\n . $this->url\n . $this->idCurrency\n . $this->idLanguage\n . $this->idCountry\n . $this->idShop\n . $this->idStudent\n );\n }", "title": "" }, { "docid": "44603cfd770ab33aa10cb7844a9580c1", "score": "0.47496808", "text": "public function getScriptPutContent() {\n\t\t\t$this->createScriptPut();\n\t\t\treturn file_get_contents($this->getScriptPutFileName());\n\t\t}", "title": "" }, { "docid": "18a4af8bf014fb0b5940676308a42b4f", "score": "0.47449702", "text": "static function getValidHash(){\n return saltedHash(\"md5\", __FILE__);\n }", "title": "" }, { "docid": "bd967fa83cde9b067f0449f1364ba2d9", "score": "0.47322565", "text": "public function getRawBody()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "eb444bd01647a815948af7b2e1c727ab", "score": "0.47253764", "text": "public function getHash()\n\t{\n\t\t// Return cached hash if any\n\t\tif ($this->hash) {\n\t\t\treturn $this->hash;\n\t\t}\n\n\t\t// Get the contents of the configuration folder\n\t\t$salt = '';\n\t\t$folder = $this->app['rocketeer.igniter']->getConfigurationPath();\n\t\t$files = $this->app['files']->glob($folder.'/*.php');\n\n\t\t// Remove custom files and folders\n\t\t$handles = array('events', 'tasks');\n\t\tforeach ($handles as $handle) {\n\t\t\t$path = $this->app['path.rocketeer.'.$handle];\n\t\t\t$index = array_search($path, $files);\n\t\t\tif ($index !== false) {\n\t\t\t\tunset($files[$index]);\n\t\t\t}\n\t\t}\n\n\t\t// Compute the salts\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->app['files']->getRequire($file);\n\t\t\t$salt .= json_encode($file);\n\t\t}\n\n\t\t// Cache it\n\t\t$this->hash = md5($salt);\n\n\t\treturn $this->hash;\n\t}", "title": "" }, { "docid": "f644b7afd49f9e705552fa0e14b56533", "score": "0.47064406", "text": "abstract public function getRawBody();", "title": "" }, { "docid": "53f32e8d90787468e096a3be0a0adff5", "score": "0.47042447", "text": "public function xss_hash() {\n if ($this->_xss_hash === NULL) {\n $rand = $this->get_random_bytes(16);\n $this->_xss_hash = ($rand === FALSE) ? md5(uniqid(mt_rand(), TRUE)) : bin2hex($rand);\n }\n\n return $this->_xss_hash;\n }", "title": "" }, { "docid": "84b8c1323fc9b66e0d212ab381dea49c", "score": "0.46997544", "text": "protected function renderBodyBeginHtml()\n {\n $lines = [];\n if (!empty($this->jsFiles[self::POS_BEGIN])) {\n $lines[] = implode(\"\\n\", $this->jsFiles[self::POS_BEGIN]);\n }\n if (!empty($this->js[self::POS_BEGIN])) {\n $this->storage->offsetSet(self::STORAGE_JS_BEGIN, $this->js[self::POS_BEGIN]);\n $lines[] = Html::jsFile(['js/begin', 'hash' => $this->hashKeys($this->js[self::POS_BEGIN])]);\n }\n\n return empty($lines) ? '' : implode(\"\\n\", $lines);\n }", "title": "" }, { "docid": "e55fc5281f08732134d9326a8eb1bfaa", "score": "0.46933663", "text": "public function getAuthorHash(): string {\n\t\treturn ($this->authorHash);\n\t}", "title": "" }, { "docid": "e55fc5281f08732134d9326a8eb1bfaa", "score": "0.46933663", "text": "public function getAuthorHash(): string {\n\t\treturn ($this->authorHash);\n\t}", "title": "" }, { "docid": "e55fc5281f08732134d9326a8eb1bfaa", "score": "0.46933663", "text": "public function getAuthorHash(): string {\n\t\treturn ($this->authorHash);\n\t}", "title": "" }, { "docid": "360d4176e02dcc7f8b7775f2a212aa3a", "score": "0.46921113", "text": "public function getRawBody()\n {\n return $this->job->body;\n }", "title": "" }, { "docid": "f2380ae28bc5f43ffa06e381942d9ded", "score": "0.4691113", "text": "protected function hashFromSourceProvider()\n {\n return $this->sourceProviderClient()->extractCommitFromHookPayload($this->all());\n }", "title": "" }, { "docid": "b68873220bf1c7c58b72282ff6e7b63f", "score": "0.46864504", "text": "private function get_hash()\n\t{\n\t\tif ( ! isset($this->hash) )\n\t\t{\n\t\t\t$this->set_hash();\n\t\t}\n\n\t\treturn $this->hash;\n\t}", "title": "" }, { "docid": "242ff91a3e76a11f33beeafcec3762e1", "score": "0.4685558", "text": "public static function SHA1Encode($Text, $Salt = \"\"){\n\t\tif(!empty($Salt)){$Salt=md5($Salt);}\n\t\treturn hash(\"sha1\",$Text . $Salt);\n\t}", "title": "" }, { "docid": "859a80697527e2f1bbf18be31934568a", "score": "0.46823773", "text": "public function getUserHash() : string {\n\t\treturn($this->userHash);\n\t}", "title": "" }, { "docid": "94bc834aefeba4eeb2341a7045d28d80", "score": "0.46687472", "text": "function sha1($str)\n\t{\n\t\tif ( ! function_exists('sha1'))\n\t\t{\n\t\t\tif ( ! function_exists('mhash'))\n\t\t\t{\t\t\n\t\t\t\t$SH = new SHA;\n\t\t\t\treturn $SH->generate($str); \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn bin2hex(mhash(MHASH_SHA1, $str));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn sha1($str);\n\t\t}\t\n\t}", "title": "" }, { "docid": "10de0e81690f6fa596e90bc044ad7fc0", "score": "0.4668645", "text": "public function getDigest()\n {\n $secretKey = $this->scopeConfig->getValue('sweettooth-settings/api-settings/secret-key', ScopeInterface::SCOPE_STORE);\n $digest = $this->getCustomerId() . $secretKey;\n\n return md5($digest);\n }", "title": "" } ]
8661bf392af675b3805e205404c90bd9
Does the repository at least contain USD?
[ { "docid": "03413a4de679514771fecc52c21005de", "score": "0.5437006", "text": "public function does_the_repository_contain_USD($currencyRepository)\n {\n $this->assertArrayHasKey('USD', $currencyRepository->all());\n\n return $currencyRepository;\n }", "title": "" } ]
[ { "docid": "a90702ad73149f5d376446194b25a1c8", "score": "0.6450052", "text": "public function hasAmount(): bool;", "title": "" }, { "docid": "35147acb33e2128bbb67480f8197b29b", "score": "0.60827094", "text": "function is_valid_for_use()\n\t\t\t{\n\t\t\tif (!in_array(get_option('woocommerce_currency') , array(\n\t\t\t\t'RUB'\n\t\t\t)))\n\t\t\t\t{\n\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\treturn true;\n\t\t\t}", "title": "" }, { "docid": "2ccb7b78a6078726166a5e3c3d1ee79c", "score": "0.6033757", "text": "function is_valid_for_use()\n {\n if (!in_array(get_option('woocommerce_currency'), array('RUB'))) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "25d21211344d2b729728044e3863cd20", "score": "0.5943153", "text": "private function is_valid_for_use()\n {\n return in_array(get_woocommerce_currency(), array('EUR'));\n }", "title": "" }, { "docid": "5dbfad79eae6e918c125a18dfa8714a8", "score": "0.59319144", "text": "function is_valid_for_use(){\r\n\t\tif (!in_array(get_option('woocommerce_currency'), array('RUB'))){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "cbb359b421be4ee7d5c997de383cad23", "score": "0.58578587", "text": "function is_valid_for_use() {\n if ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_heimir_supported_currencies', array( 'EUR', 'ISK', 'USD' ) ) ) ) return false; \n return true;\n }", "title": "" }, { "docid": "e8fb283ef46c7c5feb44eebf8acff267", "score": "0.58351165", "text": "public function qualifies() {\n\t\t$shop = shop::get_instance();\n\t\t$summary = $shop->getCartSummary(null, TransactionType::REGULAR);\n\n\t\treturn $summary['total'] >= 350;\n\t}", "title": "" }, { "docid": "25e1cb97307b866b2a7642b591a98985", "score": "0.5811846", "text": "public function qualifies() {\n\t\t$shop = shop::get_instance();\n\t\t$summary = $shop->getCartSummary(null, TransactionType::REGULAR);\n\n\t\treturn $summary['total'] >= 250;\n\t}", "title": "" }, { "docid": "3b24f6b499e555f88412e345d762091f", "score": "0.57621413", "text": "public function hasPrice(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "d36eba6227a666f36d14dfa6077a2bc5", "score": "0.57618684", "text": "public function isFractionQuantityItemsPresent()\n {\n }", "title": "" }, { "docid": "7e1abd50949c7809f65decdfd9d07ab6", "score": "0.5759327", "text": "private function _checkCurrency()\n {\n return $this->getActCurrency()->name == \"EUR\";\n }", "title": "" }, { "docid": "cda611dbcd97fe0df0853a91557ebaff", "score": "0.57591724", "text": "public function hasAmount()\n {\n $a = $this->getAmount();\n return (!empty($a) && is_numeric($a));\n }", "title": "" }, { "docid": "30c069dcad93bd19308ca34f94b0fe1f", "score": "0.57422495", "text": "public function hasQuantity(): bool;", "title": "" }, { "docid": "2a78e63f98a26c045c94d6c2790ae5d9", "score": "0.5741703", "text": "private function isValidForUse(): bool\n {\n return get_option('woocommerce_currency') === 'BYN';\n }", "title": "" }, { "docid": "7e893b60759d76247f2e8567dbc635ee", "score": "0.5724846", "text": "public function inStock()\n {\n return $this->stockCount() > 0;\n }", "title": "" }, { "docid": "60ff0107b64ae766de8c3456ad873c18", "score": "0.57053596", "text": "function is_valid_for_use() {\n if (!in_array(get_option('cmdeals_currency'), array('AUD', 'BRL', 'CAD', 'MXN', 'NZD', 'HKD', 'SGD', 'USD', 'EUR', 'JPY', 'TRY', 'NOK', 'CZK', 'DKK', 'HUF', 'ILS', 'MYR', 'PHP', 'PLN', 'SEK', 'CHF', 'TWD', 'THB', 'GBP'))) return false;\n\n return true;\n }", "title": "" }, { "docid": "7c8761069fbc10f3552d1858b03dc098", "score": "0.5701101", "text": "public function is_valid_for_use()\n {\n return in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_monetivo_supported_currencies', $this->suported_currencies ) );\n }", "title": "" }, { "docid": "2163841d8781ac018b34fd668f1e4de1", "score": "0.56581324", "text": "public function hasImportanceFraction(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "be413029ff81a6fe7092638bed2f0dd5", "score": "0.56549996", "text": "private function isEUCountry()\n {\n return !is_null($this->vat_rate) && $this->vat_rate !== '0.00';\n }", "title": "" }, { "docid": "cc20f17de8ee38f7e2ccd3925f2abc8b", "score": "0.56538904", "text": "public function hasUnit(){\n return $this->_has(9);\n }", "title": "" }, { "docid": "d1747ec51de3d5232f22ce64e616be2a", "score": "0.56495243", "text": "function is_valid_for_use()\r\n\t{\r\n\t\tif (!in_array(get_option('woocommerce_currency'), array('EUR')))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "059dcfa0080058d4300fb7c54d012fd7", "score": "0.56454897", "text": "public function qualifies() {\n\t\t$shop = shop::get_instance();\n\t\t$summary = $shop->getCartSummary(null, TransactionType::REGULAR);\n\n\t\treturn $summary['total'] > 400;\n\t}", "title": "" }, { "docid": "bb736143d7cfd71b77471331893db6bd", "score": "0.5644662", "text": "public function is_valid_for_use() {\n\t\t// Skip currency check\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5f869893232bb34bb046af52169ac722", "score": "0.5629283", "text": "function is_installed_500()\n{\n $result = dibi::query('SELECT id FROM [:PREFIX:user_resource]',\n \" WHERE code = 'DatovaSchranka' \")->fetchAll();\n\n // zaznam existuje, revize se neprovede\n if ($result)\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "6af490930b1938fe310bc91a1ade26ef", "score": "0.5615361", "text": "public function is_valid_for_use()\n {\n return in_array(\n get_woocommerce_currency(),\n array('IDR'),\n true\n );\n }", "title": "" }, { "docid": "162d48291a26c07ebd1f36cd6ec04d9f", "score": "0.5607921", "text": "function is_valid_for_use() {\r\n\t\t\tif (!in_array(get_option('woocommerce_currency'), array('DKK', 'SEK', 'NOK'))) return false;\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "a70944c0c2385dc165ee2e64a1a84ada", "score": "0.56064594", "text": "public function testIsAmountGoodCases() {\n $goodCases = array('1234567890', '0000007897');\n\n foreach ($goodCases as $goodCase) {\n $result = $this->fieldObject->isAmount($goodCase);\n $this->assertEquals(true, $result);\n }\n }", "title": "" }, { "docid": "ac34eafa2c57429127483841edcce6e9", "score": "0.5589784", "text": "public function is_valid_for_use() {\n\t\t\tif ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_cavirtex_supported_currencies', array( 'CAD', 'BTC' ) ) ) ) return FALSE;\n\t\n\t\t\treturn TRUE;\n\t }", "title": "" }, { "docid": "fbf812ab3e3c75573e6c0e85128dc5a0", "score": "0.5588174", "text": "public function hasVendor() : bool;", "title": "" }, { "docid": "feb9fc833bf9913c1332a9f93a818d2e", "score": "0.5570616", "text": "public final function is_free(){\n $checkout_model = new Model_Checkout();\n $products = $checkout_model->get_cart_details();\n\n $amount_to_pay = @$products->cart_price;\n\n return ($amount_to_pay > 0) ? false : true;\n }", "title": "" }, { "docid": "e60940e5597a76baaf6a4f13fcfce703", "score": "0.5532626", "text": "public function priceVaries()\n {\n return $this->price->amount() !== $this->product->price->amount();\n }", "title": "" }, { "docid": "1d358666771d801721ebd66df64a2953", "score": "0.5504452", "text": "protected function saldoSuficiente() {\r\n return ($this->saldo >= ($this->monto + $this->viajeplus * Tarifas::boleto));\r\n }", "title": "" }, { "docid": "d0e929501f13aec6c7b28b41aa2ebf55", "score": "0.54822326", "text": "function currency_check() {\n\t}", "title": "" }, { "docid": "c1f10072491357e5bc66f02c8db558d6", "score": "0.5479545", "text": "function f_hasDiscrepancy($checkout)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "470dddb765d84d83c762b08568043a04", "score": "0.5476509", "text": "public function currency_exist() {\n\t\t//one exchange rate relationship inside the $exchange_rates_dynamic_array\n\t\t//Mainly for admin use, to check if the two input arrays are correct\n\t\tif ($this->base_currency_rate_exist() && $this->target_currency_rate_exist()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "93c4a72ec58077db712c191e8a25ceed", "score": "0.54667157", "text": "public function isAmountAvailable()\n {\n return $this->_areAmountsValid;\n }", "title": "" }, { "docid": "940ae6136b4d51780195ac37dcf76eb4", "score": "0.5464687", "text": "public function isFree()\n {\n return 0 >= $this->getPrice();\n }", "title": "" }, { "docid": "180ea03ad7375cc80a825ea7953d8cab", "score": "0.54643583", "text": "function im_is_carrefour_market($eduPersonOrgUnitDn) {\n $carrefour_market = 'cn=0002,cn=mng,ou=thales,ou=organizations,dc=fr,dc=carrefour,dc=com';\n $carrefour_market_role = strstr($eduPersonOrgUnitDn, $carrefour_market);\n if(is_string($carrefour_market_role)){\n \treturn TRUE;\n }\n else {\n \treturn FALSE;\n }\n}", "title": "" }, { "docid": "d9d20378953794cc75c0b3f713f7a445", "score": "0.54554874", "text": "function is_valid_for_use() {\n\t\t\tif ( ! in_array( get_option( 'woocommerce_currency' ), array( 'MDL' ) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "d57cc31066bf2d975d3250281eea64e2", "score": "0.5446218", "text": "function sc50k_gshf_product_has_price($price){\r\n\tif ( ( is_int($price) || is_float($price) ) && $price > 0 ){\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "f8b39a3120203081f10d7df71d98485c", "score": "0.543501", "text": "public function inStock()\n {\n return ($this->isStatus('available') && $this->qty > 0);\n }", "title": "" }, { "docid": "67eed39b54f098568a483d89dc914b48", "score": "0.5423794", "text": "public function isSufficient()\n {\n if ($this->products->sum('quantity') == $this->reservations->sum('quantity_reserved'))\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "66846d8d0bb1c991e5bccc244c4fc1e5", "score": "0.54235286", "text": "public function inStock(): bool\n {\n if (!$this->isFromStock()) {\n return true;\n }\n\n return $this->getStock() > 0;\n }", "title": "" }, { "docid": "b2fb7ae7f7277dddfa91b60ff32deb99", "score": "0.5420626", "text": "public function is($currency);", "title": "" }, { "docid": "32664e37258135ca7d353f192d9ec862", "score": "0.53972137", "text": "public function ifCommercial_statusexiste($){\n\t\t\t\t\t$sql = \"SELECT * FROM commercial_status WHERE ='\".$.\"' \";\n\t\t\t\t\tif($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t if($this->db->query($sql)->fetch() != null)\n\t\t\t\t\t {\n\t\t\t\t\t return true;\n\t\t\t\t\t }\n\t\t\t\t\t } \n\t\t\t\t\treturn false;\n\t\t\t\t\t }", "title": "" }, { "docid": "fbacbf3a2e502dad096b154b110a7410", "score": "0.53886235", "text": "public function check(): bool\n {\n if (!isset($_POST['label'])) {\n return false;\n } \n \n if ($_POST['unaccepted'] == 'true') {\n return false;\n }\n \n $price = $this->order->getByName($_POST['label'])['price'];\n \n if ($_POST['withdraw_amount'] < 0.7 * (new YandexMoney)->USDtoRub($price)) {\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "830be783b83367e60ec42d66fa2674b8", "score": "0.5387331", "text": "function smartcom_scale_used_anywhere($scaleid) {\n if ($scaleid and record_exists('smartcom', 'grade', -$scaleid)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "ac492337bdaaa6cd2a1308736f0fc460", "score": "0.5385579", "text": "public function isUsed()\n {\n $quote = $this->_getOrderCreateModel()->getQuote();\n\n return ($quote->getGiftCardsAmount() > 0);\n }", "title": "" }, { "docid": "4702f4149e0ffa3f6b32b91073cdd190", "score": "0.53692824", "text": "function check_duplicate($currency_type_name, $currency_value) {\n $query = $this->db->where('currency_type_name', $currency_type_name)\n // ->or_where(\"currency_value\", $currency_value)\n ->where(\"deleted\", 0)\n ->get('currency_types');\n\n if ($query->num_rows() > 0) {\n return true;\n }\n }", "title": "" }, { "docid": "e2014867d9835cbb236284a57ff136fe", "score": "0.5364773", "text": "private function validateEnoughCDs(){\n if(!isset($_SESSION[\"login\"])){\n return FALSE;\n }\n if(isset($_POST)){\n for ($i=1; $i<=$_POST[\"totalItems\"]; $i++)\n {\n $itemNumber = $_POST['item_number_'.$i];\n $quantity = $_POST['quantity_'.$i];\n $album = new Album($itemNumber);\n if($album->getQtd()<=$quantity){\n $this->msgError=\" não existe CD's suficente deste album \".$album->getTitle().\" só existem \".$album->getQtd().\" e estão a tentar ser comprados \".$quantity;\n return FALSE;\n }\n }\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "2c73bc03554a83d528113d7503bf31d1", "score": "0.5354256", "text": "public function hasValidRepository();", "title": "" }, { "docid": "de2525a1d246771689f174217a026a47", "score": "0.5333244", "text": "function cart_valid($barcode){\n\tif((get_anything($barcode,\"quantity\") + cart_amount($_COOKIE['ew_user_name'],$barcode)) < 0){\n\t\treturn false;\n\t}else{\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "04bf433b9fdb41382639f8e30038a114", "score": "0.53281474", "text": "function is_valid_for_use() {\r\n if ( ! in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_twocheckout_supported_currencies', array( 'AUD', 'BRL', 'CAD', 'MXN', 'NZD', 'HKD', 'SGD', 'USD', 'EUR', 'JPY', 'TRY', 'NOK', 'CZK', 'DKK', 'HUF', 'ILS', 'MYR', 'PHP', 'PLN', 'SEK', 'CHF', 'TWD', 'THB', 'GBP', 'RMB' ) ) ) ) return false;\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "3553bc1c84fe659d8eb5b7198a04ce97", "score": "0.532428", "text": "public function is_valid_for_use() {\n\t\treturn in_array( get_woocommerce_currency(), apply_filters( 'woocommerce_paypal_supported_currencies', array( 'USD', 'PYG' ) ) );\n\t}", "title": "" }, { "docid": "688f4a55a07bafcf1d2f882a665009cd", "score": "0.5307796", "text": "public function hasSinglePrice()\n {\n return ! $this->hasMultiplePrices();\n }", "title": "" }, { "docid": "74b91d8875c5e0941f66345bfe7131ba", "score": "0.5297255", "text": "public function isOutOfStock()\n {\n return $this->getQuantity() <= 0;\n }", "title": "" }, { "docid": "6f84f5fceb707b2a5fd9870829337067", "score": "0.5296184", "text": "function Units_IsConsumableByName($vName)\n{\n\t$vSQL = 'select count(*) from units where name=\"' . $vName . '\" and content=\"consumable\" and field in (\"type\",\"subtype\")';\n\t$vResult = @$_SESSION['vDataDB']->querySingle($vSQL);\n\treturn(@$vResult === false?false:true);\n\n}", "title": "" }, { "docid": "2757b9f4cc23a0f9c8d8802f13a768cc", "score": "0.5279572", "text": "public function test() {\n\t\ttry {\n\t\t\t$contracts = $this->client->renterContracts();\n\t\t\tif (count($contracts) === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!is_writeable($this->datadir)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "54c4350d38e1c3b6fabbd1d03e7efd26", "score": "0.5275245", "text": "function check_quota($dir, $size) {\n $q = get_quota($dir);\n $a = $q['total'] - $q['used'];\n\n return ($size <= $a)?true:false; \n}", "title": "" }, { "docid": "981822ab41b072dc5e55d2f8f3514356", "score": "0.52733994", "text": "public function checkBalance()\n {\n $index_check = array();\n\n // go through entries\n foreach ($this->entries as $entry)\n {\n $id = $entry->getProduct()->getID();\n\n // build the index checker\n if (!isset($index_check[$id]))\n $index_check[$id] = array('debit' => '0.00', 'credit' => '0.00');\n\n $index_check[$id]['debit'] = bcadd($index_check[$id]['debit'], $entry->getDebit(), 2);\n $index_check[$id]['credit'] = bcadd($index_check[$id]['credit'], $entry->getCredit(), 2);\n }\n\n foreach ($index_check as $ic)\n {\n if ($ic['debit'] != $ic['credit'])\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "71e304ddd0fee2b7879fc5d9b1cb6f0c", "score": "0.5270355", "text": "public function test_if_integer_currency_passed()\n {\n $response = $this->get('api/v1/users?currency=10');\n $response->assertStatus(403);\n }", "title": "" }, { "docid": "92301f30217e3b0723e3674dbc847d93", "score": "0.52691746", "text": "public function hasUpdatedOperatingCentres()\n {\n $data = $this->getVariationCompletionStatusData();\n\n if (!empty($data['operatingCentres'])) {\n return true;\n }\n\n $comparisons = [\n 'totAuthVehicles',\n 'totAuthTrailers',\n ];\n\n foreach ($comparisons as $comparison) {\n if ($data[$comparison] != $data['licence'][$comparison]) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f47155c6d316086569bedc7164640982", "score": "0.5264344", "text": "public function testIfProperReturnsTrue() : void\n {\n\n $this->assertTrue(GeoProgression::has(1, 129));\n }", "title": "" }, { "docid": "ba8a30d7696194dce42e3c109f7fb927", "score": "0.52510005", "text": "public function hasPercentage(): bool;", "title": "" }, { "docid": "8bc81a86e7b9e7c3965b7c07b21e4ac4", "score": "0.52459306", "text": "protected function hasUsage()\n {\n return !empty($this->getGiftCardAccount()->getGiftCards());\n }", "title": "" }, { "docid": "987ed0904a448eb6627407e1c733bee1", "score": "0.52327", "text": "function download_has_discount( $item ) {\n\t$discount_amount = edd_get_cart_item_discount_amount( $item );\n\n\treturn 0 !== $discount_amount;\n}", "title": "" }, { "docid": "620f956ae88e169d6e4dafdc1683ab60", "score": "0.5232112", "text": "function is_zipmoney_available( $country = 'AU' ) {\n\t\t\tif ( get_woocommerce_currency() == 'AUD' && $country == 'AU' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "276893799e3b9640895dd65d24a8f223", "score": "0.5226283", "text": "function isMinPrice() : bool ;", "title": "" }, { "docid": "e422af9e4971626ad3f3108b48bba527", "score": "0.5225759", "text": "private function EUcheck($number)\n {\n // We know little about EU numbers apart from the fact that the first 3\n // digits represent the country, and that there are nine digits in total.\n return true;\n }", "title": "" }, { "docid": "9fbf3f819bd068fb26b9982ac29bdbf5", "score": "0.5223124", "text": "public function is_license_valid()\n {\n // TODO: Build out license functionality\n return true;\n }", "title": "" }, { "docid": "10e4e1a1bf1d54d62615c98c31b26caf", "score": "0.5220792", "text": "function isEmpty(){ return $this->getTotalAmount()==0; }", "title": "" }, { "docid": "406e094b7dd26ce4bbcbe73fea7d1e4d", "score": "0.522033", "text": "public function hasMultiplePrices()\n {\n return $this->stripe_subscription_items->count() > 1;\n }", "title": "" }, { "docid": "ab6d4c3a16a03820a0b82bd560294fc0", "score": "0.5218571", "text": "public function hasNature(){\n return $this->_has(11);\n }", "title": "" }, { "docid": "de412fb3c9e706c1ed3c513767347b79", "score": "0.52119344", "text": "public function checkIfUpsellsPossible(OdinOrder $order): bool\n {\n if (!in_array($order->status, [\n OdinOrder::STATUS_NEW,\n OdinOrder::STATUS_PAID,\n OdinOrder::STATUS_HALFPAID,\n ])) {\n logger()->error('Trying to add product to order with status: ' . $order->status, ['order_id' => $order->getIdAttribute()]);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "f81ec97843cbad8c333074c053d5226a", "score": "0.5211137", "text": "function checkLibrary( $con, $cID, $serial_number ){\n $query = \"SELECT *\n FROM PURCHASES\n INNER JOIN ORDERED ON PURCHASES.pID = ORDERED.pID\n WHERE PURCHASES.cID = {$cID}\n AND ORDERED.serial_number = {$serial_number};\";\n $query_result = $con->query( $query );\n\n if( $query_result->num_rows ){\n // The user already owns the game; return true\n $result = true;\n }else{\n // The user doesn't own the game; return false\n $result = false;\n }\n\n return $result;\n }", "title": "" }, { "docid": "d1fd440e7b84de5702c9728048e737be", "score": "0.520899", "text": "public function isVendor(): bool;", "title": "" }, { "docid": "92e5018d8f73942d900d2c3d22b135ba", "score": "0.52062637", "text": "public function isInStock()\n\t{\n\t\ttry \n\t\t{\n\t\t\t$Stock = $this->getProduct()->getStockItem()->getQty();\n\t\t\t$OrderedQty = $this->getProduct()->getordered_qty();\n\t\t\t\n\t\t\tif (($Stock - $OrderedQty ) > 0)\n\t\t\t\treturn true;\n\t\t\telse \n\t\t\t\treturn false;\t\t\t\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "70c9768fe086b4da3884d0dd9047048f", "score": "0.5202474", "text": "public function isInStock(): bool\r\n {\r\n \tforeach ($this->simple_products as $simple_product) {\r\n \t\tif ($simple_product->isInStock()) {\r\n \t\t\treturn TRUE;\r\n \t\t}\r\n \t}\r\n\r\n \treturn FALSE;\r\n }", "title": "" }, { "docid": "bd88b99adac29cd7cfde378e5a35b0ed", "score": "0.52001905", "text": "function _orgid_in_use($id) {\n\t\t$this->db->select('count(*) as tc');\n\t\t$this->db->where('org_id', $id);\n\t\t$q = $this->db->get('account');\n\t\tif ($q->row()->tc > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "89b64524bb3ae5fcca754cc0a3a5baa5", "score": "0.5187856", "text": "function isUserFullInfo($username) {\n $userFullInfo = new Product();\n $userInfo = $userFullInfo->userFullInfo($username);\n if ($userInfo > 0) {\n return $userInfo;\n }\n return 0;\n }", "title": "" }, { "docid": "cccba827fc7e180bcfc60df655f0f008", "score": "0.51876247", "text": "public function testIsAmountBadCases() {\n $badCases = array(\n '12345678901', '2540.12345', '12345 5678 99999', '0000000000'\n );\n\n foreach ($badCases as $badCase) {\n $result = $this->fieldObject->isAmount($badCase);\n $this->assertEquals(false, $result);\n }\n }", "title": "" }, { "docid": "903ae1bdb6adc022512e598460f60c77", "score": "0.51862186", "text": "public function xtestDepositIfAmountIsLessThanZero()\n\t{\n\t}", "title": "" }, { "docid": "001e99c4ac1154ed3caa4b8485a07488", "score": "0.51849174", "text": "function isUgandan() {\n \treturn $this->getCountry() == 'UG' || isEmptyString($this->getCountry()) ? true : false; \n }", "title": "" }, { "docid": "7579c1cff6d58791b690b4cfc5810fe3", "score": "0.5183291", "text": "private static function checkAvailablePrizeItems(): bool\n {\n return (bool)Prize::findOne(['status' => Prize::STATUS_AVAILABLE]);\n }", "title": "" }, { "docid": "2173449b3b720adb70d23706e2894371", "score": "0.51829463", "text": "function check_fonction_716(){\n $countLigne = countNouvelleLigneBudgetaire(1);\n if ($countLigne > 0){\n return true;\n }\n else{\n return false;\n }\n}", "title": "" }, { "docid": "5d08d7ffc402edb2abee8bb0b8e9a7d3", "score": "0.5176189", "text": "public function test_is_valid(){\n\n\t\t$this->assertTrue( APP_Currencies::is_valid( 'USD' ) );\n\t\t$this->assertFalse( APP_Currencies::is_valid( 'not-a-currency' ) );\n\n\t}", "title": "" }, { "docid": "79f3d133c032fb8ff92d6ae91b547cea", "score": "0.51655847", "text": "function isAvailable(){\n\n \t//If this was a distributed blockchain database, data could be distributed among users running their nodes (in turn defining availability)\n \t//Idea: if data was encrypted, engagement within a circle could unlock public keys for content decryption (perhaps through matches of enacted values?)\n\n \t\t$db = $GLOBALS['db'];\n \t\t$user_id = $GLOBALS['user']['id'];\n \t\t$entity_id = ($GLOBALS['entity']['id']) ? $GLOBALS['entity']['id'] : null;\n\n $input = func_get_args()[0];\n\n \t//Table, user_id / entity_id + contributors (cross-check)\n \tif($row = $input['table']){\n\t \tif($row['time_removed'] == 0){ //entry isn't removed\n\t \t\t$available = true;\n\t \t} elseif($row['time_removed'] > 0){ //entry is removed\n\t \t\tif(strpos($user_id, $input['row']['user_id']) || $input['row']['entity_id'] == $entity_id){ //content is removed and available to initiators, content circles\n\t\t \t\t$available = true;\n\t\t \t} else {\n\n\t\t \t\t$available = false;\n\t\t \t}\n\t \t}\n \t}\n\n \t//Node - lines in node might be accessible even if node's main_line_id and table are removed\n \tif(is_array($input['node'])){ //content is available \n \t\tavailablePrivileges(array('circles' => $circles, 'privileges' => $input['privileges']));\n \t}\n\n \treturn $available;\n\t}", "title": "" }, { "docid": "183959c21579eac862a1acff7b180230", "score": "0.5164346", "text": "public function hasPurchasedAt(): bool;", "title": "" }, { "docid": "f2305b9aba0dd1813fbdbce77aacd340", "score": "0.51494086", "text": "public function testIfInproperReturnsFalse() : void\n {\n\n $this->assertFalse(GeoProgression::has(2, 129));\n }", "title": "" }, { "docid": "479e5be9c8c1e16042c94a4fd55b6fe8", "score": "0.51438564", "text": "function checkAvailableProducts()\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t$query = \" select * from products_tb where status = '1'\"; \n $res = $mysqli->query($query) or die (mysqli_error($mysqli));\n\t\t\tif(mysqli_num_rows($res) > 0)\n\t\t\t{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "36bc95d7c4a25000c8e118bd45fe832e", "score": "0.5143613", "text": "public function unitofm_purchase($code) {\n\t\treturn Codes\\Min\\Umm::instance()->exists($code);\n\t}", "title": "" }, { "docid": "d4890ef516b988eccf726a66f37abc4e", "score": "0.5138891", "text": "public function xtestDisplayAmountIfUserHasSomeAmount()\n\t{\n\t}", "title": "" }, { "docid": "d89b5469fe6943d7a2653fe06d71a2ce", "score": "0.5133153", "text": "public function hasValidRepository()\n {\n return in_array(\n $this->repository->getName(),\n $this->getValidRepositories()\n );\n }", "title": "" }, { "docid": "d87d4c23776e674e0970e1e33da87546", "score": "0.5128431", "text": "public function isFull(): bool\n {\n return $this->drips() >= $this->max();\n }", "title": "" }, { "docid": "5325884cfc57b4656d8d04cce0d02eb6", "score": "0.51269275", "text": "public function isPercentage()\n {\n $arrTaxRate = StringUtil::deserialize($this->rate, true);\n\n return ('%' === $arrTaxRate['unit']);\n }", "title": "" }, { "docid": "e50bb0082aa3372d1d42c529760b392b", "score": "0.5114236", "text": "function beforeSave(){\n\t\t// Get the rate\n\t\t$rate = 1 / $this->_getRate();\n\n\t\t// Convert it back to USD\n\t\tif(!empty($this->data['Package']['price'])){\n\t\t\t$this->data['Package']['price'] = $this->data['Package']['price'] * $rate;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ae6e73ae8d4f61b28a58acf14db20eca", "score": "0.51026475", "text": "private function checkValidAmount($amount)\n {\n //we do some mod divisions to ensure that ATM will have all available notes\n foreach ($this->bills as $note) {\n $remaining = ($amount>$note)?$amount%$note:$note%$amount;\n if ($remaining < $note) {\n continue;\n }\n }\n //If some value remains, it means that ATM hasnt all bucks we need\n return ($remaining==0);\n }", "title": "" }, { "docid": "40edd81fd760a8e1bd9b69172e313c4f", "score": "0.50932705", "text": "function check_inventory()\n\t{\n\t\t$contents\t= $this->contents();\n\t\t\n\t\t//this array merges any products that share the same product id\n\t\t$new_contents\t= array();\n\t\tforeach($contents as $c)\n\t\t{\n\t\t\t// skip gift card products\n\t\t\tif($c['is_gc']) \n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//combine any product id's and tabulate their quantities\n\t\t\tif(array_key_exists($c['id'], $new_contents))\n\t\t\t{\n\t\t\t\t$new_contents[$c['id']]\t= intval($new_contents[$c['id']])+intval($c['quantity']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_contents[$c['id']]\t= $c['quantity'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$error\t= '';\n\t\t$this->CI->load->model('Product_model');\n\t\tforeach($new_contents as $product_id => $quantity)\n\t\t{\n\t\t\t$product\t= $this->CI->Product_model->get_product($product_id);\n\t\t\t\n\t\t\t//make sure we're tracking stock for this product\n\t\t\tif((bool)$product->track_stock)\n\t\t\t{\n\t\t\t\tif(intval($quantity) > intval($product->quantity))\n\t\t\t\t{\n\t\t\t\t\t$error .= '<p>'.sprintf(lang('not_enough_stock'), $product->name, $product->quantity).'</p>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!empty($error))\n\t\t{\n\t\t\treturn $error;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d829bb882ca3b25582e6b839c5113e64", "score": "0.50918484", "text": "public function isUnfinishedVendorTruckingExist();", "title": "" }, { "docid": "3189169545c4c17837cdc3b7f06aca71", "score": "0.50893354", "text": "public function repositoryExists(): bool;", "title": "" } ]
8cda37a274ae693f14490869356f2494
Check login is working with correct credentials
[ { "docid": "2c36f6fd5d49e4b55766e8fc57022dab", "score": "0.69161457", "text": "public function testWithCorrectCredentials()\n {\n $this->visit('/user')\n ->type('[email protected]', 'email')\n ->type('pass', 'password')\n ->press('Login')\n ->see('You have logged in successfully')\n ->seePageIs('/user/dashboard');\n }", "title": "" } ]
[ { "docid": "ad0689cc404c421afd00c3fee737646f", "score": "0.7940612", "text": "private function validateLogin()\n {\n\t\t$username = $this->view->getUsername();\n\t\t$password = $this->view->getPassword();\n $remember = $this->view->getRemember();\n $userAgent = $this->view->getUserAgent();\n $userIp = $this->view->getUserIp();\n\n\t\t//Check if credentials are correct\n\t\tif ($this->model->validateCredentials($username, $password, $userAgent, $userIp, $remember))\n {\n if($remember)\n {\n $expiration = $this->view->createCookies($username, $this->model->getToken());\n $this->model->rememberUser($expiration, $username);\n }\n\n\t\t\treturn true;\n\t\t}\n else\n {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "ef3d1dad42e3f06a2fdd65da44464803", "score": "0.79095894", "text": "private function _checkLoginInfo()\n {\n $adapter = new KoryukanMembers_AuthAdapter($this->_username, $this->_password);\n $authResult = Zend_Auth::getInstance()->authenticate($adapter);\n\n return $authResult->isValid();\n }", "title": "" }, { "docid": "35becd8f06bd8e82fc41790761d1b90c", "score": "0.77927417", "text": "public function check_login() {\n return false;\n }", "title": "" }, { "docid": "0b411bfe14bf08e42b8d09718ce8e8f2", "score": "0.7607779", "text": "public function isLogin();", "title": "" }, { "docid": "0b411bfe14bf08e42b8d09718ce8e8f2", "score": "0.7607779", "text": "public function isLogin();", "title": "" }, { "docid": "64c8904b48216f1b20eb87f031e0ed8d", "score": "0.7582674", "text": "private function checkLoginAPI(): bool\n {\n $return = false;\n\n $userAuth = $this->request->headers->get('PHP_AUTH_USER');\n $passAuth = $this->request->headers->get('PHP_AUTH_PW');\n if (!empty($userAuth) && !empty($passAuth)) {\n if ($this->user->getBy('username', $userAuth) && password_verify($passAuth, $this->user->password)) {\n $this->logger->addDebug($this->translator->trans('api-user-logged', ['%username%' => $userAuth]));\n $return = true;\n } else {\n $this->logger->addDebug($this->translator->trans('api-user-logged-fail', ['%username%' => $userAuth]));\n }\n }\n return $return;\n }", "title": "" }, { "docid": "892216daf47828a0c08fab7d4cd27fe2", "score": "0.7544175", "text": "public function logincheck()\n {\n }", "title": "" }, { "docid": "dd03a67a821f3b3351bcf6c390b130b3", "score": "0.7535048", "text": "public function checklogin(){\n return TRUE;\n }", "title": "" }, { "docid": "e11f300610c730a64791fe75b10966f6", "score": "0.74959105", "text": "public function loginCheck() {\r\r\n $this->condition=\"username=:username and password=:password and status=:status\";\r\r\n $this->params = array(\":username\" => $this->username, \":password\" => md5($this->password), \":status\" => '1');\r\r\n $login = $this->find();\r\r\n // var_dump($login);\r\r\n //exit;\r\r\n if ($login) {\r\r\n return true;\r\r\n }\r\r\n return false;\r\r\n }", "title": "" }, { "docid": "d3e5db3e8efd5bb9dffd18496ca1eafd", "score": "0.74833107", "text": "private function checkLogin() {\n\t\t$InputName = $this->logView->getRequestUserName();\n\t\t$InputPassword = $this->logView->getRequestPassword();\n\t\t$InputUser = new User($InputName,$InputPassword);\n\t\n\t\t// First check if the user is currently logging out\n\t\tif($this->logView->getRequestLogout() == 'logout') {\n\t\t\t// Check if the user is already logged out and if so don't allow logout\n\t\t\tif(!empty($_SESSION['uname']) && !empty($_SESSION['pw'])) {\n\t\t\t\t$this->msg = 'Bye bye!';\n\t\t\t\t$_SESSION['uname'] = '';\n\t\t\t\t$_SESSION['pw'] = '';\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Then check if the user is already logged in using session variables\n\t\tif(isset($_SESSION['uname']) && isset($_SESSION['pw'])) {\n\t\t\tif(!empty($_SESSION['uname']) && !empty($_SESSION['pw'])) {\n\t\t\t\t$this->msg = '';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If the user is not already logged in check for a login attempt\n\t\t\n\t\t// Check for missing username\n\t\tif($InputName == '') {\n\t\t\tif($this->logView->getRequestLogin() == 'login') {\n\t\t\t\t$this->msg = 'Username is missing';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check for missing password\n\t\tif($InputPassword == '') {\n\t\t\tif($this->logView->getRequestLogin() == 'login') {\n\t\t\t\t$this->msg = 'Password is missing';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check if entered login information fits with a user\n\t\tif($this->udb->indexInDB($InputUser)!= -1) {\n\t\t\t$index = $this->udb->indexInDB($InputUser);\n\t\t\tif($this->udb->getPassword($index) == $InputPassword) {\n\t\t\t\tif($this->logView->getRequestLogin() == 'login')\n\t\t\t\t\t$this->msg = 'Welcome';\n\t\t\t\t$_SESSION['uname'] = $InputName;\n\t\t\t\t$_SESSION['pw'] = $InputPassword;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// THIS COULD BE ADDED IF MORE DETAILS ON THE LOGIN FAIL SHOULD BE GIVEN\n\t\t\t//if($this->logView->getRequestLogin() == 'login') {\n\t\t\t//\t$this->msg = 'Incorrect Password';\n\t\t\t//\treturn false;\n\t\t\t//}\n\t\t}\n\t\t\n\t\t// Since none of the above checks succeeded it must be a failed login attempt\n\t\tif($this->logView->getRequestLogin() == 'login') \n\t\t\t$this->msg = 'Wrong name or password';\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f16a50c09056f8b08819e39077514c2f", "score": "0.74560046", "text": "public function validateLogin();", "title": "" }, { "docid": "82ebddc89b484a5a4ce7a257a243e511", "score": "0.7429589", "text": "function login() {\n $error = false;\n if( isset($this->comm['user'] )) {\n $username = $this->comm['user'];\n if($this->loglevel<=LEVEL_TRACE) {\n $this->logger->trace(LEVEL_TRACE, \"-- user = $username\");\n }\n } else {\n $error = true;\n $this->logger->trace(LEVEL_ERROR, \"No user name supplied\");\n }\n if( isset($this->comm['passwd'] )) {\n $passwd = $this->comm['passwd'];\n } else {\n $error = true;\n $this->logger->trace(LEVEL_ERROR, \"No password supplied\");\n }\n\n if(!$error &&\n ( (strcmp($username,'mslob')==0 && strcmp($passwd,'test')==0)\n )\n ) {\n $res = true;\n } else {\n $res = false;\n }\n return $res;\n }", "title": "" }, { "docid": "5dbef7155540590557fc7b63f36c3dd8", "score": "0.74135643", "text": "function checkForLogin(){\n\tif(isset($_COOKIE[\"SDOT_user_login_name\"]) && isset($_COOKIE[\"SDOT_user_login_password\"]) ) {\n\t\t// send request to server to check for correct login.\\\n\t\t// dumy code till server up\n\t\t$correctLog = true;\n\t\t\n\t\tif( $correctLog == false)\n\t\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "5386353387af7b0a10845ea50e9ce717", "score": "0.7408962", "text": "public function doCheckLogin()\n {\n // Get client token\n $this->getToken();\n if (empty($this->token)) {\n return false;\n }\n\n // See if there is matching record, i.e. valid, unrevoked, token\n $records = new ClientRecords($this->app);\n if ($records->getUserProfileBySession($this->token)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5deffbbda6a5c32737182c006566afc0", "score": "0.7387722", "text": "private function checkLogin()\n {\n if (empty($this->strSessionid)){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "0a1f02ff3c3c8070cba87cff576c6e25", "score": "0.73403466", "text": "public function checkLogin($userName, $password);", "title": "" }, { "docid": "b5c0b621b2cdeb92cdd4c7f31c97ab23", "score": "0.73310345", "text": "function login_check(): bool\n {\n $auth = app()->make(\\App\\SparkPlug\\Auth\\Auth::class);\n\n return $auth->check();\n }", "title": "" }, { "docid": "e28323f87295dc3c6527b77481a28732", "score": "0.7320651", "text": "public function checkLogin() \n {\n $isLoggedIn = $this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n return $isLoggedIn;\n }", "title": "" }, { "docid": "b7e17231dcae165ca32a78a69de4232c", "score": "0.7305705", "text": "public function CheckLogin()\n {\n $sql = \"SELECT * FROM users WHERE usr_login='\" . $this->login . \"' \";\n $data = GetData($sql);\n if ( count($data) == 1 )\n {\n $row = $data[0];\n //password controleren\n if ( password_verify( $this->paswd, $row['usr_paswd'] ) ) $login_ok = true;\n }\n\n if ( $login_ok )\n {\n session_start();\n $this->Load($row);\n $_SESSION['usr'] = $this;\n $this->LogLoginUser();\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5514d1bf05a36f648f38da6eeb9bd417", "score": "0.7303899", "text": "function login_check(){\n if(isset($this->session->user_id, $this->session->username, $this->session->login_string)){\n $user_id = $this->session->user_id;\n $login_string = $this->session->login_string;\n $username = $this->session->username;\n \n // Get the user-agent string of the user.\n $user_browser = $this->input->server('HTTP_USER_AGENT');\n \n $sql = \"SELECT password FROM Caregiver WHERE ID_Caregiver = ? LIMIT 1\";\n $query = $this->db->query($sql, array($user_id));\n \n if($query->num_rows == 1){\n // If the user exists get variables from result.\n $password = $query->password;\n $login_check = hash('sha512', $password . $user_browser);\n \n if($login_check == $login_string){\n // Logged In!!!!\n return true;\n } else {\n // Not logged in \n return false;\n }\n } else {\n // Not logged in \n return false;\n }\n }\n }", "title": "" }, { "docid": "855c55cab669ffb774c4426a4f855e4c", "score": "0.7283213", "text": "public function hasValidLogin() {\n $criteria = array(\n 'email' => $this->getEmail(),\n 'password' => $this->getPassword()\n );\n \n $found = $this->findOne($criteria);\n if (!empty($found)) return true;\n return false;\n }", "title": "" }, { "docid": "1afda230d3dc8800c1b6b1aefa2c799b", "score": "0.72544986", "text": "public function validate_login_credentials(){\n\n\t\tif ($this->model_users->can_log_in()){\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('validate_login_credentials', 'Incorrect login credentials!');\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "7dc71325923133c2cb885973dd10c907", "score": "0.72477466", "text": "public function login() {\n $criteria = array(\n 'email' => $this->getEmail(),\n 'password' => $this->getPassword()\n );\n \n $found = $this->findOne($criteria, true);\n if (!empty($found)) {\n //login OK\n $this->fill($found);\n return true;\n }\n \n //invalid login\n return false;\n }", "title": "" }, { "docid": "864dbc44bafccf722d71933e2d5ef2d9", "score": "0.7241485", "text": "function check_login($data) {\r\n\t\t// init\r\n\t\t$valid = false;\r\n\t\t\r\n\t\t// find user from the database with the username\r\n\t\t$user = $this->find('first', array(\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'User.username'=>$data['User']['username']\r\n\t\t\t)\r\n\t\t));\r\n\t\t\r\n\t\t// if the passwords match\r\n\t\tif($user['User']['password'] == md5($data['User']['password'])) {\r\n\t\t\t$valid = $user;\r\n\t\t}\r\n\t\t\r\n\treturn $valid;\r\n\t}", "title": "" }, { "docid": "d4285ce13a3a5cfc3dffd62eb2fa8652", "score": "0.7226387", "text": "public function authenticate()\n\t{\n\t\tif($this->username==='demo' && $this->password==='demo')\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\telse\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\treturn !$this->errorCode;\n\t}", "title": "" }, { "docid": "56e66082f4bb5c83e37b26f706e4eb20", "score": "0.7203602", "text": "private function checkLoginWeb(): bool\n {\n $return = false;\n\n $username = $this->request->cookies->get('user', '');\n $logKey = $this->request->cookies->get('logkey', '');\n $remember = $this->request->cookies->get('remember', self::COOKIE_EXPIRATION_MIN);\n if (!empty($username) && !empty($logKey)) {\n if ($this->user->verifyLogKey($username, $logKey)) {\n $this->logger->addDebug($this->translator->trans('user-logged-in-from-cookie', ['%username%' => $username]));\n $this->username = $this->user->username;\n $this->logkey = $this->user->logkey;\n // Re-set cookie time to persist cookie time from last use\n $time = time() + $remember;\n $this->adjustCookieUser($time, $remember);\n $return = true;\n }\n }\n return $return;\n }", "title": "" }, { "docid": "3e871b3477edeb0392cd86fdabdf2a7c", "score": "0.71948284", "text": "public function login()\n {\n $error = $this->validation->check(['email', 'pass'], [$this->email, $this->pass]);\n if ($error == null) {\n $user = $this->checkExist();\n if ($user) {\n return 'true';\n }\n return false;\n }\n return $error;\n }", "title": "" }, { "docid": "00bb7ce56b49583dcd40cd3997516d0b", "score": "0.7192407", "text": "public function checkLogin() {\n\t\t$user = Registry::get(\"user\");\n\t\tif (!$user->isLoggedIn()) {\n\t\t\techo \"Error - Not logged in.\";\n\t\t\texit;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "37ae13970259265e1ebb47f50aa148e8", "score": "0.71783775", "text": "public function testLoginAuthentication() \n {\n $valid_username = \"fabian\"; \n $invalid_username = ' /83 dwa =?\"!';\n $valid_password = '123';\n $invalid_password = '645435';\n $this->assertTrue(\n $this->_authUser->loginAuthentication(\n $valid_username, $valid_password\n )\n );\n $this->assertFalse(\n $this->_authUser->loginAuthentication(\n $invalid_username, $invalid_password\n )\n ); \n }", "title": "" }, { "docid": "6b7a19b8053b59ddbb354654df2ff99a", "score": "0.7169374", "text": "public function testLoginWithValidCredentials() {\n\n $validEmail = '[email protected]';\n $validPassword = '123456';\n\n $this->visit('/login')\n ->type($validEmail, 'email')\n ->type($validPassword, 'password')\n ->press(trans('common.login_button'))\n ->seePageIs('/bills');\n }", "title": "" }, { "docid": "491629ba8d251e8fb99cf76e5cca4925", "score": "0.7157788", "text": "public function TriedToLogin() {\n \tif(isset($_POST['login'])){\n \t\treturn true;\n \t}\n\treturn false;\n }", "title": "" }, { "docid": "572955e36968fa407bbce2b9a8419735", "score": "0.71533996", "text": "public function validateLoginCredentials() {\n\t\t$username = $this->input->post('loginFormUsername');\n\t\t$password = $this->input->post('loginFormPassword');\n\t\t//create array to send to model\n\t\t$userCredentialsArray = array('un' => $username, 'pw' => $password);\n\t\t//check for empty fields\n\t\tif($this->areLoginFieldsNotEmpty($userCredentialsArray)) {\n\t\t\t//query db for username && pw match\n\t\t\t$result = $this->login_model->validateInputCredentials($userCredentialsArray);\n\t\t\t//check for empty result\n\t\t\tif($this->isResultNotEmpty($result)) {\n\t\t\t\tif($this->doPasswordsMatch($result, $password)) {\n\t\t\t\t\t//set session array for logged in check\n\t\t\t\t\t$userid = $result['user_id'];\n\t\t\t\t\t$accessLevel = $result['access_id'];\n\t\t\t\t\t$result2 = $this->login_model->getUserSpecificInfo($userid,$accessLevel);\n\t\t\t\t\t$loggedInUser = $this->createUser($result,$result2);\n\t\t\t\t\t$createLoggedInSuccessfulArray = array('userInfoObject' => $loggedInUser);\n\t\t\t\t\t$this->session->set_userdata($createLoggedInSuccessfulArray);\t\n\t\t\t\t\tredirect('schedule/home');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->reinitialize($userCredentialsArray);\n\t}", "title": "" }, { "docid": "9ce2c505d90af40bccaccdffc5da242e", "score": "0.7150827", "text": "public function check_login() {\n\t\n\t\tif (parent::check_login()) {\n\t\t\t$this->access_token = $this->pixie->session->get($this->access_token_key);\n\t\t\t$this->token_expires = $this->pixie->session->get($this->token_expires_key);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f4944a7246688e20c2e20d85636876c3", "score": "0.7139171", "text": "function checkLogin()\n{\n\tif ( !isLogin() ) {\n\t\tredirect( '/login' );\n\t}\n}", "title": "" }, { "docid": "4903acb27def3bc1053c009bb6dadf88", "score": "0.7129671", "text": "public function Account_checkLogin() {\n if (isset($_SESSION[$this->partnerId]['access'][\"access_token\"])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4515d6aebabd8718b83ba9147303b842", "score": "0.7128859", "text": "function checkUser($login, $pwd) {\n\n\t\t// Connection to database is supposed to be done here \n\n\t\tif ( $login == 'sws' ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "c8527416862083119eec6fedf009e546", "score": "0.71243536", "text": "abstract public function checkCredentials($pLogin, $pPassword);", "title": "" }, { "docid": "920aab13903429868e801d97228221f9", "score": "0.7121343", "text": "private function authenticate() {\r\n\t\t\t\r\n\t\t\t$this->callStack( 'logOnUser' ) ;\r\n\t\t\t\r\n\t\t\t// Validate User\r\n\t\t\tif ( !$this->isUser() ) {\r\n\t\t\t\t$this->callStack( null , true ) ;\r\n\t\t\t\treturn 1 ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Validate Password\r\n\t\t\tif ( !$this->isPassword( $this->user[ 'usr_pwd_1' ] ) ) {\r\n\t\t\t\t$this->callStack( null , true ) ;\r\n\t\t\t\treturn 2 ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// User is valid\r\n\t\t\t$this->callStack( null , true ) ;\r\n\t\t\treturn 0 ; \r\n\t\t}", "title": "" }, { "docid": "c420b5a069807186c2ad4a5fa2eb10c4", "score": "0.71179944", "text": "private function login() : bool\n\t{\n\t\t// Create and fill the body object\n\t\t$body = new stdClass;\n\t\t$body->username = $this->config->getUsername();\n\t\t$body->secretkey = $this->config->getPassword();\n\t\t$body->ack_pre_disclaimer = TRUE;\n\t\t$body->ack_post_disclaimer = TRUE;\n\t\t$body->request_key = TRUE;\n\n\t\t// Login\n\t\t$res = $this->curlRequest('POST', '/authentication', NULL, NULL, $body);\n\n\t\t// Check if login is sucessful\n\t\tif ($res->status_code == 5 && !empty($res->session_key)) {\n\t\t\t$this->session_key = $res->session_key;\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\tthrow new Exception('login() : Login failed (code : '.$res->status_code.') : '.$res->error.'.');\n\t\t}\n\t}", "title": "" }, { "docid": "13f288cb2e3d12a8a911c58c00858e3b", "score": "0.7117203", "text": "public function authenticate()\n\t{\n\t\t$users=array(\n\t\t\t// username => password\n\t\t\t'demo'=>'demo',\n\t\t\t'admin'=>'admin',\n\t\t);\n\t\tif(!isset($users[$this->username]))\n\t\t\t$this->errorCode=self::ERROR_USERNAME_INVALID;\n\t\telseif($users[$this->username]!==$this->password)\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\telse\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\treturn !$this->errorCode;\n\t}", "title": "" }, { "docid": "27e1e0ebed6f5a56ff9eb3b905527326", "score": "0.7114263", "text": "public function isAuthenticated()\n {\n try {\n $result = $this->run('login', '-s', null, false);\n $result = implode($result->getData());\n } catch (Exception\\CommandException $e) {\n return false;\n }\n\n // if a password is not required but one was provided, we should reject that connection on principle\n if (strpos(\"'login' not necessary, no password set for this user.\", $result) !== false\n && (strlen($this->password) || strlen($this->ticket))\n ) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "3d3791f2bd540d8366f18d6e6142c0a2", "score": "0.71031505", "text": "public function authenticate()\r\n {\r\n $users=array(\r\n // username => password\r\n 'demo2'=>'demo',\r\n 'admin2'=>'admin',\r\n );\r\n if(!isset($users[$this->username]))\r\n $this->errorCode=self::ERROR_USERNAME_INVALID;\r\n elseif($users[$this->username]!==$this->password)\r\n $this->errorCode=self::ERROR_PASSWORD_INVALID;\r\n else\r\n $this->errorCode=self::ERROR_NONE;\r\n return !$this->errorCode;\r\n }", "title": "" }, { "docid": "dd4f845728a8eb3d73dc2d449378470d", "score": "0.71007675", "text": "private function checkLogin()\n\t\t{\n\t\t\tglobal $database;\n\t\t\t// check if user set the Remember Me cookie\n\t\t\tif(isset($_COOKIE[USERNAME_COOKIE]) && isset($_COOKIE[ID_COOKIE]))\n\t\t\t{\n\t\t\t\t$this->username = $_SESSION[USERNAME_COOKIE] = $_COOKIE[USERNAME_COOKIE];\n\t\t\t\t$this->userid \t= $_SESSION[ID_COOKIE] = $_COOKIE[ID_COOKIE];\n\t\t\t}\n\t\t\t\n\t\t\t// check to see if userid, username are set, and user is not a guest\n\t\t\tif(isset($_SESSION[USERNAME_COOKIE]) && isset($_SESSION[ID_COOKIE]) )\n\t\t\t{\n\t\t\t\t// confirm that the userid/username combo are valid\n\t\t\t\tif($database->confirmUserID($_SESSION[ID_COOKIE], $_SESSION[USERNAME_COOKIE]) != 0 )\n\t\t\t\t{\n\t\t\t\t\t// not a valid combo, the user is not logged in\n\t\t\t\t\tunset($_SESSION[ID_COOKIE]);\n\t\t\t\t\tunset($_SESSION[USERNAME_COOKIE]);\n\t\t\t\t\t$this->logged_in = false;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// user is logged in, so we set the class variables\n\t\t\t\t$this->userInfo = $database->getUserInfo($_SESSION[USERNAME_COOKIE]);\n\t\t\t\t$this->username = $this->userInfo[COL_USERNAME];\n\t\t\t\t$this->userid\t= $this->userInfo[COL_OBJID];\n\t\t\t\t$this->access\t= $this->userInfo[COL_ACCESSLEVEL];\n\t\t\t\t$_SESSION ['growerID'] = $this->userInfo [COL_OBJID];\n\n\t\t\t\t$this->logged_in = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse // user is not logged in\n\t\t\t{\n\t\t\t\t$this->username = $_SESSION[USERNAME_COOKIE] = GUEST_NAME;\n\t\t\t\t$this->access = GUEST_LEVEL;\n\t\t\t\t$this->logged_in = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7380e2db21316fc623cb2b5307fd35b9", "score": "0.7099089", "text": "function checkAuthentication()\n\t\t{\n\t\t\tif(isset($_SESSION['user_name']))\n\t\t\treturn true;\n\t\t\telse return false;\n\t\t}", "title": "" }, { "docid": "df5865616a7a5990e7bc60c6f3bde518", "score": "0.7094226", "text": "public function loginCheck() {\n\t$loginCheck = $this->customsession->loginCheck();\n\tif($loginCheck != 1 && !$loginCheck['status']) {\n\t\t$output['status'] = FALSE;\n\t\t$output['response']['messages'][] = $loginCheck['response']['messages'][0];\n\t\t$output['statusCode'] = STATUS_INVALID_SESSION;\n\t\t\n\t\t$resultArray = array('response' => $output['response']);\n\t\t$this->response($resultArray, $output['statusCode']);\n\t}\n }", "title": "" }, { "docid": "ca4232fe331586e0649e25a6d64d201a", "score": "0.70932376", "text": "public function proofLogin(){\n if(isset($_SESSION['userid']))\n return true;\n \n return false;\n \n }", "title": "" }, { "docid": "49bf6e1231316ea955f69705a9608517", "score": "0.70920646", "text": "public function checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza\n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n \n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }", "title": "" }, { "docid": "e23d480178a0bbab119576e317d45837", "score": "0.70846367", "text": "public function authenticate() {\n\t\t\t$users = array(\n\t\t\t// username => password\n\t\t\t\t'demo' => 'demo', 'admin' => 'admin', );\n\n\t\t\tif (!isset($users[$this -> username]))\n\t\t\t\t$this -> errorCode = self::ERROR_USERNAME_INVALID;\n\t\t\telse if ($users[$this -> username] !== $this -> password)\n\t\t\t\t$this -> errorCode = self::ERROR_PASSWORD_INVALID;\n\t\t\telse\n\t\t\t\t$this -> errorCode = self::ERROR_NONE;\n\t\t\treturn !$this -> errorCode;\n\t\t}", "title": "" }, { "docid": "ccf4bcf3c073e268df56556f79ce8a58", "score": "0.7078335", "text": "public function canLogIn() {\n return $this->activation == false && $this->password == true;\n }", "title": "" }, { "docid": "abd4e5a6503961696143e7d6702d23a7", "score": "0.7078049", "text": "public static function loginCheck(){\n\t\t\tstatic $check = null;\n\t\t\tif( is_null($check) ){\n\t\t\t\tif( isset( $_SESSION[S_USERID],$_SESSION[S_USERNAME],$_SESSION[S_STRING] ) ){\n\t\t\t\t\t$result = DB::select('users')\n\t\t\t\t\t\t->columns('password')\n\t\t\t\t\t\t->where( 'id', '=', $_SESSION[S_USERID] )\n\t\t\t\t\t\t->where( 'state', '=', 1 )\n\t\t\t\t\t\t->first();\n\t\t\t\t\tif( $result ){\n\t\t\t\t\t\t$token = hash('sha512',$result['password'].$_SERVER['HTTP_USER_AGENT']);\n\t\t\t\t\t\tif( $token === $_SESSION[S_STRING] ) $check = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $check;\n\t\t}", "title": "" }, { "docid": "0f6fdf7e852d7f4de9a571da32371d7a", "score": "0.7065792", "text": "public function checkUserLogin($infos){\n \t\textract($infos);\n\t\t\t\n \t\t$query = \"SELECT `id` FROM `users` \n WHERE `password` = :password AND (`login` = :login OR `email` = :login)\";\n\n \t\t$param = array(':login' => $login, \n ':password' => stringHash($password)\n );\n\n \t\t$check = myQuery($query, 'select', $param, 'count');\n $data = myQuery($query, 'select', $param, 'assoc');\n \t\tif ($check > 0){\n \t\t\t$_SESSION['id_user']=$data['id'];\n\t\t\t\tsession_write_close();\n\t\t\t\treturn true;\n\t\t\t}\n \t\telse{\n \t\t\treturn false;\n\t\t\t}\n \t}", "title": "" }, { "docid": "70f0c6893a6b6f267d6b431a28df750b", "score": "0.7062093", "text": "function canLogin($p_username, $p_password)\n\t{\n\t}", "title": "" }, { "docid": "7d7b0de43f5bd9b374ce99e3485547a7", "score": "0.705409", "text": "function checkcredentials()\n {\n if (isset($_SESSION['token'])) {\n $this->g_client->setAccessToken($_SESSION['token']);\n }\n if ($this->g_client->getAccessToken()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7c75f3467d7325175d58dc3f768734a9", "score": "0.705054", "text": "private function kt_verify_login() {\n\tglobal $user_xml , $userid , $password,$cookie_redirect,$USR ;\n\tif (file_exists($user_xml)){\n\t\t$password = passhash($password);\n\t\t$data = getXML($user_xml);\n\t\t$PASSWD = $data->PWD;\n\t\t$USR = strtolower($data->USR);\n\t\tif ( ($userid == $USR) && ($password == $PASSWD) ) {\n\t\t\t$this->kt_delete_file_lock();\n\t\t\tcreate_cookie();\n\t\t\tsetcookie('GS_ADMIN_USERNAME', $USR, time() + 3600,'/');\n\t\t\texec_action('successful-login-end');\n\t\t\tredirect($cookie_redirect);\n\t\t}\n\t}\n\treturn $this->kt_log_maintain();\n}", "title": "" }, { "docid": "1b77a5c0c160e0104c297fe20ab1f23c", "score": "0.70466936", "text": "public function checkLogin($username,$password,$request,$debug) {\n\n\t\t\t//DO NOT check login when in debug mode\n\t\t\tif($debug == 1) { return true; }\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "82eb488364be9d3ddf983c96624e9ea0", "score": "0.70302904", "text": "function login()\n\t{\n\t\t$this->form_validation->set_rules('username', 'Username', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('password', 'Password', 'trim|xss_clean');\n\t\t\n\t\tif ($this->form_validation->run()) {\n\t\t\tif ($this->sauth->login($this->form_validation->set_value('username'), $this->form_validation->set_value('password')))\n\t\t\t{\n\t\t\t\techo 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo 0;\n\t}", "title": "" }, { "docid": "00bcd5425f222a2e5183fe29bc1e9846", "score": "0.7029955", "text": "function NormalLogIn($dbPass,$dbUname,$inputPass,$inputUname)\n{\n //dbPass,dbUname,passHint should come from the database\n if ($inputPass == $dbPass && $inputUname == $dbUname)\n {\n return true;\n }\n else\n {\n return (boolean)false;\n }\n}", "title": "" }, { "docid": "f4951a0d6ad8f6575cf25222a94f1397", "score": "0.7028386", "text": "public function requiresLogin(): bool\n {\n return true;\n }", "title": "" }, { "docid": "1191a7c9e24cb94c6b1487f5288868db", "score": "0.7024519", "text": "public function processLogin(){\n \n $input = $this->processLoginInput();\n \n //we need exactly 2 items\n if(count($input) == 2){\n \n if($this->attemptLogin($input)){\n \n return TRUE;\n \n } else {\n \n return FALSE;\n \n }\n \n }\n }", "title": "" }, { "docid": "77738a8f558da0bc28a0f74b3f721951", "score": "0.70154977", "text": "public function checkLogin(){\n $filter=['email'=>$this->sanitize($this->email)];\n $option=[\n 'projection'=>[\n '_id'=>1,\n 'password'=>2,\n 'is_admin'=>3\n ]\n ];\n $found=$this->database->queryData($this->collection_name,$filter,$option);\n if($found){\n $data=get_object_vars($found[0]);\n $this->id=$data['_id'];\n $this->password=$data['password'];\n $this->is_admin=$data['is_admin'];\n return TRUE;\n\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "0ac5012fb5fd956f4414be227558da73", "score": "0.7013169", "text": "function IsLoggedIn () {\n global $gp, $user;\n $vars = $gp->Get ();\n if ($gp->Has ('loginName') && strlen ($vars['loginName']) > 0) {\n // this means nothing up to this point. you are either logged in \n // or you are looking forward to logging in.\n $gp->Set (array ('loginName' => $vars['loginName']), false); // false means \"save to cookie too\"\n if ($gp->Has ('loginPassword')) {\n // if loginPassword exists, it must be from a login page.\n // user is trying to log in.\n $pwhash = $this->SuperSecureHash ($vars['loginPassword']);\n $gp->Set (array ('loginPWHash'=>$pwhash), false); // false means \"save to cookie too\"\n $vars = $gp->Get (); // get again\n }\n if (array_key_exists ('loginPWHash', $vars)) {\n // if there is already a hash, that means the user is already\n // logged in, going to another page.\n // just because loginPWHash exists, it does not mean the\n // user is authenticated. must check hash against DB.\n $your_hash = $vars['loginPWHash'];\n try {\n $my_user_id = FindObject ($vars['loginName'], USER);\n if (!is_null ($my_user_id) && $my_user_id > 0) {\n $my_user = new User ($my_user_id);\n $my_hash = $my_user->GetProp ('password'); // assumes hash exists\n if ($your_hash === $my_hash) {\n // congrats!\n $user = new User ($my_user_id); // global - use it\n return true; \n }\n }\n } catch (Exception $e) {\n // fails\n }\n }\n }\n return false; // all other cases = flop\n }", "title": "" }, { "docid": "3dd50af1279cb4c4b9dce0864893673c", "score": "0.70126396", "text": "private function validateLogin()\r\n {\r\n $this->updateUser();\r\n $message = \"\";\r\n if($this->loginRules->isUsernameMissing($this->username))\r\n {\r\n $message = $this->feedback->getUsernameMissingMsg();\r\n }\r\n else if($this->loginRules->isPasswordMissing($this->password))\r\n {\r\n $message = $this->feedback->getPasswordMissingMsg();\r\n }\r\n else if(!$this->loginRules->isUsernameAndPasswordMatch($this->username, $this->password))\r\n {\r\n $message = $this->feedback->getNoMatchMsg();\r\n }\r\n return $message;\r\n }", "title": "" }, { "docid": "3d3f3dd580dd1d4274f3446338e799f4", "score": "0.70116216", "text": "public function check_login() {\n $client = $this->get_user_oauth_client();\n return $client->is_logged_in();\n }", "title": "" }, { "docid": "a20855a4cc50f8a15c73653024cfd259", "score": "0.69970995", "text": "public function checkAuthLogin(){\n\t\tif(!SessionHandle::checkLoginExist()){\n\t\t\theader(\"Location:index.php?error=UnAuthorized Access\");\n\t\t}\n\t}", "title": "" }, { "docid": "dbc2d4399436ba3605868163a04ed34c", "score": "0.6992275", "text": "function testValidateCredentials()\r\n\t{\r\n\t\t$this->load->library('unit_test');\r\n\t\t$validateStatusCanLogin = $this->validateCredentials();\r\n\t\t\r\n\t\t$expected;\r\n\t\t\r\n\t\tif($validateStatusCanLogin == true) // user is able to login so test will be true\r\n\t\t\t$expected = true;\t// so will expected result be true\r\n\t\telse \r\n\t\t\t$expected = false;\r\n\t\t\r\n\t\t$this->unit->run($validateStatusCanLogin, $expected, 'validateCredentials test');\r\n\t\techo $this->unit->report();\r\n\t\t\t\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "c9f7f3b2719d6bbdfc44cf3b8c96d851", "score": "0.6991318", "text": "public function checkAuth(): bool\n {\n $this->user = new User();\n return $this->checkLoginWeb() || $this->checkLoginAPI();\n }", "title": "" }, { "docid": "557002999e055e1fba1a0eef7a13dde1", "score": "0.69907707", "text": "function auth($login, $passwd) {\n $passwd = hash(\"whirlpool\", $passwd);\n $data = $this->fetchAll(\"login= '$login'\");\n if ($data[0]->login === htmlentities($login) && $data[0]->password === $passwd) {\n return (true);\n }\n return (false);\n }", "title": "" }, { "docid": "0491fa0734c9094b90777f5a2c22347c", "score": "0.69709915", "text": "public function loginValidate()\n {\n if (!isset($_POST['log']) OR empty($_POST['log'])) {\n $_SESSION[\"fb_error\"][] = USER_ERROR_USERNAME_EMPTY;\n return false;\n }\n if (!isset($_POST['pwd']) OR empty($_POST['pwd'])) {\n $_SESSION[\"fb_error\"][] = USER_ERROR_PASSWORD_EMPTY;\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "fad881cf2ba39f13618556b0cb901c3b", "score": "0.69680345", "text": "public function login_check() {\n\t\tglobal $minative_mysqliDB;\n\t\tif (isset($_SESSION['userid'], $_SESSION['user'], $_SESSION['loginstring'])) {\n\n\t\t\t$userid = $_SESSION['userid'];\n\t\t\t$loginstring = $_SESSION['loginstring'];\n\t\t\t$user = $_SESSION['user'];\n\t\t\t$user_browser = $_SERVER['HTTP_USER_AGENT'];\n\t\t\t$password = $this -> userdata($userid)['password'];\n\n\t\t\tif ($password) {\n\t\t\t\t$login_check = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($user_browser), $password, MCRYPT_MODE_CBC, md5(md5($user_browser))));\n\n\t\t\t\tif ($login_check == $loginstring) {\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} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c44acdeabdc36066a54f6e3eb92e90dd", "score": "0.6967381", "text": "public function testLoginWithInvalidCredentials(){\n $this->assertFalse(Auth::attempt([\n 'username' => 'juan',\n 'password' => ''\n ]));\n \n $this->assertFalse(Auth::attempt([\n 'username' => 'juan',\n 'password' => 'masipag'\n ]));\n }", "title": "" }, { "docid": "2f3b76c6419ae84959bd0cb2705c6799", "score": "0.6964906", "text": "public function authenticate()\n {\n /** @var ConfigManager $config */\n $config = Yii::app()->config;\n if ($this->username == $config->adminId) {\n $isAdmin = $config->adminPassword === self::encryptPassword($this->password, $config->adminSalt);\n if ($isAdmin) {\n $this->setState('role', 'admin');\n $this->errorCode = self::ERROR_NONE;\n return true;\n }\n }\n\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n $this->errorMessage = Yii::t('user', 'Login name and password don\\'t match.');\n return false;\n }", "title": "" }, { "docid": "dd585a46804c76641aabe492c4e89700", "score": "0.6961396", "text": "public function login()\n {\n if($this->password==Yii::app()->settings->get('system', 'products_password'))\n {\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "7a150d3ee4ccce78da4badad1735140e", "score": "0.69577354", "text": "protected function check_login()\n {\n $class = $this->router->fetch_class();\n $method = $this->router->fetch_method();\n\n $is_logged = $this->system->confirm_session();\n\n if ($is_logged)\n {\n switch($class)\n {\n case 'system':\n switch($method)\n {\n case 'register': case'do_register': case 'login': case 'do_login':\n redirect('/');\n break;\n }\n break;\n\n default:\n // If the user doesn't have the permission to view the backend, log them out.\n if(!$this->system->check_permission('BACKEND_ACCESS'))\n {\n $this->session->sess_destroy();\n exit(\"You do not have permission to access this page\");\n }\n break;\n }\n } else\n {\n switch($class)\n {\n case 'system':\n switch($method)\n {\n case 'register': case'do_register': case 'login': case 'do_login':\n break;\n default:\n redirect('login'); break;\n }\n break;\n default:\n redirect('login'); break;\n }\n }\n }", "title": "" }, { "docid": "e75000748c809de781dad845478b2328", "score": "0.6954818", "text": "public function checkAuth() \n {\n if ( isset($_POST['authrequest']) && ! empty($_POST['username']) && ! empty($_POST['password']) )\n $this->runAuth(strtolower($_POST['username']), $_POST['password']);\n\n return ( isset($_SESSION['authorized']) );\n }", "title": "" }, { "docid": "05c556655bceac831d909d97394e7a62", "score": "0.6953672", "text": "function _checkLogin($username, $password) {\r\n # Check the user's token.\r\n $c = new UnixClient(\"../usersvc/sock\");\r\n $r = $c->call(\"login&\" . urlencode($username) . \"&\" . urlencode($password) .\r\n \"\\n\");\r\n if ($r != \"\") {\r\n $this->username = $username;\r\n $this->token = $token = urldecode($r);\r\n\r\n#START:token_set_cookie\r\n $arr = array($username, $token);\r\n $cookieData = base64_encode(serialize($arr));\r\n setcookie($this->cookieName, $cookieData, time() + 31104000);\r\n#END:token_set_cookie\r\n return true;\r\n }\r\n else {\r\n \treturn false;\r\n }\r\n }", "title": "" }, { "docid": "36848a662ff8cdc14ac6b22630c28a2c", "score": "0.6953532", "text": "abstract public function isAuthenticateSuccessful();", "title": "" }, { "docid": "66a97fc89395db8608fe13c34d1d64c7", "score": "0.69480354", "text": "private function checkLogin()\n\t{\n\t\t//checks if session user_info is set\n\t\tif(!$_SESSION['user_info']['user_id'] && $_SESSION['user_info']['user_id'] == NULL)\n\t\t{\n\t\t\t//go to login controller\n\t\t\tredirect(\"UsersController/login/sitelogin\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//ok, let go\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "33ebefdb4afc1e38837c946b54c8df13", "score": "0.6941543", "text": "public function testCanLogin(): void \r\n {\r\n global $testUsername, $testPassword;\r\n \r\n $this->cleanUpTest();\r\n $this->setUpTest();\r\n \r\n $um = new UserManager($GLOBALS['mysqli']);\r\n $statement = $um->login($testUsername, $testPassword);\r\n $result = $statement->get_result();\r\n \r\n $user = null;\r\n \r\n if($row = $result->fetch_assoc()) { \r\n $user = $row['userName'];\r\n }\r\n \r\n $this->assertEquals(\r\n $testUsername,\r\n $user\r\n );\r\n \r\n $this->cleanUpTest();\r\n }", "title": "" }, { "docid": "bd2bf490a6a70e3ba5ce53b0999ff822", "score": "0.69414604", "text": "public function CheckLogin()\n {\n try {\n $sth = DB::prep(\"\n SELECT id,username,pass,`group`\n FROM cms_messaging_admin\n WHERE username = :user AND pass = sha1(:pass)\");\n\n $sth->bindParam(\":user\", $this->user, PDO::PARAM_STR);\n $sth->bindParam(\":pass\", $this->pass, PDO::PARAM_STR);\n \n $result = DB::getFirst($sth, null, PDO::FETCH_OBJ);\n\n if(!empty($result))\n {\n $signup = new SignUp();\n $signup->SetCookieName($this->cookie_name);\n $signup->SetSession(\n array(\n \"userid\"=>$result->id,\n \"username\"=>$result->username,\n \"group\"=>$result->group\n )\n );\n\n if($this->remember == 1)\n {\n $signup->SetCookie(\"login\", array(\"username\"=>$result->username, \"hash\"=>$result->pass), 31556926, $_SERVER['SERVER_NAME']);\n $signup->SignUp();\n }\n\n $this->success = true;\n \n } else {\n \n $this->failed = true;\n }\n \n } catch(Exception $e)\n {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "8382cd3f72a428d7146363081e4da240", "score": "0.69402677", "text": "public function checkIfLogin() {\n if (isset($_COOKIE[\"user\"])) {\n session([\"user\" => $_COOKIE[\"user\"]]);\n }\n }", "title": "" }, { "docid": "c7d20e6577adb14d4aac9b253f21d010", "score": "0.6938651", "text": "private function verifyUserCredentials(){\n\t\tif(empty($_SESSION['png_res']) || $_SESSION['png_res'] > strtotime($this->restrictionTime)){\n\t\t\t//if resetting the invalid attempts...\n\t\t\tif($_SESSION['png_inv'] > $this->maxLoginAttempts){\n\t\t\t\tunset($_SESSION['png_inv'],$_SESSION['png_res']);\n\t\t\t}\n\t\t\t//check to see if the username and password are set\n\t\t\tif(!empty($_SESSION['png_un']) && !empty($_SESSION['png_pw'])){\n\t\t\t\t//if the username and password are valid...\n\t\t\t\tif($_SESSION['png_un'] == sha1($this->username) && $_SESSION['png_pw'] == sha1($this->password)){\n\t\t\t\t\t//valid logged in user\n\t\t\t\t\t$this->loggedIn = true;\n\t\t\t\t} else {\n\t\t\t\t\t//invalid credentials\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if not logged in and hitting the validation page...\n\t\t\tif(!$this->loggedIn && $this->scriptAction == 'validate-login'){\n\t\t\t\t//if the form data has been passed...\n\t\t\t\tprint 'bbb<br/>';\n\t\t\t\tif(!empty($this->formData['username']) && !empty($this->formData['password'])){\n\t\t\t\t\t//if they are valid, log the user in\n\t\t\t\t\tif($this->formData['username'] == $this->username && $this->formData['password'] == $this->password){\n\t\t\t\t\t\t$_SESSION['png_un'] = sha1($this->formData['username']);\n\t\t\t\t\t\t$_SESSION['png_pw'] = sha1($this->formData['password']);\n\t\t\t\t\t\t$this->loggedIn = true;\n\t\t\t\t\t\tprint 'aces';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!$this->loggedIn){\n\t\t\t\t\t//otherwise mark it as an invalid login\n\t\t\t\t\t$this->invalidLoginAttempt = true;\n\t\t\t\t\t//note the number of invalid attempts taken\n\t\t\t\t\tif(empty($_SESSION['png_inv'])){\n\t\t\t\t\t\t$_SESSION['png_inv'] = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_SESSION['png_inv']++;\n\t\t\t\t\t}\n\t\t\t\t\t//and if the invalid attempts are too high...\n\t\t\t\t\tif($_SESSION['png_inv'] > $this->maxLoginAttempts){\n\t\t\t\t\t\t//set the restricted time\n\t\t\t\t\t\t$_SESSION['png_res'] = time();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!$this->loggedIn){\n\t\t\tif(!$this->ajaxCall){\n\t\t\t\t$this->drawLoginPage();\n\t\t\t} else {\n\t\t\t\tprint \"[login_required]\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "068910dc3b87792ff99ad15ee9dc2ee6", "score": "0.69384986", "text": "public function testAttemptReturnsTrueWhenCredentialsAreCorrect()\n {\n Session::$instance = new Payload($this->getMock('\\System\\Session\\Drivers\\Driver'));\n\n $auth = new AuthLoginStub();\n\n // Correct password di database: budi = budi123, agung = agung123\n $credentials = ['email' => '[email protected]', 'password' => 'budi123'];\n\n $this->assertTrue($auth->attempt($credentials));\n $this->assertEquals('1', $_SERVER['auth.login.stub']['user']);\n $this->assertFalse($_SERVER['auth.login.stub']['remember']);\n\n $secure = new AuthLoginStub();\n $credentials['remember'] = true;\n\n $this->assertTrue($secure->attempt($credentials));\n $this->assertEquals('1', $_SERVER['auth.login.stub']['user']);\n\n $secure->logout();\n $auth->logout();\n }", "title": "" }, { "docid": "3f4fece7d308f9417fac13303b19b7cc", "score": "0.6926362", "text": "private function checkAuthentication(){\n\t\t$this->_isLoggedIn = $this->hasAuthentication();\n\t\t$this->_hasCheckedAuthentication = true;\n\t}", "title": "" }, { "docid": "c1794dfb834e080ce9b0cb0180c5e50c", "score": "0.69254345", "text": "private function check_stored_login()\r\n {\r\n if(isset($_SESSION))\r\n {\r\n $this->user_id= isset($_SESSION['user_id']);\r\n $this->username= isset($_SESSION['username']);\r\n $this->last_login= isset($_SESSION['last_login']); \r\n\r\n return true;\r\n }\r\n\r\n }", "title": "" }, { "docid": "3a0f962e8443896fb15084c63eb09cc4", "score": "0.69176227", "text": "public function login() {\n\n $author = Author::findByUserName($this->login);\n $this->id = $author->id;\n\n if (null !== $author) {\n if ($author->password === $this->password) {\n $this->setSession();\n return true;\n }\n }\n $this->addError(new ModelError('username', 'Login or Password not founded'));\n return false;\n }", "title": "" }, { "docid": "b07b355d2867532c1810980a80c58779", "score": "0.69124097", "text": "public static function verifyPrompt() {\n\n\t\tif(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {\n\t\t\tif(Configuration::getConfig('authentication', 'username') === $_SERVER['PHP_AUTH_USER']\n\t\t\t\t&& Configuration::getConfig('authentication', 'password') === $_SERVER['PHP_AUTH_PW']) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\terror_log('[RSS-Bridge] Failed authentication attempt from ' . $_SERVER['REMOTE_ADDR']);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "b5b84a890aad5ab654331be7ac844c04", "score": "0.6911221", "text": "private function authenticateUser(): bool\n {\n // TODO: Check if the provided user name and password combination is correct.\n\n /*--\n return require '../../phpuesolution/login/authenticateUser.inc.php';\n //*/\n\n //##\n return true;\n //*/\n }", "title": "" }, { "docid": "60e44a23da297c138e02956706a9c0e9", "score": "0.69088715", "text": "public function validate_credentials() {\n\t\t\t\n\t\t\tif ($this->Admin->admin_can_log_in()){\n\t\t\t\t\n\t\t\t\t$username = $this->input->post('username');\n\t\t\t\t\n\t\t\t\t//check admin last login time from the logins table\n\t\t\t\t$last_login = $this->Logins->last_login_time($username);\n\t\t\t\t\n\t\t\t\t//if there is a record then update users record\n\t\t\t\t//otherwise ignore\n\t\t\t\tif($last_login){\n\t\t\t\t\tforeach($last_login as $login){\n\t\t\t\t\t\t$this->Logins->update_admin_login_time($username, $login->login_time);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//create new login record after updating with previous entry\n\t\t\t\t$this->Logins->insert_login();\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t$this->Logins->insert_failed_login();\n\t\t\t\t\n\t\t\t\t$this->form_validation->set_message('validate_credentials', 'Incorrect username or password.');\n\t\t\t\t\n\t\t\t\treturn FALSE;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "29def8d3816598ef5f1a28ef3c43da17", "score": "0.69007057", "text": "static public function checkLogin(){\n if(isset($_SESSION['uid'])){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "3479e8adc731b98769169dbac780f4fc", "score": "0.6898846", "text": "private function verifyCredentials() :bool\n {\n if (empty(config('statamic-instagram-user-feed.username')) || empty(config('statamic-instagram-user-feed.password'))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "23a6f950a7e7a07a7c09a4ce136c3985", "score": "0.68966925", "text": "function checkAdminLogin()\r\n{\r\n // TODO: Detail authorize check, now only simply return true.\r\n return true;\r\n}", "title": "" }, { "docid": "185eb69aae2775a3cc63f5c12333b552", "score": "0.6893198", "text": "function login($login, $password) {\n return true;\n }", "title": "" }, { "docid": "a927a553df0a0ac665fe1cd688f68534", "score": "0.68899673", "text": "public function authenticate()\n\t{\t\n\t\t// this means that you can find the username which matches this password in my log-in model\n\t\t$record=Login::model()->findByAttributes(array('email'=>$this->username));\n\t\tif($record === null)\n\t\t\tprint_r ($record);\n\t\t\t// $this->errorCode=self::ERROR_USERNAME_INVALID;\n\n\t\telseif($record->password!==$this->password)\n\t\t{\t\n\t\t\techo $recordpassword = $record->password; \n\t\t\techo $tablepassword = $this->password; \n\t\t}\t// $this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\telse\n\t\t{\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\t}\n\t\treturn !$this->errorCode;\n\t\t\n\t}", "title": "" }, { "docid": "b02cb9dee70f4cec81b45baeea32f4fd", "score": "0.68887204", "text": "public function loginCheck() {\n\t\tif (isset($_SESSION['login_user'])) {\n\t\t\t$un = $_SESSION['login_user'];\n\t\t\t$row = $this->db->query($db,\"SELECT username FROM admin WHERE username = '$un' \");\n\t\t\tif ($row && mysqli_num_rows($row) == 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e7a5299f9543dc1b907e363f2d5a5000", "score": "0.68878806", "text": "private function checkLogin()\n {\n return $this->findUserByLogin()->num_rows;\n }", "title": "" }, { "docid": "16e401ec83d695232eccccca82f4f6fd", "score": "0.68862116", "text": "private function checker()\n {\n if (isset($_SESSION['username'])) {\n return true;\n } else {\n $this->load->view(\"login\");\n return false;\n }\n }", "title": "" }, { "docid": "4e9517e832b97c1fc2ff26b0c0a56d5a", "score": "0.68816864", "text": "private function _checkLogin()\n {\n $acl = Zend_Controller_Action_HelperBroker::getStaticHelper('Acl');\n if($acl->getRole() != 'guest') {\n $this->_view->assign('loggedIn', true);\n MyShop_Basket::getInstance()->setUserId($_SESSION['profile']['id']);\n }\n }", "title": "" }, { "docid": "ec5e9d56303fa2e0f1718d5bb3ff762f", "score": "0.6880404", "text": "public function can_log_in(){\n\t\t\t\n\t\t\t$this->db->where('LOWER(username)', strtolower($this->input->post('username')));\n\t\t\t$this->db->where('password', md5($this->input->post('password')));\n\t\t\t$this->db->where('status', '0');\n\t\t\t\n\t\t\t$query = $this->db->get($this->table);\n\t\t\t\n\t\t\tif ($query->num_rows() == 1){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "d54112c2e8d57cecbf5349b90c592ed9", "score": "0.6877437", "text": "public function checkBrowserCredentials()\n {\n // Session\n if (Validate::isArray($this->loggedUser, null, 1)) {\n // TODO: log this\n return true;\n\n // Cookie\n } else if (Validate::json($this->cookie->get('loggedUser'))) {\n $loggedUserCookie = json_decode($this->cookie->get('loggedUser'), true);\n\n // Invalid validationKey\n if ($loggedUserCookie['validationKey'] != sha1(SALT . $loggedUserCookie['id'] . $loggedUserCookie['email'] . $loggedUserCookie['expiry'])) {\n // TODO: log this\n $this->cookie->delete('loggedUser');\n return false;\n }\n\n // Expired cookie\n if (time() > $loggedUserCookie['expiry']) {\n // TODO: log this\n $this->cookie->delete('loggedUser');\n return false;\n }\n\n // Get user by ID and e-mail\n $users = $this->getBy(array(), array('id' => $loggedUserCookie['id'], 'email' => $loggedUserCookie['email']));\n\n // Inexistent user\n if (!Validate::isArray($users, null, 1)) {\n // TODO: log this\n $this->cookie->delete('loggedUser');\n return false;\n }\n\n $user = $users[0];\n\n //\\SportArea\\Core\\Utils::printR($user, true);\n\n // Invalid authKey\n if ($loggedUserCookie['authKey'] != sha1(SALT . $user['id'] . $user['email'] . $user['password'] . $user['salt'])) {\n // TODO: log this\n $this->cookie->delete('loggedUser');\n return false;\n }\n\n // Not active user\n if ($user['status'] != UsersModel::STATUS_ACTIVE) {\n // TODO: log this\n $this->cookie->delete('loggedUser');\n return false;\n }\n\n\n // TODO: log this (successfully logged in with cookie)\n\n \\SportArea\\Core\\Uim::clear();\n $this->setBrowserCredentials($user, array());\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "fd4c117f1cca8326554a84d2b9356d27", "score": "0.6875405", "text": "public function login()\n {\n $username = $this->username;\n // Validate\n $this->validate()->get();\n\n if($this->exists())\n {\n // Success to login\n return TRUE;\n }\n else\n {\n $this->username = $username;\n $this->error_message('login', 'User does not exists');\n\n return FALSE;\n }\n\n }", "title": "" } ]
a314fa6f633f7b03ab01378fe297d1f4
Check if a user is a moderator
[ { "docid": "b32b654a097b3ed7baba39ae777db259", "score": "0.807407", "text": "public function isModerator()\n {\n if ($this->group->category == 'moderator') return true;\n return false;\n }", "title": "" } ]
[ { "docid": "54e012d2fcfa6ab80ca95efee973b7f2", "score": "0.81695", "text": "public function is_moderator_user($user_id) {\n\t\t$result = $this->mdb->super_query(\"SELECT mid FROM {$this->prefix}moderators WHERE id = {$user_id}\");\n\t\treturn ($result) ? True : False;\n\t}", "title": "" }, { "docid": "1ba2bec5d10317c8dfad57cf73060f74", "score": "0.8088787", "text": "public function isModerator() {\n $user = $this->loadUser();\n return $user && $user->moderator;\n }", "title": "" }, { "docid": "a17d2f45b033d62db90fa5a264f2efb5", "score": "0.8007871", "text": "public function isModerator()\n {\n if ($this->isOwner() || $this->isAdministrator()) {\n return true;\n }\n\n if ($this->role->group == 'moderator') {\n \n return true;\n\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "8c000b5d73e8e70b9ec386bdacf2e4b3", "score": "0.7934265", "text": "public function isModerator() {\n\t\t$okay = false;\n\t\t$message = '';\n\n\t\t//Is the field set?\n\t\tif (isset($_GET['username']) && $_GET['username'] !== '') {\n\t\t\t$username = $_GET['username'];\n\n\n\t\t\t$db = Db::instance();\n\t\t\t$userTable = new UserTable($db);\n\t\t\t$user = $userTable->getUserByUsername($username);\n\n\t\t\t// Does the user exist?\n\t\t\tif (empty($user)) {\n\t\t\t\t$message = \"user '{$username}' does not exist\";\n\t\t\t}\n\t\t\t// Yes, Is the username full of spaces?\n\t\t\telse if(trim($username) == \"username param not set\") {\n\t\t\t\t$message = \"\";\n\t\t\t}\n\t\t\t//No, is the user already a moderator?\n\t\t\telse if($user['Type'] == \"Moderator\"){\n\t\t\t\t$message = \"user '{$username}' is already a moderator\";\n\t\t\t}\n\t\t\t//No, hooray?\n\t\t\telse\n\t\t\t{\n\t\t\t\t$okay = true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$message = 'username param not set';\n\t\t}\n\n\t\t$responseArray = array(\n\t\t\t'okay' => $okay,\n\t\t\t'message' => $message\n\t\t);\n\t\t$responseJson = json_encode($responseArray);\n\t\theader('Content-Type: application/json');\n\t\techo $responseJson;\t\t\n\t}", "title": "" }, { "docid": "38aed74ebe7e8ff0c90d3d7c896a93be", "score": "0.7876284", "text": "function is_moderator_admin( $moderator ) {\n $mod_admin = get_moderator_data( $moderator , 'mod_admin' );\n $mod_admin = (int) $mod_admin;\n\n if ($mod_admin == 1)\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "b032df9c9ad88b2bd8d202347c5f0bf7", "score": "0.7869005", "text": "public function isModerator(): bool{\n return $this->getModerator() != null;\n }", "title": "" }, { "docid": "048057005c022212ab12c7c2d3ad87f8", "score": "0.7785432", "text": "public function isModerator($idUser)\n {\n $query = $this->db->query('SELECT * FROM `moderator` WHERE id_users=\"' . $idUser . '\"');\n return $query->getResult();\n }", "title": "" }, { "docid": "27c95bd7d28df31489aad596f6bb9743", "score": "0.7708028", "text": "public function isModerator($user, $ability, $model = null)\n {\n return $user->id == 2;\n }", "title": "" }, { "docid": "bd6706720cd60f79ae00b1152825260e", "score": "0.75580287", "text": "private function moderator() {\n\t\t//Is the user logged in\n\t\tif ((!isset($_SESSION['username']) || $_SESSION['username'] == '')) {\n\t\t\theader('Location: '.BASE_URL .'/signup');\n\t\t}\n\t\t//Is the user a moderator\n\t\tif ((!isset($_SESSION['type']) || $_SESSION['type'] != 'Moderator')) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t}\n\t\t$title = \"Moderator\";\n\n\t\t$db = Db::instance();\n\t\t$usersTable = new UserTable($db);\n\t\t$moderatorRows = $usersTable->getModerators();\n\t\t$moderators = \"\";\n\t\twhile($moderator = $moderatorRows->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$moderators = $moderators . '<p><a href=\"' . BASE_URL . '/profile/' . $moderator['UserID']. '\">' . $moderator['Username'] . '</a></p>';\n\t\t}\n\t\tinclude_once SYSTEM_PATH . '/view/moderator.tpl';\n\t}", "title": "" }, { "docid": "25f46e576171e889c96b38af9f8bdfb5", "score": "0.75177217", "text": "function isAdminOrModerator()\n{\n return isAdmin() or isModerator();\n}", "title": "" }, { "docid": "8f45add2f854e8c6f92e0f634f39a118", "score": "0.7263886", "text": "function sb_has_moderator_permission(&$database,&$obj_sb_cat,$int_sb_uid,$bool_sb_isadmin) {\n\tif ($bool_sb_isadmin) \n\t\treturn 1; \n\tif ($obj_sb_cat!='' && $obj_sb_cat->getModerated() && $int_sb_uid != 0) {\n\t\t$database->setQuery('SELECT userid FROM #__sb_moderation WHERE catid='.$obj_sb_cat->getId());\n\t\t$modIDs=$database->loadResultArray();\n\t\tif (sizeof($modIDs) != 0 && in_array($int_sb_uid, $modIDs)) \n\t\t\treturn 1;\n\t}\n\treturn 0;\n}", "title": "" }, { "docid": "57d9ea16bf89bd43ae554cf9f9d75f6f", "score": "0.7057222", "text": "public function isModerator()\n {\n return $this->roles()->pluck('role_id')\n ->intersect(Role::ROLE_MODERATORS)->toArray();\n }", "title": "" }, { "docid": "a3d0252a6e3e5f054c1f2bc8e39e63b5", "score": "0.6907568", "text": "function isModerator()\n{\n return Session::get('is_moderator', function()\n {\n // Confirm if the user is an administrator.\n //\n $is_moderator = Auth::check() && Auth::user()->hasRole('Moderators');\n\n // Push the status to the session.\n //\n Session::put('is_moderator', $is_moderator);\n });\n}", "title": "" }, { "docid": "19efb37cc6ca83f43a590d29f8f6ac27", "score": "0.6897909", "text": "function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->type) == 3;\n }", "title": "" }, { "docid": "7149a312656d96d1775fd3ed272bf451", "score": "0.67626894", "text": "function is_admin($user_id, $group_id){\n $group = Group::find($group_id);\n $group_users = $group->users;\n foreach ($group_users as $member) {\n if ($member->id == $user_id) {\n //if owner or manager\n if($member->pivot->permission == 3 || $member->pivot->permission == 2){\n return 1;\n }\n }\n }\n return 0;\n }", "title": "" }, { "docid": "0ed8e81d102e2c2c44e8d58b92356c3c", "score": "0.6701352", "text": "private function canModerate(User $user)\n {\n return in_array('ROLE_ADMIN', $user->getRoles());\n }", "title": "" }, { "docid": "a0a715e380334c77e3b2e273cf2092cb", "score": "0.6691081", "text": "public static function moderator($module, $item = '') {\n if (self::$user['user'] === 'guest') {\n return FALSE;\n }\n $moderator = self::checkRight($module);\n if (!empty($item)) {\n $moderator = self::checkRight($module) || (self::$user['user'] === $item['author']) && ((time() - $item['time']) < 300);\n }\n return $moderator;\n }", "title": "" }, { "docid": "1fa8c55bd3842d8d2d86cfed478c774c", "score": "0.6671138", "text": "function is_manager()\n{\n return $user->uid == 0 ||\n (is_array($user->roles) && in_array('manager', $user->roles));\n}", "title": "" }, { "docid": "7a4977393758811db9b9f02307bf5b03", "score": "0.6643049", "text": "private function isUserAdmin()\n {\n $statement = $this->DB->prepare(\"SELECT contact_admin, contact_id FROM contact \" .\n \"WHERE contact.contact_id = :userId LIMIT 1\");\n $statement->bindValue(\":userId\", (int) $this->user_id, \\PDO::PARAM_INT);\n $statement->execute();\n $admin = $statement->fetchRow();\n $statement->closeCursor();\n if ($admin !== false && $admin[\"contact_admin\"]) {\n $this->is_admin = 1;\n } else {\n $this->is_admin = 0;\n }\n }", "title": "" }, { "docid": "3e0106f4535727b1cfa833b0b3dd83e7", "score": "0.6641897", "text": "function IsAdmin($user){\n\tAddActionLog(\"IsAdmin\");\n\tStartTimer(\"IsAdmin\");\n\n\tif($user === false){\n\t\tStopTimer(\"IsAdmin\");\n\t\treturn false;\n\t}\n\n\tif($user->Admin != 0){\n\t\tStopTimer(\"IsAdmin\");\n\t\treturn true;\n\t}else{\n\t\tStopTimer(\"IsAdmin\");\n\t\treturn false;\n\t}\n\n\tStopTimer(\"IsAdmin\");\n}", "title": "" }, { "docid": "7aeb844e18055f18c4b620b0bac5afd5", "score": "0.66298175", "text": "function isModLogin()\n {\n return auth('api')->user()->loginable->role == App\\Models\\Manager::ROLE_MOD;\n }", "title": "" }, { "docid": "2bb7d19da87f5f9685ce87496e9b6800", "score": "0.6592194", "text": "public function getModerator() {\n\t\treturn $this->moderator;\n\t}", "title": "" }, { "docid": "8e8d5a62aa4939dade8b9e95be9d14c1", "score": "0.65654474", "text": "public function isAdmin()\n {\n return $this->user_type == 'admin';\n }", "title": "" }, { "docid": "9964bc988d4d9c2bfa7e35d73cc17f50", "score": "0.65460384", "text": "function canSetAsInvited(User $user) {\n if($user instanceof User) {\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false;\n } else {\n return $user->isPeopleManager();\n } // if\n } else {\n return false;\n } // if\n }", "title": "" }, { "docid": "3bf6dbe332c481d37f6dc21df70cb259", "score": "0.65228856", "text": "public function isModerateActionAllowed($checkIsUserModerator = false) {\n if (!Framework::isSocialUser()) {\n return $this->getResponseObject(null, null, Config::getMessage(YOU_MUST_BE_LOGGED_PERFORM_THIS_ACTION_MSG));\n }\n if (!Framework::isSocialModerator() || ($checkIsUserModerator && !Framework::isSocialUserModerator())) {\n return $this->getResponseObject(null, null, Config::getMessage(DO_NOT_HAVE_PERMISSION_PERFORM_ACTION_MSG));\n }\n return true;\n }", "title": "" }, { "docid": "81cf9ccd36de7abe2770f2ff0b34f2ce", "score": "0.65092486", "text": "function canEdit(User $user) {\n return $user->isAdministrator();\n }", "title": "" }, { "docid": "d702ad4816c13c6620bf2183aaa3c30d", "score": "0.6505883", "text": "public function isAdmin($user, $ability, $model = null)\n {\n return $user->id == 1;\n }", "title": "" }, { "docid": "c31029766bd5ee22edb3701e5745a1d5", "score": "0.6504277", "text": "function is_user_group_admin($user = 0, $group = 0) {\n\tif (!$user) {\n\t\t$user = elgg_get_logged_in_user_entity();\n\t}\n\tif (!$group) {\n\t\t$user = elgg_get_page_owner_entity();\n\t}\n\t$list_mandats = elgg_get_entities(array(\n\t\t'type' => 'object',\n\t\t'subtype' => 'mandat',\n\t\t'container_guid' => $group->guid,\n\t));\n\tforeach ($list_mandats as $mandat) {\n\t\t$current_elected = elgg_get_entities_from_metadata(array(\n\t\t\t'type' => 'object',\n\t\t\t'subtypes' => 'elected',\n\t\t\t'metadata_name' => 'mandat_guid',\n\t\t\t'metadata_value' => $mandat->guid,\n\t\t\t'limit' => 1,\n\t\t));\n\t\tif ($user->guid == $current_elected[0]->owner_guid) return $current_elected[0];\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "a796d7192bbfe15e91687e874392513a", "score": "0.65009195", "text": "function is_mentor_by_id($user_id) {\n\t\t$query = \"SELECT * FROM mentor WHERE (user_id = '\".$user_id.\"')\";\n\t\tif($result = $this->query($query))\n\t\t\t if(mysql_num_rows($result) > 0)\n\t\t\t \treturn true;\n\t\t\t else\n\t\t\t \treturn false;\n\t}", "title": "" }, { "docid": "94ae246fae7f916f14a98fe989415e17", "score": "0.64812887", "text": "public function isAdmin(){\n\n $variable = $this->getValue(\"type\", \"officer\", \"username\", $this->user);\n if($variable == \"a\")\n return true;\n\n return false;\n }", "title": "" }, { "docid": "4aa2e5377f98acc0e197e79167a9b4b3", "score": "0.6468806", "text": "public function isAdmin()\n\t{\n\t\t$row = $this->userDAO->getUserByID($this->userID);\n\t\t\n\t\tif ($row['user_group_id'] == AC_USER_GROUP_ADMIN)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "2573c68c408d51fd8880e873ed8c2384", "score": "0.64618474", "text": "function isAdminUser()\n{\n $return = (Yii::app()->user->role == 'Admin') ? true : false;\n return $return;\n}", "title": "" }, { "docid": "e3bdb077c389c0ca9df5a1ea31fab26e", "score": "0.64586604", "text": "function is_admin() {\n\tglobal $con;\n\n\t$uid = mysqli_real_escape_string($con, $_SESSION['uid']);\n\t$getuser = mysqli_query($con,\"SELECT * FROM users WHERE id='$uid'\");\n\t$gu = mysqli_fetch_array($getuser);\n\n\t// Check if the permission id is 1, if not the user is not admin\n\t// NOTE: this means that you shouldn't change the id of the admin rank (or the name)\n\tif($gu['permission'] != \"1\") {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "e3e2ba67377c271432d7d023c3f0a7b1", "score": "0.6439508", "text": "public function isAdmin()\n {\n $lecturer = Lecturer::find($_SESSION['user']);\n\n if($lecturer->role == '3')\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d74020d6db6ec9f2c8080fc48211923e", "score": "0.64382255", "text": "function isAdmin($userId, $chatId): bool\n{\n global $Bot;\n\n $chatMember = $Bot->getChatMember([\n \"chat_id\" => $chatId,\n \"user_id\" => $userId\n ]);\n if (!is_null($chatMember) && in_array($chatMember->status, [\"administrator\", \"creator\"])) {\n return in_array($chatMember->status, [\"administrator\", \"creator\"]);\n }\n return false;\n}", "title": "" }, { "docid": "3eb314d114fbba3ba947347008d2abf1", "score": "0.64339805", "text": "public function show(User $moderator)\n {\n //\n }", "title": "" }, { "docid": "443522f105ff2a9cd7f5d89e3be0d5ee", "score": "0.6432985", "text": "function isModerationEnabled(){\n\t\t\t$status = trim($this->smiletagConfig['enable_moderation']);\n\t\t\tif(strtolower($status) == 'true'){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6b7a030e7200f29d4e61f58cff0095ac", "score": "0.6419776", "text": "public function manage(User $user)\n {\n return $user->isAdmin() || $user->isSupervisor();\n }", "title": "" }, { "docid": "6379cec69cc4a4c5fc18bcc754c50ccb", "score": "0.6409564", "text": "function isAdmin($userid = 0) {\n\t\tif(!$userid)\n\t\tif($this->group->type >= 3)\n\t\treturn TRUE;\n\t\telse\n\t\treturn FALSE;\n\n\t\t$u = $this->db->getRow(\"SELECT `username`,`banned` FROM `\".APP_PREFIX.\"users` WHERE `userid` = ?i\", $userid);\n\t\t$group = $this->getGroup($userid);\n\t\tif($group->type >= 3)\n\t\treturn TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "b36978df80adf25df4d03d345c56cd0f", "score": "0.6408283", "text": "public function isAdmin(){\n return ($this->userlevel == ADMIN_LEVEL ||\n $this->username == ADMIN_NAME);\n }", "title": "" }, { "docid": "527e7027ba65f46d120174114556286c", "score": "0.6406767", "text": "function canEdit(User $user) {\n if($user instanceof User) {\n return $user->is($this) || $user->isPeopleManager();\n } else {\n return false;\n } // if\n }", "title": "" }, { "docid": "777c35a38645f9e1c44a391b3f7fc759", "score": "0.6405046", "text": "public function index(User $user)\n {\n return $user->is_moderator\n || $user->subscribed();\n }", "title": "" }, { "docid": "57c7a13516cb7ecee071b1aff8f65b63", "score": "0.63984233", "text": "public static function isAdmin()\n {\n return \\Craft\\craft()->getUser()->isAdmin();\n }", "title": "" }, { "docid": "3bbb763364db7ec8d7e71cec106cbabc", "score": "0.6396812", "text": "public function isAdmin()\n {\n return $this->user_info['type'] === self::ADMIN;\n }", "title": "" }, { "docid": "0f020afb37767aa7dd325c44097ba0cf", "score": "0.6389129", "text": "public function lock(User $user, Thread $thread)\n {\n return $user->is_moderator;\n }", "title": "" }, { "docid": "2d62c1f372971b696cbf1d258a037e1f", "score": "0.638383", "text": "function check_admin_user($user_type) \n{\n\n if (isset($_SESSION['admin_user']) & $user_type == 'Administrator') \n {\n return true;\n } \n else \n {\n return false;\n }\n}", "title": "" }, { "docid": "4648dde11a9ccfd436e233fa9f8a6f54", "score": "0.63747954", "text": "public function isEditingAsUserAllowed(): bool;", "title": "" }, { "docid": "040057b61135db4ee27828c8f5f990bc", "score": "0.6371972", "text": "public function isAdmin()\n {\n return $this->role === 2;\n }", "title": "" }, { "docid": "40777d98e2a2fa321e4e3177685f3800", "score": "0.6357286", "text": "function isAdmin() {\n if (isset($_SESSION['user']) && $_SESSION['user']['user_type']== 'admin') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "448fe1679b9d3d7c78ddb24e4ea16391", "score": "0.6353257", "text": "function is_administrator()\n{\n return is_array($user->roles) && in_array('administrator', $user->roles);\n}", "title": "" }, { "docid": "3b6e64ae13b80b58775ee758cb4b6f9d", "score": "0.6348409", "text": "public function myModerator() {\n\t}", "title": "" }, { "docid": "dd3235a3411e62d10ff11e19a8321efa", "score": "0.6338102", "text": "public function isAdmin(User_Model_User $user) {\n if (!$user->getIdentity() || empty($user->level_id)) {\n return false;\n }\n\n // Check level\n $level = Engine_Api::_()->getItem('authorization_level', $user->level_id);\n if ($level->type == 'admin' || $level->type == 'moderator') {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "01cfbdd7e4a92f15f032c5a3ffa1c660", "score": "0.6336824", "text": "public function isAdmin()\n {\n $user = $this->getUser();\n if (isset($user->level) && $user->level == \"Admin\") {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a48efe7da7ecfa61c63ec6ab14d1c04e", "score": "0.63335127", "text": "public function isAdministrator()\n {\n return $this->role->id == 1;\n }", "title": "" }, { "docid": "e6915348165507a1fd4b5f39d5686af3", "score": "0.63261527", "text": "function is_advanced_user($userid = 0)\n{\n if ($userid == 0 && @isset($_SESSION['user_id'])) {\n $userid = $_SESSION[\"user_id\"];\n }\n\n // Admins are experts\n if (is_admin($userid)) {\n return true;\n }\n\n // Certain users are experts\n $advanceduser = get_user_meta($userid, \"advanced_user\");\n if ($advanceduser == 1) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "3703aeae4de65398fe273bf60b2e0d13", "score": "0.63219243", "text": "public function isAdmin()\n {\n return $this->id == 1;\n }", "title": "" }, { "docid": "8354f0ac698ca6e549d51774c4e4fdce", "score": "0.6321765", "text": "function isLawfirmAdmin( $user_id )\r\n {\r\n // Check is current user is trainer\r\n $is_trainer = UserAccess::model()->countByAttributes(\r\n array(\r\n 'user_id'=> $user_id,\r\n 'access_type'=> 'LFA',\r\n 'is_deleted'=> 0,\r\n 'lawfirm_id'=> 0, )\r\n );\r\n return $is_trainer ? true : false;\r\n }", "title": "" }, { "docid": "ebf5de3c28050215b69cd384642ee911", "score": "0.6320078", "text": "function isAdminUser(){\n\treturn isset($_SESSION['USER']) && $_SESSION['ADMIN'] == 'Y';\n}", "title": "" }, { "docid": "8493067145bc0bb014b177e9abdfb43a", "score": "0.631601", "text": "function isAdmin()\n{\n\tif (isset($_SESSION['user'])&& $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "369a30e4e08f164758ff900e2b30022a", "score": "0.6308469", "text": "public static function currentUserIsAdmin() {\n $cu = self::getCurrentUser();\n return $cu->getRole() == 'administrator';\n }", "title": "" }, { "docid": "5c1c1e32a1127f8d3374a6b0bf54909e", "score": "0.629933", "text": "function isAdmin(){\n\t\t\t$ses = $_SESSION;\t\n\t\t\t$usr = $this->db->getUsersInfo($ses['id']);\t\t\t\t\n\t\t\tif ($usr['UserType'] == '6' || $usr['UserType'] == '5'){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "7c9394b65449843baccf269f0df10fca", "score": "0.62992543", "text": "function isAdmin(){\n if (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin'){\n return true;\n }else{\n return false; \n }\n}", "title": "" }, { "docid": "3970d029c6dc58f60f2dcaf6b1717698", "score": "0.62964696", "text": "private function wf_user_permission(){\n\t\t$current_user = wp_get_current_user();\n\t\t$user_ok = false;\n\t\tif ($current_user instanceof WP_User) {\n\t\t\tif (in_array('administrator', $current_user->roles) || in_array('shop_manager', $current_user->roles)) {\n\t\t\t\t$user_ok = true;\n\t\t\t}\n\t\t}\n\t\treturn $user_ok;\n\t}", "title": "" }, { "docid": "4d245ac92cccbe0162e8576bc1bbd25d", "score": "0.6279082", "text": "public function isAdminManager()\r\n {\r\n if ($this->Session->read('Auth.User.user_group_id') == '1' || $this->Session->read('Auth.User.user_group_id') == '2') {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "c9a45d5cf7b304d8314fad9084322035", "score": "0.62788874", "text": "function is_admin() {\n\t\treturn(user_access($this->get_constant(\"PERM_ADMIN\")));\n\t}", "title": "" }, { "docid": "9500a435f99c064932493136b078dfc0", "score": "0.6277319", "text": "public function userCanEditAndDelete() {\n\t\tglobal $profile_isAdmin;\n\n\t\tif (!is_object(icms::$user)) return false;\n\t\tif ($profile_isAdmin) return true;\n\t\treturn $this->getVar('poster_uid', 'e') == icms::$user->getVar('uid');\n\t}", "title": "" }, { "docid": "495eec3f5c3e59f0d727bec8b4635d98", "score": "0.62705517", "text": "public function isAdmin()\n {\n if ($this->id == 1)\n return true;\n return false;\n }", "title": "" }, { "docid": "a9760c4aa24fa0f4b9d4631412618263", "score": "0.6256721", "text": "function IsAdmin() {\n return ( $this->logged_in && $this->AllowedTo(\"Admin\") );\n }", "title": "" }, { "docid": "a328330f0f9a3aab3b35148614d6069e", "score": "0.62506217", "text": "function is_mod($id) {\n\t$sql = \"SELECT * FROM `mods` WHERE `mods`.`mod_id` = '\".$id.\"'\";\n\tif(!$result = $GLOBALS['db']->query($sql)){\n\t die(\"Database error! (is_mod)\");\n\t}\n\twhile($row = $result->fetch_assoc()){\n\t\tif($row['banned'] == \"0\") {\n\t\t\treturn true;\n\t\t} elseif($row['banned'] == \"1\") { \n\t\t\tdie(\"You are banned from moderation.\");\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "fd3173063045cba7881fb20200e9dbc6", "score": "0.624598", "text": "function check_if_user_can_post($user = null) {\n $whocanpost = trim(elgg_get_plugin_setting('voucher_uploaders', 'vouchers'));\n\t\n if (elgg_is_logged_in()) {\n if ($whocanpost === 'allmembers') {\n return true;\n }\n else if ($whocanpost === 'admins') {\n if (!$user) $user = elgg_get_logged_in_user_entity();\n if ($user->isAdmin()) {\n return true;\n } \n }\n }\n \n return false;\n}", "title": "" }, { "docid": "9a55cb5a6aacb898016ae4e702608705", "score": "0.6237995", "text": "function is_user_admin( $id = null ){\n\tif( is_null( $id ) )\n\t\tif( is_user_online() )\n\t\t\t$id = get_currentuserid();\n\t\telse\n\t\t\treturn false;\n\n\n\tif( get_userrole( $id ) == 'Administrateur' )\n\t\treturn true;\n\treturn false;\n}", "title": "" }, { "docid": "e748e3244b1f6aada0e0c95dd00f821a", "score": "0.62335056", "text": "public function isResponsible($user) {\n return $this->author==$user || $this->inspector==$user;\n }", "title": "" }, { "docid": "fd995295b337efa1fa808399c3d145c7", "score": "0.62241477", "text": "protected function isMemberEditable(){\n $reply = $this->isWritable() || (is_object(bAuth::$av) && (bAuth::$av->ID == $this->rec['lm_key']));\n $this->dbg($reply);\n return $reply;\n }", "title": "" }, { "docid": "5e273dbf44aca1c2df923a5efc45e612", "score": "0.62173593", "text": "function is_admin($user) {\n\tglobal $log;\n\tif (empty($user) || !is_object($user)) {\n\t\treturn false;\n\t}\n\t$log->debug('> is_admin ' . $user->user_name);\n\n\tif ($user->is_admin == 'on') {\n\t\t$log->debug('< is_admin');\n\t\treturn true;\n\t} else {\n\t\t$log->debug('< is_admin');\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "61e2a50ca7cbd1e6939375b5c8edc622", "score": "0.6216721", "text": "function isUserAdmin(){\n\t\tif (isset($_SESSION[\"CURR_USER_AUTH\"])){\n\t\t\tif($_SESSION[\"CURR_USER_AUTH\"]==\"admin\")\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "09faf5b557ff72c43e40be4948a50ed1", "score": "0.62132436", "text": "function get_moderator( $mod_id ) {\n $mod_id = (int) $mod_id;\n $moderator = E_Moderator::get_instance( $mod_id );\n return $moderator;\n}", "title": "" }, { "docid": "72c6d9263f93856cf089ecab7b7e2d75", "score": "0.62080574", "text": "function isAdmin(User $user)\n{\n if ($user->is_admin) {\n return true;\n }\n\n if (in_array($user->stu_num, config('oldbook.admin.stu_num'))) {\n return true;\n }\n\n if (in_array($user->id, config('oldbook.admin.ids'))) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "1b286ca8fa9ad057a9cee03177493f66", "score": "0.6205963", "text": "public function isAdmin()\r\n {\r\n if ($this->Session->read('Auth.User.user_group_id') == '1') {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "d96808c3829be178f6a41a119a7c4ee7", "score": "0.62006164", "text": "public function isAdmin()\n {\n if ($this->permission->id === 1)\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "12efdd087cd776c8ad5bc3bb831ad760", "score": "0.6197644", "text": "function is_readonly_user($userid = 0)\n{\n if ($userid == 0 && @isset($_SESSION['user_id'])) {\n $userid = $_SESSION['user_id'];\n }\n\n // Admins are always read/write\n if (is_admin($userid) == true) {\n return false;\n }\n\n // Certain users are experts\n $readonlyuser = get_user_meta($userid, \"readonly_user\");\n if ($readonlyuser == 1) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "c5aa9c0250dc1e101495cb2e8d8df5c4", "score": "0.6197053", "text": "public function administrador()\n {\n return $this->tipo === 'Administrador';\n }", "title": "" }, { "docid": "57eaddc466a6f8160a3fc424b972dff7", "score": "0.6190593", "text": "function is_adminID($userID) {\n\tif (empty($userID) || !is_numeric($userID) || $userID<1) {\n\t\treturn false;\n\t}\n\trequire_once 'modules/Users/Users.php';\n\t$privs = UserPrivileges::privsWithoutSharing($userID);\n\treturn $privs->isAdmin();\n}", "title": "" }, { "docid": "a228873f80015f30c7a4662b8ae6cf89", "score": "0.61894226", "text": "public function isAdmin(){\n\t\tif(!Yii::app()->user->isGuest){\n\t\t\t$user = $this->loadUser(Yii::app()->user->id);\n\t\t\treturn $user->roles == \"admin\";\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t }", "title": "" }, { "docid": "17f253acea94fa2ec55121767fdd59ff", "score": "0.61822796", "text": "function is_mentee_by_id($user_id) {\n\t\t$query = \"SELECT * FROM mentee WHERE (user_id = '\".$user_id.\"')\";\n\t\tif($result = $this->query($query))\n\t\t\tif( mysql_num_rows($result) > 0)\n\t\t\t\treturn true;\n\t\t\telse return false;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "819749a4f62a08e485c059d47255b974", "score": "0.6181911", "text": "public function is_admin() {\n $id = \\Auth::user()->id;\n $user = Users::where('id',$id)->first();\n if(isset($user->user_type) and $user->user_type ==1){\n session()->put('adminInfo', $user);\n return 1;\n }else{\n session()->put('userInfo', $user);\n return 0;\n }\n }", "title": "" }, { "docid": "ecf6cf0cc2fe036a98dd17d742f187e0", "score": "0.6177283", "text": "public function isAdmin(){\n //Return true als de gebruiker wel een administrator is\n if($this->isLoggedIn()){\n if($_SESSION['role_id']==2)return true;\n }\n return false;\n }", "title": "" }, { "docid": "3b656508124980e649af2bce60649e6d", "score": "0.6174819", "text": "function add_moderator_role()\n{\n add_role('moderator', 'Moderator', array('manage_options' => true));\n}", "title": "" }, { "docid": "428c9d18c23a69ad41c12b1c0134b14a", "score": "0.6162321", "text": "function isAdmin()\n {\n return ($this->admin == 1 || in_array(JX_GRP_ADMIN,$this->groupIds));\n }", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.6154059", "text": "public function isAdmin();", "title": "" }, { "docid": "18b4ecfb314482d2ba0d09dc2f9ae8bc", "score": "0.6152245", "text": "function mc_edit_permission_check() {\n global $current_user, $profileuser;\n \n $screen = get_current_screen();\n \n get_currentuserinfo();\n \n if( ! is_super_admin( $current_user->ID ) && in_array( $screen->base, array( 'user-edit', 'user-edit-network' ) ) ) { // editing a user profile\n if ( is_super_admin( $profileuser->ID ) ) { // trying to edit a superadmin while less than a superadmin\n wp_die( __( 'You do not have permission to edit this user.' ) );\n } elseif ( ! ( is_user_member_of_blog( $profileuser->ID, get_current_blog_id() ) && is_user_member_of_blog( $current_user->ID, get_current_blog_id() ) )) { // editing user and edited user aren't members of the same blog\n wp_die( __( 'You do not have permission to edit this user.' ) );\n }\n }\n \n}", "title": "" }, { "docid": "5be61e8a702aef74f36ec8d216def9ee", "score": "0.6141058", "text": "public function update(User $user) {\n return $user->isType(\"manager\") || $user->isType(\"admin\");\n }", "title": "" }, { "docid": "a424aad23d73c348fe48b6dc7b7243a0", "score": "0.6138788", "text": "public static function is_admin();", "title": "" }, { "docid": "401525cbb9aa3611829d7bcce2282b06", "score": "0.6129154", "text": "public function isAdmin(){\n\t\t$session = Yii::$app->getSession();\n\t\tif($session->get('role_id')==1)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2c697dff3b9062aa1edde52d0186ce5b", "score": "0.61256313", "text": "public function is_admin() {\n\t\treturn current_user_can('administrator');\n\t}", "title": "" }, { "docid": "ff51ab6f55458c024da73e9cd5e22e1c", "score": "0.6117535", "text": "public function is_admin(){\n $role = $this->role; // uzmi sta pise u role koloni 'users' tabele \n if($role == 'admin'){ // ako je admin vrati true\n return true;\n } \n // ako nije admin vrati false\n return false;\n }", "title": "" }, { "docid": "2de6a492698470a95d4b65ba8bd70259", "score": "0.61167794", "text": "public function isAdmin() {\n\t // Admin and Developers can access every action\n\t\t$this->loadModel('UsersRole');\n\t if ( $this->UsersRole->find('first', array('conditions'=>array('UsersRole.user_id'=>$this->Auth->user('id'),'UsersRole.role_id'=>'1')))) {\n\t\t return true;\n\t }\n\n\t // Default deny\n\t return false;\n\t}", "title": "" }, { "docid": "e4821d1262121f52bcf4dbadc5183c42", "score": "0.61121535", "text": "public function isAdmin()\n\t{\n\t\treturn ($this->role == \"admin\");\n\t}", "title": "" }, { "docid": "f93beeddcc9dd64777abc2eae28ffde7", "score": "0.6106707", "text": "protected function isAdmin() {\n $account = $this->currentUser;\n return ($account->hasPermission('administer formset') || $account->hasPermission('edit any formset'));\n }", "title": "" }, { "docid": "80da9f7ec3ae3291113ea488bcb83d9f", "score": "0.6103506", "text": "public function isUser()\n {\n return $this->role_id == Role::USER;\n }", "title": "" }, { "docid": "47e4321fb798108154bea08b27fffb66", "score": "0.6099819", "text": "function show_all_to_admin_or_one_to_user( int $user_id ) {\n if ( is_admin() || $_SESSION['auth']['id'] == $user_id ) {\n return true;\n }\n return false;\n}", "title": "" } ]
867eedfba57217f6be8f2ebf4bcfd072
Add a user to the party.
[ { "docid": "a1a9e2e81fb92ea2f1e147e253f4fa66", "score": "0.61954015", "text": "public function addUser(Model $user){\n $this->users()->attach($user->id);\n $this->touch();\n }", "title": "" } ]
[ { "docid": "54334bbd91254d25af4982ac4438b242", "score": "0.75932986", "text": "public function add($user);", "title": "" }, { "docid": "b8e66db96c68d3c92061343e65bf9e77", "score": "0.74402755", "text": "public function addUser($user) {\n \n }", "title": "" }, { "docid": "fd0e9572c472ee54ce80223f6d7ff14c", "score": "0.7347823", "text": "private function add_existing_user() {\n\t\t\n\t}", "title": "" }, { "docid": "382b9419459d4d84bc0bfa1d7d625b3c", "score": "0.7247128", "text": "private function add_new_user() {\n\t\t\n\t}", "title": "" }, { "docid": "61052675d2de3c0530150980dc70e938", "score": "0.71834975", "text": "private function addUser()\n {\n if (!$this->confirm('Do you want to assign this role to a user?')) return;\n\n $userID = $this->ask('What is the user\\'s ID?');\n $this->userExists($userID);\n\n $this->attachRole();\n }", "title": "" }, { "docid": "e6622889dae0fe3fdc4fc4adf8cd0e90", "score": "0.7147464", "text": "public function addUser($userId, $owningBusinessUnitId = null);", "title": "" }, { "docid": "2b2bbc0cb296c5517e80b40cc7caa661", "score": "0.6979453", "text": "public function addUser()\n {\n $project = $this->getProject();\n $values = $this->request->getValues();\n\n if (empty($values['user_id']) && ! empty($values['external_id']) && ! empty($values['external_id_column'])) {\n $values['user_id'] = $this->userModel->getOrCreateExternalUserId($values['username'], $values['name'], $values['external_id_column'], $values['external_id']);\n }\n\n if (empty($values['user_id'])) {\n $this->flash->failure(t('User not found.'));\n } elseif ($this->projectUserRoleModel->addUser($values['project_id'], $values['user_id'], $values['role'])) {\n $this->flash->success(t('Project updated successfully.'));\n } else {\n $this->flash->failure(t('Unable to update this project.'));\n }\n\n $this->response->redirect($this->helper->url->to('ProjectPermissionController', 'index', array('project_id' => $project['id'])));\n }", "title": "" }, { "docid": "ace35fc6060a9ac54949353aa8750326", "score": "0.6925827", "text": "function addUser($user) {\n\n\t\t// Create a random salt\n\t\t$user->salt = hash('sha512', uniqid(mt_rand(1, mt_getrandmax()), true));\n\t\t// Create salted password (Careful not to over season)\n\t\t$password = hash('sha512', $user->password.$user->salt);\n\t\t \n\t\t// Add your insert to database script here. \n\t\t// Make sure you use prepared statements!\n\t\t/*if ($insert_stmt = $mysqli->prepare(\"INSERT INTO members (username, email, password, salt) VALUES (?, ?, ?, ?)\")) { \n\t\t $insert_stmt->bind_param('ssss', $username, $email, $password, $random_salt); \n\t\t // Execute the prepared query.\n\t\t $insert_stmt->execute();\n\n\t\t} */\n\t}", "title": "" }, { "docid": "acbd86ddfff152e79a45d5d2bc08eb7d", "score": "0.68772465", "text": "public static function addUser(){\n\t\ttry {\n\t\t\t$pdo = Database::setPDO();\n\t\t\t$stmt = $pdo->prepare(\"insert into user(fullname,username,password,join_date) values (?,?,?,?)\");\n\t\t\t$stmt -> execute(array($this->getFullname(),$this->getUsername(),$this->getPassword(),$this->getDateJoin()));\t\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "820a47f3928d7dca91049ed2265675ac", "score": "0.6827907", "text": "public function add(UserInterface $user);", "title": "" }, { "docid": "3e7948ffe7ecae13734f04ecae842adc", "score": "0.67694616", "text": "public function addUser(User $user)\n {\n $this->listOfUsers[] = $user;\n }", "title": "" }, { "docid": "4bb3d92234a14210b510b0d4ef6b0e2e", "score": "0.67060584", "text": "function addUsers(){}", "title": "" }, { "docid": "94196b72d8a770442ed1b90245d324e3", "score": "0.6660076", "text": "function hipchat_rules_add_user_to_room_action($room_id_or_name, $user_id_or_email) {\n hipchat_add_user_to_room($room_id_or_name, $user_id_or_email);\n}", "title": "" }, { "docid": "3187f51dac43e691b5d66f2dbf88eafa", "score": "0.66577876", "text": "public function addUser()\n {\n //first, check the user with recaptcha API (return true if success)\n if ($this->recaptcha()) {\n //check if the form had been fully completed\n if (!empty($_POST['userPseudo']) && !empty($_POST['userMail']) && !empty($_POST['userPass'])) {\n //instantiate a new user object for DB submission\n $newUser = new User($_POST);\n\n $userManager = new UserManager();\n $addUserOk = $userManager->addUser($newUser);\n\n // if the user is added\n if ($addUserOk) {\n $user = $this->getUser();\n $this->setMessage('Merci, vous êtes maintenant inscrit.', 'front-modal');\n $this->setAuthentificated($user);\n header('Location:'.$_SERVER['PHP_SELF']);\n } else { //if adding failed (mail aldready registred on db (unique index on db))\n $this->setMessage('Email déjà enregistré.', 'reg');\n header('Location:'.$_SERVER['PHP_SELF']);\n }\n }\n } else { //recaptcha return false\n $this->setMessage('Connexion impossible, merci de compléter tout les champs', 'auth');\n header('Location:'.$_SERVER['PHP_SELF']);\n }\n }", "title": "" }, { "docid": "f56f415f70735bf2bc93521e538f111c", "score": "0.66319954", "text": "private function onAddUser()\r\n {\r\n /* Bail out if the user doesn't have SA permissions. */\r\n if ($this->_realAccessLevel < ACCESS_LEVEL_SA)\r\n {\r\n CommonErrors::fatal(COMMONERROR_PERMISSION, $this);\r\n return;\r\n //$this->fatal(ERROR_NO_PERMISSION);\r\n }\r\n\r\n $firstName = $this->getTrimmedInput('firstName', $_POST);\r\n $lastName = $this->getTrimmedInput('lastName', $_POST);\r\n $email = $this->getTrimmedInput('email', $_POST);\r\n $username = $this->getTrimmedInput('username', $_POST);\r\n $accessLevel = $this->getTrimmedInput('accessLevel', $_POST);\r\n $password = $this->getTrimmedInput('password', $_POST);\r\n $retypePassword = $this->getTrimmedInput('retypePassword', $_POST);\r\n $role = $this->getTrimmedInput('role', $_POST);\r\n $eeoIsVisible = $this->isChecked('eeoIsVisible', $_POST);\r\n\r\n $users = new Users($this->_siteID);\r\n $license = $users->getLicenseData();\r\n\r\n if (!$license['canAdd'] && $accessLevel > ACCESS_LEVEL_READ)\r\n {\r\n // FIXME: Shouldn't be a fatal, should go to ugprade\r\n $this->fatal(\r\n 'You have no remaining user account allotments. Please upgrade your license or disable another user.'\r\n );\r\n }\r\n\r\n /* Bail out if any of the required fields are empty. */\r\n if (empty($firstName) || empty($lastName) || empty($username) ||\r\n empty($accessLevel) || empty($password) || empty($retypePassword))\r\n {\r\n CommonErrors::fatal(COMMONERROR_MISSINGFIELDS, $this, 'Required fields are missing.');\r\n }\r\n\r\n /* Bail out if the two passwords don't match. */\r\n if ($password !== $retypePassword)\r\n {\r\n CommonErrors::fatal(COMMONERROR_NOPASSWORDMATCH, $this, 'Passwords do not match.');\r\n }\r\n\r\n /* If adding an e-mail username, verify it is a valid e-mail. */\r\n if (strpos($username, '@') !== false && !eregi(\"^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,4})$\", $username))\r\n {\r\n CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'Username is in improper format for an E-Mail address.');\r\n }\r\n\r\n /* Make it a multisite user name if the user is part of a hosted site. */\r\n $unixName = $_SESSION['CATS']->getUnixName();\r\n if (strpos($username, '@') === false && !empty($unixName))\r\n {\r\n $username .= '@' . $_SESSION['CATS']->getSiteID();\r\n }\r\n\r\n /* Bail out if the specified username already exists. */\r\n if ($users->usernameExists($username))\r\n {\r\n CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'The specified username already exists.');\r\n }\r\n\r\n $userID = $users->add(\r\n $lastName, $firstName, $email, $username, $password, $accessLevel, $eeoIsVisible\r\n );\r\n\r\n /* Check role (category) to make sure that the role is allowed to be set. */\r\n $modules = ModuleUtility::getModules();\r\n foreach ($modules as $moduleName => $parameters)\r\n {\r\n $moduleCategories = $parameters[MODULE_SETTINGS_USER_CATEGORIES];\r\n\r\n if ($moduleCategories != false)\r\n {\r\n foreach ($moduleCategories as $category)\r\n {\r\n if ($category[1] == $role)\r\n {\r\n /* index 3 is the user level required to assign this type of category. */\r\n if (!isset($category[3]) || $category[3] <= $this->_realAccessLevel)\r\n {\r\n /* Set this category. */\r\n $users->updateCategories($userID, $role);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if ($userID <= 0)\r\n {\r\n CommonErrors::fatal(COMMONERROR_RECORDERROR, $this, 'Failed to add user.');\r\n }\r\n\r\n if (!eval(Hooks::get('SETTINGS_ON_ADD_USER'))) return;\r\n\r\n osatutil::transferRelativeURI(\r\n 'm=settings&a=showUser&userID=' . $userID\r\n );\r\n }", "title": "" }, { "docid": "c19900179bc5f438d96ee69c04ecd023", "score": "0.65801895", "text": "private function addUser() : void\r\n {\r\n // Set required $_POST fields\r\n $this->setReq('username', 'password', 'rpassword');\r\n\r\n // Check if all required items are posted\r\n // Fail if not\r\n if (!$this->checkReq()) {\r\n\r\n $this->insertLog('Users', 'Add', 'Adding new user failed, required fields are not set. By '.user());\r\n return;\r\n }\r\n\r\n // Set variables\r\n $username = htmlentities($_POST['username']);\r\n $password = $_POST['password']; // No need for checking entities because of hash\r\n\r\n // Check if the username is unique\r\n // Fail if not\r\n if ($this->countUserByUsername($username) != 0) {\r\n\r\n $this->insertLog('Users', 'Add', 'Adding new user failed, username '.$username.' not unique. By '.user());\r\n return;\r\n }\r\n\r\n // Hash password\r\n $password = hash('whirlpool', $this->salt.$password);\r\n\r\n // Insert user\r\n if ($this->insertUser($username, $password) == 1) {\r\n\r\n // Succes\r\n $this->insertLog('Users', 'Add', 'Added new user: '.$username.' with ID '.$this->getUserByUsername($username)['id'].'. By '.user());\r\n \r\n } else {\r\n\r\n // Failed\r\n $this->insertLog('Users', 'Add', 'Failed to add new user: '.$username. ' by '.user());\r\n }\r\n }", "title": "" }, { "docid": "253fefa922e992696f8d229c99fade69", "score": "0.65748996", "text": "public function addUser($username, $password, $privileges = 0)\n {\n return $this->request('/bot/users', 'POST', json_encode(array('username' => $username, 'password' => $password, 'privileges' => $privileges)));\n }", "title": "" }, { "docid": "91f2a8632f1f79ab3aa62bf0830a82f2", "score": "0.6571503", "text": "public function addUser() {\n $this->display();\n }", "title": "" }, { "docid": "90220a0e319cd1f534bcec584b1dbc68", "score": "0.6570561", "text": "function user_add($data)\n{\n\tif (user_find($data[0],NULL))\n\t\treturn false;\n\n\t$GLOBALS[\"users\"][] = $data;\n\treturn _saveUsers();\n}", "title": "" }, { "docid": "d63fd469db9f9720711b3b265b482c1c", "score": "0.65622234", "text": "public function addUser(User $user)\n {\n $this->getUsers()->add($user);\n }", "title": "" }, { "docid": "3e598d8cfa2bbb217267f032faa2e5e1", "score": "0.6562159", "text": "public function addUser(AccessSchemeInterface $scheme, $user_id, array $sections = []);", "title": "" }, { "docid": "2ecbc929cb66f712022dd8d72c4e9bc8", "score": "0.6546265", "text": "public function addCredentials(User $user): void;", "title": "" }, { "docid": "4f1752b94a36c2e40bca2276ec20ef68", "score": "0.6536932", "text": "public function addPlayer(User $player): void\n {\n $this->players[] = $player;\n }", "title": "" }, { "docid": "ba4ed6ee3f3489a0aa2589000b0899d4", "score": "0.64910406", "text": "public function addUser($user_id, $sections = array());", "title": "" }, { "docid": "8c35f60c5f4a9af983462f5c6bbd7e94", "score": "0.64590573", "text": "public function addUser($data){\t\t\n\t\t\n }", "title": "" }, { "docid": "2d9ad9d7b10bab1be0810b5ffbbb9fef", "score": "0.64500266", "text": "public function addUser($user)\n\t{\n\t\ttry\n\t\t{\n\t\t\treturn $this->add($user);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "694394fa65076099bc6434c41f8d73f7", "score": "0.64195067", "text": "public function addUser($user)\n {\n $stmt = $this->database->prepare('INSERT INTO users (firstname, lastname, email, password) VALUES (:firstname, :lastname, :email, :password)');\n $stmt->bindValue('firstname', $user->getFirstname(), PDO::PARAM_STR);\n $stmt->bindValue('lastname', $user->getLastname(), PDO::PARAM_STR);\n $stmt->bindValue('email', $user->getEmail(), PDO::PARAM_STR);\n $stmt->bindValue('password', password_hash($user->getPassword(), PASSWORD_DEFAULT), PDO::PARAM_STR);\n $stmt->execute();\n }", "title": "" }, { "docid": "feb2bc2abc02912fd03c9f4993f2296e", "score": "0.6418185", "text": "function addUser(User $user) {\n\t\tglobal $db;\n\t\t\n\t\t$db->execute(\"\n\t\t\tINSERT INTO `group_user` SET\n\t\t\t\tuser_id = {$user->id},\n\t\t\t\tgroup_id = {$this->id}\n\t\t\");\n\t}", "title": "" }, { "docid": "9eafbc842d20396cb5ce6e9ad45af5b8", "score": "0.6360517", "text": "public function addFriend(User $user)\n {\n $this->friend()->attach($user->id);\n }", "title": "" }, { "docid": "a5cc4fede29ed44ff021922eb571372c", "score": "0.63536793", "text": "function eventAddUser(){\n\t\tif(!security::hasAccess(\"Edit Users\"))\n\t\t\treturn;\n\n\t\t$password1 = $this->getData(\"password\");\n\t\t$password2 = $this->getData(\"password2\");\n\t\t$username = $this->getData(\"username\");\n\n\t\t$user = new user();\n\t\t$result = $user->register($username, $password1, $password2);\n\t\t$this->newuserResult = $result;\n\t\t//echo(\"here! $this->newuserResult <br />\");\n\t\tif($result == user::REGISTER_OK) {\n\t\t\t$user->email = $this->getData(\"email\");\n\t\t\t$user->usergroup = $this->getData(\"usergroup\");\n\t\t\t$user->save();\n\t\t}\n\t}", "title": "" }, { "docid": "66c41d4fd957fd391df8a6400bc7e324", "score": "0.63402873", "text": "public function addMoney($user, $amount) {\r\n\t\t// database stuff\r\n\t}", "title": "" }, { "docid": "835648f65ab0c333fc91338b400c930d", "score": "0.6333885", "text": "public function addUser()\n {\n self::$userCount += 1;\n self::$users->setAttribute(\"count\", self::$userCount);\n foreach (self::$userFile->childNodes as $root) {\n $root->appendChild($this->asXML());\n }\n self::saveUsers();\n }", "title": "" }, { "docid": "f131c2930dbe1dea2286344c653357a6", "score": "0.6325211", "text": "function addNewUser($body) {\n global $logger, $daoUsers;\n\n $onid = strtolower($body['onid']);\n $level = $body['privLevel'];\n\n if (empty($onid) || $onid == '' || (empty($level) && $level != 0) || !is_numeric($level)) {\n $logger->error('Bad request when attempting to add new user with ONID ' . $onid . ' and level ' . $level);\n respond(400, 'Please include the onid and a numeric level for the new user');\n }\n\n $newUser = new \\Model\\User();\n $newUser->setOnid($onid);\n $newUser->setPrivilegeLevel($level);\n $ok = $daoUsers->createUser($newUser);\n\n if (!$ok) {\n respond(500, 'Failed to create new user');\n }\n\n respond(201, 'Successfully created new user');\n}", "title": "" }, { "docid": "835b82ec22f5fac1d644b63c41ea3b31", "score": "0.62685144", "text": "public function addUser() {\n\t\t// Add your add user method\n\t\treturn 'add';\n\t}", "title": "" }, { "docid": "315309f7577d7a1a5d17e6743000c522", "score": "0.626163", "text": "public function addUser(User $user)\n\t{\n\t\t$query = $this->getDb()->prepare('INSERT INTO users(firstname, lastname, tokenId) VALUES (:firstname, :lastname, :tokenId)');\n\t\t$query->bindValue(\"firstname\", $user->getFirstname(), PDO::PARAM_STR);\n $query->bindValue(\"lastname\", $user->getLastname(), PDO::PARAM_STR);\n $query->bindValue(\"tokenId\", $user->getTokenId(), PDO::PARAM_STR);\n\t\t$query->execute();\n }", "title": "" }, { "docid": "2f40ef74c2583388a0d7fbd738c33698", "score": "0.6260493", "text": "public function addUser(\\SitioBundle\\Entity\\User $user){\n try{\n $em = $this->getEntityManager();\n $em->persist($user);\n $em->flush();\n }\n catch (\\Doctrine\\ORM\\ORMException $e){\n throw $e;\n \n }\n }", "title": "" }, { "docid": "e1371001ff87f74c625cd6155bfeab44", "score": "0.6255874", "text": "public function addUser($data) {\n return ObjectController::add(\"INSERT INTO user VALUES ($data)\");\n }", "title": "" }, { "docid": "782b20dbbc13ea415ebfdd68ef2168f8", "score": "0.6252035", "text": "public static function add()\n {\n $params = $_POST;\n\n $attributes = array(\n 'username' => $params['username'],\n 'password' => $params['password'],\n 'first_name' => $params['first_name'],\n 'last_name' => $params['last_name'],\n 'email' => $params['email'],\n 'phone_number' => $params['phone_number'],\n 'street_address' => $params['street_address'],\n 'postal_code' => $params['postal_code'],\n 'city' => $params['city'],\n 'bonus_amount' => 0.0, );\n\n $validator = self::user_validator($attributes, 'register');\n\n if (count(Users::findByUsername($attributes['username'])) > 0) {\n View::make('user/add.html', array('message' => 'Käyttäjätunnus on varattu!', 'attributes' => $attributes));\n }\n\n if ($validator->validate()) {\n $password = crypt($attributes['password'], CRYPT_BLOWFISH);\n\n $attributes['password'] = $password;\n\n $user = new Users($attributes);\n\n $user_id = $user->save();\n\n $_SESSION['user'] = $user_id;\n\n Redirect::to('/kassa',\n array('message' => 'Rekisteröityminen onnistui!'));\n } else {\n View::make('user/add.html', array('errors' => $validator->errors(), 'attributes' => $attributes));\n }\n }", "title": "" }, { "docid": "5b1e5ab6700e03b20fed7a961e09031f", "score": "0.62310183", "text": "public function testAddUser()\n {\n $token = $this->getTokenForUser($this->user());\n $response = $this->json('POST', 'api/adduser', ['name'=>'testuser01', 'email'=>'[email protected]', 'password'=>'testpassword', 'role'=>'user'], ['Authorization' =>'Bearer '.$token, 'Secret'=>$this->secret]);\n $response->assertStatus(201)\n ->assertJsonStructure([\n 'message',\n 'user',\n ]);\n }", "title": "" }, { "docid": "f3a7e92560bc7e5e3ae4977242231280", "score": "0.6224183", "text": "public abstract function createANewUser(User $user);", "title": "" }, { "docid": "643c71fc405ae77bf494ba7bf416466b", "score": "0.62224483", "text": "public function addNewUser()\n {\n $this->userExists(); \n if(empty($this->message))\n {\n $query = \"insert \";\n $query .=\"INTO users ( \";\n $query .=\"userName , password , firstName , lastName , email , role , displayName \";\n $query .=\") VALUES ( \";\n $query .=\"'{$this->userName}' , '{$this->password}' , '{$this->firstName}' , '{$this->lastName}' , '{$this->email}' , '{$this->role}' , '{$this->displayName}' \";\n $query .=\") \";\n $this->result = mysqli_query($this->connectServer->getConnection() , $query);\n $this->message = $this->connectServer->checkResult($this->result);\n }\n \n }", "title": "" }, { "docid": "87b0106f2deb037d92dbfc88d6e64372", "score": "0.6197368", "text": "public function actionAdduser()\n\t{\n\t\t$id= $_GET['id'];\n\t\t$uid=Yii::app()->user->id;\n\t\tif(isset($id))\n\t\t{\n\t\t\tif($id==$uid)\n\t\t\t\techo 'no';\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$check=UsersFollow::model()->find(\"user_id=$uid and follow_id=$id\");\n\t\t\t\tif(isset($check))\n\t\t\t\t{\n\t\t\t\t\techo 'already';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$likes= new UsersFollow;\n\t\t\t\t$likes->user_id= $uid;\n\t\t\t\t$likes->follow_id=$id;\n\t\t\t\tif($likes->save())\n\t\t\t\t\techo 'ok';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tYii::app()->end();\n\t}", "title": "" }, { "docid": "982a4112505170a2253f88e71534b1c2", "score": "0.61918586", "text": "public function addUser(User $user) {\n $this->users[] = $user;\n return $this;\n }", "title": "" }, { "docid": "fde2d240db5124ecd86bbc2f69fc1eac", "score": "0.61778677", "text": "public function add_provider_user(Request $request, Response $response, $args)\n {\n if (($this->session->get('id') === null) || ($this->session->get('providerId') === null))\n return $response->write('#session');\n\n $user_email = $request->getParam('user_email');\n\n $providerId = $this->session->providerId;\n\n\n $email = User::check_email($user_email);\n if (!$email)\n return $response->write('#not-found');\n\n\n $userId = $email->profileId;\n\n $providerUser = $this->_check_provider_user($providerId, $userId);\n\n\n if ($userId == $this->session->id) {\n return $response->write('#mine');\n } elseif (!$providerUser) {\n\n $pUser = ORM::for_table('ProviderUsers')->create();\n $pUser->provider_id = $providerId;\n $pUser->user_id = $userId;\n $pUser->status = 'invitation';\n $pUser->save();\n\n return $response->write('#invited');\n } else {\n return $response->write('#exists');\n }\n\n }", "title": "" }, { "docid": "6ffa1191a84171474fa715aeceb0b6b5", "score": "0.6173214", "text": "public function add_payee()\n {\n UserModel::authentication();\n \n //get the session user\n $user = UserModel::user();\n \n $payees = $this->model->payees($username, '');\n }", "title": "" }, { "docid": "13c67bc38734958967e5222d2d1c9fac", "score": "0.61681473", "text": "public function add($user_id = false)\r\n {\r\n /* only add the friend to the list if there is a user id to be added */\r\n if($user_id) :\r\n global $wpdb;\r\n /* table names */\r\n \t\t$tablename = $wpdb->prefix.$this->table;\r\n /* current logged in user id */\r\n $loggedin_id = $this->ID;\r\n /* get friends */\r\n $friendslist = $this->get();\r\n /* add the user id to the friend list */\r\n $friendslist[$user_id] = $user_id;\r\n\r\n /* update key value pairing */\r\n $data = array(\r\n 'friends' => serialize($friendslist),\r\n );\r\n /* what row to be affected */\r\n $where = array(\r\n 'user_id' => $loggedin_id\r\n );\r\n /* return updated rows (1) or (0) */\r\n return $wpdb->update( $tablename, $data, $where);\r\n endif;\r\n /* no user id so return a message */\r\n return 'no user id to be added';\r\n }", "title": "" }, { "docid": "dcfe731099bd8e502185a3ca488e837d", "score": "0.6167042", "text": "public static function add($user_name, $pw1, $pw2)\n {\n $check = Validate::email($user_name);\n if ($check->isError()) {\n return $check;\n }\n\n self::$db = Container::getDb();\n\n $result = self::checkExists($user_name);\n if ($result->isError()) {\n return $result;\n }\n\n // need to change Validate::password with whatever password rules we want\n $result = Validate::password($pw1, $pw2);\n if ($result->isError()) {\n return $result;\n }\n\n $addArray = [\n 'uuid' => self::newUUID(),\n 'user_name' => $user_name,\n ];\n\n $user_id = parent::addByArray(\n $addArray\n );\n\n if (!$user_id) {\n return new Result(\"FAIL_INSERT\");\n }\n\n $newuser = Container::newUser($user_id);\n //the third flag is that this is, in fact, a new user\n $passResult = $newuser->changePassword($pw1, $pw2, true);\n if ($passResult->isError()) {\n return $passResult;\n }\n\n return new Result('ADDED_USER', $user_id, true);\n }", "title": "" }, { "docid": "f161f20107371cfd5750c60ef62097e9", "score": "0.61664325", "text": "public function AddUser(){\n\t\t\t// die();\n $sql = \"INSERT INTO `user` (`id`, `fname`, `lname`, `username`, `email`, `password`, `type`) \n \t\t\t\tVALUES ('', '$this->fname', '$this->lname', '$this->username', '$this->email', '$this->password', 'User');\";\n return $this->connect->Iud($sql);\n }", "title": "" }, { "docid": "868f43a2b3e3ac85fedcd81c3f18fae1", "score": "0.61621547", "text": "public function addUser(User $user) {\n\t\tif(!$this->loaded)\n\t\t\t$this->load();\n\t\t\n\t\tif($this->findUser($user->email) !== null)\n\t\t\treturn false;\n\t\t\n\t\t$this->data[$user->email] = $user;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "493c127d0ef5ddde79afff8b4aa8b828", "score": "0.61500365", "text": "public function addUser() {\n $query = '\n INSERT INTO ' . Stats::TABLE_NAME . ' (\n id,\n wins,\n losses,\n draws \n ) VALUES (?, ?, ?, ?)\n ;\n ';\n $statement = $this->db->prepare($query);\n $wins = 0;\n $losses = 0;\n $draws = 0;\n $statement->bind_param('ssss', $this->userId, $wins, $losses, $draws);\n\n if ($statement->execute()) {\n $statement->close();\n return true;\n }\n\n $statement->close();\n return false;\n }", "title": "" }, { "docid": "7c8ea101dee07a099279d7a3f5cac9fb", "score": "0.61486125", "text": "protected function addUser( JsonUserEntity $user ): JsonUserEntity {\n $user->setId( $this->getNextUserId() );\n $this->collection[$user->getId()] = $user;\n\n return $user;\n }", "title": "" }, { "docid": "8d61b5a60599c3f40946e8cd30a699c1", "score": "0.6139188", "text": "function userAdd($defer = 'false', $metadata = NULL, $pub_key = NULL)\n {\n $args = array(\n 'method' => 'realm.user_add',\n 'defer' => $defer,\n );\n\n // You must give a pub_key param, if you are not deferring enrollment.\n if ($defer === 'false') {\n if (!empty($pub_key)) $args['pub_key'] = $pub_key;\n else throw new Exception(\"Cannot enroll without a public key! Did you mean to defer enrollment?\");\n }\n\n if (!empty ($metadata)) {\n\n $extras = self::base64UrlEncode(json_encode($metadata));\n\n $args['extra_fields'] = $extras;\n }\n $user_arr = $this->rawCall($args);\n if (!array_key_exists('return', $user_arr) || empty($user_arr['return']) || $user_arr['return'] !== 'ok') return false;\n else return $user_arr;\n }", "title": "" }, { "docid": "c0ed3e65d5f1f922ddc37e23a45742e9", "score": "0.6132748", "text": "public static function addUser($user_name, $pw1, $pw2)\n {\n trigger_error(\"The addUser() function is deprecated, use add() instead\");\n return static::add($user_name, $pw1, $pw2);\n }", "title": "" }, { "docid": "e8c9dc29518246f4de440ce56e286eaf", "score": "0.6124945", "text": "function add(\\Kaltura\\Client\\Type\\User $user)\n\t{\n\t\t$kparams = array();\n\t\t$this->client->addParam($kparams, \"user\", $user->toParams());\n\t\t$this->client->queueServiceActionCall(\"user\", \"add\", $kparams);\n\t\tif ($this->client->isMultiRequest())\n\t\t\treturn $this->client->getMultiRequestResult();;\n\t\t$resultObject = $this->client->doQueue();\n\t\t$this->client->throwExceptionIfError($resultObject);\n\t\t$this->client->validateObjectType($resultObject, \"\\\\Kaltura\\\\Client\\\\Type\\\\User\");\n\t\treturn $resultObject;\n\t}", "title": "" }, { "docid": "1ac6d10564147ab75a35e3ecb55b0df8", "score": "0.61064446", "text": "public function addUser(int $conferenceId, int $userId, string $role = 'user'): bool;", "title": "" }, { "docid": "8a46bbe5321df4ed3d8f61263b778a7a", "score": "0.6102267", "text": "static function add( $userLevel, $emailAddress, $username, $password, $firstName, $lastName )\n\t{\n\t\t$user = new User;\n\t\t$user->user_level \t\t= $userLevel;\n\t\t$user->email_address \t= $emailAddress;\n\t\t$user->username \t\t= $username;\n\t\t$user->password \t= Hash::make( $password );\n\t\t$user->first_name \t\t= $firstName;\n\t\t$user->last_name \t\t= $lastName;\n\t\t$user->save();\n\t}", "title": "" }, { "docid": "199fb932591b007fe0bac48985ac0849", "score": "0.60954833", "text": "function add_user($request)\n\t{\n\t\t$parameters = $request->output_parameters();\n\t\t\n\t\t$username = $parameters['0']['username'];\n\t\t$password = $parameters['0']['password'];\n\t\t\n\t\tif( ! $this->check_access($username, $password))\n\t\t{\n\t\t\treturn $this->xmlrpc->send_error_message('100', 'Invalid Access');\n\t\t}\n\n\t\t$error = '';\n\t\t//check errors\n\t\t$user_firstname = $parameters['1']['firstname'];\n\t\t$user_lastname = $parameters['1']['lastname'];\n\t\t$user_email = $parameters['1']['email'];\n\t\t$user_username = $parameters['1']['username'];\n\t\t$user_password = $parameters['1']['password'];\n\t\tif($user_username == '')\n\t\t{\n\t\t\t$error .= 'Username required'.\"\\n\";\n\t\t}\n\t\tif($user_password == '')\n\t\t{\n\t\t\t$error .= 'Password required'.\"\\n\";\n\t\t}\n\t\tif( ! $this->_username_check($user_username))\n\t\t{\n\t\t\t$error .= 'Username already exists'.\"\\n\";\n\t\t}\n\t\tif($error <> '')\n\t\t{\n\t\t\treturn $this->xmlrpc->send_error_message('101', $error);\n\t\t}\n\t\t\n\t\t$user_password = md5($user_password);\n\t\t\n\t\t$data = array(\n\t\t\t 'firstname' => $user_firstname,\n\t\t\t 'lastname' => $user_lastname,\n\t\t\t 'email' => $user_email,\n\t\t\t 'username' => $user_username,\n\t\t\t 'password' => $user_password,\n\t\t\t 'joindate' => time()\n\t\t\t);\n\t\tif ($this->db->insert('users', $data)) \n\t\t{\n\t\t\t$id = $this->db->insert_id();\n\t\t\t$response = array(array('id' => $id), 'struct');\n\t return $this->xmlrpc->send_response($response);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = array(false, 'boolean');\n\t\t\treturn $this->xmlrpc->send_response($response);\n\t\t}\n\t}", "title": "" }, { "docid": "f8c91d1c639811cb2b3c040f3c22e0d1", "score": "0.60907876", "text": "function add_user ($fields=array()) {\n\t\ttry {\n\t\t\t$user = new DB_User;\n\t\t\t$user->set_all($fields);\n\t\t\t$user->save();\n\t\t\treturn $user;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "aff2316b0c271071f8d8989892e5579e", "score": "0.60883784", "text": "public static function Add($username, $password, $mail, $born, $motto = '', $rank = '1', $credits = '100000', $pixels = '100000', $points = '10000') {\n Emulator::users_Add($username, $password, $mail, $born, $motto, $rank, $credits, $pixels, $points);\n }", "title": "" }, { "docid": "ffa83cfe467ab8f512c09faa6bbfde95", "score": "0.6086236", "text": "function addUser( $user, $password, $email='', $realname='' ) {\r\n return false;\r\n }", "title": "" }, { "docid": "bd022cf8aaeedaa46913a87b99eac3dd", "score": "0.60835004", "text": "public function add(User $user)\n {\n if ($this->hasMember($user)) throw new UserAlreadyMemberOfGroup();\n Member::create([\n 'user_id' => $user->id,\n 'group_id' => $this->id\n ]);\n }", "title": "" }, { "docid": "5fb43e4cb5d6af403c7ec5b65d75606c", "score": "0.60828394", "text": "function shapeSpace_register_add_meta($user_id) {\n\tadd_user_meta($user_id, '_new_user', '1');\n}", "title": "" }, { "docid": "b47d5fd70fb4eb8dd171fa113e3e5c6a", "score": "0.6077435", "text": "public function add(UserAddRequest $request)\n {\n $processReaction = $this->userEngine->processAdd($request->all());\n\n return __processResponse($processReaction, [], [], true);\n }", "title": "" }, { "docid": "ca0335e721d38bad3d1a9f5fbc02891f", "score": "0.60769874", "text": "public function add_user_to_group($user_id, $group_id);", "title": "" }, { "docid": "96466640eed3c6122b38d132a57fff78", "score": "0.607521", "text": "public function add()\n {\n $user['nickname'] = '流年';\n $user['email'] = '[email protected]';\n $user['birthday'] = strtotime('1994-01-08');\n if ($result = User::create($user)) {\n return '用户['. $result->nickname .']新增成功';\n } else {\n return '新增出错';\n }\n }", "title": "" }, { "docid": "8ab2562c92141a31b421c6db67b2c3c6", "score": "0.60695994", "text": "public function insertUser(User $user);", "title": "" }, { "docid": "0f91076edafe1a6062eac94b94c10edf", "score": "0.6056117", "text": "protected function _Member_addUser($userArray)\n {\n $email = new \\Hatchbuck\\Entity\\Email();\n $email->setAddress($userArray['email']);\n \n $status = new \\Hatchbuck\\Entity\\Status();\n $status->setId(static::$HATCHBUCK_CONTACT_STATUS_MAP['member']);\n \n $contact = new \\Hatchbuck\\Entity\\Contact();\n $contact->setFirstName($userArray['first_name']);\n $contact->setLastName($userArray['last_name']);\n $contact->setStatus($status);\n $contact->setEmailList([$email]);\n \n $newContact = $this->_hatchbuck->addContact($contact);\n\n // Now adding tags to the just added contact\n $tagMember = new \\Hatchbuck\\Entity\\Tag();\n $tagMember->setId(static::$HATCHBUCK_TAG_MAP['member']);\n \n $tagPleybox = new \\Hatchbuck\\Entity\\Tag();\n $tagPleybox->setId(static::$HATCHBUCK_TAG_MAP['pleybox']);\n \n $this->_hatchbuck->addTag($newContact, [$tagMember, $tagPleybox]);\n }", "title": "" }, { "docid": "23e0f103643944c827339b9849e78776", "score": "0.6046585", "text": "function add_user($user_id, $real_name, $password, $phone, $email, $role_id, \n\t$language, $profile, $rep_popup, $pos)\n{\n\t$sql = \"INSERT INTO \".TB_PREF.\"users (user_id, real_name, password\"\n\t\t.\", phone, email, role_id, language, pos, print_profile, rep_popup)\n\t\tVALUES (\".db_escape($user_id).\", \n\t\t\".db_escape($real_name).\", \".db_escape($password) .\",\".db_escape($phone)\n\t\t.\",\".db_escape($email).\", \".db_escape($role_id).\", \".db_escape($language)\n\t\t.\", \".db_escape($pos).\",\".db_escape($profile).\",\".db_escape($rep_popup)\n\t\t.\" )\";\n\n\treturn db_query($sql, \"could not add user for $user_id\");\n}", "title": "" }, { "docid": "81ce47311c9ca1795d3e988a1662dfa5", "score": "0.604256", "text": "function add() {\n $data[\"title\"] = _e(\"user\");\n $CFG = $this->config->item('user_configure');\n\n //check if have add permission\t\t\n $data[\"response\"] = addPermissionMsg($CFG[\"sector\"][\"add\"]);\n\n ## Other auxilary variable ##\n $data['var'] = array();\n\n ## Load user_category admin module ##\n $this->load->module('user_category/user_category_admin');\n $user_categories = $this->user_category_admin->getActiveUserCategories(); \n switch ($this->login['category_id']){\n case 30 : $user_categories = array( 30 => $user_categories[30] ); // if users are biz seller \n } \n $data['var']['categories_dd'] = ( array('' => _e('choose_user_category')) + $user_categories );\n $data['var']['roles_dd'] = ( array('' => _e('choose_user_role')) );\n $data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"user\");\n $data[\"content\"] = $this->template->admin_view(\"user_add\", $data, true, \"user\");\n $this->template->build_admin_output($data);\n }", "title": "" }, { "docid": "b8069420d997b701c4250014f5832a23", "score": "0.60256493", "text": "function function_new_user($user_id) {\r\n\r\n add_user_meta($user_id, '_new_user', '1');\r\n}", "title": "" }, { "docid": "488c6bac7124ae1d3f3b5a8e4c9953ce", "score": "0.60107344", "text": "private function addUser()\r\n {\r\n /* Bail out if the user doesn't have SA permissions. */\r\n if ($this->_realAccessLevel < ACCESS_LEVEL_DEMO)\r\n {\r\n CommonErrors::fatal(COMMONERROR_PERMISSION, $this);\r\n return;\r\n //$this->fatal(ERROR_NO_PERMISSION);\r\n }\r\n\r\n $users = new Users($this->_siteID);\r\n $accessLevels = $users->getAccessLevels();\r\n\r\n $rs = $users->getAll();\r\n $license = $users->getLicenseData();\r\n\r\n /* Get user categories, if any. */\r\n $modules = ModuleUtility::getModules();\r\n $categories = array();\r\n foreach ($modules as $moduleName => $parameters)\r\n {\r\n $moduleCategories = $parameters[MODULE_SETTINGS_USER_CATEGORIES];\r\n\r\n if ($moduleCategories != false)\r\n {\r\n foreach ($moduleCategories as $category)\r\n {\r\n /* index 3 is the user level required to assign this type of category. */\r\n if (!isset($category[3]) || $category[3] <= $this->_realAccessLevel)\r\n {\r\n $categories[] = $category;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $EEOSettings = new EEOSettings($this->_siteID);\r\n $EEOSettingsRS = $EEOSettings->getAll();\r\n\r\n $this->_template->assign('active', $this);\r\n $this->_template->assign('subActive', '');\r\n $this->_template->assign('accessLevels', $accessLevels);\r\n $this->_template->assign('license', $license);\r\n $this->_template->assign('EEOSettingsRS', $EEOSettingsRS);\r\n $this->_template->assign('defaultAccessLevel', ACCESS_LEVEL_DELETE);\r\n $this->_template->assign('currentUser', $this->_userID);\r\n $this->_template->assign('categories', $categories);\r\n\r\n if (!eval(Hooks::get('SETTINGS_ADD_USER'))) return;\r\n\r\n $this->_template->display('./modules/settings/AddUser.tpl');\r\n }", "title": "" }, { "docid": "eccfcdf5bc855fe8d3896d3f8e8560fa", "score": "0.599449", "text": "public static function Add($user)\n {\n $path = self::GetPath($user->username, $user->group);\n \n if(file_exists($path))\n throw new Exception\\Users\\UserExistsException;\n \n FileSystem::MakeDir($path, 0755, true);\n \n $row = array();\n $row[0] = (array) $user;\n \n $user_data = new Data($path . \"data.php\");\n $user_data->Write($row);\n }", "title": "" }, { "docid": "69d6fc211e823ad662b603b5052b2618", "score": "0.59867364", "text": "public function addUser()\n {\n $data = array();\n\n /**\n * page logic\n */\n\n // page title\n $data['page_title'] = \"Users Management - Dashboard | VietTravel Applications\";\n $data['page_name'] = \"Users Management\";\n $data['page_description'] = \"add new user\";\n $data['c_user'] = $this->cUser;\n $data['tab'] = array(\n 'current' => 'memebers-nav',\n 'sub' => 'sub-add-user'\n );\n // send plugins file\n $data['styles'] = array();\n $data['scripts'] = array();\n return view('backend.user.add')->with('data', $data);\n }", "title": "" }, { "docid": "1ca3bad736c390d815fddcf622db1e3b", "score": "0.5984127", "text": "function addUser($user, $password) {\n return false;\n }", "title": "" }, { "docid": "f5b0e8f1e242bb5972b1d3a0031390fd", "score": "0.59673035", "text": "public function addToUser($client_id, $user_id) {\n\t\t$user = $this->user->find($user_id);\n\t\t$client = $this->model->find($client_id);\n\n\t\tif($user && $client) {\n\t\t\treturn $this->user_client->create(['user_id' => $user->id, 'client_id' => $client->id]);\n\t\t}\n\t}", "title": "" }, { "docid": "85eaa43017f40cb4ebe1061a2722ca17", "score": "0.59656245", "text": "public function setAddUserId($value)\n {\n return $this->set('AddUserId', $value);\n }", "title": "" }, { "docid": "e7e9e115f5bc1723e6ec1bd237e9948d", "score": "0.59598285", "text": "function add_user($data){\n $res = $this->db->insert(\"users\", $data);\n if($res){\n $user_info = $this->db->get_where('users', $data)->result();\n return $this->response(true,$user_info,'Sign up successful');\n }else{\n return $this->response(false,[],'Data insertion failed');\n }\n }", "title": "" }, { "docid": "96880839b987c41550e25a9e2bb6cd0d", "score": "0.5958951", "text": "function push(User $user);", "title": "" }, { "docid": "e9673f868eb8e761d17fda92eb4db309", "score": "0.59552246", "text": "public function add(UserModel $user)\n {\n $this->_elements[] = $user;\n $this->_count++;\n }", "title": "" }, { "docid": "2d364c92203e46b63ede208d5a2c5b35", "score": "0.5951275", "text": "protected function addUser( $user ) {\n\t\tif ( ! is_array( $user ) || count( $user ) < 2 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $this->maybeStandardizeUser( $user );\n\n\t\tif ( false === $user ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->checkParticipant( $user ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->users[] = $user;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7d698f9e0f58c42aa68efd4b3be23f9c", "score": "0.5950395", "text": "public function addOStatus_User(OStatus_User $l)\n\t{\n\t\tif ($this->collOStatus_Users === null) {\n\t\t\t$this->initOStatus_Users();\n\t\t}\n\t\tif (!$this->collOStatus_Users->contains($l)) { // only add it if the **same** object is not already associated\n\t\t\t$this->collOStatus_Users[]= $l;\n\t\t\t$l->setUser($this);\n\t\t}\n\t}", "title": "" }, { "docid": "b26f236e187b2496641859b920b11498", "score": "0.5945977", "text": "public function add_user($person) {\n\t\t$username = $person[USERNAME];\n\n\t\tif ($this->check_if_user_exists($username)) {\n\t\t\t$response = array();\n\t\t\t$response['err'] = \"This username has already been taken\";\n\n\t\t\techo json_encode($response);\n\t\t\texit();\n\t\t} else {\n\t\t\t$password = $person[PASSWORD];\n\t\t\t$timestamp = time();\n\t\t\t\n\t\t\t$person_record = array(USERNAME => $username, \n\t\t\t\t\t\t\t\t\tPASSWORD => $password, \n\t\t\t\t\t\t\t\t\tCREATED_BY => $username, \n\t\t\t\t\t\t\t\t\tMODIFIED_BY => $username,\n\t\t\t\t\t\t\t\t\tCREATED_AT => $timestamp,\n\t\t\t\t\t\t\t\t\tMODIFIED_AT => $timestamp);\n\n\t\t\t// Insert\n\t\t\t$m = new MongoWrapper();\n\t\t\t$coll_people = $m->get_collection(self::COLL_PEOPLE);\n\t\t\t$r = $coll_people->insert($person_record);\n\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "9ed249b0f62ee0a3a128c724407df899", "score": "0.59455466", "text": "private function addUser($ugid, $user) {\n if (empty($user->password))\n throw new ApiException(\"Missing required field for user add: password.\");\n try {\n $iuser = User_Api::from($user, $ugid);\n log2_r($iuser, 'iUser');\n $iuser->save();\n // TODO: Add NC_USER\n return $iuser->userId;\n } catch (Exception $e) {\n log2_r($e->getMessage(), 'Exception: addUser');\n throw new ApiException(\"Add user failed.\");\n }\n }", "title": "" }, { "docid": "6c6e04acdd938cd796b7715ba59209d6", "score": "0.5938943", "text": "public function createUser(User $user);", "title": "" }, { "docid": "4ceab1efd293f4f080c8d95470f98a04", "score": "0.593559", "text": "public function add(User $user, Recommendation $recommendation);", "title": "" }, { "docid": "657afa43c879914d03168c7507edd021", "score": "0.592943", "text": "public function add(User $user): void\n {\n $this->insert(self::SQL_TABLE, [\n 'uuid' => $user->getUuid()->toString(),\n 'email' => $user->getEmail(),\n 'password' => $user->getPassword(),\n 'username' => $user->getUsername(),\n 'created_at' => ($user->getCreatedAt())->format('Y-m-d H:i:s'),\n 'updated_at' => ($user->getUpdatedAt())->format('Y-m-d H:i:s'),\n 'roles' => json_encode($user->getRoles()),\n 'is_blocked' => intval($user->getIsBlocked())\n ]);\n }", "title": "" }, { "docid": "9d6e9ca23c19e927001301ce5647b84f", "score": "0.59279346", "text": "public function test_a_new_user_can_be_added()\n {\n $this->withOutExceptionHandling();\n $user = User::factory()->create();\n $response = $this->post('api/v1/user/register', [\n \"first_name\" => $user->first_name, \n \"username\" => 'shades'.rand(1000, 900000), \n \"last_name\" => $user->last_name, \n \"email\" => rand(1000, 900000).\"[email protected]\", \n \"password\" => \"password\",\n ]);\n $this->actingAs($user);\n $this->assertAuthenticatedAs($user);\n }", "title": "" }, { "docid": "745aca3655d3b63a3babf7e5a7ed139d", "score": "0.5927783", "text": "public function addUserAction()\r\n\t{\r\n\t\t$users\t= new Users;\r\n\t\t$form\t= $users->getForm();\r\n\t\t\r\n\t\tif($this->_request->isPost()) {\r\n\t\t\t$data\t= $this->_request->getPost();\r\n\t\t\tunset($data['submit']);\r\n\t\t\t\r\n\t\t\tif($form->isValid($data)) {\r\n\t\t\t\t$users->insert($data);\r\n\t\t\t\t$this->_redirect('/admin/users');\r\n\t\t\t} else {\r\n\t\t\t\t$form->populate($data);\r\n\t\t\t\techo 'There was a problem!';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->view->form\t= $form;\r\n\t}", "title": "" }, { "docid": "9d6b59220fdbd6254bb719cd607c530e", "score": "0.5927214", "text": "abstract public function insert(\\Core\\User\\User $user);", "title": "" }, { "docid": "c7af8d39a85cb2ffbaedd91deb63088a", "score": "0.5926695", "text": "public function addUser(User $inUser) {\n // TODO: Create real request\n $query = 'INSERT INTO user (first_name, last_name, mail, passwd) VALUES (';\n $query .= $this->dbHandle->quote($inUser->getFName()) . ',';\n $query .= $this->dbHandle->quote($inUser->getLName()) . ',';\n $query .= $this->dbHandle->quote($inUser->getMail()) . ',';\n $query .= $this->dbHandle->quote($inUser->getPasswd());\n $query .= ')';\n\n // Do not try catch, just throw the error\n $this->dbHandle->exec($query);\n }", "title": "" }, { "docid": "b0898ef7b9a3a464e6b1137a120e569d", "score": "0.5924874", "text": "public function add_user($data){\n\t\t$this->db->insert('users',$data);\n\t}", "title": "" }, { "docid": "bfcbe77d969a996b9060b35cdbddc11a", "score": "0.59099954", "text": "public function store(AddNewUserRequest $request)\n {\n\n $this->validate($request, [\n 'package_id' => 'enoughMoney'\n ], ['error' => 'Not enough money'], ['packages' => $this->packageService]);\n\n $newUser = $this->userService->addNewUser($request);\n\n if (!($newUser instanceof User)) {\n \\Log::critical('Cannot create user threesine');\n \\Flash::error('Partner successfully added!' . $newUser);\n\n return redirect()->back();\n\n }\n\n event(new UserRegisteredPartner($newUser));\n\n \\Log::critical('Before Job', [$newUser]);\n $this->dispatchNow(new PayForNewUserPackage($newUser));\n\n \\Log::critical('After dispath Job', [$newUser]);\n\n \\Flash::warning(sprintf('Partner %s successfully to plan %s added! Remember his password <b>%s</b>', $newUser->email, $newUser->getPackageAttribute()->name, $newUser->passwordPlain));\n\n return redirect(route('partner.index'));\n\n }", "title": "" }, { "docid": "69b7fd46a4be96857ad8a04eca62692f", "score": "0.5907059", "text": "function createUser($args, &$request) {\n\t\tPeopleHandler::editUser($args, $request);\n\t}", "title": "" }, { "docid": "ae1e9f4da2a47a1b26901c123f152315", "score": "0.5900842", "text": "public function addUserToDb() {\n include('db.php');\n $this->hashedPassword = password_hash($this->password, PASSWORD_DEFAULT);\n $sql = \"INSERT INTO users (name, password) VALUES (:name, :password)\";\n $insertToDb = $connection->prepare($sql);\n $insertToDb->bindParam(':name', $this->username);\n $insertToDb->bindParam(':password', $this->hashedPassword);\n $insertToDb->execute();\n $this->registerStatus = true;\n }", "title": "" }, { "docid": "d535026a0f6324ce988e758bb8648f05", "score": "0.58981234", "text": "public function addUser($instanceId, CloudUser $user)\n {\n $data = $user->add();\n $result = $this->connection->post('/instances/' . $instanceId . '/users', $data);\n\n return $user;\n }", "title": "" }, { "docid": "d7d5e1520cdd274ecc63cf64df83d199", "score": "0.58939743", "text": "public function addUserId($user_id)\n {\n $this->vkarg_user_ids[] = $user_id;\n\n return $this;\n }", "title": "" }, { "docid": "e17ba592b09523580c2c5a278eec8e8c", "score": "0.589393", "text": "public function adduser(Request $request){\n $project = Project::find($request->input('project_id'));\n if(Auth::user()->id == $project->user_id){\n $user = User::where('email',$request->input('email'))->first();\n\n //checking if the user has already beeen added to the project users.\n $projectuser = ProjectUser::where('user_id',$request->input('user_id'))\n ->where('project_id',$project->id)->first();\n if($projectuser){\n return redirect()->route('projects.show',['project'=>$project->id]);\n }\n\n if ($user && $project){\n $project->users()->attach($user->id);\n return redirect()->route('projects.show',['project'=>$project->id]);\n }\n }\n\n return redirect()->route('projects.show',['project'=>$project->id])->with('errors','Error adding user to Project');\n\n }", "title": "" }, { "docid": "3fd1d83838c624773144c34623428889", "score": "0.58876437", "text": "public function actionAdduser()\n\t{\n\t\t$id=Yii::app()->user->id;\n\t\t$uid=$_REQUEST['id'];\n\t\t$msg='';\n\t\t$status='error';\n\t\tif(isset($id))\n\t\t{\n\t\t\tif($id==$uid)\n\t\t\t\t$status='error';\n\t\t\telse\n\t\t\t{\t\t\t\t\n\t\t\t\t$check=UsersFollow::model()->find(\"user_id=$uid and follow_id=$id\");\n\t\t\t\tif(isset($check)){\n\t\t\t\t\t$status='error';;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$likes= new UsersFollow;\n\t\t\t\t\t$likes->user_id= $uid;\n\t\t\t\t\t$likes->follow_id=$id;\n\t\t\t\t\tif($likes->save()){\n\t\t\t\t\t\t$status='success';\n\t\t\t\t\t\t$msg = $likes->user_follow_id;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\techo CJSON::encode(array(\n\t\t'status'=>$status,\n\t\t'msg'=>$msg\n\t\t));\n\t\tYii::app()->end();\n\t}", "title": "" }, { "docid": "e6f37b6d584b1e2d6a55de6990857a5b", "score": "0.5881705", "text": "private function add_random_id( $user_id ) {\n\t\t$this->user_ids[] = $user_id;\n\t}", "title": "" }, { "docid": "750c1389ee963272577676fe39a13e70", "score": "0.5877492", "text": "public function addUserData(Userdata $userData)\n {\n \t$userData->setRegister($this); // synchronously updating inverse side\n }", "title": "" } ]
d729aac61ee6c6a574ede8b7ba29349e
define the woocommerce_before_single_variation callback
[ { "docid": "00e69a26ef8ab99dea7fa7d4ff8dada6", "score": "0.8606813", "text": "function action_woocommerce_after_single_variation( ) {\n\n}", "title": "" } ]
[ { "docid": "eea574c239d81e37f6823fd08af2ba21", "score": "0.89874876", "text": "function action_woocommerce_before_single_variation( ) {\n}", "title": "" }, { "docid": "051629dee7690b96495636e2c466d4ce", "score": "0.6913411", "text": "function mytheme_show_product_variations(){\n\tglobal $product;\n\n\t\tif( $product->is_type('variable') ) {\n\t\t\t// Add the hook back in that was removed, when looking at Variations\n\n // Disable the hooks so that their order can be changed.\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );\n // remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );\n remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10);\n //\n\t\t// \t// Add to Cart on Variation\n // add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );\n // add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );\n // add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );\n // //add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );\n // add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 6 );\n // //add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );\n // // add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );\n add_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 60);\n }else {\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );\n\n add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 50 );\n add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );\n }\n}", "title": "" }, { "docid": "084159677055c186d84af706cc1c7c0c", "score": "0.6281761", "text": "function variation_price($variation_id) {\n\nglobal $woocommerce; \n$product = new WC_Product_Variation($variation_id);\nreturn $product->get_price();\n}", "title": "" }, { "docid": "f38de4f47d5d677221590ed0685acff6", "score": "0.6271678", "text": "function porto_woocommerce_available_variation($variations, $product, $variation) {\n if ( has_post_thumbnail( $variation->get_id() ) ) {\n $attachment_id = get_post_thumbnail_id( $variation->get_id() );\n $image_thumb_link = wp_get_attachment_image_src($attachment_id, 'shop_thumbnail');\n $variations = array_merge( $variations, array( 'image_thumb' => $image_thumb_link[0] ) );\n $image_thumb_link = wp_get_attachment_image_src($attachment_id, 'shop_single');\n $variations = array_merge( $variations, array( 'image_src' => $image_thumb_link[0] ) );\n $image_thumb_link = wp_get_attachment_image_src($attachment_id, 'full');\n $variations = array_merge( $variations, array( 'image_link' => $image_thumb_link[0] ) );\n } else if ( has_post_thumbnail() ) {\n $attachment_id = get_post_thumbnail_id();\n $image_thumb_link = wp_get_attachment_image_src($attachment_id, 'shop_thumbnail');\n $variations = array_merge( $variations, array( 'image_thumb' => $image_thumb_link[0] ) );\n $image_thumb_link = wp_get_attachment_image_src($attachment_id, 'shop_single');\n $variations = array_merge( $variations, array( 'image_src' => $image_thumb_link[0] ) );\n $image_thumb_link = wp_get_attachment_image_src($attachment_id, 'full');\n $variations = array_merge( $variations, array( 'image_link' => $image_thumb_link[0] ) );\n }\n return $variations;\n}", "title": "" }, { "docid": "a555197f46e8bc38d6ce813fc3a83e04", "score": "0.6253114", "text": "function woocommerce_variation_options( $loop, $variation_data, $variation ) {\n // echo \"<pre>\";print_r($loop);echo\"</pre>\";#die();\n // echo \"<pre>\";print_r($variation_data);echo\"</pre>\";#die();\n // echo \"<pre>\";print_r($variation);echo\"</pre>\";#die();\n\n\n // available ID types\n\t\t$available_id_types = array( \n\t\t\t'' => __( '-- use profile setting --', 'wp-lister-for-amazon' ),\n\t\t\t'UPC' \t=> __( 'UPC', 'wp-lister-for-amazon' ),\n\t\t\t'EAN' \t=> __( 'EAN', 'wp-lister-for-amazon' )\n\t\t);\n\n // available item conditions\n\t\t$available_item_conditions = array( \n\t\t\t'' => __( '-- use profile setting --', 'wp-lister-for-amazon' ),\n\t\t\t'New' => __( 'New', 'wp-lister-for-amazon' ),\n\t\t\t'UsedLikeNew' => __( 'Used - Like New', 'wp-lister-for-amazon' ),\n\t\t\t'UsedVeryGood' => __( 'Used - Very Good', 'wp-lister-for-amazon' ),\n\t\t\t'UsedGood' => __( 'Used - Good', 'wp-lister-for-amazon' ),\n\t\t\t'UsedAcceptable' => __( 'Used - Acceptable', 'wp-lister-for-amazon' ),\n\t\t\t'Refurbished' => __( 'Refurbished', 'wp-lister-for-amazon' ),\n\t\t\t'CollectibleLikeNew' => __( 'Collectible - Like New', 'wp-lister-for-amazon' ),\n\t\t\t'CollectibleVeryGood' => __( 'Collectible - Very Good', 'wp-lister-for-amazon' ),\n\t\t\t'CollectibleGood' => __( 'Collectible - Good', 'wp-lister-for-amazon' ),\n\t\t\t'CollectibleAcceptable' => __( 'Collectible - Acceptable', 'wp-lister-for-amazon' ),\n\t\t);\n\n // available FBA overwrite modes\n\t\t$available_fba_overwrite_modes = array( \n\t\t\t'' => __( '-- set automatically --', 'wp-lister-for-amazon' ),\n\t\t\t'FBA' => __( 'Fulfilled by Amazon (FBA)', 'wp-lister-for-amazon' ),\n\t\t\t'FBM' => __( 'Fulfilled by Merchant (FBM)', 'wp-lister-for-amazon' ),\n\t\t);\n\n\t\t// // current values\n\t\t// $_amazon_id_type = isset( $variation_data['_amazon_id_type'][0] ) \t\t? $variation_data['_amazon_id_type'][0] \t\t: '';\n\t\t// $_amazon_product_id = isset( $variation_data['_amazon_product_id'][0] ) \t\t? $variation_data['_amazon_product_id'][0] \t\t: '';\n\t\t// $_amazon_price = isset( $variation_data['_amazon_price'][0] ) \t\t? $variation_data['_amazon_price'][0] \t\t\t: '';\n\t\t// $_amazon_minimum_price = isset( $variation_data['_amazon_minimum_price'][0] ) ? $variation_data['_amazon_minimum_price'][0] \t: '';\n\t\t// $_amazon_maximum_price = isset( $variation_data['_amazon_maximum_price'][0] ) ? $variation_data['_amazon_maximum_price'][0] \t: '';\n\t\t// $_amazon_asin = isset( $variation_data['_wpla_asin'][0] ) \t\t\t\t? $variation_data['_wpla_asin'][0] \t\t\t\t: '';\n\n\t\t// get variation post_id - WC2.3\n\t\t$variation_post_id = $variation ? $variation->ID : $variation_data['variation_post_id']; // $variation exists since WC2.2 (at least)\n\n\t\t// get current values - WC2.3\n\t\t$_amazon_id_type = get_post_meta( $variation_post_id, '_amazon_id_type' \t\t, true );\n\t\t$_amazon_product_id = get_post_meta( $variation_post_id, '_amazon_product_id' \t\t, true );\n\t\t$_amazon_price = wc_format_localized_price( get_post_meta( $variation_post_id, '_amazon_price' \t\t, true ) );\n\t\t$_amazon_b2b_price = wc_format_localized_price( get_post_meta( $variation_post_id, '_amazon_b2b_price' \t\t, true ) );\n\t\t$_amazon_minimum_price = wc_format_localized_price( get_post_meta( $variation_post_id, '_amazon_minimum_price' \t, true ) );\n\t\t$_amazon_maximum_price = wc_format_localized_price( get_post_meta( $variation_post_id, '_amazon_maximum_price' \t, true ) );\n\t\t$_amazon_condition_type = get_post_meta( $variation_post_id, '_amazon_condition_type' \t, true );\n\t\t$_amazon_condition_note = get_post_meta( $variation_post_id, '_amazon_condition_note' \t, true );\n\t\t$_amazon_fba_overwrite = get_post_meta( $variation_post_id, '_amazon_fba_overwrite' \t, true );\n\t\t$_amazon_is_disabled = get_post_meta( $variation_post_id, '_amazon_is_disabled' \t, true );\n\t\t$_amazon_asin = get_post_meta( $variation_post_id, '_wpla_asin' \t\t\t\t, true );\n\t\t$_amazon_handling_time = get_post_meta( $variation_post_id, '_amazon_handling_time' , true );\n\t\t$_amazon_restock_date = get_post_meta( $variation_post_id, '_amazon_restock_date' , true );\n\n ?>\n\n <div>\n\t \t<h4 style=\"border-bottom: 1px solid #ddd; margin:0; padding-top:1em; clear:both;\"><?php _e( 'Amazon Options', 'wp-lister-for-amazon' ); ?></h4>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'Product ID', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"To list <b>new products</b> on Amazon, you need to enter a UPC or EAN for each single variation.<br>If your products already exist on Amazon leave this empty and enter or select an ASIN below.\" href=\"#\">[?]</a>\n </label> \n <input type=\"text\" name=\"variable_amazon_product_id[<?php echo $loop; ?>]\" class=\"\" value=\"<?php echo $_amazon_product_id ?>\" placeholder=\"UPC / EAN\" />\n </p>\n <p class=\"form-row form-row-last\">\n <label>\n <?php _e( 'Product ID Type', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"The type of standard, unique identifier entered in the Product ID field. You can leave this unset if you specify the Product ID Type in your listing profile.\" href=\"#\">[?]</a>\n </label> \n <select name=\"variable_amazon_id_type[<?php echo $loop; ?>]\" class=\"wpla_var_selector\">\n <?php\n foreach ( $available_id_types as $key => $option_name ) {\n echo '<option value=\"' . $key . '\" ';\n selected($key, $_amazon_id_type);\n echo '>' . $option_name . '</option>';\n }\n ?>\n </select>\n </p>\n </div>\n <div>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'ASIN', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"To list <b>existing products</b> on Amazon, you need to enter an ASIN for each variation.\" href=\"#\">[?]</a>\n </label> \n <input type=\"text\" id=\"variable_amazon_asin_<?php echo $loop; ?>\" name=\"variable_amazon_asin[<?php echo $loop; ?>]\" class=\"\" value=\"<?php echo $_amazon_asin ?>\" />\n </p>\n <p class=\"form-row form-row-last\">\n <label style=\"display: block; margin-top: 2px;\">&nbsp;</label>\n \t<?php \n \t\t$tb_url = wp_nonce_url( \"admin-ajax.php?action=wpla_show_product_matches&id=\" . $variation_post_id, 'wpla_ajax_nonce' ); // . \"&height=420&width=640\";\n \t\t$onclick = 'window.wpla_matching_asin_field_id = \"variable_amazon_asin_'.$loop.'\";';\n \t\t$onclick .= 'tb_show(\"Match variation #'.$variation_post_id.' on Amazon\", \"'.$tb_url.'\");';\n \t\t$onclick .= 'return false;';\n \t?>\n <a href=\"#\" onclick='<?php echo $onclick ?>' class=\"button\">\n \t<?php echo 'Select from Amazon' ?>\n </a>\n </p>\n </div>\n\n <?php if ( get_option( 'wpla_enable_custom_product_prices', 1 ) == 1 ) : ?>\n <div>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'Amazon Price', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Custom price to be used when listing this product on Amazon. This will override price modifier settings in your listing profile.\" href=\"#\">[?]</a>\n </label> \n <input type=\"text\" name=\"variable_amazon_price[<?php echo $loop; ?>]\" class=\"wc_input_price\" value=\"<?php echo $_amazon_price ?>\" />\n </p>\n <?php if ( get_option('wpla_load_b2b_templates',0) ): ?>\n <p class=\"form-row form-row-last\">\n <label style=\"display: block;\">\n <?php _e( 'Amazon B2B Price', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Set a different business price for this variation\" href=\"#\">[?]</a>\n </label>\n <input type=\"text\" name=\"variable_amazon_b2b_price[<?php echo $loop; ?>]\" class=\"wc_input_price\" value=\"<?php echo $_amazon_b2b_price ?>\" />\n </p>\n <?php endif; ?>\n </div>\n <?php endif; ?>\n\n <?php if ( get_option( 'wpla_enable_minmax_product_prices', 0 ) == 1 ) : ?>\n <div>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'Minimum Price', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"This is used to automatically set the price to the lowest price on Amazon - if it is between minimum and maxmimum price.\" href=\"#\">[?]</a>\n </label> \n <input type=\"text\" name=\"variable_amazon_minimum_price[<?php echo $loop; ?>]\" class=\"wc_input_price\" value=\"<?php echo $_amazon_minimum_price ?>\" />\n </p>\n <p class=\"form-row form-row-last\">\n <label>\n <?php _e( 'Maximum Price', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"This is used to automatically set the price to the lowest price on Amazon - if it is between minimum and maxmimum price.\" href=\"#\">[?]</a>\n </label> \n <input type=\"text\" name=\"variable_amazon_maximum_price[<?php echo $loop; ?>]\" class=\"wc_input_price\" value=\"<?php echo $_amazon_maximum_price ?>\" />\n </p>\n </div>\n <?php endif; ?>\n\n <?php if ( get_option( 'wpla_enable_item_condition_fields', 0 ) == 1 ) : ?>\n <div>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'Item Condition', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Indicates the condition of the item.\" href=\"#\">[?]</a>\n </label> \n\t\t\t\t\t<select name=\"variable_amazon_condition_type[<?php echo $loop; ?>]\" class=\"select\" style=\"\">\n <?php\n foreach ( $available_item_conditions as $key => $option_name ) {\n echo '<option value=\"' . $key . '\" ';\n selected($key, $_amazon_condition_type);\n echo '>' . $option_name . '</option>';\n }\n ?>\n\t\t\t\t\t</select>\n\n\n </p>\n <p class=\"form-row form-row-last\">\n <label>\n <?php _e( 'Condition Note', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Descriptive text explaining the actual condition of the item. Required if item condition is not New.\" href=\"#\">[?]</a>\n </label> \n <input type=\"text\" name=\"variable_amazon_condition_note[<?php echo $loop; ?>]\" class=\"\" value=\"<?php echo $_amazon_condition_note ?>\" maxlength=\"1000\" />\n </p>\n </div>\n <?php endif; ?>\n\n <div>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'Handling Time', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Indicates the time, in days, between when you receive an order for an item and when you can ship the item. The default production time is one to two business days. Use this field if your production time is greater than two business days.\" href=\"#\">[?]</a>\n </label>\n <input type=\"text\" name=\"variable_amazon_handling_time[<?php echo $loop; ?>]\" class=\"\" value=\"<?php echo $_amazon_handling_time ?>\" />\n </p>\n\n <?php if ( get_option( 'wpla_fba_enabled' ) ) : ?>\n <p class=\"form-row form-row-last\">\n <label>\n <?php _e( 'FBA mode', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Use this option to manually enable or disable FBA on specific SKUs.\" href=\"#\">[?]</a>\n </label> \n\t\t\t\t\t<select name=\"variable_amazon_fba_overwrite[<?php echo $loop; ?>]\" class=\"select\" style=\"\">\n <?php\n foreach ( $available_fba_overwrite_modes as $key => $option_name ) {\n echo '<option value=\"' . $key . '\" ';\n selected($key, $_amazon_fba_overwrite);\n echo '>' . $option_name . '</option>';\n }\n ?>\n\t\t\t\t\t</select>\n </p>\n <?php endif; ?>\n </div>\n\n <div>\n <p class=\"form-row form-row-first\">\n <label>\n <?php _e( 'Restock Date', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"This is the date that the merchant will be able to ship any back-ordered items to a customer.\" href=\"#\">[?]</a>\n </label>\n <input type=\"text\" name=\"variable_amazon_restock_date[<?php echo $loop; ?>]\" class=\"\" value=\"<?php echo $_amazon_restock_date ?>\" placeholder=\"MM/DD/YYYY\" />\n </p>\n </div>\n\n <div>\n <p class=\"form-row form-row-first\">\n <label style=\"display: block;\">\n <?php _e( 'Amazon Visibility', 'wp-lister-for-amazon' ); ?>\n <a class=\"tips\" data-tip=\"Tick the checkbox below to omit this particular variation when this product is listed on Amazon.<br><br>Note: Ticking the box will not remove an existing listing for this variation!\" href=\"#\">[?]</a>\n </label>\n <label style=\"line-height: 2.6em;\">\n <input type=\"checkbox\" class=\"checkbox\" name=\"variable_amazon_is_disabled[<?php echo $loop; ?>]\" style=\"margin-top: 9px !important; margin-right: 9px !important;\"\n <?php if ( $_amazon_is_disabled ) echo 'checked=\"checked\"' ?> >\n <?php _e( 'Hide on Amazon', 'wp-lister-for-amazon' ); ?>\n </label>\n </p>\n </div>\n\n\n <?php\n\n }", "title": "" }, { "docid": "7e01c8a392536296e0d1a97693aa067b", "score": "0.6144592", "text": "function get_variation_id() {\n\t return get_post_meta( $this->id, '_bkap_variation_id', true );\n\t}", "title": "" }, { "docid": "c232c3ee22edb2207f6a319e7767a4b3", "score": "0.6134068", "text": "public function test_create_variation() {\n\t\t$product = ProductHelper::create_variation_product();\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations' ) );\n\t\t$variations = $response->get_data();\n\t\t$this->assertEquals( 2, count( $variations ) );\n\n\t\t$request = new WP_REST_Request( 'POST', '/wc/v4/products/' . $product->get_id() . '/variations' );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'sku' => 'DUMMY SKU VARIABLE MEDIUM',\n\t\t\t\t'regular_price' => '12',\n\t\t\t\t'description' => 'A medium size.',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'pa_size',\n\t\t\t\t\t\t'option' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertContains( 'A medium size.', $variation['description'] );\n\t\t$this->assertEquals( '12', $variation['price'] );\n\t\t$this->assertEquals( '12', $variation['regular_price'] );\n\t\t$this->assertTrue( $variation['purchasable'] );\n\t\t$this->assertEquals( 'DUMMY SKU VARIABLE MEDIUM', $variation['sku'] );\n\t\t$this->assertEquals( 'medium', $variation['attributes'][0]['option'] );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations' ) );\n\t\t$variations = $response->get_data();\n\t\t$this->assertEquals( 3, count( $variations ) );\n\t}", "title": "" }, { "docid": "23003c29121121896d08a5000d8c5f23", "score": "0.60842866", "text": "function create_product_variation( $product_id, $variation_data ){\r\n\t// ini_set('display_errors', 1);\r\n\t// ini_set('display_startup_errors', 1);\r\n\t// error_reporting(E_ALL);\r\n $product = wc_get_product($product_id);\r\n\r\n $variation_post = array(\r\n 'post_title' => $product->get_name(),\r\n 'post_name' => 'product-'.$product_id.'-variation',\r\n 'post_status' => 'publish',\r\n 'post_parent' => $product_id,\r\n 'post_type' => 'product_variation',\r\n 'guid' => $product->get_permalink()\r\n );\r\n\r\n // Creating the product variation\r\n $variation_id = wp_insert_post( $variation_post );\r\n\r\n // Get an instance of the WC_Product_Variation object\r\n $variation = new WC_Product_Variation( $variation_id );\r\n\r\n // Iterating through the variations attributes\r\n foreach ($variation_data['attributes'] as $attribute => $term_name )\r\n {\r\n $taxonomy = 'pa_'.$attribute; // The attribute taxonomy\r\n\r\n // If taxonomy doesn't exists we create it (Thanks to Carl F. Corneil)\r\n if( ! taxonomy_exists( $taxonomy ) ){\r\n register_taxonomy(\r\n $taxonomy,\r\n 'product_variation',\r\n array(\r\n 'hierarchical' => false,\r\n 'label' => ucfirst( $attribute ),\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => sanitize_title($attribute) ), // The base slug\r\n )\r\n );\r\n }\r\n\r\n // Check if the Term name exist and if not we create it.\r\n if( ! term_exists( $term_name, $taxonomy ) )\r\n wp_insert_term( $term_name, $taxonomy ); // Create the term\r\n\r\n $term_slug = get_term_by('name', $term_name, $taxonomy )->slug; // Get the term slug\r\n\r\n // Get the post Terms names from the parent variable product.\r\n $post_term_names = wp_get_post_terms( $product_id, $taxonomy, array('fields' => 'names') );\r\n\r\n // Check if the post term exist and if not we set it in the parent variable product.\r\n if( ! in_array( $term_name, $post_term_names ) )\r\n wp_set_post_terms( $product_id, $term_name, $taxonomy, true );\r\n\r\n // Set/save the attribute data in the product variation\r\n update_post_meta( $variation_id, 'attribute_'.$taxonomy, $term_slug );\r\n }\r\n\r\n ## Set/save all other data\r\n\r\n // SKU\r\n if( ! empty( $variation_data['sku'] ) )\r\n $variation->set_sku( $variation_data['sku'] );\r\n\r\n // Prices\r\n if( empty( $variation_data['sale_price'] ) ){\r\n $variation->set_price( $variation_data['regular_price'] );\r\n } else {\r\n $variation->set_price( $variation_data['sale_price'] );\r\n $variation->set_sale_price( $variation_data['sale_price'] );\r\n }\r\n $variation->set_regular_price( $variation_data['regular_price'] );\r\n\r\n // Stock\r\n if( ! empty($variation_data['stock_qty']) ){\r\n $variation->set_stock_quantity( $variation_data['stock_qty'] );\r\n $variation->set_manage_stock(true);\r\n $variation->set_stock_status('');\r\n } else {\r\n $variation->set_manage_stock(false);\r\n }\r\n \r\n $variation->set_weight(''); // weight (reseting)\r\n\r\n $variation->save(); // Save the data\r\n}", "title": "" }, { "docid": "af8af9859d840237296166ab7799c62b", "score": "0.602389", "text": "public function save_variation_data( $product_id = 0 ) {\r\n\r\n\t\tif( ! empty( $_POST['variable_post_id'] ) && is_array( $_POST['variable_post_id'] ) ) {\r\n\r\n\t\t\tforeach( $_POST['variable_post_id'] as $variation_id ) {\r\n\t\t\t\t\r\n\t\t\t\tupdate_post_meta( $variation_id, 'post_data', $_POST );\r\n\r\n\t\t\t\t$variation_id = absint( $variation_id );\r\n\r\n\t\t\t\t/* Global Variation Settings */\r\n\t\t\t\tif( ! empty( $_POST['_affwp_mla_woocommerce_variation_referrals_disabled_default'] ) && ! empty( $_POST['_affwp_mla_woocommerce_variation_referrals_disabled_default'][ $variation_id ] ) ) {\r\n\r\n\t\t\t\t\tupdate_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_referrals_disabled_default', 1 );\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tdelete_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_referrals_disabled_default' );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif( ! empty( $_POST['_affwp_mla_woocommerce_variation_rate_types_default'] ) && ! empty( $_POST['_affwp_mla_woocommerce_variation_rate_types_default'][ $variation_id ] ) ) {\r\n\r\n\t\t\t\t\t$rate_type = sanitize_text_field( $_POST['_affwp_mla_woocommerce_variation_rate_types_default'][ $variation_id ] );\r\n\t\t\t\t\tupdate_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_type_default', $rate_type );\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tdelete_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_type_default' );\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$global_levels = $this->matrix_setting( 'matrix_depth', 'default' );\r\n\t\t\t\tfor ($x = 1; $x <= $global_levels; $x++) :\r\n\t\t\t\t\r\n\t\t\t\t\tif( isset( $_POST['_affwp_mla_' . $this->context . '_variation_rates_default_level_'.$x][ $variation_id ] ) ) {\r\n\t\t\r\n\t\t\t\t\t$rate = sanitize_text_field( $_POST['_affwp_mla_' . $this->context . '_variation_rates_default_level_'.$x][ $variation_id ] );\r\n\t\t\t\t\tupdate_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_default_level_'.$x, $rate );\r\n\t\t\r\n\t\t\t\t\t} else {\r\n\t\t\t\r\n\t\t\t\t\t\tdelete_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_default_level_'.$x );\r\n\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tendfor;\r\n\t\t\t\t\r\n\t\t\t\t/* Groups Settings */\r\n\t\t\t\tif( $this->groups_enabled() ) :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$groups = get_active_affiliate_groups();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach( $groups as $id => $group_data ) :\r\n\t\t\t\t\tif( get_affiliate_group_setting('mla_mode', $id) == 'enabled_extended' ) :\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif( isset( $_POST['_affwp_mla_' . $this->context . '_variation_referrals_disabled_'.$id][ $variation_id ] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\tupdate_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_referrals_disabled_'.$id, 1 );\r\n\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\tdelete_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_referrals_disabled_'.$id );\r\n\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif( ! empty( $_POST['_affwp_mla_' . $this->context . '_variation_rate_types_'.$id] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t$rate_type = sanitize_text_field( $_POST['_affwp_mla_' . $this->context . '_variation_rate_types_'.$id][ $variation_id ] );\r\n\t\t\t\t\t\t\tupdate_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_type_'.$id, $rate_type );\r\n\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\tdelete_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_type_'.$id );\r\n\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$group_levels = $this->matrix_setting( 'matrix_depth', $id );\r\n\t\t\t\t\t\tfor ($x = 1; $x <= $group_levels; $x++) :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif( isset( $_POST['_affwp_mla_' . $this->context . '_variation_rates_'.$id.'_level_'.$x][ $variation_id ] ) ) {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t$rate = sanitize_text_field( $_POST['_affwp_mla_' . $this->context . '_variation_rates_'.$id.'_level_'.$x][ $variation_id ] );\r\n\t\t\t\t\t\t\tupdate_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_'.$id.'_level_'.$x, $rate );\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tdelete_post_meta( $variation_id, '_affwp_mla_' . $this->context . '_product_rate_'.$id.'_level_'.$x );\r\n\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\tendfor;\r\n\t\t\t\t\t\r\n\t\t\t\t\tendif;\r\n\t\t\t\t\tendforeach;\r\n\t\t\t\t\r\n\t\t\t\tendif;\r\n\t\t\t\t/* End Groups Settings */\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "df153442267931b0a002f8d20e78195c", "score": "0.5991334", "text": "public function getProductVariationField ( $product ) {\n\n if ( $product->product_type == 'variable' ) {\n\n $product_variations = $product->get_available_variations();\n $product_attributes = $product->get_attributes();\n $variation_arr = array();\n\n $variation_select_box = '<label class=\"product_variations_label\">' . __( 'Variations:' , 'woocommerce-wholesale-order-form' ) . '</label>';\n $variation_select_box .= '<select class=\"product_variations\">';\n\n foreach ( $product_variations as $variation ) {\n\n $variation_obj = wc_get_product( $variation[ 'variation_id' ] );\n $variation_attributes = $variation_obj->get_variation_attributes();\n $friendly_variation_text = null;\n\n foreach ( $variation_attributes as $variation_name => $variation_val ) {\n\n foreach ( $product_attributes as $attribute_key => $attribute_arr ) {\n\n if ( $variation_name != 'attribute_' . sanitize_title( $attribute_arr[ 'name' ] ) )\n continue;\n\n $attr_found = false;\n\n if ( $attribute_arr[ 'is_taxonomy' ] ) {\n\n // This is a taxonomy attribute\n $variation_taxonomy_attribute = wp_get_post_terms( $product->id , $attribute_arr[ 'name' ] );\n\n foreach ( $variation_taxonomy_attribute as $var_tax_attr ) {\n\n if ( $variation_val == $var_tax_attr->slug ) {\n\n if ( is_null( $friendly_variation_text ) )\n $friendly_variation_text = str_replace( \":\" , \"\" , wc_attribute_label( $attribute_arr[ 'name' ] ) ) . \": \" . $var_tax_attr->name;\n else\n $friendly_variation_text .= \", \" . str_replace( \":\" , \"\" , wc_attribute_label( $attribute_arr[ 'name' ] ) ) . \": \" . $var_tax_attr->name;\n\n $attr_found = true;\n break;\n\n } elseif ( empty( $variation_val ) ) {\n\n if ( is_null( $friendly_variation_text ) )\n $friendly_variation_text = str_replace( \":\" , \"\" , wc_attribute_label( $attribute_arr[ 'name' ] ) ) . \": Any\";\n else\n $friendly_variation_text .= \", \" . str_replace( \":\" , \"\" , wc_attribute_label( $attribute_arr[ 'name' ] ) ) . \": Any\";\n\n $attr_found = true;\n break;\n\n }\n\n }\n\n } else {\n\n // This is not a taxonomy attribute\n\n $attr_val = explode( '|' , $attribute_arr[ 'value' ] );\n\n foreach ( $attr_val as $attr ) {\n\n $attr = trim( $attr );\n\n // I believe the reason why I wrapped the $attr with sanitize_title is to remove special chars\n // We need ot wrap variation_val too to properly compare them\n if ( sanitize_title( $variation_val ) == sanitize_title( $attr ) ) {\n\n if ( is_null( $friendly_variation_text ) )\n $friendly_variation_text = str_replace( \":\" , \"\" , $attribute_arr[ 'name' ] ) . \": \" . $attr;\n else\n $friendly_variation_text .= \", \" . str_replace( \":\" , \"\" , $attribute_arr[ 'name' ] ) . \": \" . $attr;\n\n $attr_found = true;\n break;\n\n } elseif ( empty( $variation_val ) ) {\n\n if ( is_null( $friendly_variation_text ) )\n $friendly_variation_text = str_replace( \":\" , \"\" , wc_attribute_label( $attribute_arr[ 'name' ] ) ) . \": Any\";\n else\n $friendly_variation_text .= \", \" . str_replace( \":\" , \"\" , wc_attribute_label( $attribute_arr[ 'name' ] ) ) . \": Any\";\n\n $attr_found = true;\n break;\n\n }\n\n }\n\n }\n\n if ( $attr_found )\n break;\n\n }\n\n }\n\n if ( ( $product->managing_stock() === true && $product->get_total_stock() > 0 && $variation_obj->managing_stock() === true && $variation_obj->get_total_stock() > 0 && $variation_obj->is_purchasable() ) ||\n ( $product->managing_stock() !== true && $variation_obj->is_in_stock() && $variation_obj->is_purchasable() ) ||\n ( $variation_obj->backorders_allowed() && $variation_obj->is_purchasable() ) ) {\n\n //if ( $variation[ 'is_in_stock' ] && $variation_obj->is_purchasable() ) {\n $variation_arr[] = array(\n 'value' => $variation[ 'variation_id' ],\n //'text' => wc_get_formatted_variation( $variation[ 'attributes' ] , false ),\n 'text' => $friendly_variation_text,\n 'disabled' => false,\n 'visible' => true\n );\n\n } else {\n\n $visibility = false;\n if ( $variation_obj->variation_is_visible() )\n $visibility = true;\n\n $variation_arr[] = array(\n 'value' => 0,\n //'text' => wc_get_formatted_variation( $variation[ 'attributes' ] , false ),\n 'text' => $friendly_variation_text,\n 'disabled' => true,\n 'visible' => $visibility\n );\n\n }\n\n }\n\n wp_reset_postdata();\n\n //usort( $variation_arr , array( $this , 'usortCallback' ) ); // Sort variations alphabetically\n usort( $variation_arr , array( $this , 'usortVariationMenuOrder' ) ); // Sort variations via menu order\n\n foreach ( $variation_arr as $variation ) {\n\n if ( !$variation[ 'visible' ] )\n continue;\n\n $variation_select_box .= '<option value=\"' . $variation[ 'value' ] . '\" ' . ( $variation[ 'disabled' ] ? 'disabled' : '' ) . '>' . $variation[ 'text' ] . '</option>';\n\n }\n\n $variation_select_box .= '</select>';\n\n $variation_select_box = apply_filters( 'wwof_filter_product_variation' , $variation_select_box );\n\n return $variation_select_box;\n\n }\n\n }", "title": "" }, { "docid": "d5e9b21f290aeb97f79fc748042a33fc", "score": "0.5967735", "text": "function fn_product_variations_exim_check_variation_options($primary_object_id, &$product, &$skip_record, &$processed_data)\n{\n /** @var ProductManager $product_manager */\n $product_manager = Tygh::$app['addons.product_variations.product.manager'];\n\n $product_id = !empty($primary_object_id['product_id']) ? $primary_object_id['product_id'] : 0;\n $product_exists = (bool) $product_id;\n $product_type = fn_product_variations_exim_get_product_type($product);\n $result = new OperationResult();\n\n if (isset($product['variation_options']) && !$skip_record) {\n\n // if variation options are not empty we the consider product as a variation\n if ($product['variation_options']) {\n\n if (!empty($product_type) && $product_type !== ProductManager::PRODUCT_TYPE_VARIATION) {\n // configurable product with variation options is invalid\n $result->addError(\n 'conf_product_cannot_have_variation_options',\n __(\n 'product_variations.exim_error_conf_product_cannot_have_variation_options',\n array('[product_code]' => $product['product_code'])\n )\n );\n\n } else {\n // updating or creating a variation\n $stored_parent_product_data = fn_product_variations_exim_get_stored_parent_product_data();\n $product_type = ProductManager::PRODUCT_TYPE_VARIATION;\n $selected_options = false;\n\n if (empty($stored_parent_product_data['product_id'])) {\n // cannot find parent product for variation\n $result->addError(\n 'cannot_find_parent_for_variation',\n __(\n 'product_variations.exim_error_cannot_find_parent_for_variation',\n array('[product_code]' => $product['product_code'])\n )\n );\n\n } else {\n $parent_product_data = fn_product_variations_exim_get_parent_product_data($stored_parent_product_data['product_id'], $product['lang_code']);\n\n $selected_options = fn_product_variations_exim_prepare_variation_options_for_import(\n $product,\n $parent_product_data['product_options']\n );\n }\n\n if ($selected_options) {\n $variation_code = $product_manager->getVariationCode($parent_product_data['product_id'], $selected_options);\n $variation_exists = false;\n $variation_changed = true;\n\n if ($product_exists) {\n $variation_changed = $product_manager->getProductFieldValue($product_id, 'variation_code') !== $variation_code;\n }\n\n if ($variation_changed\n && $product_manager->existsProductVariation($parent_product_data['product_id'], $variation_code, true)\n ) {\n // variation with these options already exists\n $variation_exists = true;\n $result->addError(\n 'variation_with_provided_options_exists',\n __(\n 'product_variations.exim_error_variation_with_provided_options_exists',\n array('[product_code]' => $product['product_code'])\n )\n );\n }\n\n $is_parent_product_new = !$stored_parent_product_data['object_exists'];\n\n if (!$variation_exists) {\n\n // if parent product has a wrong type, or it is newly created (therefore it does not have proper options saved)\n if ($parent_product_data['product_type'] !== ProductManager::PRODUCT_TYPE_CONFIGURABLE\n || $is_parent_product_new\n || count(array_diff($parent_product_data['variation_options'], array_keys($selected_options))) > 0 // option ids mismatch\n ) {\n $converted = fn_product_variations_exim_convert_parent_product_to_configurable(\n $parent_product_data,\n $selected_options\n );\n\n if ($converted) {\n $processed_type = $is_parent_product_new ? 'N' : 'E';\n $processed_data['by_types'][$parent_product_data['product_type']][$processed_type]--;\n $processed_data['by_types'][ProductManager::PRODUCT_TYPE_CONFIGURABLE][$processed_type]++;\n }\n }\n\n $result->setSuccess(true);\n $product['variation_options'] = $product_manager->encodeVariationSelectedOptions($selected_options);\n $product['variation_code'] = $variation_code;\n $product['product_type'] = ProductManager::PRODUCT_TYPE_VARIATION;\n $product['parent_product_id'] = $parent_product_data['product_id'];\n }\n }\n }\n } else {\n\n if ($product_type === ProductManager::PRODUCT_TYPE_VARIATION) {\n // variation without variation_options is not valid\n $result->addError(\n 'variation_cannot_have_empty_variation_options',\n __(\n 'product_variations.exim_error_variation_cannot_have_empty_variation_options',\n array('[product_code]' => $product['product_code'])\n )\n );\n\n } else {\n // it might be configurable product, so variation_options must be unset\n unset($product['variation_options']);\n $result->setSuccess(true);\n\n // set product type for a new product\n if (!$product_exists && !empty($product_type)) {\n $product['product_type'] = $product_type;\n }\n }\n }\n } elseif (!isset($product['variation_options'])\n && (empty($product_type)\n || $product_type === ProductManager::PRODUCT_TYPE_SIMPLE || $product_type === ProductManager::PRODUCT_TYPE_CONFIGURABLE)\n ) {\n $result->setSuccess(true);\n }\n\n if (empty($product_type) || empty($processed_data['by_types'][$product_type])) {\n\n if ($product_exists) {\n $product_type = $product_manager->getProductFieldValue($product_id, 'product_type');\n } else {\n $product_type = ProductManager::PRODUCT_TYPE_SIMPLE;\n }\n }\n\n if (!$result->isSuccess()) {\n $skip_record = true;\n $processed_data['S']++;\n $processed_data['by_types'][$product_type]['S']++;\n $result->showNotifications();\n } elseif (!$skip_record) {\n if ($product_exists) {\n $processed_data['by_types'][$product_type]['E']++;\n } else {\n $processed_data['by_types'][$product_type]['N']++;\n }\n }\n}", "title": "" }, { "docid": "ac0d59efbca77e89ee3aa7a3b7f8486c", "score": "0.59431", "text": "public function variation_settings( $loop, $variation_data, $variation ) {\r\n\r\n\t\t$disabled = get_post_meta( $variation->ID, '_affwp_mla_' . $this->context . '_referrals_disabled_default', true );\r\n\t\t$rate_type = get_post_meta( $variation->ID, '_affwp_mla_' . $this->context . '_product_rate_type_default', true );\r\n\t\t\r\n\t\t?>\r\n\r\n\t\t<div id=\"affwp_mla_product_variation_settings\">\r\n\r\n\t\t\t<h4 class=\"matrix_group_heading\"><?php _e( 'Global MLA Settings', 'affiliatewp-multi-level-affiliates' ); ?></h4>\r\n \r\n <p class=\"form-row form-row-full options\">\r\n\t\t\t\t<label for=\"_affwp_mla_woocommerce_variation_referrals_disabled_default[<?php echo $variation->ID; ?>]\">\r\n\t\t\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"_affwp_mla_woocommerce_variation_referrals_disabled_default[<?php echo $variation->ID; ?>]\" id=\"_affwp_mla_woocommerce_variation_referrals_disabled_default[<?php echo $variation->ID; ?>]\" <?php checked( $disabled, true ); ?> /> <?php _e( 'Disable referrals for this product variation', 'affiliatewp-multi-level-affiliates' ); ?>\r\n\t\t\t\t</label>\r\n\t\t\t</p>\r\n\r\n\t\t\t<p class=\"form-row form-row-full\">\r\n\t\t\t\t<label for=\"_affwp_mla_woocommerce_variation_rate_types_default[<?php echo $variation->ID; ?>]\"><?php echo __( 'Referral Rate Type', 'affiliatewp-multi-level-affiliates' ); ?></label>\r\n\t\t\t\t<select name=\"_affwp_mla_woocommerce_variation_rate_types_default[<?php echo $variation->ID; ?>]\" id=\"_affwp_mla_woocommerce_variation_rate_types_default[<?php echo $variation->ID; ?>]\">\r\n\t\t\t\t\t<option value=\"\"><?php _e( 'Site Default', 'affiliatewp-multi-level-affiliates' ); ?></option>\r\n\t\t\t\t\t<?php foreach( affwp_get_affiliate_rate_types() as $key => $type ) : ?>\r\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $key ); ?>\"<?php selected( $rate_type, $key ); ?>><?php echo esc_html( $type ); ?></option>\r\n\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t</select>\r\n\t\t\t</p>\r\n \r\n <?php\r\n $global_levels = $this->matrix_setting( 'matrix_depth', 'default' );\r\n\t\t\tfor ($x = 1; $x <= $global_levels; $x++) :\r\n\t\t\t$default_rate_level = get_post_meta( $variation->ID, '_affwp_mla_woocommerce_product_rate_default_level_'.$x , true );\r\n\t\t\t?>\r\n \r\n <p class=\"form-row form-row-full\">\r\n <label for=\"_affwp_mla_woocommerce_variation_rates_default_level_<?php echo $x; ?>[<?php echo $variation->ID; ?>]\"><?php echo __( 'Level', 'affiliatewp-multi-level-affiliates' ); echo ' '.$x ;?></label>\r\n <input type=\"text\" size=\"5\" name=\"_affwp_mla_woocommerce_variation_rates_default_level_<?php echo $x; ?>[<?php echo $variation->ID; ?>]\" value=\"<?php echo esc_attr( $default_rate_level ); ?>\" class=\"wc_input_price\" id=\"_affwp_mla_woocommerce_variation_rates_default_level_<?php echo $x; ?>[<?php echo $variation->ID; ?>]\" placeholder=\"\" />\r\n </p>\r\n\r\n\t\t\t<?php\r\n endfor;\r\n\r\n /* Groups Settings */\r\n\t\t\tif( $this->groups_enabled() ) :\r\n\t\t\t\r\n\t\t\t\t$groups = get_active_affiliate_groups();\r\n\t\t\t\tforeach( $groups as $id => $group_data ) :\r\n\t\t\t\tif( get_affiliate_group_setting('mla_mode', $id) == 'enabled_extended' ) :\r\n\t\t\t\t\r\n\t\t\t\t$disabled = get_post_meta( $variation->ID, '_affwp_mla_' . $this->context . '_referrals_disabled_'.$id, true );\r\n\t\t\t\t$rate_type = get_post_meta( $variation->ID, '_affwp_mla_' . $this->context . '_product_rate_type_'.$id, true );\r\n\t\t\t\t?>\r\n \r\n <h4 class=\"matrix_group_heading\"><?php echo $group_data['name'] .' '. __( 'MLA Settings', 'affiliatewp-multi-level-affiliates' ); ?></h4>\r\n \r\n <p class=\"form-row form-row-full options\">\r\n <label for=\"_affwp_mla_woocommerce_variation_referrals_disabled_<?php echo $id; ?>[<?php echo $variation->ID; ?>]\">\r\n <input type=\"checkbox\" class=\"checkbox\" name=\"_affwp_mla_woocommerce_variation_referrals_disabled_<?php echo $id; ?>[<?php echo $variation->ID; ?>]\" id=\"_affwp_mla_woocommerce_variation_referrals_disabled_<?php echo $id; ?>[<?php echo $variation->ID; ?>]\" <?php checked( $disabled, true ); ?> /> <?php _e( 'Disable referrals for this product variation', 'affiliatewp-multi-level-affiliates' ); ?>\r\n </label>\r\n </p>\r\n \r\n <p class=\"form-row form-row-full\">\r\n <label for=\"_affwp_mla_woocommerce_variation_rate_types_<?php echo $id; ?>[<?php echo $variation->ID; ?>]\"><?php echo __( 'Referral Rate Type', 'affiliatewp-multi-level-affiliates' ); ?></label>\r\n <select name=\"_affwp_mla_woocommerce_variation_rate_types_<?php echo $id; ?>[<?php echo $variation->ID; ?>]\" id=\"_affwp_mla_woocommerce_variation_rate_types_<?php echo $id; ?>[<?php echo $variation->ID; ?>]\">\r\n <option value=\"\"><?php _e( 'Matrix Default', 'affiliatewp-multi-level-affiliates' ); ?></option>\r\n <?php foreach( affwp_get_affiliate_rate_types() as $key => $type ) : ?>\r\n <option value=\"<?php echo esc_attr( $key ); ?>\"<?php selected( $rate_type, $key ); ?>><?php echo esc_html( $type ); ?></option>\r\n <?php endforeach; ?>\r\n </select>\r\n </p>\r\n \r\n <?php\r\n $group_levels = $this->matrix_setting( 'matrix_depth', $id );\r\n for ($x = 1; $x <= $group_levels; $x++) :\r\n\t\t\t\t\t$group_rate_level = get_post_meta( $variation->ID, '_affwp_mla_' . $this->context .'_product_rate_'.$id.'_level_'.$x , true );\r\n\t\t\t\t\t?>\r\n \r\n <p class=\"form-row form-row-full\">\r\n <label for=\"_affwp_mla_woocommerce_variation_rates_<?php echo $id; ?>_level_<?php echo $x; ?>[<?php echo $variation->ID; ?>]\"><?php echo __( 'Level', 'affiliatewp-multi-level-affiliates' ); echo ' '.$x ;?></label>\r\n <input type=\"text\" size=\"5\" name=\"_affwp_mla_woocommerce_variation_rates_<?php echo $id; ?>_level_<?php echo $x; ?>[<?php echo $variation->ID; ?>]\" value=\"<?php echo esc_attr( $group_rate_level ); ?>\" class=\"wc_input_price\" id=\"_affwp_mla_woocommerce_variation_rates_<?php echo $id; ?>_level_<?php echo $x; ?>[<?php echo $variation->ID; ?>]\" placeholder=\"\" />\r\n </p>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<?php\r\n \t\tendfor;\r\n\r\n\t\t\t\tendif;\r\n\t\t\t\tendforeach;\r\n\t\t\t\t\r\n\t\t\tendif;\r\n\t\t\t?>\r\n\r\n\t\t</div>\r\n\r\n\t\t<?php\r\n\r\n\t}", "title": "" }, { "docid": "cddc46f41186c5c34dfecccaaad920af", "score": "0.59335905", "text": "function ex_wcVariationRetrieval($item_id) {\n $_product = new WC_Product_Variation($item_id);\n $variation_data = $_product->get_variation_attributes();\n //$variation_detail = woocommerce_get_formatted_variation( $variation_data, true ); // this will give all variation detail in one line\n $variation_detail = woocommerce_get_formatted_variation($variation_data, false); // this will give all variation detail one by one\n return $variation_detail; // $variation_detail will return string containing variation detail which can be used to print on website\n // return $variation_data; // $variation_data will return only the data which can be used to store variation data\n }", "title": "" }, { "docid": "61e8401c587de18cdd1f6fa5a543e9cd", "score": "0.58935857", "text": "function add_product_variations( $variations, $product_id, $product_name ) {\n\t$product_attributes_data['select-a-size'] = array(\n\t\t'name' => 'Select a size',\n\t\t'value' => implode( ' | ', wp_list_pluck( $variations, 'inventoryItemSubName' ) ),\n\t\t'position' => '0',\n\t\t'is_visible' => '1',\n\t\t'is_variation' => '1',\n\t\t'is_taxonomy' => '0'\n\t);\n\n\tupdate_post_meta( $product_id, '_product_attributes', $product_attributes_data );\n\n\n\tforeach ( $variations as $variation ) {\n\t\t$variation_post = array(\n\t\t\t'post_title' => $variation->inventoryItemSubName,\n\t\t\t'post_name' => sanitize_title( $product_name . '-' . $variation->inventoryItemSubName ),\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_parent' => $product_id,\n\t\t\t'post_type' => 'product_variation',\n\t\t\t'guid' => ''\n\t\t);\n\n\t\t$variation_post_id = wp_insert_post( $variation_post );\n\n\t\tupdate_post_meta( $variation_post_id, 'attribute_select-a-size', $variation->inventoryItemSubName );\n\t\tupdate_post_meta( $variation_post_id, '_price', $variation->cost );\n\t\tupdate_post_meta( $variation_post_id, '_regular_price', $variation->cost );\n\t\tupdate_post_meta( $variation_post_id, '_virtual', 'yes' );\n\t\tupdate_post_meta( $variation_post_id, 'total_sales', 0 );\n\t\tupdate_post_meta( $variation_post_id, '_stock_status', 'instock' );\n\t}\n}", "title": "" }, { "docid": "e35d63d9e328095691d287d9ca02eb77", "score": "0.5862594", "text": "function product_get_default_variation_id($product) {\n if ( $product->get_type() == 'variable' ) {\n $attributes = $product->get_available_variations();\n return $attributes[0]['variation_id'];\n }\n return false;\n}", "title": "" }, { "docid": "da759b190777d09c048b626542d0381b", "score": "0.58442676", "text": "public function test_update_variation() {\n\t\t$product = ProductHelper::create_variation_product();\n\t\t$children = $product->get_children();\n\t\t$variation_id = $children[0];\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id ) );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertEquals( 'DUMMY SKU VARIABLE SMALL', $variation['sku'] );\n\t\t$this->assertEquals( 10, $variation['regular_price'] );\n\t\t$this->assertEmpty( $variation['sale_price'] );\n\t\t$this->assertEquals( 'small', $variation['attributes'][0]['option'] );\n\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'sku' => 'FIXED-\\'SKU',\n\t\t\t\t'sale_price' => '8',\n\t\t\t\t'description' => 'O_O',\n\t\t\t\t'image' => array(\n\t\t\t\t\t'position' => 0,\n\t\t\t\t\t'src' => 'http://cldup.com/Dr1Bczxq4q.png',\n\t\t\t\t\t'alt' => 'test upload image',\n\t\t\t\t),\n\t\t\t\t'attributes' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'pa_size',\n\t\t\t\t\t\t'option' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertTrue( isset( $variation['description'] ), print_r( $variation, true ) );\n\t\t$this->assertContains( 'O_O', $variation['description'], print_r( $variation, true ) );\n\t\t$this->assertEquals( '8', $variation['price'], print_r( $variation, true ) );\n\t\t$this->assertEquals( '8', $variation['sale_price'], print_r( $variation, true ) );\n\t\t$this->assertEquals( '10', $variation['regular_price'], print_r( $variation, true ) );\n\t\t$this->assertEquals( 'FIXED-\\'SKU', $variation['sku'], print_r( $variation, true ) );\n\t\t$this->assertEquals( 'medium', $variation['attributes'][0]['option'], print_r( $variation, true ) );\n\t\t$this->assertContains( 'Dr1Bczxq4q', $variation['image']['src'], print_r( $variation, true ) );\n\t\t$this->assertContains( 'test upload image', $variation['image']['alt'], print_r( $variation, true ) );\n\n\t\twp_delete_attachment( $variation['image']['id'], true );\n\t}", "title": "" }, { "docid": "f19473e2ca0c1e0ba063bdc66f31c32f", "score": "0.5806612", "text": "public function ajax_get_variation() {\n\n $response = array(\n 'success' => false,\n 'variation' => false\n );\n\n if( !empty( $_GET['variation_id'] ) && !empty( $_GET['product_id'] ) ) {\n\n $transient_name = $this->get_transient_name( $_GET['variation_id'], \"variation\" );\n\n if ( false === ( $variation = get_transient( $transient_name ) ) ) {\n\n $variable_product = new WC_Product_Variable( absint( $_GET['product_id'] ) );\n $variation = $variable_product->get_available_variation( absint( $_GET['variation_id'] ) );\n\n set_transient( $transient_name, $variation, 12 * HOUR_IN_SECONDS );\n\n }\n\n $response['success'] = true;\n $response['variation'] = $variation;\n\n }\n\n // generate the response\n \t$response['get'] = $_GET;\n\n \t// response output\n \theader('Content-Type: text/javascript; charset=utf8');\n header('Access-Control-Allow-Origin: *');\n header('Access-Control-Max-Age: 3628800');\n header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE');\n\n \techo htmlspecialchars($_GET['callback']) . '(' . json_encode( $response ) . ')';\n\n wp_die();\n\n }", "title": "" }, { "docid": "321e337065f5b918c4a05325cca79ce9", "score": "0.5795618", "text": "function pewc_variation_fields_wrapper( $group_key, $item_key, $item, $post_id ) {\n\t$product = wc_get_product( $post_id );\n\tif( $product && $product->is_type( 'variable' ) ) { ?>\n\t\t<div class=\"pewc-fields-wrapper pewc-fields-variations show_if_variable\">\n\t\t\t<label><?php _e( 'Variations', 'pewc' ); ?></label>\n\t\t\t<?php $variations = $product->get_children();\n\t\t\t\tinclude( PEWC_DIRNAME . '/templates/admin/variation.php' ); ?>\n\t\t</div><!-- .pewc-fields-wrapper -->\n\t<?php\n\t}\n}", "title": "" }, { "docid": "9b946aaed0310b46c2763a7e773d9059", "score": "0.5786799", "text": "public function beeketing_add_variation( $post_id, $data )\n {\n return beeketing_save_variations( $post_id, $data );\n }", "title": "" }, { "docid": "a02c3e1ec08cfb6658f303b758e2dc6c", "score": "0.5778725", "text": "function save_variations()\n{\n ob_start();\n\n // Check permissions again and make sure we have what we need.\n if (empty($_POST) || empty($_POST['product_id']))\n {\n wp_die(-1);\n }\n\n $product_id = absint($_POST['product_id']);\n WC_Admin_Meta_Boxes::$meta_box_errors = array();\n WC_Meta_Box_Product_Data::save_variations($product_id, get_post($product_id));\n\n do_action('woocommerce_ajax_save_product_variations', $product_id);\n\n $errors = WC_Admin_Meta_Boxes::$meta_box_errors;\n\n if ($errors)\n {\n echo '<div class=\"error notice is-dismissible\">';\n\n foreach ($errors as $error)\n {\n echo '<p>' . wp_kses_post($error) . '</p>';\n }\n\n echo '<button type=\"button\" class=\"notice-dismiss\"><span class=\"screen-reader-text\">' . esc_html__('Dismiss this notice.', 'woocommerce') . '</span></button>';\n echo '</div>';\n\n delete_option('woocommerce_meta_box_errors');\n }\n\n wp_die();\n}", "title": "" }, { "docid": "cf3d91ed4f7678255a48e50f56a3c832", "score": "0.57731354", "text": "public function create_gift_variation( $product_id, $data )\n {\n if ( ! isset( $data[ 'option1' ] ) ) {\n return [\n 'success' => false,\n 'message' => 'Option1 is required',\n ];\n }\n\n $product_data = $this->get_formatted_product( $product_id );\n if ( !$product_data ) {\n return [\n 'success' => false,\n 'message' => 'Product not found',\n ];\n }\n\n foreach ( $product_data['variants'] as $variant ) {\n if ( $variant['option1'] == $data['option1'] ) {\n return [\n 'success' => false,\n 'message' => 'Variant existed',\n ];\n }\n }\n //if product variation doesn't exist, add one\n $admin = get_users( 'orderby=nicename&role=administrator&number=1' );\n $variation = array(\n 'post_author' => $admin[0]->ID,\n 'post_status' => 'publish',\n 'post_name' => 'product-' . $product_id . '-variation',\n 'post_parent' => $product_id,\n 'post_title' => isset($data['title']) ? $data['title']: '',\n 'post_type' => 'product_variation',\n 'comment_status' => 'closed',\n 'ping_status' => 'closed',\n );\n $post_id = wp_insert_post( $variation );\n if ( isset( $data['price'] ) ) {\n update_post_meta( $post_id, '_price', $data['price'] );\n update_post_meta( $post_id, '_regular_price', $data['price'] );\n }\n if ( isset( $data['option1'] ) ) {\n update_post_meta( $post_id, '_bk_option1', $data['option1'] );\n }\n if ( isset( $data['sku'] ) ) {\n update_post_meta( $post_id, '_sku', $data['sku'] );\n }\n if ( isset( $data['attributes'] ) ) {\n foreach ( $data['attributes'] as $attribute ) {\n update_post_meta( $post_id, 'attribute_' . sanitize_title( $attribute['name'] ), $attribute['option'] );\n }\n }\n\n update_post_meta( $post_id, '_beeketing_product_variation', 1 );\n\n $product_variation = get_post( $post_id );\n\n return [\n 'success' => true,\n 'data' => $this->get_variant_data( $product_variation, $product_id ),\n ];\n }", "title": "" }, { "docid": "32e58fdfabd6bb09533343e00a089d8e", "score": "0.5687705", "text": "public function __construct( $variation, $args = array() ) {\n\n\t\t$this->product_type = 'variation';\n\n\t\tif ( is_object( $variation ) ) {\n\t\t\t$this->variation_id = absint( $variation->ID );\n\t\t} else {\n\t\t\t$this->variation_id = absint( $variation );\n\t\t}\n\n\t\t/* Get main product data from parent (args) */\n\t\t$this->id = ! empty( $args['parent_id'] ) ? intval( $args['parent_id'] ) : wp_get_post_parent_id( $this->variation_id );\n\n\t\t// The post doesn't have a parent id, therefore its invalid.\n\t\tif ( empty( $this->id ) )\n\t\t\treturn false;\n\n\t\t// Get post data\n\t\t$this->parent = ! empty( $args['parent'] ) ? $args['parent'] : get_product( $this->id );\n\t\t$this->post = ! empty( $this->parent->post ) ? $this->parent->post : array();\n\n\t\t// Inheritance from the parent\n $this->product_custom_fields = get_post_meta( $this->variation_id );\n\t\t$parent_custom_fields = get_post_meta( $this->id );\n\n\t\t$complete_custom_fields = array (\n\t\t\t'_price','_purchase_price','_regular_price','_sale_price','_sale_price_dates_from','_sale_price_dates_to','_sale_price_time_from','_sale_price_time_to',\n\t\t\t'_sku','_stock','_weight','_length','_width','_height','_downloadable','_virtual'\n\t\t);\n\n\t\tforeach ( $complete_custom_fields as $field ) {\n if( isset( $this->product_custom_fields[ $field ][0] ) && $this->product_custom_fields[ $field ][0] !== '' ) {\n } else {\n // The value is NOT set - inheritance from the parent product\n if( isset( $parent_custom_fields[ $field ][0] ) && $parent_custom_fields[ $field ][0] !== '' ) {\n $this->product_custom_fields[ $field ] = $parent_custom_fields[ $field ];\n }\n }\n\t\t}\n\n\t\t// Get the variation attributes from meta\n\t\tforeach ( $this->product_custom_fields as $name => $value ) {\n\t\t\tif ( ! strstr( $name, 'attribute_' ) )\n\t\t\t\tcontinue;\n\n\t\t\t$this->variation_data[ $name ] = sanitize_title( $value[0] );\n\t\t}\n\t\t// Now get variation meta to override the parent variable product\n\t\tif ( ! empty( $this->product_custom_fields['_sku'][0] ) ) {\n\t\t\t$this->variation_has_sku = true;\n\t\t\t$this->sku = $this->product_custom_fields['_sku'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_stock'][0] ) && $this->product_custom_fields['_stock'][0] !== '' ) {\n\t\t\t$this->variation_has_stock = true;\n\t\t\t$this->manage_stock = 'yes';\n\t\t\t$this->stock = $this->product_custom_fields['_stock'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_weight'][0] ) && $this->product_custom_fields['_weight'][0] !== '' ) {\n\t\t\t$this->variation_has_weight = true;\n\t\t\t$this->weight = $this->product_custom_fields['_weight'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_length'][0] ) && $this->product_custom_fields['_length'][0] !== '' ) {\n\t\t\t$this->variation_has_length = true;\n\t\t\t$this->length = $this->product_custom_fields['_length'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_width'][0] ) && $this->product_custom_fields['_width'][0] !== '' ) {\n\t\t\t$this->variation_has_width = true;\n\t\t\t$this->width = $this->product_custom_fields['_width'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_height'][0] ) && $this->product_custom_fields['_height'][0] !== '' ) {\n\t\t\t$this->variation_has_height = true;\n\t\t\t$this->height = $this->product_custom_fields['_height'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_downloadable'][0] ) && $this->product_custom_fields['_downloadable'][0] == 'yes' ) {\n\t\t\t$this->downloadable = 'yes';\n\t\t} else {\n\t\t\t$this->downloadable = 'no';\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_virtual'][0] ) && $this->product_custom_fields['_virtual'][0] == 'yes' ) {\n\t\t\t$this->virtual = 'yes';\n\t\t} else {\n\t\t\t$this->virtual = 'no';\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_tax_class'][0] ) ) {\n\t\t\t$this->variation_has_tax_class = true;\n\t\t\t$this->tax_class = $this->product_custom_fields['_tax_class'][0];\n\t\t}\n\n\t\tif ( isset( $this->product_custom_fields['_sale_price_dates_from'][0] ) )\n\t\t\t$this->sale_price_dates_from = $this->product_custom_fields['_sale_price_dates_from'][0];\n\n\t\tif ( isset( $this->product_custom_fields['_sale_price_dates_to'][0] ) )\n\t\t\t$this->sale_price_dates_from = $this->product_custom_fields['_sale_price_dates_to'][0];\n\n\t\t// Prices\n\t\t$this->price = isset( $this->product_custom_fields['_price'][0] ) ? $this->product_custom_fields['_price'][0] : '';\n\t\t$this->regular_price = isset( $this->product_custom_fields['_regular_price'][0] ) ? $this->product_custom_fields['_regular_price'][0] : '';\n\t\t$this->sale_price = isset( $this->product_custom_fields['_sale_price'][0] ) ? $this->product_custom_fields['_sale_price'][0] : '';\n\n\t\t// Backwards compat for prices\n\t\tif ( $this->price !== '' && $this->regular_price == '' ) {\n\t\t\tupdate_post_meta( $this->variation_id, '_regular_price', $this->price );\n\t\t\t$this->regular_price = $this->price;\n\n\t\t\tif ( $this->sale_price !== '' && $this->sale_price < $this->regular_price ) {\n\t\t\t\tupdate_post_meta( $this->variation_id, '_price', $this->sale_price );\n\t\t\t\t$this->price = $this->sale_price;\n\t\t\t}\n\t\t}\n\n\t\t$this->total_stock = $this->stock;\n\t}", "title": "" }, { "docid": "5c6e8067ddd9071fab313fc49da69026", "score": "0.5606447", "text": "public function variable_script() {\n\t\t\t$screen = get_current_screen();\n\t\t\t$currency = get_woocommerce_currency_symbol();\n\t\t\tif ( $screen->id == 'product' ) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function($) {\n\t\t\t\t\t\t$( '.wc-metaboxes-wrapper' ).on( 'click' , '.wc-metabox h3' , function( event ) {\n\t\t\t\t\t\t\t$( 'select.variable-warranty-type' ).change();\n\t\t\t\t\t\t\tif( event.target === event.currentTarget){ \n \t\t\t\t\t\t\t$( '.variable-warranty-type' ).closest( '.woocommerce_variation' ).removeClass( 'variation-needs-update' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$(\"#variable_product_options\").on(\"change\", \".warranty_default_checkbox\", function() {\n\t\t\t\t\t\t\tvar id = $(this).data(\"id\");\n\n\t\t\t\t\t\t\tif ($(this).is(\":checked\")) {\n\t\t\t\t\t\t\t\t$(\".warranty_\"+id).attr(\"disabled\", true);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$(\".warranty_\"+id).attr(\"disabled\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\t$(\"#variable_product_options\").on(\"change\", \".variable-warranty-type\", function() {\n\t\t\t\t\t\t\tvar loop = $(this).parents(\".warranty-variation\").data(\"loop\");\n\n\t\t\t\t\t\t\t$(\".variable_show_if_included_warranty_\"+ loop).hide()\n\t\t\t\t\t\t\t$(\".variable_show_if_addon_warranty_\"+loop).hide();\n\n\t\t\t\t\t\t\tif ($(this).val() == \"included_warranty\") {\n\t\t\t\t\t\t\t\t$(\".variable_show_if_included_warranty_\"+ loop).show();\n\t\t\t\t\t\t\t} else if ($(this).val() == \"addon_warranty\") {\n\t\t\t\t\t\t\t\t$(\".variable_show_if_addon_warranty_\"+ loop).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\t$(\"#variable_product_options\").on(\"change\", \".variable-included-warranty-length\", function() {\n\t\t\t\t\t\t\tvar loop = $(this).parents(\".warranty-variation\").data(\"loop\");\n\n\t\t\t\t\t\t\tif ($(this).val() == \"limited\") {\n\t\t\t\t\t\t\t\t$(\".variable_limited_warranty_length_field_\"+ loop ).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$(\".variable_limited_warranty_length_field_\"+ loop ).hide();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\n\t\t\t\t\t\tvar variable_tmpl = \"<tr>\\\n\t\t\t\t\t\t\t\t<td valign=\\\"middle\\\">\\\n\t\t\t\t\t\t\t\t\t<span class=\\\"input\\\"><b>+</b> <?php echo $currency; ?></span>\\\n\t\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"variable_addon_warranty_amount[_loop_][]\\\" value=\\\"\\\" style=\\\"min-width:50px; width:50px;\\\" />\\\n\t\t\t\t\t\t\t\t</td>\\\n\t\t\t\t\t\t\t\t<td valign=\\\"middle\\\">\\\n\t\t\t\t\t\t\t\t\t<input type=\\\"text\\\" style=\\\"width:50px;\\\" name=\\\"variable_addon_warranty_length_value[_loop_][]\\\" value=\\\"\\\" />\\\n\t\t\t\t\t\t\t\t\t<select name=\\\"variable_addon_warranty_length_duration[_loop_][]\\\" style=\\\"width: auto !important;\\\">\\\n\t\t\t\t\t\t\t\t\t\t<option value=\\\"days\\\"><?php _e('Days', 'wc_warranty'); ?></option>\\\n\t\t\t\t\t\t\t\t\t\t<option value=\\\"weeks\\\"><?php _e('Weeks', 'wc_warranty'); ?></option>\\\n\t\t\t\t\t\t\t\t\t\t<option value=\\\"months\\\"><?php _e('Months', 'wc_warranty'); ?></option>\\\n\t\t\t\t\t\t\t\t\t\t<option value=\\\"years\\\"><?php _e('Years', 'wc_warranty'); ?></option>\\\n\t\t\t\t\t\t\t\t\t</select>\\\n\t\t\t\t\t\t\t\t</td>\\\n\t\t\t\t\t\t\t\t<td><a class=\\\"button warranty_addon_remove_variable\\\" href=\\\"#\\\">&times;</a></td>\\\n\t\t\t\t\t\t\t</tr>\";\n\n\t\t\t\t\t\t$(\"#variable_product_options\").on(\"click\", \".btn-add-warranty-variable\", function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tvar loop = $(this).data(\"loop\");\n\n\t\t\t\t\t\t\t$(\"#variable_warranty_addons_\"+ loop).append( variable_tmpl.replace(/_loop_/g, loop) );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$(\".warranty_addon_remove_variable\").on(\"click\", function(e) {\n\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t$(this).parents(\"tr\").eq(0).remove();\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$( '#woocommerce-product-data' ).on( 'woocommerce_variations_loaded' , function() {\n\t\t\t\t\t\t\t$( '.warranty_default_checkbox, .variable-warranty-type, .variable-warranty-length' ).change();\n\t\t\t\t\t\t\t$( '.warranty_default_checkbox, .variable-warranty-type, .variable-warranty-length' )\n\t\t\t\t\t\t\t\t.closest( '.woocommerce_variation' )\n\t\t\t\t\t\t\t\t.removeClass( 'variation-needs-update' );\n\t\t\t\t\t\t});\n\t\t\t\t\t\t$( '#woocommerce-product-data' ).on( 'woocommerce_variations_added', function() {\n\t\t\t\t\t\t\t$( '.warranty_default_checkbox, .variable-warranty-type, .variable-warranty-length' ).change();\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t<?php\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "07b46b7091aee5ca10ff1b8bc576cb8e", "score": "0.56049097", "text": "function antec_add_to_quote() {\r\n\t\tadd_action( 'wp_ajax_antec_add_to_quote', 'add_to_quote' );\r\n\t\tadd_action( 'wp_ajax_nopriv_antec_add_to_quote', 'add_to_quote' );\r\n\t\tfunction add_to_quote() {\r\n\t\t\tglobal $woocommerce;\r\n\r\n\t\t\t$product_id;\r\n\t\t\t$quantity;\r\n\t\t\t$custom_quantity;\r\n\t\t\t$product_variations;\r\n\t\t\t$grouped_products;\r\n\r\n\t\t\tif( isset($_POST['product']) ) {\r\n\t\t\t\t$product_id = $_POST['product'];\r\n\t\t\t} else {\r\n\t\t\t\t$product_id = null;\r\n\t\t\t}\r\n\t\t\tif( isset($_POST['quantity']) ) {\r\n\t\t\t\t$quantity = $_POST['quantity'];\r\n\t\t\t} else {\r\n\t\t\t\t$quantity = null;\r\n\t\t\t}\r\n\t\t\tif( isset($_POST['custom_quantity']) ) {\r\n\t\t\t\t$custom_quantity = sanitize_text_field($_POST['custom_quantity']);\r\n\t\t\t} else {\r\n\t\t\t\t$custom_quantity = null;\r\n\t\t\t}\r\n\t\t\tif( isset($_POST['variation']) ) {\r\n\t\t\t\t$product_variations = $_POST['variation'];\r\n\t\t\t} else {\r\n\t\t\t\t$product_variations = null;\r\n\t\t\t}\r\n\t\t\tif( isset($_POST['grouped']) ) {\r\n\t\t\t\t$grouped_products = $_POST['grouped'];\r\n\t\t\t} else {\r\n\t\t\t\t$grouped_products = null;\r\n\t\t\t}\r\n\r\n\t\t\tif( $grouped_products == null ) {\r\n\t\t\t\t$product = wc_get_product($product_id);\r\n\t\t\t\tif( $product->is_type( 'variable' ) ) {\r\n\t\t\t\t\t$variations = [];\r\n\t\t\t\t\t$attributes = [];\r\n\t\t\t\t\t$available_variations = $product->get_available_variations();\r\n\t\t\t\t\tforeach ($product_variations as $variation) {\r\n\t\t\t\t\t\t$values = array_values($variation);\r\n\t\t\t\t\t\t$variations[$values[0]] = $values[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ( $available_variations as $key => $val ) {\r\n\t\t\t\t\t\t$attributes[$val['variation_id']] = $val['attributes'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach ($attributes as $variation_id => $attribute) {\r\n\t\t\t\t\t\tif( $attribute === $variations ) {\r\n\t\t\t\t\t\t\t$woocommerce->cart->add_to_cart($product_id, $quantity, $variation_id, $attribute);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Submit simple non-variable product\r\n\t\t\t\t\t$woocommerce->cart->add_to_cart($product_id, $quantity, null, null, array( '_custom_product_quantity' => $custom_quantity ) );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tforeach ($grouped_products as $grouped_product) {\r\n\t\t\t\t\t$product_id = $grouped_product['id'];\r\n\t\t\t\t\t$product_quantity = $grouped_product['quantity'];\r\n\t\t\t\t\t$woocommerce->cart->add_to_cart($product_id, $product_quantity);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$count = $woocommerce->cart->get_cart_contents_count();\r\n\t\t\twp_send_json($count);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cc8725f6828b2c7541e65e8149502ceb", "score": "0.55874205", "text": "function hide_add_to_cart_button_variable_product() {\n remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );\n}", "title": "" }, { "docid": "ee5ef6d0db26ba9938d7a69cd51fa8c9", "score": "0.5574934", "text": "public function wvpc_variable_fields( $loop, $variation_data, $variation ) {\r\n //var_dump($variation);$variation_data\r\n $id = $variation->ID;\r\n// $wpb_product_configurator = self::get_product_config($variation_post_id);\r\n// $id= get_the_ID();\r\n \r\n $args = array(\r\n \"post_type\" => \"vpc-config\",\r\n \"nopaging\" => true,\r\n );\r\n $configs = get_posts($args);\r\n $configs_ids=array(\"\"=> \"None\");\r\n foreach ($configs as $config)\r\n {\r\n $configs_ids[$config->ID]=$config->post_title;\r\n }\r\n ?>\r\n <tr>\r\n <td><?php\r\n// woocommerce_wp_radio(array(\r\n// 'name' => 'wvpc-variation-meta['.$variation_post_id.'][product_config]',\r\n// 'class' => 'wpb_radio_field',\r\n// 'id' => 'wpb_product_configurator_'.$variation_post_id,\r\n// 'options' => $this->get_configuration_list(),\r\n// 'label' => __('Product Configurator List: ', 'wpb'),\r\n// 'value' => $wpb_product_configurator,\r\n// 'wrapper_class' => 'wpb_radio_field_cont',\r\n//\r\n// ))\r\n $this->get_product_tab_row($id, $configs_ids, \"Configuration\");\r\n ?></td>\r\n </tr>\r\n <?php\r\n\r\n }", "title": "" }, { "docid": "38a1bfcdc82bc34ff5dc9f19bac9ea2d", "score": "0.55251044", "text": "public function test_get_variation() {\n\t\t$product = ProductHelper::create_variation_product();\n\t\t$children = $product->get_children();\n\t\t$variation_id = $children[0];\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id ) );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( $variation_id, $variation['id'] );\n\t\t$this->assertEquals( 'size', $variation['attributes'][0]['name'] );\n\t}", "title": "" }, { "docid": "38a8f44fa514f46adc7e04cdcb86a8cc", "score": "0.5480506", "text": "public function set_variation( $name = '' )\n\t{\n\t\tif( $name === '' ) $name = $this->get_default_variation();\n\t\t$this->set_value( 'vtt-variation', $name );\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "bca7f6eab96ac97bed6db22c19bc2200", "score": "0.5458121", "text": "function wpa_variation_price_min( $price, $product ) {\n\n // Main Price\n $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );\n $price = $prices[0] !== $prices[1] ? sprintf( __( '%1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );\n\n // Sale Price\n $prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );\n sort( $prices );\n $saleprice = $prices[0] !== $prices[1] ? sprintf( __( '%1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );\n\n if ( $price !== $saleprice ) {\n $price = '<ins>' . $price . '</ins><del>' . $saleprice . '</del>';\n }\n return $price;\n}", "title": "" }, { "docid": "0d7668ef52d209464ea6b176763caa6d", "score": "0.543795", "text": "function variation_price_format( $price, $product ) {\n\n#Step 1: Get product varations\n$available_variations = $product->get_available_variations();\n$countVar = count($available_variations);\n\n#Step 2: Create the variable product objects and get cheapest\n$variations = array();\n$varId;\n$lowestPrice = 0;\n\nfor ($x = 0; $x < $countVar; $x++) {\n $localVar = new WC_Product_Variation( $available_variations[$x]['variation_id'] );\n $variations[$x] = $localVar;\n\n $normalPrice = $localVar ->regular_price;\n if (!empty($normalPrice) and $normalPrice < $lowestPrice or $lowestPrice == 0) {\n $varId = $x;\n $lowestPrice = $localVar ->regular_price;\n }\n $salePrice = $localVar ->sale_price;\n if(!empty($salePrice) and $salePrice < $lowestPrice or $lowestPrice == 0) {\n $varId = $x;\n $lowestPrice = $localVar ->sale_price;\n }\n}\n\n$cheapestVar = $variations[$varId];\n\n// 2. New $price\nif ($cheapestVar ->sale_price != 0 and $cheapestVar ->sale_price < $cheapestVar ->regular_price) {\n$price = sprintf( __( '<div class=\"priceSaleTitle\">From</div><del>%1$s</del><ins>%2$s</ins>', 'woocommerce' ), wc_price( $cheapestVar ->regular_price ), wc_price( $cheapestVar ->sale_price ) );\n} else {\n$price = sprintf( __( '<div class=\"priceTitle\">From</div> %1$s', 'woocommerce' ), wc_price( $cheapestVar ->regular_price ) );\n}\n \n// 3. Return edited $price\n \nreturn $price;\n}", "title": "" }, { "docid": "a3db6019ee6e4144ccd41ae203346bbf", "score": "0.54301393", "text": "function pewc_variation_item_attributes( $attributes, $item ) {\n\tif( ! empty( $item['variation_field'] ) ) {\n\t\t$attributes['data-variations'] = join( ',', $item['variation_field'] );\n\t}\n\treturn $attributes;\n}", "title": "" }, { "docid": "5ec4231ad8b4bc64d134751740e103a4", "score": "0.5427699", "text": "private function get_current_variation()\n\t{\n\t\tif( $this->current_variation !== null ) return $this->current_variation;\n\t\t\n\t\t$variation = get_theme_mod( 'vtt-variation' );\n\t\tif( !$variation ) return $this->get_default_variation();\n\t\t\n\t\tif( array_key_exists($variation, $this->filtered_variations) ) return $variation;\n\t\t\n\t\t$vnames = array_keys($this->filtered_variations);\n\t\tif( count($this->filtered_variations) > 0 )\n\t\t\t//return $this->filtered_variations[$vnames[0]]['name'];\n\t\t\treturn get_theme_mod('vtt-variation');\n\t\treturn 'light';\n\t}", "title": "" }, { "docid": "5c7b9722f38652fe093f5171fbf926fd", "score": "0.5411013", "text": "public function alter_variation_json( $variation_data, $wc_product_variable, $variation_obj ) {\n\n $images = $this->get_all_image_sizes( $variation_data['variation_id'] );\n\n $variation_data['jck_additional_images'] = $images;\n\n return $variation_data;\n\n }", "title": "" }, { "docid": "b7b249f01b90b4acf814a4042b92389f", "score": "0.5395256", "text": "function fn_product_variations_exim_get_variation_options($product, $lang_code)\n{\n /** @var array $product_options_cache Internal cache */\n static $product_options_cache = array();\n\n if ($product['product_type'] != ProductManager::PRODUCT_TYPE_VARIATION || empty($product['parent_product_id'])) {\n return '';\n }\n\n /** @var ProductManager $product_manager */\n $product_manager = Tygh::$app['addons.product_variations.product.manager'];\n $variation_options = $product_manager->getProductVariationOptions($product);\n\n if (empty($variation_options)) {\n return '';\n }\n\n $parent_product_id = $product['parent_product_id'];\n\n if (!isset($product_options_cache[$lang_code][$parent_product_id])) {\n $product_options_cache[$lang_code][$parent_product_id] = fn_get_product_options($parent_product_id, $lang_code);\n }\n\n $product_options = $product_options_cache[$lang_code][$parent_product_id];\n $prepared_options = array();\n\n foreach ($variation_options as $option_id => $variant_id) {\n $option = isset($product_options[$option_id]) ? $product_options[$option_id] : array();\n $variant = isset($product_options[$option_id]['variants'][$variant_id]) ? $product_options[$option_id]['variants'][$variant_id] : array();\n\n if ($option && $variant) {\n $prepared_options[$option_id] = implode(PRODUCT_VARIATIONS_EXIM_OPTION_AND_VARIANT_DELIMITER, array(\n fn_exim_wrap_value($option['option_name'], PRODUCT_VARIATIONS_EXIM_OPTION_AND_VARIANT_ENCLOSURE, PRODUCT_VARIATIONS_EXIM_OPTION_AND_VARIANT_DELIMITER),\n fn_exim_wrap_value($variant['variant_name'], PRODUCT_VARIATIONS_EXIM_OPTION_AND_VARIANT_ENCLOSURE, PRODUCT_VARIATIONS_EXIM_OPTION_AND_VARIANT_DELIMITER),\n ));\n } else {\n $prepared_options = array();\n\n fn_set_notification('E', __('error'), __('product_variations.variation_option_is_not_available_for_parent', array(\n '[option_id]' => $option_id,\n '[product_code]' => $product['product_code'],\n )));\n break;\n }\n }\n\n return implode(\n PRODUCT_VARIATIONS_EXIM_OPTIONS_DELIMITER,\n fn_exim_wrap_value($prepared_options, PRODUCT_VARIATIONS_EXIM_OPTIONS_ENCLOSURE, PRODUCT_VARIATIONS_EXIM_OPTIONS_DELIMITER)\n );\n}", "title": "" }, { "docid": "cfa14ee9fc030df244462ecfc313af7a", "score": "0.53742945", "text": "function tho_add_woocommerce_title_variation( $title, $product ) {\n\n\tif ( empty( $product ) ) {\n\t\treturn $title;\n\t}\n\n\t$id = empty( $product->get_id() ) ? ( empty( $product->post->ID ) ? 0 : $product->post->ID ) : $product->get_id();\n\n\t$title = tho_backend_change_title( $title, $id );\n\n\t$title = THO_Trigger_Manager::instance()->title_trigger( $id, $title );\n\n\treturn $title;\n}", "title": "" }, { "docid": "1b12c1efd97c9351f59d7c66c63640e6", "score": "0.53489107", "text": "public function postUpdateHandler (Variant $variant, LifecycleEventArgs $event)\n {\n $changeSet = $event->getEntityManager()->getUnitOfWork()->getEntityChangeSet($event->getEntity());\n\n // If the sku has changed search for orders and run them through the approval process\n if (isset($changeSet['sku']))\n {\n $this->findOrders($variant->getClient()->getId(), $changeSet['sku'][1]);\n }\n }", "title": "" }, { "docid": "5d1ec37561806a74dfbf68b452566a54", "score": "0.5347755", "text": "public function woocommerce_shortcode_before_product_loop() {\n\n\t\t$this->is_in_product_shortcode = TRUE;\n\n\t}", "title": "" }, { "docid": "e76d0b198d2253ee7a9689bf58dc17b1", "score": "0.5332802", "text": "public function getVariationId() {\n return $this->variationId;\n }", "title": "" }, { "docid": "df046f04d3322e52a405add06246ac79", "score": "0.5318132", "text": "public function get_default_variation()\n\t{\n\t\t$name = 'light';\n\n\t\t$vnames = array_keys( $this->filtered_variations );\n\t\tif( count($this->filtered_variations) > 0 )\n\t\t\t$name = $this->filtered_variations[$vnames[0]]['name'];\n\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "13a6cd98fde5de548bda3a1220b66c4e", "score": "0.52941024", "text": "function wpms_abtest_delete_variation( $variation_id ) {\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . WPMS_AB_VARIATONS_TABLE;\n\t$sql = \"DELETE FROM {$table_name} WHERE id = '{$variation_id}'\";\n\t$wpdb->query($sql);\n}", "title": "" }, { "docid": "bbc35e761c4d1d548730835659b90a46", "score": "0.52919215", "text": "private function get_variation_data( $product ) {\n $variations = array();\n $args = array(\n 'post_parent' => $product->id,\n 'post_type' => 'product_variation',\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'fields' => 'ids',\n 'post_status' => 'publish',\n 'numberposts' => -1\n );\n\n $variation_ids = get_posts( $args );\n\n foreach ( $variation_ids as $child_id ) {\n $variation = $product->get_child( $child_id );\n if ( ! $variation->exists() ) {\n continue;\n }\n\n $variations[] = $this->get_formatted_variant( $variation, $product );\n }\n return $variations;\n }", "title": "" }, { "docid": "d3b125624c696118ff49aa1d18026e06", "score": "0.5288738", "text": "public function get_default_variation_id() {\n\n global $post, $woocommerce, $product;\n\n if( !$product )\n return false;\n\n $product_id = $product->get_id();\n $default_variation_id = $product_id;\n $transient_name = $this->get_transient_name( $product_id, \"dvi\" );\n\n if ( false === ( $default_variation_id = get_transient( $transient_name ) ) ) {\n\n if ($product->get_type() == 'variable') {\n\n $default_attributes = self::get_variation_default_attributes( $product );\n\n if( ! empty( $default_attributes ) ) {\n\n\t $variation_id = Iconic_WooThumbs_Product::find_matching_product_variation( $product, $default_attributes );\n\n\t if( ! empty( $variation_id ) ) {\n\t\t $default_variation_id = $variation_id;\n\t }\n\n }\n\n }\n\n set_transient( $transient_name, $default_variation_id, 12 * HOUR_IN_SECONDS );\n\n }\n\n return $default_variation_id;\n\n }", "title": "" }, { "docid": "bebd1e3b07b1ff2420a442a5faa0cb80", "score": "0.52819973", "text": "function createVariationsById($id, $variations) {\r\n $woocommerce = getWoocommerceConfig();\r\n\r\n foreach ($variations as $k => $v) {\r\n $varExist = checkVariationsByProductIdSku($id, $v['sku']);\r\n\r\n if ($varExist['exist']) {\r\n $res = $woocommerce->put('products/' . $id . '/variations/' . $varExist['idVariation'], $v);\r\n } else {\r\n $res = $woocommerce->post('products/' . $id . '/variations', $v);\r\n }\r\n\r\n// echo json_encode($res);\r\n }\r\n}", "title": "" }, { "docid": "eb5fb6d0b1806045a95e65b5a1845818", "score": "0.5260041", "text": "public function syncProductVariant(array $printful_variant, ProductInterface $product, $variation_bundle);", "title": "" }, { "docid": "02123d9de877316200fde314a51c39bf", "score": "0.52530307", "text": "public function test_product_variations_batch() {\n\t\t$product = ProductHelper::create_variation_product();\n\t\t$children = $product->get_children();\n\t\t$request = new WP_REST_Request( 'POST', '/wc/v4/products/' . $product->get_id() . '/variations/batch' );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'update' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $children[0],\n\t\t\t\t\t\t'description' => 'Updated description.',\n\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t'position' => 0,\n\t\t\t\t\t\t\t'src' => 'http://cldup.com/Dr1Bczxq4q.png',\n\t\t\t\t\t\t\t'alt' => 'test upload image',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'delete' => array(\n\t\t\t\t\t$children[1],\n\t\t\t\t),\n\t\t\t\t'create' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sku' => 'DUMMY SKU VARIABLE MEDIUM',\n\t\t\t\t\t\t'regular_price' => '12',\n\t\t\t\t\t\t'description' => 'A medium size.',\n\t\t\t\t\t\t'attributes' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'name' => 'pa_size',\n\t\t\t\t\t\t\t\t'option' => 'medium',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertContains( 'Updated description.', $data['update'][0]['description'] );\n\t\t$this->assertEquals( 'DUMMY SKU VARIABLE MEDIUM', $data['create'][0]['sku'] );\n\t\t$this->assertEquals( 'medium', $data['create'][0]['attributes'][0]['option'] );\n\t\t$this->assertEquals( $children[1], $data['delete'][0]['previous']['id'] );\n\n\t\t$request = new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations' );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$data = $response->get_data();\n\n\t\t$this->assertEquals( 2, count( $data ) );\n\n\t\twp_delete_attachment( $data[1]['image']['id'], true );\n\t}", "title": "" }, { "docid": "8ec648c8cc541d78acdf61e198024251", "score": "0.5242163", "text": "private function prepare_product_for_feed(\n\t\t$woo_product,\n\t\t&$attribute_variants ) {\n\t\t\t$product_data = $woo_product->prepare_product( null, true );\n\t\t\t$item_group_id = $product_data['retailer_id'];\n\t\t\t// prepare variant column for variable products\n\t\t\t$product_data['variant'] = '';\n\t\t\tif (\n\t\t\tWC_Facebookcommerce_Utils::is_variation_type( $woo_product->get_type() )\n\t\t\t) {\n\t\t\t\t$parent_id = $woo_product->get_parent_id();\n\n\t\t\t\tif ( ! isset( $attribute_variants[ $parent_id ] ) ) {\n\t\t\t\t\t$parent_product = new WC_Facebook_Product( $parent_id );\n\n\t\t\t\t\t$gallery_urls = array_filter( $parent_product->get_gallery_urls() );\n\t\t\t\t\t$variation_id = $parent_product->find_matching_product_variation();\n\t\t\t\t\t$variants_for_group = $parent_product->prepare_variants_for_group( true );\n\t\t\t\t\t$parent_attribute_values = array();\n\t\t\t\t\t$parent_attribute_values['gallery_urls'] = $gallery_urls;\n\t\t\t\t\t$parent_attribute_values['default_variant_id'] = $variation_id;\n\t\t\t\t\t$parent_attribute_values['item_group_id'] =\n\t\t\t\t\tWC_Facebookcommerce_Utils::get_fb_retailer_id( $parent_product );\n\t\t\t\t\tforeach ( $variants_for_group as $variant ) {\n\t\t\t\t\t\t$parent_attribute_values[ $variant['product_field'] ] =\n\t\t\t\t\t\t$variant['options'];\n\t\t\t\t\t}\n\t\t\t\t\t// cache product group variants\n\t\t\t\t\t$attribute_variants[ $parent_id ] = $parent_attribute_values;\n\t\t\t\t}\n\t\t\t\t$parent_attribute_values = $attribute_variants[ $parent_id ];\n\t\t\t\t$variants_for_item =\n\t\t\t\t$woo_product->prepare_variants_for_item( $product_data );\n\t\t\t\t$variant_feed_column = array();\n\t\t\t\tforeach ( $variants_for_item as $variant_array ) {\n\t\t\t\t\tstatic::format_variant_for_feed(\n\t\t\t\t\t\t$variant_array['product_field'],\n\t\t\t\t\t\t$variant_array['options'][0],\n\t\t\t\t\t\t$parent_attribute_values,\n\t\t\t\t\t\t$variant_feed_column\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( isset( $product_data['custom_data'] ) ) {\n\t\t\t\t\tforeach ( $product_data['custom_data'] as $product_field => $value ) {\n\t\t\t\t\t\tstatic::format_variant_for_feed(\n\t\t\t\t\t\t\t$product_field,\n\t\t\t\t\t\t\t$value,\n\t\t\t\t\t\t\t$parent_attribute_values,\n\t\t\t\t\t\t\t$variant_feed_column\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! empty( $variant_feed_column ) ) {\n\t\t\t\t\t$product_data['variant'] =\n\t\t\t\t\t'\"' . implode( ',', $variant_feed_column ) . '\"';\n\t\t\t\t}\n\t\t\t\tif ( isset( $parent_attribute_values['gallery_urls'] ) ) {\n\t\t\t\t\t$product_data['additional_image_urls'] =\n\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t$product_data['additional_image_urls'],\n\t\t\t\t\t\t$parent_attribute_values['gallery_urls']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( isset( $parent_attribute_values['item_group_id'] ) ) {\n\t\t\t\t\t$item_group_id = $parent_attribute_values['item_group_id'];\n\t\t\t\t}\n\n\t\t\t\t$product_data['default_product'] =\n\t\t\t\t$parent_attribute_values['default_variant_id'] == $woo_product->id\n\t\t\t\t? 'default'\n\t\t\t\t: '';\n\n\t\t\t\t// If this group has default variant value, log this product item\n\t\t\t\tif ( isset( $parent_attribute_values['default_variant_id'] ) &&\n\t\t\t\t! empty( $parent_attribute_values['default_variant_id'] ) ) {\n\t\t\t\t\t$this->has_default_product_count++;\n\t\t\t\t} else {\n\t\t\t\t\t$this->no_default_product_count++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// log simple product\n\t\t\tif ( ! isset( $product_data['default_product'] ) ) {\n\t\t\t\t$this->no_default_product_count++;\n\t\t\t\t$product_data['default_product'];\n\t\t\t}\n\n\t\t\treturn $product_data['retailer_id'] . ',' .\n\t\t\tstatic::format_string_for_feed( $product_data['name'] ) . ',' .\n\t\t\tstatic::format_string_for_feed( $product_data['description'] ) . ',' .\n\t\t\t$product_data['image_url'] . ',' .\n\t\t\t$product_data['url'] . ',' .\n\t\t\tstatic::format_string_for_feed( $product_data['category'] ) . ',' .\n\t\t\tstatic::format_string_for_feed( $product_data['brand'] ) . ',' .\n\t\t\tstatic::format_price_for_feed(\n\t\t\t\t$product_data['price'],\n\t\t\t\t$product_data['currency']\n\t\t\t) . ',' .\n\t\t\t$product_data['availability'] . ',' .\n\t\t\t$item_group_id . ',' .\n\t\t\t$product_data['checkout_url'] . ',' .\n\t\t\tstatic::format_additional_image_url(\n\t\t\t\t$product_data['additional_image_urls']\n\t\t\t) . ',' .\n\t\t\t$product_data['sale_price_start_date'] . '/' .\n\t\t\t$product_data['sale_price_end_date'] . ',' .\n\t\t\tstatic::format_price_for_feed(\n\t\t\t\t$product_data['sale_price'],\n\t\t\t\t$product_data['currency']\n\t\t\t) . ',' .\n\t\t\t'new' . ',' .\n\t\t\t$product_data['visibility'] . ',' .\n\t\t\t$product_data['default_product'] . ',' .\n\t\t\t$product_data['variant'] . PHP_EOL;\n\t\t}", "title": "" }, { "docid": "8832fdd299101790ef0c3411408c0182", "score": "0.52404726", "text": "function woocommerce_custom_variation_meta_fields( $loop, $variation_data, $variation ) {\n\n\t\t// get variation post_id - WC2.3\n\t\t$variation_post_id = $variation ? $variation->ID : false;\n\n\t\t// handle custom variation meta fields\n\t\t$variation_meta_fields = get_option('wpla_variation_meta_fields', array() );\n\t\tforeach ( $variation_meta_fields as $key => $varmeta ) :\n\n\t\t\t// $meta_key = 'meta_'.$key;\n\t\t\t$field_label = $varmeta['label'];\n\n\t\t\t// get current value\n\t\t\t$current_value = get_post_meta( $variation_post_id, $key, true );\n\t\t\t?>\n\n <div>\n <p class=\"form-row form-row-full\">\n <label>\n <?php echo $field_label ?>\n </label> \n <input type=\"text\" name=\"variable_wpla_<?php echo $key; ?>[<?php echo $loop; ?>]\" class=\"\" value=\"<?php echo $current_value ?>\" placeholder=\"\" />\n </p>\n </div>\n\n\t\t\t<?php\n\t\tendforeach;\n\n\t}", "title": "" }, { "docid": "e51ac60cdbd7074b9d23033fa18df1b6", "score": "0.52178943", "text": "public function addProductToCart ( $productType = null , $productID = null , $variationID = null , $quantity = null , $ajaxCall = true ) {\n\n if( $ajaxCall === true ) {\n\n $productID = $_POST[ 'productID' ];\n $variationID = $_POST[ 'variationID' ];\n $quantity = $_POST[ 'quantity' ];\n $productType = $_POST[ 'productType' ];\n\n }\n\n if( ( empty( $variationID ) || !is_numeric( $variationID ) || $variationID <= 0 ) && strcasecmp( $productType , 'variable' ) == 0 ) {\n\n if ( $ajaxCall === true ) {\n\n header( 'Content-Type: application/json' ); // specify we return json\n echo json_encode( array(\n 'status' => 'failed',\n 'error_message' => __( 'Trying to add a variable product with no variation provided' , 'woocommerce-wholesale-order-form' )\n ) );\n die();\n\n } else\n return false;\n\n }\n\n if ( !empty( $variationID ) && is_numeric( $variationID ) && $variationID > 0 ) {\n\n $variation = wc_get_product( $variationID );\n $passed_validation \t= apply_filters( 'woocommerce_add_to_cart_validation' , true , $productID , $quantity , $variationID , $variation->get_variation_attributes() );\n\n if ( $passed_validation ) {\n\n $cart_key = WC()->cart->add_to_cart( $productID , $quantity , $variationID , $variation->get_variation_attributes() );\n\n } else {\n\n if ( $ajaxCall === true ) {\n\n header( 'Content-Type: application/json' ); // specify we return json\n echo json_encode( array(\n 'status' => 'failed',\n 'error_message' => __( 'Failed add to cart validation' , 'woocommerce-wholesale-order-form' )\n ) );\n die();\n\n } else\n return false;\n\n }\n\n } else {\n\n $passed_validation \t= apply_filters( 'woocommerce_add_to_cart_validation' , true , $productID , $quantity );\n\n if ( $passed_validation ) {\n\n $cart_key = WC()->cart->add_to_cart( $productID , $quantity );\n\n } else {\n\n if ( $ajaxCall === true ) {\n\n header('Content-Type: application/json'); // specify we return json\n echo json_encode( array(\n 'status' => 'failed',\n 'error_message' => __( 'Failed add to cart validation' , 'woocommerce-wholesale-order-form' )\n ) );\n die();\n\n } else\n return false;\n\n }\n\n }\n\n do_action( 'woocommerce_ajax_added_to_cart' , $productID );\n\n // Set cart woocommerce and cart cookies. Bug Fix : WWOF-16\n $this->maybe_set_cart_cookies();\n\n if ( $ajaxCall === true ) {\n\n // Get mini cart\n ob_start();\n\n woocommerce_mini_cart();\n\n $mini_cart = ob_get_clean();\n\n header('Content-Type: application/json'); // specify we return json\n echo json_encode( array(\n 'status' => 'success',\n 'cart_subtotal_markup' => $this->getCartSubtotal(),\n 'cart_key' => $cart_key,\n 'fragments' => apply_filters( 'woocommerce_add_to_cart_fragments' , array( 'div.widget_shopping_cart_content' => '<div class=\"widget_shopping_cart_content\">' . $mini_cart . '</div>' ) ),\n 'cart_hash' => apply_filters( 'woocommerce_add_to_cart_hash' , WC()->cart->get_cart() ? md5( json_encode( WC()->cart->get_cart() ) ) : '' , WC()->cart->get_cart() )\n ) );\n die();\n\n } else\n return true;\n\n }", "title": "" }, { "docid": "05e47aae27d8e062ed7ad98efb540975", "score": "0.5215454", "text": "function wd_add_donation_field_data( $variations ) {\n\n $variations['woo_donation_field'] = '\n\n <div class=\"woocommerce_woo_donation_field\">\n\n Donation Amount: \n\n <span>'. get_post_meta( $variations['variation_id'], 'woo_donation_field', true ) .'</span>\n\n </div>';\n\n return $variations;\n}", "title": "" }, { "docid": "84465205e463d091b3103b8c7bd34067", "score": "0.52071667", "text": "protected function set_hooks() {\n\t\tadd_filter('wc_aelia_currencyswitcher_product_convert_callback', array($this, 'wc_aelia_currencyswitcher_product_convert_callback'), 10, 2);\n\t\tadd_action('woocommerce_process_product_meta_bundle', array($this->currencyprices_manager, 'process_product_meta'));\n\t\tadd_filter('woocommerce_bundle_price_html', array($this, 'woocommerce_bundle_price_html'), 10, 2);\n\t\tadd_filter('woocommerce_bundle_sale_price_html', array($this, 'woocommerce_bundle_sale_price_html'), 10, 2);\n\t\tadd_filter('woocommerce_bundle_wholesale_price_html', array($this, 'woocommerce_bundle_wholesale_price_html'), 10, 2); // added by Carlo\n\t}", "title": "" }, { "docid": "a28306ce6a323a9fb020251349945476", "score": "0.5203698", "text": "function wpms_abtest_dbase_get_specific_total_visits_variation( $variation_id ) {\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . WPMS_AB_VARIATONS_TABLE;\n\t$sql = \"SELECT * FROM {$table_name} WHERE id = {$variation_id}\";\n\t$results = $wpdb->get_results( $sql, OBJECT );\n\tforeach($results as $totals)\n\t{\n\t\t$total_visits = $totals->visits;\n\t}\t\n\treturn $total_visits;\n}", "title": "" }, { "docid": "ee971f07fdb9f312b83b1a8754436527", "score": "0.5202936", "text": "public function get_variation_title()\n\t{\n\t\treturn $this->current_variation['title'];\n\t}", "title": "" }, { "docid": "5205f287470d3ca9485351b7d3e05d87", "score": "0.5201802", "text": "function get_variations_by_parent_ids($data) {\n\t$id = $data->get_param('id');\n\t\n\tif (empty($id)) {\n\t\t$error = \"The products are not found\";\n\t\t$code = 1;\n\t\treturn api_error_404($error, $code);\n\t}\n\n\t$variations_data = array();\n\t$args = array(\n\t 'post_type' => 'product_variation',\n\t 'post_status' => array( 'private', 'publish' ),\n\t 'numberposts' => -1,\n\t 'orderby' => 'menu_order',\n\t 'order' => 'asc',\n\t 'post_parent' => $id // get parent post-ID\n\t);\n\t$variations = get_posts( $args );\n\n\t$i = 0;\n\tforeach ( $variations as $variation ) {\n\t // get variations meta\n\t $product_variation = new WC_Product_Variation($variation->ID);\n\n\t if (!empty($product_variation)) {\n\t \t$variation_data = $product_variation->get_data();\n\t\t\t$variations_data[$i] = (object) [\n\t\t\t \"id\" => $variation->ID,\n\t\t\t\t\"sku\" => $variation_data['sku'],\n\t\t\t\t\"description\" => $variation_data['description']\n\t\t\t];\n\n\t\t // get variation featured image\n\t\t $image_id = $product_variation->get_image_id();\n\n\t\t if (!empty($image_id)) {\n\t\t\t $variations_data[$i]->images = (object) [\n\t\t\t\t \"id\" => intval($image_id),\n\t\t\t\t\t\"alt\" => get_post_meta($image_id, '_wp_attachment_image_alt', TRUE ),\n\t\t\t\t];\n\t\t } else {\n\t\t \t$variations_data[$i]->images = (object) [];\n\t\t }\n\t }\n\t\t$i++;\n\t}\n\n\treturn $variations_data;\n}", "title": "" }, { "docid": "3935a0b4a818364c4445e3264cca0b04", "score": "0.51931304", "text": "public function test_delete_variation() {\n\t\t$product = ProductHelper::create_variation_product();\n\t\t$children = $product->get_children();\n\t\t$variation_id = $children[0];\n\n\t\t$request = new WP_REST_Request( 'DELETE', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id );\n\t\t$request->set_param( 'force', true );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$this->assertEquals( 200, $response->get_status() );\n\n\t\t$response = $this->server->dispatch( new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations' ) );\n\t\t$variations = $response->get_data();\n\t\t$this->assertEquals( 1, count( $variations ) );\n\t}", "title": "" }, { "docid": "a43c472e662fdf15a1baaed7ae1dc8e1", "score": "0.5191351", "text": "function wd_save_donation_field_variations( $variation_id, $i ) {\n\n $wd_donation_field = $_POST['woo_donation_field'][$i];\n\n if( isset( $wd_donation_field ) ) {\n\n update_post_meta( $variation_id, 'woo_donation_field', sanitize_text_field( $wd_donation_field ) );\n\n }\n\n}", "title": "" }, { "docid": "c47873e181ae812636d31982eaaf8b05", "score": "0.5185585", "text": "function wc_wc20_variation_price_format( $price, $product ) {\n // Main Price\n $prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) );\n $price = $prices[0] !== $prices[1] ? sprintf( __( 'Starting at: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );\n\n // Sale Price\n $prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) );\n sort( $prices );\n $saleprice = $prices[0] !== $prices[1] ? sprintf( __( 'Starting at: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] );\n\n if ( $price !== $saleprice ) {\n $price = '<del>' . $saleprice . '</del> <ins>' . $price . '</ins>';\n }\n \n return $price;\n}", "title": "" }, { "docid": "7cec3e3f1265c93864de97ed5171e138", "score": "0.51835996", "text": "public function variable_product_sync( $product_id = '' ) {\n\t\tglobal $woocommerce;\n\n\t\tparent::variable_product_sync();\n\n\t\t$children = get_posts( array(\n\t\t\t'post_parent' \t=> $this->id,\n\t\t\t'posts_per_page'=> -1,\n\t\t\t'post_type' \t=> 'product_variation',\n\t\t\t'fields' \t\t=> 'ids',\n\t\t\t'post_status'\t=> 'publish'\n\t\t));\n\n\t\t$lowest_initial_amount = $highest_initial_amount = $lowest_price = $highest_price = '';\n\t\t$shortest_initial_period = $longest_initial_period = $shortest_trial_period = $longest_trial_period = $shortest_trial_length = $longest_trial_length = '';\n\t\t$longest_initial_interval = $shortest_initial_interval = $variable_subscription_period = $variable_subscription_period_interval = '';\n\t\t$lowest_regular_price = $highest_regular_price = $lowest_sale_price = $highest_sale_price = $max_subscription_period = $max_subscription_period_interval = '';\n\t\t$variable_subscription_sign_up_fee = $variable_subscription_trial_period = $variable_subscription_trial_length = $variable_subscription_length = $variable_subscription_sign_up_fee = $variable_subscription_trial_period = $variable_subscription_trial_length = $variable_subscription_length = '';\n\n\t\tif ( $children ) {\n\n\t\t\tforeach ( $children as $child ) {\n\n\t\t\t\t$is_max = $is_min = false;\n\n\t\t\t\t// WC has already determined the correct price which accounts for sale price\n\t\t\t\t$child_price = get_post_meta( $child, '_price', true );\n\n\t\t\t\t$child_billing_period = get_post_meta( $child, '_subscription_period', true );\n\t\t\t\t$child_billing_interval = get_post_meta( $child, '_subscription_period_interval', true );\n\t\t\t\t$child_sign_up_fee = get_post_meta( $child, '_subscription_sign_up_fee', true );\n\t\t\t\t$child_free_trial_length = get_post_meta( $child, '_subscription_trial_length', true );\n\t\t\t\t$child_free_trial_period = get_post_meta( $child, '_subscription_trial_period', true );\n\n\t\t\t\tif ( $child_price === '' && $child_sign_up_fee === '' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$child_price = ( $child_price === '' ) ? 0 : $child_price;\n\t\t\t\t$child_sign_up_fee = ( $child_sign_up_fee === '' ) ? 0 : $child_sign_up_fee;\n\n\t\t\t\t$has_free_trial = ( $child_free_trial_length !== '' && $child_free_trial_length > 0 ) ? true : false;\n\n\t\t\t\t// Determine some recurring price flags\n\t\t\t\t$is_lowest_price = ( $child_price < $lowest_price || '' === $lowest_price ) ? true : false;\n\t\t\t\t$is_longest_period = ( $child_billing_period === WC_Subscriptions::get_longest_period( $variable_subscription_period, $child_billing_period ) ) ? true : false;\n\t\t\t\t$is_longest_interval = ( $child_billing_interval >= $variable_subscription_period_interval || '' === $variable_subscription_period_interval ) ? true : false;\n\n\t\t\t\t// Find the amount the subscriber will have to pay up-front\n\t\t\t\tif ( $has_free_trial ) {\n\t\t\t\t\t$initial_amount = $child_sign_up_fee;\n\t\t\t\t\t$initial_period = $child_free_trial_period;\n\t\t\t\t\t$initial_interval = $child_free_trial_length;\n\t\t\t\t} else {\n\t\t\t\t\t$initial_amount = $child_price + $child_sign_up_fee;\n\t\t\t\t\t$initial_period = $child_billing_period;\n\t\t\t\t\t$initial_interval = $child_billing_interval;\n\t\t\t\t}\n\n\t\t\t\t// We have a free trial & no sign-up fee, so need to choose the longest free trial (and maybe the shortest)\n\t\t\t\tif ( $has_free_trial && $child_sign_up_fee == 0 ) {\n\n\t\t\t\t\t// First variation\n\t\t\t\t\tif ( '' === $longest_trial_period ) {\n\n\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t// If two variations have the same free trial, choose the variation with the lowest recurring price for the longest period\n\t\t\t\t\t} elseif ( $variable_subscription_trial_period === $child_free_trial_period && $child_free_trial_length === $variable_subscription_trial_length ) {\n\n\t\t\t\t\t\t// If the variation has the lowest recurring price, it's the cheapest\n\t\t\t\t\t\tif ( $is_lowest_price ) {\n\n\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t// When current variation's free trial is the same as the lowest, it's the cheaper if it has a longer billing schedule\n\t\t\t\t\t\t} elseif ( $child_price === $lowest_price ) {\n\n\t\t\t\t\t\t\tif ( $is_longest_period && $is_longest_interval ) {\n\n\t\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t\t// Longest with a new billing period\n\t\t\t\t\t\t\t} elseif ( $is_longest_period && $child_billing_period !== $variable_subscription_trial_period ) {\n\n\t\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise the cheapest variation is the one with the longer trial\n\t\t\t\t\t} elseif ( $variable_subscription_trial_period === $child_free_trial_period ) {\n\n\t\t\t\t\t\t$is_min = ( $child_free_trial_length > $variable_subscription_trial_length ) ? true : false;\n\n\t\t\t\t\t// Otherwise just a longer trial period (that isn't equal to the longest period)\n\t\t\t\t\t} elseif ( $child_free_trial_period === WC_Subscriptions::get_longest_period( $longest_trial_period, $child_free_trial_period ) ) {\n\n\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $is_min ) {\n\t\t\t\t\t\t$longest_trial_period = $child_free_trial_period;\n\t\t\t\t\t\t$longest_trial_length = $child_free_trial_length;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the current cheapest variation is also free then the shortest trial period is the most expensive\n\t\t\t\t\tif ( 0 == $lowest_price || '' === $lowest_price ) {\n\n\t\t\t\t\t\tif ( '' === $shortest_trial_period ) {\n\n\t\t\t\t\t\t\t$is_max = true;\n\n\t\t\t\t\t\t// Need to check trial length\n\t\t\t\t\t\t} elseif ( $shortest_trial_period === $child_free_trial_period ) {\n\n\t\t\t\t\t\t\t$is_max = ( $child_free_trial_length < $shortest_trial_length ) ? true : false;\n\n\t\t\t\t\t\t// Need to find shortest period\n\t\t\t\t\t\t} elseif ( $child_free_trial_period === WC_Subscriptions::get_shortest_period( $shortest_trial_period, $child_free_trial_period ) ) {\n\n\t\t\t\t\t\t\t$is_max = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( $is_max ) {\n\t\t\t\t\t\t\t$shortest_trial_period = $child_free_trial_period;\n\t\t\t\t\t\t\t$shortest_trial_length = $child_free_trial_length;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$longest_initial_period = WC_Subscriptions::get_longest_period( $longest_initial_period, $initial_period );\n\t\t\t\t\t$shortest_initial_period = WC_Subscriptions::get_shortest_period( $shortest_initial_period, $initial_period );\n\n\t\t\t\t\t$is_lowest_initial_amount = ( $initial_amount < $lowest_initial_amount || '' === $lowest_initial_amount ) ? true : false;\n\t\t\t\t\t$is_longest_initial_period = ( $initial_period === $longest_initial_period ) ? true : false;\n\t\t\t\t\t$is_longest_initial_interval = ( $initial_interval >= $longest_initial_interval || '' === $longest_initial_interval ) ? true : false;\n\n\t\t\t\t\t$is_highest_initial = ( $initial_amount > $highest_initial_amount || '' === $highest_initial_amount ) ? true : false;\n\t\t\t\t\t$is_shortest_period = ( $initial_period === $shortest_initial_period || '' === $shortest_initial_period ) ? true : false;\n\t\t\t\t\t$is_shortest_interval = ( $initial_interval < $shortest_initial_interval || '' === $shortest_initial_interval ) ? true : false;\n\n\t\t\t\t\t// If we're not dealing with the lowest initial access amount, then ignore this variation\n\t\t\t\t\tif ( ! $is_lowest_initial_amount && $initial_amount !== $lowest_initial_amount ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the variation has the lowest price, it's the cheapest\n\t\t\t\t\tif ( $is_lowest_initial_amount ) {\n\n\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t// When current variation's price is the same as the lowest, it's the cheapest only if it has a longer billing schedule\n\t\t\t\t\t} elseif ( $initial_amount === $lowest_initial_amount ) {\n\n\t\t\t\t\t\t// We need to check the recurring schedule when the sign-up fee & free trial periods are equal\n\t\t\t\t\t\tif ( $has_free_trial && $initial_period == $longest_initial_period && $initial_interval == $longest_initial_interval ) {\n\n\t\t\t\t\t\t\t// If the variation has the lowest recurring price, it's the cheapest\n\t\t\t\t\t\t\tif ( $is_lowest_price ) {\n\n\t\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t\t// When current variation's price is the same as the lowest, it's the cheapest only if it has a longer billing schedule\n\t\t\t\t\t\t\t} elseif ( $child_price === $lowest_price ) {\n\n\t\t\t\t\t\t\t\tif ( $is_longest_period && $is_longest_interval ) {\n\n\t\t\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t\t\t// Longest with a new billing period\n\t\t\t\t\t\t\t\t} elseif ( $is_longest_period && $child_billing_period !== $variable_subscription_period ) {\n\n\t\t\t\t\t\t\t\t\t$is_min = true;\n\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// Longest initial term is the cheapest\n\t\t\t\t\t\t} elseif ( $is_longest_initial_period && $is_longest_initial_interval ) {\n\n\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t// Longest with a new billing period\n\t\t\t\t\t\t} elseif ( $is_longest_initial_period && $initial_period !== $longest_initial_period ) {\n\n\t\t\t\t\t\t\t$is_min = true;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// If we have the highest price for the shortest period, we might have the maximum variation\n\t\t\t\t\tif ( $is_highest_initial && $is_shortest_period && $is_shortest_interval ) {\n\n\t\t\t\t\t\t$is_max = true;\n\n\t\t\t\t\t// But only if its for the shortest billing period\n\t\t\t\t\t} elseif ( $child_price === $highest_price ) {\n\n\t\t\t\t\t\tif ( $is_shortest_period && $is_shortest_interval ) {\n\t\t\t\t\t\t\t$is_max = true;\n\t\t\t\t\t\t} elseif ( $is_shortest_period ) {\n\t\t\t\t\t\t\t$is_max = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If it's the min subscription terms\n\t\t\t\tif ( $is_min ) {\n\n\t\t\t\t\t$min_variation_id = $child;\n\n\t\t\t\t\t$lowest_price = $child_price;\n\t\t\t\t\t$lowest_regular_price = get_post_meta( $child, '_regular_price', true );\n\t\t\t\t\t$lowest_sale_price = get_post_meta( $child, '_sale_price', true );\n\n\t\t\t\t\t$lowest_regular_price = ( '' === $lowest_regular_price ) ? 0 : $lowest_regular_price;\n\t\t\t\t\t$lowest_sale_price = ( '' === $lowest_sale_price ) ? 0 : $lowest_sale_price;\n\n\t\t\t\t\t$lowest_initial_amount = $initial_amount;\n\t\t\t\t\t$longest_initial_period = $initial_period;\n\t\t\t\t\t$longest_initial_interval = $initial_interval;\n\n\t\t\t\t\t$variable_subscription_sign_up_fee = $child_sign_up_fee;\n\t\t\t\t\t$variable_subscription_period = $child_billing_period;\n\t\t\t\t\t$variable_subscription_period_interval = $child_billing_interval;\n\t\t\t\t\t$variable_subscription_trial_length = $child_free_trial_length;\n\t\t\t\t\t$variable_subscription_trial_period = $child_free_trial_period;\n\t\t\t\t\t$variable_subscription_length = get_post_meta( $child, '_subscription_length', true );\n\t\t\t\t}\n\n\t\t\t\tif ( $is_max ) {\n\n\t\t\t\t\t$max_variation_id = $child;\n\n\t\t\t\t\t$highest_price = $child_price;\n\t\t\t\t\t$highest_regular_price = get_post_meta( $child, '_regular_price', true );\n\t\t\t\t\t$highest_sale_price = get_post_meta( $child, '_sale_price', true );\n\t\t\t\t\t$highest_initial_amount = $initial_amount;\n\n\t\t\t\t\t$highest_regular_price = ( '' === $highest_regular_price ) ? 0 : $highest_regular_price;\n\t\t\t\t\t$highest_sale_price = ( '' === $highest_sale_price ) ? 0 : $highest_sale_price;\n\n\t\t\t\t\t$max_subscription_period = $child_billing_period;\n\t\t\t\t\t$max_subscription_period_interval = $child_billing_interval;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tupdate_post_meta( $this->id, '_min_price_variation_id', $min_variation_id );\n\t\t\tupdate_post_meta( $this->id, '_max_price_variation_id', $max_variation_id );\n\n\t\t\tupdate_post_meta( $this->id, '_price', $lowest_price );\n\t\t\tupdate_post_meta( $this->id, '_min_variation_price', $lowest_price );\n\t\t\tupdate_post_meta( $this->id, '_max_variation_price', $highest_price );\n\t\t\tupdate_post_meta( $this->id, '_min_variation_regular_price', $lowest_regular_price );\n\t\t\tupdate_post_meta( $this->id, '_max_variation_regular_price', $highest_regular_price );\n\t\t\tupdate_post_meta( $this->id, '_min_variation_sale_price', $lowest_sale_price );\n\t\t\tupdate_post_meta( $this->id, '_max_variation_sale_price', $highest_sale_price );\n\n\t\t\tupdate_post_meta( $this->id, '_min_variation_period', $variable_subscription_period );\n\t\t\tupdate_post_meta( $this->id, '_max_variation_period', $variable_subscription_period_interval );\n\t\t\tupdate_post_meta( $this->id, '_min_variation_period_interval', $max_subscription_period );\n\t\t\tupdate_post_meta( $this->id, '_max_variation_period_interval', $max_subscription_period_interval );\n\n\t\t\tupdate_post_meta( $this->id, '_subscription_price', $lowest_price );\n\t\t\tupdate_post_meta( $this->id, '_subscription_sign_up_fee', $variable_subscription_sign_up_fee );\n\t\t\tupdate_post_meta( $this->id, '_subscription_period', $variable_subscription_period );\n\t\t\tupdate_post_meta( $this->id, '_subscription_period_interval', $variable_subscription_period_interval );\n\t\t\tupdate_post_meta( $this->id, '_subscription_trial_period', $variable_subscription_trial_period );\n\t\t\tupdate_post_meta( $this->id, '_subscription_trial_length', $variable_subscription_trial_length );\n\t\t\tupdate_post_meta( $this->id, '_subscription_length', $variable_subscription_length );\n\n\t\t\t$this->subscription_price = $lowest_price;\n\t\t\t$this->subscription_sign_up_fee = $variable_subscription_sign_up_fee;\n\t\t\t$this->subscription_period = $variable_subscription_period;\n\t\t\t$this->subscription_period_interval = $variable_subscription_period_interval;\n\t\t\t$this->subscription_trial_period = $variable_subscription_trial_period;\n\t\t\t$this->subscription_trial_length = $variable_subscription_trial_length;\n\t\t\t$this->subscription_length = $variable_subscription_length;\n\n\t\t\tif ( function_exists( 'wc_delete_product_transients' ) ) {\n\t\t\t\twc_delete_product_transients( $this->id );\n\t\t\t} else {\n\t\t\t\t$woocommerce->clear_product_transients( $this->id );\n\t\t\t}\n\n\t\t} else { // No variations yet\n\n\t\t\t$this->subscription_price = '';\n\t\t\t$this->subscription_sign_up_fee = '';\n\t\t\t$this->subscription_period = 'day';\n\t\t\t$this->subscription_period_interval = 1;\n\t\t\t$this->subscription_trial_period = 'day';\n\t\t\t$this->subscription_trial_length = 1;\n\t\t\t$this->subscription_length = 0;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "679b158a2f0659bf1f99960c8e442f94", "score": "0.51813596", "text": "public function add_price_part(){\r\n\r\n //add_action( 'sed_shop_single_product_price', 'woocommerce_template_single_add_to_cart' , 15 );\r\n\r\n }", "title": "" }, { "docid": "48529cb5efe680be346cd286775007b7", "score": "0.51810616", "text": "function variation_settings_fields( $loop, $variation_data, $variation ) {\n\n\t\t\t// Get currency conversion rate from settings\n\t\t\t$currentcy_settings = get_option( 'gnc_currency_settings' );\n\t\t\t$rate = $currentcy_settings[gnc_currency_text_field_0];\n\t\t\n\t\t\t\n\t\t\t// Text Field\n\t\t\techo '<p class=\"form-row col-3 firstCol dolarRate\">'.'Tipo de cambio = $'.$rate. '</p>';\n\t\t\t// Text Field\n\t\t\techo '<p class=\"form-row col-3 firstCol divchangeDolar\"> <a href=\"/wp-admin/options-general.php?page=gnc_storefront\" target=\"_blank\">Modificar tipo de cambio</a></p>';\n\t\t\n woocommerce_wp_text_input(\n array(\n\t\t\t\t\t\t'id' => \"_dolar_price_field{$loop}\",\n\t\t\t\t\t\t'name' => \"_dolar_price_field[{$loop}]\",\n 'value' => get_post_meta( $variation->ID, '_dolar_price_field', true ),\n 'label' => __( 'Precio en dolares', 'woocommerce' ),\n 'desc_tip' => true,\n 'description' => __( 'ponga el precio en dolares ', 'woocommerce' ),\n 'wrapper_class' => 'divRegularPrice',\n )\n\t\t);\n\t\t\n\t\twoocommerce_wp_text_input(\n\t\t\tarray(\n\t\t\t\t\t'id' => \"_dolar_price_field_sale{$loop}\",\n\t\t\t\t\t'name' => \"_dolar_price_field_sale[{$loop}]\",\n\t\t\t\t\t'value' => get_post_meta( $variation->ID, '_dolar_price_field_sale', true ),\n\t\t\t\t\t'label' => __( 'Promocion en dolares', 'woocommerce' ),\n\t\t\t\t\t'desc_tip' => true,\n\t\t\t\t\t'description' => __( 'ponga la promocion en dolares del producto', 'woocommerce' ),\n\t\t\t\t\t'wrapper_class' => 'divSalePrice',\n\t\t\t)\n\t);\n\n}", "title": "" }, { "docid": "ca691d2139cf32826b5ced975d9915bb", "score": "0.5172175", "text": "function save_product_variation( $variation_id, $i ) {\n\n $this->delete_transients( true, $variation_id );\n\n if ( isset( $_POST['variation_image_gallery'][$variation_id] ) ) {\n\n update_post_meta($variation_id, 'variation_image_gallery', $_POST['variation_image_gallery'][$variation_id]);\n\n }\n\n }", "title": "" }, { "docid": "fae7db5d56ccc29b14197b6cfc930d7b", "score": "0.515818", "text": "public function __construct() {\n\t\tadd_filter( 'woocommerce_product_data_tabs', array( $this, 'variation_images_tab' ) );\n\t\tadd_action( 'woocommerce_product_data_panels', array( $this, 'variation_images_panel' ) );\n\t\tadd_action( 'woocommerce_process_product_meta_variable', array( $this, 'save_variation_images' ) );\n\t}", "title": "" }, { "docid": "7e2c92c0201419e95702977b46a1615a", "score": "0.5131546", "text": "public function mwb_wpr_append_variable_point(){\n\t\t\t$response['result'] = false;\n\t\t\t$response['message'] = __(\"Error during various variation handling. Try Again!\",MWB_WPR_Domain);\n\t\t\t$mwb_wpr_proceed_for_purchase_throgh_point = false;\n\t\t\t$points_calculation = '';$price = '';\n\t\t\t$variation_id = sanitize_post($_POST['variation_id']);\n\t\t\t//print_r($variation_id);\n\t\t\t$general_settings = get_option('mwb_wpr_settings_gallery',true);\n\t\t\t$mwb_wpr_restrict_pro_by_points = isset($general_settings['mwb_wpr_restrict_pro_by_points']) ? intval($general_settings['mwb_wpr_restrict_pro_by_points']) : 0;\n\t\t\t$mwb_wpr_categ_list = is_array($general_settings['mwb_wpr_restrictions_for_purchasing_cat']) && !empty($general_settings['mwb_wpr_restrictions_for_purchasing_cat']) ? $general_settings['mwb_wpr_restrictions_for_purchasing_cat'] : array();\n\t\t\t$user_id = get_current_user_ID();\n\t\t\tif(!empty($variation_id)){\n\t\t\t\t$user_level = get_user_meta($user_id,'membership_level',true);\n\t\t\t\t$get_points = (int)get_user_meta($user_id, 'mwb_wpr_points', true);\n\t\t\t\t$mwb_wpr_mem_expr = get_user_meta($user_id,'membership_expiration',true);\n\t\t\t\t$membership_settings_array = get_option('mwb_wpr_membership_settings',true);\n\t\t\t\t$mwb_wpr_membership_roles = isset($membership_settings_array['membership_roles']) && !empty($membership_settings_array['membership_roles']) ? $membership_settings_array['membership_roles'] : array();\n\t\t\t\t$today_date = date_i18n(\"Y-m-d\");\n\t\t\t\t$mwb_wpr_purchase_product_text = isset($general_settings['mwb_wpr_purchase_product_text']) ? $general_settings['mwb_wpr_purchase_product_text'] : __('Use your Points for purchasing this Product',MWB_WPR_Domain);\n\t\t\t\t$mwb_wpr_parent_id = wp_get_post_parent_id($variation_id);\n\t\t\t\t$general_settings = get_option('mwb_wpr_settings_gallery',true);\n\t\t\t\t$enable_purchase_points = isset($general_settings['enable_purchase_points']) ? intval($general_settings['enable_purchase_points']) : 0;\n\t\t\t\t$mwb_wpr_purchase_points = (isset($general_settings['mwb_wpr_purchase_points']) && $general_settings['mwb_wpr_purchase_points'] != null) ? $general_settings['mwb_wpr_purchase_points'] : 1;\n\t\t\t\t$new_price = 1;\n\t\t\t\t$mwb_wpr_product_purchase_price = (isset($general_settings['mwb_wpr_product_purchase_price']) && $general_settings['mwb_wpr_product_purchase_price'] != null) ? intval($general_settings['mwb_wpr_product_purchase_price']) : 1;\n\t\t\t\t$mwb_wpr_restrict_pro_by_points = isset($general_settings['mwb_wpr_restrict_pro_by_points']) ? intval($general_settings['mwb_wpr_restrict_pro_by_points']) : 0;\n\t\t\t\tif(!empty($mwb_wpr_parent_id) && $mwb_wpr_parent_id > 0){\n\t\t\t\t\t$check_enable = get_post_meta($mwb_wpr_parent_id, 'mwb_product_points_enable', 'no');\n\t\t\t\t\t$check_disbale = get_post_meta($mwb_wpr_parent_id, 'mwb_product_purchase_through_point_disable', 'no');\n\t\t\t\t\tif(empty($check_disbale)){\n\t\t\t\t\t\t$check_disbale = 'no';\n\t\t\t\t\t}\n\t\t\t\t\tif($check_enable == 'yes'){\n\t\t\t\t\t\t$mwb_wpr_variable_points = (int)get_post_meta( $variation_id,'mwb_wpr_variable_points',true);\n\t\t\t\t\t\tif($mwb_wpr_variable_points > 0){\n\t\t\t\t\t\t\t$response['result'] = true;\n\t\t\t\t\t\t\t$response['variable_points'] = $mwb_wpr_variable_points;\n\t\t\t\t\t\t\t$response['message'] = __(\"Successfully Assigned!\",MWB_WPR_Domain);\n\t\t\t\t\t\t\t// echo json_encode($response);\n\t\t\t\t\t\t\t// wp_die();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($enable_purchase_points){\n\t\t\t\t\t\tif($mwb_wpr_restrict_pro_by_points){\n\t\t\t\t\t\t\t$terms = get_the_terms ( $mwb_wpr_parent_id, 'product_cat' );\n\t\t\t\t\t\t\tif(is_array($terms) && !empty($terms)){\n\t\t\t\t\t\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t\t\t\t\t $cat_id = $term->term_id;\n\t\t\t\t\t\t\t\t $parent_cat = $term->parent;\n\t\t\t\t\t\t\t\t\tif(isset($mwb_wpr_categ_list) && !empty($mwb_wpr_categ_list)){\n\t\t\t\t\t\t\t\t\t\tif(in_array($cat_id, $mwb_wpr_categ_list) || in_array($parent_cat, $mwb_wpr_categ_list)){\n\t\t\t\t\t\t\t\t\t\t\t$mwb_wpr_proceed_for_purchase_throgh_point = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\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\telse{\n\t\t\t\t\t\t\t\t\t\t$mwb_wpr_proceed_for_purchase_throgh_point = false;\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\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$mwb_wpr_proceed_for_purchase_throgh_point = true;\n\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$variable_product = wc_get_product( $variation_id );\n\t\t\t\t\t$variable_price = $variable_product->get_price();\n\t\t\t\t\tif(isset($user_level) && !empty($user_level)){\n\t\t\t\t\t\tif( isset( $mwb_wpr_mem_expr ) && !empty( $mwb_wpr_mem_expr ) && $today_date <= $mwb_wpr_mem_expr )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(is_array($mwb_wpr_membership_roles) && !empty($mwb_wpr_membership_roles))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($mwb_wpr_membership_roles as $roles => $values)\n\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\tif($user_level == $roles)\n\t\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t\tif(is_array($values['Product']) && !empty($values['Product']))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(in_array($mwb_wpr_parent_id, $values['Product']) && !$this->check_exclude_sale_products($variable_product))\n\t\t\t\t\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\t\t\t\t$new_price = $variable_price - ($variable_price * $values['Discount'])/100;\n\t\t\t\t\t\t\t\t\t\t\t\t$price = '<span class=\"price\"><del><span class=\"woocommerce-Price-amount amount\">'.wc_price( $variable_price ).'</del> <ins><span class=\"woocommerce-Price-amount amount\">'.wc_price($new_price).'</span></ins></span>';\n\t\t\t\t\t\t\t\t\t\t\t\t$points_calculation =ceil(($new_price*$mwb_wpr_purchase_points)/$mwb_wpr_product_purchase_price);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$response['result_price'] = \"html\";\n\t\t\t\t\t\t\t\t\t\t\t$response['variable_price_html'] = $price;\n\t\t\t\t\t\t\t\t\t\t\t$mwb_wpr_variable_pro_pur_pnt = '<label for=\"mwb_wpr_pro_cost_to_points\"><input type=\"checkbox\" name=\"mwb_wpr_pro_cost_to_points\" id=\"mwb_wpr_pro_cost_to_points\" class=\"input-text\" value=\"'.$points_calculation.'\">'.$mwb_wpr_purchase_product_text.'</label><input type=\"hidden\" name=\"mwb_wpr_hidden_points\" class=\"mwb_wpr_hidden_points\" value=\"'.$points_calculation.'\"><p class=\"mwb_wpr_purchase_pro_point\">'.__('Spend ',MWB_WPR_Domain).$points_calculation.__(' Points for Purchasing this Product for Single Quantity',MWB_WPR_Domain).'</p><span class=\"mwb_wpr_notice\"></span><div class=\"mwb_wpr_enter_some_points\" style=\"display: none;\"><input type=\"number\" name=\"mwb_wpr_some_custom_points\" id=\"mwb_wpr_some_custom_points\" value=\"'.$points_calculation.'\"></div>';\n\t\t\t\t\t\t\t\t\t\t\tif($enable_purchase_points && $mwb_wpr_proceed_for_purchase_throgh_point && $check_disbale == 'no'){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($get_points >= $points_calculation){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$response['result_point'] = \"product_purchased_using_point\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t$response['variable_points_cal_html'] = $mwb_wpr_variable_pro_pur_pnt;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telseif($points_calculation > $get_points){\n\t\t\t\t\t\t\t\t\t\t\t\t\t$extra_need = $points_calculation - $get_points;\n\t\t\t\t\t\t\t\t\t\t\t\t\t$mwb_wpr_variable_pro_pur_pnt = '<p class=\"mwb_wpr_purchase_pro_point\">'.__('You need extra ',MWB_WPR_Domain).$extra_need.__(' Points for get this product for free',MWB_WPR_Domain).'</p>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$response['result_point'] = \"product_purchased_using_point\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t$response['variable_points_cal_html'] = $mwb_wpr_variable_pro_pur_pnt;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if(!$this->check_exclude_sale_products($variable_product))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$terms = get_the_terms ( $mwb_wpr_parent_id, 'product_cat' );\n\t\t\t\t\t\t\t\t\t\t\tif(is_array($terms) && !empty($terms))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ( $terms as $term ) \n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t $cat_id = $term->term_id;\n\t\t\t\t\t\t\t\t\t\t\t\t $parent_cat = $term->parent;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($cat_id, $values['Prod_Categ']) || in_array($parent_cat, $values['Prod_Categ'])){\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$new_price = $variable_price - ($variable_price * $values['Discount'])/100;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$price = '<span class=\"price\"><del><span class=\"woocommerce-Price-amount amount\">'.wc_price( $variable_price ).'</del> <ins><span class=\"woocommerce-Price-amount amount\">'.wc_price($new_price).'</span></ins></span>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$points_calculation =ceil(($new_price*$mwb_wpr_purchase_points)/$mwb_wpr_product_purchase_price);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$response['result_price'] = \"html\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$response['variable_price_html'] = $price;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$mwb_wpr_variable_pro_pur_pnt = '<label for=\"mwb_wpr_pro_cost_to_points\"><input type=\"checkbox\" name=\"mwb_wpr_pro_cost_to_points\" id=\"mwb_wpr_pro_cost_to_points\" class=\"input-text\" value=\"'.$points_calculation.'\">'.$mwb_wpr_purchase_product_text.'</label><input type=\"hidden\" name=\"mwb_wpr_hidden_points\" class=\"mwb_wpr_hidden_points\" value=\"'.$points_calculation.'\"><p class=\"mwb_wpr_purchase_pro_point\">'.__('Spend ',MWB_WPR_Domain).$points_calculation.__(' Points for Purchasing this Product for Single Quantity',MWB_WPR_Domain).'</p><span class=\"mwb_wpr_notice\"></span><div class=\"mwb_wpr_enter_some_points\" style=\"display: none;\"><input type=\"number\" name=\"mwb_wpr_some_custom_points\" id=\"mwb_wpr_some_custom_points\" value=\"'.$points_calculation.'\"></div>';\n\t\t\t\t\t\t\t\t\t\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\tif($enable_purchase_points && $mwb_wpr_proceed_for_purchase_throgh_point && $check_disbale == 'no'){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($get_points >= $points_calculation){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$response['result_point'] = \"product_purchased_using_point\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$response['variable_points_cal_html'] = $mwb_wpr_variable_pro_pur_pnt;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telseif($enable_purchase_points && $points_calculation > $get_points){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$extra_need = $points_calculation - $get_points;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$mwb_wpr_variable_pro_pur_pnt = '<p class=\"mwb_wpr_purchase_pro_point\">'.__('You need extra ',MWB_WPR_Domain).$extra_need.__(' Points for get this product for free',MWB_WPR_Domain).'</p>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$response['result_point'] = \"product_purchased_using_point\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$response['variable_points_cal_html'] = $mwb_wpr_variable_pro_pur_pnt;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\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\telse{\n\t\t\t\t\t\t$points_calculation =ceil(($variable_price*$mwb_wpr_purchase_points)/$mwb_wpr_product_purchase_price);\n\t\t\t\t\t\t$mwb_wpr_variable_pro_pur_pnt = '<label for=\"mwb_wpr_pro_cost_to_points\"><input type=\"checkbox\" name=\"mwb_wpr_pro_cost_to_points\" id=\"mwb_wpr_pro_cost_to_points\" class=\"input-text\" value=\"'.$points_calculation.'\">'.$mwb_wpr_purchase_product_text.'</label><input type=\"hidden\" name=\"mwb_wpr_hidden_points\" class=\"mwb_wpr_hidden_points\" value=\"'.$points_calculation.'\"><p class=\"mwb_wpr_purchase_pro_point\">'.__('Spend ',MWB_WPR_Domain).$points_calculation.__(' Points for Purchasing this Product for Single Quantity',MWB_WPR_Domain).'</p><span class=\"mwb_wpr_notice\"></span><div class=\"mwb_wpr_enter_some_points\" style=\"display: none;\"><input type=\"number\" name=\"mwb_wpr_some_custom_points\" id=\"mwb_wpr_some_custom_points\" value=\"'.$points_calculation.'\"></div>';\n\t\t\t\t\t\tif($enable_purchase_points && $mwb_wpr_proceed_for_purchase_throgh_point && $check_disbale == 'no'){\n\t\t\t\t\t\t\t\tif($get_points >= $points_calculation){\n\t\t\t\t\t\t\t\t$response['result_point'] = \"product_purchased_using_point\";\n\t\t\t\t\t\t\t\t$response['variable_points_cal_html'] = $mwb_wpr_variable_pro_pur_pnt;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif($points_calculation > $get_points){\n\t\t\t\t\t\t\t\t$extra_need = $points_calculation - $get_points;\n\t\t\t\t\t\t\t\t$mwb_wpr_variable_pro_pur_pnt = '<p class=\"mwb_wpr_purchase_pro_point\">'.__('You need extra ',MWB_WPR_Domain).$extra_need.__(' Points for get this product for free',MWB_WPR_Domain).'</p>';\n\t\t\t\t\t\t\t\t$response['result_point'] = \"product_purchased_using_point\";\n\t\t\t\t\t\t\t\t$response['variable_points_cal_html'] = $mwb_wpr_variable_pro_pur_pnt;\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//MWB CUSTOM CODE\n\n\t\t\t\t$enable_product_purchase_points = get_post_meta($mwb_wpr_parent_id, 'mwb_product_purchase_points_only',true);\n\t\t\t\t$mwb_product_purchase_value = get_post_meta($variation_id, 'mwb_wpr_variable_points_purchase',true);\n\n\t\t\t\tif(isset($enable_product_purchase_points) && $enable_product_purchase_points == 'yes'){\n\t\t\t\t\tif(isset($mwb_product_purchase_value) && !empty($mwb_product_purchase_value))\n\t\t\t\t\t{\t\n\t\t\t\t\n\t\t\t\t\t\t//$price = $mwb_product_purchase_value.' Points';\n\t\t\t\t\t\t$response['purchase_pro_pnts_only'] = \"purchased_pro_points\";\n\t\t\t\t\t\t$response['price_html'] = $mwb_product_purchase_value;\n\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\n\t\t\t\t//END OF MWB CUSTOM CODE\n\t\t\t}\n\t\t\techo json_encode($response);\n\t\t\twp_die();\n\t\t}", "title": "" }, { "docid": "e7c67c125fde957c5aa135985fe16cff", "score": "0.5130296", "text": "function tho_add_title_variations( $title, $post_id = null ) {\n\n\t$post_type = get_post_type( $post_id );\n\tif ( $post_type == 'nav_menu_item' ) {\n\t\t$post_id = get_post_meta( $post_id, '_menu_item_object_id', true );\n\t}\n\n\tif ( tho_are_we_in( 'wc_add_to_cart_message' ) ) {\n\t\treturn tho_backend_change_title( $title, $post_id );\n\t}\n\n\t$title = THO_Trigger_Manager::instance()->title_trigger( $post_id, $title );\n\n\treturn $title;\n}", "title": "" }, { "docid": "5a145c915329d73e1cadc915bbda25b5", "score": "0.51120037", "text": "public function check_for_variations() {\n\t\tif( isset($_POST['nonce'] ) && wp_verify_nonce($_POST['nonce'], 'edd_gf_download_nonce') ) {\n\n\t\t\t$download_id = absint( $_POST['download_id'] );\n\n\t\t\t$response = array();\n\n\t\t\tif($prices = edd_get_variable_prices($download_id)) {\n\t\t\t\t$response = $prices;\n\n\t\t\t\t/**\n\t\t\t\t * Is there a default price variation? If so, pass it along.\n\t\t\t\t */\n\t\t\t\tif( function_exists('edd_get_default_variable_price') && $default_id = edd_get_default_variable_price( $download_id ) ) {\n\t\t\t\t\tforeach( $response as $key => $price ) {\n\t\t\t\t\t\t$response[ $key ]['default'] = intval( $default_id === $key );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\texit(json_encode($response));\n\t\t}\n\t}", "title": "" }, { "docid": "8a91d6cee125b1cce117b693d43f79af", "score": "0.5111479", "text": "public function init_settings_pre() {\n\n\t\t$postid = FALSE;\n\t\tif ( function_exists( 'ux_builder_is_iframe' ) && ux_builder_is_iframe() ) {\n\t\t\tif ( isset( $_GET['post_id'] ) ) {\n\t\t\t\t$postid = $_GET['post_id'];\n\t\t\t}\n\t\t} else {\n\t\t\tif ( ! isset( $_SERVER[\"HTTP_HOST\"] ) || ! isset( $_SERVER[\"REQUEST_URI\"] ) ) {\n\t\t\t\t$postid = 0;\n\t\t\t} else {\n\t\t\t\t$url = 'http://' . $_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"];\n\t\t\t\t$postid = THEMECOMPLETE_EPO_HELPER()->get_url_to_postid( $url );\n\t\t\t}\n\t\t}\n\n\t\t$this->postid_pre = $postid;\n\t\t$product = wc_get_product( $postid );\n\n\t\t$check1 = ( $postid === 0 );\n\t\t$check2 = ( $product\n\t\t && is_object( $product )\n\t\t && property_exists( $product, 'post' )\n\t\t && property_exists( $product->post, 'post_type' )\n\t\t && ( in_array( $product->post->post_type, array( 'product', 'product_variation' ) ) ) );\n\t\t$check3 = ( $product\n\t\t && is_object( $product )\n\t\t && property_exists( $product, 'post_type' )\n\t\t && ( in_array( $product->post_type, array( 'product', 'product_variation' ) ) ) );\n\n\t\tif ( $check1 || $check2 || $check3 ) {\n\t\t\tadd_action( 'template_redirect', array( $this, 'init_settings' ) );\n\t\t} else {\n\t\t\t$this->init_settings();\n\t\t}\n\n\t}", "title": "" }, { "docid": "9a59cac41ad8e8d5b4731c2f003d1ebc", "score": "0.51100534", "text": "private function get_simple_product_variations( $product_id, $product_data, $is_syncing = false )\n {\n $args = array(\n 'post_parent' => $product_id,\n 'post_type' => 'product_variation',\n 'orderby' => 'menu_order',\n 'order' => 'ASC',\n 'fields' => 'ids',\n 'post_status' => 'publish',\n 'numberposts' => -1\n );\n\n $variation_ids = get_posts( $args );\n $variations = [];\n\n $product = wc_get_product( $product_id );\n\n $variations[] = $this->get_formatted_variant( $product, $product );\n\n foreach ( $variation_ids as $variation_id ) {\n $variation = wc_get_product( $variation_id );\n\n if ( ! $variation->exists() ) {\n continue;\n }\n $variations[] = $this->get_formatted_variant( $variation, $product );\n }\n\n return $variations;\n }", "title": "" }, { "docid": "b6659a5a288be639fd0fbecb2c01660f", "score": "0.5105831", "text": "public function get_variation_attributes() {\n return $this->variation_data;\n }", "title": "" }, { "docid": "42b0d2f767a98341648152133273f5fb", "score": "0.5101578", "text": "public function test_create_variation_without_permission() {\n\t\twp_set_current_user( 0 );\n\t\t$product = ProductHelper::create_variation_product();\n\n\t\t$request = new WP_REST_Request( 'POST', '/wc/v4/products/' . $product->get_id() . '/variations' );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'sku' => 'DUMMY SKU VARIABLE MEDIUM',\n\t\t\t\t'regular_price' => '12',\n\t\t\t\t'description' => 'A medium size.',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'pa_size',\n\t\t\t\t\t\t'option' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$response = $this->server->dispatch( $request );\n\t\t$this->assertEquals( 401, $response->get_status() );\n\t}", "title": "" }, { "docid": "25245c7ade9273ac8f7fecae1ac0621d", "score": "0.5101072", "text": "private function process_variation_prices() {\n\t\t$sales = array();\n\t\t$originals = array();\n\t\t$diffs = array();\n\t\t$diff_percents = array();\n\n\t\tforeach ( $this->variations as $variation ) {\n\t\t\tif ( ! in_array( $variation->post->post_status, array( 'publish', 'inherit' ) ) )\n\t\t\t\tcontinue;\n\n\t\t\t$variation->process_prices();\n\t\t\t$sale_price = $variation->sale_price;\n\t\t\t$price = (float) $variation->price;\n\n\t\t\t$is_variation_on_sale =\n\t\t\t\t $sale_price\n\t\t\t\t&& $sale_price < $price;\n\n\t\t\t$sale_price = (float) $sale_price;\n\n\t\t\tif ( $is_variation_on_sale ) {\n\t\t\t\t$sales[] = $sale_price;\n\n\t\t\t\tif ( is_null( $this->sale_price )\n\t\t\t\t || $sale_price < $this->sale_price )\n\t\t\t\t\t$this->sale_price = $sale_price;\n\n\t\t\t\t$diff = $price - $sale_price;\n\n\t\t\t\tif ( ! $diff )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$diff_percent = round( $diff / $price * 100 );\n\t\t\t\t$diffs[] = $diff;\n\t\t\t\t$diff_percents[] = $diff_percent;\n\n\t\t\t\tif ( is_null( $this->saving )\n\t\t\t\t\t || $diff <= $this->saving ) {\n\n\t\t\t\t\tif ( $diff != $this->saving\n\t\t\t\t\t\t || $diff_percent < $this->saving_percent )\n\t\t\t\t\t\t$this->saving_percent = $diff_percent;\n\n\t\t\t\t\t$this->saving = $diff;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$originals[] = $price;\n\n\t\t\tif ( is_null( $this->price )\n\t\t\t || $price < $this->price )\n\t\t\t\t$this->price = $price;\n\t\t}\n\n\t\t// see if we can use these min/max values with\n\t\t// \"from $xx.xx\" or \"up to $xx.xx\"\n\t\t$sales = array_unique( $sales );\n\t\t$originals = array_unique( $originals );\n\t\t$diffs = array_unique( $diffs );\n\t\t$this->is_on_sale = ! is_null( $this->sale_price );\n\t\t$this->has_various_sale_prices = count( $sales ) > 1;\n\t\t$this->has_various_prices = count( $originals ) > 1;\n\t\t$this->has_various_savings = count( $diffs ) > 1;\n\t}", "title": "" }, { "docid": "0b6d0fc366a651079881a68efa6661af", "score": "0.5094383", "text": "public function getVariation() : string {\n\t\treturn $this->variation;\n\t}", "title": "" }, { "docid": "b80a41cb5816d308ef1c7cbf3d4c0194", "score": "0.50926155", "text": "function product_variant_name_options($page_id) {\n $product_variant = FALSE;\n if (!empty($page_id)) {\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'taxonomy_term')\n ->fieldCondition('field_page_id', 'value', $page_id)\n ->fieldCondition('field_product_type', 'value', 'variant');\n $results = $query->execute();\n if (!empty($results)) {\n $product_variant = array('' => '--Select--');\n foreach ($results['taxonomy_term'] as $tid => $v) {\n $term = taxonomy_term_load($v->tid);\n $product_variant[$term->field_page_id_variant[LANGUAGE_NONE][0]['value']] = $term->name;\n }\n }\n }\n return $product_variant;\n}", "title": "" }, { "docid": "c7800cd2c83db8d9d39a9f7558ac1fb8", "score": "0.50923896", "text": "public function get_variation_name()\n\t{\n\t\treturn $this->current_variation['name'];\n\t}", "title": "" }, { "docid": "082bae75a51af208012d557f1064a068", "score": "0.50824744", "text": "function wc_get_product_variation_attributes( $variation_id ) {\n\t// Build variation data from meta\n\t$all_meta = get_post_meta( $variation_id );\n\t$parent_id = wp_get_post_parent_id( $variation_id );\n\t$parent_attributes = array_filter( (array) get_post_meta( $parent_id, '_product_attributes', true ) );\n\t$found_parent_attributes = array();\n\t$variation_attributes = array();\n\n\t// Compare to parent variable product attributes and ensure they match\n\tforeach ( $parent_attributes as $attribute_name => $options ) {\n\t\tif ( ! empty( $options['is_variation'] ) ) {\n\t\t\t$attribute = 'attribute_' . sanitize_title( $attribute_name );\n\t\t\t$found_parent_attributes[] = $attribute;\n\t\t\tif ( ! array_key_exists( $attribute, $variation_attributes ) ) {\n\t\t\t\t$variation_attributes[ $attribute ] = ''; // Add it - 'any' will be asumed\n\t\t\t}\n\t\t}\n\t}\n\n\t// Get the variation attributes from meta\n\tforeach ( $all_meta as $name => $value ) {\n\t\t// Only look at valid attribute meta, and also compare variation level attributes and remove any which do not exist at parent level\n\t\tif ( 0 !== strpos( $name, 'attribute_' ) || ! in_array( $name, $found_parent_attributes ) ) {\n\t\t\tunset( $variation_attributes[ $name ] );\n\t\t\tcontinue;\n\t\t}\n\t\t/**\n\t\t * Pre 2.4 handling where 'slugs' were saved instead of the full text attribute.\n\t\t * Attempt to get full version of the text attribute from the parent.\n\t\t */\n\t\tif ( sanitize_title( $value[0] ) === $value[0] && version_compare( get_post_meta( $parent_id, '_product_version', true ), '2.4.0', '<' ) ) {\n\t\t\tforeach ( $parent_attributes as $attribute ) {\n\t\t\t\tif ( $name !== 'attribute_' . sanitize_title( $attribute['name'] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$text_attributes = wc_get_text_attributes( $attribute['value'] );\n\n\t\t\t\tforeach ( $text_attributes as $text_attribute ) {\n\t\t\t\t\tif ( sanitize_title( $text_attribute ) === $value[0] ) {\n\t\t\t\t\t\t$value[0] = $text_attribute;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$variation_attributes[ $name ] = $value[0];\n\t}\n\n\treturn $variation_attributes;\n}", "title": "" }, { "docid": "8f341d98e4bcb87d60545b0ee154b1bb", "score": "0.5078141", "text": "function get_attribute_variation_id( $product = false, $attribute_name = false, $option = false) {\n if ( !$product || !$attribute_name || !$option ) {\n return false;\n }\n if ( $product->get_type() !== 'variable' ) {\n return false;\n }\n foreach( $product->get_available_variations() as $variation ) {\n if ( $variation['attributes']['attribute_' . esc_attr( sanitize_title( $attribute_name ) )] === $option ) {\n return $variation['variation_id'];\n }\n }\n return false;\n}", "title": "" }, { "docid": "0bb5cf508d02c03a578abede4c44812e", "score": "0.50710714", "text": "function geo_theme_variation(){\n\t$color = get_theme_mod('theme_variation');\n\t$class = '';\n\tif($color=='dark'){\n\t\t$class = 'dark';\n\t}\n\treturn $class;\n}", "title": "" }, { "docid": "106f5e9fe0ea6078a1e6dc0a79ff9291", "score": "0.50551426", "text": "function fn_product_variations_exim_prepare_product_amount()\n{\n $product_ids = fn_product_variations_exim_get_parent_products_ids();\n\n if (!empty($product_ids)) {\n /** @var ProductManager $product_manager */\n $product_manager = Tygh::$app['addons.product_variations.product.manager'];\n $product_manager->actualizeConfigurableProductAmount($product_ids);\n }\n\n return true;\n}", "title": "" }, { "docid": "24da9e8421c59973421877ec9f3b97e7", "score": "0.5037306", "text": "function init_hooks() {\r\n\t\tadd_action('idc_make_combined_purchase', array($this, 'make_combined_purchase'), 2, 6);\r\n\t}", "title": "" }, { "docid": "ed9ca32dda93674b95534ea1ba45522a", "score": "0.5036258", "text": "function woocommerce_template_single_custom_attributes() {\n wc_get_template( 'single-product/additional-information.php' );\n }", "title": "" }, { "docid": "3cf58203b0d5bdecaf5bf82d0a92bd94", "score": "0.5026065", "text": "public function get_selected_variation( $current_id ) {\n\n global $post, $woocommerce, $product;\n\n if ($product->get_type() == 'variable') {\n\n if( !empty( $_POST['variation_id'] ) )\n return $_POST['variation_id'];\n\n $default_atts = $this->get_default_atts( $current_id );\n $selected_atts = wp_parse_args( $this->get_atts_from_query_string(), $default_atts );\n\n $selected_atts_count = count( $selected_atts );\n $available_atts_count = count( $product->get_variation_attributes() );\n\n if( empty($selected_atts) || $selected_atts_count < $available_atts_count )\n return $current_id;\n\n $variation = Iconic_WooThumbs_Product::find_matching_product_variation( $product, $selected_atts );\n\n if( $variation )\n $current_id = $variation;\n\n }\n\n return $current_id;\n\n }", "title": "" }, { "docid": "179103b6d57ea65d16eabe6acf2e9dac", "score": "0.50253683", "text": "public function test_get_variations_with_orderby() {\n\t\t$product = \\Automattic\\WooCommerce\\RestApi\\UnitTests\\Helpers\\ProductHelper::create_variation_product();\n\t\t$request = new WP_REST_Request( 'GET', '/wc/v4/products/' . $product->get_id() . '/variations' );\n\t\t$request->set_query_params( array( 'orderby' => 'menu_order' ) );\n\t\t$response = $this->server->dispatch( $request );\n\t\t$variations = $response->get_data();\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( 2, count( $variations ) );\n\t\t$this->assertEquals( 'DUMMY SKU VARIABLE SMALL', $variations[0]['sku'] );\n\t\t$this->assertEquals( 'size', $variations[0]['attributes'][0]['name'] );\n\t}", "title": "" }, { "docid": "23a605906091ce2bb326ce4ceb1d1d92", "score": "0.5019139", "text": "function woocommerce_template_single_attributes() {\n wc_get_template( 'single-product/additional-information.php' );\n }", "title": "" }, { "docid": "766739ef05246fee37975bd52918fed0", "score": "0.5008542", "text": "function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t\t$values = $this->Values();\r\n\t\tforeach($values as $value) {\r\n\t\t\tif($value->canDelete()) {\r\n\t\t\t\t$value->delete();\r\n\t\t\t\t$value->destroy();\r\n\t\t\t}\r\n\t\t}\r\n\t\tDB::query(\"DELETE FROM \\\"Product_VariationAttributes\\\" WHERE \\\"ProductAttributeTypeID\\\" = \".$this->ID);\r\n\t}", "title": "" }, { "docid": "e6daad062c0ce8c23232dbc5dee556b8", "score": "0.5000959", "text": "function checkVariationsByProductIdSku($id, $sku) {\r\n $woocommerce = getWoocommerceConfig();\r\n $variations = $woocommerce->get('products/' . $id . '/variations');\r\n\r\n foreach ($variations as $variation) {\r\n $currentSku = strtolower($variation->sku);\r\n $skuCode = strtolower($sku);\r\n\r\n if ($currentSku === $skuCode) {\r\n return ['exist' => true, 'idVariation' => $variation->id];\r\n }\r\n }\r\n\r\n return ['exist' => false, 'idVariation' => null];\r\n}", "title": "" }, { "docid": "80c80ac160bf1771917d3f6082f0fd50", "score": "0.50006086", "text": "function flatsome_lightbox_button(){\n if(get_theme_mod('disable_quick_view', 0)) return;\n\n // Run Quick View Script\n wp_enqueue_script('wc-add-to-cart-variation');\n\n global $product;\n echo ' <a class=\"quick-view\" data-prod=\"'.$product->get_id().'\" href=\"#quick-view\">'.__('Quick View','flatsome').'</a>';\n}", "title": "" }, { "docid": "2fd8e3ce55d42c2e4e991a84782c581c", "score": "0.49878523", "text": "function wc_get_formatted_variation( $variation, $flat = false ) {\n\t$return = '';\n\tif ( is_array( $variation ) ) {\n\n\t\tif ( ! $flat ) {\n\t\t\t$return = '<dl class=\"variation\">';\n\t\t}\n\n\t\t$variation_list = array();\n\n\t\tforeach ( $variation as $name => $value ) {\n\t\t\tif ( ! $value ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If this is a term slug, get the term's nice name\n\t\t\tif ( taxonomy_exists( esc_attr( str_replace( 'attribute_', '', $name ) ) ) ) {\n\t\t\t\t$term = get_term_by( 'slug', $value, esc_attr( str_replace( 'attribute_', '', $name ) ) );\n\t\t\t\tif ( ! is_wp_error( $term ) && ! empty( $term->name ) ) {\n\t\t\t\t\t$value = $term->name;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$value = ucwords( str_replace( '-', ' ', $value ) );\n\t\t\t}\n\n\t\t\tif ( $flat ) {\n\t\t\t\t$variation_list[] = wc_attribute_label( str_replace( 'attribute_', '', $name ) ) . ': ' . rawurldecode( $value );\n\t\t\t} else {\n\t\t\t\t$variation_list[] = '<dt>' . wc_attribute_label( str_replace( 'attribute_', '', $name ) ) . ':</dt><dd>' . rawurldecode( $value ) . '</dd>';\n\t\t\t}\n\t\t}\n\n\t\tif ( $flat ) {\n\t\t\t$return .= implode( ', ', $variation_list );\n\t\t} else {\n\t\t\t$return .= implode( '', $variation_list );\n\t\t}\n\n\t\tif ( ! $flat ) {\n\t\t\t$return .= '</dl>';\n\t\t}\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "404755a2123538694d6753b380e1adfe", "score": "0.4983395", "text": "protected function get_variation_id( $product, $variations = array() ) {\n\t\t$variation_id = null;\n\t\t$variations_normalized = array();\n\n\t\tif ( $product->is_type( 'variable' ) && $product->has_child() ) {\n\t\t\tif ( isset( $variations ) && is_array( $variations ) ) {\n\t\t\t\t// start by normalizing the passed variations\n\t\t\t\tforeach ( $variations as $key => $value ) {\n\t\t\t\t\t$key = str_replace( 'attribute_', '', str_replace( 'pa_', '', $key ) ); // from get_attributes in class-wc-api-products.php\n\t\t\t\t\t$variations_normalized[ $key ] = strtolower( $value );\n\t\t\t\t}\n\t\t\t\t// now search through each product child and see if our passed variations match anything\n\t\t\t\tforeach ( $product->get_children() as $variation ) {\n\t\t\t\t\t$meta = array();\n\t\t\t\t\tforeach ( get_post_meta( $variation ) as $key => $value ) {\n\t\t\t\t\t\t$value = $value[0];\n\t\t\t\t\t\t$key = str_replace( 'attribute_', '', str_replace( 'pa_', '', $key ) );\n\t\t\t\t\t\t$meta[ $key ] = strtolower( $value );\n\t\t\t\t\t}\n\t\t\t\t\t// if the variation array is a part of the $meta array, we found our match\n\t\t\t\t\tif ( $this->array_contains( $variations_normalized, $meta ) ) {\n\t\t\t\t\t\t$variation_id = $variation;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $variation_id;\n\t}", "title": "" }, { "docid": "6923b98516f01e31e3f51f3dda40d754", "score": "0.4983", "text": "function fn_product_variations_exim_store_parent_product_data($primary_object_id, $product, $object_exists)\n{\n $parent_product_id = null;\n $product_id = !empty($primary_object_id['product_id']) ? $primary_object_id['product_id'] : null;\n $product_type = fn_product_variations_exim_get_product_type($product);\n\n if ($product_id === null || $product_type === ProductManager::PRODUCT_TYPE_SIMPLE) {\n // simple product (or product without ID) cannot be parent for a variation\n $parent_product_id = 0;\n } elseif ($product_type !== ProductManager::PRODUCT_TYPE_VARIATION && empty($product['variation_options'])) {\n $parent_product_id = $product_id;\n }\n\n if ($parent_product_id !== null) {\n Registry::set('runtime.exim.product_variations.parent_products.' . $parent_product_id, true);\n Registry::set('runtime.exim.product_variations.parent_product_data', array('product_id' => $parent_product_id, 'object_exists' => $object_exists));\n }\n}", "title": "" }, { "docid": "e4712310d779cadef7237bc96f0113ba", "score": "0.49723932", "text": "function fn_product_variations_exim_set_product_options($product, $product_code, $product_id, $data, $lang_code, $features_delimiter)\n{\n $continue = true;\n\n if (!empty($data[$lang_code])) {\n $product_type = fn_product_variations_exim_get_product_type($product);\n $is_variation_product = $product_type === ProductManager::PRODUCT_TYPE_VARIATION || !empty($product['variation_options']);\n\n /** @var ProductManager $product_manager */\n $product_manager = Tygh::$app['addons.product_variations.product.manager'];\n\n if ($is_variation_product\n || $product_manager->hasProductVariations($product_id)\n ) {\n // do not update options for variation or product that has variations\n $continue = false;\n\n fn_set_notification('W', __('warning'), __('product_variations.exim_error_cannot_update_product_options_for_variation_or_parent', array(\n '[product_code]' => $product_code,\n )));\n }\n }\n\n if ($continue) {\n fn_exim_set_product_options($product_id, $data, $lang_code, $features_delimiter);\n }\n}", "title": "" }, { "docid": "e379e5ca0fa21e6911ac2d7b39071acc", "score": "0.49619603", "text": "public function createVariations(): array\n {\n $variations = array();\n $newChildrens = array();\n if (empty($this->variableProduct)) {\n return $variations;\n }\n\n $childrens = $this->variableProduct->get_children();\n\n for ($i = 0; $i < self::MAX_VARIATIONS; $i++) {\n //====================================================================//\n // Load Existing Product Variation\n $postId = array_shift($childrens);\n if (!empty($postId)) {\n $variations[] = wc_get_product($postId);\n $newChildrens[] = $postId;\n\n continue;\n }\n\n //====================================================================//\n // Create Product Variation\n $variationId = wp_insert_post(array(\n \"post_type\" => \"product_variation\",\n \"post_title\" => self::VARIATION_PRODUCT.\"-\".$i,\n \"post_name\" => self::VARIATION_PRODUCT.\"-\".$i,\n \"post_parent\" => $this->variableProduct->get_id(),\n \"post_status\" => \"publish\",\n \"menu_order\" => ($i + 1),\n ));\n\n if (is_int($variationId)) {\n update_post_meta($variationId, \"attribute_variant\", \"Type-\".$i);\n }\n\n $variations[] = wc_get_product($variationId);\n $newChildrens[] = $variationId;\n }\n\n if (serialize($childrens) != serialize($newChildrens)) {\n $this->variableProduct->set_children($newChildrens);\n $this->variableProduct->save();\n }\n\n return $variations;\n }", "title": "" }, { "docid": "bd4e7c0fa8b25d96b4dfac0eceb3d628", "score": "0.49587387", "text": "function plugins_loaded_hook() {\n\n load_plugin_textdomain( 'iconic-woothumbs', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\n $this->load_settings_framework();\n\n if ( is_admin() ) {\n\n $this->delete_transients();\n\n add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );\n add_action( 'wp_ajax_admin_load_thumbnails', array( $this, 'admin_load_thumbnails' ) );\n add_action( 'woocommerce_save_product_variation', array( $this, 'save_product_variation' ), 10, 2 );\n add_action( 'admin_menu', array( $this, 'bulk_edit_page' ), 20 );\n add_action( 'admin_init', array( $this, 'media_columns' ) );\n\n add_action( 'wp_ajax_iconic-woothumbs_bulk_save', array( $this, 'bulk_save' ) );\n\n add_action( 'woocommerce_product_write_panel_tabs', array( $this, 'product_tab' ) );\n add_action( 'woocommerce_product_data_panels', array( $this, 'product_tab_fields' ) );\n add_action( 'woocommerce_process_product_meta', array( $this, 'save_product_fields' ) );\n\n add_action( 'wp_ajax_iconic_woothumbs_get_variation', array( $this, 'ajax_get_variation' ) );\n add_action( 'wp_ajax_nopriv_iconic_woothumbs_get_variation', array( $this, 'ajax_get_variation' ) );\n\n } else {\n\n add_action( 'woocommerce_before_single_product', array( $this, 'remove_hooks' ) );\n add_action( 'woocommerce_before_single_product_summary', array( $this, 'show_product_images' ), 20);\n add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts_and_styles' ) );\n\n add_filter( 'body_class', array( $this, 'add_theme_class' ) );\n\n add_action( 'iconic_woothumbs_after_images', array( $this, 'add_yith_wishlist_icon' ) );\n\n add_action( 'woocommerce_api_product_response', array( $this, 'woocommerce_api_product_response' ), 10, 4 );\n\n }\n\n add_filter( 'woocommerce_available_variation', array( $this, 'alter_variation_json' ), 10, 3 );\n\n }", "title": "" }, { "docid": "779976937e27285e13b91a3b02e3d401", "score": "0.49306214", "text": "public function mwb_wpr_woocommerce_add_cart_item_data($the_cart_data, $product_id, $variation_id)\n\t\t{\t\n\t\t\tif(isset($_REQUEST['quantity']) && $_REQUEST['quantity'] && $_REQUEST['quantity'] != null)\n\t\t\t{\n $quantity = (int)$_REQUEST['quantity'];\n }\n else\n {\n $quantity = 1;\n }\n $user_id = get_current_user_ID();\n $get_points = (int)get_user_meta($user_id,'mwb_wpr_points',true);\n\t\t\t$product_types = wp_get_object_terms( $product_id, 'product_type' );\n\t\t\t$check_enable = get_post_meta($product_id, 'mwb_product_points_enable', 'no');\n\t\t\t$general_settings = get_option('mwb_wpr_settings_gallery',true);\n\t\t\t$mwb_wpr_set_preferences = isset($general_settings['mwb_wpr_set_preferences']) ? $general_settings['mwb_wpr_set_preferences'] : 'to_both';\n\t\t\t$enable_purchase_points = isset($general_settings['enable_purchase_points']) ? intval($general_settings['enable_purchase_points']) : 0;\n\n\t\t\tif($check_enable == 'yes')\n\t\t\t{\t\n\t\t\t\tif( $mwb_wpr_set_preferences == 'to_assign_point' || $mwb_wpr_set_preferences == 'to_both' )\n\t\t\t\t{\n\t\t\t\t\tif(isset($variation_id) && !empty($variation_id) && $variation_id > 0){\n\t\t\t\t\t\t$get_product_points = get_post_meta($variation_id, 'mwb_wpr_variable_points', 1);\n\t\t\t\t\t\t$item_meta['mwb_wpm_points'] = (int)$get_product_points*(int)$quantity;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$get_product_points = get_post_meta($product_id, 'mwb_points_product_value', 1);\n\t\t\t\t\t\t$item_meta['mwb_wpm_points'] = (int)$get_product_points*(int)$quantity;\n\t\t\t\t\t}\n\t\t\t\t\t$the_cart_data ['product_meta'] = array('meta_data' => $item_meta);\n\t\t\t\t}\n\n\t\t\t}\t\n\t\t\t\n\t\t\tif( $enable_purchase_points )\n\t\t\t{\n\t\t\t\tif(isset($_POST['mwb_wpr_pro_cost_to_points']) && !empty($_POST['mwb_wpr_pro_cost_to_points']) && $_POST['mwb_wpr_pro_cost_to_points'])\n\t\t\t\t{\t\n\t\t\t\t\tif( $_POST['mwb_wpr_pro_cost_to_points'] > $get_points )\n\t\t\t\t\t{\n\t\t\t\t\t\t$item_meta['pro_purchase_by_points'] = $get_points;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$item_meta['pro_purchase_by_points'] = $_POST['mwb_wpr_pro_cost_to_points'];\n\t\t\t\t\t}\n\t\t\t\t\t$the_cart_data ['product_meta'] = array('meta_data' => $item_meta);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//MWB Custom Work\n\t\t\t$_product = wc_get_product($product_id);\n \t\t$enable_product_purchase_points = get_post_meta($product_id, 'mwb_product_purchase_points_only', true);\n \t\t$mwb_product_purchase_value = get_post_meta($product_id, 'mwb_points_product_purchase_value', true);\n \t\t$prod_type = $_product->get_type();\n \t\t//$user = wp_get_current_user();\n \t\t//$user_id = $user->ID;\n \t\t//$get_points = (int)get_user_meta($user_id, 'mwb_wpr_points', true); \t\t\n\t\t\tif(isset($enable_product_purchase_points) && $enable_product_purchase_points == 'yes')\n \t\t{\n \t\t\tif(isset($mwb_product_purchase_value) && !empty($mwb_product_purchase_value ) && ($prod_type == 'simple'))\n \t\t\t{\n \t\t\t\tif ($mwb_product_purchase_value < $get_points)\n \t\t\t\t{\t\n \t\t\t\t\t$item_meta['mwb_wpr_purchase_point_only'] = $mwb_product_purchase_value*(int)$quantity;\n \t\t\t\t\t$the_cart_data ['product_meta'] = array('meta_data' => $item_meta); \t\t\t\t\n \t\t\t\t}\n\n \t\t\t}\n \t\t}\n \t\t// Custom Work for Variable Product\n \t\tif ($this->mwb_wpr_check_whether_product_is_variable($_product)) {\t\t \t\t \t\t\t\t\n\t\t\t\t\t$mwb_wpr_parent_id = wp_get_post_parent_id($variation_id);\n\t\t\t\t\t$enable_product_purchase_points = get_post_meta($mwb_wpr_parent_id, 'mwb_product_purchase_points_only',true);\n\t\t\t\t\t$mwb_product_purchase_value = get_post_meta($variation_id, 'mwb_wpr_variable_points_purchase',true);\n \t\t\t\tif(isset($enable_product_purchase_points) && $enable_product_purchase_points == 'yes'){\n\n\t \t\t\t\tif(isset($mwb_product_purchase_value) && !empty($mwb_product_purchase_value))\n\t \t\t\t\t{\n\t \t\t\t\t\tif (is_user_logged_in())\n\t\t \t\t\t\t{\n\t\t \t\t\t\t\tif ($mwb_product_purchase_value < $get_points)\n\t\t\t \t\t\t\t{\t\n\t\t\t \t\t\t\t\t$item_meta['mwb_wpr_purchase_point_only'] = $mwb_product_purchase_value*(int)$quantity;\t\t\t \t\t\t\t\n\t\t\t \t\t\t\t\t$the_cart_data ['product_meta'] = array('meta_data' => $item_meta); \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\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t//End of Custom Work\n\t\t\treturn $the_cart_data;\n\t\t}", "title": "" }, { "docid": "29df1130b98cb9cff5e791086aecede6", "score": "0.4929309", "text": "public function test_update_variation_manage_stock() {\n\t\t$product = ProductHelper::create_variation_product();\n\t\t$product->set_manage_stock( false );\n\t\t$product->save();\n\n\t\t$children = $product->get_children();\n\t\t$variation_id = $children[0];\n\n\t\t// Set stock to true.\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'manage_stock' => true,\n\t\t\t)\n\t\t);\n\n\t\t$response = $this->server->dispatch( $request );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( true, $variation['manage_stock'] );\n\n\t\t// Set stock to false.\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'manage_stock' => false,\n\t\t\t)\n\t\t);\n\n\t\t$response = $this->server->dispatch( $request );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( false, $variation['manage_stock'] );\n\n\t\t// Set stock to false but parent is managing stock.\n\t\t$product->set_manage_stock( true );\n\t\t$product->save();\n\t\t$request = new WP_REST_Request( 'PUT', '/wc/v4/products/' . $product->get_id() . '/variations/' . $variation_id );\n\t\t$request->set_body_params(\n\t\t\tarray(\n\t\t\t\t'manage_stock' => false,\n\t\t\t)\n\t\t);\n\n\t\t$response = $this->server->dispatch( $request );\n\t\t$variation = $response->get_data();\n\n\t\t$this->assertEquals( 200, $response->get_status() );\n\t\t$this->assertEquals( 'parent', $variation['manage_stock'] );\n\t}", "title": "" }, { "docid": "a0531ba36d709244e188d79c7eff5087", "score": "0.49269438", "text": "function wpai_wp_all_import_variation_any_attribute($variation_any_attribute, $import_id) {\n return $variation_any_attribute;\n}", "title": "" }, { "docid": "0e8138ebff73ec900174e80c003a2c10", "score": "0.49246898", "text": "protected function getRawShopVariation()\n {\n return $this->oVariant->getPrefixedVariationData();\n }", "title": "" }, { "docid": "1ec1869a699c2a4b8e687bac18988ea0", "score": "0.49154413", "text": "function jigoshop_get_formatted_variation( $variation = '', $flat = false ) {\n\tif ($variation && is_array($variation)) :\n\n\t\t$return = '';\n\n\t\tif (!$flat) :\n\t\t\t$return = '<dl class=\"variation\">';\n\t\tendif;\n\n\t\t$varation_list = array();\n\n\t\tforeach ($variation as $name => $value) :\n\n\t\t\t$name = str_replace('tax_', '', $name);\n\t\t\t\n\t\t\tif ( taxonomy_exists( 'pa_'.$name )) :\n\t\t\t\t$terms = get_terms( 'pa_'.$name, array( 'orderby' => 'slug', 'hide_empty' => '0' ) );\n\t\t\t\tforeach ( $terms as $term ) :\n\t\t\t\t\tif ( $term->slug == $value ) $value = $term->name;\n\t\t\t\tendforeach;\n\t\t\t\t$name = get_taxonomy( 'pa_'.$name )->labels->name;\n\t\t\tendif;\n\n\t\t\tif ($flat) :\n\t\t\t\t$varation_list[] = $name.': '.$value;\n\t\t\telse :\n\t\t\t\t$varation_list[] = '<dt>'.$name.':</dt><dd>'.$value.'</dd>';\n\t\t\tendif;\n\n\t\tendforeach;\n\n\t\tif ($flat) :\n\t\t\t$return .= implode(', ', $varation_list);\n\t\telse :\n\t\t\t$return .= implode('', $varation_list);\n\t\tendif;\n\n\t\tif (!$flat) :\n\t\t\t$return .= '</dl>';\n\t\tendif;\n\n\t\treturn $return;\n\n\tendif;\n}", "title": "" }, { "docid": "c743646637a0d5a8412a19a458ef4e2d", "score": "0.49097967", "text": "public static function get_variations($attachment_id)\n {\n }", "title": "" }, { "docid": "5178d1dc2cdd691fd9f0f020dae2be42", "score": "0.4907585", "text": "function fn_product_variations_exim_add_processed_data_fields(&$processed_data)\n{\n $initial_values = array(\n 'E' => 0, // existent\n 'N' => 0, // new\n 'S' => 0, // skipped\n );\n\n $processed_data['by_types'] = array(\n ProductManager::PRODUCT_TYPE_SIMPLE => $initial_values,\n ProductManager::PRODUCT_TYPE_CONFIGURABLE => $initial_values,\n ProductManager::PRODUCT_TYPE_VARIATION => $initial_values,\n );\n}", "title": "" }, { "docid": "a0ce853b1eb4a02a332bddb2e712d544", "score": "0.49013242", "text": "function my_custom_init() {\n\tadd_post_type_support( 'cat_product', 'thumbnail' );\n}", "title": "" }, { "docid": "9880a9163946e5d85f1969efe5830504", "score": "0.48971924", "text": "private function explodePriceVariation($variation)\n {\n if (empty($variation['options'])) {\n return $variation;\n }\n\n $optionIds = explode('|', trim($variation['options'], '|'));\n\n $options = Shopware()->Models()\n ->getRepository(Article::class)\n ->getAllConfiguratorOptionsIndexedByIdQuery(['options.id' => $optionIds])\n ->getResult();\n\n $variation['option_names'] = [];\n\n foreach ($options as $option) {\n $variation['option_names'][] = [\n 'group' => $option->getGroup()->getName(),\n 'option' => $option->getName(),\n ];\n }\n\n unset($variation['options']);\n\n return $variation;\n }", "title": "" }, { "docid": "20259366e216a4ec1682ad80200a9a01", "score": "0.48893416", "text": "public function testV1CreateVariation()\n {\n\n }", "title": "" } ]
e4c10fa5cb842575e7cc4b3e5892f40d
set this instance of the Model's connection to the MySQL database connection
[ { "docid": "c6f614c069779393522f75c711ba6468", "score": "0.0", "text": "public function selectDB() {\r\n $this->con = mysqli_connect('egon','C4131F13U4','1250','C4131F13U4','3307');\r\n\t\t$this->con= mysqli_connect('egon.cs.umn.edu','F14CS4131U110','14322','F14CS4131U110','3307');\r\n // result returned form query for value corresponding to user selection (this->selection)\r\n\t\t$result = mysqli_query($this->con,\"SELECT * FROM mySport WHERE name ='\". $this->selection .\"'\");\r\n //map the the selection (record from the database- an object) stored in $result\r\n\t\t// to an indexable array\r\n\t\t$row = mysqli_fetch_array($result);\r\n\r\n\t\t// set tstring to the value stored in the array index (key) 'evaluation\"\r\n\t\t// indicies to the array name are the same as the fieldnames in the database\r\n $this->tstring = $row['sport'];\r\n\r\n }", "title": "" } ]
[ { "docid": "f680dab4522c2f3ababc98c66b948e35", "score": "0.7526421", "text": "private function _set_connection()\n {\n isset($this->_database_connection) ? $this->load->database($this->_database_connection) : $this->load->database();\n $this->_database = $this->db;\n }", "title": "" }, { "docid": "918a47de6ee2ec8ac66cda958e08090d", "score": "0.6972115", "text": "public function setConnection(MySQLdatabase $db)\n\t {\n\t\t$this->_db = $db;\n\t }", "title": "" }, { "docid": "1c408caaf0dd24649570e3bf6016d738", "score": "0.6968543", "text": "public function setConnection() {\r\n\t\t$this->setHost($this->$host);\r\n\t\t$this->setUser($this->$username);\r\n\t\t$this->setPass($this->$password);\r\n\t\t$this->setDatabase($this->$db);\r\n\t}", "title": "" }, { "docid": "829f7e346a4ef8a4f51972613e102747", "score": "0.69304484", "text": "public function setConnection()\r\n {\r\n if($this->driver==\"mysql\" || $this->driver==null){\r\n $con = MySQLi_connect ($this->host, $this->user, $this->pass, $this->database);\r\n $con->query(\"SET NAMES '\".$this->charset.\"'\");\r\n }\r\n \r\n return $con; //Returns an object which represents the connection to a MySQL Server.\r\n \r\n }", "title": "" }, { "docid": "874cf2500117e729dab91cfcd0ccb317", "score": "0.67347366", "text": "public function settaDB()\n {\n // inclusione del file della classe\n include \"MySqlClass.php\";\n // istanza della classe\n $this->database = new MysqlClass();\n }", "title": "" }, { "docid": "c2de72ee1aaf36eaa5ed3e293c422cb7", "score": "0.66914904", "text": "private function setConnection() {\n // Set the connection string for each case\n switch ($this->schema) {\n case 'mysql':\n $this->connectionString =\n \"mysql:dbname={$this->database};host={$this->hostname}\";\n break;\n case 'sqlite':\n $this->connectionString = \"sqlite:{$this->database}\";\n break;\n case 'pgsql':\n $this->connectionString =\n \"pgsql:dbname={$this->database};host={$this->hostname}\";\n break;\n }\n // Set driver options\n $this->setDriverOption(PDO::MYSQL_ATTR_INIT_COMMAND, \"SET NAMES utf8\");\n $this->setDriverOption(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n // If connection is persistent set appropriate driver option\n if ($this->persistent) {\n $this->setDriverOption(PDO::ATTR_PERSISTENT, true);\n }\n }", "title": "" }, { "docid": "7dcea921631f1905d867a4dedfb6f038", "score": "0.66876453", "text": "function __construct() {\n $this->connection = DB::connection();\n }", "title": "" }, { "docid": "22902e98ef4234bd6812a92ce8cd738f", "score": "0.66775066", "text": "public function initDatabaseConnection()\n {\n $username = 'root';\n $password = '';\n\n $this->connection = mysql_connect('localhost', $username, $password);\n\n return $this->$connection;\n }", "title": "" }, { "docid": "0e96525e3764d444f1ee8f324126e2f8", "score": "0.66245276", "text": "public function setConnection(\\MySQLi $con) {\n $this->__con = $con;\n }", "title": "" }, { "docid": "9fa4cae93c6c1c5d0ad34fc1f3260b3c", "score": "0.6599915", "text": "protected function _setConnection() {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__);\n\n\t\tif (self::_hasAdapter(get_called_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_called_class(), __FUNCTION__);\n\n\t\tif ($this->_config['connection'] != null) {\n\t\t\t$this->_config['stored_connection'] = Database::getDatabaseLink();\n\t\t\t$this->_config['stored_connection_name'] = Database::getConnectionName();\n\t\t\tDatabase::setDatabase($this->_config['connection']);\n\t\t}\n\n\t\treturn null;\n\n\t}", "title": "" }, { "docid": "fb7f16d03a44976ab6c64d3178379138", "score": "0.65859306", "text": "private function setDatabase() {\r\n\r\n\t\t\tglobal $dbh;\r\n\r\n\t\t\tif ($dbh instanceof PDO) {\r\n\t\t\t\t$this->dbh = $dbh;\r\n\t\t\t} else {\r\n\t\t\t\t$Connection = new Connection();\r\n\t\t\t\t$this->dbh = $Connection->PDO_Connection();\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "8bbee090efb61b3ad32b483c02956db6", "score": "0.6584241", "text": "protected function setTableConnection()\n\t{\n\t\tglobal $cman;\n\t\t$this->connection = $cman->getForLogin();\n\t}", "title": "" }, { "docid": "813cf033440b3a8a46696500d5a3b251", "score": "0.6580321", "text": "public function __construct() {\n $this->db = new Mysql_Driver(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n }", "title": "" }, { "docid": "72aaa4371d7f5dfcc17d07f1b1f4ca49", "score": "0.6577721", "text": "public function __construct() {\n $this->connection = new DatabaseAdapter(new MysqlConnector());\n }", "title": "" }, { "docid": "84cb721cd74161d929a7b629553dec00", "score": "0.6557846", "text": "public function db_connect()\n\t{\n\t\t$this->db = Database::instance();\n\t}", "title": "" }, { "docid": "4864e8b2d4a726fc699ead562d04d0ed", "score": "0.6478158", "text": "private function connectDatabase() {\n\t\t$this->db = new Database ();\n\t}", "title": "" }, { "docid": "7efd77e10877e5311f1a272170097a50", "score": "0.6468528", "text": "protected function connect()\r\n\t\t{\r\n\t\t\t$pdo = new PDO(\"mysql:dbname={$this->db_name};host={$this->db_host}\", $this->db_user , $this->db_pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\r\n\t\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t\t$this->pdo = $pdo;\r\n\t\t}", "title": "" }, { "docid": "759b88cc8d2c076fd0b79f26fc2e9dba", "score": "0.6461518", "text": "public function open_connection() {\n $this->link = mysql_connect(parent::get_host(), parent::get_user(), parent::get_pass());\n\n # setting charset mysql \n mysql_set_charset('utf8', $this->link); \n }", "title": "" }, { "docid": "9c719f6d2d84981859095df9c1e7fdd9", "score": "0.6407083", "text": "public function __construct()\n {\n DB::setDefaultConnection('mysql');\n parent::__construct();\n }", "title": "" }, { "docid": "c270763cced45a31be2dd38831033bf6", "score": "0.6400799", "text": "private function db_connection(){\n\t\t$this->db = new DatabaseConn();\n\t\t$this->conn = $this->db->dbOpen();\n\t}", "title": "" }, { "docid": "df62b539c701348790d8d7f975fd319d", "score": "0.6387737", "text": "public static function __connect() {\n\t\tif(self::$_connection) return true;\n\n\t\t// Load the settings from Jackal\n\t\t$dsn = Jackal::url2uri(Jackal::setting(\"database\"));\n\n\t\t// Map each field to the setting or the default\n\t\tforeach(self::$DEFAULTS as $fieldName=>$defaultValue)\n\t\tif($fieldName)\n\t\tif(!(self::$$fieldName = @$dsn[$fieldName]))\n\t\tself::$$fieldName = $defaultValue;\n\n\t\tself::$_connection = mysql_connect(self::$host, self::$username, self::$password);\n\t\tmysql_select_db(self::$database, self::$_connection);\n\t}", "title": "" }, { "docid": "73c0f43bf88d114649282bc4fc75afba", "score": "0.6380239", "text": "public function connectToDatabase()\n {\n $conf = $this->_config->get('mysql');\n\n try {\n $this->_mysql = new \\Cemes\\Pdo\\Mysql();\n $this->_mysql->connect($conf);\n Cemes_Registry::register('db', $this->_mysql);\n } catch (Exception $e) {\n Cemes_Registry::get('logger')->critical('Verbindung zur Datenbank konnte nicht aufgebaut werden.');\n }\n\n $this->_executeEvent('after_database_initialization');\n }", "title": "" }, { "docid": "29cec43a2d4ad7172b6a1cc89f8c17f0", "score": "0.6378623", "text": "public function init()\n {\n parent::init();\n $this->db = Instance::ensure($this->db, Connection::class);\n }", "title": "" }, { "docid": "e3c8b9d23650f672ffb82e779b628b06", "score": "0.6369265", "text": "private function setup_db_connection() {\n\t\t// Check to see if ActiveRecord exists... the app/developer might not want to use it\n\t\tif ( class_exists( '\\ActiveRecord\\Config', true ) ) { // Set to false to not try and autoload the class\n\t\t\t\\ActiveRecord\\Config::initialize( function( $cfg ) {\n\t\t\t\t// Set the directory of our data models\n\t\t\t\t$cfg->set_model_directory( $this->config['database']['model_directory'] );\n\n\t\t\t\t// Set our connection configuration\n\t\t\t\t$cfg->set_connections( $this->config['database']['connections'] );\n\n\t\t\t\t// Set our default connection\n\t\t\t\t$cfg->set_default_connection( $this->config['database']['default_connection'] );\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "ff889f9b6f343242cbbd49cb13c4a143", "score": "0.6357349", "text": "public function set_db()\n {\n $this->_db=new PDO('mysql:host=localhost;dbname=criminels;charset=utf8','lauhu','stagiaire ');\n\n return $this;\n\n }", "title": "" }, { "docid": "b5d1e9cc08e018afa77fc60611a16d3c", "score": "0.6337634", "text": "public function __construct()\n {\n $this->con = Database::getConnection();\n }", "title": "" }, { "docid": "93cf65b58bb6927b803fbe139db8610a", "score": "0.6330772", "text": "protected function _connect()\n {\n if (!is_object($this->db)) {\n $this->db = Db::factory($this->database);\n }\n $this->db->debug = $this->debug;\n $this->db->logger = $this->logger;\n $this->dump();\n }", "title": "" }, { "docid": "33cabcc451675fb001e217b6fa60a1b7", "score": "0.6329308", "text": "private static function setInstance()\n {\n $config = Config::getConfig();\n try {\n $dsn = \"{$config['dbType']}:host={$config['hostname']};dbname={$config['dbName']}\";\n self::$db = new PDO($dsn, $config['username'], $config['password']);\n self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $ex) {\n Magneto::error('Database Error', $ex);\n }\n }", "title": "" }, { "docid": "eb9cbe3d0321f15160c8700c04ec7bae", "score": "0.6329293", "text": "public static function getConnection(){\n\t\tself::$db = new Database(DB_TYPE,DB_HOST,DB_NAME,DB_USER,DB_PASS);\n\t}", "title": "" }, { "docid": "0f0ae3d0801b9527e61e4ca7236e522d", "score": "0.6314047", "text": "public function __construct() {\n $this->conn = $this->connectToDB();\n }", "title": "" }, { "docid": "e2c7b789e1ff3f23a27512e5b99dcd7d", "score": "0.6312782", "text": "public function __construct()\n {\n $this->dbType = 'mysql';\n $this->dbHost = '127.0.0.1';\n $this->dbName = 'moodle';\n $this->dbUser = 'root';\n $this->dbPass = 'root';\n $this->dbPort = '3306';\n $this->dbChar = 'UTF8';\n\n\n $this->setMessagesDefault();\n $this->conn = $this->createConnection();\n }", "title": "" }, { "docid": "6c89ec82978d66eaa9791147ccc73bde", "score": "0.63095284", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->db = DB::connection('mysql');\n $this->lb = DB::connection('lb');\n }", "title": "" }, { "docid": "4f22aabfc70ed3f4114e17352cec4cd2", "score": "0.63090485", "text": "public function getDbConnection()\n {\n $this->db = Registry::get('db');\n }", "title": "" }, { "docid": "045b5330b44bb9b71655bb05aca7e892", "score": "0.6306658", "text": "function getConnection() {\n return $this->db;\n }", "title": "" }, { "docid": "fee1c37dd2f458672f830a359c3dcbee", "score": "0.62810934", "text": "private static function init()\n {\n self::$con = Propel::getConnection();\n }", "title": "" }, { "docid": "cf969287cf17a3398cd94228197fffd9", "score": "0.62798953", "text": "public function connect()\n {\n // don't connect twice\n if ($this->connected) {\n return;\n }\n \n // connect to the database\n $this->beginProfile(__FUNCTION__);\n parent::__construct(\n $this->dsn,\n $this->username,\n $this->password,\n $this->options\n );\n $this->endProfile();\n \n // remember that we have connected\n $this->connected = true;\n \n // set attributes\n foreach ($this->attributes as $attribute => $value) {\n $this->setAttribute($attribute, $value);\n }\n }", "title": "" }, { "docid": "004e7ab17c27f83b05f36f2189c03f62", "score": "0.62776", "text": "private function setDatabase() {\n $this->db = new MysqliDb(DB_HOST,DB_USER,DB_PASS);\n return;\n }", "title": "" }, { "docid": "54c0b9b3811d8f173bb623dda7ea1a4a", "score": "0.626046", "text": "public function MySQLProxy() {\n\t\tself::__connect();\n\t}", "title": "" }, { "docid": "22fda893db68f07f3e004ad475bcf964", "score": "0.6244013", "text": "public function __construct() {\n $this->db = $this->connectDB();\n }", "title": "" }, { "docid": "b331af388022ecd179e847e9216459cf", "score": "0.6242782", "text": "public function __construct() {\r\n $this->db = Database::connect();\r\n }", "title": "" }, { "docid": "1bdeb3f11754785df08cd898ec46e6d3", "score": "0.6234635", "text": "private static function setDb(){\n self::$db = new PDO('mysql:host='.DB_HOST.'; dbname='.DB_NAME, DB_USER, DB_PASSWORD);\n self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n }", "title": "" }, { "docid": "6367239310aeaaa247f9706b96154373", "score": "0.62145334", "text": "public function __construct()\r\n {\r\n $this->db = self::dbConnect();\r\n }", "title": "" }, { "docid": "6abbf1cf6a7b0c5f217af345f77e710a", "score": "0.620936", "text": "function MySQLDB()\n\t{\n\t\t/* Make connection to database */\n\t\t$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n\t\tmysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\n\t}", "title": "" }, { "docid": "ca0da04d271b8894d768a1773a7a7346", "score": "0.62084085", "text": "private function dbConnection()\n\t{\n\t\t$this->data['db_connection'] = (boolean) $this->timber->config('db_connection');\n\t}", "title": "" }, { "docid": "9b6ef5dfb6b795a70ba32f004e0fea16", "score": "0.6183237", "text": "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "title": "" }, { "docid": "90fd3e020f3e673ecc73f6f3673d1644", "score": "0.6164259", "text": "public function __construct() {\r\n $this->db = Conectar::con();\r\n }", "title": "" }, { "docid": "e536cfa93d97565caa84af8e097cfc71", "score": "0.6149886", "text": "public function __construct() {\n $this->database = new DatabaseConnection();\n }", "title": "" }, { "docid": "870e663b5717eb370d12fcde636a6666", "score": "0.6142413", "text": "public function __construct() {\n $this->db = new myConnectDB();\n }", "title": "" }, { "docid": "dd6512e1bbf903ac3dc8150125572098", "score": "0.6141974", "text": "public function setConnection($name);", "title": "" }, { "docid": "78b3165f08a464c2edfb3d18afdf0c50", "score": "0.6135217", "text": "public function __construct(){\n\t\t$this->db = connect();\n\t}", "title": "" }, { "docid": "5197541bf95d875a6bd962875a4f9620", "score": "0.61344737", "text": "function MySQLDB(){\n\n\n /* Make connection to database */\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\n\n }", "title": "" }, { "docid": "95ca9834afe7b0d8eeb0c52ba000e0b8", "score": "0.6133407", "text": "public function open() {\n $this->connection = new \\PDO('mysql:host=' . $this->host . ';dbname=' . $this->database, $this->user, $this->pwd);\n return $this;\n }", "title": "" }, { "docid": "958f5d56a0c7a8f7e207efc116cb9662", "score": "0.61255825", "text": "protected abstract function configure_dbconnection();", "title": "" }, { "docid": "329822d0e39ec5f273072977f3a37049", "score": "0.6122937", "text": "function MySQLDB(){\n /* Make connection to database */\n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());\n mysql_select_db(DB_NAME, $this->connection) or die(mysql_error());\n \n }", "title": "" }, { "docid": "1d33cbc28ef51f0d8e86cf9de65ddcf8", "score": "0.612225", "text": "public function __construct()\n {\n $this->db = DataBase::dbConnect();\n }", "title": "" }, { "docid": "b3310c7014066b31bc579bd36939b603", "score": "0.61153066", "text": "public function __construct(){\n\t\t\t//CONN2º cuando tenemos varias funciones, definimos la conexión en el método Construct para que todas las funciones puedan tirar de ella. le pasamos al atributo mysqli el objeto. Creamos un objeto de la clase MysqlDBImplementation y abrimos una conexión a bbdd con los perímetros (host, puerto, nombre de base de datos, usuario, contraseña). De esta forma, cuando en Controller.php se instancie la clase del Modelo, se construirá la clase con esta conexión\n\t\t\t$this-> mysqli = new MysqlDBImplementation(\"127.0.0.1\", \"8889\", \"DBLEARN\", \"root\", \"learn\");\n\t\t}", "title": "" }, { "docid": "70867b610e41bbbcb2681a781f2b5b92", "score": "0.61100936", "text": "public function connect() {\n $sDsn = \"mysql:\".\n \"dbname=\".$GLOBALS['Application']['DB']['name'].\";\".\n \"host=\".$GLOBALS['Application']['DB']['host'].\";\".\n \"port=\".$GLOBALS['Application']['DB']['port'].\";\".\n \"unix_socket=\".$GLOBALS['Application']['DB']['sock'];\n\n $this->oConnection = new \\PDO($sDsn, $GLOBALS['Application']['DB']['user'], $GLOBALS['Application']['DB']['pass']);\n }", "title": "" }, { "docid": "bc0fd3c3444da1316ab732f6184f0f10", "score": "0.6108589", "text": "public function connect()\r\n\t{\r\n\t\t$this->reference = mysql_connect($this->host . \":\" . $this->port, $this->user, $this->pass);\r\n\t\tif (mysql_errno($this->reference) != 0)\r\n\t\t\tthrow new Exception(mysql_error($this->reference));\r\n\t\t\t\r\n\t\tif ($this->db)\r\n\t\t\t$this->selectDb($this->db);\r\n\t}", "title": "" }, { "docid": "fe661b4dcbe9f4ec71143f06d8fa6d66", "score": "0.6102372", "text": "public function connect()\n\t{\n\t\t$this->resource = $this->connection = ezcDbFactory::create($this->getParameters());\n\t}", "title": "" }, { "docid": "b7e8663d494ab07089c756c75f76feb7", "score": "0.61000586", "text": "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "title": "" }, { "docid": "a8c2df35eb20725efed131261f8b936d", "score": "0.6097113", "text": "public static function dbConnect() {\n if (! is_null(self::$connection)) {\n return;\n }\n require __DIR__ . '/db_connection.php';\n self::$connection = $connection;\n \n }", "title": "" }, { "docid": "e7d7439907b41422a1048363e21bc002", "score": "0.60967875", "text": "public function connect() {\n \n\t\tif(!$this->_dbConnect = @mysql_connect($this->_options['db_host'],$this->_options['db_user'],$this->_options['db_password'])){\n exit('Unable to connect to database');\n }\n if(!@mysql_select_db($this->_options['db_name'], $this->_dbConnect)) {\n exit(sprintf('Unable to connect to database %s',$this->_options['db_name']));\n }\n \n // Set charset.\n mysql_query(\"SET CHARACTER SET \".$this->_options['db_charset']);\n\t}", "title": "" }, { "docid": "2b964e33d0077c90852c177c956e8403", "score": "0.60862786", "text": "public function DBConnectionInitializer()\n {\n //? Using PDO for database connection to allow various data connection\n\n $connection = new PDO(\"mysql:host=$this->DBhost;dbname=$this->DBname\", $this->DBusername,$this->DBpass);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $connection;\n }", "title": "" }, { "docid": "fccf0ff8dda7fece30c85ab6aa2003da", "score": "0.60780096", "text": "private function setConnection()\n {\n if ($this->conn) {\n return;\n }\n $this->conn = ClientBuilder::create()\n ->setHosts([$this->config['host']])\n ->setRetries(2)\n ->build();\n }", "title": "" }, { "docid": "6fbc3bff911a2f445f291de167acc2da", "score": "0.6075255", "text": "private function __construct()\n {\n mysql_connect($this->db_host, $this->db_user, $this->db_pass);\n mysql_select_db($this->db_name);\n }", "title": "" }, { "docid": "6dc10a5b599778c5ba5bcc5b3eaed9ac", "score": "0.60745996", "text": "public function getConnection()\n\t\t{\n\t\t\tif (empty($this->db))\n\t\t\t\t$this->db = Database::getInstance();\n\t\t\t\n\t\t\treturn $this->db;\n\t\t}", "title": "" }, { "docid": "320050c94eb5b55c64b821599f779dde", "score": "0.60740024", "text": "public function connect () {\n $connection = mysql_connect($this->db_host, $this->db_user, $this->db_password);\n mysql_select_db($this->db_name);\n }", "title": "" }, { "docid": "dda242a7a4de68bb8ccd7cb39dda1671", "score": "0.60675704", "text": "public function __construct()\n {\n $this->connection = DB::connection(config('database.default'));\n }", "title": "" }, { "docid": "dda242a7a4de68bb8ccd7cb39dda1671", "score": "0.60675704", "text": "public function __construct()\n {\n $this->connection = DB::connection(config('database.default'));\n }", "title": "" }, { "docid": "dda242a7a4de68bb8ccd7cb39dda1671", "score": "0.60675704", "text": "public function __construct()\n {\n $this->connection = DB::connection(config('database.default'));\n }", "title": "" }, { "docid": "dda242a7a4de68bb8ccd7cb39dda1671", "score": "0.60675704", "text": "public function __construct()\n {\n $this->connection = DB::connection(config('database.default'));\n }", "title": "" }, { "docid": "dda242a7a4de68bb8ccd7cb39dda1671", "score": "0.60675704", "text": "public function __construct()\n {\n $this->connection = DB::connection(config('database.default'));\n }", "title": "" }, { "docid": "5da1a14c9a1cde88464625a24c25a24b", "score": "0.605298", "text": "public function __construct()\n {\n $this->connection = DB::connection(config('database.brawl'));\n }", "title": "" }, { "docid": "d88d0004679b08e217818b948db6c83c", "score": "0.6051668", "text": "function __construct() {\n\t\t$this->con = db::connect();\n\t}", "title": "" }, { "docid": "140375759c253acb2c253ae3b0ea000c", "score": "0.6040875", "text": "public function connect() {\n\t\tif ($this -> db_connect_type == 'pconnect') {\n\t\t\t$this -> connection = mysql_pconnect($this -> host, $this -> user, $this -> pwd);\n\t\t} else {\n\t\t\t$this -> connection = mysql_connect($this -> host, $this -> user, $this -> pwd);\n\t\t}\n\n\t\tif (!mysql_select_db($this->db, $this->connection)) {\n\t\t\tif ($this -> is_show_error) {\n\t\t\t\t$this -> showError(\"the database connect is wrong\", $this->db);\n\t\t\t\tmysql_close($this->connection);\t\n\t\t\t}\n\n\t\t}\n\n\t\tmysql_query(\"set names \".$this->charset);\n\t}", "title": "" }, { "docid": "40feb799bdba3da4c220d93f7a76d44c", "score": "0.60395736", "text": "function cls_sucursal()\n{\n\n$this->database = new MySQL();\n\n}", "title": "" }, { "docid": "fc9d06c2e8b1708213835b1ce4ff1219", "score": "0.6038536", "text": "public function connect(){\n if($connection = mysql_connect($this->host,$this->user,$this->pass)){\n if(!mysql_select_db($this->name)){\n mysql_query(\"CREATE DATABASE IF NOT EXISTS \".$this->name);\n if(!mysql_select_db($this->name)) {\n trigger_error('Could not select Database ' . $this->name);\n exit();\n }else{\n mysql_set_charset($this->charset,$connection);\n $this->connection = $connection;\n }\n }else{\n mysql_set_charset($this->charset,$connection);\n $this->connection = $connection;\n }\n }else{\n trigger_error('Could not connect to Database');\n exit();\n }\n }", "title": "" }, { "docid": "0e5856e2890304a951366985c0852792", "score": "0.60334074", "text": "protected function init(){ \n $this->db = new MySqlDataAdapter($this->cfg['db']['hostname'], $this->cfg['db']['username'], \n $this->cfg['db']['password'], $this->cfg['db']['database']); \n }", "title": "" }, { "docid": "7a548e7fdc7266466275623964889f27", "score": "0.6028698", "text": "public function connect(){\n\t\t\t$this->con=mysql_connect(\"localhost\",$this->dbUser,$this->dbPassword);\n\t\t\tif(!$this->con){\n\t\t\t\tdie('Keine Verbindung:: '.mysql_error());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "39ab7c23c08bb2d3d99d2c905a2b6ee1", "score": "0.6028379", "text": "public function __construct()\n {\n $this->getConnection();\n }", "title": "" }, { "docid": "a7c4722897815fe3e37adad2ee6153a7", "score": "0.60227615", "text": "public function __construct() {\n $this->db = Fari_Db::getConnection();\n }", "title": "" }, { "docid": "7e976cc1aef48263384c1391626f982b", "score": "0.6020149", "text": "public function getDatabaseAttribute()\n {\n return new DatabaseConnection($this);\n }", "title": "" }, { "docid": "a772684638d1d393fc6799dc3bdb3a63", "score": "0.6019198", "text": "function __construct(){\n $this->con = DBCONNECT::CONNECT();\n }", "title": "" }, { "docid": "1c0cebd4bddbac9578591f32d1b0f0ec", "score": "0.60175973", "text": "public function __construct()\n {\n $mySqlConfig = new MySQLConfig();\n $this->host = $mySqlConfig::DB_HOST;\n $this->user = $mySqlConfig::DB_USER;\n $this->password = $mySqlConfig::DB_PASSWORD;\n $this->database = $mySqlConfig::DB_NAME;\n //Almacenamos la conexion en un metodo\n $this->conexionMySQL = mysqli_connect($this->host, $this->user, $this->password, $this->database);\n }", "title": "" }, { "docid": "d43a820a8e858ff67d612ba66170e41b", "score": "0.60154045", "text": "function MySQLConnection(){\n\t$host = 'mysql:host='.$this->server.';dbname='.$this->dbName;\n\ttry{\n\t $dbh = new PDO( $host, $this->user, $this->password, array(PDO::ATTR_PERSISTENT=>true));\n\t $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t Registry::instance();\n\t Registry::setData('MySQL_Connect',$dbh);\n\t} \n\tcatch (PDOException $e){\n\t return 'Connection error: '.$e->getMessage();\n\t}\n }", "title": "" }, { "docid": "c59cfdd44211f9cf9d7cc39e74db01b3", "score": "0.6015116", "text": "public function __construct($db){\n $this->connection = $db;\n }", "title": "" }, { "docid": "807d8d2e5e45271e58ea89c28a699dcd", "score": "0.60027015", "text": "protected function db() {\n if (!is_null($this->db)) {\n return $this->db;\n }\n\n return $this->db = DB::connection();\n }", "title": "" }, { "docid": "49bf705675d2f2b4c08cb4d72a299eb4", "score": "0.6000431", "text": "public function db()\n {\n $config = array(\n 'driver' => Acuity_Registry::get('config')->driver,\n 'file' => ROOT_PATH . DS . Acuity_Registry::get('config')->file,\n );\n\n $db = Acuity_Db_Factory::load($config);\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n Acuity_Registry::set('db', $db);\n }", "title": "" }, { "docid": "cd2d2d1045645bb6d2c3a0eda07ccb20", "score": "0.59995085", "text": "protected function _setDatabase()\n {\n $this->options['database'] = CakeboxUtility::normalizeDatabaseName($this->options['url']);\n }", "title": "" }, { "docid": "6fb3cfca2908d497a6372bfaa6d944ba", "score": "0.5990414", "text": "protected function getConnection()\n {\n return $this->createDefaultDBConnection($this->connection, 'mysql');\n }", "title": "" }, { "docid": "39194d274942b50c8717ef54647c1ac9", "score": "0.5989037", "text": "public static function connect () {\n if(self::$db === null) {\n self::$db = new Database(Config::get('db_settings'));\n }\n \n return self::$db;\n \n }", "title": "" }, { "docid": "dde77b94ab5abc95a9e59a2464cd3fec", "score": "0.5985096", "text": "public function __construct()\r\n {\r\n $this->con = new Database();\r\n }", "title": "" }, { "docid": "0cdbf927a6c29bfa2192cbdf898913b8", "score": "0.59823734", "text": "public function __construct()\n {\n parent::__construct(\"mysql:host=127.0.0.1;port=3307;dbname=\" . $this->_config['dbname'], $this->_config['username'], $this->_config['password'], array('charset' => 'utf8'));\n $this->getPDOConnection();\n }", "title": "" }, { "docid": "4d58a7f82c8122d4c1df181a397abd4d", "score": "0.59803987", "text": "function __construct(){\n $this->open_db_connection();\n }", "title": "" }, { "docid": "ed9f700db0910fbbf78bdbf2fac0856e", "score": "0.5976976", "text": "public static function init()\n {\n try\n {\n self::$db = new PDO(\"mysql:host=\" . DB_HOST . \";dbname=\" . DB_NAME, DB_USERNAME, DB_PASSWORD);\n self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch ( PDOException $e )\n {\n echo 'Connection failed: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "614a7274e38ae0763d24dc4032ec6393", "score": "0.59741145", "text": "public function connect()\n\t{\n\t\tif ($this->_connection)\n\t\t\treturn;\n\n\t\tif (Database_MySQL::$_set_names === NULL)\n\t\t{\n\t\t\t// Determine if we can use mysql_set_charset(), which is only\n\t\t\t// available on PHP 5.2.3+ when compiled against MySQL 5.0+\n\t\t\tDatabase_MySQL::$_set_names = ! function_exists('mysql_set_charset');\n\t\t}\n\n\t\t// Extract the connection parameters, adding required variabels\n\t\textract($this->_config['connection'] + array(\n\t\t\t'database' => '',\n\t\t\t'hostname' => '',\n\t\t\t'username' => '',\n\t\t\t'password' => '',\n\t\t\t'persistent' => FALSE,\n\t\t));\n\n\t\t// Prevent this information from showing up in traces\n\t\tunset($this->_config['connection']['username'], $this->_config['connection']['password']);\n\n\t\ttry\n\t\t{\n\t\t\tif ($persistent)\n\t\t\t{\n\t\t\t\t// Create a persistent connection\n\t\t\t\t$this->_connection = mysqli_pconnect($hostname, $username, $password);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create a connection and force it to be a new link\n\t\t\t\t$this->_connection = mysqli_connect($hostname, $username, $password, TRUE);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// No connection exists\n\t\t\t$this->_connection = NULL;\n\n\t\t\tthrow new Database_Exception(':error',\n\t\t\t\tarray(':error' => $e->getMessage()),\n\t\t\t\t$e->getCode());\n\t\t}\n\n\t\t// \\xFF is a better delimiter, but the PHP driver uses underscore\n\t\t$this->_connection_id = sha1($hostname.'_'.$username.'_'.$password);\n\n\t\t$this->_select_db($database);\n\n\t\tif ( ! empty($this->_config['charset']))\n\t\t{\n\t\t\t// Set the character set\n\t\t\t$this->set_charset($this->_config['charset']);\n\t\t}\n\n\t\tif ( ! empty($this->_config['connection']['variables']))\n\t\t{\n\t\t\t// Set session variables\n\t\t\t$variables = array();\n\n\t\t\tforeach ($this->_config['connection']['variables'] as $var => $val)\n\t\t\t{\n\t\t\t\t$variables[] = 'SESSION '.$var.' = '.$this->quote($val);\n\t\t\t}\n\n\t\t\tmysqli_query($this->_connection, 'SET '.implode(', ', $variables));\n\t\t}\n\t}", "title": "" }, { "docid": "e06f0e2d45030dfdc05eab2ddf1a73b9", "score": "0.59728205", "text": "public static function connect() {\n\t\t// use configuration from \n\t\tself::$defaultConnection = dibi::connect(Nette\\Environment::getConfig('database'));\n\t}", "title": "" }, { "docid": "59e974b7de1ee01924f4d058c170ca46", "score": "0.5972684", "text": "public function connect()\n {\n // don't connect twice\n if ($this->pdo) {\n return;\n }\n\n // connect to the database\n $this->beginProfile(__FUNCTION__);\n $this->pdo = new PDO(\n $this->dsn,\n $this->username,\n $this->password,\n $this->options\n );\n $this->endProfile();\n\n // set attributes\n foreach ($this->attributes as $attribute => $value) {\n $this->setAttribute($attribute, $value);\n }\n }", "title": "" }, { "docid": "f8ada0f6bd6c3fe74a3159517ab5a839", "score": "0.5970468", "text": "function Connection(){\n $this->conn = NULL;\n }", "title": "" }, { "docid": "03026ad87601e6532288516dc2079141", "score": "0.5964805", "text": "public function __construct() {\n\t\t// Constructor\n\t\t$this->mysql = new Mysql();\n\t}", "title": "" }, { "docid": "7981ae001d35d15b45d6c338ee721148", "score": "0.59627134", "text": "function __construct() {\n\t\t\t$this -> db = new DB_Connection();\n\t\t\t$this -> connection = $this->db->getConnection();\n\t\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "7a73649358e104d44f45da49fc0c3edd", "score": "0.0", "text": "public function create()\n {\n //Mostrar formulari per crear categorias\n return view(\"Categorias.categoria_form\");\n }", "title": "" } ]
[ { "docid": "65c7e51c557119c4523c305976c470bc", "score": "0.80575514", "text": "public function create()\n {\n return view('Admin.acl.resource.form');\n }", "title": "" }, { "docid": "bb87b5e7b03ebf8127b27e4ff14ee77c", "score": "0.7914315", "text": "public function create()\n {\n return view('Backend/Resources/addResource');\n }", "title": "" }, { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.76836234", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "2378dd3b14ed3946fdc33fe245647ae5", "score": "0.75997573", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName().'.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "4410c37acc7f709e86ccc730cb542643", "score": "0.75863165", "text": "public function create()\n {\n return view('admin.resources.create');\n }", "title": "" }, { "docid": "ee18d6d904526a51f41375d0bd093040", "score": "0.75147605", "text": "public function create()\n {\n $model = $this->resource;\n $resource = new Resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "14707811f9cdd58dcd07e882041856bc", "score": "0.74805194", "text": "public function create()\n\t{\n\t\treturn view('module.forms.create');\n\t}", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ecbbca86f1ca5794847773f086d5685e", "score": "0.7357543", "text": "public function create()\n {\n return view('backend.client.formcreate');\n }", "title": "" }, { "docid": "e24406181475135438d05ab2d48d4b36", "score": "0.73556155", "text": "public function create()\n\t{\n\t\treturn view('form');\n\t}", "title": "" }, { "docid": "10d532d72b585493a6ca515a12bc3a2c", "score": "0.7321179", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}", "title": "" }, { "docid": "517ede7d413126a1373684f8f17be2b9", "score": "0.7247568", "text": "public function create()\n {\n return view('clothing.form');\n }", "title": "" }, { "docid": "5016b1af29a2cdfd8f026421109d1142", "score": "0.7241239", "text": "public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier');\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Create new supplier'),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\n\t\t));\n\t}", "title": "" }, { "docid": "d777482ca48a952bda74d0486cdad76a", "score": "0.7237927", "text": "public function create()\n {\n return \"Here is the creating form page.\";\n }", "title": "" }, { "docid": "1e688bba9a7b271c2e7c26eb773383da", "score": "0.72305965", "text": "public function create()\n {\n //\n\n return view(\"student.form\");\n }", "title": "" }, { "docid": "1e47d9942ad3c42b28df121849c0197e", "score": "0.7225282", "text": "public function newAction()\n {\n $this->view->form = new PersonasForm(\n null,\n [\n 'edit' => true,\n ]\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "fabe91e71192c05e656f9056b41ad668", "score": "0.72117", "text": "public function showCreateForm()\n {\n return view('admin.accounts.create');\n }", "title": "" }, { "docid": "e816b62a64c3324cff6ccbc00e52514b", "score": "0.7202654", "text": "public function frontCreate()\n {\n $resource = new Resource;\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n\n return view('frontend.resources.create', compact(\n 'resource', 'countries', 'cities', 'categories'\n ));\n }", "title": "" }, { "docid": "a0f86f0603cbb921b500dd4fcb6185e6", "score": "0.71805054", "text": "public function create()\n {\n $data['action'] = 'absensi.store';\n return view('absensi.form', $data);\n }", "title": "" }, { "docid": "942a0a16c384247567b37ebeddf71971", "score": "0.7151351", "text": "public function create()\n {\n return view('Backend.student.new');\n }", "title": "" }, { "docid": "dc9ff50878e23f55a66dade7c29e9693", "score": "0.71423906", "text": "public function create()\n {\n return view('admin.trucks.forms.create');\n }", "title": "" }, { "docid": "b7f809ca4143f6da6ac8746ef0099f3a", "score": "0.71369606", "text": "public function create()\n {\n return view('backend.students.student-form-add');\n }", "title": "" }, { "docid": "0324ad3d56f56ecb8342812c78064a91", "score": "0.71342736", "text": "public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }", "title": "" }, { "docid": "871ecf60820ab50a5032377d975fc622", "score": "0.71342325", "text": "public function create()\n {\n return view('admin.ProviderCreateForm');\n }", "title": "" }, { "docid": "97209db276d73dfc71ffc10ef4a4037f", "score": "0.71315765", "text": "public function create()\n {\n return view('book.form');\n }", "title": "" }, { "docid": "1e082bee3084311021ae31460c5c0e39", "score": "0.7127698", "text": "public function create()\n {\n return view('forms.books.create');\n }", "title": "" }, { "docid": "fa54f02550ef87c9f8f5a27d06c382de", "score": "0.71258074", "text": "public function create() {\n return view('resources.edit');\n }", "title": "" }, { "docid": "33732dfef72a6d8b9b06cc792789e6df", "score": "0.71213603", "text": "public function create()\n\t{\n\t\treturn view('admin.product.form');\n\t}", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "d70c1ea684023a020e3557813873c2ca", "score": "0.70956016", "text": "public function create()\n {\n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "a5962b732b317d8491e1cd29bddb79a5", "score": "0.7095086", "text": "public function create()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "4b38db6737bb3fb8f108037fd62385fc", "score": "0.70905846", "text": "public function create()\n {\n return view('enterprise.new');\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "0ed27c8268deedd7d778400898a3117f", "score": "0.7051436", "text": "public function create()\n\t{\n return View::make('clerks.create');\n\t}", "title": "" }, { "docid": "991f766d6ac0e5a6f0b81f6a7483c64a", "score": "0.7049206", "text": "public function create()\n {\n //\n $page_title = 'Supplier';\n $page_description = 'Supplier Add Form';\n $form_title = 'Supplier - Add';\n $form_description = 'Enter details to add new supplier , field with * are required.';\n $supplier = new Supplier();\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\n }", "title": "" }, { "docid": "9954664a9c6b9b3ab69721566e0199bc", "score": "0.7044138", "text": "public function create()\n {\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "47df4583b4b1b0f104234ead33b0b361", "score": "0.7041365", "text": "public function create() {\n return view(\"ir.create\");\n }", "title": "" }, { "docid": "23ef4c6aae4638b7258db6105822d281", "score": "0.70397395", "text": "public function create()\n {\n $data['action'] = 'jadwalbelajar.store';\n return view ('jadwalbelajar.form', $data);\n }", "title": "" }, { "docid": "7bbb0d78cadef3c44a577d92d50a3e67", "score": "0.70380855", "text": "public function create()\n {\n $resources = Resource::all();\n return view('product.create', compact('resources'));\n }", "title": "" }, { "docid": "45f9c7429c98bc848636cf3e3af4a0b7", "score": "0.70367175", "text": "public function create()\n\t{\n\t\treturn view('admin.show.create');\n\t}", "title": "" }, { "docid": "4d21f7c9cf42b4d85338aca053e91032", "score": "0.70324284", "text": "public function create()\r\n {\r\n $title = trans('book.new');\r\n $this->generateParam();\r\n return view('layouts.create', compact('title'));\r\n }", "title": "" }, { "docid": "3be30800c76364ece9bf10bfffd9d576", "score": "0.7022247", "text": "public function create()\n {\n return view('penerbit.form');\n }", "title": "" }, { "docid": "5210b9361957c963c05861d35648076b", "score": "0.70178825", "text": "public function create()\n {\n $formInputs = $this->form();\n $formInputs['method'] = 'create';\n\n\n return view('students.create', compact('formInputs'));\n }", "title": "" }, { "docid": "804a6ca9dad7489200cc1f28102b0473", "score": "0.7002272", "text": "public function create()\n {\n return view('admin.restaurents.create');\n }", "title": "" }, { "docid": "e3189bc5490f564078b663c86cd3b554", "score": "0.69995284", "text": "public function create()\n {\n return view('admin.clubes.form')\n ->with(['action' => route('clubes.store')]);\n }", "title": "" }, { "docid": "27a713091aa62f5f81eb6b7a09310814", "score": "0.6997733", "text": "public function create()\n {\n return view('project.form');\n }", "title": "" }, { "docid": "76ecd9f94330c8bff719dad38ac5e742", "score": "0.69919205", "text": "public function create()\n {\n return view('forms.newPoetry');\n }", "title": "" }, { "docid": "75773cfa50c8a890d093cd7b4128f44b", "score": "0.6984025", "text": "public function create()\n {\n // INI REDIRECT KE HALAMAN FORM INPUT\n return view('admin.create');\n }", "title": "" }, { "docid": "c3119b97c0e321666818c6fe3e6116b4", "score": "0.697933", "text": "public function create()\n {\n return view($this->viewRoute.'.form');\n }", "title": "" }, { "docid": "7a36d29ededb118e48dc1f2b35700e81", "score": "0.697282", "text": "public function create()\n {\n //\n return view(\"billproducts.createForm\");\n }", "title": "" }, { "docid": "986fd11f3e8bfa985b902a8006b7d306", "score": "0.6968721", "text": "public function create()\n\t{\n\t\t$forms \t= $this->form_add();\n\t\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\n\n\t\tif(isset($this->disable_add))\n\t\t\t$disable_add = $this->disable_add;\n\n\t\tif(isset($this->disable_edit))\n\t\t\t$disable_edit = $this->disable_edit;\n\n\t\tif(isset($this->disable_delete))\n\t\t\t$disable_delete = $this->disable_delete;\n\n\t\tif(isset($this->custom_add))\n\t\t\t$custom_add = $this->custom_add;\n\n\t\treturn View::make('crud.create' , \n\t\t\tarray(\t\n\t\t\t\t'forms' \t\t\t=> $forms,\n\t\t\t\t'title'\t\t\t\t=> $this->title,\n\t\t\t\t'slug'\t\t\t\t=> $this->slug,\n\t\t\t\t'form_span'\t\t\t=> $this->form_span,\n\t\t\t\t'controller'\t\t=> $this->controller,\n\t\t\t\t'disable_edit'\t\t=> $disable_edit,\n\t\t\t\t'disable_delete' \t=> $disable_delete,\n\t\t\t\t'disable_add'\t\t=> $disable_add,\n\t\t\t\t'custom_add'\t\t=> $custom_add\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "8ced93e50c35698f25fcb388d463e032", "score": "0.6958418", "text": "public function create()\n {\n return view(\"pages.daftar.form\");\n }", "title": "" }, { "docid": "6e09ea0495ecf33b6615199f96a87dd9", "score": "0.6958075", "text": "public function create()\n {\n return view('inventaris.create');\n }", "title": "" }, { "docid": "5225b1fd92184a478b2b9762321d1c23", "score": "0.69497955", "text": "public function create()\n {\n return view('hiperbolica.create');\n }", "title": "" }, { "docid": "593fbba523a02dd32ffe7ecf4fd50435", "score": "0.6946303", "text": "public function create()\n {\n return view('admin.site.form');\n }", "title": "" }, { "docid": "5700bb5603b363af554c788e226eff17", "score": "0.6945535", "text": "public function newAction()\n {\n $entity = new Reconocimiento();\n $form = $this->createForm(new ReconocimientoType(), $entity);\n\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "12fd2eae40d48367c7e6d8331f5ead34", "score": "0.69429785", "text": "public function create()\n\t{\n\t\t//\n return View::make('objects.addnew');\n\t}", "title": "" }, { "docid": "c7310471f43f53eaf4b8eff6831b36d3", "score": "0.6939984", "text": "public function create()\n {\n return view('linhas.create');\n }", "title": "" }, { "docid": "ad623548153e56c22245e48fee70a80f", "score": "0.69390464", "text": "public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }", "title": "" }, { "docid": "6339cf25fff656067a9eaf3d5b7efb2a", "score": "0.6938875", "text": "public function create()\n {\n return view('admin.banner.banner-form')->with('title','add');\n }", "title": "" }, { "docid": "517e8eef100389973418652d54a823b1", "score": "0.69366604", "text": "public function create()\n {\n //no create view as ther create form is on the index page\n }", "title": "" }, { "docid": "9dc7ce932c1b23a833528346de52d671", "score": "0.69311243", "text": "public function create()\n {\n return view('admin.electrician.add');\n }", "title": "" }, { "docid": "a44e07047efd0e153e9c966db5bdabd0", "score": "0.69306445", "text": "public function create()\n {\n return view('dashboard.student.studentForm');\n }", "title": "" }, { "docid": "0b0f0931a087bfbc6677280f914ebfda", "score": "0.69298023", "text": "public function create()\n {\n return view('hocsinh.add');\n }", "title": "" }, { "docid": "8c2948fcee8393ed6a20bf84afb9cc88", "score": "0.6928795", "text": "public function create()\n {\n return view('manage.add');\n }", "title": "" }, { "docid": "1ba5eb9946214bea84f1480b6feabe1f", "score": "0.69276893", "text": "public function create()\n {\n return view('bspyl-form');\n }", "title": "" }, { "docid": "07e409b45065624d003704ab3b447aec", "score": "0.69273114", "text": "public function create()\n {\n return view('admin.product.form');\n }", "title": "" }, { "docid": "5ed8a37a585288e035b28ed478757c41", "score": "0.6921601", "text": "public function create()\n {\n return view('elonlars.create');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "9a0129f9c2c01a078afcdd438cc75b1f", "score": "0.69172627", "text": "public function create()\n {\n return view('vestiti.form');\n }", "title": "" }, { "docid": "92274cb7faf3de5d13f627815b8f4ba2", "score": "0.69144803", "text": "public function create()\n {\n\n //\n\n return view('addinformation');\n\n }", "title": "" }, { "docid": "8a7c33d5844900cbaaaebde7aa21e4dd", "score": "0.6911652", "text": "public function formCreateAction() {\n $this->view->form = new PartnersForm();\n }", "title": "" }, { "docid": "b43d8bd2e5fa832f2b86d77c64e5ad10", "score": "0.69116175", "text": "public function create()\n {\n $supplier = new Supplier;\n return view('supplierForm')->with('supplier',$supplier);\n }", "title": "" }, { "docid": "d6d7c0a46ec7af65d934ca4831a12435", "score": "0.6911027", "text": "public function create()\n {\n $this->authorize(__FUNCTION__);\n\n $specie = new Specie;\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "d0a17dffa7cd331b95da26311bfaf458", "score": "0.69106084", "text": "public function create()\n {\n return view('backend.actions.create');\n }", "title": "" }, { "docid": "bf90fc181239c9ee309df9b686f918de", "score": "0.69096845", "text": "public function create()\n {\n return view('kontraktor::create');\n }", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "2b077d4213a9e74657f7368e00d5d96e", "score": "0.69072443", "text": "public function create()\n\t{\n\t\t$person = new Person;\n \n return view('admin.people.form', ['person' => $person]); \n\t}", "title": "" }, { "docid": "8cfed7c03b1c2f9d9fc6996ae61ff1e3", "score": "0.6906446", "text": "public function create()\n {\n return view('admin.users.forms.create');\n }", "title": "" }, { "docid": "12c04608837ced3906ffa6fd0839aefc", "score": "0.6904492", "text": "public function create()\n {\n // return view('formname.create');\n }", "title": "" }, { "docid": "6fe9753acadb65e60f24f2784b8c57e8", "score": "0.6903352", "text": "public function create()\n {\n return view('showCreate');\n }", "title": "" }, { "docid": "be0ad6355f1cd2d306c6632b0178efe9", "score": "0.69000477", "text": "public function create()\n {\n return view('comuni.add');\n }", "title": "" }, { "docid": "1b96ed3b5237de2d9b8b93a0082346de", "score": "0.6898089", "text": "public function create()\n\t{\n $theme = $this->theme;\n $theme->set('title','New Employee');\n\n return $theme->layout('form')->scope('employees.create')->render();\n\t}", "title": "" }, { "docid": "c05139fcffc8ed34edf664b1dcababe1", "score": "0.6897515", "text": "public function actionCreate()\n {\n $this->layout = 'principal2';\n $model = new Registros();\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": "8f937ad7c5f9325dd1c12c02346f01a1", "score": "0.6897389", "text": "public function create()\n {\n return view('Job.form');\n }", "title": "" }, { "docid": "c6e630a8785e77f2934d7509a0426ed1", "score": "0.68941396", "text": "public function newAction()\n {\n $entity = new Formations();\n $form = $this->createCreateForm($entity);\n\n\n return $this->render('FormBundle:Formations:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "f8dbbd8eb79b47b7dd8cbe07d9f8aa6c", "score": "0.68926984", "text": "public function create()\n {\n \n return view('falta.create'\n );\n }", "title": "" }, { "docid": "9d3fa77955670de89373a055d00ff3f2", "score": "0.68926096", "text": "public function create()\n {\n return view('terapis.create');\n }", "title": "" }, { "docid": "3ff70187ad516bfc1251de194f42b7f8", "score": "0.6892582", "text": "public function create()\n {\n //\n $title = 'Add Partner';\n return view('partnercompany.create_edit')->with(compact('title'));\n }", "title": "" }, { "docid": "ee157e1835fe293cefd0eceeafc16825", "score": "0.68916535", "text": "public function create()\n {\n return view('question.new');\n }", "title": "" }, { "docid": "eaeda1b26ca65d0dd32dbeb43e442328", "score": "0.6891185", "text": "public function create()\n\t{\n\t\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\n\t}", "title": "" } ]
ffbab9d0f30fd6b729e97be43e350424
gmaps form settings function.
[ { "docid": "68468b01f20111a3121a53e0576bc0cd", "score": "0.6728609", "text": "function gmaps_friends_form_settings_init($settings) {\n\n\t\t$settings['results_map'][1]['fl_map_icon_usage'] = array(\n\t\t\t\t'name' => 'fl_map_icon_usage',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Map Icon Usage', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the map\\'s icons that will be used to display results on the map', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['fl_global_map_icon'] = array(\n\t\t\t\t'name' => 'fl_global_map_icon',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Default map icon', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the global icon for google map. All results will use this icon to show its location on the map unless you check the \"per post icon\" checkbox below. The map icons can be found in \"/wp-content/plugins/geo-my-wp/assets/map-icons/main-icons/\". you can easily remove or add your own icons to this folder. ', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['your_location_icon'] = array(\n\t\t\t\t'name' => 'fl_your_location_icon',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'User Location Icon', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the icon that will show the user location on the map. the \"your location\" icons can be found in \"/wp-content/plugins/geo-my-wp/assets/map-icons/your-location-icons/\". you can easily remove or add your own icons to this folder. ', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\treturn $settings;\n\t}", "title": "" } ]
[ { "docid": "b2a26bd45c6a1e3d61f4920fce14d933", "score": "0.7403602", "text": "function google_geocode_settings() {\n $form = array();\n $key = '';\n if (function_exists('gmap_get_key')) {\n $key = gmap_get_key();\n }\n\n if (!empty($key)) {\n $form['location_geocode_google_apikey'] = array(\n '#type' => 'item',\n '#title' => t('Google Maps API Key'),\n '#value' => $key,\n '#description' => t('The key in use was automatically provided by GMap.'),\n );\n }\n else {\n $form['location_geocode_google_apikey'] = array(\n '#type' => 'textfield',\n '#title' => t('Google Maps API Key'),\n '#size' => 64,\n '#maxlength' => 128,\n '#default_value' => variable_get('location_geocode_google_apikey', ''),\n '#description' => t('In order to use the Google Maps API geocoding web-service, you will need a Google Maps API Key. You can obtain one at the !sign_up_link for the !google_maps_api. PLEASE NOTE: You will <em>not</em> have to re-enter your API key for each country for which you have selected Google Maps for geocoding. This setting is global.', array('!sign_up_link' => '<a href=\"http://www.google.com/apis/maps/signup.html\">sign-up page</a>', '!google_maps_api' => '<a href=\"http://www.google.com/apis/maps/\">Google Maps API</a>'))\n );\n }\n\n $country = arg(4);\n if ($country) {\n $form['location_geocode_' . $country . '_google_accuracy_code'] = array(\n '#type' => 'select',\n '#title' => t('Google Maps Geocoding Accuracy for %country', array('%country' => $country ) ),\n '#default_value' => variable_get('location_geocode_' . $country . '_google_accuracy_code', variable_get('location_geocode_google_minimum_accuracy', '3')),\n '#options' => location_google_geocode_accuracy_codes(),\n '#description' => t('The minimum required accuracy for the geolocation data to be saved.'),\n );\n }\n return $form;\n}", "title": "" }, { "docid": "38487a38bcc84124c46f5cba2bb39093", "score": "0.6972543", "text": "function gmaps_posts_form_settings_init($settings) {\n\n\t\t$settings['results_map'][1]['map_icon_usage'] = array(\n\t\t\t\t'name' => 'map_icon_usage',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Map Icon Usage', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the map\\'s icons that will be used to display results on the map', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['global_map_icon'] = array(\n\t\t\t\t'name' => 'global_map_icon',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Default map icon', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the global icon for google map. All results will use this icon to show its location on the map unless you check the \"per post icon\" checkbox below. The map icons can be found in \"/wp-content/plugins/geo-my-wp/assets/map-icons/main-icons/\". you can easily remove or add your own icons to this folder. ', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['your_location_icon'] = array(\n\t\t\t\t'name' => 'your_location_icon',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'User Location Icon', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the icon that will show the user location on the map. the \"your location\" icons can be found in \"/wp-content/plugins/geo-my-wp/assets/map-icons/your-location-icons/\". you can easily remove or add your own icons to this folder. ', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "fc2b4de2f7b3538e402afe2e3f166303", "score": "0.67172945", "text": "function geositemap_admin_settings_form() {\n\t$form = null;\n\t\n\t$form[\"general\"] = array(\n\t\t'#type' \t\t=> 'fieldset',\n\t\t'#title' \t\t=> 'Configuration générale',\n\t\t'#description' \t=> \"Configuration générale du Geositemap\",\n\t);\n\t\n\t$form[\"general\"]['geositemap_title'] = array(\n\t\t'#type' \t\t=> 'textfield',\n\t\t'#title' \t\t=> 'Titre de page',\n\t\t'#description' \t=> \"Titre principale de la page\",\n\t\t'#default_value' => geositemap_variable_get(\"page_title\")\n\t);\n\t\n\t$form[\"general\"]['geositemap_head_title'] = array(\n\t\t'#type' \t\t=> 'textfield',\n\t\t'#title' \t\t=> 'Titre de head',\n\t\t'#description' \t=> \"Contenu de la balise <em>&lt;title&gt;</em>\",\n\t\t'#default_value' => geositemap_variable_get(\"head_title\")\n\t);\n\t\n\t\t\n\tforeach(array(\"departement\",\"ville\") as $key) {\n\t\t\n\t\t$form[\"$key\"] = array(\n\t\t\t'#type' \t\t=> 'fieldset',\n\t\t\t'#title' \t\t=> ucfirst($key),\n\t\t\t'#description' \t=> \"Configuration de la partie $key\",\n\t\t);\n\t\t\n\t\t$form[\"$key\"]['geositemap_'.$key.'_title'] = array(\n\t\t\t'#type' \t\t=> 'textfield',\n\t\t\t'#title' \t\t=> 'Titre de page',\n\t\t\t'#description' \t=> \"Titre principale de la page\",\n\t\t\t'#default_value' => geositemap_variable_get($key.\"_page_title\")\n\t\t);\n\t\t\n\t\t$form[\"$key\"]['geositemap_'.$key.'_head_title'] = array(\n\t\t\t'#type' \t\t=> 'textfield',\n\t\t\t'#title' \t\t=> 'Titre de head',\n\t\t\t'#description' \t=> \"Contenu de la balise <em>&lt;title&gt;</em> de la page\",\n\t\t\t'#default_value' => geositemap_variable_get($key.\"_head_title\")\n\t\t);\n\t\t\n\t\t$form[\"$key\"]['geositemap_'.$key.'_meta_description'] = array(\n\t\t\t'#type' \t\t=> 'textarea',\n\t\t\t'#title' \t\t=> 'Description',\n\t\t\t'#description' \t=> \"Balise méta description de la page\",\n\t\t\t'#default_value' => geositemap_variable_get($key.\"_meta_description\")\n\t\t);\n\t}\n\treturn system_settings_form($form);\n}", "title": "" }, { "docid": "0836546b7e3ba1141ecb4434037b5605", "score": "0.6706882", "text": "public function settingsForm();", "title": "" }, { "docid": "0836546b7e3ba1141ecb4434037b5605", "score": "0.6706882", "text": "public function settingsForm();", "title": "" }, { "docid": "4b6e79dc51793844a4322a56d2c0a88c", "score": "0.668715", "text": "function includeMapForm() {\r\n $this->pi_initPIflexForm();\r\n $map_search = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'map_search', 'options');\r\n $map_search_anchor = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'map_search_anchor', 'options');\r\n \r\n if ($map_search == 1) {\r\n return \"map.addControl(new google.maps.LocalSearch(), new GControlPosition(\".$map_search_anchor.\", new GSize(10,20)));\"; \r\n }\r\n \r\n else {\r\n \r\n }\r\n}", "title": "" }, { "docid": "bd3906409db63bed6d244c0ebee373c9", "score": "0.66243505", "text": "function gigya_gm_settings_form($form, $form_state) {\n $form['gigya_gm_message'] = array(\n '#markup' => t('To position Gigya Gamification plugins, create a Gamification block via the menu below,\n and then position it via the \"Structure\"/\"Blocks\" menu.') . '<br /><br />',\n '#weight' => -50,\n );\n $form['gigya_gm_global'] = array(\n '#type' => 'fieldset',\n '#title' => t('Gigya Gamification global settings'),\n '#collapsible' => FALSE,\n );\n $form['gigya_gm_global']['gigya_gm_enable'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable Gigya Gamification'),\n '#default_value' => variable_get('gigya_gm_enable', FALSE),\n );\n $form['gigya_gm_global']['gigya_gm_enable_notifications'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable Gamification notifications'),\n '#default_value' => variable_get('gigya_gm_enable_notifications', FALSE),\n '#suffix' => '<hr>',\n );\n $form['gigya_gm_global']['gigya_gm_leaderboard_period'] = array(\n '#type' => 'select',\n '#title' => t('Leaderboard time period'),\n '#options' => array(\n '7days' => t('7 Days'),\n 'all' => t('All'),\n ),\n '#default_value' => variable_get('gigya_gm_leaderboard_period', '7days'),\n '#description' => t('The period for which to display the Leaderboard plugin. \\'All\\' - Stands for the all-time highest ranking users.'),\n '#suffix' => '<hr>',\n );\n $form['gigya_gm_global']['gigya_gm_total_count'] = array(\n '#type' => 'textfield',\n '#title' => t('Leaderboard user count'),\n '#size' => 2,\n '#description' => t('The number of users to display in the Leaderboard plugin. The maximum is 36.'),\n '#default_value' => variable_get('gigya_gm_total_count', '12'),\n );\n $form['gigya_gm_blocks'] = array(\n '#type' => 'fieldset',\n '#title' => t('Gigya Gamification blocks'),\n '#collapsible' => FALSE,\n );\n $gm_blocks = variable_get('gigya_gm_blobks', array());\n if (!empty($gm_blocks)) {\n foreach ($gm_blocks as $block_id => $block) {\n $opts[$block_id] = $block['block_name'];\n }\n $form['gigya_gm_blocks']['gigya_gm_delete'] = array(\n '#type' => 'fieldset',\n '#title' => t('Delete blocks'),\n '#collapsible' => FALSE,\n '#weight' => -11,\n '#attributes' => array('class' => array('gm-delete')),\n );\n $form['gigya_gm_blocks']['gigya_gm_delete']['gigya_gm_delete_blocks'] = array(\n '#type' => 'checkboxes',\n '#title' => '',\n '#options' => $opts,\n '#weight' => -10,\n );\n $form['gigya_gm_blocks']['gigya_gm_delete']['gigya_gm_delete_blocks_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Delete'),\n '#ajax' => array(\n 'callback' => 'gigya_gm_delete_block',\n 'wrapper' => 'gigya-gm-settings-form',\n 'method' => 'html',\n 'effect' => 'fade',\n ),\n );\n }\n else {\n $form['gigya_gm_blocks']['gigya_gm_delete']['gigya_gm_delete_blocks'] = array(\n '#markup' => '<div id=\"gm-delete\"></div>',\n );\n }\n $form['gigya_gm_blocks']['gigya_gm_new_block'] = array(\n '#type' => 'fieldset',\n '#title' => t('Create a new block'),\n '#collapsible' => FALSE,\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_block_name'] = array(\n '#type' => 'textfield',\n '#title' => t('Block name'),\n '#size' => 60,\n );\n\n // Achievements.\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_achievements'] = array(\n '#markup' => '<span class=\"label\">' . t('Achievements') . '</span>',\n '#prefix' => '<div class=\"gm-element\">',\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_achievements_enable'] = array(\n '#type' => 'checkbox',\n );\n $achiv_def_id = gigya_gm_default_id($gm_blocks, 'achievements', 'divAchievements');\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_achievements_div-id'] = array(\n '#type' => 'textfield',\n '#title' => t('Div ID'),\n '#size' => 60,\n '#default_value' => $achiv_def_id,\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_achievements_weight'] = array(\n '#type' => 'select',\n '#title' => t('Weight'),\n '#options' => drupal_map_assoc(range(-20, 20)),\n '#default_value' => 0,\n '#suffix' => '</div>',\n );\n\n // Challenge status.\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_challenge_status'] = array(\n '#markup' => '<span class=\"label\">' . t('Challenge status') . '</span>',\n '#prefix' => '<div class=\"gm-element\">',\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_challenge_status_enable'] = array(\n '#type' => 'checkbox',\n );\n $ch_def_id = gigya_gm_default_id($gm_blocks, 'challenge_status', 'divChallengeStatus');\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_challenge_status_div-id'] = array(\n '#type' => 'textfield',\n '#title' => t('Div ID'),\n '#size' => 60,\n '#default_value' => $ch_def_id,\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_challenge_status_weight'] = array(\n '#type' => 'select',\n '#title' => t('Weight'),\n '#options' => drupal_map_assoc(range(-20, 20)),\n '#default_value' => 0,\n '#suffix' => '</div>',\n );\n\n // User status.\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_user_status'] = array(\n '#markup' => '<span class=\"label\">' . t('User status') . '</span>',\n '#prefix' => '<div class=\"gm-element\">',\n );\n $us_def_id = gigya_gm_default_id($gm_blocks, 'user_status', 'divUserStatus');\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_user_status_enable'] = array(\n '#type' => 'checkbox',\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_user_status_div-id'] = array(\n '#type' => 'textfield',\n '#title' => t('Div ID'),\n '#size' => 60,\n '#default_value' => $us_def_id,\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_user_status_weight'] = array(\n '#type' => 'select',\n '#title' => t('Weight'),\n '#options' => drupal_map_assoc(range(-20, 20)),\n '#default_value' => 0,\n '#suffix' => '</div>',\n );\n\n // Leaderboard.\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_leaderboard'] = array(\n '#markup' => '<span class=\"label\">' . t('Leaderboard') . '</span>',\n '#prefix' => '<div class=\"gm-element\">',\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_leaderboard_enable'] = array(\n '#type' => 'checkbox',\n );\n $lead_def_id = gigya_gm_default_id($gm_blocks, 'leaderboard', 'divLeaderboard');\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_leaderboard_div-id'] = array(\n '#type' => 'textfield',\n '#title' => t('Div ID'),\n '#size' => 60,\n '#default_value' => $lead_def_id,\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_leaderboard_weight'] = array(\n '#type' => 'select',\n '#title' => t('Weight'),\n '#options' => drupal_map_assoc(range(-20, 20)),\n '#default_value' => 0,\n '#suffix' => '</div>',\n );\n $form['gigya_gm_blocks']['gigya_gm_new_block']['gigya_gm_blocks_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Create a block'),\n '#ajax' => array(\n 'callback' => 'gigya_gm_create_block',\n 'wrapper' => 'gigya-gm-settings-form',\n 'method' => 'html',\n 'effect' => 'fade',\n ),\n );\n $form['gigya_gm_advanced'] = array(\n '#type' => 'fieldset',\n '#title' => t('Advanced Settings'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n $form['gigya_gm_advanced']['gigya_gm_achievements_advanced'] = array(\n '#type' => 'textarea',\n '#title' => t('Advanced showAchievementsUI settings'),\n '#element_validate' => array('gigya_json_element_validate'),\n //'#default_value' => !empty($adv_parmas) ? gigya_values_array_to_string($adv_parmas) : '',\n '#default_value' => variable_get('gigya_gm_achievements_advanced', ''),\n '#description' => t('Enter valid !JSON object format. See list of available !parameters', array(\n '!parameters' => l(t('parameters'), 'http://developers.gigya.com/display/GD/gm.showAchievementsUI+JS', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n ),\n '!JSON' => l(t('JSON'), 'http://json.org', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n )\n )\n ),\n );\n $form['gigya_gm_advanced']['gigya_gm_notifications_advanced'] = array(\n '#type' => 'textarea',\n '#title' => t('Advanced showNotifications settings'),\n '#element_validate' => array('gigya_json_element_validate'),\n //'#default_value' => !empty($adv_parmas) ? gigya_values_array_to_string($adv_parmas) : '',\n '#default_value' => variable_get('gigya_gm_notifications_advanced', ''),\n '#description' => t('Enter valid !JSON object format. See list of available !parameters', array(\n '!parameters' => l(t('parameters'), 'http://developers.gigya.com/display/GD/gm.showNotifications+JS', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n ),\n '!JSON' => l(t('JSON'), 'http://json.org', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n )\n )\n ),\n );\n $form['gigya_gm_advanced']['gigya_gm_challenge_status_advanced'] = array(\n '#type' => 'textarea',\n '#title' => t('Advanced showChallengeStatusUI settings'),\n '#element_validate' => array('gigya_json_element_validate'),\n //'#default_value' => !empty($adv_parmas) ? gigya_values_array_to_string($adv_parmas) : '',\n '#default_value' => variable_get('gigya_gm_challenge_status_advanced', ''),\n '#description' => t('Enter valid !JSON object format. See list of available !parameters', array(\n '!parameters' => l(t('parameters'), 'http://developers.gigya.com/display/GD/gm.showChallengeStatusUI+JS', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n ),\n '!JSON' => l(t('JSON'), 'http://json.org', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n )\n )\n ),\n );\n $form['gigya_gm_advanced']['gigya_gm_leaderboard_advanced'] = array(\n '#type' => 'textarea',\n '#title' => t('Advanced showLeaderboardUI settings'),\n '#element_validate' => array('gigya_json_element_validate'),\n //'#default_value' => !empty($adv_parmas) ? gigya_values_array_to_string($adv_parmas) : '',\n '#default_value' => variable_get('gigya_gm_leaderboard_advanced', ''),\n '#description' => t('Enter valid !JSON object format. See list of available !parameters', array(\n '!parameters' => l(t('parameters'), 'http://developers.gigya.com/display/GD/gm.showLeaderboardUI+JS', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n ),\n '!JSON' => l(t('JSON'), 'http://json.org', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n )\n )\n )\n );\n $form['gigya_gm_advanced']['gigya_gm_user_status_advanced'] = array(\n '#type' => 'textarea',\n '#title' => t('Advanced showUserStatusUI settings'),\n '#element_validate' => array('gigya_json_element_validate'),\n //'#default_value' => !empty($adv_parmas) ? gigya_values_array_to_string($adv_parmas) : '',\n '#default_value' => variable_get('gigya_gm_user_status_advanced', ''),\n '#description' => t('Enter valid !JSON object format. See list of available !parameters', array(\n '!parameters' => l(t('parameters'), 'http://developers.gigya.com/display/GD/gm.showUserStatusUI+JS', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n ),\n '!JSON' => l(t('JSON'), 'http://json.org', array(\n 'external' => TRUE,\n 'attributes' => array('target' => '_blank'),\n )\n )\n )\n ),\n );\n\n $form['#attached']['css'] = array(\n drupal_get_path('module', 'gigya') . '/css/gigya_admin.css',\n );\n $form['#attached']['js'] = array(drupal_get_path('module', 'gigya') . '/js/gigya.admin.behaviors.js');\n $form['#attributes'] = array('class' => 'gigya-gm-settings-form');\n return system_settings_form($form);\n}", "title": "" }, { "docid": "ed0b3ba85d3f3540324839c7c1f093b5", "score": "0.6557552", "text": "function wpgmp_settings(){\n?>\n<div class=\"wpgmp-wrap\"> \n\t<div class=\"col-md-11\"> \n\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t<h3><span class=\"glyphicon glyphicon-asterisk\"></span><?php _e( 'Google WP Map Pro Settings', 'wpgmp_google_map' ) ?></h3>\n\n\t\t<div class=\"wpgmp-overview\">\n\t\t\t<form method=\"post\" action=\"options.php\"> \n\t\t\t\t<?php wp_nonce_field('update-options') ?> \n\t\t\t\t<p>\n\t\t\t\t\t<a href=\"<?php echo get_bloginfo('siteurl'); ?>/wp-admin/admin.php?page=wpgmp_add_location\"><?php _e( 'Click Here', 'wpgmp_google_map' ) ?></a>&nbsp; <?php _e( 'to add a new location or', 'wpgmp_google_map' ) ?>&nbsp;<a href=\"<?php echo get_bloginfo('siteurl'); ?>/wp-admin/admin.php?page=wpgmp_manage_location\"><?php _e( 'Browse', 'wpgmp_google_map' ) ?></a>&nbsp; <?php _e( 'your existings locations.', 'wpgmp_google_map' ) ?>\n\t\t\t\t</p>\n \n\t\t\t\t<div class=\"form-horizontal\">\n\t\t\t\t\t<fieldset><legend>General Setting</legend>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-3\"><label for=\"wpgmp_zoomlevel\"><?php _e( 'Zoom Level', 'wpgmp_google_map' ) ?></label></div>\n\t\t\t\t\t\t\t<div class=\"col-md-7\">\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"wpgmp_zoomlevel\" size=\"45\" value=\"<?php echo get_option('wpgmp_zoomlevel'); ?>\" />\n\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e( 'Choose Zoom Level between 1 to 19. Default is 14.', 'wpgmp_google_map' ) ?> </p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t \n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-3\"><label for=\"wpgmp_centerlatitude\"><?php _e( 'Center Latitude', 'wpgmp_google_map' ) ?></label></div>\n\t\t\t\t\t\t\t<div class=\"col-md-7\">\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"wpgmp_centerlatitude\" size=\"45\" value=\"<?php echo get_option('wpgmp_centerlatitude'); ?>\" />\n\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e( 'Write down center location on the map.', 'wpgmp_google_map' ) ?></p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div> \n\t\t\t\t \n\t\t\t\t\t\t <div class=\"row\"> \t\n\t\t\t\t\t\t\t<div class=\"col-md-3\"><label for=\"wpgmp_centerlongitude\"><?php _e( 'Center Longitude', 'wpgmp_google_map' ) ?></label></div>\n\t\t\t\t\t\t\t<div class=\"col-md-7\">\n\t\t\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" name=\"wpgmp_centerlongitude\" size=\"45\" value=\"<?php echo get_option('wpgmp_centerlongitude'); ?>\" />\n\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e( 'Write down center location on the map.', 'wpgmp_google_map' ) ?></p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div> \n\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"row\">\t\n\t\t\t\t\t\t\t<div class=\"col-md-3\"><label for=\"wpgmp_language\"><?php _e( 'Select Language', 'wpgmp_google_map' ) ?></label></div>\n\t\t\t\t\t\t\t<div class=\"col-md-7\">\n\t\t\t\t\t\t\t\t<select name=\"wpgmp_language\" class=\"form-control\">\n\t\t\t\t\t\t\t\t\t<option value=\"en\"<?php selected(get_option('wpgmp_language'),'en') ?>><?php _e( 'ENGLISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ar\"<?php selected(get_option('wpgmp_language'),'ar') ?>><?php _e( 'ARABIC', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"eu\"<?php selected(get_option('wpgmp_language'),'eu') ?>><?php _e( 'BASQUE', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"bg\"<?php selected(get_option('wpgmp_language'),'bg') ?>><?php _e( 'BULGARIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"bn\"<?php selected(get_option('wpgmp_language'),'bn') ?>><?php _e( 'BENGALI', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ca\"<?php selected(get_option('wpgmp_language'),'ca') ?>><?php _e( 'CATALAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"cs\"<?php selected(get_option('wpgmp_language'),'cs') ?>><?php _e( 'CZECH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"da\"<?php selected(get_option('wpgmp_language'),'da') ?>><?php _e( 'DANISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"de\"<?php selected(get_option('wpgmp_language'),'de') ?>><?php _e( 'GERMAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"el\"<?php selected(get_option('wpgmp_language'),'el') ?>><?php _e( 'GREEK', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"en-AU\"<?php selected(get_option('wpgmp_language'),'en-AU') ?>><?php _e( 'ENGLISH (AUSTRALIAN)', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"en-GB\"<?php selected(get_option('wpgmp_language'),'en-GB') ?>><?php _e( 'ENGLISH (GREAT BRITAIN)', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"es\"<?php selected(get_option('wpgmp_language'),'es') ?>><?php _e( 'SPANISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"fa\"<?php selected(get_option('wpgmp_language'),'fa') ?>><?php _e( 'FARSI', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"fi\"<?php selected(get_option('wpgmp_language'),'fi') ?>><?php _e( 'FINNISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"fil\"<?php selected(get_option('wpgmp_language'),'fil') ?>><?php _e( 'FILIPINO', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"fr\"<?php selected(get_option('wpgmp_language'),'fr') ?>><?php _e( 'FRENCH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"gl\"<?php selected(get_option('wpgmp_language'),'gl') ?>><?php _e( 'GALICIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"gu\"<?php selected(get_option('wpgmp_language'),'gu') ?>><?php _e( 'GUJARATI', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"hi\"<?php selected(get_option('wpgmp_language'),'hi') ?>><?php _e( 'HINDI', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"hr\"<?php selected(get_option('wpgmp_language'),'hr') ?>><?php _e( 'CROATIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"hu\"<?php selected(get_option('wpgmp_language'),'hu') ?>><?php _e( 'HUNGARIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"id\"<?php selected(get_option('wpgmp_language'),'id') ?>><?php _e( 'INDONESIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"it\"<?php selected(get_option('wpgmp_language'),'it') ?>><?php _e( 'ITALIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"iw\"<?php selected(get_option('wpgmp_language'),'iw') ?>><?php _e( 'HEBREW', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ja\"<?php selected(get_option('wpgmp_language'),'ja') ?>><?php _e( 'JAPANESE', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"kn\"<?php selected(get_option('wpgmp_language'),'kn') ?>><?php _e( 'KANNADA', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ko\"<?php selected(get_option('wpgmp_language'),'ko') ?>><?php _e( 'KOREAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"lt\"<?php selected(get_option('wpgmp_language'),'lt') ?>><?php _e( 'LITHUANIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"lv\"<?php selected(get_option('wpgmp_language'),'lv') ?>><?php _e( 'LATVIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ml\"<?php selected(get_option('wpgmp_language'),'ml') ?>><?php _e( 'MALAYALAM', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"mr\"<?php selected(get_option('wpgmp_language'),'mr') ?>><?php _e( 'MARATHI', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"nl\"<?php selected(get_option('wpgmp_language'),'nl') ?>><?php _e( 'DUTCH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"no\"<?php selected(get_option('wpgmp_language'),'no') ?>><?php _e( 'NORWEGIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"pl\"<?php selected(get_option('wpgmp_language'),'pl') ?>><?php _e( 'POLISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"pt\"<?php selected(get_option('wpgmp_language'),'pt') ?>><?php _e( 'PORTUGUESE', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"pt-BR\"<?php selected(get_option('wpgmp_language'),'pt-BR') ?>><?php _e( 'PORTUGUESE (BRAZIL)', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"pt-PT\"<?php selected(get_option('wpgmp_language'),'pt-PT') ?>><?php _e( 'PORTUGUESE (PORTUGAL)', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ro\"<?php selected(get_option('wpgmp_language'),'ro') ?>><?php _e( 'ROMANIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ru\"<?php selected(get_option('wpgmp_language'),'ru') ?>><?php _e( 'RUSSIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"sk\"<?php selected(get_option('wpgmp_language'),'sk') ?>><?php _e( 'SLOVAK', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"sl\"<?php selected(get_option('wpgmp_language'),'sl') ?>><?php _e( 'SLOVENIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"sr\"<?php selected(get_option('wpgmp_language'),'sr') ?>><?php _e( 'SERBIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"sv\"<?php selected(get_option('wpgmp_language'),'sv') ?>><?php _e( 'SWEDISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"tl\"<?php selected(get_option('wpgmp_language'),'tl') ?>><?php _e( 'TAGALOG', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"ta\"<?php selected(get_option('wpgmp_language'),'ta') ?>><?php _e( 'TAMIL', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"te\"<?php selected(get_option('wpgmp_language'),'te') ?>><?php _e( 'TELUGU', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"th\"<?php selected(get_option('wpgmp_language'),'th') ?>><?php _e( 'THAI', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"tr\"<?php selected(get_option('wpgmp_language'),'tr') ?>><?php _e( 'TURKISH', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"uk\"<?php selected(get_option('wpgmp_language'),'uk') ?>><?php _e( 'UKRAINIAN', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"vi\"<?php selected(get_option('wpgmp_language'),'vi') ?>><?php _e( 'VIETNAMESE', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"zh-CN\"<?php selected(get_option('wpgmp_language'),'zh-CN') ?>><?php _e( 'CHINESE (SIMPLIFIED)', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"zh-TW\"<?php selected(get_option('wpgmp_language'),'zh-TW') ?>><?php _e( 'CHINESE (TRADITIONAL)', 'wpgmp_google_map' ) ?></option>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e( 'Default is English.', 'wpgmp_google_map' ) ?></p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n</fieldset>\n\t\t \n\t\t\t\t\t\t <input type=\"hidden\" name=\"action\" value=\"update\" /> \n\t\t\t\t\t\t<input type=\"hidden\" name=\"page_options\" value=\"wpgmp_zoomlevel,wpgmp_centerlatitude,wpgmp_centerlongitude,wpgmp_mapwidth,wpgmp_mapheight,wpgmp_language,wpgmp_mashup,wpgmp_categorydisplayformat\" /> \n\t\t\t\t\t\t \n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-3\"></div>\n\t\t\t\t\t\t\t<div class=\"col-md-7\"> \n\t\t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" id=\"submit\" class=\"btn btn-lg btn-primary\" value=\"<?php _e( 'Save Changes', 'wpgmp_google_map' ) ?>\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t</form>\n\t\t</div> \n\t</div>\n</div> \n<?php\n}", "title": "" }, { "docid": "0a914acd572c2ca0ffc09927f6c04c65", "score": "0.65545285", "text": "function gmaps_fieldtype ()\n\t{\n\t\t//load stuff\n\t\tee()->load->helper('form');\n\n //weird session bug\n $user_vars\t= array(\n 'member_id', 'group_id', 'group_description', 'group_title', 'username', 'screen_name',\n 'email', 'ip_address', 'location', 'total_entries',\n 'total_comments', 'private_messages', 'total_forum_posts', 'total_forum_topics', 'total_forum_replies'\n );\n foreach ($user_vars as $user_var)\n {\n if(!isset(ee()->session->userdata[$user_var]))\n {\n ee()->session->userdata[$user_var] = '';\n }\n }\n\n\t\t//save data\n $data = trim(ee()->input->get_post('data'));\n //$zoom = ee()->input->get_post('zoom');\n $max_markers = ee()->input->get_post('max_markers');\n $zoom_level = ee()->input->get_post('zoom_level');\n $show_map_tools = ee()->input->get_post('show_map_tools');\n $show_search_tools = ee()->input->get_post('show_search_tools');\n $show_marker_icon = ee()->input->get_post('show_marker_icon');\n $show_circle_icon = ee()->input->get_post('show_circle_icon');\n $show_polygon_icon = ee()->input->get_post('show_polygon_icon');\n $show_polyline_icon = ee()->input->get_post('show_polyline_icon');\n $show_rectangle_icon = ee()->input->get_post('show_rectangle_icon');\n $location = ee()->input->get_post('location');\n $scroll = ee()->input->get_post('scroll');\n $icon_url = ee()->input->get_post('icon_url');\n $icon_dir = ee()->input->get_post('icon_dir');\n $field_name = ee()->input->get_post('fieldname');\n $field_name_input = ee()->input->get_post('fieldname_input');\n $height = ee()->input->get_post('height') != '' ? ee()->input->get_post('height') : '500px';\n\n //the tag\n $tag_gmaps = '\n {exp:gmaps:empty_map}\n {width}100%{/width}\n {address}heerde{/address}\n {height}'.$height.'{/height}\n {/exp:gmaps:empty_map}\n ';\n\n //parse the gmaps\n $parsed_gmaps = ee()->gmaps->parse_channel_data($tag_gmaps);\n $return = '';\n \n //data-zoom=\"'.$zoom.'\"\n $return .= '\n <div \n id=\"gmaps_ft_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\"\n class=\"gmap_holder ee_gmap_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').' gmaps_ft_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\"\n data-mapid=\"ee_gmap_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" \n data-gmaps-number=\"'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" \n data-fieldname=\"'.$field_name.'\"\n data-fieldname_input=\"'.$field_name_input.'\"\n data-location=\"'.$location.'\"\n data-max-markers=\"'.$max_markers.'\"\n data-zoom-level=\"'.$zoom_level.'\"\n data-show-map-tools=\"'.$show_map_tools.'\"\n data-show-search-tools=\"'.$show_search_tools.'\"\n data-show-marker-icon=\"'.$show_marker_icon.'\"\n data-show-circle-icon=\"'.$show_circle_icon.'\"\n data-show-polygon-icon=\"'.$show_polygon_icon.'\"\n data-show-polyline-icon=\"'.$show_polyline_icon.'\"\n data-show-rectangle-icon=\"'.$show_rectangle_icon.'\"\n data-scroll=\"'.$scroll.'\"\n >\n\n <div class=\"alert alert-info alert-block\">\n <a class=\"close\" data-dismiss=\"alert\" href=\"javascript:;\">×</a>\n <i class=\"icon-info-sign\"></i> <strong class=\"txt\"></strong>\n </div>\n ';\n\n if($show_map_tools == 1)\n {\n $return .= '\n <div class=\"gmaps_controls markers_holder\">\n <ul class=\"markers\">\n <li class=\"refresh_map_wrapper\">Refresh Map <i class=\"refresh_map fa fa-refresh\"></i></li>\n <li class=\"reset_map_wrapper\">Reset Map <i class=\"reset_map fa fa-trash\"></i></li>\n <li class=\"edit_map_wrapper\">Map Settings <i class=\"edit_map fa fa-edit\"></i></li>\n </ul>\n </div>\n ';\n }\n\n if($show_search_tools == 1)\n {\n $return .= ' <div class=\"search_holder\"> \n <input placeholder=\"Search location\" type=\"text\" class=\"search_address_input\" name=\"address_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\"/>\n <button class=\"submit search_address\">Search</button>\n <div class=\"markers_holder\">\n <ul class=\"markers\"></ul>\n </div>\n </div>\n <br />\n ';\n }\n\n $return .= ' <div style=\"display:none;\" class=\"markers_holder markers_on_map\">\n <h3>Markers</h3>\n <ul class=\"selected_markers markers sortable\"></ul>\n </div>\n\n <div style=\"display:none;\" class=\"markers_holder polylines_on_map\">\n <h3>Polylines</h3>\n <ul class=\"selected_polylines polylines\"></ul>\n </div>\n\n <div style=\"display:none;\" class=\"markers_holder polygons_on_map\">\n <h3>Polygons</h3>\n <ul class=\"selected_polygons polygons\"></ul>\n </div>\n\n <div style=\"display:none;\" class=\"markers_holder circles_on_map\">\n <h3>Circles</h3>\n <ul class=\"selected_circles circles\"></ul>\n </div>\n\n <div style=\"display:none;\" class=\"markers_holder rectangles_on_map\">\n <h3>Rectangles</h3>\n <ul class=\"selected_rectangles rectangles\"></ul>\n </div>\n\n\n <div style=\"display:none;\" id=\"edit_map_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" class=\"dialog \" title=\"Edit Map\">\n <div class=\"form-elem\">\n <label>Available Map Types :</label> \n <div class=\"input map_types\" data-name=\"map_types\" data-type=\"checkbox\">\n hybrid <input checked type=\"checkbox\" value=\"hybrid\" name=\"map_types[]\"/>\n roadmap <input checked type=\"checkbox\" value=\"roadmap\" name=\"map_types[]\"/>\n satellite <input checked type=\"checkbox\" value=\"satellite\" name=\"map_types[]\"/>\n terrain <input checked type=\"checkbox\" value=\"terrain\" name=\"map_types[]\"/>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>Default Map Types :</label> \n <div class=\"input map_type\" data-name=\"map_type\" data-type=\"normal\">\n <select class=\"value\" name=\"map_type\">\n <option value=\"hybrid\">hybrid</option>\n <option SELECTED value=\"roadmap\">roadmap</option>\n <option value=\"satellite\">satellite</option>\n <option value=\"terrain\">terrain</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>Zoom level :</label> \n <div class=\"input zoom_level\" data-name=\"zoom_level\" data-type=\"normal\">\n <select class=\"value\" name=\"zoom_level\">\n <option value=\"0\">0</option>\n <option SELECTED value=\"1\">1</option>\n <option value=\"2\">2</option>\n <option value=\"3\">3</option>\n <option value=\"4\">4</option>\n <option value=\"5\">5</option>\n <option value=\"6\">6</option>\n <option value=\"7\">7</option>\n <option value=\"8\">8</option>\n <option value=\"9\">9</option>\n <option value=\"10\">10</option>\n <option value=\"11\">11</option>\n <option value=\"12\">12</option>\n <option value=\"13\">13</option>\n <option value=\"14\">14</option>\n <option value=\"15\">15</option>\n <option value=\"16\">16</option>\n <option value=\"17\">17</option>\n <option value=\"18\">18</option>\n <option value=\"19\">19</option>\n <option value=\"20\">20</option>\n <option value=\"21\">21</option>\n <option value=\"22\">22</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-elem\">\n <label>Scrollwheel :</label> \n <div class=\"input scroll_wheel\" data-name=\"scroll_wheel\" data-type=\"normal\">\n <select class=\"value\" name=\"scroll_wheel\">\n <option SELECTED value=\"true\">Enabled</option>\n <option value=\"false\">Disabled</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-elem\">\n <label>ZoomControl :</label> \n <div class=\"input zoom_control\" data-name=\"zoom_control\" data-type=\"normal\">\n <select class=\"value\" name=\"zoom_control\">\n <option SELECTED value=\"true\">Enabled</option>\n <option value=\"false\">Disabled</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>ZoomControl Style :</label> \n <div class=\"input zoom_control_style\" data-name=\"zoom_control_style\" data-type=\"normal\">\n <select class=\"value\" name=\"zoom_control_style\">\n <option SELECTED value=\"LARGE\">Large</option>\n <option value=\"SMALL\">Small</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>ZoomControl Position :</label> \n <div class=\"input zoom_control_position\" data-name=\"zoom_control_position\" data-type=\"normal\">\n <select class=\"value\" name=\"zoom_control_position\">\n <option value=\"TOP_CENTER\">top center</option>\n <option SELECTED value=\"TOP_LEFT\">top left</option>\n <option value=\"TOP_RIGHT\">top right</option>\n <option value=\"LEFT_TOP\">left top</option>\n <option value=\"RIGHT_TOP\">right top</option>\n <option value=\"LEFT_CENTER\">left center</option>\n <option value=\"RIGHT_CENTER\">right center</option>\n <option value=\"LEFT_BOTTOM\">left bottom</option>\n <option value=\"RIGHT_BOTTOM\">right bottom</option>\n <option value=\"BOTTOM_CENTER\">bottom center</option>\n <option value=\"BOTTOM_LEFT\">bottom left</option>\n <option value=\"BOTTOM_RIGHT\">bottom right</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-elem\">\n <label>PanControl :</label> \n <div class=\"input pan_control\" data-name=\"pan_control\" data-type=\"normal\">\n <select class=\"value\" name=\"pan_control\">\n <option SELECTED value=\"true\">Enabled</option>\n <option value=\"false\">Disabled</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>PanControl Position :</label> \n <div class=\"input pan_control_position\" data-name=\"pan_control_position\" data-type=\"normal\">\n <select class=\"value\" name=\"pan_control_position\">\n <option value=\"TOP_CENTER\">top center</option>\n <option SELECTED value=\"TOP_LEFT\">top left</option>\n <option value=\"TOP_RIGHT\">top right</option>\n <option value=\"LEFT_TOP\">left top</option>\n <option value=\"RIGHT_TOP\">right top</option>\n <option value=\"LEFT_CENTER\">left center</option>\n <option value=\"RIGHT_CENTER\">right center</option>\n <option value=\"LEFT_BOTTOM\">left bottom</option>\n <option value=\"RIGHT_BOTTOM\">right bottom</option>\n <option value=\"BOTTOM_CENTER\">bottom center</option>\n <option value=\"BOTTOM_LEFT\">bottom left</option>\n <option value=\"BOTTOM_RIGHT\">bottom right</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-elem\">\n <label>MapTypeControl :</label> \n <div class=\"input map_type_control\" data-name=\"map_type_control\" data-type=\"normal\">\n <select class=\"value\" name=\"map_type_control\">\n <option SELECTED value=\"true\">Enabled</option>\n <option value=\"false\">Disabled</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>MapTypeControl Style :</label> \n <div class=\"input map_type_control_style\" data-name=\"map_type_control_style\" data-type=\"normal\">\n <select class=\"value\" name=\"map_type_control_style\">\n <option SELECTED value=\"DEFAULT\">Default</option>\n <option value=\"DROPDOWN_MENU\">Dropdown menu</option>\n <option value=\"HORIZONTAL_BAR\">Horizontal bar</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>MapTypeControl Position :</label> \n <div class=\"input map_type_control_position\" data-name=\"map_type_control_position\" data-type=\"normal\">\n <select class=\"value\" name=\"map_type_control_position\">\n <option value=\"TOP_CENTER\">top center</option>\n <option value=\"TOP_LEFT\">top left</option>\n <option SELECTED value=\"TOP_RIGHT\">top right</option>\n <option value=\"LEFT_TOP\">left top</option>\n <option value=\"RIGHT_TOP\">right top</option>\n <option value=\"LEFT_CENTER\">left center</option>\n <option value=\"RIGHT_CENTER\">right center</option>\n <option value=\"LEFT_BOTTOM\">left bottom</option>\n <option value=\"RIGHT_BOTTOM\">right bottom</option>\n <option value=\"BOTTOM_CENTER\">bottom center</option>\n <option value=\"BOTTOM_LEFT\">bottom left</option>\n <option value=\"BOTTOM_RIGHT\">bottom right</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-elem\">\n <label>StreetViewControl :</label> \n <div class=\"input street_view_control\" data-name=\"street_view_control\" data-type=\"normal\">\n <select class=\"value\" name=\"street_view_control\">\n <option SELECTED value=\"true\">Enabled</option>\n <option value=\"false\">Disabled</option>\n </select>\n </div>\n </div>\n <div class=\"form-elem\">\n <label>StreetViewControl Position :</label> \n <div class=\"input street_view_control_position\" data-name=\"street_view_control_position\" data-type=\"normal\">\n <select class=\"value\" name=\"street_view_control_position\">\n <option value=\"TOP_CENTER\">top center</option>\n <option SELECTED value=\"TOP_LEFT\">top left</option>\n <option value=\"TOP_RIGHT\">top right</option>\n <option value=\"LEFT_TOP\">left top</option>\n <option value=\"RIGHT_TOP\">right top</option>\n <option value=\"LEFT_CENTER\">left center</option>\n <option value=\"RIGHT_CENTER\">right center</option>\n <option value=\"LEFT_BOTTOM\">left bottom</option>\n <option value=\"RIGHT_BOTTOM\">right bottom</option>\n <option value=\"BOTTOM_CENTER\">bottom center</option>\n <option value=\"BOTTOM_LEFT\">bottom left</option>\n <option value=\"BOTTOM_RIGHT\">bottom right</option>\n </select>\n </div>\n </div>\n\n\n <div class=\"form-elem\">\n <label>Google Overlay :</label> <div class=\"input google_overlay_html\" data-name=\"google_overlay_html\" data-type=\"textarea\"><textarea name=\"google_overlay_html\" class=\"value\"></textarea></div>\n </div>\n <div class=\"form-elem\">\n <label>Overlay position :</label> \n <div class=\"input google_overlay_position\" data-name=\"google_overlay_position\" data-type=\"normal\">\n <select class=\"value\" name=\"google_overlay_position\">\n <option value=\"right\">Right</option>\n <option SELECTED value=\"left\">Left</option>\n </select>\n </div>\n </div>\n </div>\n\n <div style=\"display:none;\" id=\"edit_marker_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" class=\"dialog \" title=\"Edit Marker\">\n \n <div class=\"form-elem\">\n <label>Title :</label> <div class=\"input\"><input type=\"text\" name=\"marker_title\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Icon :</label> <div class=\"input\">'.ee()->gmaps->set_icon_options($icon_url, $icon_dir).'</div>\n </div>\n <!--<div class=\"circle\">\n <div class=\"form-elem\">\n <label>Circle :</label> <div class=\"input\"><input type=\"checkbox\" value=\"yes\" name=\"circle\"/></div>\n </div>\n <div class=\"form-elem hidden options\">\n <label>Circle Radius :</label> <div class=\"input\"><input type=\"text\" name=\"circle_radius\"/></div>\n </div>\n </div>-->\n <div class=\"form-elem\">\n <label>Text :</label> <div class=\"input\"><textarea name=\"marker_infowindow\"></textarea></div>\n </div>\n </div>\n\n <div style=\"display:none;\" id=\"edit_polyline_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" class=\"dialog \" title=\"Edit Polyline\">\n <div class=\"form-elem\">\n <label>Stroke Color :</label> <div class=\"input\"><input type=\"text\" name=\"polyline_strokecolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"polyline_opacity\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Weight :</label> <div class=\"input\"><input type=\"text\" name=\"polyline_weight\"/></div>\n </div>\n </div>\n\n <div style=\"display:none;\" id=\"edit_polygon_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" class=\"dialog \" title=\"Edit Polygon\">\n <div class=\"form-elem\">\n <label>Stroke Color :</label> <div class=\"input\"><input type=\"text\" name=\"polygon_strokecolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"polygon_opacity\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Weight :</label> <div class=\"input\"><input type=\"text\" name=\"polygon_weight\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Fill Color :</label> <div class=\"input\"><input type=\"text\" name=\"polygon_fillcolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Fill Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"polygon_fillopacity\"/></div>\n </div>\n </div>\n\n <div style=\"display:none;\" id=\"edit_circle_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" class=\"dialog \" title=\"Edit Circle\">\n <div class=\"form-elem\">\n <label>Stroke Color :</label> <div class=\"input\"><input type=\"text\" name=\"circle_strokecolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"circle_opacity\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Weight :</label> <div class=\"input\"><input type=\"text\" name=\"circle_weight\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Fill Color :</label> <div class=\"input\"><input type=\"text\" name=\"circle_fillcolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Fill Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"circle_fillopacity\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Radius :</label> <div class=\"input\"><input type=\"text\" name=\"circle_radius\"/></div>\n </div>\n </div>\n\n <div style=\"display:none;\" id=\"edit_rectangle_'.ee()->gmaps->get_cache(GMAPS_MAP.'_caller').'\" class=\"dialog \" title=\"Edit Rectangle\">\n <div class=\"form-elem\">\n <label>Stroke Color :</label> <div class=\"input\"><input type=\"text\" name=\"rectangle_strokecolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"rectangle_opacity\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Stroke Weight :</label> <div class=\"input\"><input type=\"text\" name=\"rectangle_weight\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Fill Color :</label> <div class=\"input\"><input type=\"text\" name=\"rectangle_fillcolor\"/></div>\n </div>\n <div class=\"form-elem\">\n <label>Fill Opacity :</label> <div class=\"input\"><input type=\"text\" name=\"rectangle_fillopacity\"/></div>\n </div>\n </div>\n\n '.$parsed_gmaps.'\n '.form_input($field_name_input, $data, 'id=\"'.$field_name.'\" style=\"display: none;\"').'\n </div>\n ';\n\n //init the js\n //ee()->cp->add_to_foot(' <script>$(window).load(function(){init_gmaps('.ee()->session->userdata(GMAPS_MAP.'_caller').');});</script>');\n\n //return data\n return base64_encode(json_encode(array('map' => $return, 'map_nr' => ee()->gmaps->get_cache(GMAPS_MAP.'_caller'))));\n\t}", "title": "" }, { "docid": "1a4ecbcb178b9a3189ec9229b95b3b4b", "score": "0.64770377", "text": "function rsmaps_add_options_page() {\n add_options_page('Responsive Styled Google Maps Helper', 'Responsive Styled Google Maps Helper', 'manage_options', __FILE__, 'rsmaps_render_form');\n}", "title": "" }, { "docid": "b50fcc94f845861e474d39b706139c7b", "score": "0.64708537", "text": "function GeoWidget_options() {\r\n $options = get_option('GeoWidget');\r\n\t\r\n //set initial values if none exist\r\n if ( !is_array($options) ) {\r\n $options = array( 'title'=>'GeoWidget', 'lat'=>'0', 'long'=>'0', 'width'=>'0', 'height'=>'0', 'mode'=>'h', 'zoom'=>'5');\r\n }\r\n\r\n if ( $_POST['GeoWidget-submit'] ) {\r\n $options['lat'] = strip_tags(stripslashes($_POST['GeoWidget-lat']));\r\n $options['long'] = strip_tags(stripslashes($_POST['GeoWidget-long']));\r\n $options['width'] = strip_tags(stripslashes($_POST['GeoWidget-width']));\r\n $options['height'] = strip_tags(stripslashes($_POST['GeoWidget-height']));\r\n $options['mode'] = strip_tags(stripslashes($_POST['GeoWidget-mode']));\r\n $options['zoom'] = strip_tags(stripslashes($_POST['GeoWidget-zoom']));\r\n update_option('GeoWidget', $options);\r\n }\r\n\r\n $lat = htmlspecialchars($options['lat'], ENT_QUOTES);\r\n $long = htmlspecialchars($options['long'], ENT_QUOTES);\r\n $width = htmlspecialchars($options['width'], ENT_QUOTES);\r\n $height = htmlspecialchars($options['height'], ENT_QUOTES);\r\n $mode = htmlspecialchars($options['mode'], ENT_QUOTES);\r\n $zoom = htmlspecialchars($options['zoom'], ENT_QUOTES);\r\n\t\r\n?>\r\n\r\n<script type=\"text/javascript\" src=\"/wp-includes/js/prototype.js\"></script>\r\n<script src=\"http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6\"></script>\r\n<script type=\"text/javascript\" src=\"/wp-content/plugins/GeoWidget/MapSelect.js\"></script>\r\n<style type=\"text/css\">\r\n\n#lightbox{\n\tdisplay:none;\n\tposition: absolute;\n\ttop:50%;\n\tleft:50%;\n\tz-index:9999;\n\twidth:500px;\n\theight:400px;\n\tmargin:-220px 0 0 -250px;\n\tborder:1px solid #fff;\n\tbackground:#FDFCE9;\n\ttext-align:left;\n}\n#lightbox[id]{\n\tposition:fixed;\n}\n\n#overlay{\n\tdisplay:none;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\twidth:100%;\n\theight:100%;\n\tz-index:5000;\n\tbackground-color:#000;\n\t-moz-opacity: 0.8;\n\topacity:.80;\n\tfilter: alpha(opacity=80);\n}\n#overlay[id]{\n\tposition:fixed;\n}\n\n#lightbox.done #lbLoadMessage{\n\tdisplay:none;\n}\n#lightbox.done #lbContent{\n\tdisplay:block;\n}\n#lightbox.loading #lbContent{\n\tdisplay:none;\n}\n#lightbox.loading #lbLoadMessage{\n\tdisplay:block;\n}\n\r\n</style>\r\n\r\n<div class=\"wrap\"> \r\n <h2><?php _e('GeoWidget Options') ?></h2> \r\n <form name=\"form1\" method=\"post\" action=\"<?php echo $_SERVER['PHP_SELF']; ?>?page=GeoWidget.php\">\r\n\r\n \r\n <table width=\"100%\" cellspacing=\"2\" cellpadding=\"5\" class=\"editform\"> \r\n <tr valign=\"top\"> \r\n <th scope=\"row\"><?php _e('Latitude:') ?></th> \r\n <td><input name=\"GeoWidget-lat\" type=\"text\" id=\"GeoWidget-lat\" value=\"<?php echo $lat; ?>\" size=\"80\" />\r\n <a href=\"/wp-content/plugins/GeoWidget/MapSelect.php\" class=\"lbOn\">Select Location</a>\r\n\t\t<br />\r\n <?php _e('Enter the latitude to use. Locate it') ?></td> \r\n </tr> \r\n <tr valign=\"top\"> \r\n <th scope=\"row\"><?php _e('Longitude:') ?></th> \r\n <td><input name=\"GeoWidget-long\" type=\"text\" id=\"GeoWidget-long\" value=\"<?php echo $long; ?>\" size=\"80\" />\r\n <br />\r\n <?php _e('Enter the longitude to use') ?></td> \r\n </tr> \r\n <tr valign=\"top\"> \r\n <th scope=\"row\"><?php _e('Width:') ?></th> \r\n <td><input name=\"GeoWidget-width\" type=\"text\" id=\"GeoWidget-width\" value=\"<?php echo $width; ?>\" size=\"80\" />\r\n <br />\r\n <?php _e('Enter the width to use. Use 0 for widget to expand to 100%') ?></td> \r\n </tr> \r\n <tr valign=\"top\"> \r\n <th scope=\"row\"><?php _e('Height:') ?></th> \r\n <td><input name=\"GeoWidget-height\" type=\"text\" id=\"GeoWidget-height\" value=\"<?php echo $height; ?>\" size=\"80\" />\r\n <br />\r\n <?php _e('Enter the width to use. Use 0 for widget to expand to 100%') ?></td> \r\n </tr> \r\n <tr valign=\"top\"> \r\n <th scope=\"row\"><?php _e('Mode:') ?></th> \r\n <td><input name=\"GeoWidget-mode\" type=\"text\" id=\"GeoWidget-mode\" value=\"<?php echo $mode; ?>\" size=\"80\" />\r\n <br />\r\n <?php _e('Select the mode to use. Select r (road), a (ariel) or h (hybrid)') ?></td> \r\n </tr> \r\n <tr valign=\"top\"> \r\n <th scope=\"row\"><?php _e('Zoom:') ?></th> \r\n <td><input name=\"GeoWidget-zoom\" type=\"text\" id=\"GeoWidget-zoom\" value=\"<?php echo $zoom; ?>\" size=\"80\" />\r\n <br />\r\n <?php _e('Specify the zoom factor to use') ?></td> \r\n </tr> \r\n </table>\r\n\r\n\t<input type=\"hidden\" id=\"-submit\" name=\"GeoWidget-submit\" value=\"1\" />\r\n\r\n <p class=\"submit\">\r\n <input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options') ?> &raquo;\" />\r\n </p>\r\n </form> \r\n</div>\r\n\r\n<?php\r\n}", "title": "" }, { "docid": "7985bd8d3ca5df8acceef8b9290322e0", "score": "0.64119834", "text": "function omr_settings_page() \n{\n?>\n\t<div class=\"wrap\">\t\t\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<h2><?php _e('Theme options'); ?></h2>\n\t\t\t<?php settings_fields('progress_group'); ?>\t\t\t\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Coming Soon page (ON/OFF):'); ?></th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select name=\"p_coming_soon\" id=\"p_coming_soon\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$selected_on = \"\";\n\t\t\t\t\t\t\t$selected_off = \"\";\n\t\t\t\t\t\t\tif(get_option('p_coming_soon') == \"on\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$selected_on = 'selected=\"selected\"';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$selected_off = 'selected=\"selected\"';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<option value=\"on\" <?php echo $selected_on; ?>>ON</option>\n\t\t\t\t\t\t\t<option value=\"off\" <?php echo $selected_off; ?>>OFF</option>\n\t\t\t\t\t\t</select>\t\t\t\t\t\t\n\t\t\t\t\t</td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Slideshow interval (floor plans):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_slideshow_interval\" value=\"<?php echo get_option('p_slideshow_interval')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t</table>\t\n\t\t\t\n\t\t\t<h2><?php _e('Google maps options'); ?></h2>\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Latitude (910):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_lat\" value=\"<?php echo get_option('p_lat')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Longitude (910):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_lng\" value=\"<?php echo get_option('p_lng')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Latitude (uncw):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_lat2\" value=\"<?php echo get_option('p_lat2')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Longitude (uncw):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_lng2\" value=\"<?php echo get_option('p_lng2')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Latitude (lease office):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_lat_lease_office\" value=\"<?php echo get_option('p_lat_lease_office')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Longitude (lease office):'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_lng_lease_office\" value=\"<?php echo get_option('p_lng_lease_office')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<h2><?php _e('Social'); ?></h2>\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('facebook:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_facebook\" value=\"<?php echo get_option('p_facebook')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('twitter:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_twitter\" value=\"<?php echo get_option('p_twitter')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('pinterest:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_pinterest\" value=\"<?php echo get_option('p_pinterest')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('google plus:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_google_plus\" value=\"<?php echo get_option('p_google_plus')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('instagram:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_instagram\" value=\"<?php echo get_option('p_instagram')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('vimeo:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_vimeo\" value=\"<?php echo get_option('p_vimeo')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('wordpress:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_wordpress\" value=\"<?php echo get_option('p_wordpress')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('In:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_in\" value=\"<?php echo get_option('p_in')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('youtube:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_youtube\" value=\"<?php echo get_option('p_youtube')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<h2><?php _e('Get in touch information'); ?></h2>\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Phone:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_phone\" value=\"<?php echo get_option('p_phone')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Fax:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_fax\" value=\"<?php echo get_option('p_fax')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Email:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_email\" value=\"<?php echo get_option('p_email')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Email leasing:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_email_leasing\" value=\"<?php echo get_option('p_email_leasing')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Progress 910 address:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_progress_910_address\" value=\"<?php echo get_option('p_progress_910_address')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\"><?php _e('Leasing office address:'); ?></th>\n\t\t\t\t\t<td><input type=\"text\" name=\"p_leasing_office_address\" value=\"<?php echo get_option('p_leasing_office_address')?>\"></td>\t\n\t\t\t\t</tr>\n\t\t\t</table>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\t\n<? \n}", "title": "" }, { "docid": "14eb7be44d5375c364ee3d3f28d50585", "score": "0.6406657", "text": "function gmw_fl_map_elements( $mapElements, $gmw ) {\n\t\t\n\t$settings = get_option( 'gmw_options' );\n\n\tif ( !isset( $gmw['results_map']['your_location_icon'] ) )\n\t\t$gmw['results_map']['your_location_icon'] = '_default.png';\n\t\n\t//set the user location marker\n\t$mapElements['userPosition']['mapIcon'] = $settings['ml_map_icons']['url']. $gmw['results_map']['your_location_icon'];\n\t\n\t//disable the map control. We will enable each one based on the form settings\n\t$mapElements['mapOptions'] = array_merge( $mapElements['mapOptions'], array(\n\t\t\t'zoomControl' \t \t => false,\n\t\t\t'mapTypeControl' \t => false,\n\t\t\t'streetViewControl' => false,\n\t\t\t'scrollwheel'\t\t => false,\n\t\t\t'panControl'\t\t => false,\n\t\t\t'scaleControl'\t\t => false,\n\t\t\t'overviewMapControl' => false\n\t) );\n\n\t//resize map element\n\t$mapElements['resizeMapElement'] = false;\n\n\t//enabled map controls\n\tif ( !empty( $gmw['results_map']['map_controls'] ) ) {\n\n\t\tforeach ( $gmw['results_map']['map_controls'] as $value ) {\n\n\t\t\tif ( $value == 'resizeMapControl' ) {\n\t\t\t\t$mapElements['resizeMapElement'] = 'gmw-resize-map-trigger-'.$gmw['ID'];\n\t\t\t} else {\n\t\t\t\t$mapElements['mapOptions'][$value] = true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $mapElements;\t\t\n}", "title": "" }, { "docid": "9a1d2736b0b866a8aba7cb9d01fbf788", "score": "0.6316453", "text": "function options_form() {\n return array(\n 'base_url' => array(\n '#type' => 'textfield',\n '#title' => t('Base URL (template)'),\n '#default_value' => isset($this->data['base_url']) ?\n $this->data['base_url'] : ''\n ),\n\n 'params' => array(\n 'isBaseLayer' => array(\n '#type' => 'checkbox',\n '#default_value' => isset($this->data['params']['isBaseLayer']) ? \n $this->data['params']['isBaseLayer'] : TRUE,\n '#return_value' => TRUE,\n '#title' => t('BaseLayer'),\n '#description' => t('Uncheck to make this map an overlay')\n ),\n ),\n 'layer_type' => array(\n '#type' => 'hidden',\n '#value' => 'openlayers_layer_type_openlayersxyzplus'\n ),\n 'resolutions' => array(\n '#type' => 'select',\n '#multiple' => TRUE,\n '#options' => array_combine(\n array_map('strval', openlayers_get_resolutions('900913')),\n range(0, 18)),\n '#title' => t('Zoom Level Range'),\n '#default_value' => isset($this->data['resolutions']) ?\n $this->data['resolutions'] :\n array_map('strval', openlayers_get_resolutions('900913'))\n ),\n 'projection' =>\n array(\n '0' => array(\n '#type' => 'hidden',\n '#value' => '900913',\n ),\n )\n );\n }", "title": "" }, { "docid": "ea605df368e3c93831c7021e1cb534a2", "score": "0.63069564", "text": "public function displaysSettingsForm();", "title": "" }, { "docid": "ac1b2804739e3da23a058b4676cf257a", "score": "0.6292259", "text": "function kd_map_init() {\r\n\r\n if (function_exists('vc_map')) {\r\n vc_map(array(\r\n \"name\" => esc_html__(\"Google map\", \"keydesign\"),\r\n \"description\" => esc_html__(\"Custom Google Map\", \"keydesign\"),\r\n \"base\" => \"tek_map\",\r\n \"class\" => \"\",\r\n \"icon\" => plugins_url('assets/element_icons/google-map.png', dirname(__FILE__)),\r\n \"category\" => esc_html__(\"KeyDesign Elements\", \"keydesign\"),\r\n \"params\" => array(\r\n array(\r\n \"type\" => \"kd_param_notice\",\r\n \"text\" => \"<span style='display: block;'>Google maps requires a valid API key in order to work. You can add it in Dashboard > Ekko > Theme Options > Global Options. You can generate a new API key from <a href='https://developers.google.com/maps/faq#new-key' target='_blank' title='Google Maps API'>here</a>.</span>\",\r\n \"param_name\" => \"notification\",\r\n \"edit_field_class\" => \"vc_column vc_col-sm-12\",\r\n ),\r\n array(\r\n \t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"textfield\",\r\n \t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\r\n \t\t\t\t\t\t\t\t\"heading\"\t\t=>\tesc_html__(\"Map name\", \"keydesign\"),\r\n \t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"map_name\",\r\n \t\t\t\t\t\t\t\t\"value\"\t\t\t=>\t\"\",\r\n \t\t\t\t\t\t\t\t\"description\"\t=>\tesc_html__(\"Insert a unique map name.\", \"keydesign\"),\r\n \t\t\t\t\t\t\t\t\"save_always\"\t=>\ttrue,\r\n \t\t\t\t\t\t\t),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Location latitude\", \"keydesign\"),\r\n \"param_name\" => \"map_latitude\",\r\n \"value\" => \"\",\r\n \"description\" => esc_html__(\"Enter location latitude.\", \"keydesign\")\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Location longitude\", \"keydesign\"),\r\n \"param_name\" => \"map_longitude\",\r\n \"value\" => \"\",\r\n \"description\" => esc_html__(\"Enter location longitude.\", \"keydesign\")\r\n ),\r\n\r\n array(\r\n \"type\" => \"dropdown\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Map zoom\", \"keydesign\"),\r\n \"param_name\" => \"map_zoom\",\r\n \"value\" => array(\r\n \"10 - City\" => \"10\",\r\n \"11\" => \"11\",\r\n \"12\" => \"12\",\r\n \"13\" => \"13\",\r\n \"14\" => \"14\",\r\n \"15 - Streets\" => \"15\",\r\n \"16\" => \"16\",\r\n \"17\" => \"17\",\r\n \"18\" => \"18\",\r\n \"19\" => \"19\",\r\n \"20 - Buildings\" => \"20\",\r\n ),\r\n \"description\" => esc_html__(\"Enter map zoom (default 14).\", \"keydesign\")\r\n ),\r\n array(\r\n \t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\r\n \t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\r\n \t\t\t\t\t\t\t\t\"heading\"\t\t=>\tesc_html__(\"Map style\", \"keydesign\"),\r\n \t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"map_style\",\r\n \t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\r\n esc_html__( 'Grayscale', 'keydesign' ) \t\t\t=> 'gmap_style_grayscale',\r\n \t\t\t\t\t\t\t\t\t\tesc_html__( 'Google preset colors', 'keydesign' )\t=> 'gmap_style_normal',\r\n \t\t\t\t\t\t\t\t\t),\r\n \t\t\t\t\t\t\t\t\"description\"\t=>\tesc_html__(\"Choose map style.\", \"keydesign\"),\r\n \t\t\t\t\t\t\t\t\"save_always\"\t=>\ttrue,\r\n \t\t\t\t\t\t\t),\r\n\r\n array(\r\n \"type\" => \"dropdown\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Marker icon source\", \"keydesign\"),\r\n \"param_name\" => \"image_source\",\r\n \"value\" => array(\r\n \"Media library\" => \"media_library\",\r\n \"External link\" => \"external_link\",\r\n ),\r\n \"description\" => esc_html__(\"Select image source.\", \"keydesign\"),\r\n \"save_always\" => true,\r\n ),\r\n\r\n array(\r\n \"type\" => \"attach_image\",\r\n \"heading\" => esc_html__(\"Map marker image\", \"keydesign\"),\r\n \"param_name\" => \"map_icon\",\r\n \"description\" => esc_html__(\"Upload map marker icon. Recommended image size: 50x50 (Width x Height).\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"image_source\",\r\n \"value\" => array(\"media_library\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Marker image external source\", \"keydesign\"),\r\n \"param_name\" => \"ext_image\",\r\n \"value\" => \"\",\r\n \"description\" => esc_html__(\"Enter image external link. Recommended image size: 50x50 (Width x Height).\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"image_source\",\r\n \"value\" => array(\"external_link\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Map height\", \"keydesign\"),\r\n \"param_name\" => \"map_height\",\r\n \"value\" => \"\",\r\n \"description\" => esc_html__(\"Enter map height in pixels. Default is 400px.\", \"keydesign\")\r\n ),\r\n\r\n array(\r\n \t\t\t\t\t\t\t\t\"type\"\t\t\t=>\t\"dropdown\",\r\n \t\t\t\t\t\t\t\t\"class\"\t\t\t=>\t\"\",\r\n \t\t\t\t\t\t\t\t\"heading\"\t\t=>\tesc_html__(\"Map info panel settings\", \"keydesign\"),\r\n \t\t\t\t\t\t\t\t\"param_name\"\t=>\t\"map_business_panel_settings\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \t\t\t\t\t\t\t\t\"value\"\t\t\t=>\tarray(\r\n esc_html__( \"Hide business info panel\", \"keydesign\" ) => \"hidden_info_panel\",\r\n \t\t\t\t\t\t\t\t\t\tesc_html__( \"Left aligned\", \"keydesign\" )\t=> \"left_info_panel\",\r\n esc_html__( \"Right aligned\", \"keydesign\" ) => \"right_info_panel\",\r\n \t\t\t\t\t\t\t\t\t),\r\n \t\t\t\t\t\t\t\t\"save_always\"\t=>\ttrue,\r\n \t\t\t\t\t\t\t),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Panel title\", \"keydesign\"),\r\n \"param_name\" => \"map_business_name\",\r\n \"value\" => \"\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \"description\" => esc_html__(\"Enter panel title.\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"map_business_panel_settings\",\r\n \"value\" => array(\"left_info_panel\", \"right_info_panel\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Address\", \"keydesign\"),\r\n \"param_name\" => \"map_business_address\",\r\n \"value\" => \"\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \"description\" => esc_html__(\"Enter business address.\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"map_business_panel_settings\",\r\n \"value\" => array(\"left_info_panel\", \"right_info_panel\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Email\", \"keydesign\"),\r\n \"param_name\" => \"map_business_email\",\r\n \"value\" => \"\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \"description\" => esc_html__(\"Enter business email.\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"map_business_panel_settings\",\r\n \"value\" => array(\"left_info_panel\", \"right_info_panel\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Phone\", \"keydesign\"),\r\n \"param_name\" => \"map_business_phone\",\r\n \"value\" => \"\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \"description\" => esc_html__(\"Enter business phone.\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"map_business_panel_settings\",\r\n \"value\" => array(\"left_info_panel\", \"right_info_panel\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"textfield\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Opening hours title\", \"keydesign\"),\r\n \"param_name\" => \"map_business_opening_hours\",\r\n \"value\" => \"\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \"description\" => esc_html__(\"Enter opening hours title text.\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"map_business_panel_settings\",\r\n \"value\" => array(\"left_info_panel\", \"right_info_panel\")\r\n ),\r\n ),\r\n\r\n array(\r\n \"type\" => \"param_group\",\r\n \"class\" => \"\",\r\n \"heading\" => esc_html__(\"Opening hours schedule\", \"keydesign\"),\r\n \"value\" => urlencode( json_encode ( array(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"map_schedule_day\" => \"\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"map_schedule_day_info\" => \"\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n )\t)\t),\r\n \"param_name\" => \"map_business_schedule\",\r\n \"group\" => esc_html__(\"Business info\", \"keydesign\"),\r\n \"dependency\" =>\tarray(\r\n \"element\" => \"map_business_panel_settings\",\r\n \"value\" => array(\"left_info_panel\", \"right_info_panel\")\r\n ),\r\n \"params\" => array(\r\n \t\t\t\t\t\t\t\t\t\t\t\tarray(\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"textfield\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"heading\" => __(\"Day name\",\"keydesign\"),\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"param_name\" => \"map_schedule_day_name\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => \"\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"admin_label\" => true,\r\n \t\t\t\t\t\t\t\t\t\t\t\t),\r\n \t\t\t\t\t\t\t\t\t\t\t\tarray(\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"type\" => \"textarea\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"heading\" => __(\"Day opening/closing hours\",\"keydesign\"),\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"param_name\" => \"map_schedule_day_hours\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"value\" => \"\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => \"\",\r\n \t\t\t\t\t\t\t\t\t\t\t\t),\r\n \t\t\t\t\t\t\t\t),\r\n\r\n ),\r\n\r\n )\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "228b692b676b1d82be65a0067ae41bb3", "score": "0.6282443", "text": "public function enableMapForm()\n\t{\n\t\tif( $this->canEdit() )\n\t\t{\n\t\t\t$form\t= new \\IPS\\Helpers\\Form;\n\t\t\t$form->class = 'ipsForm_vertical';\n\t\t\t$form->add( new \\IPS\\Helpers\\Form\\YesNo( 'map_enabled', $this->gps_show, FALSE ) );\n\n\t\t\tif( $values = $form->values() )\n\t\t\t{\n\t\t\t\t$this->gps_show\t= $values['map_enabled'];\n\t\t\t\t$this->save();\n\t\t\t\t\\IPS\\Output::i()->redirect( $this->url() );\n\t\t\t}\n\n\t\t\treturn $form;\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a1c0d7e24c43a477103e4d9c681f4df0", "score": "0.6269861", "text": "private function getMapParameters()\n {\n\n return [\n // assign uid of current content element\n 'contentId' => ((\n null != $this->ceData['uid']\n ? $this->ceData['uid']\n : rand(1, 999999)\n ) . '_' . $this->configurationManager->getContentObject()->parentRecord['data']['uid']),\n // map provider to build map: googleMaps or OpenStreetMap\n 'mapProvider' => $this->settings['mapProvider'],\n // assign width and height of map\n 'width' => null != $this->ceData['width']\n ? $this->ceData['width']\n : (\n 0 < (int)$this->settings['cbgmMapWidth']\n ? $this->settings['cbgmMapWidth']\n : $this->settings['display']['width']\n ),\n 'height' => null != $this->ceData['height']\n ? $this->ceData['height']\n : (\n 0 < (int)$this->settings['cbgmMapHeight']\n ? $this->settings['cbgmMapHeight']\n : $this->settings['display']['height']\n ),\n // assign pin description text, to placed into info box\n 'infoText' => urlencode(\n null != $this->ceData['infoText']\n ? $this->ceData['infoText']\n : (\n isset($this->settings['cbgmDescription'])\n ? $this->settings['cbgmDescription']\n : $this->settings['infoText']\n )\n ),\n // assign auto open flag to the view\n 'openInfoBox' => isset($this->settings['cbgmAutoOpen'])\n ? $this->settings['cbgmAutoOpen']\n : $this->settings['infoTextOpen'],\n // assign deactivation of zooming by mousewheel\n 'useScrollwheel' => $this->settings['options']['useScrollwheel'],\n // assign location (longitude and latitude) to the view\n 'latitude' => null != $this->ceData['latitude']\n ? (float)$this->ceData['latitude']\n : (\n isset($this->settings['cbgmLatitude'])\n ? (float)$this->settings['cbgmLatitude']\n : (float)$this->settings['latitude']\n ),\n 'longitude' => null != $this->ceData['longitude']\n ? (float)$this->ceData['longitude']\n : (\n isset($this->settings['cbgmLongitude'])\n ? (float)$this->settings['cbgmLongitude']\n : (float)$this->settings['longitude']\n ),\n // assign map zoom level to the view ,if given value is valid\n 'mapZoom' => null != $this->ceData['zoom']\n ? (int)$this->ceData['zoom']\n : (\n 0 <= (int)$this->settings['cbgmScaleLevel'] && !empty($this->settings['cbgmScaleLevel'])\n ? (int)$this->settings['cbgmScaleLevel']\n : (int)$this->settings['display']['zoom']\n ),\n // assign map type to the view, if given value is valid\n 'mapType' => null != $this->ceData['mapType'] && in_array((string)$this->ceData['mapType'],\n preg_split(\"/[\\s]*[,][\\s]*/\", $this->settings['valid']['mapTypes']))\n ? $this->ceData['mapType']\n : (\n in_array((string)$this->settings['cbgmMapType'],\n preg_split(\"/[\\s]*[,][\\s]*/\", $this->settings['valid']['mapTypes']))\n ? $this->settings['cbgmMapType']\n : $this->settings['display']['mapType']\n ),\n // assign navigation controls to the view\n 'mapControl' => null != $this->ceData['navigationControl']\n && in_array((string)$this->ceData['navigationControl'],\n preg_split(\"/[\\s]*[,][\\s]*/\", $this->settings['valid']['navigationControl']))\n ? $this->ceData['navigationControl']\n : (\n in_array((string)$this->settings['cbgmNavigationControl'],\n preg_split(\"/[\\s]*[,][\\s]*/\", $this->settings['valid']['navigationControl']))\n ? $this->settings['cbgmNavigationControl']\n : $this->settings['display']['navigationControl']\n ),\n // assign icon if given by constant or typoscript\n 'icon' => null != $this->ceData['icon'] && file_exists(Environment::getPublicPath() . '/' . $this->ceData['icon'])\n ? \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . '/' . $this->ceData['icon']\n : (\n !empty($this->settings['display']['icon']) && file_exists(Environment::getPublicPath() . '/' . $this->settings['display']['icon'])\n ? \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST') . '/' . $this->settings['display']['icon']\n : null\n ),\n // add map styling default\n 'mapStyling' => null,\n // some braces?\n 'braceStart' => '{',\n 'braceEnd' => '}'\n ];\n }", "title": "" }, { "docid": "8bbf8d48b69abbd2d2ba9c05dc079287", "score": "0.62676835", "text": "public function settings_form(&$form, &$form_state);", "title": "" }, { "docid": "ef2db5d0a75fd7bf724ffef4e524c689", "score": "0.6143064", "text": "public function simple_map_options_page()\n\t{\n\n\t\t?>\n\t\t<form action='options.php' method='post'>\n\n\t\t<?php\n\t\t\tsettings_fields( 'simplemappage' );\n\t\t\tdo_settings_sections( 'simplemappage' );\n\n\t\t\tsubmit_button();\n\n\t\t\t/*\n\t\t\t * API key obtaining method.\n\t\t\t */\n\t\t\t$maps_api_for_web_link = sprintf(\n\t\t\t\t'%1$s<a href=\"https://developers.google.com/maps/web/\">%2$s</a>',\n\t\t\t\tesc_html__( 'Go to ', 'simple-map' ),\n\t\t\t\tesc_html__( 'Google Maps APIs for Web page.' )\n\t\t\t);\n\n\t\t\t$get_key_text = esc_html__( 'Click \"GET A KEY\" button', 'simple-map' );\n\t\t\t$continue_text = esc_html__( 'Click \"CONTINUE\" button', 'simple-map' );\n\t\t\t$set_domain_text = esc_html__( 'Add your domain.', 'simple-map' );\n\t\t\t$copy_api_key = esc_html__( 'API key will pop up. Copy and paste the key.', 'simple-map' );\n\n\t\t\t$html = '';\n\t\t\t$html .= '<h2>' . esc_html__( 'How to get API key?', 'simplemap' ) . '</h2>';\n\t\t\t$html .= '<ol>';\n\t\t\t$html .= '<li>' . $maps_api_for_web_link . '</li>';\n\t\t\t$html .= '<li>' . $get_key_text . '<p><img style=\"width: 80%;\" src=\"' . plugin_dir_url( __FILE__ ) . 'images/001_click_get_a_key_button.png\"></p></li>';\n\t\t\t$html .= '<li>' . $continue_text . '<p><img style=\"width: 80%;\" src=\"' . plugin_dir_url( __FILE__ ) . 'images/002_click_continue_button.png\"></p></li>';\n\t\t\t$html .= '<li>' . $continue_text . '<p><img style=\"width: 80%;\" src=\"' . plugin_dir_url( __FILE__ ) . 'images/004_make_project_click_continue_button.png\"></p></li>';\n\t\t\t$html .= '<li>' . $set_domain_text . '<p><img style=\"width: 80%;\" src=\"' . plugin_dir_url( __FILE__ ) . 'images/005_add_your_domain_and_click_creating.png\"></p></li>';\n\t\t\t$html .= '<li>' . $copy_api_key . '<p><img style=\"width: 80%;\" src=\"' . plugin_dir_url( __FILE__ ) . 'images/006_copy_your_api_key.png\"></p></li>';\n\t\t\t$html .= '</ol>';\n\n\n\t\t\techo $html;\n\n\t\t?>\n\n\t\t</form>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "ab49c1839d6fda7cc6aa8c189f6b5954", "score": "0.6142158", "text": "public function index()\n {\n\n //Custom map controls //\n \n $leftTopControls = ['document.getElementById(\"leftTopControl\")']; // values must be html or javascript element\n $this->gmap->injectControlsInLeftTop = $leftTopControls; // inject into map\n $leftCenterControls = ['document.getElementById(\"leftCenterControl\")'];\n $this->gmap->injectControlsInLeftCenter = $leftCenterControls;\n $leftBottomControls = ['document.getElementById(\"leftBottomControl\")'];\n $this->gmap->injectControlsInLeftBottom = $leftBottomControls;\n\n $bottomLeftControls = ['document.getElementById(\"bottomLeftControl\")'];\n $this->gmap->injectControlsInBottomLeft = $bottomLeftControls;\n $bottomCenterControls = ['document.getElementById(\"bottomCenterControl\")'];\n $this->gmap->injectControlsInBottomCenter = $bottomCenterControls;\n $bottomRightControls = ['document.getElementById(\"bottomRightControl\")'];\n $this->gmap->injectControlsInBottomRight = $bottomRightControls;\n\n $rightTopControls = ['document.getElementById(\"rightTopControl\")'];\n $this->gmap->injectControlsInRightTop = $rightTopControls;\n $rightCenterControls = ['document.getElementById(\"rightCenterControl\")'];\n $this->gmap->injectControlsInRightCenter = $rightCenterControls;\n $rightBottomControls = ['document.getElementById(\"rightBottomControl\")'];\n $this->gmap->injectControlsInRightBottom = $rightBottomControls;\n\n $topLeftControls = ['document.getElementById(\"topLeftControl\")'];\n $this->gmap->injectControlsInTopLeft = $topLeftControls;\n $topCenterControls = ['document.getElementById(\"topCenterControl\")'];\n $this->gmap->injectControlsInTopCenter = $topCenterControls;\n $topRightControls = ['document.getElementById(\"topRightControl\")'];\n $this->gmap->injectControlsInTopRight = $topRightControls;\n\n $locate = 'Thika,Kenya';\n //a collection of addresses from maps DB\n $locateCollections = Map::pluck('product_address');\n $config = array();\n $config['map_height'] = \"100%\";\n $config['center'] = $locateCollections;\n $config['geocodeCaching'] = true;\n $config['zoom'] = \"auto\";\n $config['scrollwheel'] = false;\n $config['onboundschanged'] = 'if (!centreGot) {\n var mapCentre = map.getCenter();\n marker_0.setOptions({\n position: new google.maps.LatLng(mapCentre.lat(), mapCentre.lng())\n });\n }\n centreGot = true;';\n\n $this->gmap->initialize($config); // Initialize Map with custom configuration\n\n // marker set up ready for positioning\n $marker = array();\n $marker['draggable'] = true;\n $marker['ondragend'] = '\n iw_' . $this->gmap->map_name . '.close();\n reverseGeocode(event.latLng, function(status, result, mark){\n if(status == 200){\n iw_' . $this->gmap->map_name . '.setContent(result);\n iw_' . $this->gmap->map_name . '.open(' . $this->gmap->map_name . ', mark);\n }\n }, this);\n ';\n $marker['position'] = $locate;\n $marker['infowindow_content'] = $locate;\n $this->gmap->add_marker($marker);\n\n $map = $this->gmap->create_map(); // This object will render javascript files and map view; you can call JS by $map['js'] and map view by $map['html']\n\n return view('pages.directions')->with('map', $map);\n\n \n }", "title": "" }, { "docid": "db0a2f5f27d0d96afd74aa88ef4c5ca9", "score": "0.6105934", "text": "function SGMprintmap($lat, $lng, $zoom, $type, $content, $directionsto) {\n\t\n\t$SGMoptions = get_option('SGMoptions'); // get options defined in admin page\n\t\n\tif (!$lat) {$lat = '0';}\n\tif (!$lng) {$lng = '0';}\n\tif (!$zoom) {$zoom = $SGMoptions['zoom'];} // 1-19\n\tif (!$type) {$type = $SGMoptions['type'];} // ROADMAP, SATELLITE, HYBRID, TERRAIN\n\tif (!$content) {$content = $SGMoptions['content'];}\n\t\n\t$content = str_replace('&lt;', '<', $content);\n\t$content = str_replace('&gt;', '>', $content);\n\t$content = mysql_escape_string($content);\n\tif ($directionsto) { $directionsForm = \"<form method=\\\"get\\\" action=\\\"http://maps.google.com/maps\\\"><input type=\\\"hidden\\\" name=\\\"daddr\\\" value=\\\"\".$directionsto.\"\\\" /><input type=\\\"text\\\" class=\\\"text\\\" name=\\\"saddr\\\" /><input type=\\\"submit\\\" class=\\\"submit\\\" value=\\\"Directions\\\" /></form>\"; }\n\n\treturn \"\n\t<script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>\n\t<script type='text/javascript'>\n\t\tfunction makeMap() {\n\t\t\tvar latlng = new google.maps.LatLng(\".$lat.\", \".$lng.\")\n\t\t\t\n\t\t\tvar myOptions = {\n\t\t\t\tzoom: \".$zoom.\",\n\t\t\t\tcenter: latlng,\n\t\t\t\tmapTypeControl: true,\n\t\t\t\tmapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},\n\t\t\t\tnavigationControl: true,\n\t\t\t\tnavigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},\n\t\t\t\tmapTypeId: google.maps.MapTypeId.\".$type.\"\n\t\t\t};\n\t\t\tvar map = new google.maps.Map(document.getElementById('SGM'), myOptions);\n\t\t\t\n\t\t\tvar contentString = '<div class=\\\"infoWindow\\\">\".$content.$directionsForm.\"</div>';\n\t\t\tvar infowindow = new google.maps.InfoWindow({\n\t\t\t\tcontent: contentString\n\t\t\t});\n\t\t\t\n\t\t\tvar marker = new google.maps.Marker({\n\t\t\t\tposition: latlng,\n\t\t\t\tmap: map,\n\t\t\t\ttitle: ''\n\t\t\t});\n\t\t\t\n\t\t\tgoogle.maps.event.addListener(marker, 'click', function() {\n\t\t\t infowindow.open(map,marker);\n\t\t\t});\n\t\t}\n\t\twindow.onload = makeMap;\n\t</script>\n\t\n\t<div id='SGM'></div>\n\t\";\n\t\n}", "title": "" }, { "docid": "3009eb450cb325fa63ae40218e43f3b3", "score": "0.60872", "text": "function osteo_site_setup_page() { ?>\n\n<div class=\"wrap site-setup osteo-meta-styles\">\n\n <form method=\"post\" action=\"options.php\">\n\n <?php if(isset( $_GET['settings-updated'])) { ?>\n <div class=\"updated\">\n <p>Settings updated successfully</p>\n </div>\n <?php } ?>\n\n\n <h2>Site Setup</h2>\n\n <?php\n // check if gravity forms is installed\n if(is_plugin_active('gravityforms/gravityforms.php')) : ?>\n <div class=\"well\">\n <h3>Forms</h3>\n <?php metaOption('contact_form', array('title'=>'Contact Form', 'description'=>'Gravity Forms Form ID'));?>\n <?php metaOption('show_contact_in_footer',\n array(\n 'type'=>'checkbox',\n 'options'=>array(\n array('value'=>true, 'description'=>'Show Contact Form in Footer'),\n ),\n )\n );?>\n </div>\n <?endif;?>\n\n <div class=\"well\">\n <h3>About</h3>\n <?php metaOption('mission_statement', array('title'=>'Mission Statement', 'type'=>'editor', 'style'=>array('textarea_rows'=>5) ) );?>\n </div>\n\n <div class=\"well\">\n <h3>Social Media</h3>\n\n <?php\n metaOption('social_facebook', array('title'=>'Facebook'));\n metaOption('social_twitter', array('title'=>'Twitter'));\n metaOption('social_googleplus', array('title'=>'Google Plus'));\n metaOption('social_linkedin', array('title'=>'LinkedIn'));\n ?>\n </div>\n\n <div class=\"well\">\n <h3>Address &amp; Phone</h3>\n <?php\n metaOption('address_line_1', array('title' => 'Address Line 1'));\n metaOption('address_line_2', array('title' => 'Address Line 2'));\n metaOption('city_st_zip', array('title' => 'City, ST Zip'));\n metaOption('phone_number', array('title' => 'Phone Number'));\n metaOption('contact_email', array('title' => 'Contact Email'));\n // FIND OUT HOW TO GET GOOGLE MAP IN HRRRRR\n ?>\n\n </div>\n\n <div class=\"well\">\n <h3>Look &amp; Feel</h3>\n <?php\n metaOption('blog_archive_style', array(\n 'title' => 'Blog Archive Style',\n 'type'=>'dropdown',\n 'options'=>array(\n array('value'=>'full', 'description'=>'Full Width'),\n array('value'=>'tile', 'description'=>'Tiles'),\n ),\n )\n );\n ?>\n\n </div>\n <?php settings_fields( 'osteo_site_settings' ); ?>\n <?php do_settings_sections( 'osteo_site_settings' ); ?>\n <?php submit_button(); ?>\n </form>\n</div>\n<?php\n}", "title": "" }, { "docid": "87983f43c70e282291611c92c0c430b6", "score": "0.6070949", "text": "function geonode_admin_settings($form, &$form_state) {\n $form = array();\n\n $plugins = array('<none>');\n $tplugins = module_invoke_all('geonode_plugin', 'name');\n foreach ($tplugins as $plugin) {\n $title = module_invoke(\"geonode_{$plugin}\", 'geonode_plugin', 'title');\n $plugins[$plugin] = $title ? $title : ucfirst($plugin);\n }\n $form['plugin'] = array(\n '#type' => 'select',\n '#title' => t('Plugin'),\n '#description' => t('Select map plugin to use.'),\n '#default_value' => variable_get('geonode_plugin', ''),\n '#options' => $plugins,\n );\n\n $nodes = array();\n $tnodes = explode('|', variable_get('geonode_node_types', 'page'));\n foreach ($tnodes as $type) {\n $nodes[$type] = $type;\n }\n \n $form['node_types'] = array(\n '#title_display' => 'before',\n '#type' => 'checkboxes',\n '#title' => t('Content types'),\n '#default_value' => $nodes,\n '#options' => array_map('check_plain', node_type_get_names()),\n '#description' => t('Select content types to use the node geo location.'),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save'),\n );\n\n return $form;\n}", "title": "" }, { "docid": "14f480156d4a4a1f1df493cc26646899", "score": "0.6052537", "text": "function responsive_image_mapping_edit_form() {\n $form = array();\n $id = arg(6);\n $tag = responsive_image_mapping_get_mappings($id);\n $style_names = responsive_image_mapping_get_image_style_names();\n $form['settings']['rim_add_mapping']['rim_preset_key'] = array(\n '#type' => 'select',\n '#title' => t('Preset Key'),\n '#options' => $style_names,\n '#description' => t('Choose the image preset to map. If no preset is chosen here, no mapping will be created.'),\n '#default_value' => variable_get('rim_preset_key', $tag['preset_key']),\n );\n $current_bps = variable_get('rim_breakpoints', 1);\n if (isset($current_bps)) {\n $bp_count = count($current_bps);\n }\n else {\n $bp_count = 1;\n }\n $bp_counter = 0;\n for ($bp_counter; $bp_counter < $bp_count; $bp_counter++) {\n $form['settings']['rim_add_mapping']['rim_mapping_' . $bp_counter] = array(\n '#type' => 'select',\n '#title' => check_plain(t('Mapping') . ' ' . ($bp_counter + 1)),\n '#options' => $style_names,\n '#default_value' => isset($tag['mappings'][$bp_counter]) ? $tag['mappings'][$bp_counter] : 'none',\n );\n }\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save mapping'),\n );\n $form['cancel'] = array(\n '#markup' => '<a href=\"/admin/config/media/image-styles/responsive-mappings\">' . t('Cancel') . '</a>',\n );\n return $form;\n}", "title": "" }, { "docid": "f2286d0f730ca9cf2c960c8ff4359435", "score": "0.60416305", "text": "public function simple_map_settings_section_callback()\n\t{\n\n\t\techo esc_html__( 'Set your Google Maps API key.', 'simple-map' );\n\n\t}", "title": "" }, { "docid": "17d70f07ce1d643721d050ab99aa2d56", "score": "0.60002697", "text": "function itegfp_addon_settings_callback() {\n\t$it_exchange_gravity_forms_addon = new ITEGFP_Settings();\n\t$it_exchange_gravity_forms_addon->print_settings_page();\n}", "title": "" }, { "docid": "db7ef860c43eb51002fef9cee34e9c0d", "score": "0.5994108", "text": "function render_map_coordinate_editor() {\n\n\n\t$form_elements = array(\n\t\t'lg_config__coordinate_longitude' => array(\n\t\t\t'id' => 'coordinate_longitude',\n\t\t\t'label' => '経度',\n\t\t),\n\t\t'lg_config__coordinate_latitude' => array(\n\t\t\t'id' => 'coordinate_latitude',\n\t\t\t'label' => '緯度',\n\t\t),\n\t\t'lg_config__default_zoomlevel' => array(\n\t\t\t'id' => 'default_zoomlevel',\n\t\t\t'label' => '初期ズームレベル',\n\t\t),\n\t);\n\t?>\n\n\t<ul class=\"api_setting_tree\">\n\t\t<?php foreach ( $form_elements as $key => $elem ) : ?>\n\t\t\t<li>\n\t\t\t\t<label for=\"<?php echo $elem['id']; ?>\"><?php echo $elem['label']; ?></label>\n\t\t\t\t<input value=\"<?php echo get_option( $key ); ?>\"\n\t\t\t\t\t id=\"<?php echo $elem['id']; ?>\" name=\"<?php echo $key; ?>\" type=\"text\">\n\t\t\t</li>\n\n\t\t<?php endforeach; ?>\n\n\t</ul>\n\t<?php\n}", "title": "" }, { "docid": "451a99dcae47c4d69a39b4add8804f88", "score": "0.5979865", "text": "function lapizzeria_register_settings() {\n register_setting('lapizzeria_options_group', 'lapizzeria_address');\n register_setting('lapizzeria_options_group', 'lapizzeria_phone');\n\n register_setting('lapizzeria_options_gmaps', 'lapizzeria_gmap_latitude');\n register_setting('lapizzeria_options_gmaps', 'lapizzeria_gmap_longitude');\n register_setting('lapizzeria_options_gmaps', 'lapizzeria_gmap_zoom');\n register_setting('lapizzeria_options_gmaps', 'lapizzeria_gmap_apikey');\n }", "title": "" }, { "docid": "a603ddd7cbd7646ae3da98e60d5b65e5", "score": "0.5966981", "text": "function ab_set_options() {\n add_option('latitude', '9.93123', 'Default Latitude');\n add_option('longitude', '76.26730', 'Default Longitude');\n add_option('language', 'en', 'Default Longitude');\n add_option('map_width', '700', 'Default Longitude');\n add_option('map_height', '300', 'Default Longitude');\n add_option('zoom', '7', 'Default Zoom');\n add_option('less_five_fare', '3', 'Less Five');\n add_option('more_five_fare', '2.5', 'More Five');\n add_option('day_less_five_fare', '2', 'Reg Less Five');\n add_option('day_more_five_fare', '1.5', 'Reg More Five');\n\tadd_option('curr_format', '$', 'Currency format');\n\tadd_option('disp_dir', 'on', 'Display directions');\n\t\n\tadd_option('vehicle1_name', 'Car', 'Vehicle 1 Name');\n\tadd_option('vehicle2_name', 'Van', 'Vehicle 2 Name');\n\tadd_option('vehicle3_name', 'Bus', 'Vehicle 3 Name');\n\tadd_option('vehicle4_name', 'Truck', 'Vehicle 4 Name');\n\tadd_option('vehicle5_name', 'Caravan', 'Vehicle 5 Name');\n\t\n\tadd_option('vehicle1_charge', 1, 'Vehicle 1 Charge');\n\tadd_option('vehicle2_charge', 1.5, 'Vehicle 2 Charge');\n\tadd_option('vehicle3_charge', 2, 'Vehicle 3 Charge');\n\tadd_option('vehicle4_charge', 2.5, 'Vehicle 4 Charge');\n\tadd_option('vehicle5_charge', 3, 'Vehicle 5 Charge');\n\n}", "title": "" }, { "docid": "fbe3d998db24336a3efac85161f5cae7", "score": "0.59542847", "text": "public function urlmap_showForm( $form, $title, $formcode, $button, $remap, $setData ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<div class='section_title'>\n\t<h2>{$this->lang->words['sk_urlmapfor']} {$setData['set_name']}</h2>\n</div>\n<form action='{$this->settings['base_url']}&amp;{$this->form_code}&amp;do=$formcode&amp;map_id={$remap['map_id']}&amp;setID={$setData['set_id']}' id='mainform' method='POST'>\n<div class='acp-box'>\n\t<h3>{$title}</h3>\n\t<table class='ipsTable double_pad'>\n\t\t<tr>\n\t\t\t<th colspan='2'>{$this->lang->words['sk_generalsettings']}</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='field_title'>\n\t\t\t\t<strong class='title'>{$this->lang->words['sk_title']}</strong></td>\n\t\t\t</td>\n\t\t\t<td class='field_field'>\n\t\t\t\t{$form['map_title']}<br />\n\t\t\t\t<span class='desctext'>{$this->lang->words['sk_title_info']}</span>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='field_title'>\n\t\t\t\t<strong class='title'>{$this->lang->words['sk_type']}</strong></td>\n\t\t\t</td>\n\t\t\t<td class='field_field'>\n\t\t\t\t{$form['map_match_type']}<br />\n\t\t\t\t<span class='desctext'>{$this->lang->words['sk_type_info']}</span>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='field_title'>\n\t\t\t\t<strong class='title'>{$this->lang->words['sk_url']}</strong>\n\t\t\t</td>\n\t\t\t<td class='field_field'>\n\t\t\t\t{$form['map_url']}<br />\n\t\t\t\t<span class='desctext'>{$this->lang->words['sk_url_info']}</span>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<div class='acp-actionbar'>\n \t\t<input type='submit' value='{$button}' class='button primary' />\n\t</div>\n</div>\n</form>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "title": "" }, { "docid": "65945a68a9a60d8cc2b2e3fdf8c10bd7", "score": "0.5952115", "text": "function wpgmaps_head_old() {\n global $wpgmza_tblname_maps;\n if (isset($_POST['wpgmza_savemap'])){\n global $wpdb;\n\n\n $map_id = sanitize_text_field($_POST['wpgmza_id']);\n $map_title = sanitize_text_field($_POST['wpgmza_title']);\n $map_height = sanitize_text_field($_POST['wpgmza_height']);\n $map_width = sanitize_text_field($_POST['wpgmza_width']);\n\n\n $map_width_type = sanitize_text_field($_POST['wpgmza_map_width_type']);\n if ($map_width_type == \"%\") { $map_width_type = \"\\%\"; }\n $map_height_type = sanitize_text_field($_POST['wpgmza_map_height_type']);\n if ($map_height_type == \"%\") { $map_height_type = \"\\%\"; }\n $map_start_location = sanitize_text_field($_POST['wpgmza_start_location']);\n $map_start_zoom = intval($_POST['wpgmza_start_zoom']);\n $type = intval($_POST['wpgmza_map_type']);\n $alignment = intval($_POST['wpgmza_map_align']);\n $order_markers_by = intval($_POST['wpgmza_order_markers_by']);\n $order_markers_choice = intval($_POST['wpgmza_order_markers_choice']);\n $show_user_location = intval($_POST['wpgmza_show_user_location']);\n $directions_enabled = intval($_POST['wpgmza_directions']);\n $bicycle_enabled = intval($_POST['wpgmza_bicycle']);\n $traffic_enabled = intval($_POST['wpgmza_traffic']);\n $dbox = intval($_POST['wpgmza_dbox']);\n $dbox_width = sanitize_text_field($_POST['wpgmza_dbox_width']);\n $default_to = sanitize_text_field($_POST['wpgmza_default_to']);\n $listmarkers = intval($_POST['wpgmza_listmarkers']);\n $listmarkers_advanced = intval($_POST['wpgmza_listmarkers_advanced']);\n $filterbycat = intval($_POST['wpgmza_filterbycat']);\n\n\n $gps = explode(\",\",$map_start_location);\n $map_start_lat = $gps[0];\n $map_start_lng = $gps[1];\n $map_default_marker = sanitize_text_field($_POST['upload_default_marker']);\n $kml = sanitize_text_field($_POST['wpgmza_kml']);\n $fusion = sanitize_text_field($_POST['wpgmza_fusion']);\n\n $data['map_default_starting_lat'] = $map_start_lat;\n $data['map_default_starting_lng'] = $map_start_lng;\n $data['map_default_height'] = $map_height;\n $data['map_default_width'] = $map_width;\n $data['map_default_zoom'] = $map_start_zoom;\n $data['map_default_type'] = $type;\n $data['map_default_alignment'] = $alignment;\n $data['map_default_order_markers_by'] = $order_markers_by;\n $data['map_default_order_markers_choice'] = $order_markers_choice;\n $data['map_default_show_user_location'] = $show_user_location;\n $data['map_default_directions'] = $directions_enabled;\n $data['map_default_bicycle'] = $bicycle_enabled;\n $data['map_default_traffic'] = $traffic_enabled;\n $data['map_default_dbox'] = $dbox;\n $data['map_default_dbox_width'] = $dbox_width;\n $data['map_default_default_to'] = $default_to;\n $data['map_default_listmarkers'] = $listmarkers;\n $data['map_default_listmarkers_advanced'] = $listmarkers_advanced;\n $data['map_default_filterbycat'] = $filterbycat;\n $data['map_default_marker'] = $map_default_marker;\n $data['map_default_width_type'] = $map_width_type;\n $data['map_default_height_type'] = $map_height_type;\n\n\n\n\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname_maps SET\n map_title = %s,\n map_width = %s,\n map_height = %s,\n map_start_lat = %f,\n map_start_lng = %f,\n map_start_location = %s,\n map_start_zoom = %d,\n default_marker = %s,\n type = %d,\n alignment = %d,\n order_markers_by = %d,\n order_markers_choice = %d,\n show_user_location = %d,\n directions_enabled = %d,\n kml = %s,\n bicycle = %d,\n traffic = %d,\n dbox = %d,\n dbox_width = %s,\n default_to = %s,\n listmarkers = %d,\n listmarkers_advanced = %d,\n filterbycat = %d,\n fusion = %s,\n map_width_type = %s,\n map_height_type = %s\n WHERE id = %d\",\n\n $map_title,\n $map_width,\n $map_height,\n $map_start_lat,\n $map_start_lng,\n $map_start_location,\n $map_start_zoom,\n $map_default_marker,\n $type,\n $alignment,\n $order_markers_by,\n $order_markers_choice,\n $show_user_location,\n $directions_enabled,\n $kml,\n $bicycle_enabled,\n $traffic_enabled,\n $dbox,\n $dbox_width,\n $default_to,\n $listmarkers,\n $listmarkers_advanced,\n $filterbycat,\n $fusion,\n $map_width_type,\n $map_height_type,\n $map_id)\n );\n\n\n\n update_option('WPGMZA_SETTINGS', $data);\n\n\n echo \"<div class='updated'>\";\n _e(\"Your settings have been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n }\n\n else if (isset($_POST['wpgmza_save_maker_location'])){\n global $wpdb;\n global $wpgmza_tblname;\n $mid = sanitize_text_field($_POST['wpgmaps_marker_id']);\n $wpgmaps_marker_lat = sanitize_text_field($_POST['wpgmaps_marker_lat']);\n $wpgmaps_marker_lng = sanitize_text_field($_POST['wpgmaps_marker_lng']);\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname SET\n lat = %s,\n lng = %s\n WHERE id = %d\",\n\n $wpgmaps_marker_lat,\n $wpgmaps_marker_lng,\n $mid)\n );\n\n\n\n\n\n echo \"<div class='updated'>\";\n _e(\"Your marker location has been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n else if (isset($_POST['wpgmza_save_poly'])){\n global $wpdb;\n global $wpgmza_tblname_poly;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polygon']);\n $wpgmaps_polydatainner = sanitize_text_field($_POST['wpgmza_polygon_inner']);\n $linecolor = sanitize_text_field($_POST['poly_line']);\n $fillcolor = sanitize_text_field($_POST['poly_fill']);\n $opacity = sanitize_text_field($_POST['poly_opacity']);\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"INSERT INTO $wpgmza_tblname_poly SET\n map_id = %d,\n polydata = %s,\n innerpolydata = %s,\n linecolor = %s,\n fillcolor = %s,\n opacity = %s\n \",\n\n $mid,\n $wpgmaps_polydata,\n $wpgmaps_polydatainner,\n $linecolor,\n $fillcolor,\n $opacity\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polygon has been created.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n else if (isset($_POST['wpgmza_edit_poly'])){\n\n global $wpdb;\n global $wpgmza_tblname_poly;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n $pid = sanitize_text_field($_POST['wpgmaps_poly_id']);\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polygon']);\n $wpgmaps_polydatainner = sanitize_text_field($_POST['wpgmza_polygon_inner']);\n $linecolor = sanitize_text_field($_POST['poly_line']);\n $fillcolor = sanitize_text_field($_POST['poly_fill']);\n $opacity = sanitize_text_field($_POST['poly_opacity']);\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname_poly SET\n polydata = %s,\n innerpolydata = %s,\n linecolor = %s,\n fillcolor = %s,\n opacity = %s\n WHERE `id` = %d\"\n ,\n\n $wpgmaps_polydata,\n $wpgmaps_polydatainner,\n $linecolor,\n $fillcolor,\n $opacity,\n $pid\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polygon has been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n else if (isset($_POST['wpgmza_save_polyline'])){\n global $wpdb;\n global $wpgmza_tblname_polylines;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polyline']);\n $linecolor = sanitize_text_field($_POST['poly_line']);\n $linethickness = sanitize_text_field($_POST['poly_thickness']);\n $opacity = sanitize_text_field($_POST['poly_opacity']);\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"INSERT INTO $wpgmza_tblname_polylines SET\n map_id = %d,\n polydata = %s,\n linecolor = %s,\n linethickness = %s,\n opacity = %s\n \",\n\n $mid,\n $wpgmaps_polydata,\n $linecolor,\n $linethickness,\n $opacity\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polyline has been created.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n else if (isset($_POST['wpgmza_edit_polyline'])){\n global $wpdb;\n global $wpgmza_tblname_polylines;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n $pid = sanitize_text_field($_POST['wpgmaps_poly_id']);\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polyline']);\n $linecolor = sanitize_text_field($_POST['poly_line']);\n $linethickness = sanitize_text_field($_POST['poly_thickness']);\n $opacity = sanitize_text_field($_POST['poly_opacity']);\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname_polylines SET\n polydata = %s,\n linecolor = %s,\n linethickness = %s,\n opacity = %s\n WHERE `id` = %d\"\n ,\n\n $wpgmaps_polydata,\n $linecolor,\n $linethickness,\n $opacity,\n $pid\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polyline has been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n else if (isset($_POST['wpgmza_save_settings'])){\n global $wpdb;\n $wpgmza_data['wpgmza_settings_image_width'] = sanitize_text_field($_POST['wpgmza_settings_image_width']);\n $wpgmza_data['wpgmza_settings_image_height'] = sanitize_text_field($_POST['wpgmza_settings_image_height']);\n $wpgmza_data['wpgmza_settings_use_timthumb'] = sanitize_text_field($_POST['wpgmza_settings_use_timthumb']);\n $wpgmza_data['wpgmza_settings_infowindow_width'] = sanitize_text_field($_POST['wpgmza_settings_infowindow_width']);\n $wpgmza_data['wpgmza_settings_infowindow_links'] = sanitize_text_field($_POST['wpgmza_settings_infowindow_links']);\n $wpgmza_data['wpgmza_settings_infowindow_address'] = sanitize_text_field($_POST['wpgmza_settings_infowindow_address']);\n $wpgmza_data['wpgmza_settings_infowindow_link_text'] = sanitize_text_field($_POST['wpgmza_settings_infowindow_link_text']);\n $wpgmza_data['wpgmza_settings_map_streetview'] = sanitize_text_field($_POST['wpgmza_settings_map_streetview']);\n $wpgmza_data['wpgmza_settings_map_full_screen_control'] = sanitize_text_field($_POST['wpgmza_settings_map_full_screen_control']);\n $wpgmza_data['wpgmza_settings_map_zoom'] = sanitize_text_field($_POST['wpgmza_settings_map_zoom']);\n $wpgmza_data['wpgmza_settings_map_pan'] = sanitize_text_field($_POST['wpgmza_settings_map_pan']);\n $wpgmza_data['wpgmza_settings_map_type'] = sanitize_text_field($_POST['wpgmza_settings_map_type']);\n $wpgmza_data['wpgmza_settings_map_scroll'] = sanitize_text_field($_POST['wpgmza_settings_map_scroll']);\n $wpgmza_data['wpgmza_settings_map_draggable'] = sanitize_text_field($_POST['wpgmza_settings_map_draggable']);\n $wpgmza_data['wpgmza_settings_map_clickzoom'] = sanitize_text_field($_POST['wpgmza_settings_map_clickzoom']);\n $wpgmza_data['wpgmza_settings_ugm_striptags'] = sanitize_text_field($_POST['wpgmza_settings_map_striptags']);\n $wpgmza_data['wpgmza_settings_force_jquery'] = sanitize_text_field($_POST['wpgmza_settings_force_jquery']);\n $wpgmza_data['wpgmza_settings_markerlist_category'] = sanitize_text_field($_POST['wpgmza_settings_markerlist_category']);\n $wpgmza_data['wpgmza_settings_markerlist_icon'] = sanitize_text_field($_POST['wpgmza_settings_markerlist_icon']);\n $wpgmza_data['wpgmza_settings_markerlist_title'] = sanitize_text_field($_POST['wpgmza_settings_markerlist_title']);\n $wpgmza_data['wpgmza_settings_markerlist_address'] = sanitize_text_field($_POST['wpgmza_settings_markerlist_address']);\n $wpgmza_data['wpgmza_settings_markerlist_description'] = sanitize_text_field($_POST['wpgmza_settings_markerlist_description']);\n update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);\n echo \"<div class='updated'>\";\n _e(\"Your settings have been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n\n\n\n}", "title": "" }, { "docid": "82d36de4a9c98a3475ff4482a70f9db1", "score": "0.5936544", "text": "function get_widget_form() {\n\t\t\treturn apply_filters('trx_addons_sow_map', array_merge(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => array(\n\t\t\t\t\t\t'label' => __('Layout', 'trx_addons'),\n\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Select shortcodes's layout\", 'trx_addons') ),\n\t\t\t\t\t\t'default' => 'default',\n\t\t\t\t\t\t'options' => apply_filters('trx_addons_sc_type', trx_addons_components_get_allowed_layouts('sc', 'googlemap'), $this->get_sc_name(), 'sow'),\n\t\t\t\t\t\t'type' => 'select'\n\t\t\t\t\t),\n\t\t\t\t\t'style' => array(\n\t\t\t\t\t\t'label' => __('Style', 'trx_addons'),\n\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Map's custom style\", 'trx_addons') ),\n\t\t\t\t\t\t'default' => 'default',\n\t\t\t\t\t\t'options' => trx_addons_get_list_sc_googlemap_styles(),\n\t\t\t\t\t\t'type' => 'select'\n\t\t\t\t\t),\n\t\t\t\t\t\"zoom\" => array(\n\t\t\t\t\t\t\"label\" => esc_html__(\"Zoom\", 'trx_addons'),\n\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Map zoom factor from 1 to 20. If 0 or empty - fit bounds to markers\", 'trx_addons') ),\n\t\t\t\t\t\t\"min\" => 0,\n\t\t\t\t\t\t\"max\" => 20,\n\t\t\t\t\t\t\"type\" => \"slider\"\n\t\t\t\t\t),\n\t\t\t\t\t\"center\" => array(\n\t\t\t\t\t\t\"label\" => esc_html__(\"Center\", 'trx_addons'),\n\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Lat,Lng coordinates of the map's center. If empty - use coordinates of the first marker (or specified address in the field below)\", 'trx_addons') ),\n\t\t\t\t\t\t\"value\" => \"\",\n\t\t\t\t\t\t\"type\" => \"text\"\n\t\t\t\t\t),\n\t\t\t\t\t\"width\" => array(\n\t\t\t\t\t\t\"label\" => esc_html__(\"Width\", 'trx_addons'),\n\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Width of the map\", 'trx_addons') ),\n\t\t\t\t\t\t\"default\" => \"100%\",\n\t\t\t\t\t\t\"type\" => \"measurement\"\n\t\t\t\t\t),\n\t\t\t\t\t\"height\" => array(\n\t\t\t\t\t\t\"label\" => esc_html__(\"Height\", 'trx_addons'),\n\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Height of the map\", 'trx_addons') ),\n\t\t\t\t\t\t\"default\" => \"350px\",\n\t\t\t\t\t\t\"type\" => \"measurement\"\n\t\t\t\t\t),\n\t\t\t\t\t'address' => array(\n\t\t\t\t\t\t'label' => __('Address', 'trx_addons'),\n\t\t\t\t\t\t'description' => esc_html__( \"Specify address in this field if you don't need unique marker, title or latlng coordinates. Otherwise, leave this field empty and fill markers below\", 'trx_addons' ),\n\t\t\t\t\t\t'type' => 'text'\n\t\t\t\t\t),\n\t\t\t\t\t'cluster' => array(\n\t\t\t\t\t\t'label' => __('Cluster icon', 'trx_addons'),\n\t\t\t\t\t\t'description' => esc_html__( \"Select or upload image for markers clusterer\", 'trx_addons' ),\n\t\t\t\t\t\t'type' => 'media'\n\t\t\t\t\t),\n\t\t\t\t\t'markers' => array(\n\t\t\t\t\t\t'label' => __('Markers', 'trx_addons'),\n\t\t\t\t\t\t'item_name' => __( 'Marker', 'trx_addons' ),\n\t\t\t\t\t\t'item_label' => array(\n\t\t\t\t\t\t\t'selector' => \"[name*='title']\",\n\t\t\t\t\t\t\t'update_event' => 'change',\n\t\t\t\t\t\t\t'value_method' => 'val'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'type' => 'repeater',\n\t\t\t\t\t\t'fields' => apply_filters('trx_addons_sc_param_group_fields', array(\n\t\t\t\t\t\t\t'address' => array(\n\t\t\t\t\t\t\t\t'label' => __('Address', 'trx_addons'),\n\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Address of this marker\", 'trx_addons') ),\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\t'latlng' => array(\n\t\t\t\t\t\t\t\t'label' => __('or Latitude and Longitude', 'trx_addons'),\n\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Comma separated coorditanes of the marker (instead Address above)\", 'trx_addons') ),\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\t'icon' => array(\n\t\t\t\t\t\t\t\t'label' => __('Marker image', 'trx_addons'),\n\t\t\t\t\t\t\t\t'description' => esc_html__( \"Select or upload image of this marker\", 'trx_addons' ),\n\t\t\t\t\t\t\t\t'type' => 'media'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'icon_retina' => array(\n\t\t\t\t\t\t\t\t'label' => __('Marker image for Retina', 'trx_addons'),\n\t\t\t\t\t\t\t\t'description' => esc_html__( \"Select or upload image of this marker for Retina device\", 'trx_addons' ),\n\t\t\t\t\t\t\t\t'type' => 'media'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'icon_width' => array(\n\t\t\t\t\t\t\t\t'label' => __('Marker width', 'trx_addons'),\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Width of the marker. If empty - use original size', 'trx_addons' ),\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\t'icon_height' => array(\n\t\t\t\t\t\t\t\t'label' => __('Marker height', 'trx_addons'),\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Height of the marker. If empty - use original size', 'trx_addons' ),\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\t'animation' => array(\n\t\t\t\t\t\t\t\t\"label\" => esc_html__(\"Animation\", 'trx_addons'),\n\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Marker's animation\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\"options\" => trx_addons_get_list_sc_googlemap_animations(),\n\t\t\t\t\t\t\t\t\"type\" => \"select\"\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'label' => __('Title', 'trx_addons'),\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Title of the marker', 'trx_addons' ),\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\t'description' => array(\n\t\t\t\t\t\t\t\t'rows' => 10,\n\t\t\t\t\t\t\t\t'label' => __('Description', 'trx_addons'),\n\t\t\t\t\t\t\t\t'description' => esc_html__( 'Description of the marker', 'trx_addons' ),\n\t\t\t\t\t\t\t\t'type' => 'tinymce'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t), $this->get_sc_name())\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\ttrx_addons_sow_add_title_param(),\n\t\t\t\ttrx_addons_sow_add_id_param()\n\t\t\t), $this->get_sc_name());\n\t\t}", "title": "" }, { "docid": "ac934c94a313b788f346f100de5812aa", "score": "0.5928538", "text": "public function kd_map_shrt($atts, $content = null) {\r\n\r\n\r\n $api = 'https://maps.googleapis.com/maps/api/js';\r\n $redux_ThemeTek = get_option( 'redux_ThemeTek' );\r\n $map_key = $redux_ThemeTek['tek-google-api'];\r\n if($map_key != false) {\r\n $arr_params = array(\r\n 'key' => $map_key\r\n );\r\n $api = esc_url( add_query_arg( $arr_params, $api ));\r\n }\r\n\r\n if (isset($redux_ThemeTek['tek-google-api']) && $redux_ThemeTek['tek-google-api'] != '' ) {\r\n wp_enqueue_script(\"googleapis\",$api,null,null,false);\r\n }\r\n\r\n // Declare empty vars\r\n $output = $gmap_style_var = $business_data = $content_image = $map_img_array = '';\r\n\r\n extract(shortcode_atts(array(\r\n 'map_name' => '',\r\n 'map_latitude' => '',\r\n 'map_longitude' => '',\r\n 'map_zoom' => '',\r\n 'map_style' => '',\r\n 'image_source' => '',\r\n 'map_icon' => '',\r\n 'ext_image' => '',\r\n 'map_height' => '',\r\n 'map_business_panel_settings' => '',\r\n 'map_business_name' => '',\r\n 'map_business_address' => '',\r\n 'map_business_email' => '',\r\n 'map_business_phone' => '',\r\n 'map_business_opening_hours' => '',\r\n 'map_business_schedule' => '',\r\n ), $atts));\r\n\r\n if ($image_source == 'external_link') {\r\n $content_image .= $ext_image;\r\n } else {\r\n $map_img_array = wp_get_attachment_image_src($map_icon, \"large\");\r\n \t\t\t\t$content_image = $map_img_array[0];\r\n }\r\n\r\n switch($map_style){\r\n \t\t\t\tcase 'gmap_style_grayscale':\r\n \t\t\t\t\t$gmap_style_var = 'var featureOpts = [\r\n \t\t\t\t\t\t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t\t\t\t\t stylers: [\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"visibility\": \"on\" },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"weight\": 1 },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"saturation\": -100 },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"lightness\": 2.2 },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"gamma\": 2.2 }\r\n \t\t\t\t\t\t\t\t\t\t\t ]\r\n \t\t\t\t\t\t\t\t\t\t\t}, {\r\n featureType: \"poi\",\r\n stylers: [\r\n { \"visibility\": \"off\" }\r\n ]\r\n }\r\n \t\t\t\t\t\t\t\t\t\t];';\r\n \t\t\t\tbreak;\r\n\r\n \t\t\t\tcase 'gmap_style_normal':\r\n \t\t\t\t\t$gmap_style_var = 'var featureOpts = [\r\n \t\t\t\t\t\t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t\t\t\t\t stylers: [\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"visibility\": \"on\" },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"weight\": 1.1 },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"saturation\": 1 },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"lightness\": 1 },\r\n \t\t\t\t\t\t\t\t\t\t\t\t{ \"gamma\": 1 }\r\n \t\t\t\t\t\t\t\t\t\t\t ]\r\n \t\t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t\t];';\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n\r\n \t\t\t$id = \"kd\".uniqid();\r\n\r\n if (isset($redux_ThemeTek['tek-google-api']) && $redux_ThemeTek['tek-google-api'] != '' ) {\r\n \t\t\t$output .= '<script>\r\n\r\n function initKdMap_'.$id.'() {\r\n var map_'.$id.';\r\n \t\t\t\t\t\t\tvar gmap_location_'.$id.' = new google.maps.LatLng('.$map_latitude.', '.$map_longitude.');\r\n \t\t\t\t\t\t\tvar GMAP_MODULE_'.$id.' = \"customMap\";\r\n \t\t\t\t\t\t\t\t'.$gmap_style_var.'\r\n \t\t\t\t\t\t\t\tvar mapOptions = {\r\n \t\t\t\t\t\t\t\t\tzoom: '.$map_zoom.',\r\n \t\t\t\t\t\t\t\t\tcenter: gmap_location_'.$id.',\r\n scrollwheel: false,\r\n \t\t\t\t\t\t\t\t\tmapTypeControlOptions: {\r\n \t\t\t\t\t\t\t\t\t\tmapTypeIds: [google.maps.MapTypeId.ROADMAP, GMAP_MODULE_'.$id.']\r\n \t\t\t\t\t\t\t\t\t},\r\n \t\t\t\t\t\t\t\t\tmapTypeId: GMAP_MODULE_'.$id.'\r\n \t\t\t\t\t\t\t\t};\r\n \t\t\t\t\t\t\t\tmap_'.$id.' = new google.maps.Map(document.getElementById(\"'.$id.'\"), mapOptions);\r\n \t\t\t\t\t\t\t\tmarker_'.$id.' = new google.maps.Marker({\r\n \t\t\t\t\t\t\t\t\tmap: map_'.$id.',\r\n \t\t\t\t\t\t\t\t\tdraggable: false,\r\n \t\t\t\t\t\t\t\t\tanimation: google.maps.Animation.DROP,\r\n \t\t\t\t\t\t\t\t\tposition: gmap_location_'.$id.',\r\n \t\t\t\t\t\t\t\t\ticon: \"'.$content_image.'\"\r\n \t\t\t\t\t\t\t\t });\r\n \t\t\t\t\t\t\t\tgoogle.maps.event.addListener(marker_'.$id.', \"click\", function() {\r\n \t\t\t\t\t\t\t\t\tif (marker_'.$id.'.getAnimation() != null) {\r\n \t\t\t\t\t\t\t\t\t\tmarker_'.$id.'.setAnimation(null);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\tmarker_'.$id.'.setAnimation(google.maps.Animation.BOUNCE);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t});\r\n \t\t\t\t\t\t\t\tvar styledMapOptions = {\r\n \t\t\t\t\t\t\t\t\tname: \"'.$map_name.'\"\r\n \t\t\t\t\t\t\t\t};\r\n \t\t\t\t\t\t\t\tvar customMapType_'.$id.' = new google.maps.StyledMapType(featureOpts, styledMapOptions);\r\n \t\t\t\t\t\t\t\tmap_'.$id.'.mapTypes.set(GMAP_MODULE_'.$id.', customMapType_'.$id.');\r\n }\r\n jQuery(window).load(function() {\r\n initKdMap_'.$id.'();\r\n });\r\n \t\t\t\t\t\t</script>';\r\n } else {\r\n $output .= '<div class=\"kd-alertbox kd-contact-alertbox ab_info kd_map_alert\">\r\n <div class=\"ab-icon\"><i class=\"fas fa-exclamation-triangle\"></i></div>\r\n <div class=\"ab-message\"><p></p>\r\n <p>Google maps requires a valid API key in order to work.<br> You can add it in Dashboard > Ekko > Theme Options > Global Options. Generate a new API key from https://developers.google.com/maps</p></div>\r\n <a href=\"#\" class=\"ab-close\"><i class=\"fas fa-times\"></i></a>\r\n </div>';\r\n }\r\n\r\n $output .= '<div class=\"contact-map-container '.$map_business_panel_settings.'\" '.(!empty($map_height) ? 'style=\"height: '.$map_height.';\"' : '').'>';\r\n if ($map_business_panel_settings != \"hidden_info_panel\") {\r\n $output .= '<div class=\"business-info-wrapper\">\r\n <span class=\"fas fa-times toggle-map-info\"></span>\r\n <div class=\"business-info-header\">';\r\n if ($map_business_name != '') {\r\n $output .= '<h4>'.$map_business_name.'</h4>';\r\n }\r\n $output .= '<address>';\r\n if ($map_business_address != '') {\r\n $output .= '<span class=\"business-address-row\"><i class=\"fas fa-map-marker-alt\"></i><span class=\"address-overflow\">'.$map_business_address.'</span></span>';\r\n }\r\n if ($map_business_phone != '') {\r\n $output .= '<span class=\"business-phone-row\"><i class=\"fas fa-phone-alt\"></i>'.$map_business_phone.'</span>';\r\n }\r\n if ($map_business_email != '') {\r\n $output .= '<span class=\"business-email-row\"><i class=\"far fa-envelope\"></i><a href=\"mailto:'.$map_business_email.'\">'.$map_business_email.'</a></span>';\r\n }\r\n $output .= '</address>\r\n </div>\r\n <div class=\"business-info-schedule\">\r\n <h4>'.$map_business_opening_hours.'</h4>';\r\n $map_business_schedule = json_decode( urldecode( $map_business_schedule ), true );\r\n\r\n if( isset( $map_business_schedule ) ) {\r\n \t\t\t\tforeach ( $map_business_schedule as $business_data ){\r\n \t\t\t\t\t\t$output .= '<div class=\"business-info-day\">';\r\n if ( isset( $business_data[\"map_schedule_day_name\"] ) ){\r\n $output .= '<span class=\"business-info-day-name\">'.$business_data[\"map_schedule_day_name\"].'</span>';\r\n }\r\n if ( isset( $business_data[\"map_schedule_day_hours\"] ) ){\r\n $output .= '<span class=\"business-info-day-hours\">'.$business_data[\"map_schedule_day_hours\"].'</span>';\r\n }\r\n \t\t\t\t\t\t$output .= '</div>';\r\n \t\t\t\t}\r\n \t\t\t}\r\n\r\n $output .= '</div>\r\n </div>';\r\n }\r\n $output .= '<div id=\"'.$id.'\" class=\"kd_map\" '.(!empty($map_height) ? 'style=\"height: '.$map_height.';\"' : '').'></div>\r\n\r\n </div>';\r\n\r\n return $output;\r\n }", "title": "" }, { "docid": "0f73985068595ff5e97a3f0f471572ba", "score": "0.5927271", "text": "function set_form() {\n\t}", "title": "" }, { "docid": "a476585666fae63b5369310f6010be27", "score": "0.59249705", "text": "public function cap_wpgm_settings_init() {\n\t\t\t// Set default value\n\t\t\tif ( false == get_option( 'cap_wpgm_options' ) ) {\n\t\t\t\tadd_option( 'cap_wpgm_options',\n\t\t\t\t\tapply_filters( 'cap_wpgm_options', $this->cap_wpgm_set_default_options() ) );\n\t\t\t}\n\n\t\t\t// Add section for plugin options\n\t\t\tadd_settings_section(\n\t\t\t\t'cap_wpgm_setting_section', // Section ID\n\t\t\t\t__( 'Settings', 'cap-wp-google-maps' ), // Section title\n\t\t\t\tarray( $this, 'cap_wpgm_print_section_info' ), // Section Callback\n\t\t\t\t'cap-wpgm-setting-admin' // Page\n\t\t\t);\n\n\t\t\t// Add settings fields for plugin options\n\t\t\tadd_settings_field(\n\t\t\t\t'api_key',\n\t\t\t\t__( 'Api Key', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_text_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'api_key',\n\t\t\t\t\t'class' => 'field input-text field-api-key',\n\t\t\t\t\t'description' => __( 'You must use a key with referrer restrictions to be used with this API.', 'cap-wp-google-maps' ),\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'size' => '40',\n\t\t\t\t\t'placeholder' => __( 'Api Key', 'cap-wp-google-maps' )\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'lat',\n\t\t\t\t__( 'Latitude', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_text_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'lat',\n\t\t\t\t\t'class' => 'field input-text field-lat',\n\t\t\t\t\t'description' => __( 'latitude in geographical coordinates.', 'cap-wp-google-maps' ),\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'size' => '40',\n\t\t\t\t\t'placeholder' => __( 'latitude', 'cap-wp-google-maps' )\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'lng',\n\t\t\t\t__( 'Longitude', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_text_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'lng',\n\t\t\t\t\t'class' => 'field input-text field-lng',\n\t\t\t\t\t'description' => __( 'longitude in geographical coordinates.', 'cap-wp-google-maps' ),\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'size' => '40',\n\t\t\t\t\t'placeholder' => __( 'longitude', 'cap-wp-google-maps' )\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'zoom',\n\t\t\t\t__( 'Zoom Level', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_number_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'zoom',\n\t\t\t\t\t'class' => 'field input-number field-zoom',\n\t\t\t\t\t'description' => __( 'default 13<br>1: World, 5: Landmass/continent, 10: City, 15: Streets, 20: Buildings', 'cap-wp-google-maps' ),\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'theme',\n\t\t\t\t__( 'Theme', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_theme_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'theme',\n\t\t\t\t\t'class' => 'field input-radio field-theme',\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'custom_style',\n\t\t\t\t__( 'Custom Style', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_textarea_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'custom_style',\n\t\t\t\t\t'class' => 'field textarea field-theme-custom',\n\t\t\t\t\t'description' => __( 'see <a href=\"https://snazzymaps.com\">Snazzy Maps</a>', 'cap-wp-google-maps' ),\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'cols' => '38',\n\t\t\t\t\t'rows' => '10',\n\t\t\t\t\t'placeholder' => __( '[{...}]', 'cap-wp-google-maps' )\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'zoom_control',\n\t\t\t\t__( 'Zoom Control', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_checkbox_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'zoom_control',\n\t\t\t\t\t'class' => 'field input-checkbox field-hide-zoom-control',\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'description' => __( 'enables/disables the Zoom Control', 'cap-wp-google-maps' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'street_view_control',\n\t\t\t\t__( 'Street View Control', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_checkbox_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'street_view_control',\n\t\t\t\t\t'class' => 'field input-checkbox field-hide-street-view-control',\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'description' => __( 'enables/disables the Street View Control', 'cap-wp-google-maps' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'full_screen_control',\n\t\t\t\t__( 'Full Screen Control', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_checkbox_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'full_screen_control',\n\t\t\t\t\t'class' => 'field input-checkbox field-hide-full-screen-control',\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'description' => __( 'enables/disables the Full Screen Control', 'cap-wp-google-maps' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'map_type_control',\n\t\t\t\t__( 'Map Type Control', 'cap-wp-google-maps' ),\n\t\t\t\tarray( $this, 'cap_wpgm_input_checkbox_callback' ),\n\t\t\t\t'cap-wpgm-setting-admin',\n\t\t\t\t'cap_wpgm_setting_section',\n\t\t\t\tarray(\n\t\t\t\t\t'label_for' => 'map_type_control',\n\t\t\t\t\t'class' => 'field input-checkbox field-hide-map-type-control',\n\t\t\t\t\t'option_name' => 'cap_wpgm_options',\n\t\t\t\t\t'description' => __( 'enables/disables the Map Type Control', 'cap-wp-google-maps' ),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Register plugin settings\n\t\t\tregister_setting(\n\t\t\t\t'cap_wpgm_group', // Option group\n\t\t\t\t'cap_wpgm_options', // Option name\n\t\t\t\tarray( $this, 'cap_wpgm_sanitize' ) // Sanitize\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "30822f5c0552aa1a55939bb314cbc402", "score": "0.59203833", "text": "function fl_form_settings_init( $settings ) {\n\n\t\t$settings['search_form'][1]['radius'] = array(\n\t\t\t\t'name' => 'radius',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Radius / Distance', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Enter distance values in the input box comma separated if you want to have a select dropdown menu of multiple radius values in the search form. If only one value entered it will be the default value of the search form which will be hidden.', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t\t\t'function' => 'radius'\n\t\t);\n\n\t\t$settings['search_form'][1]['address_field'] = array(\n\n\t\t\t\t'name' => 'address_field',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Address field', 'GMW-PS' ),\n\t\t\t\t'cb_label' => '',\n\t\t\t\t'desc' => __( 'Type the title for the address field of the search form. for example \"Enter your address\". this title wll be displayed either next to the address input field or within if you check the checkbox for it. You can also choose to have the address field mandatory which will prevent users from submitting the form if no address entered. Otherwise if you allow the field to be empty and user submit a form with no address the plugin will display all results.', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t\t\t'function'\t => 'address_fields'\n\t\t);\n\t\t\n\t\t$settings['search_form'][1]['keyword_field'] = array(\t\t\n\t\t\t\t'name' => 'keyword_field',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Keyword field', 'GMW-PS' ),\n\t\t\t\t'cb_label' => '',\n\t\t\t\t'desc' => __( \"Create additional input box to let users search for members by member's name.\", 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t\t\t'function'\t => 'fl_keyword_search'\n\t\t);\n\n\t\t$settings['search_results'][1]['xprofile_fields'] = array(\n\n\t\t\t\t'name' => 'results_xprofile_fields',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Xprofile fields', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'hoose the profile fields that you want to display in each of the results.', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['search_results'][1]['address_fields'] = array(\n\n\t\t\t\t'name' => 'address_fields',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Address fields', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the address fields to display for each member in the results.', 'GMW-PS' ),\n\t\t\t\t'type'\t\t => 'multicheckbox',\n\t\t\t\t'options'\t => array(\n\t\t\t\t\t\t'street' \t\t=> __( 'Street' , 'GMW-PS' ),\n\t\t\t\t\t\t'apt' \t\t\t=> __( 'Apt' , 'GMW-PS' ),\n\t\t\t\t\t\t'city' \t\t=> __( 'City' , 'GMW-PS' ),\n\t\t\t\t\t\t'state'\t\t\t=> __( 'State' , 'GMW-PS' ),\n\t\t\t\t\t\t'zipcode'\t\t=> __( 'Zipcode' , 'GMW-PS' ),\n\t\t\t\t\t\t'country'\t\t=> __( 'Country' , 'GMW-PS' ),\n\t\t\t\t),\n\t\t);\n\n\t\t$settings['results_map'][1]['markers_display'] = array(\n\t\t\t\t'name' => 'markers_display',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' \t => __( 'Markers display', 'GMW-PS'),\n\t\t\t\t'cb_label' => __( 'Enable', 'GMW-PS'),\n\t\t\t\t'desc' => __( 'Use marker Clusterer to group near locations.', 'GMW-PS' ),\n\t\t\t\t'type' \t => 'radio',\n\t\t\t\t'options' \t => array(\n\t\t\t\t\t\t'none'\t\t\t\t\t=> 'Normal',\n\t\t\t\t\t\t'markers_clusterer' \t=> 'Markers clusterer',\n\t\t\t\t\t\t'markers_spiderfier' \t=> 'Markers Spiderfier'\n\t\t\t\t),\n\t\t\t\t'attributes' => array()\n\t\t);\n\n\t\t$settings['results_map'][1]['map_icon_usage'] = array(\n\t\t\t\t'name' => 'fl_map_icon_usage',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Map icons usage', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the map\\'s icons that will be used to display results on the map', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['global_map_icon'] = array(\n\t\t\t\t'name' => 'fl_global_map_icon',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'Default map icon', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the global icon for google map. All results will use this icon to show its location on the map unless you check the \"per post icon\" checkbox below. The map icons can be found in \"/wp-content/plugins/geo-my-wp/assets/map-icons/main-icons/\". you can easily remove or add your own icons to this folder. ', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['your_location_icon'] = array(\n\t\t\t\t'name' => 'fl_your_location_icon',\n\t\t\t\t'std' => '',\n\t\t\t\t'label' => __( 'User location map icon', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Choose the icon that will show the user location on the map. the \"your location\" icons can be found in \"/wp-content/plugins/geo-my-wp/assets/map-icons/your-location-icons/\". you can easily remove or add your own icons to this folder. ', 'GMW-PS' ),\n\t\t\t\t'type' => 'function',\n\t\t);\n\n\t\t$settings['results_map'][1]['map_controls'] = array(\n\n\t\t\t\t'name' => 'map_controls',\n\t\t\t\t'std' => 'true',\n\t\t\t\t'label' => __( 'Map controls', 'GMW-PS' ),\n\t\t\t\t'desc' => __( 'Which map controls would you like to use', 'GMW-PS' ),\n\t\t\t\t'type'\t\t => 'multicheckboxvalues',\n\t\t\t\t'options'\t => array(\n\t\t\t\t\t\t'zoomControl' \t\t\t=> __( 'Zoom' , 'GMW-PS' ),\n\t\t\t\t\t\t'panControl' \t\t\t=> __( 'Pan' , 'GMW-PS' ),\n\t\t\t\t\t\t'scaleControl' \t\t=> __( 'Scale' , 'GMW-PS' ),\n\t\t\t\t\t\t'mapTypeControl'\t\t=> __( 'Map Type' , 'GMW-PS' ),\n\t\t\t\t\t\t'streetViewControl'\t\t=> __( 'Street View' , 'GMW-PS' ),\n\t\t\t\t\t\t'overviewMapControl'\t=> __( 'Overview' , 'GMW-PS' ),\n\t\t\t\t\t\t'scrollwheel'\t\t\t=> __( 'Scroll Wheel' , 'GMW-PS' ),\n\t\t\t\t\t\t'resizeMapControl' \t=> __( 'Resize map trigger' , 'GMW-PS' )\n\t\t\t\t),\n\t\t);\n\t\t\t\n\t\t$settings['info_window'] = array(\n\t\t\t\t__( 'Marker Window', 'GMW-PS' ),\n\t\t\t\tarray(\n\n\t\t\t\t\t\t'iw_type' => array(\n\t\t\t\t\t\t\t\t'name' => 'iw_type',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Marker info-window type', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'desc' => __( 'What type of marker info-window would you like to use? 1) \"Infobox\" to use the infobox library to generate the info-window within the limits of the map. 2) \"Pop-up\" to use an HTML pop-up window outside the limit of the map. 3) \"Normal\" to use the normal info-window generated by GEO m WP.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t'infobox' => 'Infobox',\n\t\t\t\t\t\t\t\t\t\t'popup'\t => 'Pop-up window',\n\t\t\t\t\t\t\t\t\t\t'normal' => 'normal'\n\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'attributes' => array()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'marker_window_theme' => array(\n\n\t\t\t\t\t\t\t\t'name' => 'bp_members_info_window_theme',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Marker info-window template', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'cb_label' => '',\n\t\t\t\t\t\t\t\t'desc' => __( 'Choose the theme for the marker window.', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'type' => 'function'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'draggable_use' => array(\n\n\t\t\t\t\t\t\t\t'name' => 'draggable_use',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' \t => __( 'Draggable window', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'cb_label' => __( 'Yes', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'desc' => __( \"Allow the user to drag the pop-up window across the screen. ( available for pop-up info-window only )\", 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' \t => 'checkbox',\n\t\t\t\t\t\t\t\t'attributes' => array()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'avatar' => array(\n\t\t\t\t\t\t\t\t'name' => 'avatar',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Avatar', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Member avatar?', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'cb_label' => __( 'Enable', 'GMW-PS' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'address' => array(\n\n\t\t\t\t\t\t\t\t'name' => 'address',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Address', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'cb_label' => __( 'Yes', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Display address', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'attributes' => array()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'live_directions' => array(\n\t\t\t\t\t\t\t\t'name' => 'live_directions',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'In Window Directions', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'cb_label' => __( 'Yes', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'desc' => __( 'Display complete directions link within the info-window. ( pop-up infoe window only )', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'attributes' => array()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'get_directions' => array(\n\t\t\t\t\t\t\t\t'name' => 'get_directions',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Get Directions Link', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'cb_label' => __( 'Yes', 'GMW-PS'),\n\t\t\t\t\t\t\t\t'desc' => __( 'Display get directions link that will open a new window with Google map showting the directions to the location.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'attributes' => array()\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'xprofile_fields' => array(\n\n\t\t\t\t\t\t\t\t'name' => 'xprofile_fields',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Xprofile Fields', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Choose the profile fields that you want to display in each of the results.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'function',\n\t\t\t\t\t\t)\n\t\t\t\t),\n\t\t);\n\n\t\t$settings['no_results'] = array(\n\t\t\t\t__( 'No Results', 'GMW-PS' ),\n\t\t\t\tarray(\n\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'name' => 'title',\n\t\t\t\t\t\t\t\t'std' => __( 'No members found.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'label' => __( 'No results\" title', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'The title that will be displayed when no results found.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type'\t\t => 'text',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'wider_search' => array(\n\t\t\t\t\t\t\t\t'name' => 'wider_search',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'Wider search link', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Link that will search within a wider range when no results found.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'function',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'all_results' => array(\n\t\t\t\t\t\t\t\t'name' => 'all_results',\n\t\t\t\t\t\t\t\t'std' => '',\n\t\t\t\t\t\t\t\t'label' => __( 'All Results', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'desc' => __( 'Create link that will display all results when no results found.', 'GMW-PS' ),\n\t\t\t\t\t\t\t\t'type' => 'function',\n\t\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t);\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "d3aaf24e301f4939bb16eb4209dbec3a", "score": "0.59020054", "text": "private function checkGoogleMaps() {\n\t\t$this->checkShowGoogleMaps();\n\t\tif ($this->objectToCheck->getConfValueBoolean(\n\t\t\t'showGoogleMaps', 's_googlemaps'\n\t\t)) {\n\t\t\t$this->checkDefaultCountry();\n\t\t}\n\t}", "title": "" }, { "docid": "09933f736c9122b88832df87b403f8cb", "score": "0.58952713", "text": "public function configForm () {\n\t}", "title": "" }, { "docid": "0c7b2a4b48c5efca8d677ff7dede34a6", "score": "0.5877342", "text": "public function settings_fields() {\n\t\t// our callback function just has to echo the <input>\n\t\tregister_setting( 'thf-ccaptcha-rewrite', 'thf_ccaptcha_rw' );\n\t}", "title": "" }, { "docid": "96f7aeb9e9fe39d17affd07d12c6838d", "score": "0.5869683", "text": "function wpgmaps_reload_map_on_post() {\n /*\n if (isset($_POST['wpgmza_savemap'])){\n\n $res = wpgmza_get_map_data(sanitize_text_field($_GET['map_id']));\n $wpgmza_lat = $res->map_start_lat;\n $wpgmza_lng = $res->map_start_lng;\n $wpgmza_width = intval($res->map_width);\n $wpgmza_height = intval($res->map_height);\n $wpgmza_width_type = $res->map_width_type;\n $wpgmza_height_type = $res->map_height_type;\n $wpgmza_map_type = $res->type;\n if (!$wpgmza_map_type || $wpgmza_map_type == \"\" || $wpgmza_map_type == \"1\") { $wpgmza_map_type = \"ROADMAP\"; }\n else if ($wpgmza_map_type == \"2\") { $wpgmza_map_type = \"SATELLITE\"; }\n else if ($wpgmza_map_type == \"3\") { $wpgmza_map_type = \"HYBRID\"; }\n else if ($wpgmza_map_type == \"4\") { $wpgmza_map_type = \"TERRAIN\"; }\n else { $wpgmza_map_type = \"ROADMAP\"; }\n $start_zoom = $res->map_start_zoom;\n if ($start_zoom < 1 || !$start_zoom) { $start_zoom = 5; }\n if (!$wpgmza_lat || !$wpgmza_lng) { $wpgmza_lat = \"51.5081290\"; $wpgmza_lng = \"-0.1280050\"; }\n\n ?>\n <script type=\"text/javascript\">\n jQuery(function() {\n jQuery(\"#wpgmza_map\").css({\n height:'<?php echo $wpgmza_height; ?><?php echo $wpgmza_height_type; ?>',\n width:'<?php echo $wpgmza_width; ?><?php echo $wpgmza_width_type; ?>'\n\n });\n var myLatLng = new google.maps.LatLng(<?php echo $wpgmza_lat; ?>,<?php echo $wpgmza_lng; ?>);\n MYMAP.init('#wpgmza_map', myLatLng, <?php echo $start_zoom; ?>);\n UniqueCode=Math.round(Math.random()*10010);\n MYMAP.placeMarkers('<?php echo wpgmaps_get_marker_url(sanitize_text_field($_GET['map_id'])); ?>?u='+UniqueCode,<?php echo sanitize_text_field($_GET['map_id']); ?>);\n\n });\n </script>\n <?php\n }\n*/\n\n}", "title": "" }, { "docid": "cf525b91084a001d673d4a94fd6d6ee7", "score": "0.58549976", "text": "function shortcodeGlobalGmaps( $atts ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t'width' \t\t\t=> '600px',\r\n\t\t\t'height' \t\t\t=> '500px',\r\n\t\t\t'zoom' \t\t\t\t=> '5',\r\n\t\t\t'display_taxo' \t\t=> false,\r\n\t\t\t'taxonomy' \t\t\t=> '',\r\n\t\t\t'post_type' \t\t=> '',\r\n\t\t\t'term'\t\t\t\t=> '',\r\n\t\t\t'search'\t\t\t=> false\r\n\t\t), $atts ) );\r\n\r\n\t\treturn $this->buildGlobalMaps( $width, $height, $zoom, $display_taxo, $taxonomy, $term , $post_type, $search );\r\n\t}", "title": "" }, { "docid": "bc5750661abd3706a498af8e6d5e5cb2", "score": "0.5854129", "text": "function _ws_svg_options_fields() {\n // General\n register_setting('svg', 'svg');\n}", "title": "" }, { "docid": "90665cdcc76cda9b7341185b1a64a9fb", "score": "0.58426774", "text": "function dlts_shapes_settings($form, &$form_state) {\n\n $form['dlts_shapes_field'] = array(\n '#type' => 'fieldset',\n '#title' => t('OCR word shape service'),\n '#collapsed' => FALSE,\n '#collapsible' => FALSE,\n );\n \n $form['dlts_shapes_field']['dlts_shapes_services_url'] = array(\n '#type' => 'textfield',\n '#title' => t('URL'),\n '#default_value' => variable_get('dlts_shapes_services_url', 'http://localhost:8983/ocr'),\n '#size' => 60,\n '#maxlength' => 100,\n '#description' => t('e.g., http://localhost:8983/ocr'),\n );\n \n $url = variable_get('dlts_shapes_services_url', 'http://localhost:8983/ocr');\n \n /*\n * Ping OCR Word Shape Service server\n */\n \n try {\n $service = dlts_shapes_get_service('dlts_shapes', 'solr');\n $service->setUrl($url);\n $ping = $service->ping();\n $value = $ping ? t('Your site has contacted the OCR Word Shape Service server.') : t('Your site was unable to contact the OCR Word Shape Service server.'); \n drupal_set_message($value); \n }\n catch (Exception $e) {\n watchdog('OCR Word Shape Service', nl2br(check_plain($e->getMessage())) . ' in ocrapp_settings', NULL, WATCHDOG_ERROR);\n } \n return system_settings_form($form);\n}", "title": "" }, { "docid": "6d96f7cb25a61c54b1d8ebb6da99864a", "score": "0.58186597", "text": "function resmap_admin()\n{\n // The value of the api key from database (we want to show it in the api key text field)\n $db_apikey = get_option('resmap_apikey');\n\n // The map shortcode previously saved in the database, if any\n $shortcode = get_option('resmap_shortcode', '');\n\n?>\n\n <div class=\"wrap\">\n\n <h2><?php echo esc_html__('Responsive Styled Google Maps - Helper ', 'res_map') ?>\n (<a href=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/documentation/index.html\" target=\"_blank\"><?php echo esc_html__('view documentation', 'res_map') ?> </a>)\n </h2>\n\n <?php\n if (isset($_POST['save-shortcode'])) {\n _e('<div class=\"notice notice-success is-dismissible\"><p>All settings were successfully saved.</p></div>');\n }\n ?>\n\n <br>\n <!-- Beginning of the Responsive Styled Gooogle Maps helper form -->\n <form method=\"POST\" action=\"\" id=\"resmap-form\">\n\n <input type=\"hidden\" id=\"resmap_admin\" value=\"<?php echo esc_attr(plugins_url()); ?>\">\n\n <script type=\"text/javascript\">\n var pluginurl = \"<?php echo plugins_url(); ?>\";\n var shortcode = \"<?php echo esc_js($shortcode); ?>\";\n </script>\n\n <!-- The modal / dialog box -->\n <div id=\"resmap-dialog\" class=\"hidden\" style=\"max-width:800px;\">\n <textarea name=\"loaded-shortcode\" id=\"loaded-shortcode\" rows=\"18\" cols=\"80\" type=\"textarea\"></textarea>\n <br><br>\n </div>\n <!-- Table structure containing shortcode parameters -->\n <table border=\"0\" cellpadding=\"5\" id=\"resmap-table\">\n\n <!-- Warning about Google Maps API key -->\n <tr>\n <td align=\"left\" valign=\"top\">\n </td>\n <td>\n <span class=\"highlight info\">\n <?php\n $url = 'https://developers.google.com/maps/documentation/javascript/get-api-key';\n echo sprintf(wp_kses(__('For maps created after June 22, 2016, Google requires the mandatory use of an API key, get one from <a href=\"%s\" target=\"_blank\">HERE</a>', 'res_map'), array( 'a' => array( 'href' => array() ) )), esc_url($url));\n ?>\n </span>\n </td>\n <td rowspan=\"19\" valign=\"top\" valign=\"top\" width=\"600px\">\n <div id=\"responsive_map\" class=\"responsive-map\" style=\"height:500px;width:600px;\"></div><br>\n <!-- Buttons -->\n <a href=\"#\" class=\"button button-primary button-resmap load-shortcode\"><?php echo esc_html__('LOAD A SHORTCODE', 'res_map') ?></a>\n <a href=\"javascript: resmap_updateMap(pluginurl);\" class=\"button button-primary button-resmap\"><?php echo esc_html__('RELOAD THE MAP', 'res_map') ?></a>\n <input type=\"hidden\" value=\"\" id=\"save-shortcode\" name=\"save-shortcode\">\n <input type=\"submit\" class=\"button button-primary button-resmap\" value=\"<?php echo esc_attr('SAVE SETTINGS', 'res_map'); ?>\"> </input>\n <a href=\"javascript: resmap_resetSettings(true);\" class=\"button button-primary button-resmap\"><?php echo esc_html__('RESET SETTINGS', 'res_map') ?></a>\n <br><div class=\"preheader\"><?php echo esc_html__('COPY-PASTE IN YOUR POST / PAGE / WIDGET THIS SHORTCODE:', 'res_map') ?></div>\n <textarea name=\"resmap-shortcode\" id=\"resmap-shortcode\" rows=\"18\" type=\"textarea\" readonly=\"readonly\" onclick=\"this.focus();this.select();\">\n </textarea>\n <hr>\n </td>\n </tr> \n\n <!-- Google Maps API key -->\n <tr>\n <td align=\"left\" valign=\"top\">\n <span class=\"highlight\">\n <?php echo esc_html__('API key', 'res_map') ?>\n </span>\n </td>\n <td>\n <input type=\"text\" size=\"43\" name=\"resmap_apikey\" id=\"resmap_apikey\" value=\"<?php echo esc_attr($db_apikey); ?>\" />\n <input type=\"submit\" class=\"button button-primary\" value=\"<?php esc_attr_e('Save key and reload the map', 'res_map'); ?>\" />\n </td>\n </tr> \n\n <!-- Address, the map and the shortcode -->\n <tr>\n <td align=\"left\" valign=\"top\"><?php echo esc_html__('Address', 'res_map') ?></td>\n <td valign=\"top\">\n <textarea name=\"address\" id=\"address\" rows=\"3\" type='textarea' onblur=\"resmap_updateMap(pluginurl)\">Yeronga QLD 4104, Australia</textarea><br>\n <span class=\"info\"><?php echo esc_html__('For multiple markers use: address1 | address2 | address3 OR lat1,long1 | lat2,long2 | lat3,long3', 'res_map') ?></span>\n </td>\n </tr>\n\n <!-- Marker Description -->\n <tr>\n <td align=\"left\" valign=\"top\"><?php echo esc_html__('Description', 'res_map') ?></td>\n <td valign=\"top\">\n <textarea name=\"description\" id=\"description\" rows=\"3\" type='textarea' onblur=\"resmap_updateMap(pluginurl)\"><img src='<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/img/company.png'> {br} Yeronga QLD 4104, Australia {br} Phone: 0040 752 235 756</textarea><br>\n <span class=\"info\"><?php echo esc_html__('For multiple markers use: description1 | description2 | description3 and {br} for a new line', 'res_map') ?></span>\n </td>\n\n </tr>\n\n <!-- Directions text -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Directions text', 'res_map') ?></td>\n <td>\n <input type=\"text\" size=\"28\" name=\"directionstext\" id=\"directionstext\" value=\"(directions to our address)\" onblur=\"resmap_updateMap(pluginurl)\" />\n <span class=\"info\"><?php echo esc_html__('Optional, the text to put as directions text in the popup.', 'res_map') ?> </span>\n </td>\n </tr> \n \n <!-- Marker icons -->\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"bottom\"><?php echo esc_html__('Icon (predefined)', 'res_map') ?></td>\n <td valign=\"bottom\">\n <label><input name=\"icon\" type=\"radio\" value=\"black\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/black.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"blue\" onclick=\"resmap_updateMap(pluginurl)\" checked /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/blue.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"gray\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/gray.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"green\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/green.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"magenta\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/magenta.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"orange\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/orange.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"purple\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/purple.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"red\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/red.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"white\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/white.png\"> </label>\n <label><input name=\"icon\" type=\"radio\" value=\"yellow\" onclick=\"resmap_updateMap(pluginurl)\" /> <img src=\"<?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/yellow.png\"> </label>\n </td>\n </tr>\n \n <!-- Marker icon url -->\n <tr>\n <tr>\n <td scope=\"row\" align=\"left\" valign=\"top\">\n <?php echo esc_html__('or a http link to', 'res_map') ?>\n <br>\n <?php echo esc_html__('a custom icon:', 'res_map') ?>\n </td>\n <td valign=\"top\">\n <label><input name=\"icon\" id=\"icon\" type=\"radio\" value=\"custom\" onclick=\"resmap_updateMap(pluginurl)\" /></label>\n <textarea name=\"iconurl\" id=\"iconurl\" rows=\"2\" type='textarea' onblur=\"resmap_updateMap(pluginurl)\"><?php echo plugins_url(); ?>/responsive-maps-plugin/includes/icons/pin.png</textarea>\n <br>\n <span class=\"info\"><?php echo esc_html__('For multiple markers use: http://website/icon1.png | http://website/icon2.png', 'res_map') ?></span>\n </td>\n </tr>\n\n <!-- Marker icon size -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Icon size', 'res_map') ?></td>\n <td>\n <input type=\"text\" size=\"11\" name=\"iconsize\" id=\"iconsize\" value=\"\" onblur=\"resmap_updateMap(pluginurl)\" />\n <span class=\"info\"><?php echo esc_html__('For example: 26, 35 (means 26px width, 35px height; if empty, means automatic size)', 'res_map') ?> </span>\n </td>\n </tr> \n\n <!-- Style -->\n <tr>\n <td align=\"left\"><strong><?php echo esc_html__('Map style', 'res_map') ?></strong></td>\n <td>\n <select name='style' id=\"style\" onchange=\"resmap_showHideColorPicker();resmap_updateMap(pluginurl)\">\n <option value='0'><?php echo esc_html__('select color', 'res_map') ?></option>\n <option value='1'>style 1</option>\n <option value='2' selected>style 2</option>\n <option value='3'>style 3</option>\n <option value='4'>style 4</option>\n <option value='5'>style 5</option>\n <option value='6'>style 6</option>\n <option value='7'>style 7</option>\n <option value='8'>style 8</option>\n <option value='9'>style 9</option>\n <option value='10'>style 10</option>\n <option value='11'>style 11</option>\n <option value='12'>style 12</option>\n <option value='13'>style 13</option>\n <option value='14'>style 14</option>\n <option value='15'>style 15</option>\n <option value='16'>style 16</option>\n <option value='17'>style 17</option>\n <option value='18'>style 18</option>\n <option value='19'>style 19</option>\n <option value='20'>style 20</option>\n <option value='21'>style 21</option>\n <option value='22'>style 22</option>\n <option value='23'>style 23</option>\n <option value='24'>style 24</option>\n <option value='25'>style 25</option>\n <option value='26'>style 26</option>\n <option value='27'>style 27</option>\n <option value='28'>style 28</option>\n <option value='29'>style 29</option>\n <option value='30'>style 30</option>\n <option value='31'>style 31</option>\n <option value='32'>style 32</option>\n <option value='33'>style 33</option>\n <option value='34'>style 34</option>\n <option value='35'>style 35</option>\n <option value='36'>style 36</option>\n <option value='37'>style 37</option>\n <option value='38'>style 38</option>\n <option value='39'>style 39</option>\n <option value='40'>style 40</option>\n <option value='41'>style 41</option>\n <option value='42'>style 42</option>\n <option value='43'>style 43</option>\n <option value='44'>style 44</option>\n <option value='45'>style 45</option>\n <option value='46'>style 46</option>\n <option value='47'>style 47</option>\n <option value='48'>style 48</option>\n <option value='49'>style 49</option>\n <option value='50'>style 50</option>\n </select>\n <!-- Color picker -->\n <input type=\"text\" id=\"mapcolor\" name=\"mapcolor\" value=\"#2EA2CC\" data-text=\"<?php echo esc_html__('select a color...', 'res_map') ?>\"/>\n <span class=\"info\" id=\"colorinfo\"><?php echo esc_html__('Choose from 50 custom styles or a specific color.', 'res_map') ?></span>\n <input type=\"hidden\" name =\"newcolor\" id=\"newcolor\" value=\"#2EA2CC\"/>\n </td>\n </tr>\n \n <!-- Controls -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Controls', 'res_map') ?></td>\n <td>\n <?php echo esc_html__('Scale control', 'res_map') ?>\n <select name='scalecontrol' id='scalecontrol' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Type control', 'res_map') ?>\n <select name='typecontrol' id='typecontrol' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Street control', 'res_map') ?>\n <select name='streetcontrol' id='streetcontrol' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Locate me', 'res_map') ?>\n <select name='locateme' id='locateme' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n </td>\n </tr>\n\n <!-- Second line with map controls -->\n <tr>\n <td align=\"left\"></td>\n <td>\n <?php echo esc_html__('Zoom level', 'res_map') ?> &nbsp;\n <select name=\"zoom\" id=\"zoom\" onchange=\"resmap_updateMap(pluginurl)\">\n <option value='1'>1</option>\n <option value='2'>2</option>\n <option value='3'>3</option>\n <option value='4'>4</option>\n <option value='5'>5</option>\n <option value='6'>6</option>\n <option value='7'>7</option>\n <option value='8'>8</option>\n <option value='9'>9</option>\n <option value='10'>10</option>\n <option value='11'>11</option>\n <option value='12'>12</option>\n <option value='13' selected>13</option>\n <option value='14'>14</option>\n <option value='15'>15</option>\n <option value='16'>16</option>\n <option value='17'>17</option>\n <option value='18'>18</option>\n <option value='19'>19</option>\n </select>\n <?php echo esc_html__('Zoom control', 'res_map') ?>\n <select name='zoomcontrol' id='zoomcontrol' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Draggable map', 'res_map') ?>\n <select name='draggable' id='draggable' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no'><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes' selected><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Scroll wheel', 'res_map') ?>\n <select name='scrollwheel' id='scrollwheel' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n </td>\n </tr>\n\n <!-- Third line with map controls -->\n <tr>\n <td align=\"left\"></td>\n <td>\n <?php echo esc_html__('Search box', 'res_map') ?> &nbsp;\n <select name=\"searchbox\" id=\"searchbox\" onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Clustering', 'res_map') ?>\n <select name='clustering' id='clustering' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Logging', 'res_map') ?>\n <select name='logging' id='logging' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Points of interest', 'res_map') ?>\n <select name='poi' id='poi' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no'><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes' selected><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n </td>\n </tr>\n <!-- Fourth line with map controls -->\n <tr>\n <td align=\"left\"></td>\n <td>\n <?php echo esc_html__('Fullscreen', 'res_map') ?> &nbsp;\n <select name=\"fullscreen\" id=\"fullscreen\" onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Popup', 'res_map') ?> &nbsp;\n <select name='popup' id=\"popup\" onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <?php echo esc_html__('Tab fix', 'res_map') ?> &nbsp;\n <select name='tabfix' id=\"tabfix\" onchange=\"resmap_updateMap(pluginurl)\">\n <option value='no' selected><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes'><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <span class=\"info\"><?php echo esc_html__('Select yes if the map is displayed in tabs', 'res_map') ?></span>\n </td>\n </tr>\n \n <!-- Width -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Map width', 'res_map') ?></td>\n <td>\n <input type=\"text\" size=\"6\" name=\"width\" id=\"width\" value=\"100\" onblur=\"resmap_updateMap(pluginurl)\"/>\n <select name='widthm' id='widthm' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='%' selected>%</option>\n <option value='px'>px</option>\n </select>\n <span class=\"info\"><?php echo esc_html__('100% for a responsive map (the map preview has fixed width and height).', 'res_map') ?></span>\n </td>\n </tr>\n\n <!-- Height -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Map height', 'res_map') ?></td>\n <td>\n <input type=\"text\" size=\"6\" name=\"height\" id=\"height\" value=\"500\" onblur=\"resmap_updateMap(pluginurl)\"/>\n <select name='heightm' id='heightm' onchange=\"resmap_updateMap(pluginurl)\">\n <option value='%'>%</option>\n <option value='px' selected>px</option>\n </select>\n <span class=\"info\"><?php echo esc_html__('In px or % (the map preview has fixed width and height).', 'res_map') ?></span>\n </td>\n </tr>\n \n <!-- Map Type -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Map type', 'res_map') ?></td>\n <td>\n <select name='maptype' id=\"maptype\" onchange=\"resmap_updateMap(pluginurl)\">\n <option value='roadmap' selected><?php echo esc_html__('roadmap') ?></option>\n <option value='satellite'><?php echo esc_html__('satellite') ?></option>\n <option value='terrain'><?php echo esc_html__('terrain') ?></option>\n <option value='hybrid'><?php echo esc_html__('hybrid') ?></option>\n </select>\n <span class=\"info\"><?php echo esc_html__('Possible values: roadmap, satellite, terrain or hybrid', 'res_map') ?></span>\n </td>\n </tr>\n\n <!-- Map refresh (when window is scaled) -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Refresh', 'res_map') ?></td>\n <td>\n <select name='refresh' id='refresh' onchange=\"resmap_updateMap(pluginurl)\">>\n <option value='no'><?php echo esc_html__('no', 'res_map') ?></option>\n <option value='yes' selected><?php echo esc_html__('yes', 'res_map') ?></option>\n </select>\n <span class=\"info\"> <?php echo esc_html__('\"yes\" if the map should be refreshed (re-centered) when the window is scaled. ', 'res_map') ?></span>\n </td>\n </tr>\n\n <!-- Map center -->\n <tr>\n <td align=\"left\"><?php echo esc_html__('Center to', 'res_map') ?></td>\n <td>\n <input type=\"text\" size=\"28\" name=\"center\" id=\"center\" value=\"\" onblur=\"resmap_updateMap(pluginurl);\"/>\n <span class=\"info\"><?php echo esc_html__('Optional: latitude, longitude i.e. 38.980288, 22.145996', 'res_map') ?></span>\n </td>\n </tr>\n \n </table>\n </form>\n </div>\n<?php\n}", "title": "" }, { "docid": "af677b508bb7b76735ce37f0faa2ffa9", "score": "0.57912886", "text": "function applyToFormSettings(& $formSettings) {\n }", "title": "" }, { "docid": "af677b508bb7b76735ce37f0faa2ffa9", "score": "0.57912886", "text": "function applyToFormSettings(& $formSettings) {\n }", "title": "" }, { "docid": "d4bb9a0e9b0951fda590ed7880890009", "score": "0.5789722", "text": "public function settings( &$form )\n\t{\n\t\t$settings = json_decode( $this->settings, TRUE );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'stripe_secret_key', $settings ? $settings['secret_key'] : NULL, TRUE ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\Text( 'stripe_publishable_key', $settings ? $settings['publishable_key'] : NULL, TRUE ) );\n\t\t$form->add( new \\IPS\\Helpers\\Form\\YesNo( 'stripe_cards', $settings ? $settings['cards'] : TRUE, TRUE ) );\n\t}", "title": "" }, { "docid": "4e35a728c75f18a2a40fa8a9973caab7", "score": "0.57875496", "text": "public function eagsg_settings_page()\n {\n (!$this->settings) ? $settings = $this->settings_fields() : $settings = $this->settings;\n foreach ($settings as $page) {\n if ($page['slug'] == 'eagsg') {\n add_thickbox();\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"plugin_settings\">' . \"\\n\";\n $html .= '\n <div style=\"display:none;\" id=\"attribute_matcher\">\n <form id=\"attribute_matching_form\" method=\"post\">\n <br/>\n <input name=\"submit_attribute_matching_form\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Set Mapping', 'plugin_textdomain')) . '\" />\n </form>\n </p></div>' . \"\\n\";\n $html .= '<div title=\"\" id=\"map_attributes\"><span id=\"map_att_description\"><a title=\"Mapping your HTML TAG attributes to your shortcode attributes.\" href=\"#TB_inline?width=600&height=550&inlineId=attribute_matcher\" class=\"thickbox\">Map HTML TAG attributes to your shortcode attributes.</span><span class=\"dashicons dashicons-location-alt\"></span></a></div>' . \"\\n\";\n $html .= '<div id=\"agsg_' . $page['slug'] . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __($page['title'], 'plugin_textdomain') . '</h2>' . \"\\n\";\n// $html .= '<div>' . __($page['sections']['html-enclose']['description'], 'plugin_textdomain') . '</div>' . \"\\n\";\n $html .= '<form id=\"agsg_' . $page['slug'] . '_form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n $html .= $this->display_hidden_fields();\n\n // Setup navigation\n // $html .= '<ul id=\"settings-sections\" class=\"subsubsub hide-if-no-js\">' . \"\\n\";\n // $html .= '<li><a class=\"tab all current\" href=\"#all\">' . __('All', 'plugin_textdomain') . '</a></li>' . \"\\n\";\n // foreach ($page['sections'] as $section => $data) {\n // $html .= '<li>| <a class=\"tab\" id=\"' . $section . '_tab\" href=\"#' . $section . '\">' . $data['title'] . '</a></li>' . \"\\n\";\n // }\n\n $html .= '</ul>' . \"\\n\";\n\n $html .= '<div class=\"clear\"></div>' . \"\\n\";\n // Get settings fields\n ob_start();\n ?>\n <div id=\"<?php echo $page['slug'] . '_container' ?>\" class=\"settings_section_container\">\n <?php\n settings_fields($page['slug']);\n do_settings_sections($page['slug']);\n // wp_editor('', 'test', $settings = array());\n ?>\n </div>\n <?php\n\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= $this->get_submit_button();\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '<div id=\"agsg_shortcode_preview\"></div>';\n $html .= '</div>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }\n }\n }", "title": "" }, { "docid": "f373057af2a82bd3d4baf59ef6209ee7", "score": "0.5781364", "text": "public function form_option_setting_meta_box($post){\t\r\n $smt_form_fields=$this->formModel->getFormFields($post->ID);\r\n\t $smt_mail_options=$this->formModel->getMailOptions($post->ID);\r\n\t $smt_google_captha_setting=$this->formModel->getGoogleCapthaSetting($post->ID);\r\n\t \r\n\t $this->loadview(\"admin/metabox/form-settings\",array(\"smt_mail_options\"=>$smt_mail_options,\"smt_form_fields\"=>$smt_form_fields,\"smt_google_captha_setting\"=>$smt_google_captha_setting));\r\n }", "title": "" }, { "docid": "3f43505c892e0be7a54c8eb2138a2814", "score": "0.57724416", "text": "function wpgmp_show_location_in_map($atts, $content=null){\n ob_start();\n global $wpdb;\n\t\n extract( shortcode_atts( array(\n\t\t'zoom' => get_option('wpgmp_zoomlevel'),\n\t\t'width' => get_option('wpgmp_mapwidth'),\n\t\t'height' => get_option('wpgmp_mapheight'),\n\t\t'title' => 'WP Google Map Pro',\n\t\t'class' => 'map',\n\t\t'center_latitude' => get_option('wpgmp_centerlatitude'),\n\t\t'center_longitude' => get_option('wpgmp_centerlongitude'),\n\t\t'container_id' => 'map',\n\t\t'polygon' => 'true',\n\t\t'id' => '',\n\t\t'filters'=>''\n ),$atts));\n \n\n\n //prepare filter options\n if(!empty($filters)) \n {\n if(isset($filters))\n {\n \t$temp_opt= explode(\",\",$filters);\n \tif(is_array($temp_opt))\n \t{\n \t\tforeach($temp_opt as $key=>$option)\n \t\t{\n \t\t\t\t$field_value = explode(\"=\",$option);\n \t\t\t\t$filter_options[$field_value[0]]=$field_value[1];\n \t\t}\n \t}\t\n }\n }\n\t\n if(!empty($atts['icon']))\n { \n $icon=$atts['icon'];\n }\n\n include_once dirname(__FILE__).'/class-google-map.php';\n $map = new Wpgmp_Google_Map();\n if(!empty($filter_options))\n { \n $map->filter_options=$filter_options; \n }\n if(!empty($filters))\n { \n $map->filters=$filters;\n } \n $map_data = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM \".$wpdb->prefix.\"create_map where map_id=%d\",$atts['id']));\n \n $map->map_id=$atts['id'];\n \n if( !empty($map_data[0]->group_map_setting) )\n { \n $unserialize_group_map_setting \t= unserialize($map_data[0]->group_map_setting);\n }\n if( !empty($map_data[0]->map_street_view_setting) )\n {\n $unserialize_map_street_view_setting \t= unserialize($map_data[0]->map_street_view_setting);\n }\n if( !empty($map_data[0]->map_route_direction_setting) )\n {\n $unserialize_map_route_direction_setting \t= unserialize($map_data[0]->map_route_direction_setting);\n }\n if( !empty($map_data[0]->map_all_control) )\n {\n $unserialize_map_control_setting \t= unserialize($map_data[0]->map_all_control);\n }\n if( !empty($map_data[0]->map_info_window_setting) )\n {\n $unserialize_map_info_window_setting = unserialize($map_data[0]->map_info_window_setting);\n }\n if( !empty($map_data[0]->map_layer_setting) )\n {\n $unserialize_map_layer_setting \t= unserialize($map_data[0]->map_layer_setting);\n }\n if( !empty($map_data[0]->style_google_map) )\n {\n $unserialize_google_map_style \t= unserialize($map_data[0]->style_google_map);\n }\n if( !empty($map_data[0]->map_polygon_setting) )\n {\n $unserialize_map_polygon_setting = unserialize($map_data[0]->map_polygon_setting);\n }\n if( !empty($map_data[0]->map_polyline_setting) )\n {\n $unserialize_map_polyline_setting = unserialize($map_data[0]->map_polyline_setting);\n }\n if( !empty($map_data[0]->map_cluster_setting) )\n {\n $unserialize_map_cluster_setting = unserialize($map_data[0]->map_cluster_setting);\n }\n if( !empty($map_data[0]->map_overlay_setting) )\n {\n $unserialize_map_overlay_setting \t= unserialize($map_data[0]->map_overlay_setting);\n }\n\n if( !empty($map_data) ) {\n\t \n $un_loc_add = unserialize($map_data[0]->map_locations);\n \n $loc_data = $wpdb->get_row($wpdb->prepare(\"SELECT location_address,location_latitude,location_longitude FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$un_loc_add[0]));\n \n if( !empty($unserialize_map_control_setting['nearest_location']) )\n {\n $map->set_nearest_location = $unserialize_map_control_setting['nearest_location'];\n }\n\n if($unserialize_map_control_setting['map_center_latitude']){\n\t$map->center_lat = $unserialize_map_control_setting['map_center_latitude'];\n } elseif( !empty($center_latitude) ) {\n\t$map->center_lat = $center_latitude;\n } else {\n\t$map->center_lat = $loc_data->location_latitude;\n }\n \n if($unserialize_map_control_setting['map_center_longitude']){\n\t $map->center_lng = $unserialize_map_control_setting['map_center_longitude'];\n } elseif( !empty($center_longitude) ) {\n\t $map->center_lng = $center_longitude;\n } else {\n\t$map->center_lng = $loc_data->location_longitude;\n }\n \n if(!empty($map_data[0]->map_languages))\n { \n $map->map_language=$map_data[0]->map_languages;\n }\n\n if( !empty($unserialize_group_map_setting['enable_group_map']) && $unserialize_group_map_setting['enable_group_map']=='true' ) {\n\t \n \t$map->enable_group_map = $unserialize_group_map_setting['enable_group_map'];\n \t$select_group_map = $unserialize_group_map_setting['select_group_map'];\n \tforeach($select_group_map as $key => $select_group) {\n \t\t\t$group_data = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \".$wpdb->prefix.\"group_map where group_map_id=%d\",$select_group));\n \t\t\t$map->group_data[] = $group_data;\n \t}\n }\n \n if( !empty($unserialize_map_street_view_setting['street_control']) ) {\n\t \n\t$map->street_control = $unserialize_map_street_view_setting['street_control'];\n\t$map->street_view_close_button = $unserialize_map_street_view_setting['street_view_close_button'];\n\t$map->links_control = $unserialize_map_street_view_setting['links_control'];\n\t$map->street_view_pan_control = $unserialize_map_street_view_setting['street_view_pan_control']; \n }\n \nif( $unserialize_map_route_direction_setting['route_direction'] =='true' ) {\n\t \n $map->route_direction = $unserialize_map_route_direction_setting['route_direction'];\n\n $wpgmp_routes = $unserialize_map_route_direction_setting['specific_routes'];\n \n if( !empty($wpgmp_routes) )\n { \n \tforeach($wpgmp_routes as $key => $wpgmp_route) \n {\n $wpgmp_route_data = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \".$wpdb->prefix.\"map_routes where route_id=%d\",$wpgmp_route));\n \n \t$wpgmp_route_way_points = unserialize($wpgmp_route_data->route_way_points);\n\n $wpgmp_start_point = $wpdb->get_row($wpdb->prepare(\"SELECT location_address FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$wpgmp_route_data->route_start_location));\n $wpgmp_end_point = $wpdb->get_row($wpdb->prepare(\"SELECT location_address FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$wpgmp_route_data->route_end_location));\n \n if( !empty($wpgmp_route_way_points) ) \n {\n foreach( $wpgmp_route_way_points as $rkey => $wpgmp_route_way_point) \n {\n $wpgmp_way_points = $wpdb->get_row($wpdb->prepare(\"SELECT location_address FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$wpgmp_route_way_point));\n $route_way_points[$rkey] = $wpgmp_way_points->location_address;\n }\n } \n\n $wpgmp_multiple_routes[$wpgmp_route] = array(\n\t\t'route_title' => $wpgmp_route_data->route_title,\n 'start_point' => $wpgmp_start_point->location_address,\n 'end_point' => $wpgmp_end_point->location_address,\n 'way_points' => $route_way_points,\n 'stroke_color' => $wpgmp_route_data->route_stroke_color,\n 'stroke_opacity' => $wpgmp_route_data->route_stroke_opacity,\n 'stroke_weight' => $wpgmp_route_data->route_stroke_weight,\n 'travel_mode' => $wpgmp_route_data->route_travel_mode,\n 'unit_system' => $wpgmp_route_data->route_unit_system,\n 'draggable' => $wpgmp_route_data->route_marker_draggable,\n 'custom_marker' => $wpgmp_route_data->route_custom_marker,\n 'optimize_waypoints' => $wpgmp_route_data->route_optimize_waypoints\n );\n \n $map->wpgmp_multiple_routes = $wpgmp_multiple_routes; \n \n } \n\t}\n}\n \n if(!empty($map_data[0]->map_type))\n { \n $map->map_type=$map_data[0]->map_type;\n }\n\n if( $map_data[0]->map_45imagery=='45' && ($map_data[0]->map_type=='SATELLITE' || $map_data[0]->map_type=='HYBRID') )\n {\n\t $map->map_45=$map_data[0]->map_45imagery;\n }\n\t\n if( empty($map_data[0]->map_width) ) {\n\t $map->map_width = $width;\n } else {\n\t $map->map_width = $map_data[0]->map_width;\n }\t\n\t\n if( empty($map_data[0]->map_height) ) {\n\t $map->map_height = $height;\n } else {\n\t $map->map_height = $map_data[0]->map_height;\n }\n \n if(!empty($map_data[0]->map_scrolling_wheel))\n { \n $map->map_scrolling_wheel = $map_data[0]->map_scrolling_wheel;\n }\n if(!empty($unserialize_map_control_setting['map_draggable']))\n { \n $map->map_draggable = $unserialize_map_control_setting['map_draggable'];\n }\n if(!empty($unserialize_map_control_setting['infowindow_open']))\n { \n $map->map_infowindow_open = $unserialize_map_control_setting['infowindow_open'];\n }\n\n if(!empty($unserialize_map_control_setting['display_marker_category']) && $unserialize_map_control_setting['display_marker_category']=='true')\n {\n\t wpgmp_accordian_script();\n \t$map->display_marker_category = $unserialize_map_control_setting['display_marker_category'];\n \t$map->tabs_font_color = $unserialize_map_control_setting['tabs_font_color'];\n\t $map->category_font_color = $unserialize_map_control_setting['category_font_color'];\n\t $map->category_font_size = $unserialize_map_control_setting['category_font_size'];\n\t $map->location_font_color = $unserialize_map_control_setting['location_font_color'];\n\t $map->location_font_size = $unserialize_map_control_setting['location_font_size'];\n }\n \n $map->map_controls = $unserialize_map_control_setting;\n $map->map_pan_control =$unserialize_map_control_setting['pan_control'];\n $map->map_zoom_control =$unserialize_map_control_setting['zoom_control'];\n $map->map_type_control =$unserialize_map_control_setting['map_type_control'];\n $map->map_scale_control =$unserialize_map_control_setting['scale_control'];\n $map->map_street_view_control =$unserialize_map_control_setting['street_view_control'];\n $map->map_overview_control =$unserialize_map_control_setting['overview_map_control'];\n \n if( !empty($unserialize_map_info_window_setting['enable_info_window_setting']) && $unserialize_map_info_window_setting['enable_info_window_setting']==\"true\" ) {\n \n\t $map->map_enable_info_window_setting \t = $unserialize_map_info_window_setting['enable_info_window_setting'];\n\t $map->map_info_window_width \t\t\t = $unserialize_map_info_window_setting['info_window_width'];\n\t $map->map_info_window_height \t\t\t = $unserialize_map_info_window_setting['info_window_height'];\n\t $map->map_info_window_shadow_style \t = $unserialize_map_info_window_setting['info_window_shadow_style'];\n\t $map->map_info_window_border_radius \t = $unserialize_map_info_window_setting['info_window_border_radious'];\n\t $map->map_info_window_border_width \t = $unserialize_map_info_window_setting['info_window_border_width'];\n\t $map->map_info_window_border_color \t = $unserialize_map_info_window_setting['info_window_border_color'];\n\t $map->map_info_window_background_color = $unserialize_map_info_window_setting['info_window_background_color'];\n\t $map->map_info_window_arrow_size \t\t = $unserialize_map_info_window_setting['info_window_arrow_size'];\n\t $map->map_info_window_arrow_position = $unserialize_map_info_window_setting['info_window_arrow_position'];\n\t $map->map_info_window_arrow_style\t\t = $unserialize_map_info_window_setting['info_window_arrow_style'];\n }\n \n $map->map_style_google_map = unserialize($map_data[0]->style_google_map);\n $map->visualrefresh =$map_data[0]->map_visual_refresh;\n \n if(!empty($unserialize_map_layer_setting['choose_layer']))\n { \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->kml_layer = $unserialize_map_layer_setting['choose_layer']['kml_layer'];\n }\n else\n {\n \t $map->kml_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->fusion_layer = $unserialize_map_layer_setting['choose_layer']['fusion_layer'];\n }\n else\n {\n \t $map->fusion_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->traffic_layer = $unserialize_map_layer_setting['choose_layer']['traffic_layer'];\n }\n else\n {\n \t $map->traffic_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->transit_layer = $unserialize_map_layer_setting['choose_layer']['transit_layer'];\n }\n else\n {\n \t $map->transit_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->weather_layer = $unserialize_map_layer_setting['choose_layer']['weather_layer'];\n }\n else\n {\n \t $map->weather_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->bicycling_layer = $unserialize_map_layer_setting['choose_layer']['bicycling_layer'];\n }\n else\n {\n \t $map->bicycling_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(is_array($unserialize_map_layer_setting['choose_layer']))\n {\n \t $map->panoramio_layer = $unserialize_map_layer_setting['choose_layer']['panoramio_layer'];\n }\n else\n {\n \t $map->panoramio_layer = $unserialize_map_layer_setting['choose_layer'];\n }\n \n if(strpos($unserialize_map_layer_setting['map_links'],',') !== false)\n {\n \t $map->kml_layers_links = explode(',',$unserialize_map_layer_setting['map_links']);\n }\n else\n {\n \t $map->kml_layers_links = $unserialize_map_layer_setting['map_links'];\n }\n \n $map->fusion_select=$unserialize_map_layer_setting['fusion_select'];\n $map->fusion_from=$unserialize_map_layer_setting['fusion_from'];\n $map->heat_map=$unserialize_map_layer_setting['heat_map'];;\n $map->temperature_unit=$unserialize_map_layer_setting['temp'];\n $map->wind_speed_unit=$unserialize_map_layer_setting['wind'];\n } \n\n if( !empty($unserialize_map_control_setting['panning_control']) )\n { \n $map->map_panning_true =$unserialize_map_control_setting['panning_control'];\n } \n if( !empty($unserialize_map_control_setting['from_latitude']) )\n { \n $map->map_panning_from_latitude =$unserialize_map_control_setting['from_latitude'];\n }\n if( !empty($unserialize_map_control_setting['from_longitude']) )\n { \n $map->map_panning_from_longitude =$unserialize_map_control_setting['from_longitude'];\n }\n if( !empty($unserialize_map_control_setting['to_latitude']) )\n { \n $map->map_panning_to_latitude =$unserialize_map_control_setting['to_latitude'];\n }\n if( !empty($unserialize_map_control_setting['to_longitude']) )\n { \n $map->map_panning_to_longitude =$unserialize_map_control_setting['to_longitude'];\n }\n if( !empty($unserialize_map_control_setting['zoom_level']) )\n { \n $map->map_panning_zoom_level =$unserialize_map_control_setting['zoom_level'];\n }\n \n \n $map->map_drawing=array(\n\t\t'circle'=>$unserialize_map_control_setting['circle'],\n\t\t'polygon'=>$unserialize_map_control_setting['polygon'],\n\t\t'polyline'=>$unserialize_map_control_setting['polyline'],\n\t\t'rectangle'=>$unserialize_map_control_setting['rectangle'],\n\t\t'is_drawing'=>$unserialize_map_control_setting['drawing_control']\n\t);\n \n\n $map->map_shapes=$unserialize_map_polyline_setting;\n \n if(current_user_can( 'manage_options' ) && is_admin())\n {\n\t \n\t$map->editable=true;\n\t \n }\n \t\t\t\n if( empty($map_data[0]->map_zoom_level) ) {\n\t\t$map->zoom = $zoom;\n } else {\n\t\t$map->zoom = $map_data[0]->map_zoom_level;\n }\n \n if( !empty($unserialize_map_cluster_setting['marker_cluster']) && $unserialize_map_cluster_setting['marker_cluster']==\"true\" )\n {\n\t wpgmp_markercluster_script();\n\t $map->marker_cluster=$unserialize_map_cluster_setting['marker_cluster'];\n\t $map->grid=$unserialize_map_cluster_setting['grid'];\n\t $map->max_zoom=$unserialize_map_cluster_setting['max_zoom'];\n\t $map->style=$unserialize_map_cluster_setting['map_style'];\n }\n\n if( !empty($unserialize_map_overlay_setting['overlay']) && $unserialize_map_overlay_setting['overlay'] == 'true' )\n {\n\t $map->map_overlay=$unserialize_map_overlay_setting['overlay'];\n\t $map->map_overlay_border_color=$unserialize_map_overlay_setting['overlay_border_color'];\n\t $map->map_overlay_width=$unserialize_map_overlay_setting['overlay_width'];\n\t $map->map_overlay_height=$unserialize_map_overlay_setting['overlay_height'];\n\t $map->map_overlay_fontsize=$unserialize_map_overlay_setting['overlay_fontsize'];\n\t $map->map_overlay_border_width=$unserialize_map_overlay_setting['overlay_border_width'];\n\t $map->map_overlay_border_style=$unserialize_map_overlay_setting['overlay_border_style'];\n }\n }\n\nif( !empty($atts['id']) ) {\nglobal $wpdb,$post;\t\n$map_locations = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \".$wpdb->prefix.\"create_map where map_id=%d\",$atts['id']));\n\n$meta_data = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"postmeta WHERE meta_key='_wpgmp_map_id'\");\n \nif( !empty($map_locations->group_map_setting) ) \n{ \n $un_group_map_setting = unserialize($map_locations->group_map_setting);\n}\nif( !empty($map_locations->map_info_window_setting) ) \n{\n $un_info_window_setting = unserialize($map_locations->map_info_window_setting);\n}\nif( !empty($map_locations->map_polygon_setting) ) \n{\n $un_map_polygon_setting = unserialize($map_locations->map_polygon_setting);\n}\nif( !empty($map_locations->map_polyline_setting) ) \n{\n $un_map_polyline_setting = unserialize($map_locations->map_polyline_setting);\n}\nif( !empty($map_locations->map_cluster_setting) ) \n{\n $un_map_cluster_setting = unserialize($map_locations->map_cluster_setting);\n}\nif( !empty($map_locations->map_all_control) ) \n{\n $un_map_all_control = unserialize($map_locations->map_all_control);\n}\nif( !empty($un_info_window_setting['info_window']) ) \n{\n $un_info_window_setting['info_window']=true;\n}\n//$wpgmp_map_id = get_post_meta( $post->ID, '_wpgmp_map_id', true );\n \n\nif(!empty($meta_data))\n{ \n\tforeach($meta_data as $mdata)\n\t{ \n\t\t\n\t\t$s_maps = get_post_meta( $mdata->post_id, '_wpgmp_map_id', true );\n\t\t\n\t\t$map_ids = unserialize($s_maps);\n\t\t\n\t\tif(is_array($map_ids) and in_array($atts['id'],$map_ids))\n\t\t{\n\t\t\tglobal $wpdb;\n\t\t\t$wpgmp_location_address = get_post_meta( $mdata->post_id, '_wpgmp_location_address', true );\n\t\t\t$wpgmp_metabox_latitude = get_post_meta( $mdata->post_id, '_wpgmp_metabox_latitude', true );\n\t\t\t$wpgmp_metabox_longitude = get_post_meta( $mdata->post_id, '_wpgmp_metabox_longitude', true );\n\t\t\t$wpgmp_metabox_marker_id = get_post_meta( $mdata->post_id, '_wpgmp_metabox_marker_id', true );\n\t\t\t\n\t\t\tif( $filter_options['category']!='' and $filter_options['category'] != $wpgmp_metabox_marker_id )\n\t\t\tcontinue;\n\t\t\t\n\t\t\t\n\t\t\t$marker_detail = $wpdb->get_row(\"SELECT * FROM \".$wpdb->prefix.\"group_map WHERE group_map_id=\".$wpgmp_metabox_marker_id.\"\");\n\t\t\t\n\t\t\tglobal $post; \n\t\t\t$save_post = $post;\n\t\t\t\n\t\t\t$post = get_post($mdata->post_id);\n\t\t\tsetup_postdata( $post );\n\t\t\t$marker_image = $marker_detail->group_marker;\n\t\t\t$location_id = 2000+$post->ID;\n\t\t\t$content = '<strong><a href='.get_permalink($post->ID).' target=_blank>'.get_the_title($post->ID).'</a></strong><br />';\n\t\t\t$content .= get_the_excerpt();\n\t\t\t\n\t\t\t$content = apply_filters(\"wpgmp_geotags_content\",$content,$mdata->post_id,$atts[\"id\"]);\n\t\t\t\n\t\t\tif($wpgmp_metabox_latitude && $wpgmp_metabox_longitude) {\t\t\t\n\t\t\t\t$map->addMarker($location_id,$wpgmp_location_address,$wpgmp_metabox_latitude,$wpgmp_metabox_longitude,true,$post->post_title,$content,$marker_image,'',$dragg,$animation,$marker_detail->group_map_id,$marker_detail->group_map_title);\n\t\t\t}\n\t\t\twp_reset_postdata($save_post);\n \t}\n\t}\n} \n\nif( get_option('wpgmp_mashup')=='true' ) {\n\t\n $mashup_posts = new wp_query(array('meta_key' => 'wpgmp_mashup_map_id', 'meta_value' => $atts['id']));\n if($mashup_posts->have_posts()) {\n\t add_filter( 'excerpt_more', 'wpgmp_excerpt_more' );\n\t while($mashup_posts->have_posts()) : $mashup_posts->the_post();\n\t $mashup_content = get_the_mashup_content();\n\t $mashup_content = str_replace('\"',\"'\",$mashup_content);\n\t $loc_id = get_post_meta(get_the_ID(), 'wpgmp_mashup_location_id', true);\n\t $loc_list = $wpdb->get_row($wpdb->prepare('select location_latitude, location_longitude,location_marker_image from '.$wpdb->prefix.'map_locations where location_id=%d',$loc_id));\n\t\n\t if( empty($loc_list->location_marker_image) ) {\n\t\t\n\t\t$loc_mashup_image_src = get_option('wpgmp_default_marker');\n\t } else {\n\t\t$loc_mashup_image_src = $loc_list->location_marker_image;\n\t }\t\t\n\t\t$map->addMarker($loc_list->location_latitude,$loc_list->location_longitude,'true',get_the_title(),$mashup_content,$loc_mashup_image_src,'',$dragg,$animation);\n\t\tendwhile;\n }\n} \nelseif( !empty($un_map_polygon_setting['draw_polygon']) && $un_map_polygon_setting['draw_polygon']=='true' ) {\n\t\n\t$map_locs = unserialize($map_locations->map_locations);\n\tif($map_locs!='') {\n\t foreach($map_locs as $map_loc) {\n\t\t$lat_lat = $wpdb->get_row($wpdb->prepare(\"SELECT location_latitude,location_longitude FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$map_loc));\n\t\t$latitude = $lat_lat->location_latitude;\n\t\t$longitude = $lat_lat->location_longitude;\n\t\t$map->addPolygon($latitude,$longitude);\n\t }\n }\t\n} \nelseif( !empty($un_map_polygon_setting['draw_polyline']) && $un_map_polyline_setting['draw_polyline']=='true' ) {\n\t\n\t$map_locs = unserialize($map_locations->map_locations);\n\tif($map_locs!='') {\n\t foreach($map_locs as $map_loc) {\n\t\t$lat_lat = $wpdb->get_row($wpdb->prepare(\"SELECT location_latitude,location_longitude FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$map_loc));\n\t\t$latitude = $lat_lat->location_latitude;\n\t\t$longitude = $lat_lat->location_longitude;\n\t\t$map->addpolyline($latitude,$longitude);\n\t }\n }\t \n} \nelse {\n\n $map_address = unserialize($map_locations->map_locations);\n\t\n\tif( $map_address!='' ) {\n\t\t$address[] = array();\n\t\t\n foreach($map_address as $map_ad) {\n \t\n\t$map_locations_records = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \".$wpdb->prefix.\"map_locations where location_id=%d\",$map_ad));\n \n if(!empty($filter_options['category']) && $filter_options['category']!=$map_locations_records->location_group_map)\n continue;\n \n\t$group_marker = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \".$wpdb->prefix.\"group_map where group_map_id=%d\",$map_locations_records->location_group_map));\n\t\n\t$wpgm_marker = get_option('wpgmp_default_marker');\n\t\n\t$unmess_info_message = unserialize(base64_decode($map_locations_records->location_messages));\n\t\n\t$cat_marker_img = '';\n\t\n\t$location_id = $map_locations_records->location_id;\n $location_address = $map_locations_records->location_address;\n\t$latitude = $map_locations_records->location_latitude;\n\t$longitude = $map_locations_records->location_longitude;\n\t$title = $map_locations_records->location_title;\n\t$dragg = $map_locations_records->location_draggable;\n $animation = \"\";\n\t$infowindow_setting=unserialize($map_locations_records->location_settings);\n $cat_id = $group_marker->group_map_id;\n $cat_title = $group_marker->group_map_title;\n $cat_marker_img = $group_marker->group_marker;\n\t\n\t\n\tif($infowindow_setting['hide_infowindow']=='false')\n\t{\n\t$clickable = false;\n\t}\t\n\telse\n\t$clickable = true;\n\t\n\n if( !empty($unmess_info_message['googlemap_infowindow_title_one']) )\n { \n\t $address['first']['title'] = $unmess_info_message['googlemap_infowindow_title_one'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_message_one']) )\n {\n $address['first']['message'] \t= $unmess_info_message['googlemap_infowindow_message_one'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_title_two']) )\n {\n $address['second']['title'] \t= $unmess_info_message['googlemap_infowindow_title_two'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_message_two']) )\n {\n $address['second']['message'] = $unmess_info_message['googlemap_infowindow_message_two'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_title_three']) )\n {\n $address['third']['title'] \t\t= $unmess_info_message['googlemap_infowindow_title_three'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_message_three']) )\n {\n $address['third']['message'] \t= $unmess_info_message['googlemap_infowindow_message_three'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_title_four']) )\n {\n $address['fourth']['title'] \t= $unmess_info_message['googlemap_infowindow_title_four'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_message_four']) )\n {\n $address['fourth']['message'] = $unmess_info_message['googlemap_infowindow_message_four'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_title_five']) )\n {\n $address['fifth']['title'] \t\t= $unmess_info_message['googlemap_infowindow_title_five'];\n\t}\n if( !empty($unmess_info_message['googlemap_infowindow_message_five']) )\n {\n $address['fifth']['message'] \t= $unmess_info_message['googlemap_infowindow_message_five'];\n\t}\n\n $address = array_filter($address);\n\t\n\tif( $un_map_cluster_setting['marker_cluster']=='true' ){\n\t\t\n\t\t$map->addMarker($location_id,$location_address,$latitude,$longitude,$clickable,$title,$address,$cat_marker_img,'',$dragg,$animation,$cat_id,$cat_title);\n\t} else {\n\t\t\n\t\tif( !empty($address['first']['title']) || !empty($address['first']['message']) || !empty($address['second']['title']) || !empty($address['second']['message']) || !empty($address['third']['title']) || !empty($address['third']['message']) || !empty($address['fourth']['title']) || !empty($address['fourth']['title']) || !empty($address['fifth']['title']) || !empty($address['fifth']['message']) ) {\n\t\t\t\n\t\t\t$map->addMarker($location_id,$location_address,$latitude,$longitude,$clickable,$title,$address,$cat_marker_img,'',$dragg,$animation,$cat_id,$cat_title);\n\t\t\n } else {\n\t\t\t\n\t\t\twp_print_scripts( 'wpgmp_map' );\n\t\t\t\n\t\t\t$new_loc_adds = array();\n\t\t\t\n\t\t\t$new_loc_adds = $map_locations_records->location_address;\n\t\t\t\n\t\t\t$map->addMarker($location_id,$location_address,$latitude,$longitude,$clickable,$title,$new_loc_adds,$cat_marker_img,'',$dragg,$animation,$cat_id,$cat_title);\n\t\t\t\t\n\t }\n\t}\n }\n }\n }\n} elseif( $content ) {\n\twp_print_scripts( 'wpgmp_map' );\n\tif( empty($zoom) || empty($width) || empty($height) || empty($title) ) {\n\t\t$map->zoom = 14;\n\t\t$map->width = '600';\n\t\t$map->height = '400';\n\t\t$map->title = 'WP Google Map Pro';\n\t} else {\n\t\t$map->zoom = $zoom;\n\t\t$map->width = $width;\n\t\t$map->height = $height;\n\t\t$map->title = $title;\n\t}\n\t\n\t$address = '';\n\t$coordinates = wpgmp_get_coordinates( $content );\n\t$address = '<h3>'.$coordinates[\"address\"].'</h3>';\n\t$address .= '<p>Latitude='.$coordinates[\"lat\"].'</p>';\n\t$address .= '<p>Longitude='.$coordinates[\"lng\"].'</p>';\n\t$map->center_lat = $coordinates['lat'];\n\t$map->center_lng = $coordinates['lng'];\n\t$map->addMarker($map->center_lat,$map->center_lng,'true',$map->title,$address);\n \n if( !is_array( $coordinates ) )\n return;\n} else {\n\t\n\treturn \"Thank you for using this plugin. Please <a href='\".admin_url('admin.php?page=wpgmp_add_location').\"'>Add your locations</a> or set plugin <a href='\".admin_url('admin.php?page=wpgmp_google_settings').\"'>Settings</a>.\";\n}\n\n\n\t\n echo $map->showmap();\n $content = ob_get_contents();\n ob_clean();\n \n return $content;\n \n}", "title": "" }, { "docid": "c9e77ea6e743c3bd73d235bc0d908689", "score": "0.57653123", "text": "function cr_general_context_value_ctools_settings_form_submit(&$form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['values']['settings'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "ad7a98e827c60ba308da7d825eb1cf7c", "score": "0.5753085", "text": "function gmap($name, $width, $height, $clat = DEFAULT_LATITUDE,\n\t $clong = DEFAULT_LONGITUDE, $czoom = DEFAULT_ZOOM,\n\t $afterload = null) {\n $googlekey = GOOGLE_KEY;\n\n if (is_null($afterload)) {\n $aljs = \"\";\n } else {\n $aljs = \"$afterload(map);\";\n }\n\n $newhead = <<<EOT\n <style type=\"text/css\">\n v\\:* {\n behavior:url(#default#VML);\n }\n </style>\n\n <script src=\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=$googlekey\"\n type=\"text/javascript\"></script>\n <script type=\"text/javascript\">\n //<![CDATA[\n\n function load() {\n if (GBrowserIsCompatible()) {\n var map = new GMap2(document.getElementById(\"$name\"));\n\n\tmap.addControl(new GLargeMapControl());\n\n\tGEvent.addListener(map, \"moveend\", function() {\n\t var center = map.getCenter();\n\t document.getElementsByName(\"${name}[lat]\")[0].value = center.lat();\n\t document.getElementsByName(\"${name}[long]\")[0].value = center.lng();\n\t});\n\n map.setCenter(new GLatLng($clat, $clong), $czoom);\n\n\t$aljs\n }\n }\n\n //]]>\n </script>\nEOT;\n\n AddReplaces('head', $newhead);\n AddReplaces('bodytags', array('onload' => \"load()\",\n\t\t\t\t'onunload' => \"GUnload()\"));\n AddReplaces('headtags', array('xmlns:v' => \"urn:schemas-microsoft-com:vml\"));\n\n return div(\"\", null, array('id' => $name, 'style' => \"width: ${width}px; height: ${height}px\"))\n . ihidden(\"${name}[lat]\", $clat) . ihidden(\"${name}[long]\", $clong);\n}", "title": "" }, { "docid": "5aa12e5f2d7ef012d6aae46a26d22376", "score": "0.5726427", "text": "function wpgmaps_head() {\n \n global $wpgmza_tblname_maps;\n global $wpgmza_version;\n\n /* deprecated in version 6.0.30 as GoDaddy have added a \"flush cache\" feature */\n /*\n $checker = get_dropins();\n if (isset($checker['object-cache.php'])) {\n\techo \"<div id=\\\"message\\\" class=\\\"error\\\"><p>\".__(\"Please note: <strong>WP Google Maps will not function correctly while using APC Object Cache.</strong> We have found that GoDaddy hosting packages automatically include this with their WordPress hosting packages. Please email GoDaddy and ask them to remove the object-cache.php from your wp-content/ directory.\",\"wp-google-maps\").\"</p></div>\";\n }\n * \n */\n\n if ((isset($_GET['page']) && $_GET['page'] == \"wp-google-maps-menu\") || (isset($_GET['page']) && $_GET['page'] == \"wp-google-maps-menu-settings\")) {\n wpgmaps_folder_check();\n }\n \n \n if (isset($_POST['wpgmza_savemap'])){\n global $wpdb;\n\n \n\n $map_id = intval(sanitize_text_field($_POST['wpgmza_id']));\n $map_title = sanitize_text_field(esc_attr($_POST['wpgmza_title']));\n $map_height = sanitize_text_field($_POST['wpgmza_height']);\n $map_width = sanitize_text_field($_POST['wpgmza_width']);\n $map_width_type = sanitize_text_field($_POST['wpgmza_map_width_type']);\n if ($map_width_type == \"%\") { $map_width_type = \"\\%\"; }\n $map_height_type = sanitize_text_field($_POST['wpgmza_map_height_type']);\n if ($map_height_type == \"%\") { $map_height_type = \"\\%\"; }\n $map_start_location = sanitize_text_field($_POST['wpgmza_start_location']);\n $map_start_zoom = intval(sanitize_text_field($_POST['wpgmza_start_zoom']));\n $type = intval(sanitize_text_field($_POST['wpgmza_map_type']));\n $alignment = intval(sanitize_text_field($_POST['wpgmza_map_align']));\n $bicycle_enabled = isset($_POST['wpgmza_bicycle']) ? 1 : 2;\n $traffic_enabled = isset($_POST['wpgmza_traffic']) ? 1 : 2;\n\n $map_max_zoom = intval(sanitize_text_field($_POST['wpgmza_max_zoom']));\n \n\n $gps = explode(\",\",$map_start_location);\n $map_start_lat = $gps[0];\n $map_start_lng = $gps[1];\n \n $other_settings = array();\n /*$other_settings['store_locator_enabled'] = intval(sanitize_text_field($_POST['wpgmza_store_locator']));\n $other_settings['store_locator_distance'] = intval(sanitize_text_field($_POST['wpgmza_store_locator_distance']));\n $other_settings['store_locator_bounce'] = intval(sanitize_text_field($_POST['wpgmza_store_locator_bounce']));*/\n\n $other_settings['store_locator_enabled'] = isset($_POST['wpgmza_store_locator']) ? 1 : 2;\n $other_settings['store_locator_distance'] = isset($_POST['wpgmza_store_locator_distance']) ? 1 : 2;\n $other_settings['store_locator_default_radius'] = isset($_POST['wpgmza_store_locator_default_radius']) ? esc_attr( $_POST['wpgmza_store_locator_default_radius'] ): '10';\n\t if (isset($_POST['wpgmza_store_locator_not_found_message'])) { $other_settings['store_locator_not_found_message'] = sanitize_text_field( $_POST['wpgmza_store_locator_not_found_message'] ); }\n $other_settings['store_locator_bounce'] = isset($_POST['wpgmza_store_locator_bounce']) ? 1 : 2;\n\n $other_settings['store_locator_query_string'] = sanitize_text_field($_POST['wpgmza_store_locator_query_string']);\n if (isset($_POST['wpgmza_store_locator_default_address'])) { $other_settings['store_locator_default_address'] = sanitize_text_field($_POST['wpgmza_store_locator_default_address']); }\n if (isset($_POST['wpgmza_store_locator_restrict'])) { $other_settings['wpgmza_store_locator_restrict'] = sanitize_text_field($_POST['wpgmza_store_locator_restrict']); }\n\n\n $other_settings['map_max_zoom'] = sanitize_text_field($map_max_zoom);\n\n /* deprecated in 6.2.0\n $other_settings['weather_layer'] = intval($_POST['wpgmza_weather']);\n $other_settings['weather_layer_temp_type'] = intval($_POST['wpgmza_weather_temp_type']);\n $other_settings['cloud_layer'] = intval($_POST['wpgmza_cloud']);\n */\n $other_settings['transport_layer'] = isset($_POST['wpgmza_transport']) ? 1 : 2;\n \n\n\n\n if (isset($_POST['wpgmza_theme'])) { \n $theme = intval(sanitize_text_field($_POST['wpgmza_theme']));\n $theme_data = sanitize_text_field($_POST['wpgmza_theme_data_'.$theme]);\n $other_settings['wpgmza_theme_data'] = $theme_data;\n $other_settings['wpgmza_theme_selection'] = $theme;\n }\n\n /* overwrite theme data if a custom theme is selected */\n if (isset($_POST['wpgmza_styling_json'])) { $other_settings['wpgmza_theme_data'] = sanitize_text_field($_POST['wpgmza_styling_json']); }\n\n\t\t$other_settings['wpgmza_show_points_of_interest'] = (isset($_POST['wpgmza_show_points_of_interest']) ? 1 : 0);\n\n $other_settings_data = maybe_serialize($other_settings);\n\n $data['map_default_starting_lat'] = $map_start_lat;\n $data['map_default_starting_lng'] = $map_start_lng;\n $data['map_default_height'] = $map_height;\n $data['map_default_width'] = $map_width;\n $data['map_default_zoom'] = $map_start_zoom;\n $data['map_default_max_zoom'] = $map_max_zoom;\n $data['map_default_type'] = $type;\n $data['map_default_alignment'] = $alignment;\n $data['map_default_width_type'] = $map_width_type;\n $data['map_default_height_type'] = $map_height_type;\n\n\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname_maps SET\n map_title = %s,\n map_width = %s,\n map_height = %s,\n map_start_lat = %f,\n map_start_lng = %f,\n map_start_location = %s,\n map_start_zoom = %d,\n type = %d,\n bicycle = %d,\n traffic = %d,\n alignment = %d,\n map_width_type = %s,\n map_height_type = %s,\n other_settings = %s\n WHERE id = %d\",\n\n $map_title,\n $map_width,\n $map_height,\n $map_start_lat,\n $map_start_lng,\n $map_start_location,\n $map_start_zoom,\n $type,\n $bicycle_enabled,\n $traffic_enabled,\n $alignment,\n $map_width_type,\n $map_height_type,\n $other_settings_data,\n $map_id)\n );\n update_option('WPGMZA_SETTINGS', $data);\n echo \"<div class='updated'>\";\n _e(\"Your settings have been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n if( function_exists( 'wpgmza_caching_notice_changes' ) ){\n add_action( 'admin_notices', 'wpgmza_caching_notice_changes' );\n } \n\n }\n\n else if (isset($_POST['wpgmza_save_maker_location'])){\n global $wpdb;\n global $wpgmza_tblname;\n $mid = sanitize_text_field($_POST['wpgmaps_marker_id']);\n $wpgmaps_marker_lat = sanitize_text_field($_POST['wpgmaps_marker_lat']);\n $wpgmaps_marker_lng = sanitize_text_field($_POST['wpgmaps_marker_lng']);\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname SET\n lat = %s,\n lng = %s\n WHERE id = %d\",\n\n $wpgmaps_marker_lat,\n $wpgmaps_marker_lng,\n $mid)\n );\n\n echo \"<div class='updated'>\";\n _e(\"Your marker location has been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n\n }\n else if (isset($_POST['wpgmza_save_poly'])){\n global $wpdb;\n global $wpgmza_tblname_poly;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n if (!isset($_POST['wpgmza_polygon']) || $_POST['wpgmza_polygon'] == \"\") {\n echo \"<div class='error'>\";\n _e(\"You cannot save a blank polygon\",\"wp-google-maps\");\n echo \"</div>\";\n \n } else {\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polygon']);\n if ($wpgmaps_polydata !== \"\") {\n\n if (isset($_POST['poly_name'])) { $polyname = sanitize_text_field($_POST['poly_name']); } else { $polyname = \"Polyline\"; }\n if (isset($_POST['poly_line'])) { $linecolor = sanitize_text_field($_POST['poly_line']); } else { $linecolor = \"000000\"; }\n if (isset($_POST['poly_fill'])) { $fillcolor = sanitize_text_field($_POST['poly_fill']); } else { $fillcolor = \"66FF00\"; }\n if (isset($_POST['poly_opacity'])) { $opacity = sanitize_text_field($_POST['poly_opacity']); } else { $opacity = \"0.5\"; }\n if (isset($_POST['poly_line_opacity'])) { $line_opacity = sanitize_text_field($_POST['poly_line_opacity']); } else { $line_opacity = \"0.5\"; }\n if (isset($_POST['poly_line_hover_line_color'])) { $ohlinecolor = sanitize_text_field($_POST['poly_line_hover_line_color']); } else { $ohlinecolor = \"\"; }\n if (isset($_POST['poly_hover_fill_color'])) { $ohfillcolor = sanitize_text_field($_POST['poly_hover_fill_color']); } else { $ohfillcolor = \"\"; }\n if (isset($_POST['poly_hover_opacity'])) { $ohopacity = sanitize_text_field($_POST['poly_hover_opacity']); } else { $ohopacity = \"\"; }\n if (isset($_POST['wpgmza_polygon_inner'])) { $wpgmaps_polydatainner = sanitize_text_field($_POST['wpgmza_polygon_inner']); } else { $wpgmaps_polydatainner = \"\"; }\n\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"INSERT INTO $wpgmza_tblname_poly SET\n map_id = %d,\n polydata = %s,\n innerpolydata = %s,\n polyname = %s,\n linecolor = %s,\n lineopacity = %s,\n fillcolor = %s,\n opacity = %s,\n ohlinecolor = %s,\n ohfillcolor = %s,\n ohopacity = %s\n \",\n\n $mid,\n $wpgmaps_polydata,\n $wpgmaps_polydatainner,\n $polyname,\n $linecolor,\n $line_opacity,\n $fillcolor,\n $opacity,\n $ohlinecolor,\n $ohfillcolor,\n $ohopacity\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polygon has been created.\",\"wp-google-maps\");\n echo \"</div>\";\n }\n }\n\n\n }\n else if (isset($_POST['wpgmza_edit_poly'])){\n global $wpdb;\n global $wpgmza_tblname_poly;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n $pid = sanitize_text_field($_POST['wpgmaps_poly_id']);\n if (!isset($_POST['wpgmza_polygon']) || $_POST['wpgmza_polygon'] == \"\") {\n echo \"<div class='error'>\";\n _e(\"You cannot save a blank polygon\",\"wp-google-maps\");\n echo \"</div>\";\n \n } else {\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polygon']);\n \n if (isset($_POST['poly_name'])) { $polyname = sanitize_text_field($_POST['poly_name']); } else { $polyname = \"Polyline\"; }\n if (isset($_POST['poly_line'])) { $linecolor = sanitize_text_field($_POST['poly_line']); } else { $linecolor = \"000000\"; }\n if (isset($_POST['poly_fill'])) { $fillcolor = sanitize_text_field($_POST['poly_fill']); } else { $fillcolor = \"66FF00\"; }\n if (isset($_POST['poly_opacity'])) { $opacity = sanitize_text_field($_POST['poly_opacity']); } else { $opacity = \"0.5\"; }\n if (isset($_POST['poly_line_opacity'])) { $line_opacity = sanitize_text_field($_POST['poly_line_opacity']); } else { $line_opacity = \"0.5\"; }\n if (isset($_POST['poly_line_hover_line_color'])) { $ohlinecolor = sanitize_text_field($_POST['poly_line_hover_line_color']); } else { $ohlinecolor = \"\"; }\n if (isset($_POST['poly_hover_fill_color'])) { $ohfillcolor = sanitize_text_field($_POST['poly_hover_fill_color']); } else { $ohfillcolor = \"\"; }\n if (isset($_POST['poly_hover_opacity'])) { $ohopacity = sanitize_text_field($_POST['poly_hover_opacity']); } else { $ohopacity = \"\"; }\n if (isset($_POST['wpgmza_polygon_inner'])) { $wpgmaps_polydatainner = sanitize_text_field($_POST['wpgmza_polygon_inner']); } else { $wpgmaps_polydatainner = \"\"; }\n \n\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname_poly SET\n polydata = %s,\n innerpolydata = %s,\n polyname = %s,\n linecolor = %s,\n lineopacity = %s,\n fillcolor = %s,\n opacity = %s,\n ohlinecolor = %s,\n ohfillcolor = %s,\n ohopacity = %s\n WHERE `id` = %d\"\n ,\n\n $wpgmaps_polydata,\n $wpgmaps_polydatainner,\n $polyname,\n $linecolor,\n $line_opacity,\n $fillcolor,\n $opacity,\n $ohlinecolor,\n $ohfillcolor,\n $ohopacity,\n $pid\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polygon has been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n\n }\n\n\n }\n else if (isset($_POST['wpgmza_save_polyline'])){\n global $wpdb;\n global $wpgmza_tblname_polylines;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n if (!isset($_POST['wpgmza_polyline']) || $_POST['wpgmza_polyline'] == \"\") {\n echo \"<div class='error'>\";\n _e(\"You cannot save a blank polyline\",\"wp-google-maps\");\n echo \"</div>\";\n \n } else {\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polyline']);\n if ($wpgmaps_polydata !== \"\") {\n \n \n if (isset($_POST['poly_name'])) { $polyname = sanitize_text_field($_POST['poly_name']); } else { $polyname = \"\"; }\n if (isset($_POST['poly_line'])) { $linecolor = sanitize_text_field($_POST['poly_line']); } else { $linecolor = \"000000\"; }\n if (isset($_POST['poly_thickness'])) { $linethickness = sanitize_text_field($_POST['poly_thickness']); } else { $linethickness = \"0\"; }\n if (isset($_POST['poly_opacity'])) { $opacity = sanitize_text_field($_POST['poly_opacity']); } else { $opacity = \"1\"; }\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"INSERT INTO $wpgmza_tblname_polylines SET\n map_id = %d,\n polydata = %s,\n polyname = %s,\n linecolor = %s,\n linethickness = %s,\n opacity = %s\n \",\n\n $mid,\n $wpgmaps_polydata,\n $polyname,\n $linecolor,\n $linethickness,\n $opacity\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polyline has been created.\",\"wp-google-maps\");\n echo \"</div>\";\n }\n }\n\n\n }\n else if (isset($_POST['wpgmza_edit_polyline'])){\n global $wpdb;\n global $wpgmza_tblname_polylines;\n $mid = sanitize_text_field($_POST['wpgmaps_map_id']);\n $pid = sanitize_text_field($_POST['wpgmaps_poly_id']);\n if (!isset($_POST['wpgmza_polyline']) || $_POST['wpgmza_polyline'] == \"\") {\n echo \"<div class='error'>\";\n _e(\"You cannot save a blank polyline\",\"wp-google-maps\");\n echo \"</div>\";\n \n } else {\n $wpgmaps_polydata = sanitize_text_field($_POST['wpgmza_polyline']);\n if (isset($_POST['poly_name'])) { $polyname = sanitize_text_field($_POST['poly_name']); } else { $polyname = \"\"; }\n if (isset($_POST['poly_line'])) { $linecolor = sanitize_text_field($_POST['poly_line']); } else { $linecolor = \"000000\"; }\n if (isset($_POST['poly_thickness'])) { $linethickness = sanitize_text_field($_POST['poly_thickness']); } else { $linethickness = \"0\"; }\n if (isset($_POST['poly_opacity'])) { $opacity = sanitize_text_field($_POST['poly_opacity']); } else { $opacity = \"1\"; }\n\n $rows_affected = $wpdb->query( $wpdb->prepare(\n \"UPDATE $wpgmza_tblname_polylines SET\n polydata = %s,\n polyname = %s,\n linecolor = %s,\n linethickness = %s,\n opacity = %s\n WHERE `id` = %d\"\n ,\n\n $wpgmaps_polydata,\n $polyname,\n $linecolor,\n $linethickness,\n $opacity,\n $pid\n )\n );\n echo \"<div class='updated'>\";\n _e(\"Your polyline has been saved.\",\"wp-google-maps\");\n echo \"</div>\";\n }\n\n\n } \n else if (isset($_POST['wpgmza_save_settings'])){\n global $wpdb;\n $wpgmza_data = array();\n if (isset($_POST['wpgmza_settings_map_full_screen_control'])) { $wpgmza_data['wpgmza_settings_map_full_screen_control'] = sanitize_text_field($_POST['wpgmza_settings_map_full_screen_control']); }\n if (isset($_POST['wpgmza_settings_map_streetview'])) { $wpgmza_data['wpgmza_settings_map_streetview'] = sanitize_text_field($_POST['wpgmza_settings_map_streetview']); }\n if (isset($_POST['wpgmza_settings_map_zoom'])) { $wpgmza_data['wpgmza_settings_map_zoom'] = sanitize_text_field($_POST['wpgmza_settings_map_zoom']); }\n if (isset($_POST['wpgmza_settings_map_pan'])) { $wpgmza_data['wpgmza_settings_map_pan'] = sanitize_text_field($_POST['wpgmza_settings_map_pan']); }\n if (isset($_POST['wpgmza_settings_map_type'])) { $wpgmza_data['wpgmza_settings_map_type'] = sanitize_text_field($_POST['wpgmza_settings_map_type']); }\n if (isset($_POST['wpgmza_settings_force_jquery'])) { $wpgmza_data['wpgmza_settings_force_jquery'] = sanitize_text_field($_POST['wpgmza_settings_force_jquery']); }\n if (isset($_POST['wpgmza_settings_remove_api'])) { $wpgmza_data['wpgmza_settings_remove_api'] = sanitize_text_field($_POST['wpgmza_settings_remove_api']); }\n\n if (isset($_POST['wpgmza_force_greedy_gestures'])) { $wpgmza_data['wpgmza_force_greedy_gestures'] = sanitize_text_field($_POST['wpgmza_force_greedy_gestures']); }\n \n if (isset($_POST['wpgmza_settings_map_scroll'])) { $wpgmza_data['wpgmza_settings_map_scroll'] = sanitize_text_field($_POST['wpgmza_settings_map_scroll']); }\n if (isset($_POST['wpgmza_settings_map_draggable'])) { $wpgmza_data['wpgmza_settings_map_draggable'] = sanitize_text_field($_POST['wpgmza_settings_map_draggable']); }\n if (isset($_POST['wpgmza_settings_map_clickzoom'])) { $wpgmza_data['wpgmza_settings_map_clickzoom'] = sanitize_text_field($_POST['wpgmza_settings_map_clickzoom']); }\n if (isset($_POST['wpgmza_settings_map_open_marker_by'])) { $wpgmza_data['wpgmza_settings_map_open_marker_by'] = sanitize_text_field($_POST['wpgmza_settings_map_open_marker_by']); }\n\t\tif (isset($_POST['wpgmza_settings_disable_infowindows'])) { $wpgmza_data['wpgmza_settings_disable_infowindows'] = sanitize_text_field($_POST['wpgmza_settings_disable_infowindows']); }\n if (isset($_POST['wpgmza_api_version'])) { $wpgmza_data['wpgmza_api_version'] = sanitize_text_field($_POST['wpgmza_api_version']); }\n if (isset($_POST['wpgmza_custom_css'])) { $wpgmza_data['wpgmza_custom_css'] = sanitize_text_field($_POST['wpgmza_custom_css']); }\n if (isset($_POST['wpgmza_marker_xml_location'])) { update_option(\"wpgmza_xml_location\",sanitize_text_field($_POST['wpgmza_marker_xml_location'])); }\n if (isset($_POST['wpgmza_marker_xml_url'])) { update_option(\"wpgmza_xml_url\",sanitize_text_field($_POST['wpgmza_marker_xml_url'])); }\n if (isset($_POST['wpgmza_access_level'])) { $wpgmza_data['wpgmza_settings_access_level'] = sanitize_text_field($_POST['wpgmza_access_level']); }\n if (isset($_POST['wpgmza_settings_marker_pull'])) { $wpgmza_data['wpgmza_settings_marker_pull'] = sanitize_text_field($_POST['wpgmza_settings_marker_pull']); }\n\n if (isset($_POST['wpgmza_settings_enable_usage_tracking'])) { $wpgmza_data['wpgmza_settings_enable_usage_tracking'] = sanitize_text_field($_POST['wpgmza_settings_enable_usage_tracking']); }\n $wpgmza_data = apply_filters(\"wpgooglemaps_filter_save_settings\",$wpgmza_data);\n\n update_option('WPGMZA_OTHER_SETTINGS', $wpgmza_data);\n\n if( isset( $_POST['wpgmza_google_maps_api_key'] ) ){ update_option( 'wpgmza_google_maps_api_key', sanitize_text_field( trim($_POST['wpgmza_google_maps_api_key'] )) ); }\n\n echo \"<div class='updated'><p>\";\n _e(\"Your settings have been saved.\",\"wp-google-maps\");\n echo \"</p></div>\";\n\n if( function_exists( 'wpgmza_caching_notice_changes' ) ){\n add_action( 'admin_notices', 'wpgmza_caching_notice_changes' );\n } \n\n\n }\n \n\n \n\n\n\n}", "title": "" }, { "docid": "b032e9d17b0446df3202c79bec28d2ae", "score": "0.57182246", "text": "function wpgmaps_init() {\n global $wpgmza_pro_version;\n global $wpgmza_version;\n wp_enqueue_script(\"jquery\");\n $plugin_dir = basename(dirname(__FILE__)).\"/languages/\";\n load_plugin_textdomain( 'wp-google-maps', false, $plugin_dir );\n \n \n if (get_option(\"wpgmza_xml_location\") == \"\") {\n $upload_dir = wp_upload_dir();\n add_option(\"wpgmza_xml_location\",'{uploads_dir}/wp-google-maps/');\n }\n \n if (get_option(\"wpgmza_xml_url\") == \"\") {\n $upload_dir = wp_upload_dir();\n add_option(\"wpgmza_xml_url\",'{uploads_url}/wp-google-maps/');\n }\n \n $wpgmza_settings = get_option(\"WPGMZA_OTHER_SETTINGS\");\n\n if (!isset($wpgmza_settings['wpgmza_settings_marker_pull']) || $wpgmza_settings['wpgmza_settings_marker_pull'] == \"\") {\n \n $wpgmza_first_time = get_option(\"WPGMZA_FIRST_TIME\");\n if (!$wpgmza_first_time) { \n \n /* first time, set marker pull to DB */\n $wpgmza_settings['wpgmza_settings_marker_pull'] = \"0\";\n update_option(\"WPGMZA_OTHER_SETTINGS\",$wpgmza_settings);\n\n } else {\n /* previous users - set it to XML (what they were using originally) */\n $wpgmza_settings['wpgmza_settings_marker_pull'] = \"1\";\n update_option(\"WPGMZA_OTHER_SETTINGS\",$wpgmza_settings);\n }\n }\n \n if (function_exists(\"wpgmza_register_pro_version\")) {\n global $wpgmza_pro_version;\n if (floatval($wpgmza_pro_version) < 5.41) {\n /* user has pro and is prior to version 5.41 so therefore do not save the shortcode in the URL, rather process it and then save it */\n update_option(\"wpgmza_xml_url\",wpgmza_return_marker_url());\n update_option(\"wpgmza_xml_location\",wpgmza_return_marker_path());\n } else {\n \n }\n } \n \n \n \n\n \n \n// delete_option(\"WPGMZA_FIRST_TIME\");\n \n wpgmaps_handle_directory();\n /* handle first time users and updates */\n if (isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu') {\n\n \n /* check if their using APC object cache, if yes, do nothing with the welcome page as it causes issues when caching the DB options */\n if (class_exists(\"APC_Object_Cache\")) {\n /* do nothing here as this caches the \"first time\" option and the welcome page just loads over and over again. quite annoying really... */\n } else { \n if (isset($_GET['override']) && $_GET['override'] == \"1\") {\n $wpgmza_first_time = $wpgmza_version;\n update_option(\"WPGMZA_FIRST_TIME\",$wpgmza_first_time);\n } else {\n $wpgmza_first_time = get_option(\"WPGMZA_FIRST_TIME\");\n if (!$wpgmza_first_time) { \n /* show welcome screen */\n $wpgmza_first_time = $wpgmza_version;\n update_option(\"WPGMZA_FIRST_TIME\",$wpgmza_first_time);\n wp_redirect(get_option('siteurl').\"/wp-admin/admin.php?page=wp-google-maps-menu&action=welcome_page\");\n exit();\n }\n \n if ($wpgmza_first_time != $wpgmza_version) {\n update_option(\"WPGMZA_FIRST_TIME\",$wpgmza_version);\n \n }\n \n }\n }\n }\n /* check if version is outdated or plugin is being automatically updated */\n $current_version = get_option(\"wpgmaps_current_version\");\n if (!isset($current_version) || $current_version != $wpgmza_version) {\n\n $wpgmza_settings = get_option(\"WPGMZA_OTHER_SETTINGS\");\n if (isset($wpgmza_settings['wpgmza_api_version']) && ($wpgmza_settings['wpgmza_api_version'] == \"3.14\" || $wpgmza_settings['wpgmza_api_version'] == \"3.15\" || $wpgmza_settings['wpgmza_api_version'] == \"3.23\" || $wpgmza_settings['wpgmza_api_version'] == \"3.24\" || $wpgmza_settings['wpgmza_api_version'] == \"3.25\" || $wpgmza_settings['wpgmza_api_version'] == \"3.26\")) {\n $wpgmza_settings['wpgmza_api_version'] = \"3.31\";\n }\n update_option(\"WPGMZA_OTHER_SETTINGS\",$wpgmza_settings);\n\n wpgmaps_handle_db();\n wpgmaps_handle_directory();\n wpgmaps_update_all_xml_file();\n update_option(\"wpgmaps_current_version\",$wpgmza_version);\n \n }\n \n}", "title": "" }, { "docid": "be332ac2104d6b748c69b0a0ff57f98a", "score": "0.5711065", "text": "function initMapSearch() {\r\n $this->pi_initPIflexForm();\r\n $map_search = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'map_search', 'options');\r\n \r\n if ($map_search == 1) {\r\n return \"GSearch.setOnLoadCallback(initialize);\"; \r\n }\r\n \r\n else {\r\n \r\n }\r\n}", "title": "" }, { "docid": "f8d146e6fb9838e9d8866e205be9202b", "score": "0.5697189", "text": "public function plugin_options_page() {\n\t\t?>\n\t\t<div>\n\t\t<h2><?php echo __( 'WP GEOjson Settings', 'wpgeojson' ); ?></h2>\n\t\t<?php echo __( 'Options relating to the WP GEOjson Plugin.', 'wpgeojson' ); ?>\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t<?php settings_fields('wpgeojson_options'); ?>\n\t\t<?php do_settings_sections('wpgeojson'); ?>\n\t\t<input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n\t\t</form>\n\t\t</div> \n\t\t<?php\n\t}", "title": "" }, { "docid": "4beca1b6f9c004d8607bd6856ab3235c", "score": "0.56825775", "text": "function ti_amg_fw_custom_campaign_setting_form() {\n $form = array(\n 'tl_logo_link' => array(\n '#type' => 'textfield',\n '#title' => t('T&L logo URL'),\n '#description' => t('Paste Your URL Here'),\n '#rows' => 5,\n '#format' => \"FULL HTML\",\n '#default_value' => variable_get('tl_logo_link', ''),\n ),\n 'fw_logo_link' => array(\n '#type' => 'textfield',\n '#title' => t('F&W logo URL'),\n '#description' => t('Paste Your URL Here'),\n '#rows' => 5,\n '#format' => \"FULL HTML\",\n '#default_value' => variable_get('fw_logo_link', ''),\n ),\n 'local_flavor_link' => array(\n '#type' => 'textfield',\n '#title' => t('Local Flavor URL'),\n '#description' => t('Paste Your URL Here'),\n '#rows' => 5,\n '#format' => \"FULL HTML\",\n '#default_value' => variable_get('local_flavor_link', ''),\n ),\n 'local_flavor_international_link' => array(\n '#type' => 'textfield',\n '#title' => t('Local Flavor International URL'),\n '#description' => t('Paste Your URL Here'),\n '#rows' => 5,\n '#format' => \"FULL HTML\",\n '#default_value' => variable_get('local_flavor_international_link', ''),\n ),\n );\n return system_settings_form($form);\n}", "title": "" }, { "docid": "f2131da3476371b9a9c894b318c1ebf6", "score": "0.5671885", "text": "function options_form(&$form) {\n }", "title": "" }, { "docid": "781acdb04b1ecef3a25572947f23e983", "score": "0.5671591", "text": "function gsb_feature_program_display_edit_form_submit($form, &$form_state) {\n foreach (array_keys($form_state['plugin']['defaults']) as $key) {\n if (isset($form_state['values'][$key])) {\n $form_state['conf'][$key] = $form_state['values'][$key];\n }\n }\n}", "title": "" }, { "docid": "bea73d28b9683f006035ad8389592345", "score": "0.56711364", "text": "function formbuilder_createOptions()\n\t{\n\t\t// Set the spam blocker default variable\n\t\tupdate_option('formbuilder_spam_blocker', \"formBuilderCap\");\n\t\n\t\t// Set Custom CSS default variable\n\t\tupdate_option('formBuilder_custom_css', 'Enabled');\n\t\t\n\t\t// Set default alternate email handling value to DisAbled\n\t\tupdate_option('formbuilder_alternate_email_handling', 'Disabled');\n\t\t\n\t\t// Set blacklist checking to be disabled.\n\t\tupdate_option('formbuilder_blacklist', 'Disabled');\n\t\t\n\t\t// Set blacklist checking to be disabled.\n\t\tupdate_option('formbuilder_greylist', 'Disabled');\n\t\t\n\t\t// Set blacklist checking to be disabled.\n\t\tupdate_option('formbuilder_excessive_links', 'Disabled');\n\t\t\n\t\t// Set blacklist checking to be disabled.\n\t\tupdate_option('formbuilder_spammer_ip_checking', 'Disabled');\n\t\t\n\t\t// Set blacklist checking to be disabled.\n\t\tupdate_option('formbuilder_akismet', 'Disabled');\n\t\t\n\t\t// Set referrer info to be collected by default.\n\t\tupdate_option('formBuilder_referrer_info', 'Enabled');\n\t}", "title": "" }, { "docid": "952fc7f51eaf62a7991c68cdca12df78", "score": "0.5669769", "text": "protected function getConfigForm()\n {\n $fields_form = array();\n $fields_form[0]= array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('General Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Allow only one WishList'),\n 'name' => 'ADVANSEDWISHLIST_ONE',\n 'is_bool' => true,\n 'desc' => $this->l('If the option is enabled - your client will not be able to create multiple WishLists'),\n 'values' => array(\n array(\n 'id' => 'one_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'one_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display Tax'),\n 'name' => 'ADVANSEDWISHLIST_TAX',\n 'is_bool' => true,\n 'desc' => $this->l('Display Price applied tax rate on wishlist page'),\n 'values' => array(\n array(\n 'id' => 'tax_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'tax_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n \n $fields_form[1]= array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Icons and Buttons'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display in Nav'),\n 'name' => 'ADVANSEDWISHLIST_NAV',\n 'is_bool' => true,\n 'desc' => $this->l('Display block wishlist in nav hook'),\n 'values' => array(\n array(\n 'id' => 'nav_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'nav_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display in Top'),\n 'name' => 'ADVANSEDWISHLIST_TOP',\n 'is_bool' => true,\n 'desc' => $this->l('Display block wishlist in top hook'),\n 'values' => array(\n array(\n 'id' => 'top_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'top_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display the title in \"Top and Nav\"'),\n 'name' => 'ADVANSEDWISHLIST_DISPLAY_TITLE',\n 'is_bool' => true,\n 'desc' => $this->l('Display the title \"Advanced WishLists\" near the icon'),\n 'values' => array(\n array(\n 'id' => 'title_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'title_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display the title in products button'),\n 'name' => 'ADVANSEDWISHLIST_DISPLAY_TITLE2',\n 'is_bool' => true,\n 'desc' => $this->l('Display the title \"Advanced WishLists\" near the icon'),\n 'values' => array(\n array(\n 'id' => 'title2_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'title2_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Button on top'),\n 'name' => 'ADVANSEDWISHLIST_BTN_TOP',\n 'is_bool' => true,\n 'desc' => $this->l('Display the button on top of the product image (products list page)'),\n 'values' => array(\n array(\n 'id' => 'btn_top_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'btn_top_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'color',\n 'label' => $this->l('Color \"Icon Heart\"'),\n 'desc' => $this->l('Choose a color for your Icon'),\n 'name' => 'ADVANSEDWISHLIST_ICON_COLOR',\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display in column'),\n 'name' => 'ADVANSEDWISHLIST_LEFT',\n 'is_bool' => true,\n 'desc' => $this->l('Display block wishlist in the left or right column hook'),\n 'values' => array(\n array(\n 'id' => 'left_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'left_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n \n $icons_font = array();\n $icons_font[1] = array(\n 'id_font' => '1',\n 'name_font' => 'material icons',\n );\n \n $icons_font[2] = array(\n 'id_font' => '2',\n 'name_font' => 'font awesome',\n );\n $icons_font[3] = array(\n 'id_font' => '3',\n 'name_font' => 'custom font',\n );\n \n $fields_form[2]= array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Extended Options for the Developers'),\n 'icon' => 'icon-cogs',\n ),\n 'description' => $this->l('These are additional options for template developers. Usually, you do not need to change it.'),\n 'input' => array(\n array(\n 'type' => 'select',\n 'label' => $this->l('Icons font:'),\n 'name' => 'ADVANSEDWISHLIST_ICONS_FONT',\n 'desc' => $this->l('You can choose the font that your theme uses'),\n 'options' => array(\n 'default' => array('value' => 0, 'label' => $this->l('Choose font')),\n 'query' => $icons_font,\n 'id' => 'id_font',\n 'name' => 'name_font'\n ),\n ),\n ),\n ),\n );\n return $fields_form;\n }", "title": "" }, { "docid": "01795556d33211355b2fe631c22cd428", "score": "0.5656124", "text": "public function standard_field_settings($position, $form_id){\r\r\n\r\r\n if($position == 50){\r\r\n ?>\r\r\n <li class=\"picatcha_color field_setting\">\r\r\n <label for=\"picatcha_color\"><?php _e(\"Theme Color\",\"gravityformspicatcha\")?> <?php gform_tooltip(\"picatcha_color\") ?></label>\r\r\n <?php GFFormDetail::color_picker(\"picatcha_color\", \"SetPicatchaColor\") ?>\r\r\n </li>\r\r\n\r\r\n <li class=\"picatcha_format field_setting\">\r\r\n <label for=\"picatcha_format\"><?php _e(\"Number of Images\", \"gravityformspicatcha\")?> <?php gform_tooltip(\"picatcha_images\") ?></label>\r\r\n <select id=\"picatcha_format\" onchange=\"SetFieldProperty('field_picatcha_format', this.value)\">\r\r\n <option value=\"1\">6</option>\r\r\n <option value=\"2\">8</option>\r\r\n <option value=\"3\">10</option>\r\r\n <option value=\"4\">12</option>\r\r\n </select><br />\r\r\n </li>\r\r\n\r\r\n <li class=\"picatcha_image_size field_setting\">\r\r\n <label for=\"picatcha_imgSize\"><?php _e(\"Image Size\", \"gravityformspicatcha\")?> <?php gform_tooltip(\"picatcha_image_size\") ?></label>\r\r\n <select id=\"picatcha_imgSize\" onchange=\"SetFieldProperty('field_picatcha_imgSize',this.value)\">\r\r\n <option value=\"50\"><?php _e(\"Small\", \"gravityformspicatcha\") ?></option>\r\r\n <option value=\"60\"><?php _e(\"Medium\", \"gravityformspicatcha\") ?></option>\r\r\n <option value=\"75\"><?php _e(\"Large\", \"gravityformspicatcha\") ?></option>\r\r\n </select><br />\r\r\n </li>\r\r\n\r\r\n <li class=\"picatcha_noise_level field_setting\" style=\"float: left;\">\r\r\n <label for=\"picatcha_noise_level\"><?php _e(\"Noise\", \"gravityformspicatcha\")?> <?php gform_tooltip(\"picatcha_noise\") ?></label>\r\r\n <select id=\"picatcha_noise_level\" onchange=\"SetFieldProperty('field_picatcha_noise_level',this.value); ToggleNoiseType(false);\">\r\r\n <option value=\"0\"><?php _e(\"Off\", \"gravityformspicatcha\") ?></option>\r\r\n <option value=\"1\">1</option>\r\r\n <option value=\"2\">2</option>\r\r\n <option value=\"3\">3</option>\r\r\n <option value=\"4\">4</option>\r\r\n <option value=\"5\">5</option>\r\r\n <option value=\"6\">6</option>\r\r\n <option value=\"7\">7</option>\r\r\n <option value=\"8\">8</option>\r\r\n <option value=\"9\">9</option>\r\r\n <option value=\"10\">10 - <?php _e(\"Maximum\", \"gravityformspicatcha\") ?></option>\r\r\n </select><br />\r\r\n </li>\r\r\n\r\r\n <li class=\"picatcha_noise_type field_setting\">\r\r\n <label for=\"picatcha_noise_type\">&nbsp;</label>\r\r\n <select id=\"picatcha_noise_type\" onchange=\"SetFieldProperty('field_picatcha_noise_type', this.value)\">\r\r\n <option value=\"\"><?php _e(\"Select noise type\", \"gravityformspicatcha\")?></option>\r\r\n <option value=\"0\"><?php _e(\"Random\", \"gravityformspicatcha\")?></option>\r\r\n <option value=\"1\"><?php _e(\"Shadow\", \"gravityformspicatcha\")?></option>\r\r\n <option value=\"2\"><?php _e(\"Pixelation\", \"gravityformspicatcha\")?></option>\r\r\n </select>\r\r\n </li>\r\r\n\r\r\n <li class=\"picatcha_language field_setting\" style=\"clear:both\">\r\r\n <label for=\"picatcha_lang\"><?php _e(\"Language\",\"gravityformspicatcha\")?> <?php gform_tooltip(\"picatcha_language\") ?></label>\r\r\n <select id=\"picatcha_lang\" onchange=\"SetFieldProperty('field_picatcha_lang',this.value)\">\r\r\n <option value=\"en\">English</option>\r\r\n <option value=\"es\">Español</option>\r\r\n <option value=\"fr\">Français</option>\r\r\n <option value=\"de\">Deutch</option>\r\r\n <option value=\"hi\">हिंदी</option>\r\r\n <option value=\"is\">??slenska</option>\r\r\n <option value=\"ru\">Pу????кий</option>\r\r\n <option value=\"zh\">中国</option>\r\r\n <option value=\"ar\">العربية</option>\r\r\n <option value=\"tl\">Filipino</option>\r\r\n <option value=\"it\">Italiano</option>\r\r\n <option value=\"vi\">Việt</option>\r\r\n <option value=\"nl\">Nederlands</option>\r\r\n <option value=\"pt\">Português</option>\r\r\n <option value=\"tr\">Türkçe</option>\r\r\n <option value=\"sk\">Slovenských</option>\r\r\n </select><br />\r\r\n </li>\r\r\n\r\r\n <li class=\"picatcha_language_override field_setting\">\r\r\n <input type=\"checkbox\" id=\"picatcha_langOverride\" onclick=\"SetFieldProperty('field_picatcha_lang_override', this.checked)\" />\r\r\n <label for=\"picatcha_langOverride\" class=\"inline\"><?php _e(\"Allow users to select language\",\"gravityformspicatcha\")?></label>\r\r\n </li>\r\r\n\r\r\n\r\r\n <?php\r\r\n }\r\r\n }", "title": "" }, { "docid": "1797b9ea0807cf24bd09a3fd2bf4861b", "score": "0.5649683", "text": "public function init_form_fields() {\n\t\t\tinclude(dirname(__FILE__) . \"/includes/magpie-settings.php\");\n\t\t}", "title": "" }, { "docid": "f6309a3038f144f797f0c86511291e8d", "score": "0.5648489", "text": "public function cap_wpgm_print_section_info() {\n\t\t\tesc_html_e( 'Enter your settings below:', 'cap-wp-google-maps' );\n\t\t}", "title": "" }, { "docid": "226e62947fd11d2ef93a8da56c8a4bcd", "score": "0.5637388", "text": "function responsive_map_shortcode_edited($atts) {\n $atts = shortcode_atts(array(\n 'width' => '100%', // Use a width in 'px' or '%'. Default: 100%\n 'height' => '500px', // Use a height in 'px' or '%'. Default: 500px\n 'maptype' => 'roadmap', // Possible values: roadmap, satellite, terrain or hybrid\n 'zoom' => 14, // Zoom, use values between 1-19, default zoom=14\n 'address' => '', // Markers list in this format: street, city, country | street, city, country | street, city, country\n 'description' => '', // Markers descriptions in this format: description1 | description2 | description3 (one for each marker address above)\n 'popup' => 'no', // 'yes' or 'no'\n 'pancontrol' => 'no', // 'yes' or 'no'\n 'zoomcontrol' => 'no', // 'yes' or 'no'\n 'draggable' => 'yes', // 'yes' or 'no'\n 'scrollwheel' => 'no', // 'yes' or 'no'\n 'typecontrol' => 'no', // 'yes' or 'no'\n 'scalecontrol' => 'no', // 'yes' or 'no'\n 'streetcontrol' => 'no', // 'yes' or 'no'\n 'searchbox' => 'no', // 'yes' or 'no'\n 'clustering' => 'no', // 'yes' or 'no'\n 'logging' => 'no', // 'yes' or 'no'\n 'poi' => 'yes', // 'yes' or 'no'\n 'directionstext' => '', // The text to be displayed for directions link\n 'center' => '', // The point where the map should be centered (latitude, longitude) for instance: center=\"38.980288, 22.145996\"\n 'icon' => 'green', // Possible color values: black, blue, gray, green, magenta, orange, purple, red, white, yellow or a http link to a custom image\n 'style' => '1', // Use style values between 1-50\n 'refresh' => 'no', // 'yes' or 'no'\n 'locateme' => 'no', // 'yes' or 'no'\n 'key' => '' // Google Maps API key\n ), $atts);\n \n // Enque jQuery\n wp_enqueue_script(\"jquery\");\n\n // Google Maps API link, http or https\n $api_url = is_ssl() ? 'https://maps-api-ssl.google.com' : 'http://maps.googleapis.com';\n\n // Add to Google Maps API the Google Maps API key parameter if is set in the shortcode\n $api_key = '';\n if (isset($atts['key'])) {\n if (trim($atts['key']) != '') {\n $api_key = '&key=' . trim($atts['key']);\n }\n }\n\n // And enqueue the Google Maps Api\n wp_enqueue_script('googlemapsapi', $api_url . '/maps/api/js?v=3.exp&libraries=places' . $api_key, array('jquery'), null, true);\n\t\n\t/* ----------------------------------------------\n\t// - WM4D SHORTCODE EDIT - catch script url\n\t// ---------------------------------------------- */\n // Enqueue the responsive maps javascripts\n wp_enqueue_script('resmap', '/wp-content/plugins/responsive-maps-plugin/includes/js/resmap.min.js', array('jquery'), '3.4', true);\n \n // Generate a unique identifier for the map\n $mapid = rand();\n\n // Extract the map type\n $atts['maptype'] = strtoupper($atts['maptype']);\n\n // If width or height were specified in the shortcode, extract them too\n $dimensions = '';\n if(isset($atts['height']))\n $dimensions .= 'height:' . $atts['height'] . ';';\n if(isset($atts['width']))\n $dimensions .= 'width:' . $atts['width'] . ';';\n\n // Set the pre-defined style which corresponds to the number given in the shortcode\n $atts['style'] = getStyleString($atts['style']);\n\n // If points of interest (poi) is set to \"no\" in the shortcode, add this option to the style string\n // And this is the JSON for no points of interest: ', { \"featureType\": \"poi\", \"stylers\": [ { \"visibility\": \"off\" } ] }'\n $noPOI = ', {\"featureType\":\"poi\",\"stylers\":[{\"visibility\": \"off\"}]}';\n if (isset($atts['poi']) && $atts['poi'] == 'no') {\n $atts['style'] = substr($atts['style'], 0, -1) . $noPOI . ']';\n }\n\n // Extract the langitude and longitude for the map center\n if (trim($atts['center']) != \"\") {\n sscanf($atts['center'], '%f, %f', $lat, $long);\n } else {\n $lat = 'null'; $long = 'null';\n }\n\n // Prepare markers list\n $markers = '[]';\n\n // Split the addresses, descriptions and icons (by the pipeline \"|\" delimiter)\n if ($atts['address'] != '') {\n\t\n\t/* -----------------------------------------------\n\t// - WM4D SHORTCODE EDIT - catch %% shortcodes\n\t// ----------------------------------------------- */\n \t\t$att_address = $atts['address'];\n\t\t$att_address = call_addresses_shortcode($att_address);\n\t\t$att_description = $atts['description'];\n\t\t$att_description = call_description_shortcode($att_description);\n\t\t$att_icon = $atts['icon'];\n\t\t$att_icon = call_icons_shortcode($att_address, $att_icon);\n\n\n $addresses = explode(\"|\", $att_address ); \n\t $descriptions = explode(\"|\", $att_description);\n\t $icons = explode(\"|\", $att_icon); \n\t \n\t \n\t $total_addresses = count($addresses);\n\n // Start building the markers JSON array\n $markers = '[';\n\n // For each address from the list, build a marker (with popup with description and an icon)\n for($i = 0; $i < $total_addresses; $i ++) {\n\n // Remove unneccessary line breaks from the addresses list\n $address = resmap_cleanHtml($addresses[$i]);\n \n // If it's empty, set the default description equal to the the address\n if(isset($descriptions[$i]) && strlen(trim($descriptions[$i])) != 0) {\n $html = $descriptions[$i]; \n }\n else {\n $html = $address;\n }\n \n // Add the directions link to the description\n if (isset($atts['directionstext']) && strlen(trim($atts['directionstext'])) != 0) {\n $directions = 'http://maps.google.com/?daddr=' . urlencode($address);\n $html .= \"<br><strong><a target='_blank' href='\". $directions .\"'>\". $atts['directionstext'] .\"</a></strong>\" ;\n }\n \n // Remove unneccessary line breaks from the $html and transforms {br} to <br>\n $html = resmap_cleanHtml($html);\n \n // Get the correct icon image based on icon color/url which were given in the shortcode\n if(isset($icons[$i])) {\n $icon = resmap_getIcon($icons[$i]);\n } \n\n // Extract the lagitude and longitude\n $marker_latitude = null;\n $marker_longitude = null;\n if (trim($address) != \"\") {\n sscanf($address, '%f, %f', $marker_latitude, $marker_longitude);\n }\n\n // See if we show popups. \n // If only one address, popup is true or false (what's given in the shortcode)\n // If more addresses and in shortcode popup is true, show the open popup only for first address.\n $popup = 'false';\n if (isset($atts['popup']) && $atts['popup'] == 'yes') {\n if ($total_addresses == 1) {\n $popup = 'true';\n } else if ($total_addresses >= 1) {\n $i == 0 ? ($popup = 'true') : ($popup = 'false');\n }\n }\n\n // If more markers, add the neccessary \",\" delimiter between markers\n if ($i > 0) $markers .= \",\";\n \n // Build markers list based on given address or latitude/longitude\n if ($marker_latitude == '' || $marker_longitude == '') {\n $markers .= \"{\n address: '\" . $address . \"', \n key: '\". ($i + 1) . \"',\";\n } else {\n $markers .= \"{\n latitude:\" . $marker_latitude .\", \n longitude:\" . $marker_longitude .\",\n key: '\" . ($i +1) . \"',\";\n }\n $markers .= \"html:'\" . $html . \"',\n popup: \". $popup . \",\n flat: true,\n icon: {\n image: '\". $icon . \"'\n }}\";\n }\n $markers .= ']';\n }\n // Tell PHP to start output buffering\n ob_start();\n ?><script type=\"text/javascript\">\n jQuery(document).ready(function($) {\n // the div that will contain the map\n var mapdiv = jQuery(\"#responsive_map_<?php echo $mapid; ?>\"); \n // markers should be clustered?\n var clustering = \"<?php echo $atts['clustering']; ?>\"; \n // Create the map in the div \n mapdiv.gMapResp({\n maptype: google.maps.MapTypeId.<?php echo $atts['maptype']; ?>,\n log: <?php echo toBool($atts['logging']); ?>,\n zoom: <?php echo $atts['zoom']; ?>,\n markers: <?php echo $markers; ?>,\n panControl: <?php echo toBool($atts['pancontrol']); ?>,\n zoomControl: <?php echo toBool($atts['zoomcontrol']); ?>,\n draggable: <?php echo toBool($atts['draggable']); ?>,\n scrollwheel: <?php echo toBool($atts['scrollwheel']); ?>,\n mapTypeControl: <?php echo toBool($atts['typecontrol']); ?>,\n scaleControl: <?php echo toBool($atts['scalecontrol']); ?>,\n streetViewControl: <?php echo toBool($atts['streetcontrol']); ?>,\n overviewMapControl: true,\n styles: <?php echo $atts['style']; ?>,\n latitude: <?php echo $lat; ?>,\n longitude: <?php echo $long; ?>,\n onComplete: function() {\n var gmap = mapdiv.data('gmap').gmap;\n if (clustering.length != 0 && clustering == \"yes\") {\n var markerCluster = new MarkerClusterer(gmap, mapdiv.data('gmap').markers, {imagePath: '<?php echo esc_url(plugins_url()); ?>/responsive-maps-plugin/includes/img/m'});\n }\n }\n });\n gmap = mapdiv.data('gmap').gmap;\n <?php if (isset($atts['searchbox']) && $atts['searchbox'] == 'yes') { ?>\n resmap_createSearchBox(gmap);\n <?php } \n if (isset($atts['locateme']) && $atts['locateme'] == 'yes') { ?>\n resmap_addLocatemeButton(gmap);\n <?php } ?>\n resmap_fixDisplayInTabs(mapdiv, <?php echo toBool($atts['popup']); ?>);\n });\n <?php if (isset($atts['refresh']) && $atts['refresh'] == 'yes') { ?>\n // If the refresh parameter is set to true, resize the map when window is resized \n window.onresize = function() {\n jQuery('.responsive-map').each(function(i, obj) {\n data = jQuery(this).data('gmap');\n if (data) {\n var gmap = data.gmap;\n google.maps.event.trigger(gmap, 'resize');\n jQuery(this).gMapResp('fixAfterResize');\n }\n });\n };\n <?php } ?>\n </script>\n <div id=\"responsive_map_<?php echo $mapid; ?>\" class=\"responsive-map\" style=\"<?php echo $dimensions; ?>\"></div>\n<?php return ob_get_clean();\n}", "title": "" }, { "docid": "0f06cdd7d292793e12697b1451b36787", "score": "0.5627552", "text": "function image_gd_settings() {\n if (image_gd_check_settings()) {\n $form = array();\n $form['status'] = array(\n '#value' => t('The GD toolkit is installed and working properly.')\n );\n\n $form['image_jpeg_quality'] = array(\n '#type' => 'textfield',\n '#title' => t('JPEG quality'),\n '#description' => t('Define the image quality for JPEG manipulations. Ranges from 0 to 100. Higher values mean better image quality but bigger files.'),\n '#size' => 10,\n '#maxlength' => 3,\n '#default_value' => variable_get('image_jpeg_quality', 75),\n '#field_suffix' => t('%'),\n );\n $form['#element_validate'] = array('image_gd_settings_validate');\n \n return $form;\n }\n else {\n form_set_error('image_toolkit', t('The GD image toolkit requires that the GD module for PHP be installed and configured properly. For more information see <a href=\"@url\">PHP\\'s image documentation</a>.', array('@url' => 'http://php.net/image')));\n return FALSE;\n }\n}", "title": "" }, { "docid": "33b60bc8d785c5a9c01f111a243cee63", "score": "0.5615155", "text": "function ambient_logic_add_map($options) {\n // Get address from $options array.\n $address = (isset($options['address']) ? $options['address'] : null);\n\n // Get key and additional options from wp_options table.\n $ambient_logic_api_key = get_option('ambient_logic_api_key');\n $ambient_logic_map_options = json_decode(get_option('ambient_logic_map_options'));\n\n // Set options for the template.\n $map_id = (isset($ambient_logic_map_options->mapID) && !empty($ambient_logic_map_options->mapID) ? $ambient_logic_map_options->mapID : 'ambientLogic-89178');\n $height = (isset($ambient_logic_map_options->height) && !empty($ambient_logic_map_options->height) ? $ambient_logic_map_options->height : 400);\n $width = (isset($ambient_logic_map_options->width) && !empty($ambient_logic_map_options->width) ? $ambient_logic_map_options->width: 400);\n $text_on = (isset($ambient_logic_map_options->textOn) ? 'true' : 'false');\n $show_arrow = (isset($ambient_logic_map_options->showArrow) ? 'true' : 'false');\n $show_score = (isset($ambient_logic_map_options->showScore) ? 'true' : 'false');\n $show_scale_line = (isset($ambient_logic_map_options->showScaleline) ? 'true' : 'false');\n $bw_map = (isset($ambient_logic_map_options->bwMap) ? 'true' : 'false');\n $zoom = (isset($ambient_logic_map_options->zoom) && !empty($ambient_logic_map_options->zoom) ? $ambient_logic_map_options->zoom : 14);\n $horizontal = (isset($ambient_logic_map_options->horizontal) && !empty($ambient_logic_map_options->horizontal) ? $ambient_logic_map_options->horizontal : 'false');\n $alpha = (isset($ambient_logic_map_options->alpha) && !empty($ambient_logic_map_options->alpha) ? $ambient_logic_map_options->alpha : 0.5);\n\n // Include the template.\n include(__DIR__ .'/template.php');\n}", "title": "" }, { "docid": "af2e858ee6a374388301ec251b6cc1a7", "score": "0.56126416", "text": "function map($options=null){\n\t\tif($options!=null) extract($options);\n\t\tif(!isset($id)) \t\t$width=$this->defaultId;\n\t\tif(!isset($width)) \t\t$width=$this->defaultWidth;\n\t\tif(!isset($height)) \t$height=$this->defaultHeight;\t\n\t\tif(!isset($zoom)) \t\t$zoom=$this->defaultZoom;\t\t\t\n\t\tif(!isset($type)) \t\t$type=$this->defaultType;\n\t\tif(!isset($custom))\t\t$custom = $this->defaultCustom;\t\t\n\t\tif(!isset($localize)) \t$localize=$this->defaultLocalize;\t\t\n\t\tif(!isset($marker)) \t$marker=$this->defaultMarker;\t\t\n\t\tif(!isset($markerIcon)) $markerIcon=$this->defaultMarkerIcon;\n\t\tif(!isset($markerShadow)) $markerShadow = $this->defaultMarkerShadow;\n\t\tif(!isset($markerTitle)) $markerTitle=$this->defaultmarkerTitle;\t\n\t\tif(!isset($infoWindow)) $infoWindow=$this->defaultInfoWindow;\t\n\t\tif(!isset($windowText)) $windowText=$this->defaultWindowText;\t\n\n\t\t$map = \"<div id='$id' style='$style'></div>\";\n\t\t$map .=\"\n\t\t\t<script>\n\t\t\tvar markers = new Array();\n\t\t\tvar markersIds = new Array();\n\t\t\tvar geocoder = new google.maps.Geocoder();\n\t\t\tfunction geocodeAddress(address, action, map,markerId, markerTitle, markerIcon, markerShadow, windowText) {\n\t\t\t geocoder.geocode( { 'address': address}, function(results, status) {\n\t\t\t if (status == google.maps.GeocoderStatus.OK) {\n\t\t\t \t//alert(results[0].geometry.location);\n\t\t\t \tif(action =='setCenter'){\n\t\t\t \t\tsetCenterMap(results[0].geometry.location);\n\t\t\t \t}\n\t\t\t \tif(action =='setMarker'){\n\t\t\t \t\tsetMarker(map,markerId,results[0].geometry.location,markerTitle, markerIcon, markerShadow,windowText);\n\t\t\t \t}\n\t\t\t } else {\n\t\t\t alert('Geocode was not successful for the following reason: ' + status);\n\t\t\t return null;\n\t\t\t }\n\t\t\t });\n\t\t\t}\";\n\t\t\n\t\t$map .= \"\n\t\t\tvar initialLocation;\n\t\t var browserSupportFlag = new Boolean();\n\t\t var {$id};\n\t\t var myOptions = {\n\t\t zoom: {$zoom},\n\t\t mapTypeId: google.maps.MapTypeId.{$type}\n\t\t \".(($custom != \"\")? \",$custom\" : \"\").\"\n\t\t \n\t\t };\n\t\t {$id} = new google.maps.Map(document.getElementById('$id'), myOptions);\n\t\t\";\n\t\t$map.=\"\n\t\t\tfunction setCenterMap(position){\n\t\t\";\n\t\tif($localize) $map .= \"localize();\"; \n\t\telse {\n\t\t\t$map .= \"{$id}.setCenter(position);\";\n\t\t\tif($marker) $map .= \"setMarker({$id},'center',position,'{$markerTitle}','{$markerIcon}','{$markerShadow}','{$windowText}');\";\n\t\t}\n\t\t$map .=\"\n\t\t\t}\n\t\t\";\n\t\tif(isset($latitude) && isset($longitude)) $map .=\"setCenterMap(new google.maps.LatLng({$latitude}, {$longitude}));\";\n\t\telse if(isset($address)) $map .=\"geocodeAddress('{$address}','setCenter') ; \";\n\t\telse $map .=\"setCenterMap(new google.maps.LatLng({$this->defaultLatitude}, {$this->defaultLongitude}));\";\n\t\t$map .= \"\n\t\t\tfunction localize(){\n\t\t if(navigator.geolocation) { // Try W3C Geolocation method (Preferred)\n\t\t browserSupportFlag = true;\n\t\t navigator.geolocation.getCurrentPosition(function(position) {\n\t\t initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);\n\t\t {$id}.setCenter(initialLocation);\";\n\t\t\t\t\t if($marker) $map .= \"setMarker({$id},'center',initialLocation,'{$markerTitle}','{$markerIcon}','{$markerShadow}','{$windowText}');\";\n\t\t \n\t\t $map .= \"}, function() {\n\t\t handleNoGeolocation(browserSupportFlag);\n\t\t });\n\t\t \n\t\t } else if (google.gears) { // Try Google Gears Geolocation\n\t\t browserSupportFlag = true;\n\t\t var geo = google.gears.factory.create('beta.geolocation');\n\t\t geo.getCurrentPosition(function(position) {\n\t\t initialLocation = new google.maps.LatLng(position.latitude,position.longitude);\n\t\t {$id}.setCenter(initialLocation);\";\n\t\t\t\t\t if($marker) $map .= \"setMarker({$id},'center',initialLocation,'{$markerTitle}','{$markerIcon}','{$markerShadow}','{$windowText}');\"; \n\t\t \n\t\t $map .= \"}, function() {\n\t\t handleNoGeolocation(browserSupportFlag);\n\t\t });\n\t\t } else {\n\t\t // Browser doesn't support Geolocation\n\t\t browserSupportFlag = false;\n\t\t handleNoGeolocation(browserSupportFlag);\n\t\t }\n\t\t }\n\t\t \n\t\t function handleNoGeolocation(errorFlag) {\n\t\t if (errorFlag == true) {\n\t\t initialLocation = noLocation;\n\t\t contentString = \\\"Error: The Geolocation service failed.\\\";\n\t\t } else {\n\t\t initialLocation = noLocation;\n\t\t contentString = \\\"Error: Your browser doesn't support geolocation.\\\";\n\t\t }\n\t\t {$id}.setCenter(initialLocation);\n\t\t {$id}.setZoom(3);\n\t\t }\";\n\n\t\t $map .= \"\n\t\t\tfunction setMarker(map,id,position,title,icon,shadow,content){\n\t\t\t\tvar index = markers.length;\n\t\t\t\tmarkersIds[markersIds.length] = id;\n\t\t\t\tmarkers[index] = new google.maps.Marker({\n\t\t position: position,\n\t\t map: map,\n\t\t icon: icon,\n\t\t shadow: shadow,\n\t\t title:title\n\t\t });\n\t\t \tif(content != ''){\n\t\t\t \tvar infowindow = new google.maps.InfoWindow({\n\t\t\t content: content\n\t\t\t });\n\t\t\t \tgoogle.maps.event.addListener(markers[index], 'click', function() {\n\t\t\t\t\t\tinfowindow.open(map,markers[index]);\n \t\t\t});\n\t\t }\n\t\t }\";\n\n\t\t$map .= \"</script>\";\n\t\treturn $map;\n\t}", "title": "" }, { "docid": "cb979464cd3bc6dc507862c0c7da8951", "score": "0.56022316", "text": "public function init()\n {\n parent::init();\n\n // prevent init of map if no query\n $request = Controller::curr()->getRequest();\n if (!$this->getTrigger($request) && !$this->ShowResultsDefault) {\n return;\n }\n\n $locations = $this->getLocations();\n\n // prevent init of map if there are no locations\n if (!$locations) {\n return;\n }\n\n // google maps api key\n $key = Config::inst()->get(GoogleGeocoder::class, 'map_api_key');\n Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key);\n\n $mapSettings = [\n 'fullMapStart' => true,\n 'maxDistance' => true,\n 'storeLimit' => -1,\n 'originMarker' => true,\n 'slideMap' => false,\n 'distanceAlert' => -1,\n 'featuredLocations' => false,\n 'defaultLat' => 0,\n 'defaultLng' => 0,\n 'mapSettings' => [\n 'zoom' => 12,\n 'mapTypeId' => 'google.maps.MapTypeId.ROADMAP',\n 'disableDoubleClickZoom' => true,\n 'scrollwheel' => false,\n 'navigationControl' => false,\n 'draggable' => false,\n ],\n ];\n\n $mapSettings['listTemplatePath'] = $this->getListTemplate();\n $mapSettings['infowindowTemplatePath'] = $this->getInfoWindowTemplate();\n $mapSettings['lengthUnit'] = $this->data()->Unit == 'km' ? 'km' : 'm';\n $mapSettings['mapID'] = Config::inst()->get(LocatorController::class, 'map_container');\n $mapSettings['locationList'] = Config::inst()->get(LocatorController::class, 'list_container');\n\n if ($locations->filter('Featured', true)->count() > 0) {\n $mapSettings['featuredLocations'] = true;\n }\n\n // map config based on user input in Settings tab\n $limit = Config::inst()->get(LocatorController::class, 'limit');\n if (0 < $limit) {\n $mapSettings['storeLimit'] = $limit;\n }\n\n if ($coords = $this->getAddressSearchCoords()) {\n $mapSettings['defaultLat'] = $coords->getField(\"Lat\");\n $mapSettings['defaultLat'] = $coords->getField(\"Lng\");\n }\n\n // pass GET variables to xml action\n $vars = $this->request->getVars();\n unset($vars['url']);\n $url = '';\n if (count($vars)) {\n $url .= '?' . http_build_query($vars);\n }\n $mapSettings['dataLocation'] = Controller::join_links($this->Link(), 'xml.xml', $url);\n\n if ($stylePath = $this->getMapStyleJSONPath()) {\n if ($style = file_get_contents($stylePath)) {\n $mapSettings['mapSettings']['styles'] = json_decode($style);\n }\n }\n\n if ($imagePath = $this->getMarkerIcon()) {\n $mapSettings['markerImg'] = $imagePath;\n }\n\n $this->extend('modifyMapSettings', $mapSettings);\n\n $encoded = json_encode($mapSettings, JSON_UNESCAPED_SLASHES);\n // mapTypeId is a javascript object\n $encoded = preg_replace('/(\"mapTypeId\"\\s*:\\s*)\"(.+?)\"/i', '$1$2', $encoded);\n\n $this->extend('modifyMapSettingsEncoded', $encoded);\n // init map\n Requirements::customScript(\"\n $(function(){\n $('#map-container').storeLocator({$encoded});\n });\n \", 'jquery-locator');\n }", "title": "" }, { "docid": "231ff596dedbe7035fa99bf67b7e0694", "score": "0.5594131", "text": "public function form_settings_radius( $gmw_forms, $formID, $section, $option ) {\n\t?>\t\t\n\t\t<div>\n\t\t\t<p>\n\t\t\t\t<?php echo _e('Radius Values: ','GMW-PS'); ?>\n <input id=\"setting-radius\" class=\"regular-text\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][radius]'; ?>\" size=\"30\" type=\"text\" value=\"<?php echo ( isset( $gmw_forms[$formID][$section]['radius'] ) && !empty( $gmw_forms[$formID][$section]['radius']) ) ? $gmw_forms[$formID][$section]['radius'] : '5,10,15,25,50,100'; ?>\" />\n </p>\n <p>\n\t\t\t\t<input type=\"checkbox\" value=\"1\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][radius_slider][use]'; ?>\" <?php echo (isset( $gmw_forms[$formID][$section]['radius_slider']['use'] ) ) ? \" checked=checked \" : \"\"; ?>>\n\t\t\t\t<label><?php echo _e('Use field as a Slider?','GMW-PS'); ?></label>\n\t\t\t</p>\n <p>\n\t\t\t\t<?php echo _e('Slider Default values: ','GMW-PS'); ?>\n <input id=\"setting-radius\" class=\"regular-text\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][radius_slider][default_value]'; ?>\" size=\"5 \" type=\"text\" value=\"<?php echo ( isset( $gmw_forms[$formID][$section]['radius_slider']['default_value'] ) && !empty( $gmw_forms[$formID][$section]['radius_slider']['default_value']) ) ? $gmw_forms[$formID][$section]['radius_slider']['default_value'] : '50'; ?>\" />\n\t\t\t</p>\n\t\t</div>\n\t<?php \n\t}", "title": "" }, { "docid": "ff3e5fa61258eb0ef7267866ae5cec43", "score": "0.55937535", "text": "function church_admin_general_settings()\n {\n\t$display='display:none';\n\tif(!empty($_POST['save-general-settings']))\t\n\t{\n\t\tupdate_option('church_admin_pdf_size',$_POST['pdf_size']);\n\t\tif(empty($_POST['use_prefix'])){update_option('church_admin_use_prefix',FALSE);}else{update_option('church_admin_use_prefix',TRUE);}\n\t\tif(empty($_POST['use_middle'])){update_option('church_admin_use_middle_name',FALSE);}else{update_option('church_admin_use_middle_name',TRUE);}\n\t\tif(empty($_POST['use_nickname'])){update_option('church_admin_use_nickname',FALSE);}else{update_option('church_admin_use_nickname',TRUE);}\n\t\tif(!empty($_POST['google_api']))update_option('church_admin_google_api_key',$_POST['google_api']);\n\t\tif(!empty($_POST['pagination']))update_option('church_admin_pagination_limit',intval($_POST['pagination']));\n\t\t if(isset($_POST['church_admin_calendar_width']) && ctype_digit($_POST['calendar_width']))update_option('church_admin_calendar_width',$_POST['calendar_width']);\t\n\t\tif(isset($_POST['church_admin_label']))\n\t\t{\n\t\tswitch($_POST['church_admin_label'])\n\t\t{\n\t\t\tcase 'L7163': $option='L7163';break;\n\t\t\tcase '5160': $option='5160';break;\n\t\t\tcase '5161': $option='5161';break;\n\t\t\tcase '5162': $option='5162';break;\n\t\t\tcase '5163': $option='5163';break;\n\t\t\tcase '5164': $option='5164';break;\n\t\t\tcase '8600': $option='8600';break;\n\t\t\tcase '3422': $option='3422';break;\n\t\t\tdefault :$option='L7163';break;\n\t\t}\n\t\tupdate_option('church_admin_label',$option);\n\t\t}else{delete_option('church_admin_label');}\n\t\techo'<div class=\"notice notice-success inline\"><p>'.__('General Settings updated','church-admin').'</p></div>';\n\t\t$display='display:block';\n\t}\n\t\n\n\t\techo'<h2 class=\"general-settings\">'.__('General Settings (Click to toggle)','church-admin').'</h2>';\n\t\techo'<div class=\"ca-general\" style=\"'.$display.'\">';\n\t\techo'<form action=\"\" method=\"POST\"><table class=\"form-table\"><tbody>';\n\t\techo'<tr><th scope=\"row\">'.__('Use prefix for names','church-admin').'</th><td><input type=\"checkbox\" name=\"use_prefix\" value=\"TRUE\" ';\n\t\t$prefix=get_option('church_admin_use_prefix');\n\t\tif($prefix) echo ' checked=\"checked\" ';\n\t\techo '/></td></tr>';\n\t\techo'<tr><th scope=\"row\">'.__('Use middle name for names','church-admin').'</th><td><input type=\"checkbox\" name=\"use_middle\" value=\"TRUE\" ';\n\t\t$middle=get_option('church_admin_use_middle_name');\n\t\tif($middle) echo ' checked=\"checked\"';\n\t\techo '/></td></tr>';\n\t\techo'<tr><th scope=\"row\">'.__('Add nickname for names','church-admin').'</th><td><input type=\"checkbox\" name=\"use_nickname\" value=\"TRUE\" ';\n\t\t$nickname=get_option('church_admin_use_nickname');\n\t\tif($nickname)echo ' checked=\"checked\"';\n\t\techo '/></td></tr>';\t\t\n\t\techo'<tr><th scope=\"row\">'.__('Google Maps API key','church-admin').'</th><td><input type=\"text\" name=\"google_api\" value=\"'.get_option('church_admin_google_api_key').'\"/></td></tr>';\n\t\t\n\t\techo'<tr><th scope=\"row\">'.__('Directory Records per page','church-admin').'</th><td><input type=\"text\" name=\"pagination\" value=\"'.get_option('church_admin_pagination_limit').'\"/></td></tr>';\n\t\techo '<tr><th scope=\"row\">'.__('Calendar width in pixels','church-admin').'</th><td><input type=\"text\" name=\"calendar_width\" value=\"'.get_option('church_admin_calendar_width').'\"/></td></tr>';\n\t\techo '<tr><th scope=\"row\">'.__('PDF Page Size','church-admin').'</th><td><select name=\"pdf_size\">';\n\t\t$pdf_size=get_option('church_admin_pdf_size');\n\t\techo'<option value=\"A4\" '.selected($pdf_size,'A4').'>A4</option>';\n\t\techo'<option value=\"Letter\" '.selected($pdf_size,'Letter').'>Letter</option>';\n\t\techo'<option value=\"Legal\" '.selected($pdf_size,'Legal').'>Legal</option>';\n\t\techo'</select></td></tr>';\n\t\techo '<tr><th scope=\"row\">Avery &#174; Label</th><td><select name=\"church_admin_label\">';\n\n\t\t$l=get_option('church_admin_label');\n\t\techo'<option value=\"L7163\"';\n\t\tif($l=='L7163') echo' selected=\"selected\" ';\n\t\techo'>L7163</option>';\n\t\techo'<option value=\"5160\"';\n\t\tif($l=='5160') echo' selected=\"selected\" ';\n\t\techo'>5160</option>';\n\t\techo'<option value=\"5161';\n\t\tif($l=='5161') echo' selected=\"selected\" ';\n\t\techo'>5161</option>';\n\t\techo'<option value=\"5162\"';\n\t\tif($l=='5162') echo' selected=\"selected\" ';\n\t\techo'>5162</option>';\n\t\techo'<option value=\"5163\"';\n\t\tif($l=='5163') echo' selected=\"selected\" ';\n\t\techo'>5163</option>';\n\t\techo'<option value=\"5164\"';\n\t\tif($l=='5164') echo' selected=\"selected\" ';\n\t\techo'>5164</option>';\n\t\techo'<option value=\"8600\"';\n\t\tif($l=='8600') echo' selected=\"selected\" ';\n\t\techo'>8600</option>';\n\t\techo'<option value=\"3422\"';\n\t\tif($l=='3422') echo' selected=\"selected\" ';\n\t\techo'>3422</option></select></td></tr>';\n\t\t\n\t\techo'<tr><th scope=\"row\" >&nbsp;</th><td><input type=\"hidden\" name=\"save-general-settings\" value=\"1\"/><input class=\"button-primary\" type=\"submit\" value=\"'.__('Save Settings','church-admin').' &raquo;\" /></td></tr></tbody></table></form>';\n\t\techo'<script>jQuery(document).ready(function($) {$(\".general-settings\").click(function(){$(\".ca-general\").toggle();});});</script><hr/>';\n\n\t\n\t \n\t \n }", "title": "" }, { "docid": "81b2fd89e6898434e3b05cf465d77210", "score": "0.5591157", "text": "function precision16_grid_settings_form($settings) {\n $form = array();\n\n $form['id'] = array(\n '#type' => 'textfield',\n '#title' => t('CSS id'),\n '#description' => t('Enter a string to be used as the id attribute.'),\n '#default_value' => isset($settings['id']) ? $settings['id'] : '',\n );\n\n $form['class'] = array(\n '#type' => 'textfield',\n '#title' => t('CSS classes'),\n '#description' => t('Enter a string to be used as the class attribute. Additional classes will be added from the settings below.'),\n '#default_value' => isset($settings['class']) ? $settings['class'] : '',\n );\n\n $form['grid'] = array(\n '#type' => 'select',\n '#title' => t('Width'),\n '#description' => t('Choose the width for this element (measured in grids).'),\n '#options' => precision16_grid_get_options('grid'),\n '#default_value' => isset($settings['grid']) ? $settings['grid'] : '',\n );\n\n $form['prefix'] = array(\n '#type' => 'select',\n '#title' => t('Prefix'),\n '#description' => t('Choose how much to prefix this element (measured in grids).'),\n '#options' => precision16_grid_get_options('prefix'),\n '#default_value' => isset($settings['prefix']) ? $settings['prefix'] : '',\n );\n\n $form['suffix'] = array(\n '#type' => 'select',\n '#title' => t('Suffix'),\n '#description' => t('Choose how much to suffix this element (measured in grids).'),\n '#options' => precision16_grid_get_options('suffix'),\n '#default_value' => isset($settings['suffix']) ? $settings['suffix'] : '',\n );\n\n $form['pad'] = array(\n '#type' => 'select',\n '#title' => t('Padding'),\n '#description' => t('Choose how much to pad this element (measured in grids).'),\n '#options' => precision16_grid_get_options('pad'),\n '#default_value' => isset($settings['pad']) ? $settings['pad'] : '',\n );\n\n $form['push'] = array(\n '#type' => 'select',\n '#title' => t('Push'),\n '#description' => t('Choose how much to push this element (measured in grids).'),\n '#options' => precision16_grid_get_options('push'),\n '#default_value' => isset($settings['push']) ? $settings['push'] : '',\n );\n\n $form['pull'] = array(\n '#type' => 'select',\n '#title' => t('Pull'),\n '#description' => t('Choose how much to pull this element (measured in grids).'),\n '#options' => precision16_grid_get_options('pull'),\n '#default_value' => isset($settings['pull']) ? $settings['pull'] : '',\n );\n\n $form['alpha'] = array(\n '#type' => 'checkbox',\n '#title' => t('Alpha'),\n '#description' => t('Check if this is the first child element of another.'),\n '#default_value' => isset($settings['alpha']) ? $settings['alpha'] : FALSE,\n );\n\n $form['omega'] = array(\n '#type' => 'checkbox',\n '#title' => t('Omega'),\n '#description' => t('Check if this is the last child element of another.'),\n '#default_value' => isset($settings['omega']) ? $settings['omega'] : FALSE,\n );\n\n return $form;\n}", "title": "" }, { "docid": "f69cc117e6d278242902b7ac11239ef5", "score": "0.5584475", "text": "function map($options = array()) {\n\t\t$this->reset();\n\t\t$options = $this->_currentOptions = Set::merge($this->_defaultOptions, $options);\n\n\t\tif (!empty($options['autoScript'])) {\n\t\t\t$this->Html->script($this->apiUrl(), array('inline'=>false));\n\t\t\t//http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js\n\t\t\t//http://code.google.com/apis/gears/gears_init.js\n\t\t}\n\n\t\t$map = \"\n\t\t\tgMarkers\".self::$MAP_COUNT.\" = new Array();\n\t\t\tgInfoWindows\".self::$MAP_COUNT.\" = new Array();\n\t\t\t/*gWindows\".self::$MAP_COUNT.\" = new Array();*/\n\t\t\tvar noLocation = new google.maps.LatLng(\".$options['map']['lat'].\", \".$options['map']['lng'].\");\n\t\t\tvar initialLocation;\n\t\t\tvar browserSupportFlag = new Boolean();\n\t\t\tvar myOptions = \".$this->_mapOptions().\";\n\t\t\";\n\n\t\t#rename \"map_canvas\" to \"map_canvas1\", ... if multiple maps on one page\n\t\tif (in_array($options['div']['id'], $this->mapIds)) {\n\t\t\t$options['div']['id'] .= '-1'; //TODO: improve\n\t\t}\n\t\t$this->mapIds[] = $options['div']['id'];\n\n\t\t$map .= \"\n\t\t\tvar \".$this->name().\" = new google.maps.Map(document.getElementById(\\\"\".$options['div']['id'].\"\\\"), myOptions);\n\t\t\t\";\n\t\t$this->map = $map;\n\n\t\t$result = '';\n\t\tif (!isset($options['div']) || $options['div'] !== false) {\n\t\t\t$options['div']['style'] = '';\n\t\t\tif (empty($options['div']['width'])) {\n\t\t\t\t$options['div']['width'] = '100%';\n\t\t\t}\n\t\t\tif (empty($options['div']['height'])) {\n\t\t\t\t$options['div']['height'] = '400px';\n\t\t\t}\n\t\t\tif (empty($options['div']['class'])) {\n\t\t\t\t$options['div']['class'] = 'map';\n\t\t\t}\n\t\t\tif (is_int($options['div']['width'])) {\n\t\t\t\t$options['div']['width'] .= 'px';\n\t\t\t}\n\t\t\tif (is_int($options['div']['height'])) {\n\t\t\t\t$options['div']['height'] .= 'px';\n\t\t\t}\n\t\t\t\n\t\t\t$options['div']['style'] .= 'width: '.$options['div']['width'].';';\n\t\t\t$options['div']['style'] .= 'height: '.$options['div']['height'].';';\n\t\t\tunset($options['div']['width']); unset($options['div']['height']);\n\n\t\t\t$defaultText = isset($options['content']) ? h($options['content']) : __('Map cannot be displayed!', true); \n\t\t\t$result = $this->Html->tag('div', $defaultText, $options['div']);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6b2f8c2213b025656b566e794469deb9", "score": "0.55801284", "text": "function ti_amg_fw_custom_spot_im_settings_form() {\n // Settings for Spot-IM in Food&Wine.\n $form['spotim_enable'] = array(\n '#title' => 'Spot-IM Settings',\n '#type' => 'fieldset',\n );\n $form['spotim_enable']['spot_id'] = array(\n '#type' => 'textfield',\n '#title' => t('Spot ID'),\n '#default_value' => variable_get('spot_id', ''),\n );\n $form['spotim_enable']['enable_spot_im'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable Spot-IM in F&W.'),\n '#default_value' => variable_get('enable_spot_im', TRUE),\n );\n $form['spotim_enable']['schema_api'] = array(\n '#type' => 'textfield',\n '#title' => t('Schema API'),\n '#default_value' => variable_get('schema_api', ''),\n );\n $form['spotim_enable']['spotim_log_file'] = array(\n '#type' => 'textfield',\n '#title' => t('Log file'),\n '#description' => t('Provided log file will be created at sites/default/files'),\n '#default_value' => variable_get('spotim_log_file', ''),\n );\n $form['spotim_enable']['enable_custom_log'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable custom log to store issues on connecting schema API.'),\n '#default_value' => variable_get('enable_custom_log', FALSE),\n );\n return system_settings_form($form);\n}", "title": "" }, { "docid": "bc260d582054fd35b107ddb64701b989", "score": "0.5577932", "text": "function init_form_fields() {\n\n //fileds for the modal form from the Zones window\n $this->instance_form_fields = array(\n 'title' => array(\n 'title' => __( 'Tiêu đề', QUANGTRUNG_TEXTDOMAIN ),\n 'type' => 'text',\n 'description' => __( 'Tiêu đề hiển thị trang ngoài', QUANGTRUNG_TEXTDOMAIN ),\n 'default' => __( 'Vận chuyển theo cân nặng', QUANGTRUNG_TEXTDOMAIN )\n ),\n 'cost' => array(\n 'title' => __( 'Giá', QUANGTRUNG_TEXTDOMAIN ),\n 'type' => 'number',\n 'description' => __( 'Giá giao hàng', QUANGTRUNG_TEXTDOMAIN ),\n 'default' => 4000\n ),\n );\n\n //$this->form_fields - use this with the same array as above for setting fields for separate settings page\n }", "title": "" }, { "docid": "f4024838ea33f19594a081dba0794fa2", "score": "0.5577618", "text": "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n $setting['note'] = $this->settingDefault['note'];\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n 'show_title'\t=> array('type' => 'select', 'options' => ArrayHelper::get10()),\n \t\t'class'\t=> array(),\n 'limit'\t=> array('type' => 'number', 'placeholder' => $this->settingDefault['limit'], 'label' => 'Số lượng'),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "title": "" }, { "docid": "51548cc3e5197b3eed6f63eaa7226ef5", "score": "0.5575901", "text": "function layersc_map( $atts, $content = null ) {\r\n\tglobal $optimizer;\r\n\tif(!empty($optimizer['map_api'])){ $mapkey = 'https://maps.googleapis.com/maps/api/js?key='.$optimizer['map_api'].''; }else{ $mapkey = 'https://maps.googleapis.com/maps/api/js?sensor=false';}\r\n\t\r\n\twp_enqueue_script('optimizer_map',get_template_directory_uri().'/assets/js/map-styles.js', array('jquery'),'1.0', true);\r\n\twp_enqueue_script('optimizer_googlemaps', $mapkey, array('jquery'),'1.0', true);\r\n\textract(shortcode_atts(array(\r\n\t\t'latitude' => '53.359286' , \r\n\t\t'longitude' => '-2.040904', \r\n\t\t'text' => 'Your Location Details.',\r\n\t\t'height' => '300px',\r\n\t\t'class' => '',\r\n\t), $atts));\r\n\t\r\n\tif(is_customize_preview()){ $nonedit = 'mceNonEditable blockshortcode';}else{$nonedit = '';}\r\n\t\r\n\treturn '<div class=\"lts_map_wrap '.$class.' '.$nonedit.'\" style=\"height:'.$height.'\"><div data-map-lat=\"'.$latitude.'\" data-map-long=\"'.$longitude.'\" data-map-text=\"'.$text.'\" class=\"lts_map\"></div></div>';\r\n\r\n}", "title": "" }, { "docid": "243f7a8492f42d77fd4b49bbbb1141dd", "score": "0.5571773", "text": "protected function getConfigForm()\n {\n $firstOption = array(\n array(\n 'id_cms' => 0,\n 'meta_title' => '---'\n )\n );\n\n $cmsOptions = CMS::listCms();\n\n $cms = array_merge($firstOption, $cmsOptions);\n\n $base = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => '<i class=\"icon-wrench\" style=\"color: #2eacce;\"></i><span style=\"font-size: 17px;\n color: #2eacce;font-weight:bold;margin-top:30px;display:inline-block;\">\n &nbsp;&nbsp;'.$this->l(\"Position\").'</span>',\n 'name' => 'firstline',\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Position'),\n 'name' => 'PC_CC_POSITION',\n 'required' => true,\n 'values' => array(\n array(\n 'id' => 'banner_bottom',\n 'value' => 'banner_bottom',\n 'label' => $this->l('Banner bottom')\n ),\n array(\n 'id' => 'banner_top',\n 'value' => 'banner_top',\n 'label' => $this->l('Banner top')\n ),\n array(\n 'id' => 'banner_top_pushdown',\n 'value' => 'banner_top_pushdown',\n 'label' => $this->l('Banner top (pushdown)')\n ),\n array(\n 'id' => 'floating_left',\n 'value' => 'floating_left',\n 'label' => $this->l('Floating left')\n ),\n array(\n 'id' => 'floating_right',\n 'value' => 'floating_right',\n 'label' => $this->l('Floating right')\n ),\n ),\n ),\n array(\n 'type' => 'text',\n 'label' => '<i class=\"icon-desktop\" style=\"color: #2eacce;\"></i><span style=\"font-size: 17px;\n color: #2eacce;font-weight:bold;margin-top:30px;display:inline-block;\">\n &nbsp;&nbsp;'.$this->l(\"Layout\").'</span>',\n 'name' => 'secondline',\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Layout'),\n 'name' => 'PC_CC_LAYOUT',\n 'required' => true,\n 'values' => array(\n array(\n 'id' => 'block',\n 'value' => 'block',\n 'label' => $this->l('Block')\n ),\n array(\n 'id' => 'classic',\n 'value' => 'classic',\n 'label' => $this->l('Classic')\n ),\n array(\n 'id' => 'edgeless',\n 'value' => 'edgeless',\n 'label' => $this->l('Edgeless')\n ),\n array(\n 'id' => 'wire',\n 'value' => 'wire',\n 'label' => $this->l('Wire')\n ),\n ),\n ),\n array(\n 'type' => 'text',\n 'label' => '<i class=\"icon-pencil\" style=\"color: #2eacce;\"></i><span style=\"font-size: 17px;\n color: #2eacce;font-weight:bold;margin-top:30px;display:inline-block;\">\n &nbsp;&nbsp;'.$this->l(\"Pallette\").'</span>',\n 'name' => 'thirdline',\n ),\n array(\n 'type' => 'color',\n 'label' => $this->l('Banner'),\n 'name' => 'PC_CC_COLOR_BANNER',\n 'col' => '3'\n ),\n array(\n 'type' => 'color',\n 'label' => $this->l('Banner text'),\n 'name' => 'PC_CC_COLOR_BANNER_TEXT',\n 'col' => '3'\n ),\n array(\n 'type' => 'color',\n 'label' => $this->l('Button'),\n 'name' => 'PC_CC_COLOR_BUTTON',\n 'col' => '3'\n ),\n array(\n 'type' => 'color',\n 'label' => $this->l('Button text'),\n 'name' => 'PC_CC_COLOR_BUTTON_TEXT',\n 'col' => '3'\n ),\n array(\n 'type' => 'text',\n 'label' => '<i class=\"icon-external-link\" style=\"color: #2eacce;\"></i><span style=\"font-size: 17px;\n color: #2eacce;font-weight:bold;margin-top:30px;display:inline-block;\">\n &nbsp;&nbsp;'.$this->l(\"Learn more link\").'</span>',\n 'name' => 'fourthline',\n ),\n array(\n 'type' => 'radio',\n 'label' => $this->l('Learn more link'),\n 'name' => 'PC_CC_LINK',\n 'values' => array(\n array(\n 'id' => 'default',\n 'value' => 'default',\n 'label' => $this->l('Link to'). ' cookiesandyou.com'\n ),\n array(\n 'id' => 'custom',\n 'value' => 'custom',\n 'label' => $this->l('Your own CMS page')\n ),\n ),\n ),\n array(\n 'type' => 'select',\n 'label' => $this->l('Your cookie policy CMS page'),\n 'name' => 'PC_CC_LINK_CUSTOM',\n 'options' => array(\n 'query' => $cms,\n 'id' => 'id_cms',\n 'name' => 'meta_title',\n )\n ),\n array(\n 'type' => 'text',\n 'label' => '<i class=\"icon-book\" style=\"color: #2eacce;\"></i><span style=\"font-size: 17px;\n color: #2eacce;font-weight:bold;margin-top:30px;display:inline-block;\">\n &nbsp;&nbsp;'.$this->l(\"Content\").'</span>',\n 'name' => 'fifthline',\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n\n foreach (Language::getLanguages() as $lang) {\n $base['form']['input'][] = array(\n 'type' => 'text',\n 'label' => $this->l('Cookie consent message').'<br /><small>'.$this->l('for language'). ' <strong>'.$lang['name'].'</strong></small>',\n 'name' => 'PC_CC_TEXT_MESSAGE_'.$lang['id_lang'],\n );\n\n $base['form']['input'][] = array(\n 'type' => 'text',\n 'label' => $this->l('Button text').'<br /><small>'.$this->l('for language'). ' <strong>'.$lang['name'].'</strong></small>',\n 'name' => 'PC_CC_TEXT_BUTTON_'.$lang['id_lang'],\n );\n\n $base['form']['input'][] = array(\n 'type' => 'text',\n 'label' => $this->l('Learn more text').'<br /><small>'.$this->l('for language'). ' <strong>'.$lang['name'].'</strong></small>',\n 'name' => 'PC_CC_TEXT_LINK_'.$lang['id_lang'],\n );\n }\n\n return $base;\n }", "title": "" }, { "docid": "fb898a957f518c1494035cb1de256fe6", "score": "0.55621445", "text": "function wpgmaps_wizard_layout() {\n\n if (isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu-categories') {\n add_action('admin_print_scripts', 'wpgmaps_admin_wizard_scripts');\n }\n\n ?>\n <div class='wrap'>\n <h1><?php _e(\"Select a Map Type (beta)\", \"wp-google-maps\"); ?></h1>\n\n <style>.wpgmza-support-notice{display:none !important;}</style>\n <div class='wide'>\n <script>\n jQuery(document).ready(function(){\n jQuery('.wpgmza-listing-wizard-1').click(function(){\n if (jQuery(this).attr('id') == 'wpgmza_wizard_c_btn') {\n return;\n }\n jQuery('.wpgmza-listing-wizard-1').fadeIn('fast');\n jQuery('.wpgmza-listing-wizard-2').hide();\n jQuery(this).hide();\n jQuery(this).next(\".wpgmza-listing-wizard-2\").fadeIn('fast');\n });\n\n jQuery('#wpgmza_wizard_sl_btn').click(function(){\n var data = {\n map_title : \"Locator\",\n store_locator_enabled : \"1\",\n };\n\n if(jQuery('#wpgmza-wizard-sl-distance').is(':checked')){\n data.store_locator_distance = \"1\";\n }\n\n if(jQuery(\"#wpgmza-wizard-sl-bounce\").is(\":checked\")){\n data.wpgmza_store_locator_bounce = \"1\";\n data.wpgmza_sl_animation = \"1\";\n }\n\n if(jQuery(\"#wpgmza-wizard-sl-hide\").is(\":checked\")){\n data.wpgmza_store_locator_hide_before_search = \"1\";\n }\n\n wpgmzaCreateWizardMapRest(data);\n\n });\n\n jQuery('#wpgmza_wizard_gd_btn').click(function(){\n var data = {\n map_title : \"Directions\",\n directions_enabled : \"1\",\n default_to : jQuery('#wpgmza-wizard-gd-to-address').val()\n };\n\n wpgmzaCreateWizardMapRest(data);\n\n });\n\n jQuery('#wpgmza_wizard_ml_btn').click(function(){\n var data = {\n map_title : \"Listing\",\n wpgmza_listmarkers_by : jQuery('#wpgmza-wizard-ml-list-by-select').val()\n };\n\n wpgmzaCreateWizardMapRest(data);\n });\n\n jQuery('#wpgmza_wizard_c_btn').click(function(){\n wpgmzaCreateWizardMapRest();\n });\n\n <?php \n /* Developer Hook (Action) - Legacy hook for adding jQuery actions to wizard */\n do_action(\"wpgmza_wizard_jquery_action\", 10);\n ?>\n\n });\n\n function wpgmzaCreateWizardMapRest(data){\n if(typeof data === 'undefined'){\n data = {\n map_title: WPGMZA.localized_strings.new_map,\n map_start_lat: 36.778261,\n map_start_lng: -119.4179323999,\n map_start_zoom: 3\n };\n }\n\n WPGMZA.restAPI.call(\"/maps/\", {\n method: \"POST\",\n data: data,\n success: function(response, status, xhr) {\n window.location.href = window.location.href = \"admin.php?page=wp-google-maps-menu&action=edit&map_id=\" + response.id;\n }\n });\n }\n\n /**\n * Deprecated: 2020-12-22\n * Note: We now use the REST API to generate the map, before redirecting to the editor\n */\n function updateLink(buttonID, optionsArray){\n var queryString = \"?page=wp-google-maps-menu&action=new-wizard\";\n var valuesArray = new Array();\n queryString += \"&wpgmza_keys=\";\n\n var otherSettings = \"\";\n\n for(i = 0; i < optionsArray.length; i++){\n if(jQuery(optionsArray[i]).attr('wpgmza-other-setting')){\n //Handle this differently\n \n if(jQuery(optionsArray[i]).attr('wpgmza-dropdown') == \"true\"){\n otherSettings += jQuery(optionsArray[i]).attr('wpgmza-key') + \"@\" + (parseInt(jQuery(optionsArray[i] + \" option:selected\").attr('value'))) + (i < optionsArray.length -1 ? \"@\" : \"\");\n \n }else{\n otherSettings += jQuery(optionsArray[i]).attr('wpgmza-key') + \"@\" + (jQuery(optionsArray[i]).attr('checked') ? \"1\" : \"0\") + (i < optionsArray.length -1 ? \"@\" : \"\"); //Add key to other setting array\n }\n //console.log(jQuery(optionsArray[i]).attr('wpgmza-key'));\n }else{\n queryString += jQuery(optionsArray[i]).attr('wpgmza-key') + \",\" ; //Add key\n valuesArray.push(jQuery(optionsArray[i]).attr('checked'));\n }\n }\n\n //Now add 'OTHER SETTINGS'\n \n queryString += \"other_settings\";\n \n\n queryString += \"&wpgmza_values=\";\n for(i = 0; i < valuesArray.length; i++){\n if(jQuery(optionsArray[i]).attr('type') == \"checkbox\"){\n queryString += (valuesArray[i] ? \"1\" : \"0\") + (i < valuesArray.length-1 || otherSettings !== \"\" ? \",\": \"\"); //Add key\n }else if(jQuery(optionsArray[i]).attr('type') == \"text\"){\n queryString += (jQuery(optionsArray[i]).val()) + (i < valuesArray.length-1 || otherSettings !== \"\" ? \",\": \"\");\n }else if(jQuery(optionsArray[i]).attr('wpgmza-dropdown') == \"true\"){\n queryString += (parseInt(jQuery(optionsArray[i] + \" option:selected\").attr('value'))) + (i < valuesArray.length-1 || otherSettings !== \"\" ? \",\": \"\");\n }\n }\n\n //Now add 'OTHER SETTINGS'\n if(otherSettings != \"\"){\n queryString += otherSettings;\n }\n \n jQuery(buttonID).attr('url', queryString);\n }\n\n </script>\n\n <?php\n $wpgmza_wizard_content = \"<div id='wpgmza-wizard-options' class='wpgmza-flex'>\";\n\n /* Developer Hook (Filter) - Legacy, alter content of wizard page */\n $wpgmza_wizard_content = apply_filters(\"wpgmza_wizard_content_filter\", $wpgmza_wizard_content, 10, 1) ;\n $wpgmza_wizard_content .= '</div>';\n echo $wpgmza_wizard_content;\n ?> \n\n </div>\n </div>\n\n <?php\n \n\n}", "title": "" }, { "docid": "70ef50a75bd8bfec22a10edb111199d1", "score": "0.5556505", "text": "public function form_settings_address_fields( $gmw_forms, $formID, $section, $option ) {\n\t?>\n <div class=\"gmw-ssb\">\n <div id=\"gmw-af\">\n <table>\n <tr>\n <td style=\"background: #C2D7EF;padding:5px 15px;\"><?php _e( 'Usage','GMW-PS' ); ?></td>\n <td style=\"border:1px solid #bbb;padding:5px\">\n <input type=\"radio\" class=\"gmw-af-buttons\" id=\"gmw-af-single-btn\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields][how]'; ?>\" value=\"single\" <?php if ( !isset( $gmw_forms[$formID][$section]['address_fields']['how'] ) || $gmw_forms[$formID][$section]['address_fields']['how'] == 'single' ) echo 'checked=\"checked\"'; ?> /><?php _e( 'Single field','GMW-PS' ); ?>\n <span>\n <input type=\"radio\" style=\"margin-left:5px;\" class=\"gmw-af-buttons\" id=\"gmw-af-multiple-btn\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields][how]'; ?>\" value=\"multiple\" <?php if ( isset( $gmw_forms[$formID][$section]['address_fields']['how']) && $gmw_forms[$formID][$section]['address_fields']['how'] == 'multiple' ) echo 'checked=\"checked\"'; ?> /><?php _e( 'Multiple fields','GMW-PS' ); ?>\n </span>\n </td>\n </tr>\n </table>\n <div id=\"gmw-af-single\">\n\n <table class=\"gmw-saf-table\">\n <tr>\n <th>Field Type</th>\n <th>Field Actions</th>\n </tr>\n <tr>\n <td style=\"border:1px solid #bbb;padding:5px\">\n <?php echo _e( 'Address','GMW-PS' ); ?>\n </td>\n <td style=\"border:1px solid #bbb;padding:5px\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p>\n \t<label for=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_field][title]'; ?>\"><?php echo _e('Field label:','GMW-PS'); ?></label>\n \t<input type=\"text\" id=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_field][title]'; ?>\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_field][title]'; ?>\" size=\"40\" value=\"<?php if ( isset( $gmw_forms[$formID][$section]['address_field']['title']) ) echo $gmw_forms[$formID][$section]['address_field']['title']; else echo '' ; ?>\" />\t \n\t\t\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\t<p>\n \t<input type=\"checkbox\" value=\"1\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_field][within]'; ?>\" <?php echo ( isset( $gmw_forms[$formID][$section]['address_field']['within'])) ? \" checked=checked \" : \"\"; ?>>\t\n \t<?php echo _e('Label as placeholder','GMW-PS'); ?>\n\t\t\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\t<p>\n \t<input type=\"checkbox\" value=\"1\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_field][mandatory]'; ?>\" <?php echo (isset( $gmw_forms[$formID][$section]['address_field']['mandatory'])) ? \" checked=checked \" : \"\"; ?>>\t\n \t<label><?php echo _e('Mandatory Field','GMW-PS'); ?></label>\n </p>\n <p>\n\t\t\t\t\t\t\t\t\t\t <input type=\"checkbox\" value=\"1\" name=\"<?php echo 'gmw_forms['.$_GET['formID'].']['.$section.'][address_field][address_autocomplete]'; ?>\" <?php if ( isset( $gmw_forms[$formID][$section]['address_field']['address_autocomplete'] ) ) echo 'checked=\"checked\"'; ?>>\t\n\t\t\t\t\t\t\t\t\t\t <?php _e( 'Google Places address autocomplete', 'GMW-PS' ); ?>\n\t\t\t\t\t\t\t\t\t\t </p>\n </td>\n </tr>\n </table>\n </div>\n <div id=\"gmw-af-multiple\" style=\"display:none;\">\n\n <?php $addressFields = array('street','apt','city', 'state','zipcode','country'); ?>\n\n <table class=\"gmw-saf-table\">\n <tr>\n <th>Field Type</th>\n <th style=\"min-width:115px;\">Action</th>\n <th>Field Info</th>\n </tr>\n <?php foreach ($addressFields as $field ) : $sy = false;?>\n <tr class=\"gmw-saf\">\n <td>\n <span style=\"padding:0px 5px;font-size: 12px;text-transform: capitalize;\"><?php echo $field; ?></span>\n </td>\n <td style=\"padding:3px 5px\">\n <div style=\"float:left;padding:4px;\">\n <input type=\"radio\" class=\"gmw-saf-btn\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][on]'; ?>\" value=\"exclude\" <?php if ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['on'] ) && $gmw_forms[$formID][$section]['address_fields'][$field]['on'] == 'exclude' || empty( $gmw_forms[$formID][$section]['address_fields'][$field]['on']) || $gmw_forms[$formID][$section]['address_fields']['how'] == 'single' ) echo \" checked=checked \"; ?> />\t\n <span style=\"text-transform:capitalize\"><?php echo _e('Exclude','GMW-PS'); ?></span>\n\n <br />\n\n <input type=\"radio\" class=\"gmw-saf-btn\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][on]'; ?>\" value=\"include\" <?php if ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['on'] ) && $gmw_forms[$formID][$section]['address_fields'][$field]['on'] == 'include' && $gmw_forms[$formID][$section]['address_fields']['how'] == 'multiple' ) echo \" checked=checked \"; ?> />\t\n <span style=\"text-transform:capitalize\"><?php echo _e('Include','GMW-PS'); ?></span>\n\n <br />\n\n <input type=\"radio\" class=\"gmw-saf-btn\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][on]'; ?>\" value=\"default\" <?php if ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['on'] ) && $gmw_forms[$formID][$section]['address_fields'][$field]['on'] == 'default' && $gmw_forms[$formID][$section]['address_fields']['how'] == 'multiple' ) echo \" checked=checked \"; ?> />\t\n <span style=\"text-transform:capitalize\"><?php echo _e('Pre-defined Value','GMW-PS'); ?></span>\n\n </div>\n </td>\n\n <td style=\"min-width: 300px;padding:3px 5px\">\n <div class=\"gmw-saf-settings\" style=\"flaot:left\">\n <?php echo _e( 'Field Title:','GMW-PS' ); ?>\n <input type=\"text\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][title]'; ?>\" size=\"25\" value=\"<?php echo ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['title'] ) ) ? $gmw_forms[$formID][$section]['address_fields'][$field]['title'] : '' ; ?>\" />\n\n <br />\n\n <input type=\"checkbox\" value=\"1\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][within]'; ?>\" <?php if ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['within']) ) echo \" checked=checked \"; ?>>\t\n <label><?php echo _e('Within the address field','GMW-PS'); ?></label>\n\n <br />\n\n <input type=\"checkbox\" value=\"1\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][mandatory]'; ?>\" <?php if ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['mandatory']) ) echo \" checked=checked \"; ?>>\t\n <label><?php echo _e('Mandatory Field','GMW-PS'); ?></label>\n\n <?php /* &nbsp;&nbsp; | &nbsp;&nbsp;\n <input type=\"checkbox\" value=\"1\" name=\"<?php echo 'wppl_shortcode[' .$e_id .'][address_fields]['.$field.'][dropdown]'; ?>\" <?php if ( isset($option['address_fields'][$field]['dropdown']) ) echo \" checked=checked \"; ?>>\t\t\t\t\t\t\n <?php echo _e('Dropdown menu','GMW-PS'); ?>\n &nbsp;&nbsp; | &nbsp;&nbsp;\n <?php echo _e('dropdown Values:','GMW-PS'); ?>\n <textarea style=\"vertical-align:top;\" name=\"<?php echo 'wppl_shortcode[' .$e_id .'][address_fields]['.$field.'][drop_values]'; ?>\" ><?php if ( isset($option['address_fields'][$field]['drop_values']) ) echo $option['address_fields'][$field]['drop_values']; ?></textarea>\n */ ?>\n </div>\n <div class=\"gmw-saf-default\" style=\"flaot:left\">\n <?php echo _e('Default Value:','GMW-PS'); ?>\n <input type=\"text\" name=\"<?php echo 'gmw_forms[' .$_GET['formID'] .']['.$section.'][address_fields]['.$field.'][value]'; ?>\" size=\"15\" value=\"<?php if ( isset( $gmw_forms[$formID][$section]['address_fields'][$field]['value']) ) echo $gmw_forms[$formID][$section]['address_fields'][$field]['value']; ?>\" />\n </div>\n </td>\n </tr>\n <?php endforeach; ?>\n </table>\n </div>\n </div>\n </div>\n\n <?php \n\t}", "title": "" }, { "docid": "7d48e02f3715ab9b7fba7eabdac23da1", "score": "0.55564696", "text": "function Mx_google_map_upd( $switch = TRUE ) \n {\n\t\t$this->EE =& get_instance();\n\t\tif(defined('SITE_ID') == FALSE)\n\t\tdefine('SITE_ID', $this->EE->config->item('site_id'));\n }", "title": "" }, { "docid": "8b762e5009c485c8e9cca22d2356da9d", "score": "0.55515975", "text": "static function gmap_adress($element)\n\t\t{\t\n\t\t\t$defaults = array('address' => '', 'city' => '', 'country' => '', 'long' => '', 'lat' => '');\n\t\t\t$subvalues = isset($element['shortcode_data']) ? $element['shortcode_data'] : array();\n\t\t\t$values = array_merge($defaults, $subvalues);\n\t\t\t$visibility = \"\";\n\t\t\t\n\t\t\tif(!empty($subvalues['long']) || !empty($subvalues['lat']) ) $visibility = \"av-visible\";\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<label class=\"av-gmap-field av-gmap-addres\">'.__('Street address','avia_framework').' <input type=\"text\" class=\"'.$element['class'].'\" value=\"'.nl2br($values['address']).'\" id=\"address\" name=\"address\"/></label>';\n\t\t\t\n\t\t\t$output .= '<label class=\"av-gmap-field av-gmap-addres av_half av_first\">'.__('City','avia_framework').' <input type=\"text\" class=\"'.$element['class'].'\" value=\"'.nl2br($values['city']).'\" id=\"city\" name=\"city\"/></label>';\n\t\t\t\n\t\t\t$output .= '<label class=\"av-gmap-field av-gmap-addres av_half\">'.__('Country','avia_framework').' <input type=\"text\" class=\"'.$element['class'].'\" value=\"'.nl2br($values['country']).'\" id=\"country\" name=\"country\"/></label>';\n\t\t\t\n\t\t\t$class \t = 'button button-primary avia-js-google-coordinates av-google-fetch-button'.$element['class'];\n\t\t\t$output .= '<a href=\"#\" class=\"'.$class.'\" title=\"\">'.__('Enter Address, then fetch coordinates','avia_framework').'</a>';\n\t\t\t$output .= '<div class=\"av-gmap-coordinates '.$visibility.'\">';\n\t\t\t\n\t\t\t$output .= '<label class=\"av-gmap-field av_half av_first\">'.__('Longitude','avia_framework').' <input type=\"text\" class=\"'.$element['class'].'\" value=\"'.nl2br($values['long']).'\" id=\"long\" name=\"long\"/></label>';\n\t\t\t\n\t\t\t$output .= '<label class=\"av-gmap-field av_half\">'.__('Latitude','avia_framework').' <input type=\"text\" class=\"'.$element['class'].'\" value=\"'.nl2br($values['lat']).'\" id=\"lat\" name=\"lat\"/></label>';\n\t\t\t\n\t\t\t\n\t\t\t$output .= '</div>';\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "bcc69b7ae7c63673b14d0a4ac772aedc", "score": "0.5537106", "text": "function wpgmp_google_map_widget(){\n\tregister_widget('wpgmp_google_map_widget');\n}", "title": "" }, { "docid": "20290d06124558133f53956fec05a34c", "score": "0.5528247", "text": "function slickmap_css_sitemap_settings_api_init() {\n\tadd_settings_section( 'slickmap_css_sitemap_general', 'Global Sitemap Style', 'slickmap_css_sitemap_general_callback', 'slickmap_css_sitemap_menu_general');\n\tadd_settings_section( 'slickmap_css_sitemap_advanced', 'Advanced Settings', 'slickmap_css_sitemap_advanced_callback', 'slickmap_css_sitemap_menu_advanced');\n\t\n\t//register general settings for savin'\n\tregister_setting( 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general_gradient' );\n\tregister_setting( 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general_font_family' );\n\tregister_setting( 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general_radius' );\n\tregister_setting( 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general_padding' );\n\tregister_setting( 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general_breakpoint' );\n\tregister_setting( 'slickmap_css_sitemap_menu_advanced', 'slickmap_css_sitemap_advanced_additional_css' );\n\n\t//add the fields for each general setting\n\tadd_settings_field( 'slickmap_css_sitemap_general_gradient', 'Use White Gradient', 'slickmap_css_sitemap_general_gradient_callback', 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general' );\n\tadd_settings_field( 'slickmap_css_sitemap_general_font_family', 'Font Family', 'slickmap_css_sitemap_general_font_family_callback', 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general' );\n\tadd_settings_field( 'slickmap_css_sitemap_general_radius', 'Border Radius', 'slickmap_css_sitemap_general_radius_callback', 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general' );\n\tadd_settings_field( 'slickmap_css_sitemap_general_padding', 'Padding', 'slickmap_css_sitemap_general_padding_callback', 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general' );\n\tadd_settings_field( 'slickmap_css_sitemap_general_breakpoint', 'Mobile Breakpoint', 'slickmap_css_sitemap_general_breakpoint_callback', 'slickmap_css_sitemap_menu_general', 'slickmap_css_sitemap_general' );\n\tadd_settings_field( 'slickmap_css_sitemap_advanced_additional_css', 'Additional CSS', 'slickmap_css_sitemap_advanced_additional_css_callback', 'slickmap_css_sitemap_menu_advanced', 'slickmap_css_sitemap_advanced' );\n\t\n\t\n\t\n\t//create sections, settings, and fields for each level\n\tglobal $slickmap_css_sitemap_level_names;\n\tforeach( $slickmap_css_sitemap_level_names as $level => $title ) {\n\t\n\t\tNew slickmap_level( $level );\n\t\n\t}\t//end foreach( $slickmap_css_sitemap_level_names as $level )\n\n}", "title": "" }, { "docid": "081754fe23970ec55661fdbd419bcdbf", "score": "0.55271024", "text": "function ProcessURLArray($aVars) {\n $GLOBALS[\"gszCurrentTool\"] = (isset($aVars[\"CMD\"])) ?\n $aVars[\"CMD\"] : \"ZOOM_IN\";\n\n //set batas koordinat peta\n $oExt = $GLOBALS[\"goMap\"];\n $fMinX = isset($aVars[\"MINX\"]) ? $aVars[\"MINX\"] : $oExt->extent->minx;\n $fMinY = isset($aVars[\"MINY\"]) ? $aVars[\"MINY\"] : $oExt->extent->miny;\n ;\n $fMaxX = isset($aVars[\"MAXX\"]) ? $aVars[\"MAXX\"] : $oExt->extent->maxx;\n ;\n $fMaxY = isset($aVars[\"MAXY\"]) ? $aVars[\"MAXY\"] : $oExt->extent->maxy;\n ;\n $GLOBALS[\"goMap\"]->setextent($fMinX, $fMinY, $fMaxX, $fMaxY);\n\n //lebar dan tinggi gambar peta\n $fW = $GLOBALS[\"goMap\"]->width;\n $fH = $GLOBALS[\"goMap\"]->height;\n\n if (isset($_POST[\"legendlayername\"])) {\n for ($i = 0; $i < $GLOBALS[\"goMap\"]->numlayers; $i++) {\n $oLayer = $GLOBALS[\"goMap\"]->getLayer($i);\n if (in_array($oLayer->name, $_POST[\"legendlayername\"]))\n $oLayer->set(\"status\", MS_ON);\n else\n $oLayer->set(\"status\", MS_OFF);\n }\n }\n\n //lakukan perubahan skala, sesuai tool navigasi terpilih\n if (isset($aVars[\"CMD\"]) && isset($aVars[\"MAINMAP_x\"])) {\n //titik tempat user meng-klik pada lokasi peta\n $nX = isset($aVars[\"MAINMAP_x\"]) ?\n intval($aVars[\"MAINMAP_x\"]) : $fW / 2.0;\n $nY = isset($aVars[\"MAINMAP_y\"]) ?\n intval($aVars[\"MAINMAP_y\"]) : $fW / 2.0;\n\n if (isset($aVars[\"MAINMAP_x\"]) && isset($aVars[\"MAINMAP_y\"])) {\n $oPixelPos = ms_newpointobj();\n $oPixelPos->setxy($nX, $nY);\n\n $oGeoExt = ms_newrectobj();\n $oGeoExt->setextent($fMinX, $fMinY, $fMaxX, $fMaxY);\n\n //ubah skala peta, dengan method zoompoint atau setextent\n if ($aVars[\"CMD\"] == \"ZOOM_IN\") {\n $GLOBALS[\"goMap\"]->zoompoint(2, $oPixelPos,\n $fW, $fH, $oGeoExt);\n } else if ($aVars[\"CMD\"] == \"ZOOM_OUT\") {\n $GLOBALS[\"goMap\"]->zoompoint(-2, $oPixelPos,\n $fW, $fH, $oGeoExt);\n } else if ($aVars[\"CMD\"] == \"RECENTER\") {\n $GLOBALS[\"goMap\"]->zoompoint(1, $oPixelPos,\n $fW, $fH, $oGeoExt);\n } else if ($aVars[\"CMD\"] == \"ZOOM_ALL\") {\n $GLOBALS[\"goMap\"]->setextent($GLOBALS[\"gfMinX\"],\n $GLOBALS[\"gfMinY\"], $GLOBALS[\"gfMaxX\"],\n $GLOBALS[\"gfMaxY\"]);\n } else if ($aVars[\"CMD\"] == \"QUERY\") {\n $nGeoX = Pix2Geo($nX, 0, $fW, $fMinX, $fMaxX, 0);\n $nGeoY = Pix2Geo($nY, 0, $fH, $fMinY, $fMaxY, 1);\n\n $oGeo = ms_newPointObj();\n $oGeo->setXY($nGeoX, $nGeoY);\n\n // Simbol '@' digunakan supaya tidak muncul pesan peringatan\n // ketika objek tidak ditemukan\n @$GLOBALS[\"goMap\"]->queryByPoint($oGeo, MS_SINGLE, -1);\n\n $GLOBALS[\"gShowQueryResults\"] = TRUE;\n } else if ($aVars[\"CMD\"] == \"ADD\") {\n\n $nGeoX = Pix2Geo($nX, 0, $fW, $fMinX, $fMaxX, 0);\n $nGeoY = Pix2Geo($nY, 0, $fH, $fMinY, $fMaxY, 1);\n $img = $GLOBALS[\"goMap\"]->draw();\n //====\n $shapepath = $GLOBALS[\"goMap\"]->{shapepath};\n $stmp = \"/wisata.shp\";\n $pointshpFileName = \"$shapepath\" . \"$stmp\";\n\n //====\n $oConsLayer = $GLOBALS[\"goMap\"]->getLayerByName(\"pariwisata\");\n $m_Point = ms_newPointObj();\n echo $oConsLayer->{data};\n $shapefile = ms_newShapefileObj(\"C:/ms4w/Apache/htdocs/siparmal/data/shp/sigohan/wisata\", -2);\n $m_Point->setXY($nGeoX, $nGeoY);\n $m_Point->draw($GLOBALS[\"goMap\"], $oConsLayer, $img, 0, \"poin\");\n $shapefile->addPoint($m_Point);\n echo \"<p>result: $temp\\n\"; //test\n echo \"<p>result: \" . $shapefile->numshapes; //test\n echo \"<p>result: \" . $shapefile->type; //test\n echo \"<p>result: \" . $shapefile->source; //test\n\n $shapefile->free();\n $m_Point->free();\n //add the dbf record\n $dbf = dbase_open(\"../data/shp/sigohan/wisata.dbf\", 2);\n\n $attr = array(\"45\", \"aaaaaa\");\n\n if (!dbase_add_record($dbf, $attr))\n echo \"<h2>Add Record Failed!</h2>\";\n dbase_pack($dbf);\n\n dbase_close($dbf);\n //$oConsLayer->draw($img);\n $url = $img->saveWebImage();\n echo \"<img src=\\\"$url\\\" alt=\\\"Yuhuu!\\\" />\";\n }\n }\n } else if (isset($aVars[\"KEYMAP_x\"]) && isset($aVars[\"KEYMAP_y\"])) {\n\n $oRefExt = $GLOBALS[\"goMap\"]->reference->extent;\n\n $nX = intval($aVars[\"KEYMAP_x\"]);\n $nY = intval($aVars[\"KEYMAP_y\"]);\n\n $fWidthPix = doubleval($GLOBALS[\"goMap\"]->reference->width);\n $fHeightPix = doubleval($GLOBALS[\"goMap\"]->reference->height);\n\n $nGeoX = Pix2Geo($nX, 0, $fWidthPix, $oRefExt->minx, $oRefExt->maxx, 0);\n $nGeoY = Pix2Geo($nY, 0, $fHeightPix, $oRefExt->miny, $oRefExt->maxy, 1);\n\n $fDeltaX = ($fMaxX - $fMinX) / 2.0;\n $fDeltaY = ($fMaxY - $fMinY) / 2.0;\n\n $GLOBALS[\"goMap\"]->setextent($nGeoX - $fDeltaX, $nGeoY - $fDeltaY,\n $nGeoX + $fDeltaX, $nGeoY + $fDeltaY);\n }\n}", "title": "" }, { "docid": "d9f668cc8fa9b27a540b8474c9b3fba6", "score": "0.55250555", "text": "function options_form(&$form, &$form_state) {\n parent::options_form($form, $form_state);\n $form['type'] = array(\n '#title' => t('Coordinate Type'),\n '#type' => 'select',\n '#options' => array(\n 'postal' => t('Postal Code (Zipcode)'),\n 'latlon' => t('Decimal Latitude and Longitude coordinates, comma delimited'),\n ),\n '#default_value' => $this->options['type'],\n '#description' => t('Type of center point.') . '<br />' . t('Postal code argument format: country_postcode_distance or postcode_distance') . '<br />' . t('Lat/Lon argument format: lat,lon_distance') . '<br />' . t('where distance is either a number or a comma delimited pair of decimal degrees'),\n );\n\n // Units used.\n $form['search_units'] = array(\n '#type' => 'select',\n '#title' => t('Distance unit'),\n '#options' => array(\n 'km' => t('Kilometers'),\n 'm' => t('Meters'),\n 'mile' => t('Miles'),\n 'dd' => t('Decimal degrees'),\n ),\n '#default_value' => $this->options['search_units'],\n '#description' => t('Select the unit of distance. Decimal degrees should be comma delimited.'),\n );\n\n $form['search_method'] = array(\n '#title' => t('Method'),\n '#type' => 'select',\n '#options' => array(\n 'dist' => t('Circular Proximity'),\n 'mbr' => t('Rectangular Proximity'),\n ),\n '#default_value' => $this->options['search_method'],\n '#description' => t('Method of determining proximity. Please note that Circular Proximity does not work with Decimal degrees.'),\n );\n }", "title": "" }, { "docid": "b8d4069427cb064698ca8405c984d9fc", "score": "0.55168027", "text": "public function optionsPage()\n {\n // check for options update\n $field = 'mrp_submit_hidden';\n if (isset($_POST[$field]) && $_POST[$field] == 'Y') {\n update_option(self::DEBUG_OPT_NAME, $_POST[self::DEBUG_OPT_NAME]);\n update_option(self::GOOGLE_MAP_API_KEY, $_POST[self::GOOGLE_MAP_API_KEY]);\n $this->loadOptions();\n }\n\n // refresh remote config button pressed\n $field = 'mrp_refresh_config';\n if (isset($_POST[$field]) && $_POST[$field] == 'Y') {\n // reload the remote configuration\n $this->updateConfig();\n }\n\n // clear cache button pressed\n $field = 'mrp_clear_cache';\n if (isset($_POST[$field]) && $_POST[$field] == 'Y') {\n $this->cache && $this->cache->clear();\n }\n\n // download current logs to file\n $field = 'mrp_get_logs';\n if (isset($_GET[$field]) && $_GET[$field] == 'Y') {\n $logs = $this->logger->getMessages();\n ob_start();\n include(plugin_dir_path(__FILE__) . \"/views/logs.php\");\n ob_end_flush();\n }\n\n // clear logs\n $field = 'mrp_clear_logs';\n if (isset($_POST[$field]) && $_POST[$field] == 'Y') {\n $this->logger && $this->logger->clear();\n }\n\n // output current settings page\n ob_start();\n include(plugin_dir_path(__FILE__) . \"/views/settings.php\");\n ob_end_flush();\n }", "title": "" }, { "docid": "f9b5bd11e5780bfa96784256a0203456", "score": "0.55161756", "text": "function geonode_admin_plugin_settings($form, &$form_state) {\n $form = array();\n $plugin = variable_get('geonode_plugin', '');\n if (!$plugin) {\n $form['error'] = array('#markup' => t('The plugin cannot be configured. Please visit this <a href=\"!url\">page</a> and select the plugin.', array('!url' => url('admin/settings/geonode'))));\n return $form;\n }\n\n $form = module_invoke(\"geonode_{$plugin}\", 'geonode_plugin', 'settings_form');\n if (!$form) {\n $form = array('empty' => array('#markup' => t('The selected plugin has no settings')));\n }\n elseif (!array_key_exists('submit', $form)) {\n $form['submit'] = array('#type' => 'submit', '#value' => t('Save'));\n } \n return $form;\n}", "title": "" }, { "docid": "dbc80c52f75100a55c36fab0dde44da8", "score": "0.5513737", "text": "function yandex_map_default_map() {\r\n // Base settings.\r\n $settings = array(\r\n 'map_id' => yandex_map_new_id(),\r\n 'width' => '100%',\r\n 'height' => '300px',\r\n 'center' => '',\r\n 'zoom' => 11,\r\n 'type' => 'map',\r\n 'controls' => array(),\r\n );\r\n\r\n // Configure map controls.\r\n $controls = yandex_map_controls();\r\n foreach ($controls as $key => $data) {\r\n $settings['controls'][$key]['enable'] = (bool) variable_get(\"yandex_map_controls_{$key}\", TRUE);\r\n foreach (array('top', 'bottom', 'left', 'right') as $pos) {\r\n if ($val = variable_get(\"yandex_map_controls_{$key}_{$pos}\", '')) {\r\n $settings['controls'][$key][$pos] = (int) $val;\r\n }\r\n }\r\n }\r\n\r\n // Configure map center.\r\n $settings['center'] = _yandex_map_setting_get('center');\r\n $settings['zoom'] = _yandex_map_setting_get('zoom');\r\n $settings['type'] = _yandex_map_setting_get('type');\r\n\r\n // Configure map size.\r\n $settings['height'] = _yandex_map_setting_get('height');\r\n if (is_numeric($settings['height'])) {\r\n $settings['height'] .= 'px';\r\n }\r\n $settings['width'] = _yandex_map_setting_get('width');\r\n if (is_numeric($settings['width'])) {\r\n $settings['width'] .= 'px';\r\n }\r\n\r\n // Configure map behaviors.\r\n $settings['behaviors'] = _yandex_map_setting_get('behavior');\r\n\r\n // Configure allowed map types.\r\n $settings['types'] = _yandex_map_setting_get('types');\r\n\r\n // Configure map view and edit tools.\r\n $settings['mapTools'] = _yandex_map_setting_get('mapTools');\r\n $settings['editTools'] = _yandex_map_setting_get('editTools');\r\n\r\n // Setup map mode.\r\n $settings['mode'] = 'view';\r\n\r\n return $settings;\r\n}", "title": "" }, { "docid": "4c418c594cd924da3be8ee3cf4d570be", "score": "0.55081254", "text": "public function settingsForm(array $form, FormStateInterface $form_state);", "title": "" }, { "docid": "9dbda2ee635245a7c61cc272b0233e97", "score": "0.55053604", "text": "public function event_location_add_meta_fields()\r\n\t{\r\n\t\techo '\r\n\t\t<div class=\"form-field\">\r\n\t\t\t<label>'.__('Map', 'events-maker').'</label>\r\n\t\t\t<div id=\"event-google-map\" class=\"event-minimap\">\r\n\t\t\t</div>\r\n\t\t\t<input type=\"hidden\" name=\"event_location[latitude]\" id=\"event-location-latitude\" value=\"0\" />\r\n\t\t\t<input type=\"hidden\" name=\"event_location[longitude]\" id=\"event-location-longitude\" value=\"0\" />\r\n\t\t</div>\r\n\t\t<div class=\"form-field\">\r\n\t\t\t<label for=\"event-location-address\">'.__('Address', 'events-maker').'</label>\r\n\t\t\t<input type=\"text\" name=\"event_location[address]\" id=\"event-location-address\" class=\"em-gm-input\" value=\"\" size=\"40\" />\r\n \t</div>\r\n <div class=\"form-field\">\r\n <label for=\"event-location-city\">'.__('City', 'events-maker').'</label>\r\n\t\t\t<input type=\"text\" name=\"event_location[city]\" id=\"event-location-city\" class=\"em-gm-input\" value=\"\" size=\"40\" />\r\n \t</div>\r\n <div class=\"form-field\">\r\n <label for=\"event-location-state\">'.__('State / Province', 'events-maker').'</label>\r\n\t\t\t<input type=\"text\" name=\"event_location[state]\" id=\"event-location-state\" class=\"em-gm-input\" value=\"\" size=\"40\" />\r\n \t</div>\r\n <div class=\"form-field\">\r\n <label for=\"event-location-zip\">'.__('Zip Code', 'events-maker').'</label>\r\n\t\t\t<input type=\"text\" name=\"event_location[zip]\" id=\"event-location-zip\" class=\"em-gm-input\" value=\"\" size=\"40\" />\r\n \t</div>\r\n \t<div class=\"form-field\">\r\n <label for=\"event-location-country\">'.__('Country', 'events-maker').'</label>\r\n\t\t\t<input type=\"text\" name=\"event_location[country]\" id=\"event-location-country\" class=\"em-gm-input\" value=\"\" size=\"40\" />\r\n\t\t</div>';\r\n\t}", "title": "" }, { "docid": "09be2f0fe4d8ce99587e3885b8e8971f", "score": "0.55012685", "text": "function responsive_image_mapping_edit_form_submit($form, &$form_state) {\n // Save the edited mapping to database.\n if ($form_state['values']['rim_preset_key'] !== 'none') {\n $mappings = array();\n foreach ($form_state['values'] as $form_key => $form_value) {\n if (preg_match('/rim_mapping_[0-9]+/', $form_key) && !empty($form_value)) {\n $mappings[] = $form_value;\n }\n }\n db_update('responsive_img_mapping')\n ->fields(array(\n 'preset_key' => $form_state['values']['rim_preset_key'],\n 'mappings' => serialize($mappings)\n ))\n -> condition('id', arg(6))\n ->execute();\n drupal_set_message(t('Mapping updated.'));\n drupal_goto('admin/config/media/image-styles/responsive-mappings');\n }\n else {\n drupal_set_message(t('Mapping not updated, no preset key selected.'));\n drupal_goto('admin/config/media/image-styles/responsive-mappings');\n }\n}", "title": "" }, { "docid": "3e2829142dcfc20c9049d80dbd4da8c8", "score": "0.55008966", "text": "function wpgmaps_admin_javascript_basic() {\n if (is_admin()) {\n global $wpdb;\n global $wpgmza_version;\n global $wpgmza_tblname_maps;\n $ajax_nonce = wp_create_nonce(\"wpgmza\");\n\n\n if( isset( $_POST['wpgmza_save_google_api_key_list'] ) ){ \n if( $_POST['wpgmza_google_maps_api_key'] !== '' ){ \n update_option('wpgmza_google_maps_api_key', sanitize_text_field(trim($_POST['wpgmza_google_maps_api_key'])));\n echo \"<div class='updated'><p>\";\n $settings_page = \"<a href='\".admin_url('/admin.php?page=wp-google-maps-menu-settings#tabs-4').\"'>\".__('settings', 'wp-google-maps').\"</a>\";\n echo sprintf( __('Your Google Maps API key has been successfully saved. This API key can be changed in the %s page', 'wp-google-maps'), $settings_page );\n echo \"</p></div>\";\n } \n }\n\n if (is_admin() && isset( $_GET['page'] ) && $_GET['page'] == 'wp-google-maps-menu' && isset( $_GET['action'] ) && $_GET['action'] == \"edit_marker\") {\n wpgmaps_admin_edit_marker_javascript();\n }\n else if (is_admin() && isset($_GET['action']) && isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == \"add_poly\") { wpgmaps_b_admin_add_poly_javascript(sanitize_text_field($_GET['map_id'])); }\n else if (is_admin() && isset($_GET['action']) && isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == \"edit_poly\") { wpgmaps_b_admin_edit_poly_javascript(sanitize_text_field($_GET['map_id']),sanitize_text_field($_GET['poly_id'])); }\n else if (is_admin() && isset($_GET['action']) && isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == \"add_polyline\") { wpgmaps_b_admin_add_polyline_javascript(sanitize_text_field($_GET['map_id'])); }\n else if (is_admin() && isset($_GET['action']) && isset($_GET['page']) && $_GET['page'] == 'wp-google-maps-menu' && $_GET['action'] == \"edit_polyline\") { wpgmaps_b_admin_edit_polyline_javascript(sanitize_text_field($_GET['map_id']),sanitize_text_field($_GET['poly_id'])); }\n\n else if (is_admin() && isset( $_GET['page'] ) && $_GET['page'] == 'wp-google-maps-menu' && isset( $_GET['action'] ) && $_GET['action'] == \"edit\") {\n\n if (!$_GET['map_id']) { return; }\n $wpgmza_check = wpgmaps_update_xml_file(sanitize_text_field($_GET['map_id']));\n if ( is_wp_error($wpgmza_check) ) wpgmza_return_error($wpgmza_check);\n \n $wpgmza_settings = get_option(\"WPGMZA_OTHER_SETTINGS\");\n\n /* LOAD GOOGLE MAPS */\n $wpgmza_locale = get_locale();\n $wpgmza_suffix = \".com\";\n /* Hebrew correction */\n if ($wpgmza_locale == \"he_IL\") { $wpgmza_locale = \"iw\"; }\n /* Chinese integration */\n if ($wpgmza_locale == \"zh_CN\") { $wpgmza_suffix = \".cn\"; } else { $wpgmza_suffix = \".com\"; } \n\n $wpgmza_locale = substr( $wpgmza_locale, 0, 2 );\n /**\n * Only register the below scrips so that they are available on demand. \n */\n if(isset($wpgmza_settings['wpgmza_settings_remove_api']) && $wpgmza_settings['wpgmza_settings_remove_api'] == \"yes\"){\n $wpgaps_core_dependancy = array();\n } else { \n if (isset($wpgmza_settings['wpgmza_api_version']) && $wpgmza_settings['wpgmza_api_version'] != \"\") {\n $api_version_string = \"v=\".$wpgmza_settings['wpgmza_api_version'].\"&\";\n } else {\n $api_version_string = \"v=3.exp&\";\n }\n $wpgmza_api_key = get_option( 'wpgmza_google_maps_api_key' );\n if( $wpgmza_api_key ){\n wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_api_key.'&language='.$wpgmza_locale.\"&libraries=places\", array(), null ); \n } else {\n /* use temp API key */\n $wpgmza_temp_api_key = get_option('wpgmza_temp_api');\n wp_enqueue_script('wpgmza_api_call', '//maps.google'.$wpgmza_suffix.'/maps/api/js?'.$api_version_string.'key='.$wpgmza_temp_api_key.'&language='.$wpgmza_locale.'&libraries=places', array(), null ); \n }\n $wpgaps_core_dependancy = array( 'wpgmza_api_call' );\n } \n\n wp_enqueue_style( 'wpgmaps_admin_style', plugins_url('css/wpgmza_style.css', __FILE__),array(),$wpgmza_version.'b');\n wp_enqueue_style( 'wpgmaps_admin_datatables_style', plugins_url('css/data_table.css', __FILE__),array(),$wpgmza_version.'b');\n wp_enqueue_script('wpgmaps_admin_datatables', plugins_url('/js/jquery.dataTables.min.js',__FILE__), $wpgaps_core_dependancy, $wpgmza_version.'b' , false);\n\n\n\n $wpgmza_current_map_id = $_GET['map_id'];\n\n\n wp_enqueue_script('wpgmaps_admin_core', plugins_url('/js/wpgmaps-admin-core.js',__FILE__), $wpgaps_core_dependancy, $wpgmza_version.'b' , false);\n do_action(\"wpgooglemaps_hook_user_js_after_core\");\n\n $res = array();\n $res[$wpgmza_current_map_id] = wpgmza_get_map_data($wpgmza_current_map_id);\n \n \n if (isset($wpgmza_settings['wpgmza_api_version'])) { \n $api_version = $wpgmza_settings['wpgmza_api_version'];\n if (isset($api_version) && $api_version != \"\") {\n $api_version_string = \"v=$api_version&\";\n } else {\n $api_version_string = \"v=3.exp&\";\n }\n } else {\n $api_version_string = \"v=3.exp&\";\n }\n \n $map_other_settings = maybe_unserialize($res[$wpgmza_current_map_id]->other_settings);\n $res[$wpgmza_current_map_id]->other_settings = $map_other_settings;\n $res[$wpgmza_current_map_id]->map_width_type = stripslashes($res[$wpgmza_current_map_id]->map_width_type);\n\n\n if ( isset( $res[$wpgmza_current_map_id]->other_settings['wpgmza_theme_data'] ) && $res[$wpgmza_current_map_id]->other_settings['wpgmza_theme_data'] != '') {\n $res[$wpgmza_current_map_id]->other_settings['wpgmza_theme_data'] = html_entity_decode(stripslashes($res[$wpgmza_current_map_id]->other_settings['wpgmza_theme_data']));\n } \n\n\n $polygonoptions = array();\n $total_poly_array = wpgmza_b_return_polygon_id_array($wpgmza_current_map_id);\n if ($total_poly_array > 0) {\n foreach ($total_poly_array as $poly_id) {\n $polygonoptions[$poly_id] = wpgmza_b_return_poly_options($poly_id);\n\n $tmp_poly_array = wpgmza_b_return_polygon_array($poly_id);\n $poly_data_raw_array = array();\n foreach ($tmp_poly_array as $single_poly) {\n $poly_data_raw = str_replace(\" \",\"\",$single_poly);\n $poly_data_raw = explode(\",\",$poly_data_raw);\n if (isset($poly_data_raw[0]) && isset($poly_data_raw[1])) {\n $lat = $poly_data_raw[0];\n $lng = $poly_data_raw[1];\n $poly_data_raw_array[] = $poly_data_raw;\n }\n }\n $polygonoptions[$poly_id]->polydata = $poly_data_raw_array;\n\n $linecolor = $polygonoptions[$poly_id]->linecolor;\n $fillcolor = $polygonoptions[$poly_id]->fillcolor;\n $fillopacity = $polygonoptions[$poly_id]->opacity;\n if (!$linecolor) { $polygonoptions[$poly_id]->linecolor = \"000000\"; }\n if (!$fillcolor) { $polygonoptions[$poly_id]->fillcolor = \"66FF00\"; }\n if (!$fillopacity) { $polygonoptions[$poly_id]->opacity = \"0.5\"; }\n }\n } else { $polygonoptions = array(); } \n\n\n $polylineoptions = array();\n\n $total_poly_array = wpgmza_b_return_polyline_id_array($wpgmza_current_map_id);\n if ($total_poly_array > 0) {\n foreach ($total_poly_array as $poly_id) {\n $polylineoptions[$poly_id] = wpgmza_b_return_polyline_options($poly_id);\n\n $tmp_poly_array = wpgmza_b_return_polyline_array($poly_id);\n $poly_data_raw_array = array();\n foreach ($tmp_poly_array as $single_poly) {\n $poly_data_raw = str_replace(\" \",\"\",$single_poly);\n $poly_data_raw = str_replace(\")\",\"\",$poly_data_raw );\n $poly_data_raw = str_replace(\"(\",\"\",$poly_data_raw );\n $poly_data_raw = explode(\",\",$poly_data_raw);\n if (isset($poly_data_raw[0]) && isset($poly_data_raw[1])) {\n $lat = $poly_data_raw[0];\n $lng = $poly_data_raw[1];\n $poly_data_raw_array[] = $poly_data_raw;\n }\n }\n $polylineoptions[$poly_id]->polydata = $poly_data_raw_array;\n\n\n if (isset($polylineoptions[$poly_id]->linecolor)) { $linecolor = $polylineoptions[$poly_id]->linecolor; } else { $linecolor = false; }\n if (isset($polylineoptions[$poly_id]->fillcolor)) { $fillcolor = $polylineoptions[$poly_id]->fillcolor; } else { $fillcolor = false; }\n if (isset($polylineoptions[$poly_id]->opacity)) { $fillopacity = $polylineoptions[$poly_id]->opacity; } else { $fillopacity = false; }\n if (!$linecolor) { $polylineoptions[$poly_id]->linecolor = \"000000\"; }\n if (!$fillcolor) { $polylineoptions[$poly_id]->fillcolor = \"66FF00\"; }\n if (!$fillopacity) { $polylineoptions[$poly_id]->opacity = \"0.5\"; }\n }\n } else { $polylineoptions = array(); } \n\n if (isset($wpgmza_settings['wpgmza_settings_marker_pull']) && $wpgmza_settings['wpgmza_settings_marker_pull'] == \"0\") {\n $markers = wpgmaps_return_markers($wpgmza_current_map_id);\n }\n \n do_action(\"wpgooglemaps_basic_hook_user_js_after_core\");\n\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_mapid', $wpgmza_current_map_id);\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_localize', $res);\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_localize_polygon_settings', $polygonoptions);\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_localize_polyline_settings', $polylineoptions);\n\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_markerurl', wpgmaps_get_marker_url($wpgmza_current_map_id));\n\n\n if ($wpgmza_settings['wpgmza_settings_marker_pull'] == \"0\") {\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_localize_marker_data', $markers);\n }\n \n $wpgmza_settings = apply_filters(\"wpgmza_basic_filter_localize_settings\",$wpgmza_settings);\n\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_localize_global_settings', $wpgmza_settings);\n\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_lang_km_away', __(\"km away\",\"wp-google-maps\"));\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_lang_m_away', __(\"miles away\",\"wp-google-maps\"));\n wp_localize_script( 'wpgmaps_admin_core', 'wpgmaps_nonce', $ajax_nonce);\n do_action(\"wpgooglemaps_hook_user_js_after_localize\",$res);\n\n\n\n\n return true;\n\n }\n return true;\n\n\n\n\n\n\n\n\n\n\n /************************************** */\n\n ?>\n <script type=\"text/javascript\" >\n var marker_pull = '<?php echo $marker_pull; ?>';\n var placeSearch, autocomplete;\n var wpgmza_table_length;\n var wpgmzaTable;\n\n\n <?php if (isset($markers) && strlen($markers) > 0 && $markers != \"[]\"){ ?>var db_marker_array = JSON.stringify(<?php echo $markers; ?>);<?php } else { echo \"var db_marker_array = '';\"; } ?>\n \n\n\n if ('undefined' == typeof window.jQuery) {\n alert(\"jQuery is not installed. WP Google Maps requires jQuery in order to function properly. Please ensure you have jQuery installed.\")\n } else {\n // all good.. continue...\n }\n\n\n\n\n var marker_added = false;\n var MYMAP = {\n map: null,\n bounds: null\n }\n MYMAP.init = function(selector, latLng, zoom) {\n var myOptions = {\n minZoom: <?php echo $wpgmza_max_zoom; ?>,\n maxZoom: 21,\n zoom:zoom,\n center: latLng,\n zoomControl: <?php if (isset($wpgmza_settings['wpgmza_settings_map_zoom']) && $wpgmza_settings['wpgmza_settings_map_zoom'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n panControl: <?php if (isset($wpgmza_settings['wpgmza_settings_map_pan']) && $wpgmza_settings['wpgmza_settings_map_pan'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n mapTypeControl: <?php if (isset($wpgmza_settings['wpgmza_settings_map_type']) && $wpgmza_settings['wpgmza_settings_map_type'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n streetViewControl: <?php if (isset($wpgmza_settings['wpgmza_settings_map_streetview']) && $wpgmza_settings['wpgmza_settings_map_streetview'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n fullscreenControl: <?php if (isset($wpgmza_settings['wpgmza_settings_map_full_screen_control']) && $wpgmza_settings['wpgmza_settings_map_full_screen_control'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n draggable: <?php if (isset($wpgmza_settings['wpgmza_settings_map_draggable']) && $wpgmza_settings['wpgmza_settings_map_draggable'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n disableDoubleClickZoom: <?php if (isset($wpgmza_settings['wpgmza_settings_map_clickzoom']) && $wpgmza_settings['wpgmza_settings_map_clickzoom'] == \"yes\") { echo \"true\"; } else { echo \"false\"; } ?>,\n scrollwheel: <?php if (isset($wpgmza_settings['wpgmza_settings_map_scroll']) && $wpgmza_settings['wpgmza_settings_map_scroll'] == \"yes\") { echo \"false\"; } else { echo \"true\"; } ?>,\n mapTypeId: google.maps.MapTypeId.<?php echo $wpgmza_map_type; ?>\n }\n this.map = new google.maps.Map(jQuery(selector)[0], myOptions);\n this.bounds = new google.maps.LatLngBounds();\n\n\n <?php if ($wpgmza_theme_data !== false && isset($wpgmza_theme_data) && $wpgmza_theme_data != '') { ?>\n this.map.setOptions({styles: <?php echo stripslashes($wpgmza_theme_data); ?>});\n <?php } ?>\n\n google.maps.event.addListener(MYMAP.map, 'rightclick', function(event) {\n if (marker_added === false) {\n var marker = new google.maps.Marker({\n position: event.latLng, \n map: MYMAP.map\n });\n marker.setDraggable(true);\n google.maps.event.addListener(marker, 'dragend', function(event) { \n jQuery(\"#wpgmza_add_address\").val(event.latLng.lat()+', '+event.latLng.lng());\n } );\n jQuery(\"#wpgmza_add_address\").val(event.latLng.lat()+', '+event.latLng.lng());\n jQuery(\"#wpgm_notice_message_save_marker\").show();\n marker_added = true;\n setTimeout(function() {\n jQuery(\"#wpgm_notice_message_save_marker\").fadeOut('slow')\n }, 3000);\n } else {\n jQuery(\"#wpgm_notice_message_addfirst_marker\").fadeIn('fast')\n setTimeout(function() {\n jQuery(\"#wpgm_notice_message_addfirst_marker\").fadeOut('slow')\n }, 3000);\n }\n \n });\n \n /**\n * Deprecated in 6.4.05\n * This was deprecated in wpgmaps-admin-core.js however caused a bug instead\n\n google.maps.event.addListener(MYMAP.map, 'zoom_changed', function() {\n zoomLevel = MYMAP.map.getZoom();\n\n jQuery(\"#wpgmza_start_zoom\").val(zoomLevel);\n if (zoomLevel == 0) {\n MYMAP.map.setZoom(10);\n }\n });\n \n */ \n \n<?php\n $total_poly_array = wpgmza_b_return_polygon_id_array(sanitize_text_field($_GET['map_id']));\n if ($total_poly_array > 0) {\n foreach ($total_poly_array as $poly_id) {\n $polyoptions = wpgmza_b_return_poly_options($poly_id);\n $linecolor = $polyoptions->linecolor;\n $fillcolor = $polyoptions->fillcolor;\n $fillopacity = $polyoptions->opacity;\n $lineopacity = $polyoptions->lineopacity;\n $title = $polyoptions->title;\n $link = $polyoptions->link;\n $ohlinecolor = $polyoptions->ohlinecolor;\n $ohfillcolor = $polyoptions->ohfillcolor;\n $ohopacity = $polyoptions->ohopacity;\n if (!$linecolor) { $linecolor = \"000000\"; }\n if (!$fillcolor) { $fillcolor = \"66FF00\"; }\n if ($fillopacity == \"\") { $fillopacity = \"0.5\"; }\n if ($lineopacity == \"\") { $lineopacity = \"1.0\"; }\n if ($ohlinecolor == \"\") { $ohlinecolor = $linecolor; }\n if ($ohfillcolor == \"\") { $ohfillcolor = $fillcolor; }\n if ($ohopacity == \"\") { $ohopacity = $fillopacity; }\n $linecolor = \"#\".$linecolor;\n $fillcolor = \"#\".$fillcolor;\n $ohlinecolor = \"#\".$ohlinecolor;\n $ohfillcolor = \"#\".$ohfillcolor;\n \n $poly_array = wpgmza_b_return_polygon_array($poly_id);\n \n \n ?> \n\n <?php if (sizeof($poly_array) > 1) { ?>\n\n var WPGM_PathData_<?php echo $poly_id; ?> = [\n <?php\n foreach ($poly_array as $single_poly) {\n $poly_data_raw = str_replace(\" \",\"\",$single_poly);\n $poly_data_raw = explode(\",\",$poly_data_raw);\n $lat = $poly_data_raw[0];\n $lng = $poly_data_raw[1];\n ?>\n new google.maps.LatLng(<?php echo $lat; ?>, <?php echo $lng; ?>), \n <?php\n }\n ?>\n \n \n ];\n var WPGM_Path_<?php echo $poly_id; ?> = new google.maps.Polygon({\n path: WPGM_PathData_<?php echo $poly_id; ?>,\n strokeColor: \"<?php echo $linecolor; ?>\",\n fillOpacity: \"<?php echo $fillopacity; ?>\",\n strokeOpacity: \"<?php echo $lineopacity; ?>\",\n fillColor: \"<?php echo $fillcolor; ?>\",\n strokeWeight: 2\n });\n\n WPGM_Path_<?php echo $poly_id; ?>.setMap(this.map);\n <?php } } ?>\n\n <?php } ?>\n\n\n \n<?php\n /* polylines */\n $total_polyline_array = wpgmza_b_return_polyline_id_array(sanitize_text_field($_GET['map_id']));\n if ($total_polyline_array > 0) {\n foreach ($total_polyline_array as $poly_id) {\n $polyoptions = wpgmza_b_return_polyline_options($poly_id);\n $linecolor = $polyoptions->linecolor;\n $fillopacity = $polyoptions->opacity;\n $linethickness = $polyoptions->linethickness;\n if (!$linecolor) { $linecolor = \"000000\"; }\n if (!$linethickness) { $linethickness = \"4\"; }\n if (!$fillopacity) { $fillopacity = \"0.5\"; }\n $linecolor = \"#\".$linecolor;\n $poly_array = wpgmza_b_return_polyline_array($poly_id);\n ?>\n \n <?php if (sizeof($poly_array) > 1) { ?>\n var WPGM_PathLineData_<?php echo $poly_id; ?> = [\n <?php\n $poly_array = wpgmza_b_return_polyline_array($poly_id);\n\n foreach ($poly_array as $single_poly) {\n $poly_data_raw = str_replace(\" \",\"\",$single_poly);\n $poly_data_raw = explode(\",\",$poly_data_raw);\n $lat = $poly_data_raw[0];\n $lng = $poly_data_raw[1];\n ?>\n new google.maps.LatLng(<?php echo $lat; ?>, <?php echo $lng; ?>), \n <?php\n }\n ?>\n ];\n var WPGM_PathLine_<?php echo $poly_id; ?> = new google.maps.Polyline({\n path: WPGM_PathLineData_<?php echo $poly_id; ?>,\n strokeColor: \"<?php echo $linecolor; ?>\",\n strokeOpacity: \"<?php echo $fillopacity; ?>\",\n strokeWeight: \"<?php echo $linethickness; ?>\"\n \n });\n\n WPGM_PathLine_<?php echo $poly_id; ?>.setMap(this.map);\n <?php } } } ?> \n \n \n \n \n \n google.maps.event.addListener(MYMAP.map, 'center_changed', function() {\n var location = MYMAP.map.getCenter();\n jQuery(\"#wpgmza_start_location\").val(location.lat()+\",\"+location.lng());\n jQuery(\"#wpgmaps_save_reminder\").show();\n });\n\n <?php if ($wpgmza_bicycle == \"1\") { ?>\n var bikeLayer = new google.maps.BicyclingLayer();\n bikeLayer.setMap(MYMAP.map);\n <?php } ?>\n <?php if ($wpgmza_traffic == \"1\") { ?>\n var trafficLayer = new google.maps.TrafficLayer();\n trafficLayer.setMap(MYMAP.map);\n <?php } ?>\n \n <?php if ($transport_layer == 1) { ?>\n var transitLayer = new google.maps.TransitLayer();\n transitLayer.setMap(MYMAP.map);\n <?php } ?>\n\n\n\n google.maps.event.addListener(MYMAP.map, 'click', function() {\n infoWindow.close();\n });\n\n\n }\n\n var infoWindow = new google.maps.InfoWindow();\n <?php\n $wpgmza_settings = get_option(\"WPGMZA_OTHER_SETTINGS\");\n $wpgmza_settings_infowindow_width = \"250\";\n if (isset($wpgmza_settings['wpgmza_settings_infowindow_width'])) { $wpgmza_settings_infowindow_width = $wpgmza_settings['wpgmza_settings_infowindow_width']; }\n if (!isset($wpgmza_settings_infowindow_width) || !$wpgmza_settings_infowindow_width) { $wpgmza_settings_infowindow_width = \"250\"; }\n ?>\n infoWindow.setOptions({maxWidth:<?php echo $wpgmza_settings_infowindow_width; ?>});\n\n\n \n\n MYMAP.placeMarkers = function(filename,map_id) {\n marker_array = [];\n \n if (marker_pull === '1') {\n \n \n jQuery.get(filename, function(xml){\n jQuery(xml).find(\"marker\").each(function(){\n var wpmgza_map_id = jQuery(this).find('map_id').text();\n if (wpmgza_map_id == map_id) {\n var wpmgza_address = jQuery(this).find('address').text();\n var wpmgza_anim = jQuery(this).find('anim').text();\n var wpmgza_infoopen = jQuery(this).find('infoopen').text();\n var lat = jQuery(this).find('lat').text();\n var lng = jQuery(this).find('lng').text();\n var point = new google.maps.LatLng(parseFloat(lat),parseFloat(lng));\n MYMAP.bounds.extend(point);\n\n if (wpmgza_anim === \"1\") {\n var marker = new google.maps.Marker({\n position: point,\n map: MYMAP.map,\n animation: google.maps.Animation.BOUNCE\n });\n }\n else if (wpmgza_anim === \"2\") {\n var marker = new google.maps.Marker({\n position: point,\n map: MYMAP.map,\n animation: google.maps.Animation.DROP\n });\n }\n else {\n var marker = new google.maps.Marker({\n position: point,\n map: MYMAP.map\n });\n }\n\n\n var html='<p class=\"wpgmza_infowinfow_address\" style=\"margin-top:0; padding-top:0; margin-bottom:2px; padding-bottom:2px; font-weight:bold;\">'+wpmgza_address+'</p>';\n\n if (wpmgza_infoopen === \"1\") {\n \n infoWindow.setContent(html);\n infoWindow.open(MYMAP.map, marker);\n }\n\n <?php if ($wpgmza_open_infowindow_by == '2') { ?>\n google.maps.event.addListener(marker, 'mouseover', function() {\n infoWindow.close();\n infoWindow.setContent(html);\n infoWindow.open(MYMAP.map, marker);\n\n });\n <?php } else { ?>\n google.maps.event.addListener(marker, 'click', function() {\n infoWindow.close();\n infoWindow.setContent(html);\n infoWindow.open(MYMAP.map, marker);\n\n });\n <?php } ?>\n\n }\n\n });\n });\n } else {\n if (db_marker_array.length > 0) {\n var dec_marker_array = jQuery.parseJSON(db_marker_array);\n jQuery.each(dec_marker_array, function(i, val) {\n \n \n var wpmgza_address = val.address;\n var wpmgza_anim = val.anim;\n var wpmgza_infoopen = val.infoopen;\n var lat = val.lat;\n var lng = val.lng;\n var point = new google.maps.LatLng(parseFloat(lat),parseFloat(lng));\n MYMAP.bounds.extend(point);\n\n if (wpmgza_anim === \"1\") {\n var marker = new google.maps.Marker({\n position: point,\n map: MYMAP.map,\n animation: google.maps.Animation.BOUNCE\n });\n }\n else if (wpmgza_anim === \"2\") {\n var marker = new google.maps.Marker({\n position: point,\n map: MYMAP.map,\n animation: google.maps.Animation.DROP\n });\n }\n else {\n var marker = new google.maps.Marker({\n position: point,\n map: MYMAP.map\n });\n }\n\n\n var html='<p class=\"wpgmza_infowinfow_address\" style=\"margin-top:0; padding-top:0; margin-bottom:2px; padding-bottom:2px; font-weight:bold;\">'+wpmgza_address+'</p>';\n\n if (wpmgza_infoopen === \"1\") {\n \n infoWindow.setContent(html);\n infoWindow.open(MYMAP.map, marker);\n }\n\n <?php if ($wpgmza_open_infowindow_by == '2') { ?>\n google.maps.event.addListener(marker, 'mouseover', function() {\n infoWindow.close();\n infoWindow.setContent(html);\n infoWindow.open(MYMAP.map, marker);\n\n });\n <?php } else { ?>\n google.maps.event.addListener(marker, 'click', function() {\n infoWindow.close();\n infoWindow.setContent(html);\n infoWindow.open(MYMAP.map, marker);\n\n });\n <?php } ?>\n \n \n \n \n \n \n });\n \n }\n }\n }\n\n\n\n\n\n\n </script>\n <?php\n }\n\n}", "title": "" }, { "docid": "0fac59b61a2d48b6e26f5bcf634f20e6", "score": "0.5496033", "text": "function main()\t{\n\t\tglobal $LANG;\n\t\t$LANG->includeLLFile(t3lib_div::getFileAbsFileName('EXT:rggooglemap/locallang.xml'));\n\n\t\t$content = '<form name=\"rggooglemap_form\" action=\"'.htmlspecialchars(t3lib_div::linkThisScript()).'\" method=\"post\">';\n\t\t$content .= '<p>'.$this->LL('text.intro').'</p>';\n\t\t$content .= '<p><i>'.$this->LL('text.intro2').'</i></p><br />';\n\t\t$content .= $this->getCheckbox('copymarkers');\n\t\t$content .= $this->getCheckbox('copycategories', false);\n\n\t\t$content .= '<br /><input type=\"submit\" name=\"update\" value=\"'.$this->LL('button.update').'\" />';\n\t\t$content .= '</form>';\n\n\n\t\tif (t3lib_div::_GP('update')) {\n\t\t\t$content .= '<h3>'.$this->LL('text.updated').'</h3>';\n\t\t\t$content .= '<p>'.$this->processUpdate().'</p>';\n\t\t}\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "f3859d5b0fce761367303b029bcc89bc", "score": "0.54900575", "text": "function chado_featuremap_form($node, &$form_state) {\n $form = array();\n\n // Default values can come in the following ways:\n //\n // 1) as elements of the $node object. This occurs when editing an existing library\n // 2) in the $form_state['values'] array which occurs on a failed validation or\n // ajax callbacks from non submit form elements\n // 3) in the $form_state['input'[ array which occurs on ajax callbacks from submit\n // form elements and the form is being rebuilt\n //\n // set form field defaults\n $featuremap_id = NULL;\n $fmapname = '';\n $description = '';\n $unittype_id = '';\n\n // if we are editing an existing node then the featuremap is already part of the node\n if (property_exists($node, 'featuremap')) {\n $featuremap = $node->featuremap;\n $featuremap = chado_expand_var($featuremap, 'field', 'featuremap.description');\n $featuremap_id = $featuremap->featuremap_id;\n\n // get form defaults\n $fmapname = $featuremap->name;\n $description = $featuremap->description;\n $unittype_id = $featuremap->unittype_id->cvterm_id;\n\n // set the featuremap_id in the form\n $form['featuremap_id'] = array(\n '#type' => 'hidden',\n '#value' => $featuremap_id,\n );\n }\n // if we are re constructing the form from a failed validation or ajax callback\n // then use the $form_state['values'] values\n if (array_key_exists('values', $form_state)) {\n $fmapname = $form_state['values']['fmapname'];\n $description = $form_state['values']['description'];\n $unittype_id = $form_state['values']['unittype_id'];\n }\n // if we are re building the form from after submission (from ajax call) then\n // the values are in the $form_state['input'] array\n if (array_key_exists('input', $form_state) and !empty($form_state['input'])) {\n $fmapname = $form_state['input']['fmapname'];\n $description = $form_state['input']['description'];\n $unittype_id = $form_state['input']['unittype_id'];\n }\n\n $form['fmapname']= array(\n '#type' => 'textfield',\n '#title' => t('Map Name'),\n '#description' => t('Please enter a name for this map'),\n '#required' => TRUE,\n '#default_value' => $fmapname,\n '#maxlength' => 255\n );\n $form['description']= array(\n '#type' => 'text_format',\n '#title' => t('Map Description'),\n '#description' => t('A description of the map.'),\n '#required' => TRUE,\n '#default_value' => $description,\n );\n\n // get the list of unit types\n $units = tripal_get_cvterm_default_select_options('featuremap', 'unittype_id', 'map unit types');\n\n $form['unittype_id'] = array(\n '#title' => t('Map Units'),\n '#type' => t('select'),\n '#description' => t(\"Chose the units for this map\"),\n '#required' => TRUE,\n '#default_value' => $unittype_id,\n '#options' => $units,\n );\n\n // Properties Form\n // ----------------------------------\n $prop_cv = tripal_get_default_cv('featuremap_property', 'type_id');\n $cv_id = $prop_cv ? $prop_cv->cv_id : NULL;\n $instructions = t('To add additional properties to the drop down. ' . l(\"Add terms to the featuremap_property vocabulary\", \"admin/tripal/chado/tripal_cv/cvterm/add\") . \".\");\n $details = array(\n 'property_table' => 'featuremapprop',\n 'chado_id' => $featuremap_id,\n 'cv_id' => $cv_id,\n 'fieldset_name' => 'Additional Details',\n 'additional_instructions' => $instructions\n );\n // TODO: remove the 'Map Dbxref' from the list as that should now be handled\n // by the dbxref interface below\n chado_add_node_form_properties($form, $form_state, $details);\n\n // ADDITIONAL DBXREFS FORM\n //---------------------------------------------\n $details = array(\n 'linking_table' => 'featuremap_dbxref', // the name of the _dbxref table\n 'base_foreign_key' => 'featuremap_id', // the name of the key in your base chado table\n 'base_key_value' => $featuremap_id // the value of featuremap_id for this record\n );\n // Adds the form elements to your current form\n chado_add_node_form_dbxrefs($form, $form_state, $details);\n\n return $form;\n}", "title": "" }, { "docid": "81dc5634934dab7bb81a1535e9629061", "score": "0.5482734", "text": "public function settingsForm(array $configuration);", "title": "" }, { "docid": "d8f45164f38937711df84a7d14a8c63b", "score": "0.54816294", "text": "public function save_settings() {\n\t\t$defaults = it_exchange_get_option( 'addon_gravity_forms' );\n\t\t$values = wp_parse_args( ITForm::get_post_data(), $defaults );\n\n\t\tif ( wp_verify_nonce( $_POST['_wpnonce'], 'it-exchange-gravity-forms-settings' ) ) {\n\t\t\t$errors = apply_filters( 'it_exchange_add_on_gravity_forms_validate_settings', $this->get_form_errors( $values, $defaults ), $values );\n\n\t\t\tif ( ! $errors && it_exchange_save_option( 'addon_gravity_forms', $values ) ) {\n\t\t\t\tITUtility::show_status_message( __( 'Settings saved.', ITEGFP::SLUG ) );\n\t\t\t} else {\n\t\t\t\t$this->message = __( 'Settings not saved.', ITEGFP::SLUG );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->message = __( 'Invalid request. Please try again.', ITEGFP::SLUG );\n\t\t}\n\t}", "title": "" }, { "docid": "f2ce3f52b2d4eec283b81b77596abea0", "score": "0.54774505", "text": "function form($instance) {\n\t\t\t// Set up some default widget settings\n\t\t\t$instance = wp_parse_args( (array) $instance, apply_filters('trx_addons_filter_widget_args_default', array(\n\t\t\t\t'widget_title' => '',\n\t\t\t\t// Layout params\n\t\t\t\t\"type\" => \"default\",\n\t\t\t\t\"zoom\" => 16,\n\t\t\t\t\"style\" => 'default',\n\t\t\t\t\"marker_address\" => '',\n\t\t\t\t\"marker_latlng\" => '',\n\t\t\t\t\"marker_icon\" => '',\n\t\t\t\t\"marker_title\" => '',\n\t\t\t\t\"marker_description\" => '',\n\t\t\t\t\"width\" => \"100%\",\n\t\t\t\t\"height\" => \"400\",\n\t\t\t\t// Title params\n\t\t\t\t\"title\" => '',\n\t\t\t\t\"subtitle\" => '',\n\t\t\t\t\"description\" => '',\n\t\t\t\t\"link\" => '',\n\t\t\t\t\"link_style\" => 'default',\n\t\t\t\t\"link_image\" => '',\n\t\t\t\t\"link_text\" => esc_html__('Learn more', 'trx_addons'),\n\t\t\t\t\"title_align\" => \"left\",\n\t\t\t\t\"title_style\" => \"default\",\n\t\t\t\t\"title_tag\" => '',\n\t\t\t\t// Common params\n\t\t\t\t\"id\" => \"\",\n\t\t\t\t\"class\" => \"\",\n\t\t\t\t\"css\" => \"\"\n\t\t\t\t), 'trx_addons_sow_widget_googlemap')\n\t\t\t);\n\t\t\n\t\t\tdo_action('trx_addons_action_before_widget_fields', $instance, 'trx_addons_sow_widget_googlemap');\n\t\t\t\n\t\t\t$this->show_field(array('name' => 'widget_title',\n\t\t\t\t\t\t\t\t\t'title' => __('Widget title:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'value' => $instance['widget_title'],\n\t\t\t\t\t\t\t\t\t'type' => 'text'));\n\t\t\n\t\t\tdo_action('trx_addons_action_after_widget_title', $instance, 'trx_addons_sow_widget_googlemap');\n\t\t\t\n\t\t\t$this->show_field(array('title' => __('Layout parameters', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'type' => 'info'));\n\t\t\t\n\t\t\t$this->show_field(array('name' => 'type',\n\t\t\t\t\t\t\t\t\t'title' => __('Layout:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'value' => $instance['type'],\n\t\t\t\t\t\t\t\t\t'options' => apply_filters('trx_addons_sc_type', trx_addons_components_get_allowed_layouts('sc', 'googlemap'), 'trx_sc_googlemap'),\n\t\t\t\t\t\t\t\t\t'type' => 'select'));\n\t\t\t\n\t\t\t$this->show_field(array('name' => 'style',\n\t\t\t\t\t\t\t\t\t'title' => __('Style:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'value' => $instance['style'],\n\t\t\t\t\t\t\t\t\t'options' => trx_addons_get_list_sc_googlemap_styles(),\n\t\t\t\t\t\t\t\t\t'type' => 'select'));\n\t\t\t\n\t\t\t$this->show_field(array('name' => 'zoom',\n\t\t\t\t\t\t\t\t\t'title' => __('Zoom:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Map zoom factor from 1 to 21. If 0 or empty - fit bounds to markers\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => (int) $instance['zoom'],\n\t\t\t\t\t\t\t\t\t\"std\" => 16,\n\t\t\t\t\t\t\t\t\t\"options\" => trx_addons_get_list_range(0, 21),\n\t\t\t\t\t\t\t\t\t\"type\" => 'select'));\n\n\t\t\t$this->show_field(array('name' => 'width',\n\t\t\t\t\t\t\t\t\t'title' => __('Width:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Width of the map. Any CSS measurement units are allowed. If unit is not specified - use 'px'\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['width'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"100%\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'text'));\n\n\t\t\t$this->show_field(array('name' => 'height',\n\t\t\t\t\t\t\t\t\t'title' => __('Height:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Height of the map. Any CSS measurement units are allowed. If unit is not specified - use 'px'\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['height'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"350\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'text'));\n\t\t\t\n\t\t\t$this->show_field(array('title' => __('Marker', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t'type' => 'info'));\n\n\t\t\t$this->show_field(array('name' => 'marker_address',\n\t\t\t\t\t\t\t\t\t'title' => __('Address:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Specify address to place marker on the map\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['marker_address'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'text'));\n\n\t\t\t$this->show_field(array('name' => 'marker_latlng',\n\t\t\t\t\t\t\t\t\t'title' => __('or Latitude and Longitude:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Comma separated coorditanes of the marker (instead Address above)\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['marker_latlng'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'text'));\n\n\t\t\t$this->show_field(array('name' => 'marker_icon',\n\t\t\t\t\t\t\t\t\t'title' => __('Marker image:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Select or upload image for this marker\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['marker_icon'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'image'));\n\n\t\t\t$this->show_field(array('name' => 'marker_title',\n\t\t\t\t\t\t\t\t\t'title' => __('Title:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Title of the marker\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['marker_title'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'text'));\n\n\t\t\t$this->show_field(array('name' => 'marker_description',\n\t\t\t\t\t\t\t\t\t'title' => __('Description:', 'trx_addons'),\n\t\t\t\t\t\t\t\t\t\"description\" => wp_kses_data( __(\"Description of the marker\", 'trx_addons') ),\n\t\t\t\t\t\t\t\t\t'value' => $instance['marker_description'],\n\t\t\t\t\t\t\t\t\t\"std\" => \"\",\n\t\t\t\t\t\t\t\t\t\"type\" => 'textarea'));\n\n\t\t\t$this->show_fields_title_param($instance);\n\t\t\t$this->show_fields_id_param($instance);\n\t\t\n\t\t\tdo_action('trx_addons_action_after_widget_fields', $instance, 'trx_addons_sow_widget_googlemap');\n\t\t}", "title": "" }, { "docid": "fb1f441540816f3fceec21dd7a0f0144", "score": "0.54771376", "text": "public function loadOptions()\n {\n $options = array(self::DEBUG_OPT_NAME => false, self::GOOGLE_MAP_API_KEY => '', self::CONFIG_OPT_NAME => '');\n\n foreach ($options as $name => $default) {\n $opt = get_option($name);\n if ($opt == false || $opt == '') {\n $this->options[$name] = $default;\n add_option($name, $default);\n } else {\n $this->options[$name] = $opt;\n }\n }\n\n // if the request contains the right parameter, enable debugging for this request only\n if (isset($_REQUEST[\"__mrpdebug\"]) && $_REQUEST[\"__mrpdebug\"]) {\n $this->options[self::DEBUG_OPT_NAME] = true;\n }\n }", "title": "" } ]
38c65b45bdc1a14f35c7601eae1cf608
setStartOn URLs Return reschedule milestone URL
[ { "docid": "fff06ebb16849e71aac05f90d836767b", "score": "0.61541605", "text": "function getRescheduleUrl() {\n return assemble_url('project_milestone_reschedule', array(\n 'project_id' => $this->getProjectId(),\n 'milestone_id' => $this->getId(),\n ));\n }", "title": "" } ]
[ { "docid": "d3d986862a651bbdbfa41cf4b50aae23", "score": "0.5606801", "text": "public function getImportStartUrl()\n {\n return $this->getUrl('*/*/start');\n }", "title": "" }, { "docid": "fa04ee9ca25f5804370eff8904169338", "score": "0.5399915", "text": "function jumpNewsfeed() {\n //this is the newsfeed specific find with all the neighbor data\n $this->Content->pullCollection($this->request->data['pname'], $this->pageLimit);\n $patterns = '/page:[0-9]+\\//';\n $replacements =\n 'page:' .\n $this->Content->collectionPages[$this->request->data['j'] - 1]['neighbors']['page'] . '/'\n . '#id' .\n $this->Content->collectionPages[$this->request->data['j'] - 1]['id'];\n if (preg_match($patterns, $this->request->data['url'])) {\n return preg_replace($patterns, $replacements, $this->request->data['url']);\n } else {\n return $this->request->data['url'] .\n '/page:' .\n $this->Content->collectionPages[$this->request->data['j'] - 1]['neighbors']['page'] . '/'\n . '#id' .\n $this->Content->collectionPages[$this->request->data['j'] - 1]['id'];\n }\n }", "title": "" }, { "docid": "3ec99554fe5335ba7500f1d7a46627dd", "score": "0.50847334", "text": "public function getOnlineBlogsBasedOnStartAndOffSet($start = 0, $end = 3);", "title": "" }, { "docid": "2ceaaf86aa0d9b0263475040ab4d401c", "score": "0.50322706", "text": "function request_coder_requests_milestone()\n{\n\treturn \"request_coder_requests_milestone\";\n}", "title": "" }, { "docid": "c9ceb0b2fa6272cc9b96ef6971aa4c65", "score": "0.48867798", "text": "private function set_url() {\n\t\t$this->source_url = str_replace ( '%%ccnum%%' , $this->regno, $this->options['source_url'] );\n\t}", "title": "" }, { "docid": "8ea5e8277b7e81f948b204ee47e18890", "score": "0.4853734", "text": "public function start2() {\n $masih = true;\n $links = array();\n $date = '';\n while ($masih) {\n $c = new Crawler($this->start_url, true);\n while ($line = $c->readline()) {\n if (preg_match('/([0-9]{2}\\\\/[0-9]{2}\\\\/[0-9]{2})/i', $line, $matches)) {\n $date = str_replace('/', '-', $matches[1]);\n } else if (preg_match('/READ MORE/i', $line)) {\n preg_match('/href=\\'([^\\']+)\\'/i', $line, $matches);\n $link = $matches[1];\n //$text = basename($link);\n $text = $date;\n $links[$text] = $link;\n } else if (preg_match('/pagination/i', $line)) {\n if (preg_match('/<a class=\"down l\" href=\"([^\"]+)\">/i', $line, $matches)) {\n $next = $matches[1];\n $this->start_url = $this->base_url . $next;\n } else {\n $masih = false;\n }\n //print_r($links);flush(); //debug\n break;\n }\n }\n $c->close();\n unset($c);\n }\n print_r($links);flush(); //debug\n foreach ($links as $text => $url) {\n $this->crawl_page($this->base_url . $url, $text);\n }\n }", "title": "" }, { "docid": "ee897aad62a53e3b39af4677a2a4b60b", "score": "0.48420548", "text": "private static function UrlStart() {\n\t\treturn self::Scheme() . '://' . self::Host();\n\t}", "title": "" }, { "docid": "95c00c163ed718c11114ba5508eb7e8c", "score": "0.48399928", "text": "public function setStartUrl($startUrl)\n {\n $this->startUrl = $startUrl;\n return $this;\n }", "title": "" }, { "docid": "e41c43b15a3cc7957ea8e31ae3942d43", "score": "0.48158655", "text": "public function setStart($start);", "title": "" }, { "docid": "36f18c84f966194aa0916064806666b0", "score": "0.47948685", "text": "function add_endpoint(){\n add_rewrite_tag( \"%project-id%\", '([^&]+)' );\n\n\tadd_rewrite_rule(\n\t\t'hsc-api/project-timeline/([^&]+)/?',\n\t\t'index.php?project-id=$matches[1]&api-call=project_timeline',\n\t\t'top' );\n}", "title": "" }, { "docid": "41e9f6e52f09a741309303ba515968ab", "score": "0.47200736", "text": "function get_links_partial($start, $limit) {\n return $this->db->simple_query(\" select * from vs_links limit $start , $limit \");\n }", "title": "" }, { "docid": "c7ecbf946df7f7e02e1a85bdb5de3095", "score": "0.4707823", "text": "private function _setPathUrl(){\r\n $parsedURL = explode('/', $_SERVER['REQUEST_URI']);\r\n foreach ($parsedURL as $part) {\r\n $pos = strpos($part, ':');\r\n if (!empty($pos)){\r\n $piece = explode(':', $part);\r\n $this->partOfURL = array_merge($this->partOfURL, [\r\n $piece[0] => $piece[1]\r\n ]);\r\n }\r\n }\r\n if(empty($this->partOfURL['page'])){\r\n $this->partOfURL['page'] = 1;\r\n }\r\n }", "title": "" }, { "docid": "564cfc0b035aebf86770c84418c43947", "score": "0.4701631", "text": "public function sitemapurl()\n {\n\n $query = $this->em->createQuery('SELECT s FROM Softwarewisdom\\Crawler\\Entity\\SitemapUrl s WHERE s.status=\\'pending\\' ORDER BY s.id');\n /** @var \\Softwarewisdom\\Crawler\\Entity\\SitemapUrl $sitemapUrl **/\n $sitemapUrl= $query->setMaxResults(1)->getOneOrNullResult();\n\n\n $xml = file_get_contents($sitemapUrl->getUrl());\n if ($xml) {\n $str = simplexml_load_string($xml);\n if ($str) {\n foreach ($str->url as $site) {\n $this->urls[] = array(\"loc\" => (string)$site->loc,\n \"changefreq\" => (string)$site->changefreq, 'parser'=> \"\",'status'=>'pending');\n $this->progressAdv();\n $this->insert();\n }\n $this->progressAdv();\n $this->insert();\n $sitemapUrl->setStatus(\"done\");\n }\n }\n\n $this->em->flush();\n $this->em->clear();\n }", "title": "" }, { "docid": "658d441fd73e524f1da1730af7b99975", "score": "0.46910653", "text": "private function setCurrentLocalTasks() {\n $this->currentLocalTasks = $this->localTaskManager->getLocalTasks($this->routeMatch->getRouteName(), 0);\n\n if (!empty($this->currentLocalTasks)) {\n foreach ($this->currentLocalTasks['tabs'] as $route => $link) {\n $this->localLinks[$route] = $link['#link'];\n }\n }\n }", "title": "" }, { "docid": "6ce39229b3d8d08db8a8327c424bc738", "score": "0.4665939", "text": "function getURL () {\n\t\t$project = $this->getProjectCode();\n\t\t$url = $project->getMainEntryPointURL();\n\t\t$url .= \"?title=\";\n\t\tif ($this->namespace > 0) {\n\t\t\t$url .= $project->getNamespaceCanonicalName($this->namespace);\n\t\t\t$url .= ':';\n\t\t}\n\t\t$url .= $this->getNormalizedTitle();\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "42098f28e1bb959c16d3fbac888bb164", "score": "0.46597806", "text": "public function urlPrefix();", "title": "" }, { "docid": "5c2e78dc31251f7b6057babf476743a8", "score": "0.4654725", "text": "function rw_relative_urls() {\n\t// - In feed\n\t// - In sitemap by WordPress SEO plugin\n\tif (is_feed() || get_query_var('sitemap'))\n\t\treturn;\n\t$filters = array(\n\t\t'post_link',\n\t\t'post_type_link',\n\t\t'page_link',\n\t\t'attachment_link',\n\t\t'get_shortlink',\n\t\t'post_type_archive_link',\n\t\t'get_pagenum_link',\n\t\t'get_comments_pagenum_link',\n\t\t'term_link',\n\t\t'search_link',\n\t\t'day_link',\n\t\t'month_link',\n\t\t'year_link',\n\t);\n\tforeach ($filters as $filter) {\n\t\tadd_filter($filter, 'wp_make_link_relative');\n\t}\n}", "title": "" }, { "docid": "b3ccdaab0cb6a3ea57a1b60ab1dc0296", "score": "0.46511725", "text": "public static function get_initial_url () {\n\t\treturn join('/', array(\n\t\t\tself::SLUG,\n\t\t\tThx_VirtualSubpage::INITIAL_SLUG\n\t\t));\n\t}", "title": "" }, { "docid": "56727162f60ce5a301c4b2288a511e01", "score": "0.46189964", "text": "abstract protected function genSourceRoute($liturgyDate);", "title": "" }, { "docid": "bc7a5a4ce95689c1151e2b8409f37687", "score": "0.46128675", "text": "function nextLink() {\n\t$q = \"SELECT `issue`.`id` AS `issue_id`,`page`.*,`issue`.* FROM `issue`,`page`\n\t\t WHERE `issue`.`newspaper_id`='{$this->row['newspaper_id']}' AND\n\t\t `issue`.`id`=`page`.`issue_id` AND\n\t\t (\n\t\t (\n\t\t `issue`.`date` = '{$this->row['date']}' AND\n\t\t `page`.`page_no` > '{$this->row['page_no']}'\n\t\t ) OR\n\t\t `issue`.`date` > '{$this->row['date']}'\n\t\t )\n\t\t ORDER BY `issue`.`date`,`page`.`page_no`\n\t\t LIMIT 1\n\t\t \";\n\n\t$res = do_query($q);\n\tif ($row = mysql_fetch_assoc($res)) {\n\t return NPC_BASE_URL . \"newspaper/{$this->row['urltitle']}/issue-{$row['issue_id']}/{$row['page_no']}\";\n\t}\n\treturn FALSE;\n }", "title": "" }, { "docid": "3a562b187ae3b02b88e14d6a324b2240", "score": "0.45706686", "text": "public function getFoundUrl();", "title": "" }, { "docid": "c38041285bd7547b2819ecc4a79cebf1", "score": "0.45694572", "text": "public function setFoundUrl($url);", "title": "" }, { "docid": "46905c80f1db56c5a5430f809977ac0c", "score": "0.45609623", "text": "function main_url(){\n return \"http://\".$this->imdbsite.\"/title/tt\".$this->imdbid().\"/\";\n }", "title": "" }, { "docid": "edec9e7c9954872d2789625930d79a1f", "score": "0.45467135", "text": "public function GetMigrateD8ServiceRestLessonsEndpointUrl();", "title": "" }, { "docid": "a21b8c49d17d592a6c1b9aedc33dcfe7", "score": "0.45401192", "text": "public function __construct()\n {\n switch (Config::get('task'))\n {\n case 'The Simple Task':\n $this->url = 'https://www.homegate.ch/mieten/immobilien/kanton-zuerich/trefferliste?ep=';\n\n $this->domRegEx = \"/\\w*\\/(?=\\d)[0-9]*/\";\n //$this->domRegEx = \"/(\\S*/\\w*[0-9])/\"; //replace if IDs is alphanumerical up to 22X link\n\n $this->curlRegEx = \"/^<a.*\\shref=\\\"(\\S*\\/[0-9]*)\\\"/m\";\n //$this->curlRegEx = \"/^<a.*\\shref=\"((\\S*/\\w*[0-9])*)\"/m\"; //replace if IDs is alphanumerical up to 22x link\n break;\n case 'The Advanced Task':\n $this->url = 'http://www.alice.com/folder/simple-php-proxy/src/de/kaufen/suchen/haus_wohnung/kanton_zuerich/liste.aspx?p='; // Bypass Proxy Library\n //$this->url = 'https://www.newhome.ch/de/kaufen/suchen/haus_wohnung/kanton_zuerich/liste.aspx?p='; //the orginal url\n $this->domRegEx = \"/(h|f)\\S*\\&id\\S*(?=\\\")/\";\n $this->curlRegEx = $this->domRegEx;\n break;\n\n }\n }", "title": "" }, { "docid": "514e144ac12b6d30ac0dbe6bcdaf9828", "score": "0.45388138", "text": "function getURLJiraPathBase(){\n \treturn 'http://incidenciasexternas.opds.gba.gov.ar:8080';\n }", "title": "" }, { "docid": "b68d8751879824a64c523157da5d60e3", "score": "0.4535269", "text": "public function parserAction($start, $end)\n {\n if($start < $end){\n $doc = \\hQuery::fromUrl($this->url, ['Accept' => 'text/html,application/xhtml+xml;q=0.9,*/*;q=0.8']);\n ini_set('max_execution_time', 900);\n $worker = new NewsParser();\n\n foreach ($doc->find('div.news-block ') as $item)\n {\n if ($item->find('a')){\n $worker->setItem($item);\n $newsData = $worker->prepareData();\n\n News::create($newsData);\n }\n }\n\n $next = $doc->find('.pages > li a')->next()->attr('href');\n\n if(!empty($next)){\n $this->start++;\n\n $this->url = 'https://www.segodnya.ua/regions/odessa/p' . $this->start . '.html';\n $this->parserAction($this->start, $this->end);\n }\n }\n }", "title": "" }, { "docid": "be0aeb578018ddaf575a11f3a652b812", "score": "0.45114025", "text": "public function getSchedulerUrl()\n {\n return ('/' === $this->scheduler[0]) ? $this->getAdminUrl().$this->scheduler : $this->scheduler;\n }", "title": "" }, { "docid": "869473c2e626efa433bbcc845fc3e788", "score": "0.44964457", "text": "function get_projectprogress($id, $projectname, $startdate, $enddate)\n{\n $progress = get_progress($startdate, $enddate);\n $rowspan = get_diffStartEnd($startdate, $enddate) + 1;\n $startDay = get_day($startdate);\n $endDay = get_day($enddate);\n $start = get_d_m_Y($startdate);\n $end = get_d_m_Y($enddate);\n $startDate = date_create($startdate);\n $endDate = date_create($enddate);\n $milestones = MilestoneManager::loadMilestones($id);\n\n $s = '<table class=\"table\" style=\"width: 25rem\">';\n $s = $s . '<tr><th class=\"bg-info\">Progress</th><th class=\"bg-info\">Date</th><th class=\"bg-info\">Milestones</th></tr>';\n $s = $s . '<tr><td id=\"progress-td-'.$projectname.'\" class=\"progress-td align-middle\" rowspan=\"'. $rowspan .'\"><div id=\"progress-'.$projectname.'\" class=\"progress progress-bar-vertical\"><div id=\"'.$projectname.'\" style=\"width: 100%\" class=\"progress-bar bg-success\" role=\"progressbar\" aria-valuenow=\"'. $progress.'\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div></div></td>\n <td class=\"align-middle custom-td\">\n <div>'.$start.'</div>\n </td>\n <td class=\"align-middle custom-td\">\n <div>START</div>\n </td> \n </tr>';\n\n $interval = new DateInterval('P1D');\n $startDate = date_add($startDate, date_interval_create_from_date_string('1 days'));\n $daterange = new DatePeriod($startDate, $interval, $endDate);\n foreach($daterange as $date)\n {\n $milestoneStr = \"\";\n $milestoneCount = 0;\n $url = $_SERVER['REQUEST_URI'];\n\n foreach ($milestones as $milestone) {\n if (date_sameDay($milestone->enddate, $date)) {\n $ms_name = $milestone->name;\n if (strlen($ms_name) > 22) {\n $ms_name = substr($ms_name, 0, 22) . \"...\";\n }\n $milestoneCount++;\n if ($milestone->isFinished()) {\n $ms_name = $ms_name . \" &#10004;\";\n }\n $milestoneStr = $milestoneStr . '<div class=\"btn-group\"> \n <button type=\"button\" class=\"btn dropdown-item text-success viewmilestone\" data-toggle=\"tooltip\" '\n . 'title=\"' . $milestone->name . '\" value=\"'. $milestone->id .'\">'. $ms_name .'</button>'\n . '</form></div><br>';\n }\n }\n\n if ($milestoneCount == 0) {\n $s = $s . '\n <td class=\"align-middle\"><div></div></td>\n <td class=\"align-middle\" style=\"opacity: 0\"><div>-</div>';\n } else {\n $s = $s . '<tr>\n <td class=\"align-middle custom-td\"><div>' . $date->format('d-m-Y') . '</div></td>\n <td class=\"align-middle custom-td\">';\n if ($milestoneCount > 1) {\n $s = $s . '<div class=\"dropdown\"><button class=\"btn btn-sm btn-secondary dropdown-toggle\" type=\"button\" id=\"dropdownMenuButton\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">Milestones <span class=\"badge badge-info\" style=\"font-size: 13px\">'.$milestoneCount.'</span></button><div class=\"dropdown-menu\" aria-labelledby=\"dropdownMenuButton\">';\n }\n $s = $s . $milestoneStr;\n if ($milestoneCount > 1) {\n $s = $s . '</div></div>';\n }\n }\n\n $s = $s . '</td></tr>';\n\n }\n\n $s = $s . '<tr>\n <td class=\"align-middle custom-td\">\n <div class=\"align-middle custom-td\">'.$end.'</div>\n </td>\n <td class=\"align-middle custom-td\">\n <div>FINISH</div>\n </td>\n </tr></div></table></div>';\n\n return $s;\n}", "title": "" }, { "docid": "39b38e151f5cc36867629a96a0121959", "score": "0.4493083", "text": "abstract public function url();", "title": "" }, { "docid": "97182f574b1cfccaffd875301449f782", "score": "0.44718593", "text": "public function start() {\n $masih = true;\n $links = array();\n while ($masih) {\n $c = new Crawler($this->start_url, true);\n while ($line = $c->readline()) {\n if (preg_match('/mainDashedOn/i', $line)) {\n $line = $c->readline();\n preg_match('/<a [^>]*href=\"([^\"]+)\">([^<]+)<\\\\/a>/i', $line, $matches);\n $link = $matches[1];\n $text = $matches[2];\n $text = basename($link);\n $links[$text] = $link;\n } else if (preg_match('/pagination/i', $line)) {\n if (preg_match('/<a class=\"down l\" href=\"([^\"]+)\">/i', $line, $matches)) {\n $next = $matches[1];\n $this->start_url = $this->base_url . $next;\n } else {\n $masih = false;\n }\n //print_r($links);flush(); //debug\n break;\n }\n }\n $c->close();\n unset($c);\n }\n //print_r($links);flush(); //debug\n foreach ($links as $text => $url) {\n $this->crawl_page($this->base_url . $url, $text);\n }\n }", "title": "" }, { "docid": "1d3c3254b131e2cc527dd25e1792e5d2", "score": "0.44643688", "text": "public function fullUrls($base) {\r\n $core_path = MODX_CORE_PATH . 'components/emailresource/';\r\n require $core_path . 'model/emailresource/fullurls.class.php';\r\n $this->html = FullUrls::fullUrls($base, $this->html);\r\n return;\r\n }", "title": "" }, { "docid": "58dd3f69b33def491ce7c75cedb24329", "score": "0.44567636", "text": "public function milestonelistAction() {\n\t\t$this->view->milestone = $this->projectService->getProject((int) $this->_getParam('milestoneid'));\n\t\t$this->view->project = $this->projectService->getProject($this->view->milestone->parentid);\n\n\t\t$this->renderRawView('feature/milestone-list.php');\n\t}", "title": "" }, { "docid": "47d1bd0684ccb5d8c0ab56324b99c4a5", "score": "0.44557002", "text": "function smrURI() {\n\t$host=\"http://\".$_SERVER['HTTP_HOST'];\n\t$currentPage=$_SERVER[\"PHP_SELF\"];\n\t$lastBar=strrpos( $currentPage, \"/\");\n\tif ($lastBar===false) {\n\t\t$uri=$host;\n\t} else {\n\t\t$uri=$host.substr( $currentPage, 0, $lastBar).\"/\";\n\t}\n\treturn($uri);\n}", "title": "" }, { "docid": "603c22535cfa50ea159edd96331cdd2f", "score": "0.44542754", "text": "public function isStartingURL($value=null) {\n\t\tif (isset($value)) { $this->is_starting_point = $value ? true : false; }\n\t\treturn $this->is_starting_point;\n\t}", "title": "" }, { "docid": "c970f859c0d27c331b49ff72256d670f", "score": "0.4448358", "text": "function reschedule($new_start_on, $new_due_on, $reschedule_tasks = false) {\n $errors = new ValidationErrors();\n \n if(!instance_of($new_start_on, 'DateValue')) {\n $errors->addError(lang('Start date is not valid'), 'start_on');\n } // if\n \n if(!instance_of($new_due_on, 'DateValue')) {\n $errors->addError(lang('Due date is not valid'), 'start_on');\n } // if\n \n if($errors->hasErrors()) {\n return $errors;\n } // if\n \n $old_start_on = $this->getStartOn();\n $old_due_on = $this->getDueOn();\n \n $this->setStartOn($new_start_on);\n $this->setDueOn($new_due_on);\n \n $save = $this->save();\n if($save && !is_error($save)) {\n if($reschedule_tasks) {\n $diff_days = (integer) ceil(($new_due_on->getTimestamp() - $old_due_on->getTimestamp()) / 86400);\n if($diff_days != 0) {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $completable_types = get_completable_project_object_types();\n \n $rows = db_execute_all(\"SELECT id FROM $project_objects_table WHERE milestone_id = ? AND type IN (?)\", $this->getId(), $completable_types);\n if(is_foreachable($rows)) {\n $related_object_ids = array();\n foreach($rows as $row) {\n $related_object_ids[] = (integer) $row['id'];\n } // foreach\n \n db_execute(\"UPDATE $project_objects_table SET due_on = DATE_ADD(due_on, INTERVAL $diff_days DAY) WHERE (id IN (?) OR parent_id IN (?)) AND type IN (?)\", $related_object_ids, $related_object_ids, $completable_types);\n } // if\n } // if\n } // if\n } // if\n \n return $save;\n }", "title": "" }, { "docid": "4d277cda34f2427fb90c1610e6f6adc1", "score": "0.44442964", "text": "public function setup_pageURL() {\n\t\t\tparent::setup_pageURL();\n\t\t\t$pagenbr = Paginator::generate_pagenbr($this->pageurl);\n\t\t\t$regex = \"((page)\\d{1,3})\";\n\t\t\t$this->pageurl->path = preg_replace($regex, \"\", $this->pageurl->path);\n\t\t\t$this->pageurl->path->add('customer');\n\t\t\t$this->pageurl->path->add($this->custID);\n\t\t\t$this->paginationinsertafter = $this->custID;\n\n\t\t\tif (!empty($this->shipID)) {\n\t\t\t\t$this->pageurl->path->add(\"shipto-$this->shipID\");\n\t\t\t\t$this->paginationinsertafter = \"shipto-$this->shipID\";\n\t\t\t}\n\n\t\t\t$this->pageurl = Paginator::paginate_purl($this->pageurl, $pagenbr, $this->paginationinsertafter);\n\t\t}", "title": "" }, { "docid": "030f18d25bd3c2e86ad7925022da097c", "score": "0.44381434", "text": "public function test_section_url() {\n global $DB;\n\n $this->assertEmpty($DB->get_field('course_sections', 'sequence', array(\n 'course' => $this->course->id,\n 'section' => 1\n )));\n\n // Apply a rule to append to the section.\n $rule = \\tool_cat\\rule::from_record(array(\n 'id' => \\tool_cat\\rule::FAKE_RULE_ID,\n 'order' => 1,\n 'rule' => 'append_to',\n 'target' => 'section',\n 'targetid' => '1',\n 'datatype' => 'activity',\n 'data' => serialize(array(\n 'activity' => 'url',\n 'name' => 'URL',\n 'url' => 'http://www.google.com'\n ))\n ));\n $rule->apply(array($this->course));\n\n // Apply a rule to prepend to the section.\n $rule = \\tool_cat\\rule::from_record(array(\n 'id' => \\tool_cat\\rule::FAKE_RULE_ID,\n 'order' => 1,\n 'rule' => 'prepend_to',\n 'target' => 'section',\n 'targetid' => '1',\n 'datatype' => 'activity',\n 'data' => serialize(array(\n 'activity' => 'url',\n 'name' => 'Main URL',\n 'url' => 'http://www.google.com'\n ))\n ));\n $rule->apply(array($this->course));\n\n $this->assertNotEmpty($DB->get_field('course_sections', 'sequence', array(\n 'course' => $this->course->id,\n 'section' => 1\n )));\n\n // Get modinfo.\n $modinfo = get_fast_modinfo($this->course);\n $section = $modinfo->get_section_info(1);\n $seq = explode(',', $section->sequence);\n\n // Make sure seq[0] name is the prepended one.\n $cm = $modinfo->cms[$seq[0]];\n\n $this->assertEquals('Main URL', $cm->name);\n }", "title": "" }, { "docid": "2ecfd98fd3a7287f57e9c84aa5ce52b8", "score": "0.44313464", "text": "public function set_map_urls() {\r\n foreach ($this->trucks as $i => $truck) {\r\n $truck->build_map_url($this->depot_address);\r\n }\r\n }", "title": "" }, { "docid": "b1be2e01491470fe1890b07033bdf050", "score": "0.442304", "text": "public function getStartsAt();", "title": "" }, { "docid": "a56c99111bc898006e53b8406fc0cd81", "score": "0.44179118", "text": "public function setUrl($urlEnd){\n $this->url = $urlEnd;\n return $this;\n }", "title": "" }, { "docid": "8d197be2b5e44ab4559a910eceb61efd", "score": "0.4411384", "text": "protected function setUrl(){\n $url = url_title($this->getTitle(), '-', true);\n $this->url = $url;\n }", "title": "" }, { "docid": "f6d9934b3cb4aa8e32a649da02695675", "score": "0.4410363", "text": "private function format_urls() {\n foreach ( $this->urls as $url ) {\n $entity = new stdClass();\n $entity->start = $url->indices[0];\n $entity->end = $url->indices[1];\n $entity->length = $url->indices[1] - $url->indices[0];\n $entity->replace = sprintf(\n self::URL_LINK_PATTERN,\n $url->url,\n $url->expanded_url,\n $url->display_url\n );\n\n $this->entity_holder[$entity->start] = $entity;\n }\n }", "title": "" }, { "docid": "c0f38f84d0dada9c8e0651bcba99ac2d", "score": "0.43982697", "text": "abstract public function get_url_report(): moodle_url;", "title": "" }, { "docid": "657d1ff05406d7d2badf8904ee694266", "score": "0.4396485", "text": "function OnMapUrls()\n {\n CCEvents::MapUrl( 'admin/renaming', array( 'CCFileRename', 'AdminRenaming'), CC_ADMIN_ONLY );\n }", "title": "" }, { "docid": "db4c1cad994f36dc2c6ecd2256c8fdc0", "score": "0.43964574", "text": "public static function milestone($milestone)\n {\n return Html::a(Html::encode($milestone['title']), $milestone['html_url']);\n //Progress::widget(['percent' => ($issueCount > 0) ? ($milestone['closed_issues'] / $issueCount) * 100 : 0]);\n }", "title": "" }, { "docid": "4a802e9250769ceccfa2a43e5af38e70", "score": "0.43900102", "text": "public function setDefaultStart($defaultStart) {\r\n $this->defaultStart = $defaultStart;\r\n }", "title": "" }, { "docid": "9303840b43e2eb216f23f18698ff10ca", "score": "0.43899092", "text": "function addCronTask()\n{\n require_once __DIR__.\"/models/SchedulesModel.php\";\n require_once __DIR__.\"/models/LogModel.php\";\n\n\n // Get auto follow schedules\n $Schedules = new SchedulesModel;\n $Schedules->where(\"is_active\", \"=\", 1)\n ->where(\"schedule_date\", \"<=\", date(\"Y-m-d H:i:s\"))\n ->where(\"end_date\", \">=\", date(\"Y-m-d H:i:s\"))\n ->orderBy(\"last_action_date\", \"ASC\")\n ->setPageSize(10) // required to prevent server overload\n ->setPage(1)\n ->fetchData();\n\n if ($Schedules->getTotalCount() < 1) {\n return false;\n }\n\n $settings = namespace\\settings();\n $default_speeds = [\n \"very_slow\" => 1,\n \"slow\" => 2,\n \"medium\" => 3,\n \"fast\" => 4,\n \"very_fast\" => 5,\n ];\n $speeds = $settings->get(\"data.speeds\");\n if (empty($speeds)) {\n $speeds = [];\n } else {\n $speeds = json_decode(json_encode($speeds), true);\n }\n $speeds = array_merge($default_speeds, $speeds);\n\n $as = [__DIR__.\"/models/ScheduleModel.php\", __NAMESPACE__.\"\\ScheduleModel\"];\n foreach ($Schedules->getDataAs($as) as $sc) {\n $Log = new LogModel;\n $Account = \\Controller::model(\"Account\", $sc->get(\"account_id\"));\n $User = \\Controller::model(\"User\", $sc->get(\"user_id\"));\n\n // Calculate next schedule datetime...\n if (isset($speeds[$sc->get(\"speed\")]) && (int)$speeds[$sc->get(\"speed\")] > 0) {\n $speed = (int)$speeds[$sc->get(\"speed\")];\n $delta = round(3600/$speed);\n\n if ($settings->get(\"data.random_delay\")) {\n $delay = rand(0, 300);\n $delta += $delay;\n }\n } else {\n $delta = rand(720, 7200);\n }\n\n $next_schedule = date(\"Y-m-d H:i:s\", time() + $delta);\n if ($sc->get(\"daily_pause\")) {\n $pause_from = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_from\");\n $pause_to = date(\"Y-m-d\").\" \".$sc->get(\"daily_pause_to\");\n if ($pause_to <= $pause_from) {\n // next day\n $pause_to = date(\"Y-m-d\", time() + 86400).\" \".$sc->get(\"daily_pause_to\");\n }\n\n if ($next_schedule > $pause_to) {\n // Today's pause interval is over\n $pause_from = date(\"Y-m-d H:i:s\", strtotime($pause_from) + 86400);\n $pause_to = date(\"Y-m-d H:i:s\", strtotime($pause_to) + 86400);\n }\n\n if ($next_schedule >= $pause_from && $next_schedule <= $pause_to) {\n $next_schedule = $pause_to;\n }\n }\n $sc->set(\"schedule_date\", $next_schedule)\n ->set(\"last_action_date\", date(\"Y-m-d H:i:s\"))\n ->save();\n\n\n // Set default values for the log...\n $Log->set(\"user_id\", $User->get(\"id\"))\n ->set(\"account_id\", $Account->get(\"id\"))\n ->set(\"status\", \"error\");\n\n\n // Check account\n if (!$Account->isAvailable() || $Account->get(\"login_required\")) {\n // Account is either removed (unexected, external factors)\n // Or login required for this account\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"Re-login is required for the account.\")\n ->save();\n continue;\n }\n\n // Check user account\n if (!$User->isAvailable() || !$User->get(\"is_active\") || $User->isExpired()) {\n // User is not valid\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n\n // Log data\n $Log->set(\"data.error.msg\", \"Activity has been stopped\")\n ->set(\"data.error.details\", \"User account is either disabled or expred.\")\n ->save();\n continue;\n }\n\n if ($User->get(\"id\") != $Account->get(\"user_id\")) {\n // Unexpected, data modified by external factors\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n // Check targets\n $targets = @json_decode($sc->get(\"target\"));\n if (!$targets) {\n // Unexpected, data modified by external factors\n // Deactivate schedule\n $sc->set(\"is_active\", 0)->save();\n continue;\n }\n\n // Select random target\n $i = rand(0, count($targets) - 1);\n $target = $targets[$i];\n\n // Check selected target\n if (empty($target->type) ||\n empty($target->id) ||\n !in_array($target->type, [\"hashtag\", \"location\", \"people\"]))\n {\n // Unexpected, data modified by external factors\n continue;\n }\n\n try {\n $Instagram = \\InstagramController::login($Account);\n } catch (\\Exception $e) {\n // Couldn't login into the account\n $Account->refresh();\n\n // Log data\n if ($Account->get(\"login_required\")) {\n\n $error_count = $sc->get(\"data.error_count\");\n\n if($error_count == null){\n $error_count = 0;\n }\n\n $error_count++;\n $sc->set(\"data.error_count\", $error_count);\n if($error_count >= 3){\n $sc->set(\"is_active\", 0)->save();\n $sc->set(\"data.error_count\", 0);\n }\n $Log->set(\"data.error.msg\", \"Activity Relogin/Connection Problems \" . $error_count .\"/3\");\n } else {\n $Log->set(\"data.error.msg\", \"Action re-scheduled\");\n }\n\n $Log->set(\"data.error.details\", $e->getMessage())\n ->save();\n\n continue;\n }\n\n // Logged in successfully\n // Now script will try to get feed and follow new user\n // And will log result\n $Log->set(\"data.trigger\", $target);\n\n\n // Find username to follow\n $follow_pk = null;\n $follow_username = null;\n $follow_full_name = null;\n $follow_profile_pic_url = null;\n\n $turns = 1;\n\n $rank_token = \\InstagramAPI\\Signatures::generateUUID();\n\n if ($target->type == \"hashtag\") {\n try {\n $feed = $Instagram->hashtag->getFeed(\n str_replace(\"#\", \"\", $target->id),\n $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the hashtag\n\n // Log data\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $e->getMessage())\n ->save();\n continue;\n }\n\n if (count($feed->getItems()) < 1) {\n // Invalid\n continue;\n }\n\n foreach ($feed->getItems() as $item) {\n if (empty($item->getUser()->getFriendshipStatus()->getFollowing()) &&\n empty($item->getUser()->getFriendshipStatus()->getOutgoingRequest()) &&\n $item->getUser()->getPk()!= $Account->get(\"instagram_id\"))\n {\n\n $_log = new LogModel([\n \"user_id\" => $User->get(\"id\"),\n \"account_id\" => $Account->get(\"id\"),\n \"followed_user_pk\" => $item->getUser()->getPk(),\n \"status\" => \"success\"\n ]);\n\n if (!$_log->isAvailable()) {\n\n $filter1 = namespace\\customFilterFast($item->getUser()->getPk(),$item->getUser()->getFullName(),$item->getUser()->getProfilePicUrl(),(bool)$item->getUser()->getIsPrivate(),$sc,$User,$Account);\n\n if(!$filter1){\n continue;\n }\n $filter = namespace\\customFilter($Instagram, $item->getUser()->getPk(), $sc, $User,$Account);\n\n if(!$filter && $turns <= 3){\n $turns++;\n continue;\n }\n\n // Found new user\n $follow_pk = $item->getUser()->getPk();\n $follow_username = $item->getUser()->getUsername();\n $follow_full_name = $item->getUser()->getFullName();\n $follow_profile_pic_url = $item->getUser()->getProfilePicUrl();\n $follow_is_private = (bool)$item->getUser()->getIsPrivate();\n break;\n }\n }\n }\n } else if ($target->type == \"location\") {\n try {\n $feed = $Instagram->location->getFeed($target->id, $rank_token);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the location id\n\n // Log data\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $e->getMessage())\n ->save();\n continue;\n }\n\n if (count($feed->getItems()) < 1) {\n // Invalid\n continue;\n }\n\n foreach ($feed->getItems() as $item) {\n if (empty($item->getUser()->getFriendshipStatus()->getFollowing()) &&\n empty($item->getUser()->getFriendshipStatus()->getOutgoingRequest()) &&\n $item->getUser()->getPk() != $Account->get(\"instagram_id\"))\n {\n $_log = new LogModel([\n \"user_id\" => $User->get(\"id\"),\n \"account_id\" => $Account->get(\"id\"),\n \"followed_user_pk\" => $item->getUser()->getPk(),\n \"status\" => \"success\"\n ]);\n\n if (!$_log->isAvailable()) {\n\n // Codingmatter Modification\n // Lets get all user related data for filtering.\n\n $filter1 = namespace\\customFilterFast($item->getUser()->getPk(),$item->getUser()->getFullName(),$item->getUser()->getProfilePicUrl(),(bool)$item->getUser()->getIsPrivate(),$sc,$User,$Account);\n\n if(!$filter1){\n continue;\n }\n\n //filter\n $filter = namespace\\customFilter($Instagram, $item->getUser()->getPk(), $sc, $User,$Account);\n\n if(!$filter && $turns <= 3){\n $turns++;\n continue;\n }\n\n // Found new user\n $follow_pk = $item->getUser()->getPk();\n $follow_username = $item->getUser()->getUsername();\n $follow_full_name = $item->getUser()->getFullName();\n $follow_profile_pic_url = $item->getUser()->getProfilePicUrl();\n $follow_is_private = (bool)$item->getUser()->getIsPrivate();\n break;\n }\n }\n }\n } else if ($target->type == \"people\") {\n $round = 1;\n $loop = true;\n $next_max_id = null;\n\n while ($loop) {\n try {\n $feed = $Instagram->people->getFollowers($target->id, $rank_token, null, $next_max_id);\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the user id\n $loop = false;\n\n if ($round == 1) {\n // Log data\n $Log->set(\"data.error.msg\", \"Couldn't get the feed\")\n ->set(\"data.error.details\", $e->getMessage())\n ->save();\n }\n\n continue 2;\n }\n\n if (count($feed->getUsers()) < 1) {\n // Invalid\n $loop = false;\n continue 2;\n }\n\n foreach ($feed->getUsers() as $user) {\n if (empty($user->getFriendshipStatus()) &&\n $user->getPk() != $Account->get(\"instagram_id\"))\n {\n $_log = new LogModel([\n \"user_id\" => $User->get(\"id\"),\n \"account_id\" => $Account->get(\"id\"),\n \"followed_user_pk\" => $user->getPk(),\n \"status\" => \"success\"\n ]);\n\n if (!$_log->isAvailable()) {\n\n $filter1 = namespace\\customFilterFast($user->getPk(),$user->getFullName(),$user->getProfilePicUrl(),(bool)$user->getIsPrivate(),$sc,$User,$Account);\n\n if(!$filter1){\n continue;\n }\n\n $filter = namespace\\customFilter($Instagram, $user->getPk(), $sc, $User,$Account);\n\n if(!$filter && $turns <= 3){\n $turns++;\n continue;\n }\n\n // Found new user\n $follow_pk = $user->getPk();\n $follow_username = $user->getUsername();\n $follow_full_name = $user->getFullName();\n $follow_profile_pic_url = $user->getProfilePicUrl();\n\t\t\t\t\t\t\t $follow_is_private = (bool)$user->getIsPrivate();\n break 2;\n }\n }\n }\n\n $round++;\n $next_max_id = empty($feed->getNextMaxId()) ? null : $feed->getNextMaxId();\n if ($round >= 5 || !empty($follow_pk) || $next_max_id) {\n $loop = false;\n }\n }\n }\n\n if (empty($follow_pk)) {\n $Log->set(\"data.error.msg\", \"Couldn't find new user to follow\")\n ->save();\n continue;\n }\n\n\n // New user found to follow\n try {\n\n // MODIFICATION by Codingmatters.\n // https://www.facebook.com/CodingMatters-945340885622490/\n // We want a Powerlike feature.\n // pull the timeline of the getFollower\n // and get last 3 posts to like.\n\n $power_count = $sc->get(\"data.powerlike_count\");\n $power_like = $sc->get(\"data.powerlike\");\n $power_random = $sc->get(\"data.powerlike_random\");\n $likedmedia = [];\n\n if($power_count > 3){\n $power_count = 3; //max value\n };\n\n if($power_like && !$follow_is_private){\n try {\n $feed = $Instagram->timeline->getUserFeed($follow_pk);\n\n $items = $feed->getItems();\n\n if($power_random){\n $power_count = mt_rand(1, intval($power_count));\n }\n\n $temp_count = $power_count;\n\n foreach ($items as $item) {\n\n $media = new \\stdClass();\n\n if (!empty($item->getId()) && !$item->getHasLiked()) {\n\n if($temp_count== 0){\n break;\n }else{\n $temp_count = $temp_count - 1;\n }\n\n $media->media_id = $item->getId();\n $media->media_code = $item->getCode();\n $media->media_type = $item->getMediaType();\n $media->media_thumb = namespace\\_get_media_thumb_igitem($item);\n $media->user_pk = $item->getUser()->getPk();\n $media->user_username = $item->getUser()->getUsername();\n $media->user_full_name = $item->getUser()->getFullName();\n\n try {\n $resp = $Instagram->media->like($item->getId());\n } catch (\\Exception $e) {\n continue;\n }\n\n if (!$resp->isOk()) {\n continue;\n }else{\n array_push($likedmedia, $media);\n }\n }\n }\n\n } catch (\\Exception $e) {\n // Couldn't get instagram feed related to the hashtag\n }\n\n }else{\n $power_count = 0;\n }\n\n $resp = $Instagram->people->follow($follow_pk);\n\n } catch (\\Exception $e) {\n $Log->set(\"data.error.msg\", \"Couldn't follow the user\")\n ->set(\"data.error.details\", $e->getMessage())\n ->save();\n continue;\n }\n\n\n if (!$resp->isOk()) {\n $Log->set(\"data.error.msg\", \"Couldn't follow the user\")\n ->set(\"data.error.details\", \"Something went wrong\")\n ->save();\n continue;\n }\n\n\n // Followed new user successfully\n $Log->set(\"status\", \"success\")\n ->set(\"data.followed\", [\n \"pk\" => $follow_pk,\n \"username\" => $follow_username,\n \"full_name\" => $follow_full_name,\n \"profile_pic_url\" => $follow_profile_pic_url\n ])\n ->set(\"data.powerlike\", [\n \"count\" => count($likedmedia),\n \"posts\" => $likedmedia\n ])\n ->set(\"followed_user_pk\", $follow_pk)\n ->save();\n }\n}", "title": "" }, { "docid": "bf827f1d617219043cfda0bdbcf9e378", "score": "0.43810648", "text": "function calendar_home_set() {\n if ( !isset($this->calendar_home_set) ) {\n $this->calendar_home_set = array();\n/* $qry = new AwlQuery('SELECT DISTINCT parent_container FROM collection WHERE is_calendar AND user_no = :user_no', array( ':user_no' => $this->user_no));\n if ( $qry->Exec('principal',__LINE__,__FILE__) ) {\n if ( $qry->rows() > 0 ) {\n while( $calendar = $qry->Fetch() ) {\n $this->calendar_home_set[] = ConstructURL($calendar->parent_container, true);\n }\n }\n else {*/\n $this->calendar_home_set[] = $this->principal_url;\n// }\n// }\n }\n return $this->calendar_home_set;\n }", "title": "" }, { "docid": "358e6a21c63b16befc43b1e68d4aff36", "score": "0.43760937", "text": "private function updateRealStart() {\n\n\t\t$firstStartedConstruction = null;\n\t\tif ($this->getInvestment()) {\n\t\t\t$firstStartedConstruction = BaseQuery::create('PlanningConstruction')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->filterByPlanningProject($this)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->filterByRealStart(null, Criteria::ISNOTNULL)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->orderByRealstart(Criteria::ASC)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->findOne();\n\t\t}\n\n\t\t$firstStartedActivity = BaseQuery::create('PlanningActivity')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->filterByObjecttype('Project')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->filterByObjectid($this->getId())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->filterByRealStart(null, Criteria::ISNOTNULL)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->orderByRealstart(Criteria::ASC)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->findOne();\n\n\t\tif (!is_null($firstStartedConstruction) && !is_null($firstStartedActivity))\n\t\t\t$this->setRealstart(min($firstStartedConstruction->getRealStart(), $firstStartedActivity->getRealStart()));\n\t\telseif (!is_null($firstStartedConstruction)) // && is_null($firstStartedActivity)\n\t\t\t$this->setRealstart($firstStartedConstruction->getRealStart());\n\t\telseif (!is_null($firstStartedActivity)) // && is_null($firstStartedConstruction)\n\t\t\t$this->setRealstart($firstStartedActivity->getRealStart());\n\t\telse // is_null($firstStartedConstruction) && is_null($firstStartedActivity)\n\t\t\t$this->setRealstart(null);\n\t}", "title": "" }, { "docid": "7d1bb03db998f521adb41871c22959ce", "score": "0.4362858", "text": "function createPlanning($url){\n if(count($url) != 6){\n return $error = json_encode([\n 'status' => 'failed',\n 'message' => \"nombre d'argument incorect...\"\n ]);\n }\n else{\n // verification de la range\n $range = planning_range($url[2], $url[3]);\n\n return setPlanning($url[1],$range,$url[4],$url[5]);\n\n }\n}", "title": "" }, { "docid": "0bdab4402dee31e693ebfa4d9c8998e1", "score": "0.43566304", "text": "protected function _defineUrls()\n\t{\n\t\tif (isset($_SERVER['HTTP_HOST'])) {\n\t\t\t$baseUrl = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST']\n\t\t\t\t. substr($_SERVER['SCRIPT_NAME'], 0, -strlen(basename($_SERVER['SCRIPT_NAME'])));\n\t\t} else {\n\t\t\t$baseUrl = 'http://localhost/';\n\t\t}\n\n\t\tdefine('BASE_URL', $baseUrl);\n\t\tdefine('CURRENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t}", "title": "" }, { "docid": "94df0ba4da5f739ed9e181623bed92f8", "score": "0.43548727", "text": "public function getCalendarLink($month, $year,$action='view') {\n\t\t$baseurl = Zend_Controller_Front :: getInstance()->getBaseUrl() ? Zend_Controller_Front :: getInstance()->getBaseUrl() : \"/calendar/view/index/\";\n\t\t$baseurl .=\"month/$month/year/$year\";\n\t\treturn $baseurl;\n\t}", "title": "" }, { "docid": "7015f059bad9f9122eccbf1f00f90064", "score": "0.43526134", "text": "public function setRequestUrl($url);", "title": "" }, { "docid": "f90b91507d19325d1a716ec7b0ea7440", "score": "0.43510324", "text": "public function getSourceUrl();", "title": "" }, { "docid": "f90b91507d19325d1a716ec7b0ea7440", "score": "0.43510324", "text": "public function getSourceUrl();", "title": "" }, { "docid": "fcf2ced22f46782c0d3475fa2688e251", "score": "0.43441588", "text": "public function getActionUrl();", "title": "" }, { "docid": "027b60a59b4b56905d072ff84f46dd4d", "score": "0.43287024", "text": "function printQuickLinks($year, $cMonth) {\n if($year == 0)\n $year = date('Y');\n\n $prev = $year-1;\n $next = $year+1;\n echo '<a id=\"'. $prev .'-change-year\" class=\"change-year\" href =\"?month='. $cMonth .'&year='. $prev .'\">Prev Year</a>';\n for($i = 1; $i < 13; $i++) {\n echo '<a class=\"'. $i .'-'. $year .'\" id=\"quickmonth-'. $i .'-'. $year .'\" '.\n\t\t\t\t\t'href =\"?month='. $i .'&year='. $year .'\">'.\n date('M', mktime(0, 0, 0, $i, 1, $year)) .'</a>';\n }\n echo '<a id=\"'. $next .'-change-year\" class=\"change-year\" href =\"?month='. $cMonth .'&year='. $next .'\">Next Year</a>';\n }", "title": "" }, { "docid": "c00a40647b9523d8be66af0e3df90ded", "score": "0.4325781", "text": "public function urlparserAction() {\n $url = $this->_getParam(\"url\");\n $html = file_get_html($url);\n $locationMapper = new Model_LocationMapper();\n $arrivalMapper = new Model_ArrivalMapper();\n $x = 0;\n foreach ($html->find('tr') as $tr) {\n if ($x > 0) {\n //LOCATION\n $location = new Model_Location();\n $desc = $tr->find('td span', 0)->plaintext;\n //name needs to be the substring of name - desc\n $name = $tr->find('td.text-left', 0)->plaintext;\n $name = substr($name, 0, strlen($name) - strlen($desc));\n $name = trim($name);\n // check if the name exists\n $locationMapper->findByName($name, $location);\n $locationID = $location->getId();\n if (isset($locationID)) {\n // get id\n } elseif (strlen($name) > 0) {\n // save, then get id\n $location->setName($name);\n $location->setDescription($desc);\n $locationMapper->save($location);\n $locationID = $locationMapper->getLastInsertedID();\n }\n foreach ($tr->find('.day') as $time) {\n $t = $time->plaintext;\n if (strlen($t) == 3) {\n $t = '0' . $t;\n }\n $arrival = new Model_Arrival();\n $arrival->setLine($this->_getParam(\"line\"));\n $arrival->setLocation($locationID);\n $arrival->setTime($t);\n $arrival->setSessionID($this->_getParam(\"sessionID\"));\n $arrivalMapper->save($arrival);\n }\n foreach ($tr->find('.night') as $time) {\n $t = $time->plaintext;\n $finalTime = 0;\n if (strrpos($t, ':')) {\n $h = explode(':', $t);\n if ($h[0] < 12) {\n $h[0] = $h[0] + 12;\n $finalTime = $h[0] . ':' . $h[1];\n }\n } else {\n if (strlen($t) == 4 && (substr($t, 0, 2) == '12')) {\n $finalTime = $t;\n } else {\n $finalTime = $t + 1200;\n }\n }\n $arrival = new Model_Arrival();\n $arrival->setLine($this->_getParam(\"line\"));\n $arrival->setLocation($locationID);\n $arrival->setTime($finalTime);\n $arrival->setSessionID($this->_getParam(\"sessionID\"));\n $arrivalMapper->save($arrival);\n }\n }\n $x++;\n }\n return $this->_helper->redirector('unifiedadmin');\n }", "title": "" }, { "docid": "9ea0d3258dce4c8bf3cd6e7aa039ca47", "score": "0.43169758", "text": "public function sitemapAction() {\n $dom = new DOMDocument('1.0');\n $dom->formatOutput = true;\n $root = $dom->createElement('urlset');\n $root->setAttribute('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9');\n $dom->appendChild($root);\n\n foreach(Model_Entity::retrieveWithAlerts() as $entity) {\n $url = $dom->createElement('url');\n $url->appendChild(\n $dom->createElement('loc', WEBSITE_URL . $this->view->url(array(\"id\"=>$entity, Model_Static_Functions::dashString($entity->title)=>\"\"), \"entity\", false))\n );\n $root->appendChild($url);\n unset($url);\n }\n $this->_returnXML($dom->saveXML());\n }", "title": "" }, { "docid": "aca81637758bc721b29690439bbfc4f8", "score": "0.43154347", "text": "public static function getPublishSetsUrl($pageSize, $responseFields, $startIndex)\n\t{\n\t\t$url = \"/api/content/publishsets/?pageSize={pageSize}&startIndex={startIndex}&responseFields={responseFields}\";\n\t\t$mozuUrl = new MozuUrl($url, UrlLocation::TENANT_POD,\"GET\", false) ;\n\t\t$url = $mozuUrl->formatUrl(\"pageSize\", $pageSize);\n\t\t$url = $mozuUrl->formatUrl(\"responseFields\", $responseFields);\n\t\t$url = $mozuUrl->formatUrl(\"startIndex\", $startIndex);\n\t\treturn $mozuUrl;\n\t}", "title": "" }, { "docid": "c6e655d5beb58a8ffb70471f39b751fa", "score": "0.4313505", "text": "public function url($manipulation_name = '')\n\t{\n\t\tif ( ! empty($manipulation_name))\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\n\t\t$prefix = !empty($this->_source_settings->subfolder) ? rtrim($this->_source_settings->subfolder, '/').'/' : '';\n\n\t\treturn $this->_source_settings->url_prefix . $prefix . $this->subpath;\n\t}", "title": "" }, { "docid": "f9cc386468a729b209ad4f248dfeedf0", "score": "0.43083912", "text": "public function parseUrl()\n\t{\n\t\tCore_Event::notify(get_class($this) . '.onBeforeParseUrl', $this);\n\n\t\t$oHelpdesk = $this->getEntity();\n\n\t\t$Core_Router_Route = new Core_Router_Route($this->pattern);\n\t\t$this->patternParams = $matches = $Core_Router_Route->applyPattern(Core::$url['path']);\n\n\t\tif (isset($matches['page']) && $matches['page'] > 1)\n\t\t{\n\t\t\t$this->page($matches['page'] - 1)\n\t\t\t\t->offset($this->limit * $this->page);\n\t\t}\n\n\t\tCore_Event::notify(get_class($this) . '.onAfterParseUrl', $this);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b9f5beb12cac06433e84a404bf93d6ab", "score": "0.42945653", "text": "private function _setUrl()\n {\n $url = $_SERVER['REQUEST_URI'];\n $extraPath = $this->getOption('extra_path', '');\n if ($extraPath != '' && substr($url, 0, strlen($extraPath)) == $extraPath) {\n $url = substr($url, strlen($extraPath) - strlen($url));\n }\n $url = $this->_target . $url;\n curl_setopt($this->_curl, CURLOPT_URL, $url);\n }", "title": "" }, { "docid": "1b70c274b23476939eb9392f8a8d651e", "score": "0.42886606", "text": "function set_product_startpage($products_id, $status) {\n $sql_data_array = array('products_startpage' => $status,\n 'products_last_modified' => 'now()');\n xtc_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', \"products_id = '\".$products_id.\"'\"); \n }", "title": "" }, { "docid": "2b9d969a2e823096c3a5a00653776c60", "score": "0.42841133", "text": "private function setLinks()\n {\n $links = array();\n for($i = $this->first; $i <= $this->last; $i++) {\n $links[] = $i;\n }\n $this->links = $links;\n }", "title": "" }, { "docid": "d5ab20222b73a07172e081786f280158", "score": "0.42815912", "text": "public function setPullStart($start)\n {\n $this->pull_start = (int)$start;\n }", "title": "" }, { "docid": "3adb35d24aa98b2e66e0417830d98c26", "score": "0.42806298", "text": "public function startingAt($start) {\n $this->start= $start;\n return $this;\n }", "title": "" }, { "docid": "607a55fa54ca65d2c28115ac3be627db", "score": "0.42784098", "text": "public function getUrlEnding(): string;", "title": "" }, { "docid": "8bc92480bd0b6bfbeeaa27ea27c4d1ab", "score": "0.4277693", "text": "private function generateUrlset()\n {\n route_tree()->getRegisteredRoutes(true)->each(function (RegisteredRoute $registeredRoute, $index) {\n if (!$registeredRoute->hasMethod('GET')) {\n $this->warn($registeredRoute->path . \" EXCLUDED due to not being GET route.\");\n return;\n }\n\n if ($registeredRoute->routeNode->sitemap->isExcluded()) {\n $this->warn($registeredRoute->path . \" EXCLUDED manually.\");\n return;\n }\n\n if (is_null($registeredRoute->routeKeys) && $registeredRoute->routeAction->hasParameters() && !$registeredRoute->routeAction->canResolveAllRouteKeys($registeredRoute->locale)) {\n $this->warn($registeredRoute->path . \" EXCLUDED due to parameters without stated values or model-binding.\");\n return;\n }\n\n if ($registeredRoute->routeAction->isRedirect()) {\n $this->warn($registeredRoute->path . \" EXCLUDED due to redirect.\");\n return;\n }\n\n foreach ($this->getExcludedMiddleware() as $excludedMiddleware) {\n if ($registeredRoute->routeAction->hasMiddleware($excludedMiddleware)) {\n $this->warn($registeredRoute->path . \" EXCLUDED due to use of middleware '$excludedMiddleware'.\");\n return;\n }\n }\n\n $this->addRegisteredRouteToUrlset($registeredRoute);\n\n });\n }", "title": "" }, { "docid": "2bf2b6efc7526abcc1009b34a8ca6106", "score": "0.42648017", "text": "public function nextUrl()\n {\n $next = $this->current() + 1;\n return ($next <= $this->pages()) ? $this->parseUrl($next) : \"\";\n }", "title": "" }, { "docid": "b86e6550dd001ae303b24944eeaaceb8", "score": "0.42626557", "text": "function itex_init_setlinks_links()\n {\n $i = 1;\n\n while ($i++)\n {\n $q = $this->setlinks->GetLinks(1);\n if (empty($q) || !strlen($q))\n {\n break;\n }\n\n if (strlen($q)) $this->links[] = $q;\n\n //!!!!!!!!!!check it, tk ne vozvrashaet pustuu stroku\n if ($i > 30) break;\n }\n $this->itex_debug('setlinks links:'.var_export($this->links, true));\n return 1;\n }", "title": "" }, { "docid": "5389f5dac3dc7ee5d3bc7b45ecf931f5", "score": "0.4257965", "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": "a87d6b945c0ca88bc0f2cd675cccf970", "score": "0.4254477", "text": "public static function firstPageUrl()\n\t{\n\t\treturn self::numberUrl( self::firstPage() );\n\t}", "title": "" }, { "docid": "645e709e1c6a4ae7f96fb3ad5f622a0d", "score": "0.4252823", "text": "public function setDefaultUrls()\n {\n $this->url_return = $this->getUrl($this->config->get('transfers24.url_return'));\n $this->url_status = $this->getUrl($this->config->get('transfers24.url_status'));\n }", "title": "" }, { "docid": "d3e972bb3199cc84e77f71f235f13d2d", "score": "0.4247276", "text": "public function test_getSourceUrl_sourceUrlMysqlEmpty_executesCorrectly()\r\n\t{\r\n\t\t$expected = \"aDummySourceUrl\";\r\n\t\t$this->prepareMarcRecordFieldCallMethod(\"getSourceUrl\", $expected);\r\n\r\n\t\t$actual = $this->service->getSourceUrl($this->marcRecordFieldsMock);\r\n\t\t$this->assertEquals($expected, $actual);\r\n\t}", "title": "" }, { "docid": "699644efbffcf1147c70bdc3baa40543", "score": "0.42441827", "text": "public function generateShortenUrl(){\n\n return $this->getAppBaseUrl().$this->url->short_url;\n\n }", "title": "" }, { "docid": "4895efcaa95f2268e9e799913d8beedd", "score": "0.42432898", "text": "function set_issue_milestone($gh, $milestone) {\n foreach ($gh->available_milestones as $m => $n) {\n if (strcasecmp($m, $milestone) == 0) {\n $gh->request['milestone'] = $n;\n return;\n }\n }\n}", "title": "" }, { "docid": "7cf75980ce0bcd2889a448e1eae7293e", "score": "0.42363217", "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": "e280e4ce6a61c77530d6cc0149e606b1", "score": "0.42338663", "text": "public function actionStartPage() {\n if (Yii::app()->request->getParam('id') && ( $model = WikiPages::model()->findByPk(Yii::app()->request->getParam('id')) )) {\n // Is it already a start page?\n if ($model->isstartpage) {\n Functions::setFlash(Yii::t('wiki', 'Wiki: Sorry, That page is already marked as the start page.'));\n $this->redirect(Yii::app()->request->getUrlReferrer());\n }\n\n // Mark everyone as not then mark this as a start page\n $model->makeStartPage();\n // Flash and redirect\n Functions::setFlash(Yii::t('wiki', 'Wiki: Page marked as a start page.'));\n $this->redirect(Yii::app()->request->getUrlReferrer());\n } else {\n $this->redirect(Yii::app()->request->getUrlReferrer());\n }\n }", "title": "" }, { "docid": "2e04e9264e1f4b9333f2dbc3c137d577", "score": "0.42337483", "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": "5fc4582076de21a34c7bad6742baa176", "score": "0.42317295", "text": "function set_next_event()\n{\n global $xoopsDB;\n $now = time();\n // Search already passed event that exist next extent.\n $res = $xoopsDB->query('SELECT eid, min(exdate),edate FROM ' . EGTBL . ' LEFT JOIN ' . EXTBL . \" ON eid=eidref AND exdate>$now WHERE (edate<$now OR ldate=0) AND ldate<$now AND expire>$now GROUP BY eid\");\n while (list($eid, $exdate, $edate) = $xoopsDB->fetchRow($res)) {\n if (empty($exdate)) {\n $exdate = $edate;\n }\n $xoopsDB->queryF('UPDATE ' . EGTBL . \" SET ldate=$exdate WHERE eid=$eid\");\n }\n}", "title": "" }, { "docid": "9ef185d03fdbcc4a6e5bac9dbe3f58c9", "score": "0.42299563", "text": "public function url();", "title": "" }, { "docid": "1422f3c37f1a99f97668c9274902305e", "score": "0.42272043", "text": "private function _setRanges()\n {\n if( isset( $_SERVER['HTTP_RANGE'] ) AND $this->resume )\n {\n $ranges = explode( '-', substr($_SERVER['HTTP_RANGE'],-6,6) );\n\n $this->_startRange = $ranges[0];\n $this->_endRange = $ranges[1];\n }\n }", "title": "" }, { "docid": "feb66fbb2646c2867a9c5c1f82730a1a", "score": "0.42264533", "text": "public function getURL()\n {\n return $this->page->getURL() . 'marks/' . $this->page_mark->id . '/';\n }", "title": "" }, { "docid": "980cc4fee3781c834579c3337aad2da6", "score": "0.42248952", "text": "function set_local_url($match, $url)\n {\n $this->urls[$match] = rtrim($url, '/');\n }", "title": "" }, { "docid": "3c52884f1cde5326e6da1cfa2140dd92", "score": "0.42198932", "text": "public function setURL($url){\n\t\t\treturn 'http://'.$_SERVER['SERVER_NAME'].'/myTinyMVC/index.php'.$url;\n\t\t}", "title": "" }, { "docid": "4e25eedeea56fd180e4d2969f604f3ed", "score": "0.42142242", "text": "function request($url, $name, $run_at = null, $has_date = null)\n{\n if($run_at && date('H:i', time()) != $run_at ){\n return;\n }\n // Check if its the day of the week\n if($has_date && date('D') != $has_date){\n return;\n }\n\n $date = date('m/d/Y H:i:s', time());\n\n $curl = curl_init();\n curl_setopt_array($curl, [\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => $url,\n CURLOPT_USERAGENT => 'ISYD Cron',\n ]);\n $resp = curl_exec($curl);\n\n flog($name . '_access', $date . ' > ' . $resp);\n\n curl_close($curl);\n}", "title": "" }, { "docid": "15f40f339db09861df59f449cbe925be", "score": "0.42023453", "text": "public function main()\r\n\t{\r\n\t\t$this->call_url = str_replace('http://', '', $this->call_url);\r\n\t\t$this->check_recursive_map($this->start_point, $this->end_point, $this->call_url);\r\n\t}", "title": "" }, { "docid": "e71d8fff478aa553f0b9222f591cceac", "score": "0.42021385", "text": "function setSyncUrl()\n {\n }", "title": "" }, { "docid": "0acabe4da39da7dfbd5bb87d9cb2a517", "score": "0.42019796", "text": "function display_past_quests($start_year) {\n $start_year_int = uoft_year_to_int($start_year);\n $current_year_int = uoft_year_to_int($GLOBALS['this_year']);\n for ($i = $start_year_int; $i < $current_year_int; $i++) {\n $uoft_year = int_to_uoft_year($i);\n display_header_link($uoft_year, $uoft_year, true, false);\n }\n\n}", "title": "" }, { "docid": "ac068e7fbf7cc4b9e4ba0c214a089dc2", "score": "0.419853", "text": "function site_url($next=''){\n return _site_url().$next;\n}", "title": "" }, { "docid": "3f196d4b3eb5390e46116c9bd69c9f12", "score": "0.41934767", "text": "public function getStartLocation(): string\n {\n return $this->startLocation;\n }", "title": "" }, { "docid": "17c04add998a469476662a290a09d7d2", "score": "0.41934007", "text": "function __construct() \n {\n parent::__construct();\n $this->murl = '/modules/'.$this->uri->segment(1).'/';\n }", "title": "" }, { "docid": "508867a2a5e5a743c2d464146ccbff89", "score": "0.4185156", "text": "function addUrl(){ \n global $theme,$lang;\n $count=@$_SESSION['reminder_data']['reminder_rec_count'];\n if(empty($count)) $count=0;\n if($count==0){\n $theme->add_rec_top=\"&raquo;&nbsp;<a href=\\\"/go/_users/reminder1.php\\\">\".$lang->add_reminder.\"</a>&nbsp;&laquo;\";\n $theme->add_rec_bottom=\"&nbsp;\";\n } else if ($count<$this->max_records){ \n $theme->add_rec_top=\"&raquo;&nbsp;<a href=\\\"/go/_users/reminder1.php\\\">\".$lang->add_reminder.\"</a>&nbsp;&laquo;\";\n $theme->add_rec_bottom=\"&raquo;&nbsp;<a href=\\\"/go/_users/reminder1.php\\\">\".$lang->add_reminder.\"</a>&nbsp;&laquo;\"; \n } else { \n $theme->add_rec_top=\"&nbsp;\";\n $theme->add_rec_bottom=\"&nbsp;\";\n }\n }", "title": "" }, { "docid": "b0be4ca3a546982c3535677581088b99", "score": "0.41800743", "text": "function getURLRead(){\r\n\t\treturn \"/task/\".$this->getId();\r\n\t}", "title": "" }, { "docid": "56060e6ecaf16182806ecb662518c7bc", "score": "0.41796577", "text": "function boj_cron_add_minly( $schedules ) {\n\t$schedules['five_minutely'] = array(\n\t\t'interval' => 300,\n\t\t'display' => 'Once Weekly'\n\t\t);\n\treturn $schedules;\n}", "title": "" }, { "docid": "edd1ceb0a8491dc7d7ac4d1c382e841b", "score": "0.4179386", "text": "function setStartOn($value) {\n return $this->setDateField1($value);\n }", "title": "" }, { "docid": "f01dc9b16628f15bc19e3c34af98ddfb", "score": "0.41750512", "text": "public function url()\n {\n return $this->url ? $this->url : url($this->current()->implode('/'));\n }", "title": "" }, { "docid": "3df3decb0f487a7d7044a9c63c194a8c", "score": "0.4174912", "text": "static function expandLocalUrls($enable = true)\n {\n global $wgScript, $wgScriptPath, $wgArticlePath, $wgUploadPath, $wgStylePath, $wgMathPath, $wgLocalFileRepo;\n static $originalPaths = NULL;\n $prev = $originalPaths && true;\n if ($enable && !$originalPaths)\n {\n // Save original values\n $originalPaths = array($wgScript, $wgArticlePath, $wgScriptPath, $wgUploadPath,\n $wgStylePath, $wgMathPath, $wgLocalFileRepo['url']);\n // Expand paths\n $wgScript = wfExpandUrl($wgScript);\n $wgArticlePath = wfExpandUrl($wgArticlePath);\n $wgScriptPath = wfExpandUrl($wgScriptPath);\n $wgUploadPath = wfExpandUrl($wgUploadPath);\n $wgStylePath = wfExpandUrl($wgStylePath);\n $wgMathPath = wfExpandUrl($wgMathPath);\n $wgLocalFileRepo['url'] = wfExpandUrl($wgLocalFileRepo['url']);\n // Destroy existing RepoGroup, if any\n RepoGroup::destroySingleton();\n }\n elseif (!$enable && $originalPaths)\n {\n // Restore original values.\n list($wgScript, $wgArticlePath, $wgScriptPath, $wgUploadPath, $wgStylePath, $wgMathPath,\n $wgLocalFileRepo['url']) = $originalPaths;\n // Destroy existing RepoGroup, if any\n RepoGroup::destroySingleton();\n }\n return $prev;\n }", "title": "" } ]
ae2e6e71903dec0fee822efe442c097e
Show the form for editing the specified Saprotan.
[ { "docid": "7c6f5e20f3db680e07d8d4af370e09ed", "score": "0.65934134", "text": "public function edit($id)\n {\n $jenis = JenisSaprotan::select('id', 'nama')->orderBy('nama')->get();\n\n $saprotan = $this->saprotanRepository->findWithoutFail($id);\n\n if (empty($saprotan)) {\n Flash::error(config('agro.db_not_found'));\n\n return redirect(route('saprotans.index'));\n }\n\n return view('saprotans.edit')->with(['saprotan' => $saprotan, 'jenis' => $jenis]);\n }", "title": "" } ]
[ { "docid": "e849bb86c22e491ed440629e1cb932c0", "score": "0.70214486", "text": "public static function edit_form()\n {\n $user = Users::findOne($_SESSION['user']);\n\n View::make('user/edit.html', array('user' => $user));\n }", "title": "" }, { "docid": "d24532391960fc67c984b062cd4ae199", "score": "0.70136154", "text": "public function edit(Lienquan $lienquan)\n {\n //\n }", "title": "" }, { "docid": "cb92f8dee31eb1a26c82f4c75c07003a", "score": "0.6973623", "text": "public function edit(){\n if (!empty($_POST)) {\n $result = $this->Chapitre->update($_GET['id'], [\n 'titre_chapitre' => $_POST['titre_chapitre'],\n 'contenu_chapitre' => $_POST['contenu_chapitre'],\n 'statut_id' => $_POST['statut_id']\n ]);\n if($result){\n return $this->index();\n }\n }\n $chapitre = $this->Chapitre->find($_GET['id']);\n $this->loadModel('Statut');\n $statuts = $this->Statut->extract('id', 'titre');\n $form = new BootstrapForm($chapitre);\n $this->render('admin.chapitres.edit', compact('chapitre','statuts', 'form'));\n }", "title": "" }, { "docid": "a07582c5e63e26ab0c2691eca9cbfc43", "score": "0.69699126", "text": "public function edit(){\n $nutricionista = Nutricionista::find(Input::get(\"nutricionista_id\"));\n return View::make('nutricionista.nutricionista-editar',compact(\"nutricionista\"));\n }", "title": "" }, { "docid": "96bc4bcd1847fdad7049f8099a622888", "score": "0.6919231", "text": "public function edit(PenjualanModel $penjualanModel)\n {\n return view('fpenjualans.edit',compact('penjualan'));\n }", "title": "" }, { "docid": "ed0f838bf2aec9558b7a04de96d514d6", "score": "0.6892406", "text": "public function edit(Permohonan $permohonan)\n {\n return view('permohonans.edit', compact('permohonan'));\n }", "title": "" }, { "docid": "c0ca6d3bd6305ff71d6c76321811b1bc", "score": "0.685975", "text": "public function edit()\n {\n return view('kontraktor::edit');\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.68593466", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "70810553828354a7ddf260bc80c127b2", "score": "0.6856222", "text": "public function edit()\n {\n $baskaninmesaji = BaskaninMesaji::first();\n return view('admin.mesaj.baskaninmesaji',compact('baskaninmesaji'));\n }", "title": "" }, { "docid": "ed1b30bffe321376280a285340138333", "score": "0.68291456", "text": "public function editConta(){\n\t\treturn View::make('nutricionista.nutricionista-edita-conta');\n\t}", "title": "" }, { "docid": "eb05ed4b194d950755a7fbf5ca2e5f0c", "score": "0.6822451", "text": "public function edit()\n {\n return view('mgtrafico::edit');\n }", "title": "" }, { "docid": "c7ffdd26e9089a22d4871a4030407d80", "score": "0.6802925", "text": "public function edit()\n {\n return view('mgproyectosproductor::edit');\n }", "title": "" }, { "docid": "1168f5cd727cded9baf67b96e99f3625", "score": "0.67945874", "text": "public function edit(slogan $slogan)\n {\n //\n }", "title": "" }, { "docid": "21fdfa72637e0e27db1cc616076cf2c9", "score": "0.6788718", "text": "public function edit(DetilTransaksiPenjualanJasa $NOMOR_TRANSAKSI)\n {\n //\n }", "title": "" }, { "docid": "3a01012946e59416d948f2e41720412b", "score": "0.67773753", "text": "public function edit()\n {\n return view('wahana::edit');\n }", "title": "" }, { "docid": "b6443dc22dd5b373fe2a3f1b8ae18582", "score": "0.67696446", "text": "public function edit(Soal_Mandiri $soal_Mandiri)\n {\n //\n }", "title": "" }, { "docid": "b180a9ce22ebaad7efda98b9ca4f2b33", "score": "0.6760125", "text": "public function edit(mahasiswa $mahasiswa)\n {\n //\n }", "title": "" }, { "docid": "8b7fd5ba95030e0e724a3d8793c00d48", "score": "0.6739372", "text": "public function edit(Mahasiswa $mahasiswa)\n {\n //\n }", "title": "" }, { "docid": "5983be9301f9e569018b173365c51fa7", "score": "0.6721378", "text": "public function edit($id)\n {\n $pameran = Pameran::findOrFail($id);\n return view('dssmenu.partials.pameran_form', compact('pameran'));\n }", "title": "" }, { "docid": "8369855809687db8ae725a28763de6b6", "score": "0.6706889", "text": "public function edit($siswa)\n {\n $kelas= Kelas::all();\n $s = Spp::all();\n $siswa = view_siswa::where('nisn','=',$siswa)->first();\n return view('siswa.edit', compact('siswa', 'kelas','s'));\n }", "title": "" }, { "docid": "44ee03cb711b1a0309ceee020019859d", "score": "0.67040706", "text": "public function edit(Angsuran $angsuran)\n {\n //\n }", "title": "" }, { "docid": "4e22b97aa08223e8b5eef3f322f6b14c", "score": "0.6703596", "text": "public function edit(Karyawan $karyawan)\n {\n return view('karyawan.edit', compact('karyawan'));\n }", "title": "" }, { "docid": "2c37007f9d48092fc6a698887b6348d0", "score": "0.6698896", "text": "public function editForm ()\n {\n /**\n * Ist ein User eingeloggt?\n */\n if (User::isLoggedIn()) {\n /**\n * Eingeloggten User aus der Datenbank abfragen.\n */\n $user = User::getLoggedInUser();\n\n /**\n * View laden und User übergeben.\n */\n View::load('account-edit', [\n 'user' => $user\n ]);\n } else {\n /**\n * Ist kein User eingeloggt, leiten wir auf den Login weiter.\n */\n header(\"Location: login\");\n }\n }", "title": "" }, { "docid": "b042cea8e11884def1872a7adc6b5312", "score": "0.66987306", "text": "public function edit(Forma $forma) {\n $forma = $this->forma->find($forma->id);\n $header = \"Edidar Forma de Medicamento\";\n $titulo = \"Gesfarm - Editar Forma de medicamento: {$forma->nome}\";\n return view('forma.nova', compact('titulo', 'header', 'forma'));\n }", "title": "" }, { "docid": "966e69ad229721e76cffa4c43a65c15f", "score": "0.66813064", "text": "function action_show_edit_view()\n\t{\n\t\t$studId = Request::init()->get_id();\n\t\t$data = $this->model->get_student($studId[0]);\n\t\t$this->view->setHeader(\"Edit student's data\", \"edit\");\n\t\t$this->view->generate('services_view.php', 'template_view.php', $data);\n\t}", "title": "" }, { "docid": "155ec26f215360d9b8d70d1a754f3b0b", "score": "0.66780084", "text": "public function edit(penjualan $penjualan)\n {\n $pembeli = pembeli::all();\n\n return view(\"penjualan.edit\", compact(\"penjualan\", \"pembeli\"));\n }", "title": "" }, { "docid": "9b125b0125c6d8ca0a468f063a081295", "score": "0.66587585", "text": "private function editar()\n {\n //Verifica se o usuário postou o formulário\n if ($_SERVER['REQUEST_METHOD'] == \"POST\")\n {\n //Solicita o cadastramento do texto\n $resultado = $this->Delegator('ConcreteCadastro', 'EditaCadastroId', $this->getPost());\n }\n else\n {\n //Valida o id do texto\n if ($this->getParam('cod_id') !== false && is_numeric($this->getParam('cod_id')))\n {\n //Busca o dado referente ao id da tabela Cadatro\n $dados_cadastro = $this->Delegator('ConcreteCadastro', 'BuscarDetalhesId', $this->getParam());\n\n $dados_cidade = $this->BuscaCidadesEditar($dados_cadastro['cod_estado']);\n $dados_cadastro['cidades'] = $dados_cidade;\n \n //Leva os dados para a view\n $this->View()->assign('dados_cadastro', $dados_cadastro);\n \n //Solicita os dados dos idiomas\n\t\t $dados = $this->Delegator('ConcreteCadastro', 'getEstados');\n\t\t\n\t\t //Associa os dados na view\n\t\t $this->View()->assign('estados', $dados);\n }\n\n //Exibe a view\n $this->View()->display('editar.php');\n }\n }", "title": "" }, { "docid": "3c5037316e9cd8c10cf5fea58feada7e", "score": "0.6657383", "text": "public function editing()\n {\n $muni = Ciudadanos::getMunicipios($this->getRequestParameter('ruta[atestados_id]',''));\n $parr = Ciudadanos::getParroquias($this->getRequestParameter('ruta[atmunicipios_id]',''));\n// H::PrintR($muni);\n $this->ruta->setMunicipios($muni);\n $this->ruta->setParroquias($parr);\n\n }", "title": "" }, { "docid": "b1e2e55d126f7458323ad7ac43738846", "score": "0.6655369", "text": "public function edit($id)\n\t{\n\t\t$perusahaan = \\App\\perusahaan::find($id);\n\n\t\treturn view('master.perusahaanEdit')->with('perusahaan',$perusahaan);\n\t}", "title": "" }, { "docid": "290162f6eee598845b26949acd1fd53d", "score": "0.66341746", "text": "public function edit();", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.66174096", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "74f38b04083036d565664af588ba1522", "score": "0.66119474", "text": "public function edit($id)\n {\n $data = [\n 'data' => Siswa_M::with('SiswaWithUser')->where('siswa.id_siswa', '=', $id)->first()\n ];\n return view('admin.siswa.edit', $data);\n }", "title": "" }, { "docid": "f4e108d9c623dad5e9c0bf37e72c018e", "score": "0.6610327", "text": "public function edit($id)\n {\n $model = Kamar::find($id);\n return view('backend.kamar.form',[\n 'model'=>$model,\n 'update'=>true\n ]);\n }", "title": "" }, { "docid": "cd1b65086d4f2ab13723edb1b81f3fc3", "score": "0.66025734", "text": "public function edit($penugasan_id)\n\t\t{\n\t\t\t$auth = \\Auth::user();\n\t\t\t$dosen_list = $auth -> role_id == 128 ? null : Dosen::orderBy('nama') -> pluck('nama', 'id');\n\t\t\t$penugasan = DosenPenugasan::find($penugasan_id);\n\t\t\t$prodi = \\Siakad\\Prodi::pluck('nama', 'id');\n\t\t\t$tmp = \\DB::select('select id, left(nama, 9) as ta from tapel group by left(nama2, 4) order by left(nama2, 4) desc');\n\t\t\tforeach($tmp as $t) $tapel[$t -> id] = $t -> ta;\n\t\t\t\n\t\t\treturn view('dosen.penugasan.edit', compact('penugasan', 'prodi', 'dosen_list', 'tapel', 'auth'));\n\t\t}", "title": "" }, { "docid": "2115af8575538832dc19672cb295833d", "score": "0.65931416", "text": "public function edit(BarangMasuk $barangMasuk)\n {\n //\n }", "title": "" }, { "docid": "42e7fe6b6312ec2fd12370e91e58bba7", "score": "0.6585386", "text": "public function edit()\n {\n return view('fepage::edit');\n }", "title": "" }, { "docid": "81bc8bca02f3a0356491ff6d528bffa1", "score": "0.657813", "text": "public function edit($id)\n\t{\n\t\tSession::put('menu', 'Editar Secretaria');\n\t\tSession::put('formulario', 'Secretaria');\n\t\tSession::put('editar', True);\n\t\t$secretaria = Secretaria::findOrFail($id);\n\t\t$programasArray = Programa::ProgramasArray();\n\t\treturn view('formularios',compact('secretaria','programasArray'));\n\t}", "title": "" }, { "docid": "8f182db4cfc1a569f072adca24517a35", "score": "0.6569323", "text": "public function edit($id)\n {\n \n $Soutenance_salle = Soutenance_salle::find($id);\n return view('Salle.ModifierSalle')->with('Soutenance_salle',$Soutenance_salle);\n\n\n }", "title": "" }, { "docid": "03fc3df14d9949cab9222a3c537d8695", "score": "0.656485", "text": "public function edit()\n {\n $methods = json_decode(setting('plaka.methods'));\n\n return view('plaka::edit', compact('methods'));\n }", "title": "" }, { "docid": "92fedf39a7c91dbdc7dd0fdf70583ebe", "score": "0.6562199", "text": "public function edit($id)\n {\n $soal = Soal::find($id);\n $submateri = SubMateri::all();\n return view('soal.edit', compact('soal','submateri'));\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.65550274", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.65550274", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "7e053ac339f8e2642b8f9d3fb5cb83c4", "score": "0.65548104", "text": "public function edit()\n {\n $tentang = Tentang::find(1);\n return view('pages.admin.tentang', ['tentang' => $tentang]);\n }", "title": "" }, { "docid": "09281d67cb4365afcde07c8a8c05582d", "score": "0.65537405", "text": "public function edit($id)\n {\n //\n if(!Gate::allows('isEmployee') && !Gate::allows('isAdmin'))\n {\n abort(404,\"soory\");\n }\n\n $sponserform = Sponserform::find($id);\n \n \n //return the view ans pass in the variable\n //dd($id);\n return view('sponserforms.edit')->withSponserform($sponserform);\n }", "title": "" }, { "docid": "5710c3c2c866f42d649be29cdb5ad80f", "score": "0.65504473", "text": "public function edit($id_jurusan)\n {\n $fakultass = Fakultas::all();\n $jurusan = Jurusan::with('fakultas')->find($id_jurusan);\n return view('layoutAdmin.jurusan.edit',compact('fakultass'))->with('jurusan', $jurusan);\n\n // return view('layoutAdmin.jurusan.edit',[\n // 'title' => 'Edit Jurusan'. $id_jurusan,\n // 'jurusan' => $jurusan\n // ]);\n\n // $fakultas = Fakultas::find($id_fakultas);\n // return view('layoutAdmin.fakultas.edit')->with('fakultas', $fakultas);\n\n }", "title": "" }, { "docid": "0b98921a3fa517127c26256c03eca0ad", "score": "0.65461564", "text": "public function edit(normalisasi $normalisasi)\n {\n //\n }", "title": "" }, { "docid": "1ca9fd6ddbbabc198259116a33d90512", "score": "0.65402275", "text": "public function editForm()\n {\n $trader = App::get('database')->select('users', 'id', $_GET['id']);\n return view('traders.edit', compact('trader'));\n }", "title": "" }, { "docid": "7be1226d1cec92dee3362505a0d6b79b", "score": "0.65360934", "text": "public function edit($id)\n {\n $model = Penjualan::findOrFail($id);\n\n return view('penjualan.penjualanForm', compact('model'));\n }", "title": "" }, { "docid": "e292b670ed6fb92f93f41ebc0c959c87", "score": "0.65346915", "text": "public function editAction()\n { \n $profile_id = $this->_getParam('profile');\n $this->_includeForm($profile_id);\n }", "title": "" }, { "docid": "f4142ba6857f301e29965d4e9af11dda", "score": "0.65323085", "text": "public function edit($id_soal)\n {\n $kategori_soal = Kategori::all()->sortBy('kategori');\n $soal = Soal::find($id_soal);\n return view('soal.edit', compact('soal'))->with('kategori_soal', $kategori_soal);\n }", "title": "" }, { "docid": "896da261ba13054375f17ffe77773a1f", "score": "0.65285426", "text": "public function edit($id)\n {\n $indikator = Indikator::where('id_dirkegiatan',$id)->first();\n $program = ProgramUtama::all();\n return view('admin.indikator-kerja.edit', compact('program','indikator'));\n }", "title": "" }, { "docid": "4b19f9969f3a32e1afd6213d93d51edd", "score": "0.652562", "text": "public function edit($id)\n {\n $soal = Soal::find($id);\n return view('admin.soal.edit', compact('soal'));\n }", "title": "" }, { "docid": "e21e68f59049172cf8feaf41de7544d5", "score": "0.6523223", "text": "public function edit(Pendaftaran $pendaftaran)\n {\n //\n }", "title": "" }, { "docid": "3979988ef3232a2bebf4e5ebd16e36dc", "score": "0.652255", "text": "public function editar ($id)\n {\n $multa = $this->multas->where('id',$id)->first();\n $data = ['titulo '=> 'Editar Multa', 'datos' => $multa];\n\n echo view('header');\n echo view('multas/editar', $data);\n echo view('footer');\n }", "title": "" }, { "docid": "b0105c8339a911ba337c4495940eaa90", "score": "0.6522284", "text": "public function edit()\n {\n $multiples = Multiple::all();\n return view('multiple.editform',compact('multiples'));\n }", "title": "" }, { "docid": "d31aeb2e9aeebe6865dd31ca84a58ef9", "score": "0.65179753", "text": "public function edit(StokBarang $stokBarang)\n {\n //\n }", "title": "" }, { "docid": "e475498f05a2e9ebf73f2c3bb1cca551", "score": "0.65175134", "text": "public function edit($id)\n {\n $distributor = Distributor::all();\n $buku = Buku::all();\n $pasok = Pasok::where('id', $id)->first();\n return view('pasok.edit', compact('pasok','buku','distributor'));\n }", "title": "" }, { "docid": "47f1fbba6530c1b6de2f10fe271c1907", "score": "0.6515891", "text": "public function edit($id)\n {\n $sucursal=Sucursal::findOrFail($id);\n $validator = JsValidator::make($this->validationRules, $this->errorMessages, $this->attributeNames, '#form');\n return view('sucursales.form', compact('sucursal', 'validator'));\n\n }", "title": "" }, { "docid": "5e07695c481aa1eb3d61a6bb89268c8b", "score": "0.650926", "text": "function edit($ID_PENUGASAN)\n { \n // check if the penugasan_konsultan exists before trying to edit it\n $data['penugasan_konsultan'] = $this->Penugasan_konsultan_model->get_penugasan_konsultan($ID_PENUGASAN);\n \n if(isset($data['penugasan_konsultan']['ID_PENUGASAN']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t\t'LAMA_PENUGASAN' => $this->input->post('LAMA_PENUGASAN'),\n\t\t\t\t\t'TANGGAL' => $this->input->post('TANGGAL'),\n\t\t\t\t\t'NAMA_SEKOLAH' => $this->input->post('NAMA_SEKOLAH'),\n\t\t\t\t\t'ID_KONSULTAN' => $this->input->post('ID_KONSULTAN'),\n );\n\n $this->Penugasan_konsultan_model->update_penugasan_konsultan($ID_PENUGASAN,$params); \n redirect('penugasan_konsultan/index');\n }\n else\n {\n $data['_view'] = 'penugasan_konsultan/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The penugasan_konsultan you are trying to edit does not exist.');\n }", "title": "" }, { "docid": "3db6ca0ab3fb8b187392d66187c5b14f", "score": "0.6508724", "text": "public function edit($id)\n {\n $mapel = MataPelajaran::find($id);\n return view('admin.matapelajaran.edit', ['mapel' => $mapel]);\n }", "title": "" }, { "docid": "a4b18c326b3addef3b0e60f9dea93aee", "score": "0.6506976", "text": "public function edit()\n {\n $data = StaffSection::findOrFail(1);\n $pageData = [\n 'section' => 'Staff',\n 'route' => 'staff.setting.update'\n\n ];\n return view('admin.section.settings.edit', compact('data', 'pageData'));\n }", "title": "" }, { "docid": "fa02c5067d6337664e24f1fd98c95ba1", "score": "0.6506791", "text": "public function edit(TransaksiPengadaan $transaksiPengadaan)\n {\n //\n }", "title": "" }, { "docid": "7acdba98c65ce2a29263f886edbb92d9", "score": "0.6506635", "text": "public function edit(Siswa $siswa)\n {\n $kelas = Kelas::all();\n return view('siswa.form', [\n 'siswa' => $siswa,\n 'kelas' => $kelas\n ]);\n }", "title": "" }, { "docid": "d6fc51faf1366757125e9d50d12726c8", "score": "0.6504743", "text": "public function edit($id)\n {\n $jurusan = Jurusan::all();\n $mapel = Mapel::find($id);\n return view('admin.mapel.edit_mapel', compact('mapel', 'jurusan'));\n }", "title": "" }, { "docid": "f1d7da8e43e8fded8184418c4610ae70", "score": "0.6503843", "text": "public function editar(){\n\t\t\t$serie = Serie::getSerieByIds($_GET[\"ids\"]);\n\t\t\t//Obtenemos sus géneros\n\t\t\t$listaGeneros = Genero::getGenerosDeSerie($_GET[\"ids\"], 0);\n\t\t\trequire_once \"views/editSerie.php\";\n\t\t}", "title": "" }, { "docid": "7e0bb5f2f9d1348374eec1e0c49fc33e", "score": "0.6500961", "text": "public function edit(Seminar $seminar)\n {\n return view('seminar.edit', compact('seminar'));\n }", "title": "" }, { "docid": "d352c9657732457f0417fa24160c2af0", "score": "0.649923", "text": "public function edit()\n {\n return view('pages.cadastros.edit');\n }", "title": "" }, { "docid": "f5f3dbdb426bc99a201bbaac50ccf989", "score": "0.64951015", "text": "public function edit() {\n $listeObjets = $this->model->getListeObjets();\n $this->view->editListeObjets($listeObjets);\n }", "title": "" }, { "docid": "de9fdc321bbf3d9e531e103e737f4a21", "score": "0.6490096", "text": "public function edit(Sertifikat $sertifikat)\n {\n //\n $sertifikat = DB::table('sertifikat')\n ->join('peserta', 'sertifikat.noPeserta', '=', 'peserta.noPeserta')\n ->join('hasil', 'sertifikat.noPeserta', '=', 'hasil.noPeserta')\n ->where('sertifikat.noPeserta', $sertifikat->noPeserta)\n ->distinct()\n ->first();\n return view('sertifikat/ubah', compact('sertifikat'));\n }", "title": "" }, { "docid": "8ca6a3fffdb80c62aabbae4f640f1300", "score": "0.6486654", "text": "public function edit()\n {\n return view('mobileapi::edit');\n }", "title": "" }, { "docid": "9578662edfba66cc9e08c9c07d40d1c5", "score": "0.64863783", "text": "public function edit($id)\n {\n //\n $siswa = Siswa::findOrFail($id);\n return view('siswa.edit', compact('siswa'));\n }", "title": "" }, { "docid": "7b331483a700f1e0a488b9fda251288d", "score": "0.6483502", "text": "public function edit()\n {\n $semester= Semester::where('semester', $semester)->first();\n return view ('semester.edit', ['smstr' => $semester]);\n }", "title": "" }, { "docid": "821719fa849de1e2ce9672b31922d919", "score": "0.64834714", "text": "public function edit(KolicinaArtikal $kolicinaArtikal)\n {\n //\n }", "title": "" }, { "docid": "6ccef38e2c860e68ec4c50d01349776c", "score": "0.64810896", "text": "public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "title": "" }, { "docid": "ce1fd534c39fa132b2ffe43e427e17f0", "score": "0.64798105", "text": "public function edit()\n {\n return view('helium::legals.edit', [\n 'settings' => $this->settingsManager\n ]);\n }", "title": "" }, { "docid": "3d761d8ec0f191454c128547404ebe42", "score": "0.64775574", "text": "public function edit(Paracaidista $paracaidista)\n {\n //\n }", "title": "" }, { "docid": "1f367346a97e325a473bb14f1e25b410", "score": "0.6476847", "text": "public function edit_form(){\n\t\t?>\n\t\t<form action=\"<?php echo get_save_url($this->page) ?>\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t\t<legend>Editing</legend>\n\t\t\t\t<label for=\"text\">Content:</label><br>\n\t\t\t\t<textarea cols=\"78\" rows=\"20\" name=\"text\" id=\"text\"><?php echo $this->file->data; ?></textarea>\n\t\t\t\t<br>\n\n\t\t\t\t<input type=\"submit\" name=\"preview\" value=\"Preview\">\n\t\t\t\t<input type=\"submit\" name=\"save\" value=\"Save\">\n\t\t\t\t<input type=\"hidden\" name=\"updated\" value=\"<?php echo $this->file->time; ?>\">\n\t\t\t</fieldset>\n\t\t</form>\n\t\t<?php\n\t}", "title": "" }, { "docid": "f1d3a60b15e32a98207860de08e5afcb", "score": "0.64764214", "text": "public function edit()\n {\n //\n $informacio = InformacioEmpresa::all();\n if($informacio->isEmpty()){\n return view('backend.informacioEmpresa.create');\n }else{\n $informacio = $informacio->first();\n return view('backend.informacioEmpresa.edit',compact('informacio'));\n }\n \n }", "title": "" }, { "docid": "ffb92806bddbf1589d477ed3c491eb80", "score": "0.64664847", "text": "public function edit(CCTVPertamanan $cctvPertamanan)\n {\n //\n return view('PSU_Pertamanan.cctv.edit', compact('cctvPertamanan'));\n }", "title": "" }, { "docid": "33705d29f9a98cda78f4d4f6d04ebb1b", "score": "0.64657927", "text": "public function edit()\n {\n $studentID = SCMUtility::cleanText($_GET['studentID']);\n\n // get course meta info\n $data = User::find($studentID);\n $data = $data->toArray();\n\n View::make('templates/admin/student-edit.php',compact('data'));\n }", "title": "" }, { "docid": "d21975719db35b70af3aa09eb70a1f5c", "score": "0.6461364", "text": "public function edit($id)\n {\n $siswa = Siswa::findOrFail($id);\n return view('siswa.editsiswa', ['siswa'=>$siswa]);\n }", "title": "" }, { "docid": "d68c72c26e537cb7ea30662edc56e1cd", "score": "0.6453393", "text": "public function edit($id)\n {\n //\n $sneaker = Sneaker::where('id', $id)->first();\n $modeles = Modele::orderBy('name')->get();\n $marques = Marque::orderBy('name')->get();\n\n // dd($sneaker->name);\n\n return view('updateSneaker', compact(['modeles', 'sneaker', 'marques']));\n }", "title": "" }, { "docid": "ff561cfda160ccc1720d963ae6811e24", "score": "0.6451306", "text": "public function vEdit($id_pesanan, $id)\n {\n $detail = DetailPesanan::where('id', $id)->with('menu')->first();\n $menus = Menu::where('status', 'Tersedia')->get();\n return view('detail.edit', compact('detail', 'menus', 'id_pesanan'));\n }", "title": "" }, { "docid": "7a2fce152c2e7ee4b6d45eb755a98f48", "score": "0.6450846", "text": "public function edit($id)\n {\n $titulo = 'Cursos';\n $subtitulo = 'Editando os dados do professor';\n $professor = Professor::find($id);\n\n $action = route('professores.update', $professor->id);\n\n return view('admin.professores.form_professor', compact('professor', 'action','titulo','subtitulo'));\n }", "title": "" }, { "docid": "96c09fa3fa91b740a2af09c8220068ad", "score": "0.6448858", "text": "public function edit(Pengasuhan $pengasuhan)\n {\n //\n }", "title": "" }, { "docid": "fb7a6cc84e249a67b1d1cf39ada51b9b", "score": "0.6448808", "text": "public function edit($id_pasien)\n {\n //\n }", "title": "" }, { "docid": "a3b07b34c9748685e906871e00462ace", "score": "0.64478636", "text": "public function edit($id)\n {\n //\n $kerjasamas = Kerjasama::find($id);\n if (!$kerjasamas) {\n abort(404);\n }\n\n return view('admin.diamond.kerjasama.update')->with('kerjasama', $kerjasamas);\n }", "title": "" }, { "docid": "7cf97fea0241320b178df5ee01ea4aab", "score": "0.64433515", "text": "public function editar()\n {\n if (isset($_GET['id'])) {\n $id = $_GET['id'];\n $edit = true;\n $proyecto = new Proyecto();\n //asigno el id que recibi al atributo de la clase\n $proyecto->setId($id);\n //llamo al metodo de la clase\n $pro = $proyecto->getOne();\n //renderizo la vista hacia al formulario para editar\n require_once 'views/Proyecto/crearProyecto.php';\n } else {\n header(\"Location:\" . base_url . '?controller=proyecto&action=tabla');\n }\n }", "title": "" }, { "docid": "78f1d63dd3a1f57ef9baa22851bb5ada", "score": "0.64384115", "text": "public function edit($id)\n {\n $editSiswa = Siswa::find($id);\n return view('siswa/edit', compact('editSiswa'));\n }", "title": "" }, { "docid": "42b9cd7ab913b21290b72225d0125086", "score": "0.64371616", "text": "public function edit(Anuncio $anuncio)\n {\n if(Gate::denies('manage-users')){\n return redirect(route('admin.anuncio.index'));\n }\n\n return view('contents.admin.anuncios.anuncios_edit')->with([\n 'anuncios'=>$anuncio,\n ]);\n }", "title": "" }, { "docid": "018e8e1f498bf64b08163506a058ad98", "score": "0.64343554", "text": "public static function editar()\n\t{\n\t\tUtils::isAdmin();\n\t\t$usuario = $_SESSION['usuario'];\n\n\t\trequire_once './views/usuarios/editar.php';\n\t}", "title": "" }, { "docid": "f78efc41f9fc85977333746e16e4b56f", "score": "0.6433508", "text": "public function edit($id)\n {\n //\n $this->authorize('EXCLUIR_TABELAS_SISTEMA');\n if (Lista::find($id)) {\n $list = Lista::find($id);\n }\n return view('pages.list.form', compact('list'));\n }", "title": "" }, { "docid": "c68226850189ee93a94683c7d2959241", "score": "0.6430801", "text": "public function edit($id)\n {\n return view ('pages.auth.nguoi-ban.san-pham.sua');\n }", "title": "" }, { "docid": "67d0f89b285ea3c59a7f3874ee39fccf", "score": "0.64283234", "text": "public function edit(DetSolicitud $detSolicitud)\n {\n //\n }", "title": "" }, { "docid": "d25f668ba2ca6b7fd22b98f6619985aa", "score": "0.6428082", "text": "public function edit($id)\n {\n $data = DB::table('tbl_siswas')->where('nis', $id)->first();\n return view('siswa.edit', compact('data'));\n }", "title": "" }, { "docid": "fa6e37893b0a400341f1e465c03e05c2", "score": "0.64273316", "text": "public function edit(Bolsista $bolsista)\n {\n //\n }", "title": "" }, { "docid": "0224e2f274241634b954a500ce492725", "score": "0.64247215", "text": "public function edit($id)\n {\n $tamu = \\App\\models\\tamu::find($id);\n // dd($tamu);\n $instansis = \\App\\Models\\instansi::all();\n return view ('form_tamu',compact('instansis','tamu'));\n }", "title": "" }, { "docid": "ee470f4e42003be58b658b89aeef58c9", "score": "0.6423431", "text": "public function edit( )\n {\n //\n }", "title": "" }, { "docid": "dc4ea3a530664f43394bdd04e3e0231c", "score": "0.6420872", "text": "public function edit(Neraca $neraca)\n {\n //\n }", "title": "" }, { "docid": "42fdbf6f4fffd9d59029a01995699a19", "score": "0.6419642", "text": "function edit($id_jenis_paket)\n {\n $where = array('id_jenis_paket' => $id_jenis_paket);\n $data['jenis_paket'] = $this->m_jenis_paket->edit_data($where, 'jenis_paket')->result();\n $this->load->view('v_edit_jp', $data);\n }", "title": "" } ]
1eaec2b18ea28208eb8ae59cd42a74c0
Method returning the class name
[ { "docid": "297a73751e735468990887a2589d60f1", "score": "0.0", "text": "public function __toString()\n\t{\n\t\treturn __CLASS__;\n\t}", "title": "" } ]
[ { "docid": "4d8924e94a8a2d564512afb30b05a3c2", "score": "0.88969415", "text": "public function getClassname()\n {\n return get_class();\n }", "title": "" }, { "docid": "8c6eaaa524f3e49fcd67abeab90116a1", "score": "0.8822884", "text": "public function getClassName()\n {\n return get_class();\n }", "title": "" }, { "docid": "a4067931d956a7e6c505e80e76d50539", "score": "0.87605107", "text": "public static function class_name() {\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.87522393", "text": "public function getClassName();", "title": "" }, { "docid": "aa5b67714e666a093fdd8d88cbe0b8e7", "score": "0.8641255", "text": "public static function classname()\n {\n return ClassUtils::getRealClass(get_called_class());\n }", "title": "" }, { "docid": "ef6be690acbd3bfc1529ccead7766a42", "score": "0.8638964", "text": "public function getClassName() {\r\n\t\treturn $this->classDirectory.\"_\".$this->className;\r\n\t}", "title": "" }, { "docid": "452036e5d44c1f0f271a59392e721f23", "score": "0.8615335", "text": "public function getClassName() { return __CLASS__; }", "title": "" }, { "docid": "452036e5d44c1f0f271a59392e721f23", "score": "0.8615335", "text": "public function getClassName() { return __CLASS__; }", "title": "" }, { "docid": "cce2f4d38e604fc66c83c97c33a03bea", "score": "0.86067814", "text": "public function getClassName()\n {\n return basename(str_replace('\\\\', '/', get_class($this)));\n }", "title": "" }, { "docid": "68aae96388710c2981769caca96675fc", "score": "0.8605576", "text": "public static function get_class_name() {\n\t\treturn __CLASS__;\n\t}", "title": "" }, { "docid": "68aae96388710c2981769caca96675fc", "score": "0.8605576", "text": "public static function get_class_name() {\n\t\treturn __CLASS__;\n\t}", "title": "" }, { "docid": "68aae96388710c2981769caca96675fc", "score": "0.8605576", "text": "public static function get_class_name() {\n\t\treturn __CLASS__;\n\t}", "title": "" }, { "docid": "e22a903403bcfd270ebd478a39664096", "score": "0.8599757", "text": "public function getClassName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "b3444f464203ee0d7beee050b7b6a997", "score": "0.858165", "text": "public function getClassName()\n {\n return $this->get(self::CLASS_NAME);\n }", "title": "" }, { "docid": "af7f9adecc95973b090f5be6af758c60", "score": "0.8567392", "text": "public function name()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "825a95e31b680a20975af29a878f5d46", "score": "0.8558235", "text": "public function getClassName(): string\n {\n return $this->class_name;\n }", "title": "" }, { "docid": "c8d9fb0fcd1629aac26d37ad4aaf83c8", "score": "0.8555002", "text": "public static function getClassName()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "8f94dc46ee0464a9075955d1e465d5c5", "score": "0.85394686", "text": "public function getClassName() {\r\n\t\treturn $this->class_name;\r\n\t}", "title": "" }, { "docid": "ea96e7453aaa35be13879efdef4d6c40", "score": "0.8533183", "text": "public function getName()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "670c9392874269bd08fc2ee08ba04fc7", "score": "0.8516208", "text": "private function getClassname()\n {\n $class_name = get_class($this);\n return str_replace(array(__NAMESPACE__, '\\\\'), '', $class_name);\n }", "title": "" }, { "docid": "d2cac2f2a34b6b41258dd1105a96fa57", "score": "0.8485573", "text": "public function getName()\n {\n if ($this->class)\n return $this->class;\n\n return __CLASS__;\n }", "title": "" }, { "docid": "54e95512667c01cdb660029fad941966", "score": "0.8465094", "text": "public function getClassName()\n {\n return (string)get_class($this);\n }", "title": "" }, { "docid": "fa7b6da82478fc95b153fa08a76611dd", "score": "0.8439641", "text": "protected function getClassName() : string\n {\n return $this->string[1];\n }", "title": "" }, { "docid": "a350dad3ad717454c153f44e53b9f8fe", "score": "0.8429295", "text": "public function getClassName(): string\n\t{\n\t\treturn \\get_class($this);\n\t}", "title": "" }, { "docid": "b86eaf4f8de400601154067466a7d203", "score": "0.8426421", "text": "public static function className()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.83950585", "text": "public function getClassName(): string;", "title": "" }, { "docid": "c08e1d997faa7e6d1cf0ed8823597a81", "score": "0.8378261", "text": "public function getClassName() : string\n {\n return $this->className;\n }", "title": "" }, { "docid": "d151638df9d8bce0a3e18b170dd67a5f", "score": "0.8366668", "text": "final public function getClassName()\n {\n return Core_Common::unprefixClass(get_class($this));\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "07740a79716099e521cf78bf83935f5b", "score": "0.8355432", "text": "public function getClassName(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "fb78508efe6b0c323d6a655cbdbb8b6a", "score": "0.83406585", "text": "abstract protected function getClassName();", "title": "" }, { "docid": "fb78508efe6b0c323d6a655cbdbb8b6a", "score": "0.83406585", "text": "abstract protected function getClassName();", "title": "" }, { "docid": "2545f7d915bd3522916a25e3d3746bb8", "score": "0.83359385", "text": "public function getClassName()\n {\n \treturn $this->_className;\n }", "title": "" }, { "docid": "89763088bc775128f740cc4a23332752", "score": "0.8321582", "text": "private function _getClassName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "9e00111cd4090c569c02534ed7274321", "score": "0.8294796", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "5507e74bc8e0219b826957565c810c1e", "score": "0.828922", "text": "public function className(){\n $reflect = new \\ReflectionClass($this);\n return $reflect->getShortName();\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "e5ccaecbf49dfc3f1cba6fb7ef9d360b", "score": "0.8272631", "text": "public function getClassName()\n {\n return $this->className;\n }", "title": "" }, { "docid": "b6cc1e4570cfab92ae92ec1f5ec4100a", "score": "0.8262129", "text": "protected abstract function getClassName();", "title": "" }, { "docid": "3e938e3f00a7a2020326507f0bc34639", "score": "0.8250039", "text": "public function class(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "39210d12b4e1738316514eb8200ccf7a", "score": "0.822555", "text": "public static function getClassName()\n {\n $class = get_called_class();\n $class = explode(\"\\\\\", $class);\n return end($class);\n }", "title": "" }, { "docid": "fb5e122d839a51e096e7066ffdc254bf", "score": "0.82111824", "text": "public function getClassName() : string {\n\t\t\treturn $this->className;\n\t\t}", "title": "" }, { "docid": "30067d675d251f2d20e824e1dd2ef7da", "score": "0.8201828", "text": "public function className()\n\t{\n\t\treturn RTString::stringWithString(get_class($this));\n\t}", "title": "" }, { "docid": "bfd2e0c0593312ceb749e66ab84a6b7a", "score": "0.819298", "text": "public function getClassname(){\n\n return $this->classname;\n\n }", "title": "" }, { "docid": "ca622bd6f0493d485bea0e7e4f9d5071", "score": "0.8165575", "text": "protected static function getClassName() {\n\t\t$reflector = new ReflectionClass(static::class);\n\t\treturn $reflector->getShortName();\n\t}", "title": "" }, { "docid": "f27e0ea8d7d4fd511c3befa38a3b2650", "score": "0.8136317", "text": "function class_name() {\n\t$trace = debug_backtrace();\n\n\tif (isset($trace[1]['class'])) {\n\t\treturn $trace[1]['class'];\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "2babe311de6028f22d0ed54725ef77f0", "score": "0.813041", "text": "public function getName() : string\n {\n return self::className();\n }", "title": "" }, { "docid": "445c5e3b9fbfd0d0b4bf136133e3b977", "score": "0.8117754", "text": "public function getNameClass()\n\t{\n\t\treturn get_class($this);\n\t}", "title": "" }, { "docid": "e16c6cd1fe0f03978c9d94fe995a4f17", "score": "0.810677", "text": "public function className(): string\n {\n return $this->className;\n }", "title": "" }, { "docid": "426c9ab0279350bc8424fa44230563eb", "score": "0.80437076", "text": "abstract public function getClassName(): string;", "title": "" }, { "docid": "9f32640d1fd77a866e99a549cfdb77b4", "score": "0.8027972", "text": "public function getClass(): string\r\n {\r\n return $this->class;\r\n }", "title": "" }, { "docid": "59cddec5bbcfcbe5688e1cbf58a1d9fa", "score": "0.80208695", "text": "protected function name()\n\t{\n\t\treturn strtolower(get_class($this));\n\t}", "title": "" }, { "docid": "573b66bf6f5ca75371d832f5609913b8", "score": "0.8016522", "text": "public static function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', Util::getClassNamespace(get_called_class()));\n\t}", "title": "" }, { "docid": "040e1bac76ae272ea0f663e72a9d165a", "score": "0.79950047", "text": "public function name() {\n return get_class($this);\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.79779136", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "485c65719c1bd227d8a30842d8d54817", "score": "0.796757", "text": "public function getClassName() {\r\n\t\treturn is_object($this->object) ? get_class($this->object) : $this->object;\r\n\t}", "title": "" }, { "docid": "c9521041d2a09e79f4426357ba29b002", "score": "0.7962312", "text": "public function getClass() : string\n {\n return $this->class;\n }", "title": "" }, { "docid": "c9521041d2a09e79f4426357ba29b002", "score": "0.7962312", "text": "public function getClass() : string\n {\n return $this->class;\n }", "title": "" }, { "docid": "c9521041d2a09e79f4426357ba29b002", "score": "0.7962312", "text": "public function getClass() : string\n {\n return $this->class;\n }", "title": "" }, { "docid": "f6c158b6e3066e575f12d3d9ba1a135c", "score": "0.795677", "text": "public function name ()\n {\n return $this->__classid;\n }", "title": "" }, { "docid": "6e4866fb8355822c7978265033a1cb26", "score": "0.79328173", "text": "public function getClassName() {\r\n\t\treturn get_class($this->owner);\r\n\t}", "title": "" }, { "docid": "0c0567826fca9232476d8b25b303b4e0", "score": "0.79061145", "text": "public function __getClass() : string {\n\t\t\treturn get_called_class();\n\t\t}", "title": "" }, { "docid": "6b00339c20ef0bcf2212d6d7343d6a65", "score": "0.7905164", "text": "public function GetStrClassName()\n {\n return($this->strClassName);\n }", "title": "" }, { "docid": "6b00339c20ef0bcf2212d6d7343d6a65", "score": "0.7905164", "text": "public function GetStrClassName()\n {\n return($this->strClassName);\n }", "title": "" }, { "docid": "399b38bfa7b965d584559a91d5ae8fdd", "score": "0.7898358", "text": "public function name()\n\t{\n\t\treturn strtolower(get_class($this));\n\t}", "title": "" }, { "docid": "00ad46f1d79d17e00bbda0e7495e93f9", "score": "0.7881201", "text": "public function getClassName()\n {\n $path = explode('\\\\', static::class);\n return array_pop($path);\n }", "title": "" }, { "docid": "ac25abd62d8b860d214d6db331e39464", "score": "0.7845468", "text": "public function getClassFileName($class_name);", "title": "" }, { "docid": "9b220280ad6413e4b9c299109dbf190c", "score": "0.7840685", "text": "public function getClassName()\n\t{\n\t\treturn substr(get_class($this), strlen(\"Piwik_\"));\n\t}", "title": "" }, { "docid": "fe4fae22496972d1054186ba6cd41fad", "score": "0.7832757", "text": "final public function name()\n {\n return strtolower(get_class($this));\n }", "title": "" }, { "docid": "85ed47e534e0e53efab00809d362f116", "score": "0.78134465", "text": "public function baseClassName()\r\n {\r\n return get_called_class();\r\n }", "title": "" }, { "docid": "12122e83dea46fc0735e1a5e53395c39", "score": "0.7803651", "text": "private function getClassName() \n {\n $type = ucfirst(Yii::$app->request->post('type'));\n $componentNameSpace = '\\humhub\\modules\\performance_insights\\components';\n $className = 'Generate' . $type;\n return $componentNameSpace . \"\\\\\" . $className;\n }", "title": "" }, { "docid": "c9073f83e6cb4bcae1821a36038b10d0", "score": "0.77635545", "text": "public function getClassName()\n {\n $name = str_replace(\n array('[', ']'),\n array('-', ''),\n $this->getParam(self::PARAM_FIELD)\n );\n\n return strtolower($name);\n }", "title": "" }, { "docid": "de4c93afc00f3db7bdf12e623a2d4f45", "score": "0.7743512", "text": "public function getName()\n {\n return get_class($this);\n }", "title": "" }, { "docid": "ada2efeb0b3ac444f6989d6b3dc17a2d", "score": "0.7738049", "text": "public function className() {\n if ($this->_m_className !== null)\n return $this->_m_className;\n $this->_m_className = $this->_root()->typeIds()[$this->classIdx()]->typeName();\n return $this->_m_className;\n }", "title": "" }, { "docid": "ada2efeb0b3ac444f6989d6b3dc17a2d", "score": "0.7738049", "text": "public function className() {\n if ($this->_m_className !== null)\n return $this->_m_className;\n $this->_m_className = $this->_root()->typeIds()[$this->classIdx()]->typeName();\n return $this->_m_className;\n }", "title": "" }, { "docid": "4f3c6a8b1f4017d55710985a0752565b", "score": "0.77308476", "text": "public function sayClassName() {\n self::whichClass(); // this will always print the class as self keyword pointed to the class it self\n }", "title": "" }, { "docid": "555b4ea3534c10394d2f66f126e5db71", "score": "0.7720809", "text": "private function class_from()\n\t\t{\n\t\t$args = func_get_args();\n\t\t$end = implode(\"\\\\\", array_map('_to_camel', $args));\n\t\treturn ($this->parent ? $this->parent->class : '')\n\t\t. ($this->name ? '\\\\' : '')\n\t\t. $end;\n\t\t}", "title": "" }, { "docid": "924a7447b654d32ae069850901a5fea3", "score": "0.77141786", "text": "public function class()\n {\n return $this->class;\n }", "title": "" }, { "docid": "a5d297561d526c15c881c767e5aec6b8", "score": "0.770165", "text": "public function getClassName()\n {\n return $this->namespaceName\n ? $this->namespaceName.'\\\\'.$this->shortClassName\n : $this->shortClassName;\n }", "title": "" }, { "docid": "3235f287d2a65626899f7c0c708bef98", "score": "0.77013004", "text": "public function getClassName()\n {\n $parts = explode('@', $this->endpoint);\n\n $classname = $parts[0];\n\n if ($this->namespace) {\n return \"{$this->namespace}\\\\{$classname}\";\n }\n\n return $classname;\n\t}", "title": "" }, { "docid": "e648b2da703a1f238d3d2c925a64abfa", "score": "0.76765", "text": "public function getName()\n\t{\n\t\treturn get_class( $this );\n\t}", "title": "" }, { "docid": "ff6496e1bb909e735bdc13c6184cc9f9", "score": "0.76657563", "text": "public function getClassBaseName() : string {\n return static::GetBaseObjectClassBaseName($this->_telegramClass);\n }", "title": "" }, { "docid": "57246d72428ccbbd9352d67a5dc05139", "score": "0.76627773", "text": "public function getClassNameWithoutNamespace() {\n\t\t$class_name = explode(\"\\\\\", get_class($this));\n\t\treturn end($class_name);\n\t}", "title": "" }, { "docid": "87b39508cdfbfad484f6d02ef26616d7", "score": "0.7661899", "text": "public static function class() {\n return strtolower(basename(str_replace('\\\\', '/', static::class)));\n }", "title": "" }, { "docid": "ac8f7734f2e729fe6f0b88c600d21264", "score": "0.7655537", "text": "public function id()\n {\n\t\treturn class_basename($this);\n\t}", "title": "" }, { "docid": "3e97488a80799c91f085b36368464b37", "score": "0.7646254", "text": "public function getName(): string\n\t{\n\t\t$rc = new \\ReflectionClass(get_class($this));\n\t\treturn pathinfo(dirname($rc->getFileName()), PATHINFO_FILENAME);\n\t}", "title": "" }, { "docid": "5c317c7a0ab923ea8ac36555ab20f926", "score": "0.7617956", "text": "protected function identifier()\n {\n return Str::snake(class_basename($this::class));\n }", "title": "" }, { "docid": "ec922f94d29282f3b462fa73aa302e24", "score": "0.75717926", "text": "public function getClassName($name);", "title": "" }, { "docid": "1c93c6c474d72cff5617fc51b594e423", "score": "0.75696766", "text": "public static function name()\n {\n return isset(static::$name) ? static::$name : self::getClassShortName();\n }", "title": "" }, { "docid": "a860ff08dd795f6f7b334646229e8ade", "score": "0.7560325", "text": "public function get_class_name()\n {\n //if a parent field is set, include the parent field name and the parent model name in the class name\n if (isset($this->parentfield) && is_array($this->parentfield))\n {\n $parentfield = '';//Supermodlr::get_name_case(Model_Field::get_name_from_class($this->parentfield['_id'])).'_';\n $parentmodel = '';//Supermodlr::get_name_case(Model_Field::get_modelname_from_class($this->parentfield['_id'])).'_';\n }\n else\n {\n $parentmodel = '';\n $parentfield = '';\n } \n return 'Model_'.$parentmodel.$parentfield.Supermodlr::get_name_case($this->name);\n }", "title": "" }, { "docid": "b004e40a75892d789a6b41b2e641569c", "score": "0.75502753", "text": "public function getName(): string\n {\n return $this->getClassName(__NAMESPACE__, $this);\n }", "title": "" }, { "docid": "f51c25cb370b9e41d1cadf9d3b0d9469", "score": "0.75240666", "text": "private function getThisTypeName ()\n {\n \n return get_class($this);\n \n }", "title": "" } ]
e282f5553289be5d9f7d43157bafcc40
Helper for removing file
[ { "docid": "4f1dcfdc455e5d959dddf8dae8946ed5", "score": "0.6599633", "text": "function removeFile(String $file)\n {\n try {\n if (file_exists($file)) {\n return unlink($file);\n } else {\n throw new Exception(\"File is not found\");\n }\n } catch (\\Throwable $th) {\n return $th;\n }\n }", "title": "" } ]
[ { "docid": "437665da46dd9c2275dd153eea9fcbf3", "score": "0.8658158", "text": "protected function removeFile()\n {\n }", "title": "" }, { "docid": "989843fa3021035cbd711826bd3576d3", "score": "0.8144647", "text": "public function deleteFile();", "title": "" }, { "docid": "24268586bbcdc7fc8030b201ea265a19", "score": "0.80212665", "text": "public function removeFile() {\n //check if we have an old image\n if ($this->path) {\n //store the old name to delete on the update\n $this->temp = $this->path;\n //delete the current image\n $this->path = NULL;\n }\n }", "title": "" }, { "docid": "d258cf9a3298a7a8e443c7451ed90b73", "score": "0.7784543", "text": "public function removeFile() {\n\t\tunlink($this->getDocumentUrl());\n\t\t$this->setDocumentUrl(null);\n\t\t$this->setFilename(null);\n\t\t$this->setFilesize(0);\n\t\t$this->setFiletype(null);\n\t}", "title": "" }, { "docid": "6a76f54ed6b1f3c46e5e30f8e5030f06", "score": "0.76836646", "text": "public function remove()\n {\n\n if( file_exists( $this->getPath().\"/\".$this->getTmpFile() ) ) {\n\n unlink( $this->getPath().\"/\".$this->getTmpFile() );\n\n }\n }", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.75783926", "text": "public function rm( $path );", "title": "" }, { "docid": "afcbbc3c31e1091f339d275d879db278", "score": "0.75705266", "text": "private function removeTmpFile(): void\n {\n $this->file->deleteFile($this->aFile['tmp_name']);\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.75140107", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "8802cc98feab5ca904a606c46937aea1", "score": "0.7503965", "text": "abstract public function unlink($filePath);", "title": "" }, { "docid": "8d42e70e3c258464d3b5914c0a3e13f2", "score": "0.7477522", "text": "public function deleteFile()\n {\n $baseDir = $this->getFullFilePath();\n $file = $baseDir.$this->getRealpath();\n $thumb = $baseDir.\"thumbnail/\".$this->getThumbpath();\n $mini = $baseDir.\"thumbnail/mini/\".$this->getThumbpath();\n $original = $baseDir.\"original/\".$this->getOriginalpath();\n \n // Check for related artwork, is this the only file?\n if ($this->hasArtwork())\n {\n try\n {\n $parentArtworks = $this->getParentArtworks();\n \n // Remove this file from the artwork\n foreach ($parentArtworks as $parentArtwork)\n {\n $parentArtwork->removeFile($this);\n }\n }\n catch (Exception $e)\n {\n throw new exception($e->getMessage());\n }\n }\n try\n {\n $this->_reaktorfile->delete();\n $this->removeAllTags();\n }\n catch (Exception $e)\n {\n throw new exception($e->getMessage());\n }\n \n if (file_exists($file))\n {\n unlink($file);\n }\n if (file_exists($thumb))\n {\n unlink($thumb);\n }\n if (file_exists($mini))\n {\n unlink($mini);\n }\n if (file_exists($original))\n {\n unlink($original);\n }\n \n // Clean up metadata\n $this->removeAllMeta();\n }", "title": "" }, { "docid": "e591928ad6d408c8d0251358c9cf6c2a", "score": "0.73308104", "text": "function deleteFile($file){\n\t\tif(!isNull($file)){\n\t\t\tif(is_file($file) && file_exists($file)){\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0520e95affce475bef56b55bc5142e8e", "score": "0.72387934", "text": "function block_exabis_eportfolio_file_remove($entry) {\r\n global $CFG;\r\n return remove_dir($CFG->dataroot.'/'.block_exabis_eportfolio_file_area_name($entry));\r\n}", "title": "" }, { "docid": "63ffa97318bc33fa16a16864c096d56c", "score": "0.71945536", "text": "public function deleteWithFiles();", "title": "" }, { "docid": "ed8c8dd8e29a65f1634a69aa6c92f10a", "score": "0.71840596", "text": "function remove($files);", "title": "" }, { "docid": "44e43295e83e6adfca05ff8f2be6ccd1", "score": "0.71482444", "text": "function ecoder_delete_file ( $path ) {\n\tif ( file_exists ( $path ) ) {\n\t\t@unlink ( $path );\n\t\tecoder_echo( '', '', $path.' ~ file deleted.' );\n\t} else {\n\t\tecoder_echo( '', '', $path.' ~ does not exist.' );\n\t}\t\n}", "title": "" }, { "docid": "b4e8a4619097f497d3ec728a780df861", "score": "0.71250576", "text": "public function delete($relPathToFile);", "title": "" }, { "docid": "0b115c7740b0ff3faafa4c83ee70f8eb", "score": "0.7114466", "text": "private function deleteOldFile(): void\n {\n $oldFile = $this->getOldAttribute('fileHash');\n if ($oldFile) {\n $filePath = $this->getFilePath($oldFile);\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }\n }", "title": "" }, { "docid": "4fcda7796d12332dc8c64b69444bacfe", "score": "0.7095898", "text": "function remove($name){\n $file = $name;\n if($file != 'img/'){\n if (!unlink($file))\n {\n echo (\"Error deleting $file\");\n }\n else\n {\n echo (\"Deleted $file\");\n }\n \n}\n}", "title": "" }, { "docid": "d1ab9bc5d12c9c5da94d4f3502bd9a86", "score": "0.7073258", "text": "public function removeFile($file_name,$file_path){\n\t \t//deletes thumbails file\n\t \tif(file_exists($file_path . $file_name)){\n\t\t \t\t$this->deleted = @unlink($file_path . $file_name);\t\n\t \t}\n\t \t\n\t \t//deletes thumbails images\n\t \tforeach ($this->default_thumb as $thumb=>$dimensions){\n\t \t\tif(file_exists($file_path.'thumb' .DS. $thumb .DS. $file_name)){\n\t\t \t\t\t @unlink($file_path.'thumb' . DS . $thumb . DS . $file_name);\n\t \t\t}\t\n\t \t}\n \treturn $this->deleted;\n }", "title": "" }, { "docid": "56bcd14990ae9ea42674bd55ef5da358", "score": "0.7059726", "text": "private function removeFiles()\n {\n foreach ($this->filesToDelete as $fileToDel) {\n if (is_file($fileToDel)) {\n unlink($fileToDel);\n }\n }\n $this->filesToDelete = array();\n }", "title": "" }, { "docid": "1f9a1be4bb584e042a8ad8d688ac9917", "score": "0.7051499", "text": "public function delete() {\n if (file_exists($this->src)) unlink($this->src);\n }", "title": "" }, { "docid": "605f695be61c60a611829e889e681664", "score": "0.70281327", "text": "function deleteFile($fileName,$path) {\n\t\t$fullPath = $path.\"/\".$fileName;\n\t\tif(is_dir($fullPath)) {\n\t\t\techo rmdir($fullPath);\n\t\t} else if(is_file($fullPath)) {\n\t\t\techo unlink($fullPath);\n\t\t}\n\t}", "title": "" }, { "docid": "a3bbd69ef2b058074f49c04b76cdbd14", "score": "0.70280015", "text": "public function delete() {\n if ($this->_filepath and is_writable($this->_filepath)) {\n unlink($this->_filepath);\n }\n }", "title": "" }, { "docid": "fdda165380e04e5dbc7725f36fbc3933", "score": "0.7016551", "text": "function deleteFile($file){\n\t\t\treturn @unlink($file);\n\t\t}", "title": "" }, { "docid": "00512fc11a273d26406522bf7fab57f3", "score": "0.7008226", "text": "public function remove(string $filename): bool;", "title": "" }, { "docid": "433b484d0d444ce7c4f9112046bda610", "score": "0.70076317", "text": "public static function del($file_path) {\n if (file_exists($file_path)) {\n try {\n @unlink($file_path);\n } catch (\\exception $e) {\n\n }\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.6997052", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.6997052", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.6997052", "text": "public function remove($path);", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "7be729a110fba2a76260f3ba4d0646fd", "score": "0.6974078", "text": "public function actionDeleteFile()\n\t{\n\t\tif($fileHash = InCache('fileHash', false, self::CACHE_ID))\n\t\t{\n\t\t\t$document = CMSUploadFileDocument::getByHash($fileHash);\n\t\t\t$document->remove();\n\t\t\tUnSetCacheVar('fileHash', self::CACHE_ID);\n\t\t}\n\n\t\t$this->actionUploadFile();\n\t}", "title": "" }, { "docid": "12578a425ba67c5fbbd2688103b942f9", "score": "0.6966055", "text": "public function deleteFiles() {\n /**\n * @var $owner ActiveRecord\n */\n $owner = $this->owner;\n\n $fileName = $owner->getAttribute($this->imgAttribute);\n if (! empty($fileName)) {\n $size = $this->sizeAttribute ? $owner->getAttribute($this->sizeAttribute) : $this->cropSize;\n if ($this->sizeSteps && $size > 0) {\n $minSize = $this->cropSize >> ($this->sizeSteps - 1);\n while ($size >= $minSize) {\n $path = $this->getImgBaseDir() . DIRECTORY_SEPARATOR . $size . DIRECTORY_SEPARATOR . $fileName;\n if (file_exists($path)) unlink($path);\n\n $size >>= 1;\n }\n }\n else {\n $path = $this->getImgBaseDir() . DIRECTORY_SEPARATOR . $fileName;\n if (file_exists($path)) unlink($path);\n }\n // Delete orignal if exists\n $path = $this->getImgBaseDir() . DIRECTORY_SEPARATOR . 'original' . DIRECTORY_SEPARATOR . $fileName;\n if (file_exists($path)) unlink($path);\n\n $owner->setAttribute($this->imgAttribute, null);\n }\n }", "title": "" }, { "docid": "a9066969bb29d95d403fd06669327816", "score": "0.69224703", "text": "function del_file($rowid) {\r\n # get the path first\r\n $row = $this->get_row(array('rowid'=>$rowid));\r\n if (!$row) return False;\r\n @unlink($row['path']); # delete the file\r\n $this->remove_row(array('rowid'=>$rowid)); # delete the row\r\n return True;\r\n }", "title": "" }, { "docid": "f5abd413b139968cd007c611a3ab58d3", "score": "0.69025713", "text": "function imagefield_file_delete($file) {\r\n if (imagefield_file_is_image($file)) {\r\n file_delete(imagefield_file_admin_thumb_path($file, FALSE));\r\n }\r\n}", "title": "" }, { "docid": "70b487f7751c0dc7d5a58f7831cbbc0c", "score": "0.6888396", "text": "function delete_media($path,$file){\n \n $main = $path.$file;\n \n if(file_exists(FCPATH.$main)):\n unlink( FCPATH.$main);\n endif;\n return TRUE;\n }", "title": "" }, { "docid": "3677803ececa923f586e1dc7d51832a9", "score": "0.6874851", "text": "function delete($file=NULL) {\n\t\tif(unlink(fra_var[\"files_path\"].\"\".$file)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0c107d7a63f55da5f634dc543406cc38", "score": "0.6866987", "text": "public function removePhoto($originalFileName) \n { \n if ($this->isExistedFile($originalFileName)) File::delete($this->uploadFolder. $originalFileName); \n }", "title": "" }, { "docid": "2b690cf5c2601907af8f1d55ffb4c675", "score": "0.6859822", "text": "function deleteFile($name){\n\t\t$userdir = $_SESSION['userid'];\n\t\t$dir_path = PROJECT_BASE_DIR.'/'.REPOSITORY_DIR.'/'.$userdir.'/';\n\t\t$filename = safeFilename($name);\n\t\t$path = $dir_path.$filename;\n\t\tif (file_exists($path))\n\t\t\tunlink($path);\n\t\telse\n\t\t\tjson_response(API_FILE_NOT_FOUND);\n\t}", "title": "" }, { "docid": "7174688ef510f403790fd8eec78446ba", "score": "0.6851537", "text": "public function actionRemoveFile(){\n $app = Yii::$app;\n $req = $app->request;\n if($req->isAjax){\n $file = SpyFile::findOne(['file_id' => $req->post('id')]);\n if($file instanceof SpyFile){\n unlink($file->path);\n return $file->delete();\n }\n }\n return null;\n }", "title": "" }, { "docid": "fd938f13ae7d8bbb8eae0a4d17bbd917", "score": "0.68469685", "text": "public function actionRemoveFile(){\n $app = Yii::$app;\n $req = $app->request;\n if($req->isAjax && $app->user->id == 2){\n $file = SpyFile::findOne(['file_id' => $req->post('id')]);\n if($file instanceof SpyFile){\n unlink($file->path);\n return $file->delete();\n }\n }\n return null;\n }", "title": "" }, { "docid": "c0edb17b825da72e3d5b662edc68ee62", "score": "0.6846104", "text": "public function fileRemove($params)\r\n\t{\r\n\t\t$client = erLhcoreClassRiak::instance($this->riakHost,$this->riakPort);\r\n\t\t$client->deleteBinary($params['chat_file']->name,$this->filesBucket);\r\n\t}", "title": "" }, { "docid": "920240885edfbf7575f97c9af9e1bb7b", "score": "0.68324715", "text": "public function Delete(){\n\t\t$file = $this->imagesPath.$this->filename; \n\t\tif(file_exists($file))\n\t\t\tunlink($file);\n\t\tparent::Delete();\n\t}", "title": "" }, { "docid": "a400db2c9c61aa4a77a318e29f791847", "score": "0.6830258", "text": "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n $this->getFileSystem()->deleteDirectory($path);\n }", "title": "" }, { "docid": "7066ac769ca742d164e110a924744c9a", "score": "0.68252", "text": "public function removeCVFile() {\n //check if we have an old image\n if ($this->cvFile) {\n //store the old name to delete the image on the upadate\n $this->temp = $this->cvFile;\n //delete the current image\n $this->setCvFile(NULL);\n }\n }", "title": "" }, { "docid": "4f681fd15439dd072af0a1ec73487c34", "score": "0.68248934", "text": "function delete_files () {\n\t\tunlink('app/controllers/'.$this->name['class'].'Controller.php');\n\t\tunlink('app/models/'.$this->name['class'].'.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_create.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_datatable.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_index.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_update.php');\n\t}", "title": "" }, { "docid": "8efe67a40c519f42bb6d3c68808e0327", "score": "0.68183833", "text": "public static function FileRemove() {\n\t\t$response = array();\n\t\tif(!Flight::getGlobal('user_logged')) {\n\t\t\t$response['code'] = 2;\n\t\t\t$response['error'] = 'User is not logged in';\n\t\t} else {\n\t\t\tif (isset($_POST['file'])) {\n\t\t\t\t$File = DB::getFileByName($_POST['file']);\n\t\t\t\tif($File === 1) {\n\t\t\t\t\t$response['code'] = 1;\n\t\t\t\t\t$response['error'] = 'File not found';\n\t\t\t\t} else {\n\t\t\t\t\tif(Flight::getGlobal('user_id') == $File->getUserId()){\n\t\t\t\t\t\t$storeFolder = '..' . $ds . '..' . $ds . 'data' . $ds . $File->type;\n\t\t\t\t\t\t$targetPath = dirname(__FILE__) . $ds. $storeFolder . $ds . $File->name;\n\t\t\t\t\t\tif(file_exists($targetPath)){\n\t\t\t\t\t\t\tunlink($targetPath);\n\t\t\t\t\t\t\tif(file_exists($targetPath)) {\n\t\t\t\t\t\t\t\t$response['code'] = 3;\n\t\t\t\t\t\t\t\t$response['error'] = 'Unable to remove file';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(DB::removeFile($File->id) === 0) {\n\t\t\t\t\t\t\t$response['code'] = 0;\n\t\t\t\t\t\t\t$response['error'] = '';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$response['code'] = 4;\n\t\t\t\t\t\t\t$response['error'] = 'Unable to remove file from database';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response['code'] = 5;\n\t\t\t\t\t\t$response['error'] = 'File not belongs to the user';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn json_encode($response, JSON_UNESCAPED_UNICODE);\n\t}", "title": "" }, { "docid": "c57f6776202f5ef85906cc0cac5c20a2", "score": "0.6815873", "text": "function hook_file_delete($file) {\n // Delete all information associated with the file.\n db_delete('upload')->condition('fid', $file->fid)->execute();\n}", "title": "" }, { "docid": "bfb928191a0eecf534873cfc9bda5d09", "score": "0.68116206", "text": "function deleteFile($filePath){\n\t\t\t\n\t\t\t$fullFilePath = $this->UserHomeDir.$filePath;\n\t\t\tif(is_dir($fullFilePath)){\n\t\t\t\tsystem('rm -rf '.$fullFilePath);\n\t\t\t}else{\n\t\t\t\tsystem('rm '.$fullFilePath, $runval);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a8fcb45badd8ea400af381f7e99d276d", "score": "0.68091804", "text": "function delete(){\n\n ob_start();\n try{\n AJXP_Controller::findActionAndApply(\"delete\", array(\n \"dir\" => dirname($this->path),\n \"file_0\" => $this->path\n ), array());\n }catch(Exception $e){\n\n }\n ob_get_flush();\n $this->putResourceData(array());\n\n }", "title": "" }, { "docid": "74cc4c8b63e0d42aec37d225804b3fa5", "score": "0.68008375", "text": "public function removeUpload()\n {\n unlink($this->getUploadPath() . '/' . $this->serverFileName);\n }", "title": "" }, { "docid": "38546ccf606d595691fc85f33b0bd791", "score": "0.6784554", "text": "function unlink ($filename, $context = null) {}", "title": "" }, { "docid": "c14c7052ff29108fb5c74932501eac70", "score": "0.6779107", "text": "protected function removeOldFile(): void\n {\n if (static::GENERATE_THUMBNAILS && is_dir($this->getUploadRootDir())) {\n Model::get(Thumbnails::class)->delete($this->getUploadRootDir(), $this->oldFileName);\n\n return;\n }\n\n parent::removeOldFile();\n }", "title": "" }, { "docid": "ea309590982ba34263ff642931abba6a", "score": "0.67779255", "text": "function removeFile($target, &$message){\n\tif(file_exists($target)){\n\t\t$res = @unlink($target);\n\t\tif($res===false){\n\t\t\t$message .= 'Error deleting file: '.basename($target). '<br />';\n\t\t\t$GLOBALS['db']->rollbacktransaction();\n\t\t\treturn false;\n\t\t}\n\t\t$message .= basename($target) . ' deleted successfully<br />';\t\n\t}else{\n\t\t$message .= basename($target) . ' not found<br />';\t\t\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "93ba04595e6898fda864b8f19da24507", "score": "0.6765159", "text": "public function destroy() {\n if ($this->_isFile) {\n unlink($this->_source);\n }\n }", "title": "" }, { "docid": "c78f9448c5d6efbb96124b6c6374085e", "score": "0.6750188", "text": "public function deleteFile() {\n if(unlink($this->path . $this->name) && unlink($this->path . $this->thumbnailName)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ce58519c0bbdb228d205b35559234bdf", "score": "0.6746789", "text": "function islandora_calliope_delete_file($pid) {\n module_load_include('inc', 'islandora', 'includes/utilities');\n try {\n $grid = islandora_calliope_create_mongo_grid();\n $query = array('_resourceid' => $pid);\n $record = $grid->findOne($query);\n $id = $record->file['_id'];\n if ($id) {\n $grid->remove($query);\n }\n }\n catch (Exception $e) {\n drupal_add_http_header('Status', '500 Internal server error');\n echo $e->getMessage();\n exit;\n }\n}", "title": "" }, { "docid": "1285f8880cb0098ccf3afa592f18bbe2", "score": "0.67408925", "text": "protected function deleteFile($file)\n {\n // $oldFile = trim($file, config('app.url'));\n // Storage::delete('public/' . $oldFile);\n }", "title": "" }, { "docid": "3053a650311488000a1e24043b898882", "score": "0.6735275", "text": "public function remove()\n {\n return @unlink($this->tmpFile);\n }", "title": "" }, { "docid": "9b367ca9affa717b5dfc0ac275b1321f", "score": "0.6717432", "text": "function custom_temp_files_remove($uid) {\n // Remove physical files.\n $result = db_query(\"SELECT fid, uri FROM {file_managed} WHERE uid=:uid AND status='0'\", [':uid' => $uid]);\n foreach ($result as $row) {\n drupal_unlink($row->uri);\n }\n \n // Remove temp files in db.\n db_query(\"DELETE FROM {file_managed} WHERE uid=:uid AND status='0'\", [':uid' => $uid]);\n}", "title": "" }, { "docid": "626245421b83edd015e2d23de41b2f2b", "score": "0.6717043", "text": "public function testRemoveNonVersionedFile(): void\n {\n touch($this->workspacePath() . '/Test.php');\n $this->filesystem()->remove(FilePath::fromString($this->workspacePath() . '/Test.php'));\n self::assertFileDoesNotExist($this->workspacePath() . '/Test.php');\n }", "title": "" }, { "docid": "3858714d3cfd208f80174dc99ab77242", "score": "0.6701074", "text": "public function remove($file) {\n\t\t$path = PATH_site . dirname(self::DUMPFILE) . '/' . $file;\n\t\tif (file_exists($path)) {\n\t\t\tunlink($path);\n\t\t}\n\t}", "title": "" }, { "docid": "f7f381ee521b54b9fe3d919d0a66f05c", "score": "0.6698938", "text": "function deleteFile($id){\n\t\t$file = $this->general_db_model->getById( 'groupfiles', 'id', $id);\n\n\t\tunlink(GROUP_FILES_DIR.'/'.$file->filename) ;\n\t\t\n\t\t$this->general_db_model->delete('groupfiles', 'id = '.$id);\t\t\t\t\n\n\t}", "title": "" }, { "docid": "ce28a16006443bd83cff752c40753104", "score": "0.6693815", "text": "public function testDeleteFile()\n {\n $this->setFakeRepository();\n\n if(!$this->repository->exists($this->fileName)) {\n $this->repository->put($this->fileName, $this->content);\n }\n\n $removeReturn = $this->repository->remove($this->fileName);\n $this->assertTrue($removeReturn);\n }", "title": "" }, { "docid": "34f77e3f8c8b38b00b24c32696afb932", "score": "0.6689525", "text": "function delete_file($file) {\n\tif ($this->settings['delete_on'] == 0) {\n\t$this->msg = \"La cancellazione dei files non &egrave; consentita a momento.\";\n\t} elseif ($this->is_protected($file)) {\n\t$this->msg = \"Il file da cancellare &egrave; protetto.\";\n\t} elseif (@unlink($file)) {\n\t$this->msg = \"File '\" . $file . \"' cancellato <u>correttamente</u>.\";\n\t} elseif (is_dir($file) && @rmdir($file)) {\n\t$this->msg = \"Directory '\" . $file . \"' cancellata <u>correttamente</u>.\";\t\n\t} else {\n\tif (is_file($file) || is_dir($file)) { \n\t$this->msg = \"File '\" . $file . \"' non cancellato.\"; \n\t} else { \n\t$this->msg = \"File da cencellare non esistente.\"; \n\t}\n\treturn FALSE;\n\t}\n\t}", "title": "" }, { "docid": "d6356d9c05622dfc76187c2a46cf1d2e", "score": "0.66887707", "text": "public function delete_file($data){\n\tif($this->valid($data[0])){\n\t $file_name_with_path=$data[1];\n\t @unlink($file_name_with_path);\n\t}\n\telse{\n\t\tthrow new SoapFault(\"Server\", \"credentials failed\");\n\t}\n }", "title": "" }, { "docid": "681123a89c2e197d2e6df48134178ea7", "score": "0.6680667", "text": "public function deleteFile($fileIdentifier);", "title": "" }, { "docid": "3b6ea993dea20034fd34e9f3b2dcf6fb", "score": "0.66752464", "text": "public function delete(File $f)\n {\n $this->fs->remove($f->getAbsolutePath());\n }", "title": "" }, { "docid": "19d706006a3224a93e8cbd4b3e821f1b", "score": "0.66711026", "text": "function remove_file($pathfile)\r\n {\r\n if (empty($pathfile) || realpath($pathfile) === false) {\r\n return false;\r\n }\r\n if (file_exists($pathfile)) {\r\n @unlink($pathfile);\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "137a4742a2f129cc05786cf1b969f9e4", "score": "0.6664194", "text": "function fs_unlink($filename) {\n\t$filename = fs_import_filename($filename, 0);\n\treturn @unlink($filename);\n}", "title": "" }, { "docid": "2bfd16ec3b198fc8eb9482fdc614fbee", "score": "0.6655033", "text": "public function destroy(File $file)\n {\n //\n }", "title": "" }, { "docid": "2bfd16ec3b198fc8eb9482fdc614fbee", "score": "0.6655033", "text": "public function destroy(File $file)\n {\n //\n }", "title": "" }, { "docid": "2bfd16ec3b198fc8eb9482fdc614fbee", "score": "0.6655033", "text": "public function destroy(File $file)\n {\n //\n }", "title": "" }, { "docid": "2bfd16ec3b198fc8eb9482fdc614fbee", "score": "0.6655033", "text": "public function destroy(File $file)\n {\n //\n }", "title": "" }, { "docid": "2bfd16ec3b198fc8eb9482fdc614fbee", "score": "0.6655033", "text": "public function destroy(File $file)\n {\n //\n }", "title": "" }, { "docid": "9619333c36e677fa5ff3190f0c8e49e3", "score": "0.6650619", "text": "public function remove(): void\n {\n if (static::GENERATE_THUMBNAILS && is_dir($this->getUploadRootDir())) {\n Model::get(Thumbnails::class)->delete($this->getUploadRootDir(), $this->fileName);\n\n return;\n }\n\n parent::remove();\n }", "title": "" }, { "docid": "7f635607ebf93d72f909f73b0c4d4fce", "score": "0.66495705", "text": "public function deleteFile ($virtualPath);", "title": "" }, { "docid": "7d8bceb7146cdd7433349c5d5aea002a", "score": "0.6637709", "text": "function cleanFile($file, $toDelete){\n\t$textFlux = fopen($file, 'r') or die(\"File missing (1)\");\n\t$actualContent = file_get_contents($file);\n\t$newContent = str_replace($toDelete, \"\", $actualContent);\n\tfclose($textFlux);\n\n\t$textFlux2 = fopen($file, \"w+\") or die(\"File missing (2)\");\n\tfwrite($textFlux2, $newContent);\n\tfclose($textFlux2);\n}", "title": "" }, { "docid": "cebd0c7513aab549272bb9f67e73df2e", "score": "0.66348505", "text": "public function clear()\n {\n unlink($this->fn);\n }", "title": "" }, { "docid": "e584cdc2ce65a04e4cf27508d12952c4", "score": "0.66269773", "text": "public function deleteFile(FileInterface $file);", "title": "" }, { "docid": "bd94c2ceab842336bce02c06e1d05230", "score": "0.6614742", "text": "public function delete(string $filename): void\n {\n if (file_exists ($filename)) {\n unlink($filename);\n } \n }", "title": "" }, { "docid": "bff5745187463cb37f56abd570e27aa8", "score": "0.6603328", "text": "public function unlinkUsedFiles()\n {\n if (file_exists($this->getTemporaryFile())) {\n unlink($this->getTemporaryFile());\n }\n if (file_exists($this->getNewFilePath())) {\n unlink($this->getNewFilePath());\n }\n }", "title": "" }, { "docid": "8f8a38128538f9da44918c35313765f5", "score": "0.66032547", "text": "public function deletefile(Request $request)\n {\n $path = $request->name;\n\n unlink();\n }", "title": "" }, { "docid": "a6228f01b23aed1af19097fcb9684329", "score": "0.6600577", "text": "public function destroy($filename) \n\t{\n\t\t$doc = Document::find(Input::get('documentid'));\n\t\t$path = $doc -> absdir() . '/' . $filename;\n\n\t\t// delete the file\n\t\tunlink($path);\n\n\t\t// log\n\t\tLog::info('Deleting file', array(\n\t\t\t'document' => $doc -> id,\n\t\t\t'filename' => $filename\n\t\t));\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "0c233d63dbffd07e61ca9212480f3c98", "score": "0.0", "text": "public function store(Request $request)\n {\n $validator=Validator::make($request->all(),[\n 'name'=>'required|string|max:255|unique:brands',\n 'logo'=>'required|mimes:jpg,png,jpeg,bmp'\n ]);\n if ($validator->fails())\n {\n $status=400;\n $message='Validation Error.';\n $response=[\n 'response'=> $status,\n 'success'=>false,\n 'message'=>$message,\n 'data'=>$validator->errors(),\n ];\n return response()->json($response);\n # code...\n }else{\n $name=$request->name;\n $logo=$request->logo;\n //file upload\n $logoName=time().'.'.$logo->extension();\n $logo->move(public_path('images/brand'),$logoName);\n $filepath='images/brand/'.$logoName;\n\n //Data insert \n $brand= new Brand;\n $brand->name=$name;\n $brand->logo=$filepath;\n $brand->save();\n\n $status=200;\n $message='Brand created Successful';\n $result=new BrandResource($brand);\n\n $response=[\n 'success'=>true,\n 'status'=>$status,\n 'message'=>$message,\n 'data'=>$result,\n ];\n return response()->json($response);\n }\n }", "title": "" } ]
[ { "docid": "4d4665c3172bd48271ac325e48734b03", "score": "0.6960531", "text": "public function store()\n {\n $request = $this->makeRequest('store');\n $model = $this->service->create($request);\n\n if(is_a($model, \\Exception::class)) {\n\n return $this->getErrorResource($model);\n\n } else {\n\n return $this->maybeMakeResource('single', $model, 201);\n }\n\n }", "title": "" }, { "docid": "08b1c0fc414209453959162737452406", "score": "0.68456596", "text": "public function save()\n {\n $storage = new Storage();\n $storage->store();\n // ....\n }", "title": "" }, { "docid": "0af8c4e64c8f59b58839884dd423bdba", "score": "0.66870487", "text": "public function store()\n {\n return $this->_resourcePersistence->store();\n }", "title": "" }, { "docid": "cec443e02222c256f4cdc94a793632da", "score": "0.6618901", "text": "public function store() {\n\t\t$this->_storePrecheck();\n\t\t$model = $this->loadModel($this->params['model']);\n\t\t$fileData = StorageUtils::fileToUploadArray($this->args[0]);\n\n\t\t$entity = $model->newEntity([\n\t\t\t'adapter' => $this->params['adapter'],\n\t\t\t'file' => $fileData,\n\t\t\t'filename' => $fileData['name']\n\t\t]);\n\n\t\tif ($model->save($entity)) {\n\t\t\t$this->out('File successfully saved!');\n\t\t\t$this->out('UUID: ' . $entity->id);\n\t\t\t$this->out('Path: ' . $entity->path());\n\t\t} else {\n\t\t\t$this->abort('Failed to save the file.');\n\t\t}\n\t}", "title": "" }, { "docid": "3529d0e71e6d8ea828f2de852437018a", "score": "0.6586192", "text": "public function store()\n {\n // ...\n }", "title": "" }, { "docid": "d867e1815ae7201548cd26c492de3a7b", "score": "0.6553343", "text": "public function save(Storage $storage)\n {\n $storage->store();\n // ....\n }", "title": "" }, { "docid": "7407adcc5b0a18e46fd06cc8c7fc4fdf", "score": "0.6511526", "text": "public function store(Request $request)\n {\n\n $request->validate([\n 'user' => ['required'],\n 'phone' => ['required', ],\n 'email' => ['required', 'email:rfc,dns'],\n 'resource' => ['required'],\n ]);\n $resources = json_decode(Storage::get('resources.json'));\n $resources[] = [\n 'id' => uniqid(),\n 'user' => $request->input('user'),\n 'phone' => $request->input('phone'),\n 'email' => $request->input('email'),\n 'resource' => $request->input('resource'),\n 'date' => now()->format('d-m-Y'),\n ];\n\n Storage::put('resources.json', json_encode($resources));\n\n return redirect()->route('person-area')->with('success', \"Resource from \\\"{$request->input('user')}\\\" was added succesfully!\");\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "40718558d61a4c56dc5b2c2b6422e8cf", "score": "0.6419359", "text": "abstract public function createStorage();", "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": "" } ]
31df8066c78bd49e9ee487017b19ee8d
forces an elises on on this number
[ { "docid": "ca828acd090ff9ab6b4cfb9ed7a528fa", "score": "0.0", "text": "function forceElipses($number){\n $number = string($number);\n if(count($number) > 5){\n return substr($number, 0,5);\n }\n}", "title": "" } ]
[ { "docid": "630994dffd683f06726490641bc64004", "score": "0.54673797", "text": "protected function set__firingAmount() {\n throw new LogicException(\n 'firingAmount is set exclusively via BMGame->turn_down_fire_dice().'\n );\n }", "title": "" }, { "docid": "ddccd5e01351bed8e5202b403b0a0dd6", "score": "0.53013754", "text": "public function clamp($boolean){}", "title": "" }, { "docid": "a6256f6f22928f6be504f64aa1f10f0f", "score": "0.5221198", "text": "function bevel($amount) {\n $this->_execute($command = \"-raise {$amount}\");\n }", "title": "" }, { "docid": "918fb25da837e714fa166d2fa9f7d3b3", "score": "0.50358146", "text": "public function getExigibleLe() {\n return $this->exigibleLe;\n }", "title": "" }, { "docid": "3ab159fc08b3894a06c3e56e9f0d9df6", "score": "0.5027212", "text": "public static function erf ($x) {\n if (abs($x) > 40) {\n return $x > 0 ? 1 : -1;\n }\n $ret = Statistics::regularizedGammaP(0.5, $x * $x, 1.0e-15, 10000);\n return $x < 0 ? -$ret : $ret;\n }", "title": "" }, { "docid": "4d6505648bda5d223bf0280d4909482c", "score": "0.5019208", "text": "protected function passByNumber($num = false)\n\t{\n\t\tif($num === false)\n\t\t\t$num = $this->pass_by;\n\t\t$this->bottles = $this->bottles - $num;\n\t}", "title": "" }, { "docid": "faec5cb1cbaabd202479bd9468dc787b", "score": "0.4992652", "text": "public function beePoints()\n {\n $this->maxPoints = 75;\n $this->hitPoints = 10;\n $this->currentPoints = 75;\n }", "title": "" }, { "docid": "7a8b0addfea317ade2cdc4e8255fbd7f", "score": "0.49456307", "text": "function energyreset()\n{\n global $db;\n $db->Execute(\"UPDATE `players` SET `energy`=`energy`+(`max_energy`/72) WHERE `miejsce`!='Lochy' AND `freeze`=0 AND `rasa`!='' AND `klasa`!='' AND `energy`<(21 * `max_energy`)\");\n}", "title": "" }, { "docid": "7fa25b72f0ea1fa9f40967fac16a9e64", "score": "0.49445122", "text": "public function turnKnob(): void\n {\n throw new NoCoinException();\n }", "title": "" }, { "docid": "6327dadc1beba9582ff07c46b18218ed", "score": "0.48717713", "text": "public function donnerEssence(Vehicule $v) {\n\t\t$this->setLitresEssence($this->getLitresEssence() - (50 - $v->getLitresEssence())); // $v représente le Vehicule reçu, $this représente le Vehicule à partir duquel la méthode est appellée\n\t\t// 800 - (50 - 5) ... 800 - 45 = 755\n\t\t$v->setLitresEssence($v->getLitresEssence() + (50 - $v->getLitresEssence())); // 50L de + pour le Vehicule $v\n\t}", "title": "" }, { "docid": "daca4eaabef754deb0c091e4e22ccde7", "score": "0.48361823", "text": "function indecrease($id, $num) {\n $prev = get_post_meta($id, 'postscore');\n update_post_meta($id, 'postscore', intval($prev[0]) + $num);\n $post = get_post( id);\n $prev = get_user_meta($post->post_author, 'user_score');\n update_user_meta($post->post_author, 'user_score', (intval($prev[0]) + $num));\n}", "title": "" }, { "docid": "e1b35a2467d102b56f35f85b1dbe6262", "score": "0.48330516", "text": "function setLeeway($val) {\n $this->leeway = $val;\n }", "title": "" }, { "docid": "d64d43b3a6c910957437d72e8226d74d", "score": "0.47833863", "text": "function disable()\n \t{\n \t\t\n \t}", "title": "" }, { "docid": "1f41bc5baeb7ef21ac8d8c7dfa25d449", "score": "0.47704038", "text": "function earnPoints(int $points);", "title": "" }, { "docid": "fbe8000075f916607e1479eedf1c141e", "score": "0.47636914", "text": "public function forceRaceChange()\n\t{\n\t\treturn $this->addFlag(128);\n\t}", "title": "" }, { "docid": "cb682edc813d8124820d7e5907f42eb4", "score": "0.4739665", "text": "public function enableAvoidTolls()\n {\n $this->avoid_tolls = true;\n }", "title": "" }, { "docid": "bcb9f3e8f820ab7187746c3525ab618d", "score": "0.47135875", "text": "public function donneEssence(Vehicule $v){\n\t\t//Le volume de litre dans pompe doit égal à l'ancien volume moins (le reservoire de $v mois le nbre de litre dans $v)\n\t\t$this -> setLitre($this -> getLitre()-($v ->getReservoir()- $v -> getLitre()));\n\t\t// 745 = 800 - (50 - 5) \t\t\n\t\t\t\t\t\n\t\t//modifier l'objet Vehicule ($v)\n\t\t//Le volume de $v doit être egal à la capacité du réservoir de $v\n\t\t$v -> setLitre($v -> getReservoir() );\n\t\t//50 = 5 + (50 - 5)\n\t\t//50 = 50\n\t}", "title": "" }, { "docid": "51b565b1fb4db596ba03d6bca58b97dc", "score": "0.4701454", "text": "public function raise() {\n if ($this->raiseConditionsAreMet()) {\n parent::raise();\n }\n }", "title": "" }, { "docid": "908bd79c9062357b5a58c564e6a39088", "score": "0.46610367", "text": "private function set_opacity()\n {\n if ($this->opacity <= 0 || $this->offset_top > 100) {\n $this->opacity = 1;\n } else {\n $this->opacity = $this->opacity / 100;\n }\n }", "title": "" }, { "docid": "2f814ff2cdea4d6513b8309397013393", "score": "0.46543247", "text": "public function ligar(){\n $this->setLigado(true);\n }", "title": "" }, { "docid": "5f4902f179719a70c2b41bf973100a97", "score": "0.46458", "text": "public function pass()\n {\n throw $this->value;\n }", "title": "" }, { "docid": "0ee474e34fbb43544494a3e2043d0a80", "score": "0.46210256", "text": "function checkNum($number) {\n if($number>1) {\n throw new Exception(\"El valor debe ser menor o igual 1\");\n }\n }", "title": "" }, { "docid": "eb52edc74d9b2d3b6df61d9a0e17320f", "score": "0.4619791", "text": "public function normalTransbordo() {\n $this->saldo -= ($this->valor * 2) * 33 / 100;\n }", "title": "" }, { "docid": "b579eb284b1372194dbf16d4dfaee0fd", "score": "0.46095598", "text": "public function testManFloatWithInvalidValues(mixed $value): void\n {\n $test = Cast::isManFloatInclusive($value);\n self::assertFalse($test);\n\n $this->expectException(InvalidCastException::class);\n Cast::toManFloatInclusive($value);\n }", "title": "" }, { "docid": "9e28294c517ec82d2b55d9c782f251df", "score": "0.459933", "text": "public function rapidStrike() {\n\n\t\t\t$chance = mt_rand(0, 99);\n\t\t\tif ($chance < 10) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "54aebc6c115449e7e734244de8b148de", "score": "0.45976344", "text": "function augmenterForce() {\r\n //parametre neant\r\n //return un tableau des erreurs rencontré si celui ci n'est pas vid\r\n //si agility est strictement superieur a 3 et la force <= a 14 alors et resistance strictement sup a 1.\r\n // Tableau vide pour recupérer les erreurs\r\n\r\n if (($this->get('agility') > 3) && ($this->get('strength') <= 14) && ($this->get('resistance') > 1)) {\r\n //agility perd 3 point, force gagne 1 pt et resistance perd 1pt\r\n $this->set(\"agility\", $this->get('agility') - 3);\r\n $this->set(\"strength\", $this->get('strength') + 1);\r\n $this->set(\"resistance\", $this->get('resistance') - 1);\r\n\r\n//appel la methode qui mettra a jour les stat\r\n $this->update();\r\n return;\r\n }\r\n //sinon si point d'agi insuffisant\r\n if ($this->get('agility') <= 3) {\r\n $message = \"agilité insuffisante\";\r\n //retour au template plateauJeu en passant par ajax pour la MAJ des stat\r\n return $message;\r\n }\r\n //sinon si force deja trop elevée\r\n if ($this->get('strength') >= 15) {\r\n $message = \"point de force au maximum\";\r\n //retour au template plateauJeu en passant par ajax pour la MAJ des stat\r\n return $message;\r\n }\r\n//sinon si resistance insuffisante\r\n if ($this->get('resistance') <= 1) {\r\n $message = \"point de resistance insuffisant\";\r\n //retour au template plateauJeu en passant par ajax pour la MAJ des stat\r\n return $message;\r\n }\r\n }", "title": "" }, { "docid": "a8eb2749acba02819b2c0ab146aa7c1f", "score": "0.45870024", "text": "public function isErred(): bool;", "title": "" }, { "docid": "72cf2f333a416cfb1cc3effdbed84d35", "score": "0.45824075", "text": "public function setEvnPosy ($v)\n {\n // Since the native PHP type for this column is integer,\n // we will cast the input value to an int (if it is not).\n if ( $v !== null && !is_int ($v) && is_numeric ($v) )\n {\n $v = (int) $v;\n }\n if ( $this->evn_posy !== $v || $v === 0 )\n {\n $this->evn_posy = $v;\n }\n }", "title": "" }, { "docid": "d57b1001571a6a82d8e73f001826016a", "score": "0.45781592", "text": "function doEffU($value){\r\n\t\t\r\n\t\tif($value > 0){\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $selfPicto;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a970b91656f3352649adf81562b07d46", "score": "0.45777804", "text": "function udapte_angry_skill()\n\t{\n\n\t\t$pdo = PDO2::getInstance();\n\t\t\n\t\t$query = $pdo->prepare(\"UPDATE tbl_rabbit_skill SET skill_angry = IF( (skill_angry - :new_skill )<0,0,(skill_angry - :new_skill ))\");\n\t\t\n\t\t$query->bindValue(\":new_skill\",10);\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "73570c9fa95ec24dc68bb812ba880827", "score": "0.45698094", "text": "public function calmDown(): void {\n\t\t$this->target = null;\n\t\tif($this instanceof ArrowPet) {\n\t\t\t$this->setCritical(false);\n\t\t}\n\t}", "title": "" }, { "docid": "544b8430b77777b5994cee1a7aaf56ab", "score": "0.45356166", "text": "function augmenterResistance() {\r\n //parametre neant\r\n //retour :\r\n //si agility est strictement superieur a 3 et la force <= a 14 alors et resistance strictement sup a 1.\r\n if (($this->get('agility') > 3) && ($this->get('resistance') <= 14) && ($this->get('strength') > 1)) {\r\n //agility perd 3 point, force gagne 1 pt et resistance perd 1pt\r\n $this->set(\"agility\", $this->get('agility') - 3);\r\n $this->set(\"strength\", $this->get('strength') - 1);\r\n $this->set(\"resistance\", $this->get('resistance') + 1);\r\n\r\n //appel la methode qui mettra a jour les stat\r\n $this->update();\r\n return;\r\n }\r\n //sinon si point d'agi insuffisant\r\n if ($this->get('agility') <= 3) {\r\n $message = \"agilité insuffisante\";\r\n return $message;\r\n //retour au template plateauJeu en passant par ajax pour la MAJ des stat\r\n }\r\n//sinon si force deja trop elevée\r\n if ($this->get('strength') <= 1) {\r\n $message = \"point de force au maximum\";\r\n return $message;\r\n //retour au template plateauJeu en passant par ajax pour la MAJ des stat\r\n }\r\n//sinon si resistance insuffisante\r\n if ($this->get('resistance') >= 15) {\r\n $message = \"point de resistance insuffisant\";\r\n return $message;\r\n //retour au template plateauJeu en passant par ajax pour la MAJ des stat\r\n }\r\n }", "title": "" }, { "docid": "ea107162fb827a2f1de8bc07cd4ed30c", "score": "0.45315856", "text": "public function setDefenderDaysBeforeDeletingQuarantinedMalware(?int $value): void {\n $this->getBackingStore()->set('defenderDaysBeforeDeletingQuarantinedMalware', $value);\n }", "title": "" }, { "docid": "656c6338b1c81a83d14defe93cfd60ea", "score": "0.45159337", "text": "function gainexplost($leadership,$playerid) \n{\n global $db;\n global $myout;\n global $enemy;\n global $arrlost;\n $gainexp = ($myout -> fields['warriors'] - $arrlost[0]) + ($myout -> fields['archers'] - $arrlost[1]) + ($enemy -> fields['warriors'] - $arrlost[3]) + ($enemy -> fields['archers'] - $arrlost[4]);\n if ($gainexp > 0) \n {\n $gainexp = ($gainexp / 200) / ceil($leadership);\n } \n else \n {\n $gainexp = 0;\n }\n $gainexp = round($gainexp,\"2\");\n if ($gainexp < 0.01) \n {\n $gainexp = 0.01;\n }\n $db -> Execute(\"UPDATE players SET leadership=leadership+\".$gainexp.\" WHERE id=\".$playerid);\n return $gainexp;\n}", "title": "" }, { "docid": "b66504a31e7834cefbe171c0157d5ef8", "score": "0.4506324", "text": "public function getRequiresTwoThirdsAttribute()\n {\n return $this->requires == 0.66;\n }", "title": "" }, { "docid": "a274ac143bc92db2b5277517e8756414", "score": "0.44980854", "text": "public function setNormalPrice(float $price) : float\n\t\t{\n\t\t\tif ($price < 0) { throw new Exception('Price given is less than zero (' . $price . '). It should be zero for free products or greater for non-free products.'); } //NOTE: allows price zero (0) for free products.\n\t\t\treturn $this->_normalPrice = $price;\n\t\t}", "title": "" }, { "docid": "a6010da2b7f5f65fd1a4ef51413d0a62", "score": "0.44965947", "text": "function comprobarNumeroPositivo($number) {\n if($number < 0) {\n //con la palabra throw podemos arrojar excepciones que son\n //objetos de la clase Exception, y se le puede pasar \n //un mensaje a mostrar\n throw new Exception(\"El valor debe ser mayor que cero\");\n }\n //devolvemos true y no arrojamos excepcion\n return true;\n}", "title": "" }, { "docid": "83c9ff93ce3a5656df41de62e18c847b", "score": "0.44920292", "text": "public function disableAutoRum();", "title": "" }, { "docid": "24a8c15dff9498bb7a3131658a5dd7c2", "score": "0.44895318", "text": "public function disableElasticTrigger()\n {\n $this->_enabled = false;\n }", "title": "" }, { "docid": "00a2255157cce589989d517886f322fb", "score": "0.4489443", "text": "public function onDisable() {\n }", "title": "" }, { "docid": "b24f79c997c02f7a5abc2420f5f80d2d", "score": "0.448796", "text": "public function setMaxOrderAmount(float $number);", "title": "" }, { "docid": "725762e1869f1c1587352b4467804e46", "score": "0.4486458", "text": "function _make_odd()\n {\n switch (MATH_BIGINTEGER_MODE) {\n case MATH_BIGINTEGER_MODE_GMP:\n gmp_setbit($this->value, 0);\n break;\n case MATH_BIGINTEGER_MODE_BCMATH:\n if ($this->value[strlen($this->value) - 1] % 2 == 0) {\n $this->value = bcadd($this->value, '1');\n }\n break;\n default:\n $this->value[0] |= 1;\n }\n }", "title": "" }, { "docid": "01d9124e71f6fb3bb837238ab3b3ec16", "score": "0.44826096", "text": "function __validate_number($element, &$form_state) {\n\n $num = preg_replace(array('/\\./', '/X/i', '/B/i', '/\\s+/'), '', $element['#value']);\n\n if( $element['#name'] == 'tso' ):\n if( !empty( $form_state['values']['wired'] ) && empty( $element['#value'] ) ):\n form_set_error(\n 'tso',\n t('<b>TSO</b> cannot be empty. Please enter in the form of 0.0 0000.')\n );\n elseif( empty( $form_state['values']['wired'] ) && empty( $element['#value'] ) ):\n $num = 0;\n endif;\n elseif( $element['#name'] == 'office' ):\n\n endif;\n\n\n if( !is_numeric($num) ):\n\n form_set_error(\n $element['#name'],\n t('<b>@name</b> must be a number not <b><em>@val</em></b>.',\n array(\n '@name' => $element['#title'],\n '@val' => $element['#value']\n )\n )\n );\n return false;\n endif;\n}", "title": "" }, { "docid": "ff70b2aabe9fb38f9e293473c5d3fd44", "score": "0.44595945", "text": "public function testSettingNoRangeException()\n {\n $rule = new Formagic_Rule_NumericRange();\n }", "title": "" }, { "docid": "5c7c8f3fedaff1de7d4c279d026bc741", "score": "0.4459528", "text": "public function updateQualityNegativeSellIn(): void\n {\n }", "title": "" }, { "docid": "aab9c946ab3254df1164ba3430cd51ec", "score": "0.44583225", "text": "public function accelerate()\n {\n\n if(!$this->engineState){\n echo \"Engine needs to be on\";\n return;\n }\n //Add to speed, decrease fuel\n if($this->getFuel()>0)\n {\n $this->fuel -= $this->fuelIncriment;\n $this->speed += $this->speedIncriment;\n if($this->speed > 100){\n echo \"I have a need. A need for speed\";\n }\n if($this->speed > 750){\n echo \" SUPERSONIC!\";\n }\n\n return;\n //$this->setSpeed($this->setSpeed() + $this->fuelIncriment);\n }\n //If out of gas\n if($this->getFuel() <= 0){\n $this->setFuel(0);\n $this->setSpeed(0);\n $this->setEngineState(false);\n echo \"Out of gas\";\n }\n }", "title": "" }, { "docid": "2c12fc6d7cdc5f491e1d0e9b9c400c3c", "score": "0.44572818", "text": "public function setNeedFulfilled($newNeedFulfilled) {\n\n\t\t// verify the need fulfilled is valid\n\t\t$newNeedFulfilled = filter_var($newNeedFulfilled, FILTER_VALIDATE_INT);\n\t\tif($newNeedFulfilled === false) {\n\t\t\tthrow(new InvalidArgumentException(\"needFulfilled is not a valid integer\"));\n\t\t}\n\n\t\t// verify the Need Fulfilled is positive\n\t\tif($newNeedFulfilled < 0) {\n\t\t\tthrow(new RangeException(\"needFulfilled is not positive\"));\n\t\t}\n\n\t\t// convert and store the need fulfilled\n\t\t$this->needFulfilled = intval($newNeedFulfilled);\n\n\t}", "title": "" }, { "docid": "c6cb266343a4a9bc81bce0900637d30e", "score": "0.44500965", "text": "public function checkLife()\n\t{\n\t\tif ($this->hitPoints <= 0) {\n\t\t\t//kill all other bees\n\t\t\t$this->killAllBees();\n\t\t}\n\t}", "title": "" }, { "docid": "fa703c98f737c9086f34aaafb763050c", "score": "0.44498375", "text": "public static function invalidateWeightedRoundRobins()\n\t{\n\t\t$algo = self::WEIGHTED_ROUND_ROBIN;\n\t\tDb::update('rotations', array(\n\t\t\t'value' => 0\n\t\t), array(\n\t\t\t'key' => $algo.':index' \n\t\t));\n\t}", "title": "" }, { "docid": "61ff4a13d7ea6a9cc26ac6bc9b09eea0", "score": "0.44435582", "text": "public function setLifePoints($damage) {\n $this->lifePoints -= $damage; // La cible perd des points de vie.\n if ($this->lifePoints <= 0){\n $this->lifePoints = 0;\n }\n return;\n }", "title": "" }, { "docid": "bdf3acbbf0b4c70fa052ea70c9cf3cde", "score": "0.44435263", "text": "public function ee() { return true; }", "title": "" }, { "docid": "05f031fb55a4087270f491d3fbef8dbe", "score": "0.4432663", "text": "public function _set($number)\n {\n }", "title": "" }, { "docid": "b160db3e42b0c6cc66b40f95a4f8af70", "score": "0.4422866", "text": "public function refuse() {\n\n\t}", "title": "" }, { "docid": "0f8fbee13a198d01d56ebf2a59e10971", "score": "0.4420131", "text": "protected function pnumber()\n {\n }", "title": "" }, { "docid": "1a6f8433da0fd77b1eb2973603528f83", "score": "0.44155064", "text": "function setEmphasis($on = true) {\n\t\tself::validateBoolean($on, __FUNCTION__);\n\t\t$this -> connector -> write(self::ESC . \"E\". ($on ? chr(1) : chr(0)));\n\t}", "title": "" }, { "docid": "cc99cff61d99b78a2717840ee4ab4722", "score": "0.4406997", "text": "public function gagnerExperience()\n{\n $this->_exp =$this->_exp + 1;\n}", "title": "" }, { "docid": "824bfa931a0014da6d0e12ceeeb41b7b", "score": "0.44065803", "text": "function checkNumber($number)\n {\n if($number>1)\n {\n throw new Exception (\"Number should be less than 1\");\n }\n return true;\n }", "title": "" }, { "docid": "1e5e7448d6025221a1210b4eec62f88f", "score": "0.43989748", "text": "public function raise(){\n\t\tthrow $this;\n\t}", "title": "" }, { "docid": "4440ae97535a053d7d8e9f63cd46af4a", "score": "0.43932056", "text": "public function test_alarm_is_set_to_false_with_min_and_max()\n {\n $this->model->state = 75.0;\n\n $this->assertFalse($this->model->alarm());\n }", "title": "" }, { "docid": "4fdebf20a19f2c0e200c080c1462314a", "score": "0.43875793", "text": "public function forceFactionChange()\n\t{\n\t\treturn $this->addFlag(64);\n\t}", "title": "" }, { "docid": "20765df3588debe4f91ee5a53ac4e607", "score": "0.43874273", "text": "function gainexpwin($leadership,$playerid) \n{\n global $db;\n global $myout;\n global $enemy;\n global $arrlost;\n $gainexp = (($myout -> fields['warriors'] - $arrlost[0]) + ($myout -> fields['archers'] - $arrlost[1]) + ($enemy -> fields['warriors'] - $arrlost[3]) + ($enemy -> fields['archers'] - $arrlost[4]) + $enemy -> fields['size']);\n if ($gainexp > 0)\n {\n $gainexp = ($gainexp / 200) / ceil($leadership);\n $gainexp = round($gainexp,\"2\");\n }\n else\n {\n $gainexp = 0;\n }\n if ($gainexp < 0.01) \n {\n $gainexp = 0.01;\n }\n $db -> Execute(\"UPDATE players SET leadership=leadership+\".$gainexp.\" WHERE id=\".$playerid);\n return $gainexp;\n}", "title": "" }, { "docid": "14ad931ea8ce6850b4c7f5712f222954", "score": "0.43870613", "text": "public function redeem()\n\t{\n\t\tforeach($this->attempts as $identifier => $quantity)\n\t\t{\n\t\t\tif($quantity > 0)\n\t\t\t{\n\t\t\t\t$this->hit($identifier, -1 * $quantity);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a17653a28942fe63df31bbdff919554", "score": "0.4385918", "text": "public function donnerEssence(Vehicule $vehicule) // véhicule signifie que l'on doit passer un objet instancié de la classe véhicule.\n {\n $vehicule->setLitreEssence(50); // on fait le plein de la voiture en utilisant le setter pour litreEssence de la voiture.\n $this->setLitreEssence($this->getLitreEssence() - 50); // on retire 50 litres d'essence de la pompe\n }", "title": "" }, { "docid": "2ce483b62e7b2e5a4c62c5a187633698", "score": "0.43825313", "text": "public function enableElasticTrigger()\n {\n $this->_enabled = true;\n }", "title": "" }, { "docid": "ce57e2eb4a57ab03f7e49c668331934e", "score": "0.43796787", "text": "function setFrecuency($flag, $value){\n\t\t$accepted_flags=array('MODIFY_VARS','MODIFY_QUOTED_STRINGS',\n\t\t'MODIFY_DOUBLE_QUOTED_STRINGS','MODIFY_NUMBERS','MODIFY_FUNCTIONS');\n\t\t\n\t\t// Valid flag check\n\t\tif( !in_array($flag,$accepted_flags)){\n\t\t\techo \"<pre>Function setFrecuency, Fatal error: Unknown flag: '$flag'\\n\";\n\t\t\techo \"Allowed flags: \".implode(',',$accepted_flags).\"\\n\";\n\t\t\techo \"Exitting...\\n</pre>\";\n\t\t\texit();\t\t\t\n\t\t}\n\t\t\n\t\t// Valid value check\n\t\tif( $value != ceil($value) || $value<(-1) || $value>1001 || !is_numeric($value) ){\n\t\t\techo \"<pre>Function setFrecuency, Fatal error: '$value' is not a valid value for flag '$flag'\\n\";\n\t\t\techo \"Exitting...\\n</pre>\";\n\t\t\texit();\t\t\t\n\t\t}\n\t\t\n\t\t// Set it\n\t\t$this->flags[$flag] = $value;\n\t\t\n\t}", "title": "" }, { "docid": "c58a85218f8d4d8f84a7fe8358072cd0", "score": "0.43754938", "text": "public function testSetNumLigne() {\n\n $obj = new Ecritures();\n\n $obj->setNumLigne(10);\n $this->assertEquals(10, $obj->getNumLigne());\n }", "title": "" }, { "docid": "00c08766377ae08932a774b3eb040511", "score": "0.4370564", "text": "public static function keepLooking($value = true)\n {\n $value = (! is_bool($value) || ! is_int($value)) ? false : true;\n\n $value = (is_int($value) && $value > 0) ? $value - 1 : $value;\n\n self::$halts = $value;\n\n return true;\n }", "title": "" }, { "docid": "024b0b61eff80f731147cb52bd120af6", "score": "0.43683374", "text": "public function bonusChance()\n {\n }", "title": "" }, { "docid": "bb1f69ac62dfcf694ac2c37517d9f86c", "score": "0.43613693", "text": "public function setFinalNumber($number){\n\t\t$this->_mFinalNumber = $number;\n\t\tNumber::validatePositiveNumber($number, 'N&uacute;mero final inv&aacute;lido.');\n\t}", "title": "" }, { "docid": "bbae3368007f1a36c8075e67a8620143", "score": "0.4359207", "text": "public static function ean($ean)\n {\n Assert::length($ean, 13);\n }", "title": "" }, { "docid": "3a90bd0b2a83619b8847292e1a9b5956", "score": "0.43471822", "text": "public function roll() :void\n {\n $this->value = rand(self::MIN_VALUE, self::MAX_VALUE);\n $this->notify();\n }", "title": "" }, { "docid": "7f3d065217e7b7d00f3b2b92fbebef7c", "score": "0.4345141", "text": "public function dolaresEuros(){\n return $this->numero*0.811908;}", "title": "" }, { "docid": "446a0c437ffa225d23af38c05d3a1323", "score": "0.43417597", "text": "public function ligarMudo(){\n if ($this->getLigado() && $this->getVolume()>0) {\n $this->setVolume(0);\n }\n }", "title": "" }, { "docid": "3c26d1fec6273c8acdc655b1bdc54d03", "score": "0.43408942", "text": "public function disableAvoidTolls()\n {\n $this->avoid_tolls = false;\n }", "title": "" }, { "docid": "1140d29d8540590f9c66dce920875c30", "score": "0.4340279", "text": "public function getEICorrection() : ?float\n {\n if (!is_null($speedloss = $this->getSpeedLoss()))\n return $speedloss * 10 * -1;\n return null;\n }", "title": "" }, { "docid": "b332b941d1e789b9c7142b435b8a929b", "score": "0.43340942", "text": "public function enable() {\n $this->disable = false;\n }", "title": "" }, { "docid": "c87bf79e2f082e9ce408965f6ec970c2", "score": "0.4328243", "text": "function udapte_thirst_skill()\n\t{\n\t\t$pdo = PDO2::getInstance();\n\t\t\n\t\t$query = $pdo->prepare(\"UPDATE tbl_rabbit_skill SET skill_thirst = IF( (skill_thirst - :new_skill )<0,0,(skill_thirst - :new_skill ))\");\n\t\t\n\t\t$query->bindValue(\":new_skill\",10);\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "9947bd19ddd98477e33ca231629b97a5", "score": "0.43210697", "text": "public function disable()\n {\n }", "title": "" }, { "docid": "42d6bd2313aee9d79160677769bc497e", "score": "0.43208125", "text": "protected function set__roundNumber() {\n throw new LogicException(\n 'BMGame->roundNumber is derived automatically from BMGame.'\n );\n }", "title": "" }, { "docid": "064c853f1e424a2f0fc76e15ab7f5082", "score": "0.43196914", "text": "public function disableRowEvolution()\n\t{\n\t\t$this->viewProperties['disable_row_evolution'] = true;\n\t}", "title": "" }, { "docid": "bd7c1687b3fd804f6836b36cc3a81400", "score": "0.4315021", "text": "function udapte_health_skill()\n\t{\n\t\t$pdo = PDO2::getInstance();\n\t\t\n\t\t$query = $pdo->prepare(\"UPDATE tbl_rabbit_skill SET skill_health = IF( (skill_health - :new_skill )<0,0,(skill_health - :new_skill ))\");\n\t\t\n\t\t$query->bindValue(\":new_skill\",10);\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "e8b2d0c94d09d1d312d6b35d56ce5306", "score": "0.43075204", "text": "function set_offset($num) {\n if($offset >= 0) {\n $this->offset = $num;\n return true;\n }\n else {\n throw new Exception(\"Invalid argument for StanfordData::set_offset: \" . $num);\n }\n }", "title": "" }, { "docid": "70ba0eb48c0190291c500c1817c88275", "score": "0.43069914", "text": "public function librasEuros(){\n return $this->numero*1.12064;}", "title": "" }, { "docid": "fe31d3d33d952d49f250dc119863d992", "score": "0.43069166", "text": "public function onEnable() {\n }", "title": "" }, { "docid": "1810e2abc97198e5039f4224fd1d6342", "score": "0.4306361", "text": "public function estVivant(){\n if($this->_sante <= 0 ){\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "cd1a2d21938f273b3408fb0d61c0f492", "score": "0.42939672", "text": "function negate($number){\n\treturn -$number;\n}", "title": "" }, { "docid": "6093969d247db1e7e7a6f68a43131b43", "score": "0.42930442", "text": "public function isRequiredNumber($value, $suppressException = true);", "title": "" }, { "docid": "de867f23ff28a548254e4c6043ff78e2", "score": "0.4292438", "text": "function checkNum($number)\n {\n if($number>1)\n {\n throw new Exception(\"Value must be 1 or below\");\n }\n return true;\n }", "title": "" }, { "docid": "ed24dec3c07f383ef7e4e388ab913a2b", "score": "0.4291343", "text": "public function forcePrecision($on = true)\n {\n $this->_forcePrecision = $on;\n return $this;\n }", "title": "" }, { "docid": "e047087570e6d485223d95cb2244cbcf", "score": "0.42906982", "text": "private static function extend($Ee, $Epi)\r\n { \r\n\t$u1 = 1; \r\n\t$u2 = 0; \r\n\t$u3 = $Epi; \r\n\t$v1 = 0; \r\n\t$v2 = 1; \r\n\t$v3 = $Ee; \r\n\r\n\twhile ($v3 != 0) \r\n\t{ \r\n\t $qq = floor($u3/$v3); \r\n\t $t1 = $u1 - $qq * $v1; \r\n\t $t2 = $u2 - $qq * $v2; \r\n\t $t3 = $u3 - $qq * $v3; \r\n\t $u1 = $v1; \r\n\t $u2 = $v2; \r\n\t $u3 = $v3; \r\n\t $v1 = $t1; \r\n\t $v2 = $t2; \r\n\t $v3 = $t3; \r\n\t $z = 1; \r\n\t} \r\n\r\n\t$uu = $u1; \r\n\t$vv = $u2; \r\n\r\n\treturn ($vv < 0 ? $vv + $Epi : $vv);\r\n }", "title": "" }, { "docid": "baf3407d139a556efee966bdf07ab152", "score": "0.42898232", "text": "public function setEffectiveOn($value)\n {\n return $this->set('EffectiveOn', $value);\n }", "title": "" }, { "docid": "8883fcb8b29809b589c2e4251bcd17d9", "score": "0.42877194", "text": "protected function guardAmountInBounds($amount): void\n {\n if (abs($amount) > PHP_INT_MAX) {\n throw new RangeException('Integer overflow');\n }\n }", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.42860177", "text": "public function disable();", "title": "" }, { "docid": "255ce6375a17e4475c181cc47fc3e044", "score": "0.42860177", "text": "public function disable();", "title": "" }, { "docid": "dd441925f4e54c7952762090b2c1ba36", "score": "0.4285424", "text": "public function setEIN($value)\n {\n return $this->set('EIN', $value);\n }", "title": "" }, { "docid": "1ff37779f9c72cc35615fecc1a218502", "score": "0.42817715", "text": "protected function Calc()\n {\n parent::Calc();\n $this->explode_amount = min($this->radius_x - 10, $this->radius_y - 10,\n max(2, (int)$this->explode_amount));\n $this->radius_y -= $this->explode_amount;\n $this->radius_x -= $this->explode_amount;\n }", "title": "" }, { "docid": "a8a8f5fb7bc0b9c62db06081c61dd789", "score": "0.42807782", "text": "public function isCountLoosePoints()\n {\n return '1' == $this->getPointSystem(); // Beim eishockey gibt es im 3-Punktsystem keine Minuspunkte.\n }", "title": "" }, { "docid": "0ff053f50ce454dc309ab135b3fb83ec", "score": "0.42766488", "text": "public function test_state_is_set_between_numbers()\n {\n $this->model->setState();\n\n $this->assertTrue((-1000/10 <= $this->model->state) && ( $this->model->state <= 1000/10));\n }", "title": "" }, { "docid": "20b817ee8f2a6cd2c2bf8fbafe234d6e", "score": "0.42714748", "text": "public function prohibited(): void;", "title": "" }, { "docid": "a5dfe567296546544633c78cf266ec4a", "score": "0.4270066", "text": "function float() : self;", "title": "" }, { "docid": "603e8aa661129a08d7a824fc151aad8a", "score": "0.42687348", "text": "public function safetyOn()\n\t{\n\t\t$this->safety = TRUE;\n\t}", "title": "" } ]
77740fb7f7c96e12a791fbc6fab9a093
establish a new table object
[ { "docid": "ab31660e5415c197361debb4825d1b61", "score": "0.0", "text": "function execute()\n\t{\n\t\t$this->obj_table = New table;\n\n\t\t$this->obj_table->language\t= $_SESSION[\"user\"][\"lang\"];\n\t\t$this->obj_table->tablename\t= \"service_bundle_components\";\n\n\t\t// define all the columns and structure\n\t\t$this->obj_table->add_column(\"standard\", \"name_service\", \"NONE\");\n\t\t$this->obj_table->add_column(\"standard\", \"service_type\", \"NONE\");\n\t\t$this->obj_table->add_column(\"standard\", \"description\", \"NONE\");\n\n\n\t\t// defaults\n\t\t$this->obj_table->columns\t= array(\"name_service\", \"service_type\", \"description\");\n\n\n\t\t// define SQL structure\n\t\t$this->obj_table->sql_obj->prepare_sql_settable(\"services_bundles\");\n\t\t$this->obj_table->sql_obj->prepare_sql_addfield(\"id_service\", \"services_bundles.id_service\");\n\t\t$this->obj_table->sql_obj->prepare_sql_addfield(\"id_component\", \"services_bundles.id\");\n\t\t$this->obj_table->sql_obj->prepare_sql_addwhere(\"id_bundle = '\". $this->id .\"'\");\n\n\t\t// run SQL query\n\t\t$this->obj_table->generate_sql();\n\t\t$this->obj_table->load_data_sql();\n\n\n\t\t// run through services and fetch options\n\t\tfor ($i=0; $i < $this->obj_table->data_num_rows; $i++)\n\t\t{\n\t\t\t$obj_service\t\t\t= New service;\n\t\t\t$obj_service->option_type\t= \"bundle\";\n\t\t\t$obj_service->option_type_id\t= $this->obj_table->data[$i][\"id_component\"];\n\t\t\t$obj_service->verify_id_options();\n\n\t\t\t$obj_service->load_data();\n\t\t\t$obj_service->load_data_options();\n\n\t\t\t$this->obj_table->data[$i][\"name_service\"]\t= $obj_service->data[\"name_service\"];\n\t\t\t$this->obj_table->data[$i][\"service_type\"]\t= $obj_service->data[\"typeid_string\"];\n\t\t\t$this->obj_table->data[$i][\"description\"]\t= $obj_service->data[\"description\"];\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "993d6af539c0cda4d8c1ce733bc4e9d1", "score": "0.78453994", "text": "function newTable() {\r\n\t$table = new Table();\r\n\t$table->set_table('date', 'time', 'message', 'partyOf');\r\n\t$table->get_table();\r\n}", "title": "" }, { "docid": "d520afe6596cb69c22d0204cb65f5b07", "score": "0.7844512", "text": "public static function Table() { $strClass = self::TableClass(); return new $strClass; }", "title": "" }, { "docid": "969790a70e78c5c256bf16ba8d426180", "score": "0.75854915", "text": "function createTable()\n {\n return new $this->_tableClass($this, $this->getDb());\n }", "title": "" }, { "docid": "3f39d398ce23c10a2bc44346b752dd74", "score": "0.7408309", "text": "public function createTable();", "title": "" }, { "docid": "1e3c84751ba4bb78a4c6e529c0db8049", "score": "0.7385813", "text": "protected function create_table_object() {\r\n\t\treturn new DBTable(\r\n\t\t\t'tokens',\r\n\t\t\tarray(\r\n\t\t\t\tnew DBFieldText('token', 40, null, DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldDateTime('expirationdate', null, DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldDateTime('creationdate', DBFieldDateTime::NOW, DBFieldDateTime::TIMESTAMP | DBField::NOT_NULL)\r\n\t\t\t),\r\n\t\t\t'token'\r\n\t\t);\t\t\r\n\t}", "title": "" }, { "docid": "ff7c5acc1d5f86bc11134f0a259e1747", "score": "0.7247472", "text": "abstract public function createTable();", "title": "" }, { "docid": "a31221d605adf53ce4b6f89000d114a3", "score": "0.7188526", "text": "protected function create_table(){\n \n // generate the insert query.\n $query=$this->generate_create_table_query();\n \n // connect to database.\n $this->database_connect();\n \n // run the query.\n $database_type=$this->db_type;\n $this->result=@$database_type::create_table($query, self::$db_link);\n \n $database_type::close(self::$db_link);\n self::$db_link=null;\n \n }", "title": "" }, { "docid": "14528025152b2035cb82b4090010c061", "score": "0.71319956", "text": "abstract protected function createTable(Table $table);", "title": "" }, { "docid": "69fc4cab51ba06defc803d6107f46bfb", "score": "0.71016735", "text": "public function createTable() {\n\t}", "title": "" }, { "docid": "c67df10a895a768aa1b392eb3777ef5c", "score": "0.7081759", "text": "public static function table()\n {\n self::$cur_row = 0;\n self::$table = array();\n\n return new self;\n }", "title": "" }, { "docid": "8f77f414e5f3e614bad1c0600ea0f942", "score": "0.7034089", "text": "public function createTable(){ }", "title": "" }, { "docid": "eaa3dbac7c0f6cd57377d2047c88b741", "score": "0.7007725", "text": "public function createTable()\n {\n }", "title": "" }, { "docid": "2715a11fc1c0992fa4e2d3d5c0dc10f3", "score": "0.68976283", "text": "protected function init_table() \t\r\n\t\t{ \r\n\t\t\treturn self::TABLE; \r\n\t\t}", "title": "" }, { "docid": "2715a11fc1c0992fa4e2d3d5c0dc10f3", "score": "0.68976283", "text": "protected function init_table() \t\r\n\t\t{ \r\n\t\t\treturn self::TABLE; \r\n\t\t}", "title": "" }, { "docid": "2715a11fc1c0992fa4e2d3d5c0dc10f3", "score": "0.68976283", "text": "protected function init_table() \t\r\n\t\t{ \r\n\t\t\treturn self::TABLE; \r\n\t\t}", "title": "" }, { "docid": "2715a11fc1c0992fa4e2d3d5c0dc10f3", "score": "0.68976283", "text": "protected function init_table() \t\r\n\t\t{ \r\n\t\t\treturn self::TABLE; \r\n\t\t}", "title": "" }, { "docid": "2715a11fc1c0992fa4e2d3d5c0dc10f3", "score": "0.68976283", "text": "protected function init_table() \t\r\n\t\t{ \r\n\t\t\treturn self::TABLE; \r\n\t\t}", "title": "" }, { "docid": "4fb6e7c1f52d14c5c335bbf718d0536c", "score": "0.68889385", "text": "abstract protected function create_table($tablename, $structure);", "title": "" }, { "docid": "01f8fa08bd7b5ec115cbd91ca22c14c4", "score": "0.6882052", "text": "public static function table($table)\n {\n return new self($table);\n }", "title": "" }, { "docid": "9ab6fbbafe4d3536403f2ac1d805fd73", "score": "0.68815315", "text": "abstract public function getTable();", "title": "" }, { "docid": "9ab6fbbafe4d3536403f2ac1d805fd73", "score": "0.68815315", "text": "abstract public function getTable();", "title": "" }, { "docid": "9ab6fbbafe4d3536403f2ac1d805fd73", "score": "0.68815315", "text": "abstract public function getTable();", "title": "" }, { "docid": "c2fa61bb6459ad81c578711eafcdbe31", "score": "0.6879632", "text": "public function create_tables() {\n //\n }", "title": "" }, { "docid": "022fcb41d2d37e248961d7cc3426a1c5", "score": "0.6851946", "text": "protected function _getTable()\n {\n return new $this->_classTable;\n }", "title": "" }, { "docid": "9c75cf28db0b2a88d616166419dc29b3", "score": "0.6816742", "text": "protected function setTable()\n {\n }", "title": "" }, { "docid": "9c75cf28db0b2a88d616166419dc29b3", "score": "0.6816742", "text": "protected function setTable()\n {\n }", "title": "" }, { "docid": "5f6525cda7b4c159c22b527bde389598", "score": "0.6811408", "text": "protected abstract function getTable();", "title": "" }, { "docid": "6192e0c0c35e2dadef674ad12b663819", "score": "0.6806116", "text": "public function __construct($table_name)\r\n {\r\n self::_setup_db();\r\n parent::__construct($table_name);\r\n\r\n // Until find_one or find_many are called, this object is considered a new row\r\n $this->create();\r\n }", "title": "" }, { "docid": "653bf50e8cd8e3382f4f4e91e2e1b987", "score": "0.66656137", "text": "public function obj_table( $table )\n {\n $this->obj_table = $table;\n }", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.6664642", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.6664642", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.6664642", "text": "public function getTable();", "title": "" }, { "docid": "cf2aa65d7f97a330da1b15742703781f", "score": "0.6664642", "text": "public function getTable();", "title": "" }, { "docid": "a99f096ef82d2089ea7746738d860218", "score": "0.6661496", "text": "function create_table($table)\n\t\t{\n\n\t\t\t$qu = 'CREATE TABLE '.$table.' ( `id` int(11) NOT NULL );';\n\t\t\techo $qu;\n\t\t\t$this->init();\n\t\t\t$result = $this->server->query($qu);\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "c225a3d9e6f2c381104854038f507dbd", "score": "0.66473037", "text": "public function initTable()\n\t\t{\n\t\t\t// \tid int(10) not null primary key auto_increment,\n\t\t\t// \tstudno varchar(25) not null unique,\n\t\t\t// \tfirstname varchar(100) not null,\n\t\t\t// \tlastname varchar(100) not null,\n\t\t\t// \tmiddlename varchar(100) not null,\n\t\t\t// \tyear char(5) ,\n\t\t\t// \tgender enum('male' , 'female'),\n\t\t\t// \tcourse varchar(50),\n\t\t\t// \tcreated_at timestamp default now()\n\t\t\t// )\";\n\t\t\t// $this->db->query($sql)\n\t\t\t// if($this->db->execute()){\n\t\t\t// \tFlash::set('Table has been created');\n\t\t\t// }else{\n\t\t\t// \tFlash::set($this->db->error());\n\t\t\t// }\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3b1b1317ba64bcbb990462aff7120369", "score": "0.6616256", "text": "public static function table($table_name)\n {\n static $instance = false;\n if (!$instance) {\n $instance = new self();\n }\n $instance->table_name = $table_name;\n $instance->clear();\n array_push($instance->from_array, $table_name);\n return $instance;\n }", "title": "" }, { "docid": "4895e897e7fcd08c1114e01144bd7aa7", "score": "0.6615914", "text": "public abstract function getCreateTable($table, $columns = array(), $attributes = array());", "title": "" }, { "docid": "8da01e2cfb473eae1c5b1512d848d74f", "score": "0.6613502", "text": "public function table() {\n\n\n\t}", "title": "" }, { "docid": "091723ba033962e19d78afc879197f58", "score": "0.6601918", "text": "private function _for_table($table_name)\r\n {\r\n self::_setup_db();\r\n return new $this->_class_name();\r\n }", "title": "" }, { "docid": "afa7679dc42434a94841453fb4b2a07d", "score": "0.6585601", "text": "public function create($table, $object);", "title": "" }, { "docid": "1ca13b0b28ce27dba5bb2a6f74816e03", "score": "0.6580781", "text": "public function getTable($name){\n if(substr($name, -1) === 's'){$name = substr_replace($name, \"\", -1);}\n $class_name = '\\\\App\\\\Modeles\\\\Table\\\\' . ucfirst($name) . 'Table';\n return new $class_name($this->getDb());\n }", "title": "" }, { "docid": "3a0670725e3f07c85e57e0d3b345964e", "score": "0.65614575", "text": "public function __construct($table){\n $this->table = $table;\n }", "title": "" }, { "docid": "499cc66c405c4d3044b59dd3fb0e3679", "score": "0.6553283", "text": "abstract function createTable($conn);", "title": "" }, { "docid": "bf89b405e765b579adc32d6bd22aaad9", "score": "0.6540807", "text": "public function createTable()\n\t{\n\t\t$sTableName = $this->_database->quoteColumnName(self::$aConfig['database_table_name']);\n\n\t\t$this->_database->query(\"DROP TABLE IF EXISTS {$sTableName}\");\n\n\t\t$aConfig = $this->_database->getConfig();\n\n\t\t$this->_database->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS {$sTableName} (\n\t\t\t`id` int(11) NOT NULL auto_increment,\n\t\t\t`value` varchar(255) NOT NULL,\n\t\t\tPRIMARY KEY (`id`)\n\t\t) ENGINE={$aConfig['storageEngine']} DEFAULT CHARSET=utf8\");\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "504a53fb8537baafd335d08ee9a3eca8", "score": "0.65318173", "text": "protected function constructTable()\n {\n $this->table = new GalleryHTMLTable(\n $this->get_name(),\n array($this, 'countData'),\n array($this, 'getData'),\n array($this, 'get_property_model'),\n $this->get_property_model()->get_default_order_property() + ($this->has_form_actions() ? 1 : 0),\n $this->get_default_row_count(),\n $this->get_property_model()->get_default_order_direction(),\n ! $this->prohibits_order_direction(),\n ! $this->prohibits_page_selection());\n\n if ($this->has_form_actions())\n {\n $this->table->setTableFormActions($this->get_form_actions());\n }\n\n $this->table->setAdditionalParameters($this->get_parameters());\n }", "title": "" }, { "docid": "14c0fa58b6288515d74a7d83a81aa87c", "score": "0.6531551", "text": "private function __construct($table) {\n\t\t$this->table = $table;\n\t}", "title": "" }, { "docid": "e20b966978a531633eeb75f0c39fe1be", "score": "0.6522903", "text": "public function makeTable($name, $primary_key) {\n\n return new Table($this, $name, $primary_key);\n\n }", "title": "" }, { "docid": "a1647e1be8198aa8a17f0d40049ae747", "score": "0.6496729", "text": "abstract public function table(\n $table\n );", "title": "" }, { "docid": "04748d196acf3248551936d21ffcf79d", "score": "0.64875305", "text": "static public function tableWithData($data)\n {\n return new static($data);\n }", "title": "" }, { "docid": "03c9dec8d5136606e0284b0399115df7", "score": "0.6484087", "text": "function __construct($table){\n $this->db = $this->konek();\n $this->table = $table;\n }", "title": "" }, { "docid": "04eb01b9814de6a9848cc692e05c66db", "score": "0.6478029", "text": "private function getTable()\n {\n if (!$this->table) {\n $this->table = new Table($this);\n }\n\n return $this->table;\n }", "title": "" }, { "docid": "d3f0bee09025092c91b8a86e2e4ee9d0", "score": "0.6470401", "text": "public function getTable(string $tableName) : Table\n {\n return new Table($tableName, $this);\n }", "title": "" }, { "docid": "3a6d99091c1baa68a546e631a191a782", "score": "0.64679414", "text": "public function __construct($table) {\n $this->table = $table;\n }", "title": "" }, { "docid": "c6d2e972edeb9e7fb4008d974a407eb3", "score": "0.6456497", "text": "public function __construct(string $tablename)\r\n {\r\n $this->tablename = $tablename;\r\n }", "title": "" }, { "docid": "c69ff66f6d638d9a7d1b1b0282ee86e8", "score": "0.6447211", "text": "public static function from($table) {\n \n }", "title": "" }, { "docid": "3499a67b7fc004ada706eb7652782443", "score": "0.6444514", "text": "abstract public function createTable(string $sql): Table;", "title": "" }, { "docid": "27b86a8ee0aab98907158a8ac96bd98c", "score": "0.64407897", "text": "public function testCreateTableMethod()\n {\n $params = [\n 'id' => 'INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY',\n 'name' => 'VARCHAR(30) NOT NULL',\n 'email' => 'VARCHAR(50)',\n 'reg_date' => 'TIMESTAMP',\n ];\n\n $this->assertTrue(\n $this->db->create($params)\n ->table('test_table')\n ->execute()\n );\n }", "title": "" }, { "docid": "db8ca293e4eafb2e638b0f16a369ad9b", "score": "0.6431122", "text": "public function table()\n {\n // return new AdminTable($this->newQuery()->withoutGlobalScope('active'));\n return new SerialTable($this->with('product'));\n }", "title": "" }, { "docid": "b9c8f033c81c166baf7ec92af8277cf6", "score": "0.64140713", "text": "public static function table(string $table) : static\n {\n return new static($table);\n }", "title": "" }, { "docid": "4d26eb9231f59c943aa30e89508043a3", "score": "0.6404367", "text": "public function table($tableName) {\n\t\t$this->table = $tableName;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "5eacb32f4f63c804d4e591302641daf4", "score": "0.6395035", "text": "private function createTable($table)\n {\n try {\n // Gets the table information from the associated table file\n $tableInfo = $this->grabTableInfo($table);\n\t\t\t// Get the table schema from the file\n\t\t\t$schema = $tableInfo[0];\n // Executes the query to build the table\n DatabaseManager::Query($schema);\n\t\t\t$this->populateTable($tableInfo[1]);\n } catch (PDOException $e) {\n echo \"Adding table '$table' failed: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "eef983220e3ac2ec4d371d28632f1ee0", "score": "0.6392875", "text": "private function initTable() {\n global $db;\n\n $sql = 'CREATE TABLE IF NOT EXISTS `'.$db['prefix'].'items` (\n `id` int(11) AUTO_INCREMENT NOT NULL,\n `name` varchar(255) CHARACTER SET utf8 NOT NULL,\n `game` varchar(255) CHARACTER SET utf8 NULL,\n `url` longtext CHARACTER SET utf8 NULL,\n `img` longtext CHARACTER SET utf8 NULL,\n `quantity` int(11) NULL,\n `price` double NULL,\n PRIMARY KEY (`name`),\n KEY `id` (`id`)\n );';\n\n try {\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute();\n $stmt = null;\n } catch(Exception $e) {\n print_r($e->getMessage());\n die('Cannot create table');\n }\n }", "title": "" }, { "docid": "1aa11a3718bc04f77970a309941bc00c", "score": "0.63898635", "text": "function createTable()\r\n\t{\r\n\t global $xoopsDB;\r\n\r\n\t $query = $this->getStructure();\r\n\r\n\t $ret = $xoopsDB->query($query);\r\n\t if (! $ret) {\r\n\t echo \"<li class='err'>\" . sprintf(_AM_WFD_DB_MSG_CREATE_TABLE_ERR, $this->name()) . \"</li>\";\r\n\t } else {\r\n\t echo \"<li class='ok'>\" . sprintf(_AM_WFD_DB_MSG_CREATE_TABLE, $this->name()) . \"</li>\";\r\n\t }\r\n\r\n\t return $ret;\r\n\t}", "title": "" }, { "docid": "2044669563a38a66a8b15354334dfad5", "score": "0.63820434", "text": "public static function createTable()\r\n\t{\r\n\t\t$EE =& get_instance();\r\n\t\t$EE->load->dbforge();\r\n\t\t$EE->dbforge->add_field(self::$table_fields);\r\n\t\t$EE->dbforge->add_key('id', TRUE);\r\n\r\n\t\tif (!$EE->dbforge->create_table(self::$table_name, TRUE))\r\n\t\t{\r\n\t\t\tshow_error(\"Unable to create table in \".__CLASS__.\": \" . $EE->config->item('db_prefix') . self::$table_name);\r\n\t\t\tlog_message('error', \"Unable to create settings table for \".__CLASS__.\": \" . $EE->config->item('db_prefix') . self::$table_name);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "73e24ee9c8e39a3f8041d0337beb1497", "score": "0.63740623", "text": "private function createTestTable()\n {\n $sql = 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'packlink_test\n (\n `id` INT NOT NULL AUTO_INCREMENT,\n `type` VARCHAR(128) NOT NULL,\n `index_1` VARCHAR(128),\n `index_2` VARCHAR(128),\n `index_3` VARCHAR(128),\n `index_4` VARCHAR(128),\n `index_5` VARCHAR(128),\n `index_6` VARCHAR(128),\n `index_7` VARCHAR(128),\n `data` LONGTEXT NOT NULL,\n PRIMARY KEY(`id`)\n )\n ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';\n\n \\Db::getInstance()->execute($sql);\n }", "title": "" }, { "docid": "b49ed40525f590334fcbb01ae5f400cc", "score": "0.63540834", "text": "public function getTable($name)\n {\n $class_name= \"app\\\\Table\\\\\".ucfirst($name).'Table';\n return new $class_name($this->getDb());\n }", "title": "" }, { "docid": "34ad95f6058ef5acb8911a1e802cee0c", "score": "0.6344573", "text": "function create_table_object($items, $columns) {\n\n $parent_clusterid = $this->optional_param('parent_clusterid', 0, PARAM_INT);\n\n $extra_params = array();\n if(!empty($parent_clusterid)) {\n $extra_params['parent_clusterid'] = $parent_clusterid;\n }\n\n $page_object = $this->get_new_page($extra_params);\n\n return new management_page_table($items, $columns, $page_object);\n }", "title": "" }, { "docid": "3c3a57d2b4a823efbc038fddbe591e89", "score": "0.6341867", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->createTable();\n\t}", "title": "" }, { "docid": "9a123899c9ffd837fbd4cc1aa3c4bf71", "score": "0.6329556", "text": "protected function create_table_object() {\r\n\t\treturn new DBTable(\r\n\t\t\t'jcsscompressedfiles',\r\n\t\t\tarray(\r\n\t\t\t\tnew DBFieldEnum('type', array_keys(JCSSManager::get_types()), null, DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldText('filename', 255, null, DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldText('hash', 255, null, DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldInt('num_sources', 1, DBFieldInt::UNSIGNED | DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldSerialized('sources', DBFieldText::BLOB_LENGTH_SMALL, null, DBField::NOT_NULL),\r\n\t\t\t\tnew DBFieldInt('version', 1,DBFieldInt::UNSIGNED | DBField::NOT_NULL)\r\n\t\t\t),\r\n\t\t\tarray('type', 'filename')\r\n\t\t);\t\t\r\n\t}", "title": "" }, { "docid": "8a54283480f14db949f72989fc5331fb", "score": "0.6324337", "text": "public function table($table)\n {\n $this->table = $table;\n\n return $this;\n }", "title": "" }, { "docid": "9c414589f171a7c4262b2a9184bd6d4c", "score": "0.6312664", "text": "public static function getTable() {\n\t\t$selfClass = get_called_class();\n\t\t$res = new $selfClass();\n\t\treturn $res->table;\n\t}", "title": "" }, { "docid": "cb8d2874db06c52d727ebcb07610806f", "score": "0.63110805", "text": "public static function init() {\n if(!self::table_exists()) {\n self::create_table();\n }\n }", "title": "" }, { "docid": "60e2f8d504572599ada2e5ef2d413ff1", "score": "0.6307782", "text": "protected function create_table()\r\r\n\t{\r\r\n\t\t//initializing variables\r\r\n\t\t$query = \"CREATE TABLE `$this->_tbl`(\r\r\n\t\tid CHAR(36) NOT NULL,\r\r\n\t\tPRIMARY KEY(id),\r\r\n\t\tname VARCHAR(255),\r\r\n\t\tdescription TEXT,\r\r\n\t\tcategory_id INT(11),\r\r\n\t\temail VARCHAR(255),\r\r\n\t\twebsite VARCHAR(255),\r\r\n\t\toffice VARCHAR(255),\r\r\n\t\tpublished INT(11))\";\r\r\n\t\t\r\r\n\t //loading resources\r\r\n \t$db =& JFactory::getDBO();\r\r\n \t\r\r\n \t$db->setQuery( $query );\r\r\n \t$results = $db->query();\r\r\n \t\r\r\n \t//reasons to fail\r\r\n \tif (!$results) \r\r\n \t\treturn false;\r\r\n \treturn true;\r\r\n\t}", "title": "" }, { "docid": "b9eaae92616494955ba5b2f9ecbbb97c", "score": "0.6302987", "text": "public function addTable()\n {\n return $this->addContent(new Table());\n }", "title": "" }, { "docid": "9a3698b994e0e138b57e22609115b2e8", "score": "0.6300895", "text": "public function table($table)\n {\n if (empty($table)) throw new \\PDOException('表名不能为空');\n $className = str_replace('BaseConnection', 'SingleTableBuilder', get_class($this));\n return new $className($table, $this,[\n 'moreTableTransStartCheck' => self::$moreTableTransStartCheck\n ]);\n }", "title": "" }, { "docid": "0014048bbb8009344aca2ba423f4e632", "score": "0.6297766", "text": "public function createTable(string $param, ?string $type = null): Table;", "title": "" }, { "docid": "f582d82f8c128d32542ef3ee1023dac8", "score": "0.6285025", "text": "private function CreateTb_TestCase() {\n $tTestCase = new DbTable('TestCase');\n \n // Set id property\n $pId = new DbProperty('Id');\n $pId->SetType(DbType::Double());\n $pId->NotNull();\n $pId->PrimaryKey();\n $pId->AutoIncrement();\n // Add id to table\n $tTestCase->AddProperty($pId);\n \n // Set category property\n $pCategory = new DbProperty('Category');\n $pCategory->SetType(DbType::Double());\n $pCategory->NotNull();\n // Add category to table\n $tTestCase->AddProperty($pCategory);\n\n // Set category property\n $pStatus = new DbProperty('Status');\n $pStatus->SetType(DbType::Double());\n $pStatus->NotNull();\n // Add category to table\n $tTestCase->AddProperty($pStatus);\n \n // Set name property\n $pName = new DbProperty('Name');\n $pName->SetType(DbType::Varchar(255));\n $pName->NotNull();\n // Add name to table\n $tTestCase->AddProperty($pName);\n \n // Add table to database\n $this->Database->AddTable($tTestCase);\n }", "title": "" }, { "docid": "98da5d2090e65a9e372aabc0f2eb325a", "score": "0.6277773", "text": "public function table(): Table\n {\n return $this->_table;\n }", "title": "" }, { "docid": "6530e5cc00d9fe5c9fcbec06e33bc0b7", "score": "0.6277702", "text": "function setupTable()\r\n\t{\r\n\t\tif(!sql::TableExists(dkpPointsTableEntry::tablename)) {\r\n\t\t\t$tablename = dkpPointsTableEntry::tablename;\r\n\t\t\tglobal $sql;\r\n\t\t\t$sql->Query(\"CREATE TABLE `$tablename` (\r\n\t\t\t\t\t\t`id` INT NOT NULL AUTO_INCREMENT ,\r\n\t\t\t\t\t\t`guild` INT NOT NULL,\r\n\t\t\t\t\t\t`tableid` INT NOT NULL,\r\n\t\t\t\t\t\t`user` INT NOT NULL,\r\n\t\t\t\t\t\t`points` DECIMAL(11,2) NOT NULL,\r\n\t\t\t\t\t\t`lifetime` DECIMAL(11,2) NOT NULL,\r\n\t\t\t\t\t\tPRIMARY KEY ( `id` ),\r\n KEY `user` (`guild`,`tableid`,`user`),\r\n KEY `points` (`guild`,`tableid`,`points`),\r\n KEY `lifetime` (`guild`,`tableid`,`lifetime`)\r\n\t\t\t\t\t\t) TYPE = innodb;\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b835660f681d6523f423d8186915faa9", "score": "0.6264312", "text": "public function createTable(){\n\t\t\t\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `biblio_entries_article` (\n\t\t`id_publi` int(11) NOT NULL,\n\t\t`journal_id` int(11) NOT NULL,\n\t\t`pages` varchar(15) NOT NULL,\n\t\t`volume` int(11) NOT NULL,\t\t\n\t\tPRIMARY KEY (`id_publi`)\n\t\t);\";\n\t\t$pdo = $this->runRequest($sql);\n\t\treturn $pdo;\n\t}", "title": "" }, { "docid": "c34af062bdcdbf8f935fcfea7ee9e3c6", "score": "0.62624234", "text": "public function createTable()\r\n {\r\n // (removing all old data)\r\n $this->dropTable();\r\n\r\n $sql = \"\r\n CREATE TABLE IF NOT EXISTS students (\r\n id integer not null primary key auto_increment,\r\n name text)\r\n \";\r\n\r\n $this->connection->exec($sql);\r\n }", "title": "" }, { "docid": "7b8f9a55f531b6b6c02ef5e52abf3187", "score": "0.62584984", "text": "public static function for_table($table_name) {\n return new self($table_name);\n }", "title": "" }, { "docid": "5f81c037c9069775294d63d95bc240ba", "score": "0.6244822", "text": "function Table() {\r\n $this->nome = '';\r\n $this->propriedades = array();\r\n $this->chaves = array();\r\n }", "title": "" }, { "docid": "4cad568b2b2dbc318d0a5fc42c793973", "score": "0.62443995", "text": "public function getTableFactory();", "title": "" }, { "docid": "dad00caf8af8117c4e978913b9731894", "score": "0.62439394", "text": "public function table($crypt = false) {\n\t\tif (is_null($this->table)) {\n\t\t\t$this->table = new Model\\Table($this->nTable, $this->fields(), $crypt);\n\t\t}\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "dbd0cfbb4ee836eb8f1cf166ab5eac3e", "score": "0.6241674", "text": "function ensure_my_table() { }", "title": "" }, { "docid": "db6ac5dc3a2d3801835afdaa5b67a783", "score": "0.6240882", "text": "function get_table() {\r\n\t\t$table = $this->table;\r\n\t\treturn $table;\r\n }", "title": "" }, { "docid": "5a5ff58bc45e833fba1e15b983742f43", "score": "0.6236219", "text": "public function __construct($table)\n {\n General::ensureType(array(\n 'table' => array('var' => $table, 'type' => 'string'),\n ));\n $this->table = 'tbl_' . $table;\n }", "title": "" }, { "docid": "ae669a92520c4141029402f2de8d3470", "score": "0.62296873", "text": "protected function createTable(){\r\n\t\t$columns = array(\r\n\t\t\t\t'id'\t=>\t'int',\r\n\t\t\t\t'language'\t=>\t'string',\r\n\t\t\t\t'translation'\t=>\t'text',\r\n\t\t);\r\n\t\ttry {\n\t\t\t$this->getDbConnection()->createCommand(\r\n\t\t\t\tYii::app()->getDb()->getSchema()->createTable($this->tableName(), $columns)\r\n\t\t\t)->execute();\r\n\t\t\t$this->getDbConnection()->createCommand(\r\n\t\t\t\tYii::app()->getDb()->getSchema()->addPrimaryKey('id_lang', $this->tableName(), 'id,language')\r\n\t\t\t)->execute();\r\n\t\t\t$ref = new MessageSource();\r\n\t\t\t$this->getDbConnection()->createCommand(\r\n\t\t\t\tYii::app()->getDb()->getSchema()->addForeignKey('fk_message_sourcemessage', $this->tableName(), 'id', $ref->tableName(), 'id')\r\n\t\t\t)->execute();\n\t\t} catch (CDbException $e){\n\t\t\tYii::log($e->getMessage(), 'warning');\n\t\t}\r\n\t}", "title": "" }, { "docid": "404e043c1d3e3598e66afb8178d92da0", "score": "0.6204192", "text": "public function __construct(){\n $this->setTableName();\n $this->type = self::TYPE_CREATED;\n $this->connect();\n }", "title": "" }, { "docid": "9b0cf512b76925fed9d94ab9e51f603f", "score": "0.6198156", "text": "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_Tour();\n\t\t}", "title": "" }, { "docid": "98fac7e533e1a77f621ef18f93dcfb18", "score": "0.61974716", "text": "public function table($table){\n\t\t$this->table = $table;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "43aec6f01b5290e9144e4d9e32e5fe02", "score": "0.6191436", "text": "public function into(string $table): static\n {\n $this->table = $table;\n return $this;\n }", "title": "" }, { "docid": "fe78db1e5dc8dff99ba342a3b6043aa2", "score": "0.61848664", "text": "function create_table(){\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "30fe65b31cf98efa9853630b9da1e805", "score": "0.6181475", "text": "public function table( $table, $id_name='id' ) {\n $this->clear();\n $this->table = $this->sqlObj->table = $table;\n $this->id_name = $this->sqlObj->id_name = $id_name;\n return $this;\n }", "title": "" }, { "docid": "720930c776b9446f0f369057c8965e32", "score": "0.6181143", "text": "public function GetTable();", "title": "" }, { "docid": "75c0b2cbdbed1ffe40f00de751090209", "score": "0.6179688", "text": "function create_table($sSchema, $sTable)\n\t{\n\t\tpr('create_table('.$sSchema.', '.$sTable.')');\n\t\t//$sSql = \"select * from information_schema.tables where table_name = \".Db::esc($sTable);\n\t\t//$sSql = \"DESC \".$sTable;\n\t\t$sSql = \"SHOW CREATE TABLE \".$sTable;\n\t\tpr($sSql);\n\t\t//stop();\n\t\t$aRow = $this->aDbs['from'][$sSchema]->select_row($sSql);\n\t\texpose($aRow);\n\t\t$sSql = $aRow['Create Table'];\n\t\tpr($sSql);\n\t\t$vRes = $this->aDbs['to'][$sSchema]->admin($sSql);\n\t\texpose($vRes);\n\t\t//stop();\n\t}", "title": "" }, { "docid": "0d1915a6d02e55f479f48e995b54ad04", "score": "0.61726916", "text": "function set_table()\n\t{\n\t\t$this->table = eval($this->template('ADMIN_TABLE'));\n\t\t$this->etable = eval($this->template('ADMIN_ETABLE'));\n\t}", "title": "" }, { "docid": "5013be46ce0e3c4ed75c9797c3af4693", "score": "0.61670107", "text": "function get_table() {\n\t\t$table = $this->table;\n\t\treturn $table;\n }", "title": "" }, { "docid": "c286136b8c73eed890b7de352b2b8a0f", "score": "0.6166837", "text": "abstract function createTable($table, $fields = null, $indexes = null);", "title": "" }, { "docid": "89e0914d428fbd487c99c824ece0cef9", "score": "0.61661994", "text": "protected function _getTable()\n {\n return new Categories_Model_Category_Table();\n }", "title": "" } ]
2a25e4d81ee9df665c78d0c4b5975dc0
Set Available Layouts Check to see if each layout is already in the property array, if it is then check the file path for changes and action appropriately if not add from the config file
[ { "docid": "ffcf8a68a9c1617f6d5a754eb6ba6a5c", "score": "0.70525104", "text": "public function SetAvailableLayouts( $layouts ) {\r\n\t\t\t\r\n\t\t\tif (is_array( $layouts )) {\r\n\t\t\t\t\r\n\t\t\t\tforeach ($layouts as &$config_layout) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Check for existence\r\n\t\t\t\t\tif (isset( $this->available_layouts[$config_layout->GetName()] )) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Any changes to the config? (dynamic or static) TODO check for name changes also \r\n\t\t\t\t\t\tif ($config_layout->GetLocation() != $this->available_layouts[$config_layout->GetName()]->GetLocation()) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Default to the config layout\r\n\t\t\t\t\t\t\t$this->available_layouts[$config_layout->GetName()] = &$config_layout; \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->available_layouts[$config_layout->GetName()] = &$config_layout;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" } ]
[ { "docid": "349e29ab658f24b5e8b098ba10e37be0", "score": "0.64641696", "text": "function set_layout($layout = 'index')\n {\n \t$path = $this->config('path').$this->config('theme').'/'.$layout.'.php';\n \tif (!file_exists($path))\n \t{\n \t\t$layout = 'index';\n \t}\n \t$this->set_config('layout', $layout);\n }", "title": "" }, { "docid": "2b3aafd4f8936a14c5cdde3177cf0394", "score": "0.64265794", "text": "protected function _setLayout()\n {\n $this->layout = strtolower(\n \"layouts/{$this->router->fetch_directory()}{$this->_class}/layout\"\n );\n if (file_exists(VIEWPATH . $this->layout . \".php\") === false) {\n $this->layout = \"layouts/default\";\n }\n }", "title": "" }, { "docid": "76ecb7f3c56770deea695e54987d5e70", "score": "0.62577534", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n //share the config option to all the views\n// View::share('cpanel', Config::get('cpanel::site_config'));\n }", "title": "" }, { "docid": "85ffc70752c6b8acdac2d31019de2516", "score": "0.615092", "text": "public function generateLayoutSettings($layout = ''){\r\n\t\tif (!$layout){\r\n\t\t\t$layout = JRequest::getVar('julayout');\r\n\t\t}\r\n\t\t\r\n\t\t$template = $this->activetemplate; \r\n\t\t$modulename = $this->modulename;\r\n\t\t\r\n\t\t//Get layout params from profile(if select a profile file_name)\r\n\t\tif(JRequest::getVar('julayoutparams','dbparams')=='profile' && JRequest::getVar('file_name','')!='') {\r\n\t\t\t$ini_file_in_module = self::getIniFileModule(); \r\n\t\t\t$ini_file_in_template = self::getIniFileTemplate(); \r\n\t\t\t\r\n\t\t\t//Get data saved in profile file, profiles in module have higher priority\r\n\t\t\tif (JFILE::exists($ini_file_in_module)){\r\n\t\t\t\t$layoutsettings_json = file_get_contents ($ini_file_in_module);\r\n\t\t\t} elseif (JFILE::exists($ini_file_in_template)) {\r\n\t\t\t\t$layoutsettings_json = file_get_contents ($ini_file_in_template);\r\n\t\t\t//File does not exist\r\n\t\t\t} else {\r\n\t\t\t\t$layoutsettings_json = \"{}\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t//Get layout params from database(Default)\r\n\t\t\t$layoutsettings_json = $this->params->get('layoutsettings','{}');\r\n\t\t}\r\n\t\t$layoutsettings = json_decode($layoutsettings_json);\r\n\t\t\r\n\t\t$theme_path_in_template = JPATH_SITE . DS . 'templates' . DS . $template . DS . 'html' . DS . $modulename. DS . $layout;\r\n\t\t$theme_path_in_module = JPATH_SITE . DS . 'modules' . DS . $modulename . DS . 'tmpl'. DS . $layout;\r\n\t\t\r\n\t\t//Params in template have higher priority\r\n\t\t$xml_params = JPATH_SITE . DS . 'templates' . DS . $template . DS . 'html' . DS . $modulename. DS . $layout . DS . 'params.xml';\r\n\t\tif (!JFile::exists($xml_params)) {\r\n\t\t\t$xml_params = JPATH_SITE . DS . 'modules' . DS . $modulename . DS . 'tmpl' . DS . $layout . DS . 'params.xml';\r\n\t\t}\r\n\t\t\r\n\t\t//Get all theme folders of selected layout in module\r\n\t\t$folders = glob($theme_path_in_module.DS.'themes'.DS.'*', GLOB_ONLYDIR);\r\n\t\tforeach ($folders AS $key=>$folder){\r\n\t\t\t$theme = basename($folder);\r\n\t\t\t$themes[$theme] = $theme;\r\n\t\t}\r\n\t\t\r\n\t\t//Get all theme folders of selected layout in template, if they have the same theme, theme in template(higher priority) will overwrite theme in module\r\n\t\t$folders = glob($theme_path_in_template.DS.'themes'.DS.'*', GLOB_ONLYDIR);\r\n\t\tforeach ($folders AS $key=>$folder){\r\n\t\t\t$theme = basename($folder);\r\n\t\t\t$themes[$theme] = $theme.' ['.JText::_('TEMPLATE').']';\r\n\t\t}\r\n\t\t\r\n\t\t//Sort themes by alphabet\r\n\t\tasort($themes);\r\n\t\t\r\n\t\t//Generate HTML\r\n\t\t//Load choosen/radio-group css/js to make new html has modal style\r\n\t\t$html = '\r\n\t\t\t\t<head>\r\n\t\t\t\t\t<script src=\"'.JURI::Root().'modules/'.$modulename.'/admin/js/chosen/jquery.chosen.js\" type=\"text/javascript\"></script>\r\n\t\t\t\t\t<script src=\"'.JURI::Root().'modules/'.$modulename.'/admin/js/radio-group.min.js\" type=\"text/javascript\"></script>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<script src=\"'.JURI::Root().'modules/'.$modulename.'/admin/js/jufilter.min.js\" type=\"text/javascript\"></script>\r\n\t\t\t\t\t<script src=\"'.JURI::Root().'modules/'.$modulename.'/admin/js/jugroup.min.js\" type=\"text/javascript\"></script>\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tJU_jQuery(document).ready(function (){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tJU_jQuery(\\'#module-form select\\').chosen({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisable_search_threshold : 10,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tallow_single_deselect : true\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}).change(function(){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(typeof(validate) == \\'function\\') {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalidate();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} catch(e) {}\r\n\t\t\t\t\t\twindow.addEvent(\\'domready\\', function() {\r\n\t\t\t\t\t\t\t\t\t$$(\\'.hasTip\\').each(function(el) {\r\n\t\t\t\t\t\t\t\t\t\tvar title = el.get(\\'title\\');\r\n\t\t\t\t\t\t\t\t\t\tif (title) {\r\n\t\t\t\t\t\t\t\t\t\t\tvar parts = title.split(\\'::\\', 2);\r\n\t\t\t\t\t\t\t\t\t\t\tel.store(\\'tip:title\\', parts[0]);\r\n\t\t\t\t\t\t\t\t\t\t\tel.store(\\'tip:text\\', parts[1]);\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\t\t\t\t\t\t\t\t\tvar JTooltips = new Tips($$(\\'.hasTip\\'), { maxTitleChars: 50, fixed: false});\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJU_jQuery(\"#\"+layoutsettings_holder+\" .jugroup\").jugroup();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tJU_jQuery(\"#\"+layoutsettings_holder+\" .jufilter\").jufilter();\r\n\t\t\t\t\t</script>\r\n\t\t\t\t</head>\r\n\t\t\t\t<body>';\r\n\t\t\r\n\t\t$html .= \"<ul class='adminformlist'>\";\r\n\t\t//Theme select list\r\n\t\tif (count($themes)) {\r\n\t\t\t$html .= \"<li>\";\r\n\t\t\t$html .= \"<label id=\\\"jform_params_layout_theme-lbl\\\" for=\\\"jform_params_layout_theme\\\" class=\\\"hasTip\\\" title=\\\"\".JText::_(\"LAYOUT_THEME\").\"::\".JText::_(\"LAYOUT_THEME_DESC\").\"\\\">\".JText::_(\"LAYOUT_THEME\").\"</label>\";\r\n\t\t\t$html .= JHTML::_('select.genericlist', $themes, 'jform[params][layout_theme]', 'class=\"inputbox\" size=\"1\";\"', '', '',(!empty($layoutsettings)) ? $layoutsettings->layout_theme : '', 'jform_params_layout_theme' );\r\n\t\t\t$html .= \"</li>\";\r\n\t\t}\r\n\t\t\r\n\t\tif (JFile::exists($xml_params)) {\r\n\t\t\tjimport( 'joomla.form.form' );\r\n\t\t\t$options = array(\"control\" => \"jform\");\r\n\t\t\t$paramsForm = JForm::getInstance('jform', $xml_params, $options);\r\n\t\t\t// bind ini data\r\n\t\t\tif (!empty($layoutsettings)){\r\n\t\t\t\t$paramsForm->bind(array('params'=>$layoutsettings));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Only load filesets named 'params' from params xml file\r\n\t\t\t$fieldSets = $paramsForm->getFieldsets('params');\r\n\t\t\t\r\n\t\t\tforeach ($fieldSets as $name => $fieldSet) {\r\n\t\t\t\tif (isset($fieldSet->description) && trim($fieldSet->description)){\r\n\t\t\t\t\t$html .= '<p class=\"tip\">'.JText::_($fieldSet->description).'</p>';\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t$hidden_fields = '';\r\n\t\t\t\tforeach ($paramsForm->getFieldset($name) as $field){\r\n\t\t\t\t\tif (!$field->hidden){ \r\n\t\t\t\t\t\t$html .= \"<li>\";\r\n\t\t\t\t\t\t$html .= $field->label;\r\n\t\t\t\t\t\t$html .= $field->input;\r\n\t\t\t\t\t\t$html .= \"</li>\";\r\n\t\t\t\t\t}else { \r\n\t\t\t\t\t\t$hidden_fields.= $field->input;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$html .= $hidden_fields; \r\n\t\t\t}\r\n\t\t}\r\n\t\t$html .= \"</ul>\r\n\t\t\t\t</body>\";\r\n\t\t\r\n\t\tif(!count($themes) && !count($fieldSets)) {\r\n\t\t\t$html = '';\r\n\t\t}\r\n\t\t\r\n\t\t$data['success'] = 1;\r\n\t\t$data['layoutsetting'] = $html;\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "4c7b44a036097fe11d7a36d0906efaff", "score": "0.6114697", "text": "protected function __setDefaultLayout()\r\n {\r\n \t$this->layout['name'] \t\t= 'Default layout '.$this->moduleName;\r\n $this->layout['layout'] \t= '<div class=\"module'.str_replace(' ','_',$this->moduleName).'\"></div>';\r\n $this->layout['settings']\t= array();\r\n $settings = json_encode(array());\r\n\t\t$pQuery = \"INSERT INTO modulelayouts (`modulelayout_module_id`,`modulelayout_name`,`modulelayout`,`modulelayout_settings`,`modulelayout_default`) values \r\n\t\t\t\t ('\".$this->moduleID.\"','Default layout \".$this->moduleName.\"','\".$this->__encodeTags('<div class=\"module'.str_replace(' ','_',$this->moduleName).'\"></div>').\"','\".$settings.\"',1)\";\r\n\t\t$this->layout['id'] = $this->_db->insert_sql($pQuery);\r\n }", "title": "" }, { "docid": "d12d31e14c0d7a84c2c13128dd0abefe", "score": "0.60909814", "text": "public function beforeAction(){\n\n App::$config->pageLayouts = 'cmlayouts/column1';\n\n }", "title": "" }, { "docid": "c918262707083a0b1fc0eb4af70779d4", "score": "0.60847527", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n //share the config option to all the views\n View::share('admin', Config::get('admin::site_config'));\n }", "title": "" }, { "docid": "b33b639c1ec86541f9df47b88aa9d011", "score": "0.6028053", "text": "public function setLayout($path);", "title": "" }, { "docid": "d286fcf4266990e54d686e18e6f433ad", "score": "0.5963882", "text": "protected function _fixLayout()\n {\n // convenience variable\n $format = $this->_format;\n \n // \"no format\" means \"use the default layout\"\n if (! $format) {\n $this->_layout = $this->_layout_default;\n return;\n }\n \n // no format => layout mapping means no layout\n if (empty($this->_format_layout[$format])) {\n $this->_layout = null;\n return;\n }\n \n // use the default, or a specific one?\n $layout = $this->_format_layout[$format];\n if ($layout === true) {\n // use the default\n $this->_layout = $this->_layout_default;\n } else {\n // use a specific layout\n $this->_layout = $layout;\n }\n }", "title": "" }, { "docid": "472b97bb4387fbcc35ed4748e2ee37c3", "score": "0.5952849", "text": "function checkCategoriesParamsLayout()\r\n\t{\r\n\t\t// if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkCategoriesParamsLayout', '0'))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$table = '#__tienda_categories';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"category_params\";\r\n\t\t$definitions[\"category_params\"] = \"text\";\r\n\r\n\t\t$fields[] = \"category_layout\";\r\n\t\t$definitions[\"category_layout\"] = \"varchar(255) DEFAULT '' COMMENT 'The layout file for this category'\";\r\n\r\n\t\t$fields[] = \"categoryproducts_layout\";\r\n\t\t$definitions[\"categoryproducts_layout\"] = \"varchar(255) DEFAULT '' COMMENT 'The layout file for all products in this category'\";\r\n\r\n\t\tif ($this->insertTableFields( $table, $fields, $definitions ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkCategoriesParamsLayout') );\r\n\t\t\t$config->config_name = 'checkCategoriesParamsLayout';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "215353b6898430ac5d70a78ce5551e6b", "score": "0.5905197", "text": "abstract public function readLayouts ();", "title": "" }, { "docid": "87dcf1930be5186aea2365de12d4a04b", "score": "0.5876133", "text": "protected static function updateLayoutViews()\n {\n // copy layouts folder\n static::copyDirectory('resources/views/layouts', resource_path('views/layouts'));\n }", "title": "" }, { "docid": "4f115348e1431f2da4dc47004d6736ed", "score": "0.58731765", "text": "protected function loadLayoutSetup($pageId) {\n\n\t\t// Load page TSconfig.\n\t\t$BEfunc = t3lib_div::makeInstance('t3lib_BEfunc');\n\t\t$pageTSconfig = $BEfunc->getPagesTSconfig($pageId);\n\n\t\t$excludeLayoutIds = isset($pageTSconfig['tx_gridelements.']['excludeLayoutIds'])\n\t\t\t? t3lib_div::trimExplode(',', $pageTSconfig['tx_gridelements.']['excludeLayoutIds'])\n\t\t\t: array();\n\n\t\t$overruleRecords = (isset($pageTSconfig['tx_gridelements.']['overruleRecords']) && $pageTSconfig['tx_gridelements.']['overruleRecords'] == '1');\n\n\t\t$gridLayoutConfig = array();\n\n\t\tif (isset($pageTSconfig['tx_gridelements.'])) {\n\n\t\t\tforeach ($pageTSconfig['tx_gridelements.']['setup.'] as $layoutId => $item) {\n\t\t\t\t// remove tailing dot of layout ID\n\t\t\t\t$layoutId = substr($layoutId, 0, -1);\n\n\t\t\t\t// Continue if layout is excluded.\n\t\t\t\tif (in_array($layoutId, $excludeLayoutIds)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Parse icon path for records.\n\t\t\t\tif($item['icon']) {\n\t\t\t\t\t$icons = t3lib_div::trimExplode(',', $item['icon']);\n\t\t\t\t\tforeach($icons as &$icon) {\n\t\t\t\t\t\tif (strpos($icon, 'EXT:') === 0) {\n\t\t\t\t\t\t\t$icon = str_replace(PATH_site, '../', t3lib_div::getFileAbsFileName($icon));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$item['icon'] = $icons;\n\t\t\t\t}\n\n\t\t\t\t// remove tailing dot of config\n\t\t\t\tif (isset($item['config.'])) {\n\t\t\t\t\t$item['config'] = $item['config.'];\n\t\t\t\t\tunset($item['config.']);\n\t\t\t\t}\n\n\t\t\t\t// Change topLevelLayout to top_level_layout.\n\t\t\t\t$item['top_level_layout'] = $item['topLevelLayout'];\n\t\t\t\tunset($item['topLevelLayout']);\n\n\t\t\t\t// Change flexformDS to pi_flexform_ds.\n\t\t\t\t$item['pi_flexform_ds'] = $item['flexformDS'];\n\t\t\t\tunset($item['flexformDS']);\n\n\t\t\t\t$gridLayoutConfig[$layoutId] = $item;\n\n\t\t\t}\n\t\t}\n\n\t\t// Load records.\n\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n//\t\t\t'uid, title, description, frame, icon, config, pi_flexform_ds',\n\t\t\t'*',\n\t\t\t'tx_gridelements_backend_layout',\n\t\t\t'NOT hidden AND NOT deleted',\n\t\t\t'',\n\t\t\t'sorting ASC',\n\t\t\t'',\n\t\t\t'uid'\n\t\t);\n\n\t\t$gridLayoutRecords = array();\n\n\t\tforeach ($result as $layoutId => $item) {\n\n\t\t\t// Continue if layout is excluded.\n\t\t\tif (in_array($layoutId, $excludeLayoutIds)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Prepend icon path for records.\n\t\t\tif($item['icon']) {\n\t\t\t\t$icons = t3lib_div::trimExplode(',', $item['icon']);\n\t\t\t\tforeach($icons as &$icon) {\n\t\t\t\t\t$icon = '../' . $GLOBALS['TCA']['tx_gridelements_backend_layout']['ctrl']['selicon_field_path'] . '/' . htmlspecialchars($icon);\n\t\t\t\t}\n\t\t\t\t$item['icon'] = $icons;\n\t\t\t}\n\n\t\t\t// parse config\n\t\t\tif ($item['config']) {\n\t\t\t\t$parser = t3lib_div::makeInstance('t3lib_TSparser');\n\t\t\t\t$parser->parse($item['config']);\n\t\t\t\tif (isset($parser->setup['backend_layout.'])) {\n\t\t\t\t\t$item['config'] = $parser->setup['backend_layout.'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$gridLayoutRecords[$layoutId] = $item;\n\n\t\t}\n\n\t\tif ($overruleRecords === TRUE) {\n\t\t\t$this->layoutSetup = t3lib_div::array_merge_recursive_overrule($gridLayoutConfig, $gridLayoutRecords);\n\t\t} else {\n\t\t\t$this->layoutSetup = t3lib_div::array_merge_recursive_overrule($gridLayoutRecords, $gridLayoutConfig);\n\t\t}\n\n\t}", "title": "" }, { "docid": "bd9f3c30a97f65d204fb5e9a5fb86768", "score": "0.58700347", "text": "public function setupLayout()\n {\n $this->layout = viewResolver()->getLayout();\n }", "title": "" }, { "docid": "f167aa89dec668ceb207c821613d5bd1", "score": "0.58577317", "text": "private function initLayout($view) \n {\n $layout = $this->config->item('layout');\n \n foreach ( $layout as $key => $value )\n {\n $this->layout[$key]['directory'] = $value['directory']; \n $this->layout[$key]['main'] = $value['directory'] . $value['main']; \n \n foreach ( $value['items'] as $k => $val )\n {\n if ( $val == 'content' )\n {\n if( file_exists(MODULEPATH . $this->module . '\\\\' . 'views\\\\' . $view . EXT) )\n {\n $this->layout[$key]['items'][$val] = $view; \n }\n else\n {\n $this->layout[$key]['items'][$val] = $value['directory'] . $view;\n }\n }\n else\n {\n $this->layout[$key]['items'][$val] = $value['directory'] . $val;\n }\n }\n }\n \n return $this;\n }", "title": "" }, { "docid": "e42f5bb3bb2cf6156fa112e3dba1ce2c", "score": "0.58568597", "text": "public function layoutsAction($args = array()) {\n Rpd::a('menu', array('layoutActive' => true, 'layoutsActive' => true));\n\n $tpl_ext = Rpd::$c['raintpl']['tpl_ext'];\n Rpd::a('tpl_ext', $tpl_ext);\n if ( '' == $args[0] ) {\n // List layouts\n $tpl_dir = Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts';\n $scan = array_diff(scandir($tpl_dir), array('.', '..'));\n $layoutArray = array();\n foreach ( $scan as $key => $item ) {\n if ( is_file($tpl_dir . DIRECTORY_SEPARATOR . $item) && 'layout.' == substr($item, 0, 7) && '.' . $tpl_ext == substr($item, (strlen(Rpd::$c['raintpl']['tpl_ext'])+1)*-1) ) {\n if ( Rpd::$c['rapid']['editAdmin'] || ( !Rpd::$c['rapid']['editAdmin'] && strtolower($item) != 'layout.administrator.' . $tpl_ext ) )\n $layoutArray[] = array(\n 'name' => $item,\n 'last_modified' => date('Y-m-d H:i:s', filemtime($tpl_dir . DIRECTORY_SEPARATOR . $item)),\n 'writable' => is_writable($tpl_dir . DIRECTORY_SEPARATOR . $item)\n );\n }\n }\n \n $items = 30;\n $start = ( 0 <= intval($args['start']) && count($layoutArray) > intval($args['start']) ? intval($args['start']) : 0 );\n if ( ($start + $items) < count($layoutArray) ) Rpd::a('nextStart', ($start + $items));\n foreach ( $layoutArray as $key => $item ) if ( $start > $key || ($start + $items) <= $key ) unset($layoutArray[$key]);\n if ( ($start - $items) > -1 ) Rpd::a('prevStart', ($start - $items));\n Rpd::a('page', ($start + $items) / $items);\n \n if ( 0 < count($layoutArray) ) Rpd::a('layouts', $layoutArray);\n } else if ( 'add' == $args[0] ) {\n // Add new layout\n if ( 'save' == $args[1] && Rpd::rq($_POST['layout']) ) {\n if ( Rpd::nE($_POST['layout']['filename']) && Rpd::nE($_POST['layout']['content']) && -1 < strpos($_POST['layout']['content'], '{$APPLICATION_CONTENT}') ) {\n $filename = $_POST['layout']['filename'];\n $content = $_POST['layout']['content'];\n $created = array();\n if ( Rpd::rq($_POST['layout']['allLanguage']) ) $languages = Rpd::gC();\n else $languages = array(Rapid::$culture);\n foreach ( $languages as $language )\n if ( !is_file(Rpd::$c['raintpl']['tpl_dir'] . $language . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . 'layout.' . $filename . '.' . Rpd::$c['raintpl']['tpl_ext']) )\n if ( @file_put_contents(Rpd::$c['raintpl']['tpl_dir'] . $language . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . 'layout.' . $filename . '.' . Rpd::$c['raintpl']['tpl_ext'], $content) )\n $created[] = $language;\n if ( is_file(Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . 'layout.' . $filename . '.' . Rpd::$c['raintpl']['tpl_ext']) )\n Rpd::a('success', \"The Layout is stored correctly.#text#\", array(( 0 < count($created) ? ' Layouts created for ' . count($created) . ' language(s).' : '' )));\n else Rpd::a('error', \"Something went wrong while saving the Layout. Probably permission denied on layouts directory (#text#). Layout does not saved.\", array(Rpd::$c['raintpl']['tpl_dir']));\n $this->layoutsAction();\n } else {\n Rpd::a('error', \"You not filled the name or content field or the content does not contain the {\\$APPLICATION_CONTENT} variable.\");\n Rpd::a('layout', $_POST['layout']);\n AdministratorController::$template = 'layout.add';\n }\n } else {\n Rpd::a('tpl_ext', Rpd::$c['raintpl']['tpl_ext']);\n AdministratorController::$template = 'layout.add';\n }\n } else if ( 'edit' == $args[0] && Rpd::rq($args['filename']) ) {\n // Edit layout\n $tpl_dir = Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts';\n $tpl_ext = Rpd::$c['raintpl']['tpl_ext'];\n $scan = array_diff(scandir($tpl_dir), array('.', '..'));\n $layoutArray = array();\n foreach ( $scan as $key => $item ) {\n if ( is_file($tpl_dir . DIRECTORY_SEPARATOR . $item) && 'layout.' == substr($item, 0, 7) && '.' . $tpl_ext == substr($item, (strlen(Rpd::$c['raintpl']['tpl_ext'])+1)*-1) ) {\n if ( Rpd::$c['rapid']['editAdmin'] || ( !Rpd::$c['rapid']['editAdmin'] && strtolower($item) != 'layout.administrator.' . $tpl_ext ) )\n $layoutArray[] = array(\n 'filename' => $item,\n 'last_modified' => date('Y-m-d H:i:s', filemtime($tpl_dir . DIRECTORY_SEPARATOR . $item)),\n 'writable' => is_writable($tpl_dir . DIRECTORY_SEPARATOR . $item)\n );\n }\n }\n if ( 0 < count($layoutArray) ) Rpd::a('otherLayouts', $layoutArray);\n\n $filename = $args['filename'];\n Rpd::a('filename', $filename);\n if ( 'save' != $args[1] ) {\n $content = htmlentities(@file_get_contents(Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $filename), ENT_QUOTES, \"UTF-8\");\n Rpd::a('layout', array(\n 'content' => $content,\n 'writable' => is_writable(Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $filename),\n 'last_modified' => date('Y-m-d H:i:s', filemtime(Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $filename))\n ));\n AdministratorController::$template = 'layout.edit';\n } else {\n // AJaX call\n if ( Rpd::nE($_POST['layout']['content']) && -1 < strpos($_POST['layout']['content'], '{$APPLICATION_CONTENT}') ) {\n $content = $_POST['layout']['content'];\n if ( @file_put_contents(Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $filename, $content) )\n return json_encode(array('success' => \"The Layout is updated correctly.\"));\n else return json_encode(array('error' => Rpd::t(\"Something went wrong while saving the Layout. Probably permission denied on templates directory (#text#) or the file already exists (#text#). Layout does not saved.\", array(Rpd::$c['raintpl']['tpl_dir'], $filename))));\n } else return json_encode(array('error' => \"You not filled the name or content field or the content does not contain the {\\$APPLICATION_CONTENT} variable.\"));\n }\n } else if ( 'remove' == $args[0] && Rpd::rq($args['filename']) ) {\n $filename = $args['filename'];\n if ( !@unlink(Rpd::$c['raintpl']['tpl_dir'] . Rapid::$culture . DIRECTORY_SEPARATOR . 'layouts' . DIRECTORY_SEPARATOR . $filename) )\n Rpd::a('error', \"Something went wrong while trying to remove the Layout file (<em>layout.#text#.#text#</em>). Try to remove manually.\", array($layout, Rpd::$c['raintpl']['tpl_ext']));\n else {\n @AdministratorModell::removeAllLinkedLayout($filename);\n Rpd::a('success', \"The selected Layout was removed.\");\n }\n $this->layoutsAction();\n } else $this->layoutsAction();\n }", "title": "" }, { "docid": "4973c5590dd951f4e0338a3ba79ac4d2", "score": "0.5783488", "text": "public static function createLayouts()\n {\n $dbLayouts = self::lists('code', 'code');\n\n $definitions = MailManager::instance()->listRegisteredLayouts();\n foreach ($definitions as $code => $path) {\n if (array_key_exists($code, $dbLayouts)) {\n continue;\n }\n\n $layout = new static;\n $layout->code = $code;\n $layout->is_locked = true;\n $layout->fillFromView($path);\n $layout->save();\n }\n }", "title": "" }, { "docid": "42ba5eb8af7c74f46c6cac4e52243441", "score": "0.57493365", "text": "public function setLayout($layout);", "title": "" }, { "docid": "7bddecc4f2c256e70d943bd9fe9d0f4f", "score": "0.5723472", "text": "private function loadDefaultLayout()\n {\n if (! $this->isLayoutLoaded) {\n $this->layout->getUpdate()->load(['default']);\n $this->layout->generateXml();\n $this->layout->generateElements();\n $this->isLayoutLoaded = true;\n }\n }", "title": "" }, { "docid": "11a9ee46556c02734cb0be7ae83279fc", "score": "0.5714964", "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\n\t\t$this->user = Sentry::getUser();\n\t\tView::share('view_mode', $this->mode);\n\t\tView::share('user', $this->user);\n\t\t\n\t\tif($this->mode == 'admin') {\n\n\t\t\t$this->admin_data();\n\t\t\t\n\t\t} else if($this->mode == 'employer') {\n\t\t\t\n\t\t\t$this->employer_data();\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$this->home_data();\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "47f21830ccf8f2834e571a8b14cf161f", "score": "0.5714906", "text": "function checkProductsParamsLayout()\r\n\t{\r\n\t\t// if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkProductsParamsLayout', '0'))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$table = '#__tienda_products';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"product_params\";\r\n\t\t$definitions[\"product_params\"] = \"text\";\r\n\r\n\t\t$fields[] = \"product_layout\";\r\n\t\t$definitions[\"product_layout\"] = \"varchar(255) DEFAULT '' COMMENT 'The layout file for this product'\";\r\n\r\n\t\tif ($this->insertTableFields( $table, $fields, $definitions ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkProductsParamsLayout') );\r\n\t\t\t$config->config_name = 'checkProductsParamsLayout';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "e0009eb89264f594cf5e2f485f4cf8a4", "score": "0.5710808", "text": "function set_layout($layout) {\n $this->layout = $layout;\n }", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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.56921786", "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": "8e8d6809bd846c6d0b38ad3ffe38cb55", "score": "0.56872755", "text": "private function fail_on_load_default_layout(){\n __show_dev_messages__(\"Problema al cargar el Default Layout\",\n \"No se ha podido cargar el layout por defecto, probablemente no este con el nombre que se ha configurado o no exista.\",\n ROOT . \"Views/Layouts/\" . $this->layout . '.php');\n }", "title": "" }, { "docid": "5b8100b8eaa3ad0e1629d63ef904aa57", "score": "0.5686258", "text": "protected function _load_layout($layout = self::LAYOUT) {\n $layout = 'bare' === $layout ? 'bare' : OUP_SITE_LAYOUT; // Was: 'ouice_2';\n\n $this->load->library('Layout', array('layout'=>\"site_layout/layout_$layout\"));\n }", "title": "" }, { "docid": "820c5e670016eff95c327bb281932478", "score": "0.56861997", "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": "820c5e670016eff95c327bb281932478", "score": "0.56861997", "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": "b57a456041175ac594dbdd3a274359b1", "score": "0.56701505", "text": "function missingLayout($params) {\n\t\textract($params, EXTR_OVERWRITE);\n\n\t\t$this->controller->layout = 'default';\n\t\t$this->controller->set(array(\n\t\t\t'file' => $file,\n\t\t\t'title' => __('Missing Layout', true)\n\t\t));\n\t\t$this->_outputMessage('missingLayout');\n\t}", "title": "" }, { "docid": "7c8be9497c0b420f96fd83a9fda13186", "score": "0.5665071", "text": "protected function setupLayout()\n\t{\n\t\t// Add correct theme if you are on the admin portion of the pages.\n\t\tif (strstr(Route::getCurrentRoute()->getPath(), '/', 1) == 'admin') {\n\t\t\t$this->layout = 'layouts.admin';\n\t\t}\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->layout->siteName = $this->siteName;\n\t}", "title": "" }, { "docid": "ec7533081f0cc97e466df3187a833d26", "score": "0.5656748", "text": "public function setLayout($layout){\n\t$this->_layout = $layout;\n\n}", "title": "" }, { "docid": "e4b2e19125414f15577ae98f563ca7de", "score": "0.5643447", "text": "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "a97c764aa681a4f601001e26e502a219", "score": "0.56389594", "text": "public function testUpdateDashboardLayout()\n {\n }", "title": "" }, { "docid": "7e6b6f824a76c2445b120583801cb06e", "score": "0.5637075", "text": "protected function importLayoutImages_updateLayout(){\r\n\t\t\r\n\t\treturn(false);\r\n\t}", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.5635909", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "0cddebe4c0d08ea13b328f04417b0587", "score": "0.56215125", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "0cddebe4c0d08ea13b328f04417b0587", "score": "0.56215125", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f74ccb6a3e0a730aa8611374bcf2ad02", "score": "0.5617917", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout) ) {\n $this->layout = $this->viewFactory->make($this->layout);\n }\n }", "title": "" }, { "docid": "10d6b966c1690a66ef0c4b8dd8a9f268", "score": "0.5615277", "text": "public function setLayout($layout) {\n\t\t// Does this layout exist?\n\t\tif (! file_exists(PATH_LAYOUT . $layout . '.phtml')) {\n\t\t\tthrow new Exception('Layout does not exist.');\n\t\t}\n\n\t\t// The layout exists, so set it\n\t\t$this->view->layout = $layout;\n\t}", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.5612146", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.5612146", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.5612146", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "495bf55dcff2a797083766a3e711666e", "score": "0.5609476", "text": "public function setLayout(Request $request)\n\t{\n\t\t$request->validate([\n\t\t\t'layout' => 'required|string',\n\t\t]);\n\n\t\treturn (Configs::set('layout', $request['layout'])) ? 'true' : 'false';\n\t}", "title": "" }, { "docid": "aec837361d3f87afafbfb5cfa27aed19", "score": "0.5605393", "text": "protected function __getLayoutData()\r\n {\r\n \t$this->layout = array();\r\n \t$this->oLayouts = array();\r\n\t\t$pQuery = \"SELECT * FROM modulelayouts WHERE modulelayout_module_id = \".$this->moduleID;\r\n\t\t$pResults = $this->_db->select($pQuery);\r\n\t\twhile($pRow=$this->_db->get_row($pResults, 'MYSQL_ASSOC')) \r\n\t\t{\r\n\t\t\t$id \t\t\t\t\t= isset($pRow['modulelayout_id'])?$pRow['modulelayout_id']:count($this->oLayouts);\r\n\t\t\t$layout\t\t\t\t\t= array();\r\n\t \t$layout['id'] \t\t\t= isset($pRow['modulelayout_id'])?$pRow['modulelayout_id']:null;\r\n\t\t\t$layout['name'] \t\t= isset($pRow['modulelayout_name'])?$pRow['modulelayout_name']:null;\r\n\t $layout['layout'] \t\t= isset($pRow['modulelayout'])?$this->__decodeTags($pRow['modulelayout']):null;\r\n\t $layout['settings']\t\t= isset($pRow['modulelayout_settings'])?json_decode($pRow['modulelayout_settings'],true):array();\r\n\t $layout['layout_js']\t= isset($pRow['modulelayout_js'])?$this->__decodeTags($pRow['modulelayout_js']):null;\r\n\t $layout['layout_css'] \t= isset($pRow['modulelayout_css'])?$this->__decodeTags($pRow['modulelayout_css']):null;\r\n\t if (isset($pRow['modulelayout_default']) && ($pRow['modulelayout_default'] == 1))\r\n\t \t$this->layout = $layout;\r\n\t else \r\n\t \t$this->oLayouts[$id] = $layout;\r\n\t\t}\r\n\t\tif (empty($this->layout))\r\n\t\t\t$this->layout = array_shift($this->oLayouts);\r\n\t\treturn (!empty($this->layout));\r\n }", "title": "" }, { "docid": "0e3fd30aa49f1057d8aa2055b4c05c1a", "score": "0.56037956", "text": "public function set_layout($value)\n {\n $this->sLayout = \"layout_$value\";\n $this->sPathLayout = $this->sThemeFolderDs.$this->sLayout;\n $this->sPathLayoutDs = $this->sPathLayout.TFW_DS;\n }", "title": "" }, { "docid": "ec0efd22cec2f2b2af4821e6cc2bf0e0", "score": "0.5602893", "text": "public function setLayout(string $layout): void {\n $this->layout = APP_TPL_LAYOUTS_PATH . $layout . '.php';\n }", "title": "" }, { "docid": "9f27c9836c0ef8a4b0503040cc17fa0a", "score": "0.560119", "text": "protected function updateElementorLayoutAfterImport(){\r\n\t\t\r\n\t\tif(empty($this->arrLayoutContent))\r\n\t\t\treturn(false);\r\n\t\t\r\n\t\t$this->arrLayoutContent = $this->runOverLayoutImages($this->arrLayoutContent, array($this,\"modifyLayoutImage\"));\r\n\t\t\r\n\t\t//update layout in db\r\n\t\t$this->updateElementorLayoutInDB($this->arrLayoutContent);\r\n\t}", "title": "" }, { "docid": "54dd9d68b1bae627e03d175c5d72c3e1", "score": "0.55999756", "text": "public function layout($layoutName, $data = array())\n {\n if(! in_array($layoutName ,$this->layouts)) {\n array_unshift($this->layouts ,$layoutName);\n $this->layoutdata = array_merge($this->layoutdata ,$data);\n }\n \n }", "title": "" }, { "docid": "7a3fae8b5290d24eddef0ed50c232373", "score": "0.5575293", "text": "protected function setupLayout()\n\t{\n\t\tif(Route::getCurrentRoute()->getPrefix() == 'kiadmin')\n\t\t{\n\t\t\tif ( ! is_null($this->layout))\n\t\t\t{\n\t\t\t\t$this->layout = View::make($this->layout_admin);\n\t\t\t\t$this->layout->meta = View::make($this->meta_admin);\n\t\t\t\t$this->layout->meta->title = 'KiLaravel CMS'; \n\t\t\t\t$this->layout->header = View::make($this->header_admin);\n\t\t\t\t$this->layout->sidebar = View::make($this->sidebar_admin);\n\t\t\t\t$this->layout->footer = View::make($this->footer_admin);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( ! is_null($this->layout))\n\t\t\t{\n\t\t\t\t$this->layout = View::make($this->layout);\n\t\t\t\t$this->layout->meta = View::make($this->meta);\n\t\t\t\t$this->layout->meta->title = 'KiLaravel'; \n\t\t\t\t$this->layout->header = View::make($this->header);\n\t\t\t\t$this->layout->sidebar = View::make($this->sidebar);\n\t\t\t\t$this->layout->footer = View::make($this->footer);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bce346fbdd1200d0f0fcc5b892628089", "score": "0.55744255", "text": "function show_layouts_list($is_layout_special)\n\t{\n\t\tglobal $db, $class_form, $template, $theme, $lang;\n\n\t\t$template->assign_block_vars('layout', array());\n\n\t\t$l_rows = $this->get_layouts_list();\n\t\t$l_count = sizeof($l_rows);\n\n\t\t$default_portal_id = 0;\n\t\tif (!$is_layout_special)\n\t\t{\n\t\t\t$sql = \"SELECT config_value FROM \" . $this->tables['block_config_table'] . \" WHERE bid = '0' AND config_name = 'default_portal'\";\n\t\t\t$result = $db->sql_query($sql);\n\t\t\t$c_row = $db->sql_fetchrow($result);\n\t\t\t$db->sql_freeresult($result);\n\t\t\t$default_portal_id = $c_row['config_value'];\n\t\t}\n\n\t\t$row_class = '';\n\t\tfor($i = 0; $i < $l_count; $i++)\n\t\t{\n\t\t\t$row_class = ip_zebra_rows($row_class);\n\t\t\t$layout_id = $l_rows[$i][$this->field_name];\n\t\t\t$layout_name = ($is_layout_special ? (isset($lang['auth_view_' . $l_rows[$i]['name']]) ? $lang['auth_view_' . $l_rows[$i]['name']] : (isset($lang['cms_page_name_' . strtolower($l_rows[$i]['name'])]) ? $lang['cms_page_name_' . strtolower($l_rows[$i]['name'])] : ucfirst($l_rows[$i]['name']))) : ucfirst($l_rows[$i]['name']));\n\t\t\t//$layout_name = htmlspecialchars($layout_name);\n\t\t\t$layout_filename = $l_rows[$i]['filename'];\n\t\t\t$layout_preview = ($is_layout_special ? (empty($layout_filename) ? '#' : append_sid($layout_filename)) : (empty($layout_filename) ? (CMS_PAGE_HOME . '?page=' . $layout_id) : append_sid($layout_filename)));\n\t\t\t$layout_locked = false;\n\n\t\t\t$select_name = 'auth_view_' . $layout_id;\n\t\t\t$default = $l_rows[$i]['view'];\n\t\t\t$select_js = '';\n\n\t\t\tif ($is_layout_special)\n\t\t\t{\n\t\t\t\t$layout_locked = !empty($l_rows[$i]['locked']) ? true : false;\n\t\t\t\t$options_array = array(AUTH_ALL, AUTH_REG, AUTH_MOD, AUTH_ADMIN);\n\t\t\t\t$options_langs_array = array($lang['B_ALL'], $lang['B_REG'], $lang['B_MOD'], $lang['B_ADMIN']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$options_array = array(0, 1, 2, 3, 4);\n\t\t\t\t$options_langs_array = array($lang['B_ALL'], $lang['B_GUESTS'], $lang['B_REG'], $lang['B_MOD'], $lang['B_ADMIN']);\n\t\t\t}\n\n\t\t\t$auth_view_select_box = $class_form->build_select_box($select_name, $default, $options_array, $options_langs_array, $select_js);\n\n\t\t\t$template->assign_block_vars('layout.l_row', array(\n\t\t\t\t'ROW_CLASS' => $row_class,\n\t\t\t\t'ROW_DEFAULT_STYLE' => ($layout_id == $default_portal_id) ? 'font-weight: bold;' : '',\n\t\t\t\t'LAYOUT_ID' => $layout_id,\n\t\t\t\t'LAYOUT_NAME' => $layout_name,\n\t\t\t\t'LAYOUT_FILENAME' => (empty($layout_filename) ? $lang['None'] : htmlspecialchars($layout_filename)),\n\t\t\t\t'LAYOUT_BLOCKS' => $this->count_blocks_in_layout('\\'' . $layout_id . '\\'', $is_layout_special, true) . '/' . $this->count_blocks_in_layout('\\'' . $layout_id . '\\'', $is_layout_special, false),\n\t\t\t\t'LAYOUT_TEMPLATE' => $l_rows[$i]['template'],\n\n\t\t\t\t'LOCKED' => $layout_locked,\n\t\t\t\t'PAGE_AUTH' => $auth_view_select_box,\n\t\t\t\t'GB_CHECKED' => ($l_rows[$i]['global_blocks']) ? ' checked=\"checked\"' : '',\n\t\t\t\t'BC_CHECKED' => ($l_rows[$i]['page_nav']) ? ' checked=\"checked\"' : '',\n\n\t\t\t\t'U_PREVIEW_LAYOUT' => $layout_preview,\n\t\t\t\t'U_EDIT_LAYOUT' => append_sid($this->root . '?mode=' . $this->mode . '&amp;' . $this->id_var_name . '=' . $layout_id . '&amp;action=edit'),\n\t\t\t\t'U_EDIT_AUTH' => append_sid($this->root . '?mode=auth&amp;pmode=setting_cms_user_local&amp;id_type=' . ($is_layout_special ? 'layout_special' : 'layout') . '&amp;forum_id[]=' . $layout_id),\n\t\t\t\t'U_DELETE_LAYOUT' => append_sid($this->root . '?mode=' . $this->mode . '&amp;' . $this->id_var_name . '=' . $layout_id . '&amp;action=delete'),\n\t\t\t\t'U_LAYOUT' => append_sid($this->root . '?mode=' . $this->mode_blocks_name . '&amp;' . $this->id_var_name . '=' . $layout_id),\n\t\t\t\t'U_COPY' => $is_layout_special ? '' : append_sid($this->root . '?mode=' . $this->mode . '&amp;' . $this->id_var_name . '=' . $layout_id . '&amp;action=clone'),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d18539b1ef18ad96b3449b7591154b09", "score": "0.55625486", "text": "public function beforeSet()\n {\n\t\t\n\t\t$layoutid = $this->getProperty('id');\n\t\tif (empty($layoutid)) {\n $this->addFieldError('id',$this->modx->lexicon('formdatamanager_layout_err_ns'));\n } else {\n if (!$this->doesAlreadyExist(array('id' => $layoutid))) {\n $this->addFieldError('id',$this->modx->lexicon('formdatamanager_layout_err_nf'));\n }\n }\t\n\t\t\n\t\t$this->setProperty('inactive',$this->getProperty('inactive'));\n\n return parent::beforeSet();\n }", "title": "" }, { "docid": "73b81067562961cb4c5bdc783a592317", "score": "0.5553335", "text": "protected function enableLayouts($path) {\n // Save the current user to re-login after Layout Builder changes.\n $user = $this->loggedInUser;\n $this->loginLayoutAdmin();\n $page = $this->getSession()->getPage();\n $this->drupalGet($path);\n $page->checkField('layout[enabled]');\n $page->checkField('layout[allow_custom]');\n $page->pressButton('Save');\n $this->drupalLogin($user);\n }", "title": "" }, { "docid": "ebb839703e7f8b5c745893b1448dd439", "score": "0.5547757", "text": "protected function setupLayout()\n {\n if ( !is_null( $this->layout ) ) {\n $this->layout = View::make( $this->layout );\n }\n }", "title": "" }, { "docid": "6ffa9679b54213a2748c450d59ead63f", "score": "0.55461913", "text": "public function loadLayout() {\n if ($this->layout):\n try {\n $layoutFile = ROOT . DS . APPS . DS . LAYOUT . DS . $this->layoutFile . '.phtml';\n if (!file_exists($layoutFile)):\n throw new Exception($layoutFile);\n endif;\n \n $compactMode = 0;\n $configData = $this->configData;\n if (isset($configData['COMPACT_MODE'])){\n $compactMode = $configData['COMPACT_MODE'];\n }\n if ($compactMode >= 1){\n ob_start();\n include ($layoutFile);\n $content = ob_get_clean();\n $content = $this->removeWhiteSpace($content);\n echo $content; \n } else {\n include ($layoutFile);\n }\n } catch (\\NG\\Exception $e) {\n if (DEVELOPMENT_ENVIRONMENT):\n exit(\"Could not find layout file: \" . $e->getMessage());\n endif;\n }\n else:\n $this->render();\n endif;\n }", "title": "" }, { "docid": "630fe339a57c5744465845a259c0a973", "score": "0.55144024", "text": "protected function getLayoutConfigs() {\n\t\t$configs = Array();\n\t\t$templateBootstrapPackageKey = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['Staempfli/TemplateBootstrap']['PackageKey'];\n\t\t$directory = GeneralUtility::getFileAbsFileName('EXT:'. $templateBootstrapPackageKey .'/Resources/Private/TypoScript/BackendLayouts/');\n\t\t$filesOfDirectory = GeneralUtility::getFilesInDir($directory, 'ts', TRUE);\n\t\tforeach ($filesOfDirectory as $file) {\n\t\t\t$fileBaseName = basename($file);\n\t\t\t$layoutKey = substr($fileBaseName, 0, strrpos($fileBaseName, '.'));\n\t\t\t$data = Array(\n\t\t\t\t'layoutKey' => $layoutKey,\n\t\t\t\t'title' => 'LLL:EXT:'. $templateBootstrapPackageKey .'/Resources/Private/Language/Backend.xlf:backend_layout.'. $layoutKey,\n\t\t\t\t'configFilePath' => $file,\n\t\t\t\t'icon' => 'EXT:'. $templateBootstrapPackageKey .'/Resources/Public/Backend/Icons/Layouts/'. $layoutKey .'.png'\n\t\t\t);\n\n\t\t\t$configs[$layoutKey] = $data;\n\t\t} // foreach found .ts files\n\n\t\treturn $configs;\n\t}", "title": "" }, { "docid": "cb4f0b73ad219b37c4e89c1910894422", "score": "0.5493572", "text": "function setLayout( $layout ) {\n\t\t// Get the current appearance settings.\n\t\t$settings = $this->getAppearanceSettings();\n\t\t// Set the layout variable to the new layout.\n\t\t$settings['layout'] = $layout;\n\t\t// Save the new settings.\n\t\t$this->saveAppearanceSettings( $settings );\n\t}", "title": "" }, { "docid": "a16283537f6bfc9124a0b3ef76b8981e", "score": "0.54787165", "text": "private function _prepareLayout()\n {\n // set the view object\n $this->_layout->setView($this->view);\n // set the layout path\n $this->_layout->setLayoutPath(\n $this->getApplicationPath() . '/layouts/scripts/'\n );\n }", "title": "" }, { "docid": "286eca397e4651dca88bb68763741310", "score": "0.54484504", "text": "static function blog_layout() {\r\n\r\n\t\t\tif ( ! is_admin() ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'layout_list' => array(\r\n\t\t\t\t\t'alt' => 'list layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-list.png',\r\n\t\t\t\t\t'title' => esc_html__( 'list', 'look' )\r\n\t\t\t\t),\r\n\t\t\t\t'layout_classic' => array(\r\n\t\t\t\t\t'alt' => 'classic layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-classic.png',\r\n\t\t\t\t\t'title' => esc_html__( 'Classic', 'look' )\r\n\t\t\t\t),\r\n\t\t\t\t'layout_classic_lite' => array(\r\n\t\t\t\t\t'alt' => 'classic lite layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-classic-lite.png',\r\n\t\t\t\t\t'title' => esc_html__( 'Classic lite', 'look' )\r\n\t\t\t\t),\r\n\t\t\t\t'layout_grid' => array(\r\n\t\t\t\t\t'alt' => 'grid layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-grid.png',\r\n\t\t\t\t\t'title' => esc_html__( 'grid', 'look' )\r\n\t\t\t\t),\r\n\t\t\t\t'layout_grid_small_s' => array(\r\n\t\t\t\t\t'alt' => 'small grid square layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-grid-small-s.png',\r\n\t\t\t\t\t'title' => esc_html__( 'small grid (square)', 'look' )\r\n\t\t\t\t),\r\n\t\t\t\t'layout_grid_small' => array(\r\n\t\t\t\t\t'alt' => 'small grid layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-grid-small.png',\r\n\t\t\t\t\t'title' => esc_html__( 'small grid', 'look' )\r\n\t\t\t\t),\r\n\t\t\t\t'layout_overlay_small' => array(\r\n\t\t\t\t\t'alt' => 'List and grid layout',\r\n\t\t\t\t\t'img' => get_template_directory_uri() . '/theme_options/images/layout-overlay.png',\r\n\t\t\t\t\t'title' => esc_html__( 'overlay grid', 'look' )\r\n\t\t\t\t),\r\n\t\t\t);\r\n\t\t}", "title": "" }, { "docid": "f618620856aa26df0c46908e164cbb5d", "score": "0.5436066", "text": "protected function _updateLayout()\n {\n /* @var $helper Jmango360_Japi_Helper_Data */\n $helper = Mage::helper('japi');\n $xml = '';\n\n if ($helper->isModuleEnabled('PostcodeNl_Api')) {\n if (version_compare($helper->getExtensionVersion('PostcodeNl_Api'), '1.1.0', '<')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addCss\\\" ifconfig=\\\"postcodenl/config/enabled\\\"><script>postcodenl/api/css/lookup.css</script></action>\n <action method=\\\"addJs\\\" ifconfig=\\\"postcodenl/config/enabled\\\"><script>postcodenl/api/lookup.js</script></action>\n</reference>\";\n } else {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addCss\\\" ifconfig=\\\"postcodenl_api/config/enabled\\\"><script>postcodenl/api/css/lookup.css</script></action>\n <action method=\\\"addJs\\\" ifconfig=\\\"postcodenl_api/config/enabled\\\"><script>postcodenl/api/lookup.js</script></action>\n</reference>\";\n }\n $xml .= \"\n<reference name=\\\"content\\\">\n <block type=\\\"postcodenl_api/jsinit\\\" name=\\\"postcodenl.jsinit\\\" template=\\\"postcodenl/api/jsinit.phtml\\\" />\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Adyen_Payment')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addJs\\\"><script>adyen/payment/cc.js</script></action>\n <action method=\\\"addJs\\\"><script>adyen/payment/iban.js</script></action>\n <action method=\\\"addJs\\\"><script>adyen/payment/elv.js</script></action>\n <action method=\\\"addCss\\\"><stylesheet>css/adyenstyle.css</stylesheet></action>\n</reference>\n<reference name=\\\"after_body_start\\\">\n <block type=\\\"core/text\\\" name=\\\"adyen.diners.validation\\\" after=\\\"-\\\">\n <action method=\\\"setText\\\">\n <text><![CDATA[<script type=\\\"text/javascript\\\">\n Validation.creditCartTypes.set('DC', [new RegExp('^3(?:0[0-5]|[68][0-9])[0-9]{11}$'), new RegExp('^[0-9]{3}$'), true]);\n Validation.creditCartTypes.set('CB', [new RegExp('^4[0-9]{12}([0-9]{3})?$'), new RegExp('^[0-9]{3}$'), true]);\n Validation.creditCartTypes.set('ELO', [new RegExp(/^((((636368)|(438935)|(504175)|(451416)|(636297)|(506699))\\d{0,10})|((5067)|(4576)|(4011))\\d{0,12})$/), new RegExp('^[0-9]{3}$'), true]);\n Validation.creditCartTypes.set('hipercard', [new RegExp(/^(606282\\d{10}(\\d{3})?)|(3841\\d{15})$/), new RegExp('^[0-9]{3}$'), true]);\n Validation.creditCartTypes.set('unionpay', [new RegExp('^62[0-5]\\d{13,16}$'), new RegExp('^[0-9]{3}$'), true]);\n </script>]]></text>\n </action>\n </block>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('TIG_PostNL')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addCss\\\"><stylesheet>css/TIG/PostNL/deliveryoptions/default.css</stylesheet></action>\n <action method=\\\"addCss\\\"><stylesheet>css/TIG/PostNL/postcodecheck.css</stylesheet></action>\n <action method=\\\"addCss\\\"><stylesheet>css/TIG/PostNL/mijnpakket.css</stylesheet></action>\n <action method=\\\"addItem\\\"><type>skin_css</type><name>css/TIG/PostNL/deliveryoptions/ie8.css</name><params/><if>lt IE 9</if></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><file>js/TIG/PostNL/ajax.js</file></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><file>js/TIG/PostNL/postcodecheck.js</file></action>\n <block type=\\\"postnl_deliveryoptions/theme\\\" name=\\\"postnl_deliveryoptions_theme\\\" template=\\\"TIG/PostNL/delivery_options/theme.phtml\\\"/>\n</reference>\n<reference name=\\\"checkout.onepage.billing\\\">\n <block type=\\\"core/template\\\" name=\\\"postnl_billing_postcodecheck\\\" template=\\\"TIG/PostNL/address_validation/checkout/onepage/postcode_check.phtml\\\"/>\n</reference>\n<reference name=\\\"checkout.onepage.shipping\\\">\n <block type=\\\"core/template\\\" name=\\\"postnl_shipping_postcodecheck\\\" template=\\\"TIG/PostNL/address_validation/checkout/onepage/postcode_check.phtml\\\"/>\n</reference>\n<reference name=\\\"before_body_end\\\">\n <block type=\\\"core/template\\\" name=\\\"postnl_validation\\\" template=\\\"TIG/PostNL/address_validation/validate.phtml\\\"/>\n <block type=\\\"postnl_deliveryoptions/js\\\" name=\\\"postnl_deliveryoptions_js\\\" template=\\\"TIG/PostNL/delivery_options/js.phtml\\\"/>\n <block type=\\\"postnl_mijnpakket/js\\\" name=\\\"postnl_mijnpakket_js\\\" template=\\\"TIG/PostNL/mijnpakket/js.phtml\\\"/>\n <block type=\\\"postnl_mijnpakket/loginButton\\\" name=\\\"postnl_mijnpakket_login\\\" template=\\\"TIG/PostNL/mijnpakket/onepage/login_button.phtml\\\"/>\n <block type=\\\"postnl_deliveryoptions/pickupNotification\\\" name=\\\"postnl_billing_pickup_notification\\\" template=\\\"TIG/PostNL/delivery_options/onepage/pickup_notification.phtml\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Vaimo_Klarna')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addJs\\\"><script>vaimo/klarna/klarna.js</script></action>\n <action method=\\\"addCss\\\"><stylesheet>css/vaimo/klarna/checkout.css</stylesheet></action>\n <block type=\\\"page/html_head\\\" name=\\\"klarna_header\\\" as=\\\"klarna_header\\\" template=\\\"vaimo/klarna/checkout/header.phtml\\\" />\n</reference>\n<reference name=\\\"content\\\">\n <block type=\\\"klarna/checkout_top\\\" after=\\\"-\\\" name=\\\"klarna_checkout_top\\\" as=\\\"klarna_checkout_top\\\" template=\\\"vaimo/klarna/checkout/top.phtml\\\" />\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('AW_Deliverydate')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addJs\\\"><script>varien/product.js</script></action>\n <action method=\\\"addCss\\\"><stylesheet>aw_deliverydate/css/main.css</stylesheet></action>\n <action method=\\\"addItem\\\"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/></action>\n <action method=\\\"addItem\\\"><type>js</type><name>calendar/calendar.js</name></action>\n <action method=\\\"addItem\\\"><type>js</type><name>calendar/calendar-setup.js</name></action>\n <action method=\\\"addJs\\\"><script>jquery/jquery.1.9.1.min.js</script></action>\n <action method=\\\"addJs\\\"><script>jquery/jquery.noConflict.js</script></action>\n <action method=\\\"addJs\\\"><script>pickadate/picker.js</script></action>\n <action method=\\\"addJs\\\"><script>pickadate/picker.date.js</script></action>\n <action method=\\\"addItem\\\"><type>js_css</type><stylesheet>pickadate/theme/default.css</stylesheet></action>\n <action method=\\\"addItem\\\"><type>js_css</type><stylesheet>pickadate/theme/default.date.css</stylesheet></action>\n <block type=\\\"core/html_calendar\\\" name=\\\"html_calendar\\\" as=\\\"html_calendar\\\" template=\\\"page/js/calendar.phtml\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('GoMage_DeliveryDate')) {\n $xml .= \"\n<reference name=\\\"head\\\">\t\t\t\n <action method=\\\"addItem\\\"><type>js</type><name>gomage/lc-calendar.js</name></action>\n <block type=\\\"core/html_calendar\\\" name=\\\"gomage.deliverydate.calendar\\\" template=\\\"gomage/deliverydate/js/calendar.phtml\\\"/>\n</reference>\t\t \n<reference name=\\\"checkout.onepage.shipping_method.advanced\\\">\n <block type=\\\"gomage_deliverydate/form\\\" name=\\\"checkout.onepage.shipping_method.additional.delivery_date\\\" template=\\\"gomage/deliverydate/form.phtml\\\" />\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('SendCloud_Integration')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addJs\\\"><script>sendcloud/onepage.js</script></action>\n <block type=\\\"page/html\\\" name=\\\"sendcloud_jsvalues\\\" template=\\\"sendcloud/servicepointpicker.phtml\\\" />\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Symfony_Postcode')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addItem\\\" ifconfig=\\\"symfony_postcode/settings/enabled\\\"><type>js</type><file>symfony/postcode.js</file></action>\n <action method=\\\"addItem\\\" ifconfig=\\\"symfony_postcode/settings/enabled\\\"><type>skin_css</type><file>css/symfony/postcode.css</file></action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('TIG_Buckaroo3Extended')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <block type=\\\"core/template\\\" name=\\\"buckaroo_jquery\\\" template=\\\"buckaroo3extended/jquery.phtml\\\"/>\n <action method=\\\"addItem\\\"><type>skin_css</type><name>japi/css/TIG/Buckaroo3Extended/styles_opc.css</name></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><name>js/TIG/Buckaroo3Extended/paymentGuaranteeObserver.js</name></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><name>js/TIG/Buckaroo3Extended/afterpayObserver.js</name></action>\n</reference>\n<reference name=\\\"before_body_end\\\">\n <block type=\\\"core/template\\\" name=\\\"buckaroo_save_sata_js\\\" template=\\\"buckaroo3extended/saveData.phtml\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Fooman_GoogleAnalyticsPlus')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <block type=\\\"core/text_list\\\" name=\\\"before_head_end\\\" as=\\\"before_head_end\\\"/>\n</reference>\n<reference name=\\\"before_head_end\\\">\n <block type=\\\"googleanalyticsplus/universal\\\" name=\\\"googleanalyticsplus_universal\\\" as=\\\"googleanalyticsplus_universal\\\"/>\n</reference>\n<reference name=\\\"after_body_start\\\">\n <block type=\\\"googleanalyticsplus/tagManager\\\" name=\\\"googleanalyticsplus_tagmanager\\\" as=\\\"googleanalyticsplus_tagmanager\\\"/>\n</reference>\n<reference name=\\\"before_body_end\\\">\n <block type=\\\"googleanalyticsplus/remarketing\\\" name=\\\"googleanalyticsplus_remarketing\\\" as=\\\"googleanalyticsplus_remarketing\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Sevenlike_Fatturazione')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addItem\\\"><type>skin_js</type><name>js/fatturazione.js</name></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><name>onestepcheckout/js/autocomplete.js</name></action>\n <action method=\\\"addCss\\\"><stylesheet>onestepcheckout/autocomplete.css</stylesheet></action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Bitbull_BancaSellaPro')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <block type=\\\"bitbull_bancasellapro/utility_text\\\" name=\\\"gestpay.iframe.external\\\"/>\n <action method=\\\"addJs\\\"><script>prototype/window.js</script></action>\n <action method=\\\"addItem\\\"><type>js_css</type><name>prototype/windows/themes/default.css</name></action>\n <action method=\\\"addCss\\\"><name>lib/prototype/windows/themes/magento.css</name></action>\n <action method=\\\"addJs\\\"><name>bancasellapro/gestpayform.js</name></action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Kega_Checkout')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <name>js/kega_theme/vendor/magnific.popup.min.js</name>\n </action>\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <name>js/kega_checkout/main.js</name>\n </action>\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <name>js/kega_form/main.js</name>\n </action>\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <name>js/terstal_form/main.js</name>\n </action>\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <name>js/kega_form/address-search.js</name>\n </action>\n</reference>\n<reference name=\\\"checkout.onepage.billing\\\">\n <action method=\\\"setTemplate\\\">\n <template>kega_checkout/onepage/billing.phtml</template>\n </action>\n <block type=\\\"checkout/onepage\\\" name=\\\"newsletter_subscription\\\"\n template=\\\"kega_checkout/onepage/newsletter_subscription.phtml\\\" />\n <block type=\\\"core/text_list\\\" name=\\\"checkout_billing_before_form\\\"/>\n <block type=\\\"core/text_list\\\" name=\\\"checkout_after_before_form\\\"/>\n</reference>\n<reference name=\\\"checkout.onepage.shipping_method\\\">\n <remove name=\\\"checkout.onepage.shipping_method.additional\\\"/>\n</reference>\n<reference name=\\\"checkout.onepage.shipping_method.available\\\">\n <action method=\\\"setTemplate\\\">\n <template>kega_checkout/onepage/shipping_method/available.phtml</template>\n </action>\n</reference>\n<reference name=\\\"checkout.onepage.payment\\\">\n <action method=\\\"setTemplate\\\">\n <template>japi/kega_checkout/onepage/payment.phtml</template>\n </action>\n</reference>\n<reference name=\\\"checkout.onepage.payment.additional\\\">\n <block type=\\\"checkout/agreements\\\" name=\\\"checkout.onepage.agreements\\\" as=\\\"additional\\\"\n template=\\\"japi/checkout/onepage/agreements.phtml\\\"/>\n</reference>\n<reference name=\\\"before_body_end\\\">\n <block type=\\\"kega_form/attributes\\\" name=\\\"kega.form.attributes\\\" template=\\\"kega_form/attributes.phtml\\\"/>\n <block type=\\\"kega_form/address_search\\\" name=\\\"address_search\\\" template=\\\"kega_form/address-search.phtml\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Kega_StorePickup')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n<block type=\\\"core/template\\\" name=\\\"google.maps.js\\\" template=\\\"kega_store/js/maps.phtml\\\"/>\n<action method=\\\"addItem\\\">\n <type>skin_js</type>\n <name>js/kega_storepickup/main.js</name>\n</action>\n</reference>\n<reference name=\\\"checkout.onepage.shipping_method.available\\\">\n <block type=\\\"storepickup/checkout_onepage_shipping_storepickup_storelist\\\" name=\\\"kega_storepickup_delivery\\\"\n template=\\\"kega_storepickup/form.phtml\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Chronopost_Chronorelais')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addItem\\\"><type>skin_css</type><name>chronorelais/chronorelais.css</name></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><name>chronorelais/carousel-min.js</name></action>\n</reference>\n<reference name=\\\"content\\\">\n <block type=\\\"core/template\\\" template=\\\"chronorelais/checkout/onepage/shipping_method_complement.phtml\\\" />\n</reference>\";\n }\n\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $xml .= \"\n<reference name=\\\"content\\\">\n <block type=\\\"core/template\\\" name=\\\"pbridge.js\\\" template=\\\"pbridge/checkout/payment/js.phtml\\\" />\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Magestore_RewardPoints')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addJs\\\"><file>magestore/rewardpoints.js</file></action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Iways_PayPalPlus')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <block type=\\\"core/text\\\" name=\\\"ppplus\\\" ifconfig=\\\"payment/iways_paypalplus_payment/active\\\">\n <action method=\\\"setText\\\">\n <text><![CDATA[<script src=\\\"//www.paypalobjects.com/webstatic/ppplus/ppplus.min.js\\\" type=\\\"text/javascript\\\"></script>]]></text>\n </action>\n </block>\n <action method=\\\"addCss\\\" ifconfig=\\\"payment/iways_paypalplus_payment/active\\\">\n <stylesheet>css/iways-paypalplus.css</stylesheet>\n </action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('TIG_MyParcel2014')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <file>js/TIG/MyParcel2014/jquery-myparcel.min.js</file>\n </action>\n <action method=\\\"addItem\\\">\n <type>skin_js</type>\n <file>js/TIG/MyParcel2014/checkout.js</file>\n </action>\n</reference>\n<reference name=\\\"checkout.onepage.shipping_method.available\\\">\n <action method=\\\"setTemplate\\\">\n <template>TIG/MyParcel2014/checkout/onepage/shipping_method/available.phtml</template>\n </action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('LaPoste_SoColissimoSimplicite')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addItem\\\"><type>skin_js</type><name>js/socolissimosimplicite/shipping_method.js</name></action>\n</reference>\n<reference name=\\\"content\\\">\n <block type=\\\"japi/socolissimosimplicite_iframe\\\" name=\\\"iframe.socolissimosimplicite\\\" template=\\\"socolissimosimplicite/iframe.phtml\\\" after=\\\"checkout.onepage\\\" />\n <block type=\\\"core/template\\\" name=\\\"shippingmethod.socolissimosimplicite\\\" template=\\\"socolissimosimplicite/onepage/shipping_method/socolissimosimplicite.phtml\\\" after=\\\"iframe.socolissimosimplicite\\\" />\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Borgione_General')) {\n $xml .= \"\n<reference name=\\\"checkout.onepage.billing\\\">\n <action method=\\\"setTemplate\\\">\n <template>persistent/checkout/onepage/billing.phtml</template>\n </action>\n</reference>\n<reference name=\\\"checkout.onepage.shipping\\\">\n <action method=\\\"setTemplate\\\">\n <template>checkout/onepage/shipping.phtml</template>\n </action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Magentix_SoColissimo')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addCss\\\"><stylesheet>socolissimo/css/style.css</stylesheet></action>\n</reference>\n<reference name=\\\"before_body_end\\\">\n <block type=\\\"socolissimo/frontend_socolissimo\\\" name=\\\"socolissimo\\\" template=\\\"socolissimo/socolissimo.phtml\\\">\n <action method=\\\"setData\\\"><name>js</name><value>socolissimo/js/checkout/magento-onepage.js</value></action>\n </block>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('DPD_Shipping')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addCss\\\"><stylesheet>css/dpd/shipping.css</stylesheet></action>\n <action method=\\\"addJs\\\"><script>dpd/shipping.js</script></action>\n <action method=\\\"addJs\\\"><script>prototype/window.js</script></action>\n <action method=\\\"addJs\\\"><script>dpd/window/shipping.js</script></action>\n <action method=\\\"addCss\\\"><name>css/dpd/window.css</name></action>\n <action method=\\\"addJs\\\"><file helper=\\\"dpd/data/getOnestepCheckoutJs\\\"/></action>\n <block type=\\\"core/template\\\" name=\\\"gmapsapi\\\" template=\\\"dpd/gmapsapi.phtml\\\"/>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('Flagbit_Checkout')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addCss\\\"><stylesheet>css/flagbit_checkout.css</stylesheet></action>\n</reference>\n<reference name=\\\"content\\\">\n <block type=\\\"page/html_wrapper\\\" name=\\\"checkout.progress.wrapper\\\" before=\\\"-\\\" translate=\\\"label\\\">\n <action method=\\\"setElementId\\\"><value>checkout-progress-wrapper</value></action>\n <block type=\\\"checkout/onepage_progress\\\" name=\\\"checkout.progress\\\" before=\\\"-\\\" template=\\\"flagbit_checkout/progress.phtml\\\"/>\n </block>\n</reference>\n<reference name=\\\"checkout.onepage\\\">\n <action method=\\\"setTemplate\\\"><template>japi/flagbit_checkout/onepage.phtml</template></action>\n <action method=\\\"setTemplate\\\" ifconfig=\\\"kickstarter_checkout/settings/compact_mode\\\"><template>japi/flagbit_checkout/onepage_compact.phtml</template></action>\n</reference>\n<reference name=\\\"checkout.onepage.billing\\\">\n <action method=\\\"setTemplate\\\"><template>flagbit_checkout/billing.phtml</template></action>\n <action method=\\\"setTemplate\\\" ifconfig=\\\"kickstarter_checkout/settings/compact_mode\\\"><template>flagbit_checkout/billing_compact.phtml</template></action>\n <block type=\\\"magesetup/checkout_agreements\\\" name=\\\"magesetup.checkout.billing.agreements\\\">\n <action method=\\\"setTemplate\\\" ifconfig=\\\"kickstarter_checkout/review/agreements_on_billing\\\"><template>magesetup/checkout/onepage/agreements_plain.phtml</template></action>\n </block>\n <action method=\\\"append\\\" ifconfig=\\\"kickstarter_checkout/settings/compact_mode\\\">\n <block>checkout.onepage.payment</block>\n </action>\n</reference>\n<reference name=\\\"checkout.onepage.payment\\\">\n <action method=\\\"setTemplate\\\"><template>checkout/onepage/payment.phtml</template></action>\n</reference>\";\n }\n\n if ($helper->isModuleEnabled('GGMGastro_CustomCheckoutFields')) {\n $xml .= \"\n<reference name=\\\"head\\\">\n <action method=\\\"addJs\\\"><script>GGMGastro/CustomCheckoutFields/AdditionalFields.js</script></action>\n <action method=\\\"addItem\\\"><type>skin_js</type><name>js/override.js</name></action>\n <action method=\\\"removeItem\\\"><type>skin_css</type><name>css/magesetup/checkout.css</name></action>\n <action method=\\\"addCss\\\"><stylesheet>css/partial/checkout.css</stylesheet><params>media=\\\"screen\\\"</params></action>\n</reference>\n<reference name=\\\"checkout.onepage.billing\\\">\n <block type=\\\"customcheckoutfields/options\\\" name=\\\"customcheckoutfields.options\\\">\n <action method=\\\"setTemplate\\\"><template>ggmgastro_customcheckoutfields/options.phtml</template></action>\n <block type=\\\"cms/block\\\" name=\\\"partial_delivery_info\\\" as=\\\"partial_delivery_info\\\" output=\\\"toHtml\\\">\n <action method=\\\"setBlockId\\\"><block_id>partial_delivery_info</block_id></action>\n </block>\n <block type=\\\"cms/block\\\" name=\\\"neutral_bill_info\\\" as=\\\"neutral_bill_info\\\" output=\\\"toHtml\\\">\n <action method=\\\"setBlockId\\\"><block_id>neutral_bill_info</block_id></action>\n </block>\n <block type=\\\"cms/block\\\" name=\\\"separate_invoice_info\\\" as=\\\"separate_invoice_info\\\" output=\\\"toHtml\\\">\n <action method=\\\"setBlockId\\\"><block_id>separate_invoice_info</block_id></action>\n </block>\n </block>\n</reference>\";\n }\n\n if (Mage::getStoreConfigFlag('japi/jmango_rest_checkout_settings/adyen_pin')\n && Mage::getStoreConfigFlag('japi/jmango_rest_checkout_settings/adyen_pin_only')) {\n $xml .= \"\n<reference name=\\\"root\\\">\n <action method=\\\"addBodyClass\\\"><name>adyen-pin-only</name></action>\n</reference>\";\n }\n if ($helper->isModuleEnabled('Dhl_Magentolws')) {\n $xml .= \"<reference name=\\\"head\\\">\"\n . \"<action method=\\\"addItem\\\"><type>js</type><name>lib/jquery/jquery-1.10.2.js</name></action>\"\n . \"<action method=\\\"addItem\\\"><type>js</type><name>dhl/magentolws/venobox.min.js</name><params><![CDATA[ name=\\\"zjs_last\\\" ]]></params></action>\"\n . \"<action method=\\\"addItem\\\"><type>js</type><name>dhl/magentolws/location_picker.js</name></action>\"\n . \"<action method=\\\"addCss\\\"><stylesheet>css/dhl/magentolws/style.css</stylesheet></action>\"\n . \"</reference>\";\n }\n\n try {\n $this->getLayout()->getUpdate()->addUpdate($xml);\n $this->generateLayoutXml()->generateLayoutBlocks();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n\n $customXml = Mage::getStoreConfig('japi/jmango_rest_checkout_settings/custom_xml');\n if ($customXml) {\n try {\n $this->getLayout()->getUpdate()->addUpdate($customXml);\n $this->generateLayoutXml()->generateLayoutBlocks();\n } catch (Exception $e) {\n Mage::logException($e);\n }\n }\n }", "title": "" }, { "docid": "2daea9562dd8c8dcdc2a6577c5a8dba8", "score": "0.54342294", "text": "public function parse_page_layout()\n {\n $layout = $this->registry->page_layout;\n \n if (count($layout))\n {\n // update layout template\n $layout_controller = ($layout['controller'] == '') ? DEFAULT_CONTROLLER : $layout['controller'];\n $layout_skin = ($layout['skin'] == '') ? 'default' : $layout['skin'];\n $main_template = $layout_controller . '.' . $layout_skin . '.template.php';\n \n $this->main_template = $main_template;\n $this->default_main_template = DEFAULT_MAIN_TEMPLATE;\n \n // if there is cell data\n if ( ! empty($layout['cells']))\n {\n $layout['cells'] = json_decode($layout['cells']);\n array_unshift($layout['cells'], array());\n \n // load block content into each cell of the layout\n if (is_array($layout['cells']))\n {\n foreach($layout['cells'] as $i => $cell)\n {\n foreach($cell as $j => $block)\n {\n $view = '';\n \n // if regular page content\n if ($block == '[content]')\n {\n $view = $this->registry->page_content;\n }\n \n // else, try and load modular content\n else\n {\n /*\n // IF $block = '[forms:1]'\n // THEN $matches = array('[forms:1]', 'forms', '1')\n $matches = array();\n preg_match('/^\\[(.*):(.*)\\]$/', $block, $matches);\n if (count($matches) == 3)\n {\n $controller = load_controller($matches[1]);\n if ($controller)\n {\n if (method_exists($controller, 'get_block'))\n {\n $view = $controller->get_block($matches[2]);\n }\n }\n }\n */\n //$view = $this->parse_block_layout($block);\n $view = parse_block($block);\n }\n \n // if view is still blank then it's an html block\n if ($view == '')\n {\n $data = array('content' => $block);\n $view = load_view(HTML_BLOCK_TEMPLATE, $data);\n }\n \n // update cell's block content\n $layout['cells'][$i][$j] = $view;\n }\n }\n }\n \n }\n }\n \n $this->registry->page_layout = $layout;\n }", "title": "" }, { "docid": "6b85a09b3b12d6c55e08b68edde4d11a", "score": "0.54220587", "text": "function load_layout($layout,$admin=false){\n\t\t// [{columns:8,rows:2,ids:'123,124'},{columns:4,rows:2,ids:'125'},{columns:3,ids:'126'},{columns:3,ids:'127'},{columns:3,ids:'128'},{columns:3,ids:'129'}]\n\t\t\n\t\tforeach($layout as $block){\n\t\t\tif($admin) $this->make_admin_block();\n\t\t\telse $this->make_block();\n\t\t}\n\t}", "title": "" }, { "docid": "8752fb9bd315630ee4960b5a5a701333", "score": "0.5414661", "text": "public function getLayout(){\n\t\n\t\tif( empty($this->_layout) ){\n\t\t\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\t\n\t\t\t\t$query->select( 'l.*, v.*, t.*' );\n\t\t\t\t$query->from( '#__zbrochure_template_layouts AS l' );\n\t\t\t\t$query->join( 'LEFT', '#__zbrochure_template_layout_versions AS v ON v.tmpl_layout_version_id = l.tmpl_layout_current_version' );\n\t\t\t\t$query->join( 'LEFT', '#__zbrochure_templates AS t ON t.tmpl_id = l.tmpl_id' );\n\t\t\t\t\n\t\t\t\t$query->where( 'l.tmpl_layout_id = '.$this->_id );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t$this->_db->setQuery( $query );\n\t\t\t\t$this->_layout = $this->_db->loadObject();\n\t\t\t\t\n\t\t\t\t$this->_layout->theme\t= ZbrochureHelperThemes::getTheme( $this->_layout->tmpl_default_theme );\n\t\t\t\t\n\t\t\t\t//$this->_layout->blocks = $this->_getBlocks( $this->_layout->tmpl_id, $this->_layout->tmpl_layout_key );\n\t\t\t\t\n\t\t\t\t$content_blocks\t\t\t= json_decode( $this->_layout->tmpl_layout_version_content, true );\n\t\t\t\t$image_blocks\t\t\t= json_decode( $this->_layout->tmpl_layout_version_images, true );\n\t\t\t\t$design_blocks\t\t\t= json_decode( $this->_layout->tmpl_layout_version_design, true );\n\t\t\t\t\n\t\t\t\t$un_tmpl_blocks \t\t= $this->_getBlocks( $this->_layout->tmpl_id, $this->_layout->tmpl_layout_key, $this->_layout->theme );\n\t\t\t\t\n\t\t\t\t//We need these pre-organization for the modal edit view\n\t\t\t\t$this->_layout->blocks\t= $un_tmpl_blocks;\n\t\t\t\t\n\t\t\t\t$tmpl_blocks\t= array();\n\t\t\t\t\n\t\t\t\tforeach( $un_tmpl_blocks as $block ){\n\n\t\t\t\t\t$tmpl_blocks[$block->content_type_output_format][$block->content_tmpl_block_id] = $block;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html_matched\t= array();\n\t\t\t\t$image_matched\t= array();\n\t\t\t\t$design_matched\t= array();\n\t\t\t\t\n\t\t\t\tif( $content_blocks ){\n\t\t\t\t\n\t\t\t\t\tforeach( $content_blocks as $k => $v ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$html_matched[$k]['layout']\t\t= $v;\n\t\t\t\t\t\t$html_matched[$k]['content']\t= $tmpl_blocks['html'][$k];\n\t\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\n\t\t\t\tif( $image_blocks ){\n\t\t\t\t\n\t\t\t\t\tforeach( $image_blocks as $k => $v ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$image_matched[$k]['layout']\t= $v;\n\t\t\t\t\t\t$image_matched[$k]['content']\t= $tmpl_blocks['image'][$k];\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\n\t\t\t\tif( $design_blocks ){\n\n\t\t\t\t\tforeach( $design_blocks as $k => $v ){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$design_matched[$k]['layout']\t= $v;\n\t\t\t\t\t\t$design_matched[$k]['content']\t= $tmpl_blocks['svg'][$k];\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\n\t\t\t\t$this->_layout->content_blocks \t= $html_matched;\n\t\t\t\t$this->_layout->image_blocks\t= $image_matched;\n\t\t\t\t$this->_layout->design_blocks\t= $design_matched;\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t}catch( JException $e ){\n\t\t\t\n\t\t\t\tif( $e->getCode() == 404 ){\n\t\t\t\t\n\t\t\t\t\t// Need to go thru the error handler to allow Redirect to work.\n\t\t\t\t\tJError::raiseError( 404, $e->getMessage() );\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t$this->setError($e);\n\t\t\t\t\n\t\t\t\t}\n\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_layout;\n\t\n\t}", "title": "" }, { "docid": "b35053e47a2f27de4a5161d76d1a9d50", "score": "0.5389214", "text": "private function resyncLayouts()\n\t{\n\t\t// column must be present to access Channel model below\n\t\tee()->smartforge->add_column(\n\t\t\t'channels',\n\t\t\tarray(\n\t\t\t\t'preview_url' => array(\n\t\t\t\t\t'type' => 'VARCHAR(100)',\n\t\t\t\t\t'null' => TRUE,\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tee('Model')->get('ChannelLayout')\n\t\t\t->with('Channel')\n\t\t\t->all()\n\t\t\t->synchronize();\n\t}", "title": "" }, { "docid": "dcea99d885395bb544825c6a9f7be71a", "score": "0.5372794", "text": "protected function _addLayout() \n {\n $layout = $this->_altoDom->createElementNS(self::ALTO_NS, 'Layout');\n $this->_altoDom->documentElement->appendChild($layout);\n $this->_addPages();\n }", "title": "" }, { "docid": "d5dc7297b1b9d55c7fee4823c7f29f40", "score": "0.5366648", "text": "protected function setupLayout()\n\t{\n\n\t\t$teams = Team::all();\n\n\t\tif(Auth::check())\t\n\t\t\t$currentUser = Auth::user()->school;\n\t\telse\n\t\t\t$currentUser = null;\n\n\t\tView::share('teams', $teams);\n\t\tView::share('currentUser', $currentUser);\n\t\t\n\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t\n\t\t\t$this->layout = View::make($this->layout)\n\t\t\t\t\t\t\t->with('teams', $teams)\n\t\t\t\t\t\t\t->with('currentUser', $currentUser);\n\t\t\t\n\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "df8e5cc9cbf262cef8120e067cb18214", "score": "0.53618217", "text": "protected function setLayout($layoutName) {\n\t\t$this->_layout = strval($layout);\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "af48667fcb07398f3875c0391969ee34", "score": "0.5349575", "text": "public static function setLayout($layout = false)\n {\n self::$_layout = ($layout) ? $layout : 'application';\n }", "title": "" }, { "docid": "0a54921586579b2c6486fa12f4b71d8f", "score": "0.5344385", "text": "public function setLayout($dir)\n {\n $this->layout = $dir;\n }", "title": "" }, { "docid": "2aff6bada7cade4f9bf40a1906fd3b88", "score": "0.53396153", "text": "protected function createLayoutOverride() {\n $page = $this->getSession()->getPage();\n $assert_session = $this->assertSession();\n\n // Save the current user to re-login after Layout Builder changes.\n $user = $this->loggedInUser;\n $this->loginLayoutAdmin();\n $this->drupalGet('node/' . $this->article->id() . '/layout');\n\n $page->pressButton('Save layout');\n $this->assertNotEmpty($assert_session->waitForElement('css', '.messages--status'));\n $assert_session->pageTextContains('The layout override has been saved.');\n $this->drupalLogin($user);\n }", "title": "" }, { "docid": "bcb63106dbf455892de627bb5e174158", "score": "0.5338901", "text": "function set_layout ($layout)\n\t{\n\t\t$this->request->layout = $layout;\n\t}", "title": "" } ]
866153d1c8e2c71495ee3e8d8b8b3131
get quicksearch fields if filter is true
[ { "docid": "bafb3e291587423a5dd07af8c7210575", "score": "0.62433904", "text": "private function getQuicksearch()\n {\n\n\n\t if($this->filter == TRUE)\n\t\t {\n\t\t\t$visibility = '';\n\n\n\t\t\treturn '<div id=\"picNetQuicksearch\"><input type=\"text\" id=\"' . $this->table_id. 'Quickfind\"/>' . $this->getClearIcon() . '</div>';\n\t\t }\n\n\n }", "title": "" } ]
[ { "docid": "0af95ddedac78d7a702bdaf983236ba8", "score": "0.76988214", "text": "public function getSearchableFields();", "title": "" }, { "docid": "e0cf149c1f3a543322a5ac55d746420d", "score": "0.7658028", "text": "abstract public function getFieldsSearchable();", "title": "" }, { "docid": "e63c0a171273854542fd41f99c026caa", "score": "0.75206447", "text": "public static function getSearchableFields() {\n }", "title": "" }, { "docid": "b7025d5a3e9550615ae312c217a1a639", "score": "0.7406162", "text": "public static function get_searchable_fields();", "title": "" }, { "docid": "0081e4ed297f04ab60fa56c063479a52", "score": "0.698559", "text": "public function get_search_fields() {\n return $this->filter_types_fields_by_user_status( 'search' );\n }", "title": "" }, { "docid": "25710d4f4d6b3f2a618475a23114f4eb", "score": "0.68355143", "text": "public function ReturnFieldsByFilters()\n\t{\t\n\t\tglobal $fields; \n\n\t\tif ( $this->_filters != null )\n\t\t{\n\t\t\t// Return array keys\n\t\t\t$aResult = array_keys($this->_filters); \n\t\t\treturn $aResult; \n\t\t}\n\t\telse // No fields at all!\n\t\t\treturn null; \n\t}", "title": "" }, { "docid": "9a1a2310e156a8fcce62bfc45b52e98c", "score": "0.6511752", "text": "public function getFieldsForFilter()\n {\n return [];\n }", "title": "" }, { "docid": "4475ca5c8a6bbded0574a056d1bb2155", "score": "0.6498789", "text": "public function getSearchFields()\n {\n return $this->searchFields;\n }", "title": "" }, { "docid": "f22a0c1c2e3789f8b9f70433ac5e1196", "score": "0.6491512", "text": "public function getSearchedField();", "title": "" }, { "docid": "8614f4f6aa2eaea050c2737f8a0b9efa", "score": "0.6435596", "text": "public function getSearchableFields()\n {\n return [\n 'title',\n 'body',\n ];\n }", "title": "" }, { "docid": "7872dc439b7fa6baf44857ad785386d6", "score": "0.64250886", "text": "public function genericSearchFields()\n {\n return ['token', 'url'];\n }", "title": "" }, { "docid": "558597fc2d923bfb07f98db7e41671d9", "score": "0.6357845", "text": "public function getSearchFields(){\r\n\t\treturn array(\"role_name\", \"description\");\r\n\t}", "title": "" }, { "docid": "796da8da0b6f3196e39d0fc8af3fe632", "score": "0.6325379", "text": "public function getfields() {\n return $this->view->query;\n }", "title": "" }, { "docid": "80d11fb2a14be390ba67ef66658c6a12", "score": "0.6284261", "text": "protected function get_filter_values() {\n // it all starts with a model\n $this->controller->load_mod('E_model', 'form_model', 'na', $this->config_source);\n $form_def = $this->controller->form_model->get_form_def(array('specs', 'fields'));\n\n // search filter\n $current_search_filter_values = array();\n if (!empty($form_def->specs)) {\n foreach ($form_def->specs as $field => $spec) {\n // The form field type may contain several keywords specified by a vertical bar\n $fieldTypes = explode('|', $spec['type']);\n\n if (!in_array('hidden', $fieldTypes) && !in_array('non-edit', $fieldTypes)) {\n $current_search_filter_values[] = $spec;\n }\n }\n }\n\n $filter_values = $this->get_current_filter_values_from_post($current_search_filter_values);\n if (!$filter_values) {\n $filter_values = $current_search_filter_values;\n }\n\n // return filter settings\n //return $current_search_filter_values;\n return $filter_values;\n }", "title": "" }, { "docid": "a7619d3452a639e3ddda041df3684b75", "score": "0.6262637", "text": "function get_search_fields($class_name){\r\n\t\t$search_fields = array();\r\n\t\t\r\n\t\tswitch($class_name){\r\n\t\t\tdefault:\r\n\t\t\t\t$search_fields['search_fields'] = array();\r\n\t\t\t\t$search_fields['extra_fields'] = array();\r\n\t\t}\r\n\t\t\r\n\t\treturn $search_fields;\r\n\t}", "title": "" }, { "docid": "8ecb7cab9128fb8a7747525e5519e78c", "score": "0.6250369", "text": "abstract public function getSearchFields($localeCode);", "title": "" }, { "docid": "9e48f5b8d427e2e2b6d825328d879b6b", "score": "0.62242293", "text": "public function get_filter_fields() {\n return $this->filter_fields;\n }", "title": "" }, { "docid": "2f343c0174f310d5a4d574e45e59c3f9", "score": "0.6223669", "text": "public function getListFields();", "title": "" }, { "docid": "107d2af1e7421a05266335d51b87a44d", "score": "0.6218031", "text": "public static function get_searchable_fields()\n {\n return array('post_title', 'post_content', 'post_excerpt');\n }", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.61996436", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.61996436", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.61996436", "text": "public function getFields();", "title": "" }, { "docid": "556e025fb26ae1bdc63d1637896b13ee", "score": "0.6155678", "text": "private function getSearchFields()\n {\n $id = $this->getId();\n if(!is_string($id)){\n throw new \\InvalidArgumentException('getSearchFields first argument must be text string.'\n . ' First argument given ' . $id);\n }\n $string_location = 'Segment\\'' . '__SEARCHFIELDS_' . strtoupper($id) . '__';\n $answer = json_decode($string_location, TRUE);\n return $answer;\n }", "title": "" }, { "docid": "bd9b04d4860ba43b62c540948afab8a5", "score": "0.6146657", "text": "function getAdvSearchFields($key='name') {\n\t\t$typeid = intval(@$typeid);\r\n\t\t//$where = \" WHERE ftrel.type_id='\".(int)$typeid.\"' AND fi.isadvsearch='1'\";\n\t\t$where = \" WHERE fi.isadvsearch='1'\";\n\t\t$query = 'SELECT fi.*'\r\n\t\t\t.' FROM #__flexicontent_fields AS fi'\r\n\t\t\t.' LEFT JOIN #__flexicontent_fields_type_relations AS ftrel ON ftrel.field_id = fi.id'\r\n\t\t\t//.' LEFT JOIN #__flexicontent_items_ext AS ie ON ftrel.type_id = ie.type_id'\r\n\t\t\t.$where\r\n\t\t\t.' AND fi.published = 1'\r\n\t\t\t.' GROUP BY fi.id'\r\n\t\t\t.' ORDER BY ftrel.ordering, fi.ordering, fi.name'\r\n\t\t;\n\t\t$this->_db->setQuery($query);\r\n\t\t$fields = $this->_db->loadObjectList($key);\r\n\t\tforeach ($fields as $field) {\r\n\t\t\t$field->item_id\t\t= 0;\r\n\t\t\t//$field->value \t\t= $this->getExtrafieldvalue($field->id, 0);\r\n\t\t\t$field->parameters \t= new JParameter($field->attribs);\r\n\t\t}\r\n\t\treturn $fields;\r\n\t}", "title": "" }, { "docid": "e817903a93b4ad28d3884370a577bc62", "score": "0.6119615", "text": "function filterQ($q,$fields){\n $request = array_flip(array_filter($_REQUEST,'strlen'));\n \n // search for elements that starts with custom_filter\n $customFilter = array_filter($request,function($key) {\n return substr($key, 0, 13) === 'custom_filter';\n });\n foreach($customFilter as $filterValue => $filterElement):\n \n $filterParts = explode('_',$filterElement);\n // type of filter (text,dateFrom,dateTo,select)\n if ( $filterParts[2] == 'text'):\n \n $fieldDelimiter = $filterParts[3];\n $searchField = $fields[$fieldDelimiter-1];\n if(is_array($searchField)){\n $searchFieldQuery = \"\";\n $searchFieldValue = array();\n $sfCounter = count($searchField);\n foreach($searchField as $key => $sf):\n $searchFieldQuery .= $sf.\" like ?\";\n if($key!=$sfCounter-1){\n $searchFieldQuery .= \" or \";\n }\n $searchFieldValue[] = '%'.$filterValue.'%';\n endforeach;\n $q->addWhere($searchFieldQuery,$searchFieldValue);\n }\n else{\n $q->addWhere($searchField .\" like ?\",'%'.$filterValue.'%');\n }\n // filter select - remove \"-1\" value to prevent filtering empty results\n \n elseif ( $filterParts[2] == 'select' && $filterValue !=\"-1\"):\n $fieldDelimiter = $filterParts[3];\n $searchField = $fields[$fieldDelimiter-1];\n if(is_numeric($filterValue)){\n $q->addWhere($searchField .\" = ?\",$filterValue);\n }\n else\n $q->addWhere($searchField .\" like ?\",'%'.$filterValue.'%');\n \n // date range From\n \n elseif ( $filterParts[2] == 'dateFrom' ):\n $dateFrom = TK_Text::timeFormat($filterValue,'Y-m-d','d/m/Y');\n $fieldDelimiter = $filterParts[3];\n $searchField = $fields[$fieldDelimiter-1];\n $q->addWhere($searchField .\" >= ?\",$dateFrom);\n \n // date range To\n \n elseif ( $filterParts[2] == 'dateTo' ):\n $dateFrom = TK_Text::timeFormat($filterValue,'Y-m-d','d/m/Y');\n $fieldDelimiter = $filterParts[3];\n $searchField = $fields[$fieldDelimiter-1];\n $q->addWhere($searchField .\" <= ?\",$dateFrom);\n \n \n endif;\n \n endforeach;\n \n return $q;\n \n }", "title": "" }, { "docid": "e86778411ea31c3890027f9b1b1c575a", "score": "0.6098835", "text": "public function getFilterValues();", "title": "" }, { "docid": "b3d3065d75ec8f748e3e6bdc1de08791", "score": "0.60507464", "text": "private function getFields()\n {\n list($mainRequest, $pages) = $this->shopPrice(1, 0);\n $goodsL = $mainRequest->getList(1, 0); // получение лимитированного списка товаров\n\n /** заголовки (без модификаций) */\n $this->fields = array();\n // Нужно собрать информацию по полям по всем записям\n foreach ($goodsL[0] as $k => $v) {\n if (!empty($this->rusCols[$k]) && !in_array($k, array('id', 'shopIdGroup'))) {\n $this->fields[] = $k;\n }\n }\n }", "title": "" }, { "docid": "36e104ad501b8469589d03575ddbaba6", "score": "0.6047207", "text": "function GetQuickSearchFilterForField($fld, $arKeywords, $searchType, $dbid)\n{\n $defCond = SameText($searchType, \"OR\") ? \"OR\" : \"AND\";\n $arSql = []; // Array for SQL parts\n $arCond = []; // Array for search conditions\n $cnt = count($arKeywords);\n $j = 0; // Number of SQL parts\n for ($i = 0; $i < $cnt; $i++) {\n $keyword = $arKeywords[$i];\n $keyword = trim($keyword);\n if (Config(\"BASIC_SEARCH_IGNORE_PATTERN\") != \"\") {\n $keyword = preg_replace(Config(\"BASIC_SEARCH_IGNORE_PATTERN\"), \"\\\\\", $keyword);\n $ar = explode(\"\\\\\", $keyword);\n } else {\n $ar = [$keyword];\n }\n foreach ($ar as $keyword) {\n if ($keyword != \"\") {\n $wrk = \"\";\n if ($keyword == \"OR\" && $searchType == \"\") {\n if ($j > 0) {\n $arCond[$j - 1] = \"OR\";\n }\n } elseif ($keyword == Config(\"NULL_VALUE\")) {\n $wrk = $fld->Expression . \" IS NULL\";\n } elseif ($keyword == Config(\"NOT_NULL_VALUE\")) {\n $wrk = $fld->Expression . \" IS NOT NULL\";\n } elseif ($fld->IsVirtual && $fld->Visible) {\n $wrk = $fld->VirtualExpression . Like(QuotedValue(\"%\" . $keyword . \"%\", DATATYPE_STRING, $dbid), $dbid);\n } elseif ($fld->DataType != DATATYPE_NUMBER || is_numeric($keyword)) {\n $wrk = $fld->BasicSearchExpression . Like(QuotedValue(\"%\" . $keyword . \"%\", DATATYPE_STRING, $dbid), $dbid);\n }\n if ($wrk != \"\") {\n $arSql[$j] = $wrk;\n $arCond[$j] = $defCond;\n $j += 1;\n }\n }\n }\n }\n $cnt = count($arSql);\n $quoted = false;\n $sql = \"\";\n if ($cnt > 0) {\n for ($i = 0; $i < $cnt - 1; $i++) {\n if ($arCond[$i] == \"OR\") {\n if (!$quoted) {\n $sql .= \"(\";\n }\n $quoted = true;\n }\n $sql .= $arSql[$i];\n if ($quoted && $arCond[$i] != \"OR\") {\n $sql .= \")\";\n $quoted = false;\n }\n $sql .= \" \" . $arCond[$i] . \" \";\n }\n $sql .= $arSql[$cnt - 1];\n if ($quoted) {\n $sql .= \")\";\n }\n }\n return $sql;\n}", "title": "" }, { "docid": "741793bc2b8489773b3b2c0ed4c0f39e", "score": "0.60373247", "text": "static public function getSearchFieldList()\n\t{\n\t\treturn array_merge(array_diff(parent::getSearchFieldList(), array(\n\t\t\t\t'created_by', //we do not display this field (yet?)\n\t\t\t\t'updated_by', //we do not display this field (yet?)\n\t\t)), array(\n\t\t\t\t'mapped_imei',\n\t\t));\n\t}", "title": "" }, { "docid": "fe4f332769400339ec4f834c9a13efe4", "score": "0.6023489", "text": "public function getSearchItems();", "title": "" }, { "docid": "1cee3e3e31752ba3fe5ade2a06e49408", "score": "0.60183024", "text": "public function fieldsForFacets() {\n\t\t$fields = self::$facets;\n\t\tif ($this->FacetFields && $ff = $this->FacetFields->getValues()) {\n\t\t\t$fields = array();\n\t\t\t$type = (strlen($this->SearchType) ? $this->SearchType : 'Page'); \n\t\t\tforeach ($ff as $f) {\n\t\t\t\t$fields[] = $this->getSolr()->getSolrFieldName($f, $type);\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "cbbb406a2467dd8867c99bf0f3e2c617", "score": "0.60115504", "text": "public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->ref_campeonato) AND ( (is_scalar($data->ref_campeonato) AND $data->ref_campeonato !== '') OR (is_array($data->ref_campeonato) AND (!empty($data->ref_campeonato)) )) )\n {\n\n $filters[] = new TFilter('id', 'in', \"(select id from partida where ref_equipe_local in (select id from equipe where ref_categoria_campeonato in (select id from categoria_campeonato where ref_campeonato = {$data->ref_campeonato})) OR ref_equipe_visitante in (select id from equipe where ref_categoria_campeonato in (select id from categoria_campeonato where ref_campeonato = {$data->ref_campeonato})) )\");\n }\n\n if (isset($data->ref_categoria) AND ( (is_scalar($data->ref_categoria) AND $data->ref_categoria !== '') OR (is_array($data->ref_categoria) AND (!empty($data->ref_categoria)) )) )\n {\n\n $filters[] = new TFilter('id', 'in', \"(select id from partida where ref_equipe_local in (select id from equipe where ref_categoria_campeonato = $data->ref_categoria ) OR ref_equipe_visitante in (select id from equipe where ref_categoria_campeonato = $data->ref_categoria) )\");\n }\n\n if (isset($data->ref_equipe) AND ( (is_scalar($data->ref_equipe) AND $data->ref_equipe !== '') OR (is_array($data->ref_equipe) AND (!empty($data->ref_equipe)) )) )\n {\n\n $filters[] = new TFilter('id', 'in', \"(select id from partida where ref_equipe_local in (select id from equipe where id = $data->ref_equipe ) OR ref_equipe_visitante in (select id from equipe where id = $data->ref_equipe) )\");\n }\n\n\n if (isset($data->dt_partida) AND ( (is_scalar($data->dt_partida) AND $data->dt_partida !== '') OR (is_array($data->dt_partida) AND (!empty($data->dt_partida)) )) )\n {\n\n $dt = str_replace('/', '-', $data->dt_partida);\n $dt_usa = date('Y-m-d', strtotime($dt));\n\n $filters[] = new TFilter('dt_partida::date', '=', $dt_usa);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n $obj = new stdClass;\n $obj->ref_campeonato = $data->ref_campeonato;\n $obj->ref_categoria = $data->ref_categoria;\n $obj->ref_equipe = $data->ref_equipe;\n\n $this->fireEvents( $obj );\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }", "title": "" }, { "docid": "60ed6c7e434b993b53b157c524e422fc", "score": "0.6000115", "text": "public function getSearch();", "title": "" }, { "docid": "04bee858ba0faec91774a4a5935ef028", "score": "0.59983504", "text": "function GetQuickSearchFilter($flds, $arKeywords, $searchType, $searchAnyFields, $dbid = \"DB\")\n{\n // Search keyword in any fields\n if ((SameText($searchType, \"OR\") || SameText($searchType, \"AND\")) && $searchAnyFields) {\n $filter = \"\";\n foreach ($arKeywords as $keyword) {\n if ($keyword != \"\") {\n $ar = [$keyword];\n $thisFilter = array_reduce($flds, function ($res, $fld) use ($ar, $searchType, $dbid) {\n AddFilter($res, GetQuickSearchFilterForField($fld, $ar, $searchType, $dbid), \"OR\");\n return $res;\n }, \"\");\n AddFilter($filter, $thisFilter, $searchType);\n }\n }\n } else {\n $filter = array_reduce($flds, function ($res, $fld) use ($arKeywords, $searchType, $dbid) {\n AddFilter($res, GetQuickSearchFilterForField($fld, $arKeywords, $searchType, $dbid), \"OR\");\n return $res;\n }, \"\");\n }\n return $filter;\n}", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.5979762", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.5979762", "text": "abstract public function getFields();", "title": "" }, { "docid": "34abc1674fdb9438e63d244dd5ab2c10", "score": "0.5971653", "text": "function sfa_TOURINSOFT_FIELD_NAME_field_filter(&$filtered_values, $tourinsoft_data, &$fields, $node, $connector_params, $virtual_type_params) {}", "title": "" }, { "docid": "01d570ea1ddeaf956371ab98e2bded96", "score": "0.59472555", "text": "function pullFilterCriteria() {\n $filterCriteria = array();\n\n $filterSelections = array(\n 'filterStatus' => 'ap_status'\n , 'filterLastName' => 'ap_lastname'\n , 'filterSession' => 'ap_session'\n );\n\n if (filterButtonClicked()) {\n foreach ($filterSelections as $name => $column) {\n if ($_POST[$name] != \"[BLANK]\") {\n $filterCriteria[$column] = trim(sanitize_text_field($_POST[$name]));\n }\n }\n }\n\n return $filterCriteria;\n}", "title": "" }, { "docid": "550648520882b60d63ab94584a752b66", "score": "0.59372026", "text": "function searchFields($idx = '', $parent = 1)\n\t{\n\t\t$url\t\t= $this->baseurl . 'searchfields/' . $idx . '?filterField=parentPtID&filterValue=' . $parent;\n\t\t$items\t= $this->fetchResponse($url);\n\t\t\n\t\tif(is_array($items) && ($items['error'] >= 200 || $items['error'] < 300))\n\t\t\treturn $items;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "dccf8e9551f9568047048f0269fcb236", "score": "0.5930889", "text": "public function getFields()\n {\n return apply_filters(HooksInterface::SETTINGS_FIELDS_FILTER, array());\n }", "title": "" }, { "docid": "70343f4bd36bfdb4967737df64f83c89", "score": "0.5926667", "text": "public function getItemsWhere()\n {\n if ($filters = $this->getFilterSettings()) {\n $filter = array();\n \n foreach ($filters as $varName => $settings) {\n if ($values = $this->getFilterValue($varName)) {\n $filterTitle = $varName;\n \n $relation = Singleton($this->stat('item_class'))->$varName();\n \n //If we are a has_many or Many_many we need the . notation \"FieldName.ID\"\n if (get_class($relation) == \"UnsavedRelationList\") {\n $filterTitle .= \".ID\";\n }\n //Otherwise it's a has one so the Column is \"FieldNameID\"\n else {\n $filterTitle .= \"ID\";\n }\n \n if ($settings['MatchAll']) {\n $filterTitle .=\":DataObjectAsPageMatchAll\";\n }\n\n $filter[$filterTitle] = explode(\",\", $values);\n }\n }\n\n //Set the type of filter and return\n return $filter ? array('filter' => $filter) : false;\n }\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.5926611", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.5926611", "text": "public function fields();", "title": "" }, { "docid": "bb80b3d14bef9c14f82dd0bd3d7f1872", "score": "0.5898384", "text": "function getFilter() ;", "title": "" }, { "docid": "bd754848be5f13faf76cf84601195a4f", "score": "0.5883504", "text": "function fieldsForRental(){\n \t$qb = Model::getEM()->createQueryBuilder();\n $qb->select(\"d\")\n ->from(\"Publication\", \"p\")\n ->andWhere(\"p.category = 'fields' \")\n ->andWhere(\"p.reason = 'rental'\");\n return $qb;\n }", "title": "" }, { "docid": "7efcc1b627fc095f141255abe1e98bd4", "score": "0.58719957", "text": "function rawSearchOptions() {\n $tab = parent::rawSearchOptions();\n\n $tab[] = [\n 'id' => '4',\n 'table' => $this->getTable(),\n 'field' => 'itemtype',\n 'name' => __('Type'),\n 'massiveaction' => false,\n 'datatype' => 'itemtypename',\n 'forcegroupby' => true\n ];\n\n $tab[] = [\n 'id' => '6',\n 'table' => $this->getTable(),\n 'field' => 'field',\n 'name' => __('Field'),\n 'massiveaction' => false,\n 'datatype' => 'specific',\n 'additionalfields' => [\n '0' => 'itemtype'\n ]\n ];\n\n $tab[] = [\n 'id' => '7',\n 'table' => $this->getTable(),\n 'field' => 'value',\n 'name' => __('Value'),\n 'datatype' => 'specific',\n 'additionalfields' => [\n '0' => 'itemtype',\n '1' => 'field'\n ],\n 'massiveaction' => false\n ];\n\n return $tab;\n }", "title": "" }, { "docid": "4da5b90a17ae0d1208703dc6f63f7e36", "score": "0.5871918", "text": "public function onGetFields()\n\t{\n\t\tif ($this->canRun)\n\t\t{\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$sql = 'SELECT name AS `value`, name AS `text` FROM #__comprofiler_fields WHERE `table`=\"#__comprofiler\"';\n\t\t\t$db->setQuery($sql);\n\n\t\t\treturn $db->loadObjectList();\n\t\t}\n\t}", "title": "" }, { "docid": "07e6e50f35d336c3c8b2cc39f59fa2fb", "score": "0.585754", "text": "public function searchField(): array\n {\n return $this->metaServices->searchField((string)Request::get('search'));\n }", "title": "" }, { "docid": "b7fbfe144ca9c1d034bb7ebf8120f86a", "score": "0.5854997", "text": "public abstract function getFields();", "title": "" }, { "docid": "0acf40dfe666751be7353529a4e45f76", "score": "0.5854434", "text": "public function getFilterFields(): array\n {\n return $this->filterFields;\n }", "title": "" }, { "docid": "a45f52f0dc2927e994680ca7bbe133be", "score": "0.5850001", "text": "function fieldsForSale(){\n \t$qb = Model::getEM()->createQueryBuilder();\n $qb->select(\"d\")\n ->from(\"Publication\", \"p\")\n ->andWhere(\"p.category = 'fields'\")\n ->andWhere(\"p.reason = 'sale'\");\n return $qb;\n }", "title": "" }, { "docid": "b552c5417d397906f7af72181dabf7ca", "score": "0.5845807", "text": "public function fields() {\n\n extract($this->routeOptions(func_get_args()));\n\n $sql = \"SELECT id, name, handle, type, settings FROM \".$this->prefix.\"fields \";\n $sql .= \"ORDER by id\" ;\n\n $command = Craft::$app->db->createCommand($sql);\n $results = $command->queryAll();\n\n return $results;\n\n }", "title": "" }, { "docid": "7ba60bdc544fe6abb717b1dc29ae8c59", "score": "0.58454156", "text": "public function getFilterList()\n\t{\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$filterList = \"\";\n\t\t$savedFilterList = \"\";\n\n\t\t// Field property_id\n\t\t$wrk = \"\";\n\t\tif ($this->property_id->AdvancedSearch->SearchValue != \"\" || $this->property_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_property_id\\\":\\\"\" . JsEncode($this->property_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_property_id\\\":\\\"\" . JsEncode($this->property_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_property_id\\\":\\\"\" . JsEncode($this->property_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_property_id\\\":\\\"\" . JsEncode($this->property_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_property_id\\\":\\\"\" . JsEncode($this->property_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field group_id\n\t\t$wrk = \"\";\n\t\tif ($this->group_id->AdvancedSearch->SearchValue != \"\" || $this->group_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_group_id\\\":\\\"\" . JsEncode($this->group_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_group_id\\\":\\\"\" . JsEncode($this->group_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_group_id\\\":\\\"\" . JsEncode($this->group_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_group_id\\\":\\\"\" . JsEncode($this->group_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_group_id\\\":\\\"\" . JsEncode($this->group_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field Code\n\t\t$wrk = \"\";\n\t\tif ($this->Code->AdvancedSearch->SearchValue != \"\" || $this->Code->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_Code\\\":\\\"\" . JsEncode($this->Code->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_Code\\\":\\\"\" . JsEncode($this->Code->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_Code\\\":\\\"\" . JsEncode($this->Code->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_Code\\\":\\\"\" . JsEncode($this->Code->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_Code\\\":\\\"\" . JsEncode($this->Code->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field Description\n\t\t$wrk = \"\";\n\t\tif ($this->Description->AdvancedSearch->SearchValue != \"\" || $this->Description->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_Description\\\":\\\"\" . JsEncode($this->Description->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_Description\\\":\\\"\" . JsEncode($this->Description->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_Description\\\":\\\"\" . JsEncode($this->Description->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_Description\\\":\\\"\" . JsEncode($this->Description->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_Description\\\":\\\"\" . JsEncode($this->Description->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field brand_id\n\t\t$wrk = \"\";\n\t\tif ($this->brand_id->AdvancedSearch->SearchValue != \"\" || $this->brand_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_brand_id\\\":\\\"\" . JsEncode($this->brand_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_brand_id\\\":\\\"\" . JsEncode($this->brand_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_brand_id\\\":\\\"\" . JsEncode($this->brand_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_brand_id\\\":\\\"\" . JsEncode($this->brand_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_brand_id\\\":\\\"\" . JsEncode($this->brand_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field type_id\n\t\t$wrk = \"\";\n\t\tif ($this->type_id->AdvancedSearch->SearchValue != \"\" || $this->type_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_type_id\\\":\\\"\" . JsEncode($this->type_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_type_id\\\":\\\"\" . JsEncode($this->type_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_type_id\\\":\\\"\" . JsEncode($this->type_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_type_id\\\":\\\"\" . JsEncode($this->type_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_type_id\\\":\\\"\" . JsEncode($this->type_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field signature_id\n\t\t$wrk = \"\";\n\t\tif ($this->signature_id->AdvancedSearch->SearchValue != \"\" || $this->signature_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_signature_id\\\":\\\"\" . JsEncode($this->signature_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_signature_id\\\":\\\"\" . JsEncode($this->signature_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_signature_id\\\":\\\"\" . JsEncode($this->signature_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_signature_id\\\":\\\"\" . JsEncode($this->signature_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_signature_id\\\":\\\"\" . JsEncode($this->signature_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field department_id\n\t\t$wrk = \"\";\n\t\tif ($this->department_id->AdvancedSearch->SearchValue != \"\" || $this->department_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_department_id\\\":\\\"\" . JsEncode($this->department_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_department_id\\\":\\\"\" . JsEncode($this->department_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_department_id\\\":\\\"\" . JsEncode($this->department_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_department_id\\\":\\\"\" . JsEncode($this->department_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_department_id\\\":\\\"\" . JsEncode($this->department_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field location_id\n\t\t$wrk = \"\";\n\t\tif ($this->location_id->AdvancedSearch->SearchValue != \"\" || $this->location_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_location_id\\\":\\\"\" . JsEncode($this->location_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_location_id\\\":\\\"\" . JsEncode($this->location_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_location_id\\\":\\\"\" . JsEncode($this->location_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_location_id\\\":\\\"\" . JsEncode($this->location_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_location_id\\\":\\\"\" . JsEncode($this->location_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field cond_id\n\t\t$wrk = \"\";\n\t\tif ($this->cond_id->AdvancedSearch->SearchValue != \"\" || $this->cond_id->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_cond_id\\\":\\\"\" . JsEncode($this->cond_id->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_cond_id\\\":\\\"\" . JsEncode($this->cond_id->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_cond_id\\\":\\\"\" . JsEncode($this->cond_id->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_cond_id\\\":\\\"\" . JsEncode($this->cond_id->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_cond_id\\\":\\\"\" . JsEncode($this->cond_id->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field Remarks\n\t\t$wrk = \"\";\n\t\tif ($this->Remarks->AdvancedSearch->SearchValue != \"\" || $this->Remarks->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_Remarks\\\":\\\"\" . JsEncode($this->Remarks->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_Remarks\\\":\\\"\" . JsEncode($this->Remarks->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_Remarks\\\":\\\"\" . JsEncode($this->Remarks->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_Remarks\\\":\\\"\" . JsEncode($this->Remarks->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_Remarks\\\":\\\"\" . JsEncode($this->Remarks->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Field ProcurementDate\n\t\t$wrk = \"\";\n\t\tif ($this->ProcurementDate->AdvancedSearch->SearchValue != \"\" || $this->ProcurementDate->AdvancedSearch->SearchValue2 != \"\") {\n\t\t\t$wrk = \"\\\"x_ProcurementDate\\\":\\\"\" . JsEncode($this->ProcurementDate->AdvancedSearch->SearchValue) . \"\\\",\" .\n\t\t\t\t\"\\\"z_ProcurementDate\\\":\\\"\" . JsEncode($this->ProcurementDate->AdvancedSearch->SearchOperator) . \"\\\",\" .\n\t\t\t\t\"\\\"v_ProcurementDate\\\":\\\"\" . JsEncode($this->ProcurementDate->AdvancedSearch->SearchCondition) . \"\\\",\" .\n\t\t\t\t\"\\\"y_ProcurementDate\\\":\\\"\" . JsEncode($this->ProcurementDate->AdvancedSearch->SearchValue2) . \"\\\",\" .\n\t\t\t\t\"\\\"w_ProcurementDate\\\":\\\"\" . JsEncode($this->ProcurementDate->AdvancedSearch->SearchOperator2) . \"\\\"\";\n\t\t}\n\t\tif ($wrk != \"\") {\n\t\t\tif ($filterList != \"\") $filterList .= \",\";\n\t\t\t$filterList .= $wrk;\n\t\t}\n\n\t\t// Return filter list in json\n\t\tif ($filterList != \"\")\n\t\t\t$filterList = \"\\\"data\\\":{\" . $filterList . \"}\";\n\t\tif ($savedFilterList != \"\")\n\t\t\t$filterList = Concat($filterList, \"\\\"filters\\\":\" . $savedFilterList, \",\");\n\t\treturn ($filterList != \"\") ? \"{\" . $filterList . \"}\" : \"null\";\n\t}", "title": "" }, { "docid": "0266f1f0dea4c1100c7c9c5ae84ea788", "score": "0.58286566", "text": "function cp_custom_search_fields() {\n\tglobal $wpdb;\n\n\t$custom_fields = array();\n\n\t$sql = \"SELECT field_name FROM $wpdb->cp_ad_fields p WHERE p.field_name LIKE 'cp_%' \";\n\t$results = $wpdb->get_results( $sql );\n\n\tif ( $results ) {\n\t\tforeach ( $results as $result ) {\n\t\t\t// put the fields into an array\n\t\t\t$custom_fields[] = $result->field_name;\n\t\t}\n\t}\n\n\treturn $custom_fields;\n}", "title": "" }, { "docid": "04fbc249a6688d4bf9dcdbfe9216b4a4", "score": "0.58246034", "text": "function get_acf_search_fields(){\n\n $list_searcheable_acf = array(\n \"direktutbetalning\", \n \"utan_uc\", \n \"helgutbetalning\", \n \"med_laginkomst\", \n \"oppet_nu\", \n \"med_betalningsanmarkning\", \n \"med_skulder\", \n \"18-20_ar\"\n );\n\n return $list_searcheable_acf;\n\n}", "title": "" }, { "docid": "2a2eeec6ecb0250507da6bb3f5fbbb39", "score": "0.58140653", "text": "public function getFields($type = null){\n $this->fieldFilter = $type;\n return\n is_null($type)\n ? $this->aFields\n : array_filter($this->aFields, array($this, 'cbFilterFields'));\n }", "title": "" }, { "docid": "58f83f4f5d5f9262b3124788ed664de7", "score": "0.5813033", "text": "public function get_search_set() {\n return $this->filter;\n }", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.5802342", "text": "function getFilters();", "title": "" }, { "docid": "53910a7132b2e249cb576d5a6a3acdf6", "score": "0.58010614", "text": "protected function _filterList()\n {\n $boolNoFilter = (int)$this->_getParam('nofilter', 0);\n\tif ($boolNoFilter) {\n return;\n\t}\n\n $this->_objectForm = $this->getFormObject( 'Filter' );\n \t$this->_objectForm->createElements();\n $arrParams = $this->_getAllParams();\n\n $this->view->formFilter = $this->_objectForm;\n if ($this->_objectForm->isValid($arrParams)){\n $arrValues = $this->_objectForm->getValues();\n $this->_objectForm->setDefaults($arrValues);\n\n foreach ($arrValues as $strFieldName => $strFieldValue) {\n if ($strFieldValue !== '' && $strFieldValue !== null) {\n\n $this->_filterField($strFieldName, $strFieldValue);\n }\n }\n }\n }", "title": "" }, { "docid": "e141a5e45973aa14facc1330dc984f5a", "score": "0.57982266", "text": "public function getSearchableFields()\n {\n $searchable = new ArrayCollection();\n foreach ($this->getFields() as $field) {\n if ($field->isSearchable()) {\n $searchable->add($field);\n }\n }\n\n return $searchable;\n }", "title": "" }, { "docid": "49be8dfda7f8c66b12c3a9382fd42353", "score": "0.57895523", "text": "protected abstract function getFields();", "title": "" }, { "docid": "95dcbe303ec6d8452f719d90ed50f013", "score": "0.57785165", "text": "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\") {\n\t\t\t$sSavedFilterList = isset($UserProfile) ? $UserProfile->GetSearchFilters(CurrentUserName(), \"fvw_bill_ranaplistsrch\") : \"\";\n\t\t} else {\n\t\t\t$sSavedFilterList = \"\";\n\t\t}\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_admission->AdvancedSearch->ToJSON(), \",\"); // Field id_admission\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nomr->AdvancedSearch->ToJSON(), \",\"); // Field nomr\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ket_nama->AdvancedSearch->ToJSON(), \",\"); // Field ket_nama\n\t\t$sFilterList = ew_Concat($sFilterList, $this->parent_nomr->AdvancedSearch->ToJSON(), \",\"); // Field parent_nomr\n\t\t$sFilterList = ew_Concat($sFilterList, $this->dokterpengirim->AdvancedSearch->ToJSON(), \",\"); // Field dokterpengirim\n\t\t$sFilterList = ew_Concat($sFilterList, $this->statusbayar->AdvancedSearch->ToJSON(), \",\"); // Field statusbayar\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kirimdari->AdvancedSearch->ToJSON(), \",\"); // Field kirimdari\n\t\t$sFilterList = ew_Concat($sFilterList, $this->keluargadekat->AdvancedSearch->ToJSON(), \",\"); // Field keluargadekat\n\t\t$sFilterList = ew_Concat($sFilterList, $this->panggungjawab->AdvancedSearch->ToJSON(), \",\"); // Field panggungjawab\n\t\t$sFilterList = ew_Concat($sFilterList, $this->masukrs->AdvancedSearch->ToJSON(), \",\"); // Field masukrs\n\t\t$sFilterList = ew_Concat($sFilterList, $this->noruang->AdvancedSearch->ToJSON(), \",\"); // Field noruang\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tempat_tidur_id->AdvancedSearch->ToJSON(), \",\"); // Field tempat_tidur_id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->keluarrs->AdvancedSearch->ToJSON(), \",\"); // Field keluarrs\n\t\t$sFilterList = ew_Concat($sFilterList, $this->icd_masuk->AdvancedSearch->ToJSON(), \",\"); // Field icd_masuk\n\t\t$sFilterList = ew_Concat($sFilterList, $this->icd_keluar->AdvancedSearch->ToJSON(), \",\"); // Field icd_keluar\n\t\t$sFilterList = ew_Concat($sFilterList, $this->NIP->AdvancedSearch->ToJSON(), \",\"); // Field NIP\n\t\t$sFilterList = ew_Concat($sFilterList, $this->kd_rujuk->AdvancedSearch->ToJSON(), \",\"); // Field kd_rujuk\n\t\t$sFilterList = ew_Concat($sFilterList, $this->st_bayar->AdvancedSearch->ToJSON(), \",\"); // Field st_bayar\n\t\t$sFilterList = ew_Concat($sFilterList, $this->dokter_penanggungjawab->AdvancedSearch->ToJSON(), \",\"); // Field dokter_penanggungjawab\n\t\t$sFilterList = ew_Concat($sFilterList, $this->perawat->AdvancedSearch->ToJSON(), \",\"); // Field perawat\n\t\t$sFilterList = ew_Concat($sFilterList, $this->KELASPERAWATAN_ID->AdvancedSearch->ToJSON(), \",\"); // Field KELASPERAWATAN_ID\n\t\t$sFilterList = ew_Concat($sFilterList, $this->NO_SKP->AdvancedSearch->ToJSON(), \",\"); // Field NO_SKP\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ket_tgllahir->AdvancedSearch->ToJSON(), \",\"); // Field ket_tgllahir\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ket_alamat->AdvancedSearch->ToJSON(), \",\"); // Field ket_alamat\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ket_jeniskelamin->AdvancedSearch->ToJSON(), \",\"); // Field ket_jeniskelamin\n\t\t$sFilterList = ew_Concat($sFilterList, $this->ket_title->AdvancedSearch->ToJSON(), \",\"); // Field ket_title\n\t\t$sFilterList = ew_Concat($sFilterList, $this->grup_ruang_id->AdvancedSearch->ToJSON(), \",\"); // Field grup_ruang_id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nott->AdvancedSearch->ToJSON(), \",\"); // Field nott\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "title": "" }, { "docid": "6f117d0cfbefeff102d3c1acabc3571b", "score": "0.57662857", "text": "public function getFilterableFieldSettings()\n {\n return ilDclTableViewFieldSetting::where(array(\"tableview_id\" => $this->id, 'in_filter' => 1))->get();\n }", "title": "" }, { "docid": "fb3ebc14be1322c54c0afcb1d085ab9d", "score": "0.5760259", "text": "public function getSearchableFields(): Collection\n {\n return $this->getFields()->filter(function (Field $field) {\n return $field->isSearchable();\n });\n }", "title": "" }, { "docid": "d240db108591ea1e604a4bb128425559", "score": "0.5758854", "text": "function getDetailViewAndOrField($focus, $field, $value, $view){\r\n\t$focusid = $focus->id;\r\n\t$queryField = \"Select andorfilterfields from pm_process_filter_table where process_id = '$focusid' \";\r\n\t$resultQueryField = $focus->db->query($queryField, true);\r\n\t$rowFieldList = $focus->db->fetchByAssoc($resultQueryField);\r\n\t$field = $rowFieldList['andorfilterfields'];\r\n\tif ($field != '') {\r\n\t\t$fields = $field; \r\n\r\n\t}\r\n\telse{\r\n\t\t$fields = 'N/A';\r\n\t}\r\n\treturn $fields;\r\n}", "title": "" }, { "docid": "fe503a282401e39a889a4bc3f0f3bd32", "score": "0.5752921", "text": "protected function findResults() {\n\n $keys = $this->keywords;\n\n // Build matching conditions.\n $query = $this->database\n ->select('search_index', 'i', array('target' => 'replica'))\n ->extend('Drupal\\search\\SearchQuery')\n ->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender');\n\n // Join on {contact} and {users_field_data} to get user's published status.\n // This join on {contact} also serves the advanced search items\n // (in $this->advanced) that are in {contact}.\n $query->join('contact', 'c', 'c.id = i.sid');\n $query->join('users_field_data', 'ufd', 'ufd.uid = c.user_id');\n $query->condition('ufd.status', 1);\n\n $query\n ->searchExpression($keys, $this->getPluginId());\n\n // @todo ===============\n // Handle advanced search filters in the f query string.\n // \\Drupal::request()->query->get('f') is an array that looks like this in\n // the URL: ?f[]=first_name:Jane&f[]=gender:f\n // So $parameters['f'] looks like:\n // array('first_name:Jane', 'gender:f');\n // We need to parse this out into query conditions, some of which go into\n // the keywords string, and some of which are separate conditions.\n //\n // Note: advanced form fields are added in searchFormAlter(),\n // and the URL containing the \"f\" parameter is built in\n // buildSearchUrlQuery().\n $parameters = $this->getParameters();\n if (!empty($parameters['f']) && is_array($parameters['f'])) {\n // @todo This loop should probably be moved to a helper function.\n $filters = array();\n // Match any query value that is an expected option and a value\n // separated by ':' like 'first_name:Jane'.\n $pattern = '/^(' . implode('|', array_keys($this->advanced)) . '):([^ ]*)/i';\n foreach ($parameters['f'] as $item) {\n if (preg_match($pattern, $item, $m)) {\n // Use the matched value as the array key to eliminate duplicates.\n $filters[$m[1]][$m[2]] = $m[2];\n }\n }\n\n // Now turn these into query conditions. This assumes that everything in\n // $filters is a known type of advanced search as defined in\n // $this->advanced.\n foreach ($filters as $option => $matched) {\n $info = $this->advanced[$option];\n // Insert additional conditions. By default, all use the OR operator.\n $operator = empty($info['operator']) ? 'OR' : $info['operator'];\n $where = new Condition($operator);\n foreach ($matched as $value) {\n $where->condition($info['column'], $value);\n }\n $query->condition($where);\n if (!empty($info['join'])) {\n $query->join($info['join']['table'], $info['join']['alias'], $info['join']['condition']);\n }\n }\n }\n // ===============\n // Add the ranking expressions.\n $this->addFedoraResourceRankings($query);\n\n // Run the query.\n $find = $query\n // Add the language code of the indexed item to the result of the query,\n // since the entity will be rendered using the respective language.\n ->fields('i', array('langcode'))\n // And since SearchQuery makes these into GROUP BY queries, if we add\n // a field, for PostgreSQL we also need to make it an aggregate or a\n // GROUP BY. In this case, we want GROUP BY.\n ->groupBy('i.langcode')\n ->limit(10)\n ->execute();\n\n // Check query status and set messages if needed.\n $status = $query->getStatus();\n\n if ($status & SearchQuery::EXPRESSIONS_IGNORED) {\n drupal_set_message($this->t('Your search used too many AND/OR expressions. Only the first @count terms were included in this search.', array('@count' => $this->searchSettings->get('and_or_limit'))), 'warning');\n }\n\n if ($status & SearchQuery::LOWER_CASE_OR) {\n drupal_set_message($this->t('Search for either of the two terms with uppercase OR. For example, cats OR dogs.'), 'warning');\n }\n\n if ($status & SearchQuery::NO_POSITIVE_KEYWORDS) {\n drupal_set_message($this->formatPlural($this->searchSettings->get('index.minimum_word_size'), 'You must include at least one keyword to match in the content, and punctuation is ignored.', 'You must include at least one keyword to match in the content. Keywords must be at least @count characters, and punctuation is ignored.'), 'warning');\n }\n\n return $find;\n }", "title": "" }, { "docid": "e7c5cfc932e1795ffa3ea403b2e18d3f", "score": "0.5749254", "text": "public function selectFields()\t{ return $this->_select('fields'); }", "title": "" }, { "docid": "fa6920b4d32e24819a4ecb3b4e78efc0", "score": "0.5730625", "text": "function fields(){\r\n\t\t\t\t\r\n\t\t$query = 'fldFirstName=\"'.$this->firstName.'\", '.\r\n\t\t\t\t'fldLastName=\"'.$this->lastName.'\", '.\r\n\t\t\t\t'fldInstrument=\"'.$this->instrument.'\", '.\r\n\t\t\t\t'fldTown=\"'.$this->town.'\", '.\r\n\t\t\t\t'fldState=\"'.$this->state.'\", '.\r\n\t\t\t\t'fldSmokes=\"'.$this->smokes.'\", '.\r\n\t\t\t\t'fldSmokingAllowed=\"'.$this->smokingAllowed.'\", '.\r\n\t\t\t\t'fldAllergy=\"'.$this->allergy.'\", '.\r\n\t\t\t\t'fldAllrgCats=\"'.$this->allrgCats.'\", '.\r\n\t\t\t\t'fldAllrgDogs=\"'.$this->allrgDogs.'\", '.\r\n\t\t\t\t'fldAllrgSmoke=\"'.$this->allrgSmoke.'\", '.\r\n\t\t\t\t'fldLikeBikePath=\"'.$this->likeBikePath.'\", '.\r\n\t\t\t\t'fldLikeDownTown=\"'.$this->likeDowntown.'\", '.\r\n\t\t\t\t'fldCarpools=\"'.$this->carpools.'\", '.\r\n\t\t\t\t'fkPrimaryHost=\"'.$this->primaryHost.'\", '.\r\n\t\t\t\t'fldNotes=\"'.$this->notes.'\"';\r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "91370a7df2fd8ab70bbaf6f99e315ab1", "score": "0.5728233", "text": "public static function selectFields() {\n\t\treturn array(\n\t\t\t'iw_prefix',\n\t\t\t'iw_url',\n\t\t\t'iw_api',\n\t\t\t'iw_wikiid',\n\t\t\t'iw_local',\n\t\t\t'iw_trans'\n\t\t);\n\t}", "title": "" }, { "docid": "f5a4aac5265ad3b69aad1f27740732f0", "score": "0.5722914", "text": "public function fieldsForFacets() {\n\t\t\t$fields = self::$facets;\n\n\t\t\t$facetFields = array('FacetFields', 'CustomFacetFields');\n\t\t\tif (!$fields) {\n\t\t\t\t$fields = array();\n\t\t\t}\n\n\t\t\tforeach ($facetFields as $name) {\n\t\t\t\tif ($this->owner->$name && $ff = $this->owner->$name->getValues()) {\n\t\t\t\t\t$types = $this->owner->searchableTypes('Page');\n\t\t\t\t\tforeach ($ff as $f) {\n\t\t\t\t\t\t$fieldName = $this->getSolr()->getSolrFieldName($f, $types);\n\t\t\t\t\t\tif (!$fieldName) {\n\t\t\t\t\t\t\t$fieldName = $f;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$fields[] = $fieldName;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $fields;\n\t\t}", "title": "" }, { "docid": "a4641d07725ad20588bb7c4800cdf793", "score": "0.5720773", "text": "public function getSearch()\n {\n return array(\n 'User.username' => array('type' => 'text', 'label' => __(\"Username\")),\n 'User.email' => array('type' => 'email', 'label' => __(\"Email\")),\n 'User.balance' => array('type' => 'number', 'label' => __(\"Balance\")),\n 'User.registration_date' => $this->getFieldHtmlConfig('date'),\n 'User.last_visit' => $this->getFieldHtmlConfig('date')\n\n );\n }", "title": "" }, { "docid": "cf8bfcd0fe059ef6dfe62190a53aa08d", "score": "0.5718277", "text": "public function generateSearchWhere($add_custom_fields = false, $module='') {\n global $timedate;\n\n $db = $this->seed->db;\n $this->searchColumns = array () ;\n $values = $this->searchFields;\n\n $where_clauses = array();\n $like_char = '%';\n $table_name = $this->seed->object_name;\n $this->seed->fill_in_additional_detail_fields();\n\n //rrs check for team_id\n if(!empty($this->searchFields['team_id']) && !empty($this->searchFields['team_id']['value'])){\n if(!empty($this->searchFields['team_name'])){\n unset($this->searchFields['team_name']);\n }\n }\n\n foreach($this->searchFields as $field=>$parms) {\n $customField = false;\n // Jenny - Bug 7462: We need a type check here to avoid database errors\n // when searching for numeric fields. This is a temporary fix until we have\n // a generic search form validation mechanism.\n $type = !empty($this->seed->field_defs[$field]['type']) ? $this->seed->field_defs[$field]['type'] : '';\n\n //If range search is enabled for the field, we first check if this is the starting range\n if(!empty($parms['enable_range_search']) && empty($type))\n {\n if(preg_match('/^start_range_(.*?)$/', $field, $match))\n {\n $real_field = $match[1];\n $start_field = 'start_range_' . $real_field;\n $end_field = 'end_range_' . $real_field;\n\n if(isset($this->searchFields[$start_field]['value']) && isset($this->searchFields[$end_field]['value']))\n {\n $this->searchFields[$real_field]['value'] = $this->searchFields[$start_field]['value'] . '<>' . $this->searchFields[$end_field]['value'];\n $this->searchFields[$real_field]['operator'] = 'between';\n $parms['value'] = $this->searchFields[$real_field]['value'];\n $parms['operator'] = 'between';\n\n $field_type = isset($this->seed->field_defs[$real_field]['type'])\n ? $this->seed->field_defs[$real_field]['type']\n : '';\n if($field_type == 'datetimecombo' || $field_type == 'datetime')\n {\n $type = $field_type;\n }\n\n $field = $real_field;\n unset($this->searchFields[$end_field]['value']);\n }\n } else if (preg_match('/^range_(.*?)$/', $field, $match) && isset($this->searchFields[$field]['value'])) {\n $real_field = $match[1];\n\n //Special case for datetime and datetimecombo fields. By setting the type here we allow an actual between search\n if(in_array($parms['operator'], array('=', 'between', \"not_equal\", 'less_than', 'greater_than', 'less_than_equals', 'greater_than_equals')))\n {\n $field_type = isset($this->seed->field_defs[$real_field]['type'])\n ? $this->seed->field_defs[$real_field]['type']\n : '';\n\n if (strtolower($field_type) == 'readonly'\n && isset($this->seed->field_defs[$real_field]['dbType'])) {\n $field_type = $this->seed->field_defs[$real_field]['dbType'];\n }\n if($field_type == 'datetimecombo' || $field_type == 'datetime' || $field_type == 'int')\n {\n $type = $field_type;\n }\n }\n\n $this->searchFields[$real_field]['value'] = $this->searchFields[$field]['value'];\n $this->searchFields[$real_field]['operator'] = $this->searchFields[$field]['operator'];\n $params['value'] = $this->searchFields[$field]['value'];\n $params['operator'] = $this->searchFields[$field]['operator'];\n unset($this->searchFields[$field]['value']);\n $field = $real_field;\n } else {\n //Skip this range search field, it is the end field THIS IS NEEDED or the end range date will break the query\n continue;\n }\n }\n\n //Test to mark whether or not the field is a custom field\n if (!empty($this->seed->field_defs[$field]['source'])\n && ($this->seed->field_defs[$field]['source'] == 'custom_fields' ||\n //Non-db custom fields, such as custom relates\n ($this->seed->field_defs[$field]['source'] == 'non-db'\n && (!empty($this->seed->field_defs[$field]['custom_module'])\n || isset($this->seed->field_defs[$field]['ext2']))))) {\n $customField = true;\n }\n\n if ($type == 'int' && isset($parms['value']) && !empty($parms['value'])) {\n $intField = SugarFieldHandler::getSugarField('int');\n $newVal = $intField->getSearchWhereValue($parms['value']);\n $parms['value'] = $newVal;\n } elseif($type == 'html' && $customField) {\n continue;\n }\n\n if(isset($parms['value']) && $parms['value'] != \"\") {\n\n $operator = $db->isNumericType($type)?'=':'like';\n if(!empty($parms['operator'])) {\n $operator = strtolower($parms['operator']);\n }\n\n if(is_array($parms['value'])) {\n $field_value = '';\n\n // always construct the where clause for multiselects using the 'like' form to handle combinations of multiple $vals and multiple $parms\n if (!empty($this->seed->field_defs[$field]['isMultiSelect'])\n && $this->seed->field_defs[$field]['isMultiSelect']) {\n // construct the query for multenums\n // use the 'like' query as both custom and OOB multienums are implemented with types that cannot be used with an 'in'\n $operator = 'custom_enum';\n $table_name = $this->seed->table_name ;\n if ($customField)\n $table_name .= \"_cstm\" ;\n $db_field = $table_name . \".\" . $field;\n\n foreach($parms['value'] as $val) {\n if($val != ' ' and $val != '') {\n $qVal = $db->quote($val);\n if (!empty($field_value)) {\n $field_value .= ' or ';\n }\n $field_value .= \"$db_field like '%^$qVal^%'\";\n } else {\n $field_value .= '('.$db_field . ' IS NULL or '.$db_field.\"='^^' or \".$db_field.\"='')\";\n }\n }\n\n } else {\n $operator = $operator != 'subquery' ? 'in' : $operator;\n foreach($parms['value'] as $val) {\n if($val != ' ' and $val != '') {\n if (!empty($field_value)) {\n $field_value .= ',';\n }\n $field_value .= $db->quoteType($type, $val);\n }\n // Bug 41209: adding a new operator \"isnull\" here\n // to handle the case when blank is selected from dropdown.\n // In that case, $val is empty.\n // When $val is empty, we need to use \"IS NULL\",\n // as \"in (null)\" won't work\n else if ($operator=='in') {\n $operator = 'isnull';\n }\n }\n }\n\n } else {\n $field_value = $parms['value'];\n }\n\n //set db_fields array.\n if(!isset($parms['db_field'])) {\n $parms['db_field'] = array($field);\n }\n $where = '';\n //This if-else block handles the shortcut checkbox selections for \"My Items\" and \"Closed Only\"\n if(!empty($parms['my_items'])) {\n if( $parms['value'] == false ) {\n continue;\n } else {\n //my items is checked.\n global $current_user;\n $field_value = $db->quote($current_user->id);\n $operator = '=' ;\n }\n } else if(!empty($parms['closed_values']) && is_array($parms['closed_values'])) {\n if( $parms['value'] == false ) {\n continue;\n } else {\n $field_value = '';\n foreach($parms['closed_values'] as $closed_value)\n {\n $field_value .= \",\" . $db->quoted($closed_value);\n }\n $field_value = substr($field_value, 1);\n }\n }\n\n $itr = 0;\n\n if($field_value != '' || $operator=='isnull') {\n\n $this->searchColumns [ strtoupper($field) ] = $field ;\n\n foreach ($parms['db_field'] as $db_field) {\n if (strstr($db_field, '.') === false) {\n //Try to get the table for relate fields from link defs\n if ($type == 'relate' && !empty($this->seed->field_defs[$field]['link'])\n && !empty($this->seed->field_defs[$field]['rname'])) {\n $link = $this->seed->field_defs[$field]['link'];\n if (($this->seed->load_relationship($link))){\n //Martin fix #27494\n $db_field = $this->seed->field_defs[$field]['name'];\n } else {\n //Best Guess for table name\n $db_field = strtolower($link['module']) . '.' . $db_field;\n }\n\n\n }\n else if ($type == 'parent') {\n if (!empty($this->searchFields['parent_type'])) {\n $parentType = $this->searchFields['parent_type'];\n $rel_module = $parentType['value'];\n $rel_seed = BeanFactory::newBean($rel_module);\n if(!empty($rel_seed)) {\n $db_field = 'parent_' . $rel_module . '_' . $rel_seed->table_name . '.name';\n }\n }\n }\n // Relate fields in custom modules and custom relate fields\n elseif ($type == 'relate'\n && $customField\n && !empty($this->seed->field_defs[$field]['module'])) {\n $db_field = !empty($this->seed->field_defs[$field]['name'])?$this->seed->field_defs[$field]['name']:'name';\n }\n else if(!$customField){\n if (!empty($this->seed->field_defs[$field]['db_concat_fields'])) {\n $db_field = $db->concat(\n $this->seed->table_name,\n $this->seed->field_defs[$db_field]['db_concat_fields']\n );\n } else {\n $db_field = $this->seed->table_name . \".\" . $db_field;\n }\n }else{\n if (!empty($this->seed->field_defs[$field]['db_concat_fields'])) {\n $db_field = $db->concat(\n $this->seed->table_name . \"_cstm.\",\n $this->seed->field_defs[$db_field]['db_concat_fields']\n );\n } else {\n $db_field = $this->seed->table_name . \"_cstm.\" . $db_field;\n }\n }\n }\n\n if($type == 'date') {\n // The regular expression check is to circumvent special case YYYY-MM\n $operator = '=';\n if(preg_match('/^\\d{4}.\\d{1,2}$/', $field_value) != 0) { // preg_match returns number of matches\n $db_field = $this->seed->db->convert($db_field, \"date_format\", array(\"%Y-%m\"));\n } else {\n $field_value = $timedate->to_db_date($field_value, false);\n $db_field = $this->seed->db->convert($db_field, \"date_format\", array(\"%Y-%m-%d\"));\n }\n }\n\n if($type == 'datetime' || $type == 'datetimecombo') {\n try {\n if($operator == '=' || $operator == 'between') {\n // FG - bug45287 - If User asked for a range, takes edges from it.\n $placeholderPos = strpos($field_value, \"<>\");\n if ($placeholderPos !== FALSE && $placeholderPos > 0)\n {\n $datesLimit = explode(\"<>\", $field_value);\n $dateStart = $timedate->getDayStartEndGMT($datesLimit[0]);\n $dateEnd = $timedate->getDayStartEndGMT($datesLimit[1]);\n $dates = $dateStart;\n $dates['end'] = $dateEnd['end'];\n $dates['enddate'] = $dateEnd['enddate'];\n $dates['endtime'] = $dateEnd['endtime'];\n }\n else\n {\n $dates = $timedate->getDayStartEndGMT($field_value);\n }\n // FG - bug45287 - Note \"start\" and \"end\" are the correct interval at GMT timezone\n $field_value = array($dates[\"start\"], $dates[\"end\"]);\n $operator = 'between';\n } else if($operator == 'not_equal') {\n $dates = $timedate->getDayStartEndGMT($field_value);\n $field_value = array($dates[\"start\"], $dates[\"end\"]);\n $operator = 'date_not_equal';\n } else if($operator == 'greater_than') {\n $dates = $timedate->getDayStartEndGMT($field_value);\n $field_value = $dates[\"end\"];\n } else if($operator == 'less_than') {\n $dates = $timedate->getDayStartEndGMT($field_value);\n $field_value = $dates[\"start\"];\n } else if($operator == 'greater_than_equals') {\n $dates = $timedate->getDayStartEndGMT($field_value);\n $field_value = $dates[\"start\"];\n } else if($operator == 'less_than_equals') {\n $dates = $timedate->getDayStartEndGMT($field_value);\n $field_value = $dates[\"end\"];\n }\n } catch(Exception $timeException) {\n //In the event that a date value is given that cannot be correctly processed by getDayStartEndGMT method,\n //just skip searching on this field and continue. This may occur if user switches locale date formats\n //in another browser screen, but re-runs a search with the previous format on another screen\n $GLOBALS['log']->error($timeException->getMessage());\n continue;\n }\n }\n\n if($type == 'decimal' || $type == 'float' || $type == 'currency' || (!empty($parms['enable_range_search']) && empty($parms['is_date_field']))) {\n require_once('modules/Currencies/Currency.php');\n\n //we need to handle formatting either a single value or 2 values in case the 'between' search option is set\n //start by splitting the string if the between operator exists\n $fieldARR = explode('<>', $field_value);\n //set the first pass through boolean\n $values = array();\n foreach($fieldARR as $fv){\n //reset the field value, it will be rebuild in the foreach loop below\n $tmpfield_value = unformat_number($fv);\n\n if ( $type == 'currency' && stripos($field,'_usdollar')!==FALSE ) {\n // It's a US Dollar field, we need to do some conversions from the user's local currency\n $currency_id = $GLOBALS['current_user']->getPreference('currency');\n if ( empty($currency_id) ) {\n $currency_id = -99;\n }\n if ( $currency_id != -99 ) {\n $currency = BeanFactory::getBean('Currencies', $currency_id);\n $tmpfield_value = $currency->convertToDollar($tmpfield_value);\n }\n }\n $values[] = $tmpfield_value;\n }\n\n $field_value = join('<>',$values);\n\n if(!empty($parms['enable_range_search']) && $parms['operator'] == '=' && $type != 'int')\n {\n // Databases can't really search for floating point numbers, because they can't be accurately described in binary,\n // So we have to fuzz out the math a little bit\n $field_value = array(($field_value - 0.01) , ($field_value + 0.01));\n $operator = 'between';\n }\n }\n\n // Records are not searched using field \"File name\" in Documents -> Basic search\n // For file types it makes sense to add wildcard to be used in query.\n if ($type === 'file') {\n $field_value = $this->seed->db->sqlLikeString($field_value, $like_char);\n }\n\n if ( preg_match(\"/favorites_only.*/\", $field) ) {\n if ( $field_value == '1' ) {\n $field_value = $GLOBALS['current_user']->id;\n }\n else {\n continue 2;\n }\n }\n\n $itr++;\n if(!empty($where)) {\n $where .= \" OR \";\n }\n\n //Here we make a last attempt to determine the field type if possible\n if(empty($type) && isset($parms['db_field']) && isset($parms['db_field'][0]) && isset($this->seed->field_defs[$parms['db_field'][0]]['type']))\n {\n $type = $this->seed->field_defs[$parms['db_field'][0]]['type'];\n }\n\n switch(strtolower($operator)) {\n case 'subquery':\n $in = 'IN';\n if ( isset($parms['subquery_in_clause']) ) {\n if ( !is_array($parms['subquery_in_clause']) ) {\n $in = $parms['subquery_in_clause'];\n }\n elseif ( isset($parms['subquery_in_clause'][$field_value]) ) {\n $in = $parms['subquery_in_clause'][$field_value];\n }\n }\n $sq = $parms['subquery'];\n if(is_array($sq)){\n $and_or = ' AND ';\n if (isset($sq['OR'])){\n $and_or = ' OR ';\n }\n $first = true;\n foreach($sq as $q){\n if(empty($q) || strlen($q)<2) continue;\n if(!$first){\n $where .= $and_or;\n }\n $where .= \" {$db_field} $in (\".$this->getLikeSubquery($q, $field_value).\") \";\n $first = false;\n }\n }elseif(!empty($parms['query_type']) && $parms['query_type'] == 'format'){\n // \"stringify\" the field value if it or 'subquery' isn't wrapped in quotes already\n if (substr($field_value, 0, 1) != \"'\" && substr($field_value, -1) != \"'\" &&\n !empty($parms['subquery']) && !preg_match('/\\'\\{0\\}\\'/', $parms['subquery'])) {\n $field_value = $GLOBALS['db']->quoted($field_value);\n }\n $stringFormatParams = array(0 => $field_value, 1 => $GLOBALS['current_user']->id);\n $where .= \"{$db_field} $in (\" . string_format(\n $parms['subquery'],\n $stringFormatParams\n ) . \")\";\n } else {\n //Bug#37087: Re-write our sub-query to it is executed first and contents stored in a derived table to avoid mysql executing the query\n //outside in. Additional details: http://bugs.mysql.com/bug.php?id=9021\n $where .= \"{$db_field} $in (select * from (\".$this->getLikeSubquery($parms['subquery'] , $field_value).\") {$field}_derived)\";\n }\n\n break;\n\n case 'like':\n if($type == 'bool' && $field_value == 0)\n {\n // Bug 43452 - FG - Added parenthesis surrounding the OR (without them the WHERE clause would be broken)\n $where .= \"( \" . $db_field . \" = '0' OR \" . $db_field . \" IS NULL )\";\n }\n else\n {\n // check to see if this is coming from unified search or not\n $UnifiedSearch = !empty($parms['force_unifiedsearch']);\n if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'UnifiedSearch'){\n $UnifiedSearch = true;\n }\n\n // If it is a unified search and if the search contains more then 1 word (contains space)\n // and if it's the last element from db_field (so we do the concat only once, not for every db_field element)\n // we concat the db_field array() (both original, and in reverse order) and search for the whole string in it\n if ( $UnifiedSearch && strpos($field_value, ' ') !== false && strpos($db_field, $parms['db_field'][count($parms['db_field']) - 1]) !== false )\n {\n // Get the table name used for concat\n $concat_table = explode('.', $db_field);\n $concat_table = $concat_table[0];\n // Get the fields for concatenating\n $concat_fields = $parms['db_field'];\n\n // If db_fields (e.g. contacts.first_name) contain table name, need to remove it\n for ($i = 0; $i < count($concat_fields); $i++)\n {\n \tif (strpos($concat_fields[$i], $concat_table) !== false)\n \t{\n \t\t$concat_fields[$i] = substr($concat_fields[$i], strlen($concat_table) + 1);\n \t}\n }\n\n // Concat the fields and search for the value\n $where .= $this->seed->db->getLikeSQL($this->seed->db->concat($concat_table, $concat_fields), $field_value . $like_char);\n $where .= ' OR ' . $this->seed->db->getLikeSQL($this->seed->db->concat($concat_table, array_reverse($concat_fields)), $field_value . $like_char);\n }\n else\n {\n //Check if this is a first_name, last_name search\n if (isset($this->seed->field_defs)\n && isset($this->seed->field_defs[$db_field])) {\n $vardefEntry = $this->seed->field_defs[$db_field];\n if(!empty($vardefEntry['db_concat_fields']) && in_array('first_name', $vardefEntry['db_concat_fields']) && in_array('last_name', $vardefEntry['db_concat_fields']))\n {\n if(!empty($GLOBALS['app_list_strings']['salutation_dom']) && is_array($GLOBALS['app_list_strings']['salutation_dom']))\n {\n foreach($GLOBALS['app_list_strings']['salutation_dom'] as $salutation)\n {\n if(!empty($salutation) && strpos($field_value, $salutation) === 0)\n {\n $field_value = trim(substr($field_value, strlen($salutation)));\n break;\n }\n }\n }\n }\n }\n\n //field is not last name or this is not from global unified search, so do normal where clause\n $like_string = $this->seed->db->sqlLikeString($field_value, $like_char);\n $where .= $this->seed->db->getLikeSQL($db_field, sql_like_string($field_value, $like_char));\n }\n }\n break;\n case 'not in':\n $where .= $db_field . ' not in ('.$field_value.')';\n break;\n case 'in':\n $where .= $db_field . ' in ('.$field_value.')';\n break;\n case '=':\n if($type == 'bool' && $field_value == 0) {\n $where .= \"($db_field = 0 OR $db_field IS NULL)\";\n }\n else {\n $where .= $db_field . \" = \".$db->quoteType($type, $field_value);\n }\n break;\n // tyoung bug 15971 - need to add these special cases into the $where query\n case 'custom_enum':\n $where .= $field_value;\n break;\n case 'between':\n if(!is_array($field_value)) {\n $field_value = explode('<>', $field_value);\n }\n $field_value[0] = $db->quoteType($type, $field_value[0]);\n $field_value[1] = $db->quoteType($type, $field_value[1]);\n $where .= \"($db_field >= {$field_value[0]} AND $db_field <= {$field_value[1]})\";\n break;\n case 'date_not_equal':\n if(!is_array($field_value)) {\n $field_value = explode('<>', $field_value);\n }\n $field_value[0] = $db->quoteType($type, $field_value[0]);\n $field_value[1] = $db->quoteType($type, $field_value[1]);\n $where .= \"($db_field IS NULL OR $db_field < {$field_value[0]} OR $db_field > {$field_value[1]})\";\n break;\n case 'innerjoin':\n $this->seed->listview_inner_join[] = $parms['innerjoin'] . \" '\" . $parms['value'] . \"%')\";\n break;\n case 'not_equal':\n $field_value = $db->quoteType($type, $field_value);\n $where .= \"($db_field IS NULL OR $db_field != $field_value)\";\n break;\n case 'greater_than':\n $field_value = $db->quoteType($type, $field_value);\n $where .= \"$db_field > $field_value\";\n break;\n case 'greater_than_equals':\n $field_value = $db->quoteType($type, $field_value);\n $where .= \"$db_field >= $field_value\";\n break;\n case 'less_than':\n $field_value = $db->quoteType($type, $field_value);\n $where .= \"$db_field < $field_value\";\n break;\n case 'less_than_equals':\n $field_value = $db->quoteType($type, $field_value);\n $where .= \"$db_field <= $field_value\";\n break;\n case 'next_7_days':\n case 'last_7_days':\n case 'last_month':\n case 'this_month':\n case 'next_month':\n case 'last_30_days':\n case 'next_30_days':\n case 'this_year':\n case 'last_year':\n case 'next_year':\n if (!empty($field) && !empty($this->seed->field_defs[$field]['type'])) {\n $where .= $this->parseDateExpression(\n strtolower($operator),\n $db_field,\n $this->seed->field_defs[$field]['type']\n );\n } else {\n $where .= $this->parseDateExpression(strtolower($operator), $db_field);\n }\n break;\n case 'isnull':\n $where .= \"($db_field IS NULL OR $db_field = '')\";\n if ($field_value != '')\n $where .= ' OR ' . $db_field . \" in (\".$field_value.')';\n break;\n }\n }\n }\n\n if(!empty($where)) {\n if($itr > 1) {\n array_push($where_clauses, '( '.$where.' )');\n }\n else {\n array_push($where_clauses, $where);\n }\n }\n }\n }\n\n return $where_clauses;\n }", "title": "" }, { "docid": "77dfe8fc641923a1ef94df3c73a7ca23", "score": "0.5718061", "text": "function acf_get_filters() {\n\treturn acf_get_store( 'filters' )->get();\n}", "title": "" }, { "docid": "7356c140535f859e396f93e8caee52ce", "score": "0.5716357", "text": "function fetch_single_fields($q) {\n\t\t\treturn($this->query($q)->fetch_single_fields());\n\t\t}", "title": "" }, { "docid": "31735c44cf30ea9a992274652140628a", "score": "0.5713085", "text": "public function getExtendedSimpleSearchFields() : array\n {\n return $this->extendedSimpleSearchFields;\n }", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.5703222", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.5703222", "text": "public function getFields(): array;", "title": "" }, { "docid": "d5256db8aef34eae8a37de8e2e32745e", "score": "0.5698824", "text": "private function searchExample4()\n {\n\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n /** @var \\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria */\n $searchCriteria = $objectManager->create(\\Magento\\Framework\\Api\\SearchCriteriaInterface::class);\n\n /** @var \\Magento\\Framework\\Api\\FilterBuilder $filterBuilder */\n $filterBuilder = $objectManager->create(\\Magento\\Framework\\Api\\FilterBuilder::class);\n\n $filter1 = $filterBuilder\n ->setField('entity_id')\n ->setValue('3')\n ->setConditionType('eq')\n ->create();\n\n $filter2 = $filterBuilder\n ->setField('name')\n ->setValue('%Student 2%')\n ->setConditionType('like')\n ->create();\n\n $filter3 = $filterBuilder\n ->setField('roll_number')\n ->setValue(1234)\n ->setConditionType('eq')\n ->create();\n\n /** @var \\Magento\\Framework\\Api\\Search\\FilterGroup $filterGroup */\n $filterGroup1 = $objectManager->create(\\Magento\\Framework\\Api\\Search\\FilterGroup::class);\n $filterGroupObj1 = $filterGroup1->setFilters([$filter1, $filter2]);\n\n /** @var \\Magento\\Framework\\Api\\Search\\FilterGroup $filterGroup */\n $filterGroup2 = $objectManager->create(\\Magento\\Framework\\Api\\Search\\FilterGroup::class);\n $filterGroupObj2 = $filterGroup2->setFilters([$filter3]);\n\n $searchCriteria->setFilterGroups([$filterGroupObj1, $filterGroupObj2]);\n\n $searchResult = $this->studentRepository->getList($searchCriteria);\n $items = $searchResult->getItems();\n\n echo \"<pre>\";\n echo \"Number of record == \" . count($items);\n\n echo \"</br>\";\n\n foreach ($items as $item) {\n echo \"</br>\";\n echo \"ID :\" . $item->getId() . \" \" . \"Name : \" . $item->getName() . \" Roll No : \" . $item->getRollNumber();\n echo \"</br>\";\n }\n\n /** @var \\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria */\n /* $searchCriteria = $objectManager->create(\\Magento\\Framework\\Api\\SearchCriteriaInterface::class);\n $searchCriteria->setFilterGroups([$filterGroupObj1, $filterGroupObj2]);\n $searchResult = $this->studentRepository->getList($searchCriteria);\n $items = $searchResult->getItems();*/\n }", "title": "" }, { "docid": "5442212ad638604f23e71fca4c1f2938", "score": "0.5687977", "text": "private function getFieldsForQuery($q, $params){\n\n $model = New RepositoryModel($q);\n $length = $model->getLength();\n \n // Get Tiny Data \n if ($length>=1) { \n\n // Get Small Data \n if ($length>=2) {\n\n // Get Extend Data\n if ($length>=3) {\n\n // Get Complete Data\n if ($length>=4) {\n\n }\n }\n }\n }\n\n // Get Extra Select\n if (array_key_exists('extra_select', $params) && is_array($params['extra_select'])) {\n \n // Get Count UserCart By Params\n if (array_key_exists('count', $params['extra_select']) && is_array($params['extra_select']['count'])) {\n \n }\n }\n\n // Return Bind Fields Object \n return $q;\n }", "title": "" }, { "docid": "5b3ea136f91863239d009b3ab55aa7d5", "score": "0.56787604", "text": "public function checkGetQueryPartsForAdditionalFields() {\n\t\t$now = time();\n\t\t$fieldValues = array(\n\t\t\t'tstamp' => $now,\n\t\t\t'crdate' => $now,\n\t\t\t'title' => 'tolle Überschrift',\n\t\t\t'orig_uid' => 213,\n\t\t\t'orig_pid' => 423,\n\t\t\t'enddate' => $now,\n\t\t);\n\t\t$fieldValues = $GLOBALS['TYPO3_DB']->fullQuoteArray($fieldValues, 'tx_kesearch_index');\n\n\t\t$shouldArray = array(\n\t\t\t'set' => ', @orig_uid = \\'213\\', @orig_pid = \\'423\\', @enddate = \\'' . $now . '\\'',\n\t\t\t'execute' => ', @orig_uid, @orig_pid, @enddate'\n\t\t);\n\n\t\t$isArray = $this->indexer->getQueryPartForAdditionalFields($fieldValues);\n\n\t\t$this->assertEquals($shouldArray, $isArray);\n\t}", "title": "" }, { "docid": "a64560e77f7ad90ec6c8f15339adc2e4", "score": "0.5670046", "text": "Function GetAllProductFields()\n {\n $RequestUrl = \"GetAllProductFields?Sitekey=\".$this->SiteKey;\n $this->results = $this->GetResult($RequestUrl,\"QwiserProductFields\");\n return $this;\n }", "title": "" }, { "docid": "07cfa7365a92279fd4fef230618089c7", "score": "0.5662667", "text": "public function getNodeQueryFields(): array;", "title": "" }, { "docid": "d5e7f7b4ab3aceeb4956a4d520eb4df4", "score": "0.5660324", "text": "public function showFilterList()\n\t{\n\t\tglobal $Language;\n\n\t\t// Initialize\n\t\t$filterList = \"\";\n\t\t$captionClass = $this->isExport(\"email\") ? \"ew-filter-caption-email\" : \"ew-filter-caption\";\n\t\t$captionSuffix = $this->isExport(\"email\") ? \": \" : \"\";\n\n\t\t// Field property_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->property_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->property_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field group_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->group_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->group_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field Code\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->Code, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->Code->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field Description\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->Description, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->Description->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field brand_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->brand_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->brand_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field type_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->type_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->type_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field signature_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->signature_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->signature_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field department_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->department_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->department_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field location_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->location_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->location_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field cond_id\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->cond_id, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->cond_id->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field Remarks\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->Remarks, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->Remarks->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Field ProcurementDate\n\t\t$extWrk = \"\";\n\t\t$this->buildExtendedFilter($this->ProcurementDate, $extWrk);\n\t\t$filter = \"\";\n\t\tif ($extWrk != \"\")\n\t\t\t$filter .= \"<span class=\\\"ew-filter-value\\\">$extWrk</span>\";\n\t\tif ($filter != \"\")\n\t\t\t$filterList .= \"<div><span class=\\\"\" . $captionClass . \"\\\">\" . $this->ProcurementDate->caption() . \"</span>\" . $captionSuffix . $filter . \"</div>\";\n\n\t\t// Show Filters\n\t\tif ($filterList != \"\") {\n\t\t\t$message = \"<div id=\\\"ew-filter-list\\\" class=\\\"alert alert-info d-table\\\"><div id=\\\"ew-current-filters\\\">\" .\n\t\t\t\t$Language->phrase(\"CurrentFilters\") . \"</div>\" . $filterList . \"</div>\";\n\t\t\t$this->Message_Showing($message, \"\");\n\t\t\tWrite($message);\n\t\t}\n\t}", "title": "" }, { "docid": "17257a826ded84500eecdb45f3ffe978", "score": "0.565581", "text": "public function searchVariables( $qvars )\r\n{\r\n $qvars[] = 'issue';\r\n $qvars[] = 'searchpage';\r\n return $qvars;\r\n}", "title": "" }, { "docid": "044ffcf7c5e57e0db30795d3375d97b4", "score": "0.5655209", "text": "protected function getIndexFields()\n {\n // If none declared, use the first of the formFields.\n if (0 == count($this->indexFields)) {\n $this->indexFields = [$this->formFields[0]['name']];\n\n return array_slice($this->getFormFields(), 0, 1);\n }\n\n return Arr::where($this->getFormFields(), function ($value) {\n return in_array($value['name'], $this->indexFields, true);\n });\n }", "title": "" }, { "docid": "d319d70d255285dddeebedd1c02f02c3", "score": "0.5653917", "text": "public function queryFilter(): QueryFilter;", "title": "" }, { "docid": "54d1c2cb067fa129e3b1424994272148", "score": "0.56524557", "text": "function getProcessFilterField($focus, $field, $value, $view){\r\n\t//If Edit then $focus is set - so what we do is get the fields from the object table\r\n\t//Fill the array - then set the one that is current.\t\r\n\t//Ignore if DetailView\r\n\t$sequenceID = substr($field,20);\r\n\t$filterListName = \"process_filter_field\" .\"$sequenceID\";\r\n\t$fields = '<name=\"filterList\" size=\"10\" multiple=\"multiple\">';\r\n\tif ($view != 'DetailView') {\t\r\n\t\trequire_once('modules/PM_ProcessManager/ProcessManagerUtils.php');\r\n\t\t$processManagerUtil = new ProcessManagerUtils();\r\n\t\tif ($focus->id != \"\") {\r\n\t\t\t//Get the object that the Process is filtering against\r\n\t\t\t$processObject = $processManagerUtil->getProcessObjectField($focus,\"process_object\");\r\n\t\t\t//Now see if we have an existing entry for this sequence\t\t\r\n\t\t\t$processFilterField = $processManagerUtil->getFieldBySequenceID($focus,$sequenceID,'field_name');\r\n\t\t\tif ($processFilterField != '') {\r\n\t\t\t \t$fields = $processManagerUtil->getFieldsFromTable($focus,$processObject,$processFilterField);\r\n\t\t\t \treturn $fields;\t\t\t \t\r\n\t\t\t \t} \r\n\t\t}\r\n\t}\r\n\t$fields .= '<option value=Please Specify>Please Specify</option>';\r\n\treturn $fields;\r\n}", "title": "" }, { "docid": "1aa2a0deba5253020f042ec52c649e98", "score": "0.56455296", "text": "private function getFiltering()\n {\n return $this->filtering;\n }", "title": "" }, { "docid": "54e3a6c38bb7d69db884bad19ec8dfe6", "score": "0.56432104", "text": "abstract function getFilters();", "title": "" }, { "docid": "2fbbcf63988aae62d9f6e1967e1a6098", "score": "0.56354845", "text": "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\") {\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"ft_funcionariolistsrch\");\n\t\t} else {\n\t\t\t$sSavedFilterList = \"\";\n\t\t}\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sFilterList = ew_Concat($sFilterList, $this->CI_RUN->AdvancedSearch->ToJSON(), \",\"); // Field CI_RUN\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Apellido_Paterno->AdvancedSearch->ToJSON(), \",\"); // Field Apellido_Paterno\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Apellido_Materno->AdvancedSearch->ToJSON(), \",\"); // Field Apellido_Materno\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Nombres->AdvancedSearch->ToJSON(), \",\"); // Field Nombres\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Fecha_Nacimiento->AdvancedSearch->ToJSON(), \",\"); // Field Fecha_Nacimiento\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Estado_Civil->AdvancedSearch->ToJSON(), \",\"); // Field Estado_Civil\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Direccion->AdvancedSearch->ToJSON(), \",\"); // Field Direccion\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Telefono->AdvancedSearch->ToJSON(), \",\"); // Field Telefono\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Celular->AdvancedSearch->ToJSON(), \",\"); // Field Celular\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Fiscalia_otro->AdvancedSearch->ToJSON(), \",\"); // Field Fiscalia_otro\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Unidad_Organizacional->AdvancedSearch->ToJSON(), \",\"); // Field Unidad_Organizacional\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Unidad->AdvancedSearch->ToJSON(), \",\"); // Field Unidad\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Cargo->AdvancedSearch->ToJSON(), \",\"); // Field Cargo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->Fecha_registro->AdvancedSearch->ToJSON(), \",\"); // Field Fecha_registro\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "title": "" }, { "docid": "c13b25aa4c0aa574d7a6c0c38819bda0", "score": "0.5635119", "text": "public function extractCustomSearchData()\n {\n if($this->searchType != BaseTableManager::CUSTOM_SEARCH) {\n return;\n }\n \n foreach($this->filterArray as $key => $value) {\n \n if(substr($key, 0, 13) == 'customSearch-' && null != $value && '' != $value && '[\"\"]' != $value) {\n \n $this->customSearch[substr($key, 13)] = $this->getParamValue($value);\n $this->searchType = BaseTableManager::CUSTOM_SEARCH;\n }\n }\n }", "title": "" }, { "docid": "10fbd5d914b113d0e086c3e6dc889684", "score": "0.5633308", "text": "function getAndOrFilterList($focus, $field, $value, $view) {\r\n\t$fields = '<name=\"andorfilterfields\" id=\"andorfilterfields\" size=\"10\" multiple=\"multiple\">';\r\n\t\tif ($view != 'DetailView') {\t\r\n\t\t\trequire_once('modules/PM_ProcessManager/ProcessManagerUtils.php');\r\n\t\t\t$processManagerUtil = new ProcessManagerUtils();\r\n\t\t\tif ($focus->id != \"\") {\r\n\r\n\t\t\t\t\t$andorfileterfield = $processManagerUtil->getFieldFromFilterTable($focus,\"andorfilterfields\");\r\n\t\t\t\t\t$fields .=\"<option value=\\\"$andorfileterfield\\\">$andorfileterfield</option>\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t$fields .='<option value=\"and\">and</option>\r\n\t\t\t <option value=\"or\">or</option>\r\n\r\n\t\t \t\t';\r\n\treturn $fields;\r\n\r\n}", "title": "" }, { "docid": "bdb9fa2b6690762fec61067ca66f89f6", "score": "0.5612704", "text": "protected function setupFilterList($filter)\n\t{\n\t\tif (!is_array($filter))\n\t\t\treturn FALSE;\n\n\t\t// Field property_id\n\t\tif (!$this->property_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->property_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->property_id->AdvancedSearch->save();\n\n\t\t// Field group_id\n\t\tif (!$this->group_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->group_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->group_id->AdvancedSearch->save();\n\n\t\t// Field Code\n\t\tif (!$this->Code->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->Code->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->Code->AdvancedSearch->save();\n\n\t\t// Field Description\n\t\tif (!$this->Description->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->Description->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->Description->AdvancedSearch->save();\n\n\t\t// Field brand_id\n\t\tif (!$this->brand_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->brand_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->brand_id->AdvancedSearch->save();\n\n\t\t// Field type_id\n\t\tif (!$this->type_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->type_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->type_id->AdvancedSearch->save();\n\n\t\t// Field signature_id\n\t\tif (!$this->signature_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->signature_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->signature_id->AdvancedSearch->save();\n\n\t\t// Field department_id\n\t\tif (!$this->department_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->department_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->department_id->AdvancedSearch->save();\n\n\t\t// Field location_id\n\t\tif (!$this->location_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->location_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->location_id->AdvancedSearch->save();\n\n\t\t// Field cond_id\n\t\tif (!$this->cond_id->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->cond_id->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->cond_id->AdvancedSearch->save();\n\n\t\t// Field Remarks\n\t\tif (!$this->Remarks->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->Remarks->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->Remarks->AdvancedSearch->save();\n\n\t\t// Field ProcurementDate\n\t\tif (!$this->ProcurementDate->AdvancedSearch->getFromArray($filter))\n\t\t\t$this->ProcurementDate->AdvancedSearch->loadDefault(); // Clear filter\n\t\t$this->ProcurementDate->AdvancedSearch->save();\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "52eb44a1c91ca7651a27cdcb9d89a879", "score": "0.5607478", "text": "protected function getVisibleFormFields()\n {\n return ['headline', 'intro', 'message', 'url'];\n }", "title": "" }, { "docid": "b7551bff9218aaa2ee4b688744f997d0", "score": "0.56058806", "text": "private function searchExample2()\n {\n\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\n /** @var \\Magento\\Framework\\Api\\SearchCriteriaBuilder $searchCriteriaBuilder */\n $searchCriteriaBuilder = $objectManager->create(ApiSearchCriteriaBuilder::class);\n\n /** @var \\Magento\\Framework\\Api\\FilterBuilder $filterBuilder */\n $filterBuilder = $objectManager->create(\\Magento\\Framework\\Api\\FilterBuilder::class);\n\n $filter1 = $filterBuilder->setField('name')\n ->setConditionType('like')\n ->setValue('%Student 1%')\n ->create();\n\n $filter2 = $filterBuilder->setField('name')\n ->setConditionType('like')\n ->setValue('%Student 2%')\n ->create();\n\n $filter3 = $filterBuilder->setField('roll_number')\n ->setConditionType('eq')\n ->setValue('123')\n ->create();\n\n\n $searchCriteriaBuilder->addFilters([$filter1, $filter2]);\n $searchCriteriaBuilder->addFilters([$filter3]);\n\n $searchCriteria = $searchCriteriaBuilder->create();\n\n $searchResult = $this->studentRepository->getList($searchCriteria);\n $items = $searchResult->getItems();\n\n echo \"<pre>\";\n echo \"Number of record == \" . count($items);\n\n echo \"</br>\";\n\n foreach ($items as $item) {\n echo \"</br>\";\n echo \"ID :\" . $item->getId() . \" \" . \"Name : \" . $item->getName() . \" Roll No : \" . $item->getRollNumber();\n echo \"</br>\";\n }\n }", "title": "" }, { "docid": "dbe054a8c23a42ef83b05a050f33e3cd", "score": "0.5604949", "text": "public function getFilters()\n {\n // get the search form data\n $data = $this->form->getData();\n\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->id) AND ( (is_scalar($data->id) AND $data->id !== '') OR (is_array($data->id) AND (!empty($data->id)) )) )\n {\n\n $filters[] = new TFilter('id', '=', $data->id);// create the filter\n }\n if (isset($data->tipo_produto_id) AND ( (is_scalar($data->tipo_produto_id) AND $data->tipo_produto_id !== '') OR (is_array($data->tipo_produto_id) AND (!empty($data->tipo_produto_id)) )) )\n {\n\n $filters[] = new TFilter('tipo_produto_id', 'like', \"%{$data->tipo_produto_id}%\");// create the filter\n }\n if (isset($data->pessoa_id) AND ( (is_scalar($data->pessoa_id) AND $data->pessoa_id !== '') OR (is_array($data->pessoa_id) AND (!empty($data->pessoa_id)) )) )\n {\n\n $filters[] = new TFilter('pessoa_id', 'in', \"(SELECT id FROM pessoa WHERE nome like '%{$data->pessoa_id}%')\");// create the filter\n }\n if (isset($data->ativo) AND ( (is_scalar($data->ativo) AND $data->ativo !== '') OR (is_array($data->ativo) AND (!empty($data->ativo)) )) )\n {\n\n $filters[] = new TFilter('ativo', '=', $data->ativo);// create the filter\n }\n if (isset($data->descricao) AND ( (is_scalar($data->descricao) AND $data->descricao !== '') OR (is_array($data->descricao) AND (!empty($data->descricao)) )) )\n {\n\n $filters[] = new TFilter('descricao', 'like', \"%{$data->descricao}%\");// create the filter\n }\n if (isset($data->medida_id) AND ( (is_scalar($data->medida_id) AND $data->medida_id !== '') OR (is_array($data->medida_id) AND (!empty($data->medida_id)) )) )\n {\n\n $filters[] = new TFilter('medida_id', 'like', \"%{$data->medida_id}%\");// create the filter\n }\n if (isset($data->data_registro_ini) AND ( (is_scalar($data->data_registro_ini) AND $data->data_registro_ini !== '') OR (is_array($data->data_registro_ini) AND (!empty($data->data_registro_ini)) )) )\n {\n\n $filters[] = new TFilter('data_registro', '>=', $data->data_registro_ini);// create the filter\n }\n if (isset($data->data_registro_fim) AND ( (is_scalar($data->data_registro_fim) AND $data->data_registro_fim !== '') OR (is_array($data->data_registro_fim) AND (!empty($data->data_registro_fim)) )) )\n {\n\n $filters[] = new TFilter('data_registro', '<=', $data->data_registro_fim);// create the filter\n }\n if (isset($data->usuario_registro) AND ( (is_scalar($data->usuario_registro) AND $data->usuario_registro !== '') OR (is_array($data->usuario_registro) AND (!empty($data->usuario_registro)) )) )\n {\n\n $filters[] = new TFilter('usuario_registro', 'like', \"%{$data->usuario_registro}%\");// create the filter\n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n\n return $filters;\n }", "title": "" }, { "docid": "5e5117bb7a7e7e9483796b5135d76462", "score": "0.5601143", "text": "function fn_ult_additional_fields_in_search(&$params, $fields, $sortings, $condition, $join, $sorting, $group_by, &$tmp, $piece, $having)\n{\n if (Registry::get('runtime.company_id') && !Registry::get('runtime.simple_ultimate')) {\n $tmp .= db_quote(\" OR (shared_descr.search_words LIKE ?l)\", '%' . $piece . '%'); // check search words\n\n if ($params['pname'] == 'Y') {\n $tmp .= db_quote(\" OR shared_descr.product LIKE ?l\", '%' . $piece . '%');\n }\n if ($params['pshort'] == 'Y') {\n $tmp .= db_quote(\" OR shared_descr.short_description LIKE ?l\", '%' . $piece . '%');\n $tmp .= db_quote(\" OR shared_descr.short_description LIKE ?l\", '%' . htmlentities($piece, ENT_QUOTES, 'UTF-8') . '%');\n }\n if ($params['pfull'] == 'Y') {\n $tmp .= db_quote(\" OR shared_descr.full_description LIKE ?l\", '%' . $piece . '%');\n $tmp .= db_quote(\" OR shared_descr.full_description LIKE ?l\", '%' . htmlentities($piece, ENT_QUOTES, 'UTF-8') . '%');\n }\n if ($params['pkeywords'] == 'Y') {\n $tmp .= db_quote(\" OR (shared_descr.meta_keywords LIKE ?l OR shared_descr.meta_description LIKE ?l)\", '%' . $piece . '%', '%' . $piece . '%');\n }\n }\n}", "title": "" }, { "docid": "07efe2aaa57b317a205bdac0ca72b7f3", "score": "0.5598898", "text": "public function getFilterableFields()\n {\n $filterableFields = [];\n foreach ($this->getFilterFieldsMappings() as $fieldName => $fieldMetadata) {\n $filterableFields[] = [\n 'field' => $fieldName,\n 'operators' => $fieldMetadata['operators'],\n 'title' => $fieldMetadata['title'],\n ];\n }\n\n return $filterableFields;\n }", "title": "" }, { "docid": "3cd0823b25ea903323bbcac83b6d93d7", "score": "0.55977243", "text": "public function getItemsContainFields(){\n $db = $this -> getDbo();\n $query = $db -> getQuery(true);\n $query -> select('g.*,x.fieldsid');\n $query -> from($db -> quoteName('#__tz_portfolio_plus_fieldgroups').' AS g');\n $query -> join('INNER',$db -> quoteName('#__tz_portfolio_plus_field_fieldgroup_map').' AS x ON x.groupid=g.id');\n $query -> order('x.fieldsid ASC');\n $db -> setQuery($query);\n\n if($items = $db -> loadObjectList()){\n $list = array();\n foreach($items as $i => $item){\n if(isset($items[$i-1]) && ($items[$i - 1] -> fieldsid == $items[$i] -> fieldsid)){\n $list[$item -> fieldsid] .= ', '.$item -> name;\n }\n else{\n $list[$item -> fieldsid] = $item -> name;\n }\n }\n return $list;\n }\n return;\n\n }", "title": "" }, { "docid": "ae7928380d538782dbe1f83f9cd0d7ea", "score": "0.55974424", "text": "public function getAllFields() {\n $arrStrAllFields = array('fname','lname','email','phone','about','usertype');\n return $arrStrAllFields;\n\n }", "title": "" } ]
e867f6837a0b5972dcc5bb5d17f8e125
get list of all contact tags, that are used by this user
[ { "docid": "445d4a97b1e35c7e6dadbe1423e698c2", "score": "0.6386874", "text": "public function getTagList($identity_id) {\n $data = $this->find(\n 'all',\n array(\n 'contain' => array(\n 'NoserubContactType' => array(\n 'fields' => array('name')\n ),\n 'ContactType' => array(\n 'fields' => array('name')\n )\n ),\n 'conditions' => array(\n 'Contact.identity_id' => $identity_id\n ),\n 'fields' => array(\n 'Contact.id'\n )\n ) \n );\n $noserub_tags = Set::extract($data, '{n}.NoserubContactType.{n}.name');\n $own_tags = Set::extract($data, '{n}.ContactType.{n}.name');\n $result = array();\n foreach($noserub_tags as $tags) {\n foreach($tags as $tag) {\n if(!in_array($tag, $result)) {\n $result[] = $tag;\n }\n }\n }\n foreach($own_tags as $tags) {\n foreach($tags as $tag) {\n if(!in_array($tag, $result)) {\n $result[] = $tag;\n }\n }\n }\n \n $tags = join(' ', $result);\n $result = $this->NoserubContactType->extract($tags);\n return $this->ContactType->extract($identity_id, $result);\n }", "title": "" } ]
[ { "docid": "0995d2a1d30137ddd723f70a9ec1b0bf", "score": "0.76326686", "text": "public function get_tags()\n\t{\n\t\t$tags = array();\n\t\t$query = $this->db->query(\"SELECT value FROM nr_contact_tag \n\t\t\tWHERE contact_id = ?\", array($this->id));\n\t\t\n\t\tforeach ($query->result() as $result)\n\t\t\t$tags[] = $result->value;\n\t\t\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "371c2dcdbee6b619a272049a8e2a7ac4", "score": "0.69631195", "text": "public function getAllTagsInUse() {\n\t\t\n\t\t$blogEntryTags = new Datasource_Cms_Connect_BlogEntryTags();\n\t\t$allTags = $blogEntryTags->getAllInUse();\n\t\t\n\t\treturn $allTags;\n\t}", "title": "" }, { "docid": "229f6cfdc241244bc936e3f1f93a3eb8", "score": "0.68460196", "text": "public function &getTags();", "title": "" }, { "docid": "b874569b524f6a965688f7650ca94f58", "score": "0.6777423", "text": "private function _findTags() {\n\t\t$this->user->tags = array();\n\t\t// client is validated, and record has already been loaded\n\t\t// now go and search the database\n\t\t$tags = $this->db->findAllRowsBy('tag', 'user_id = '.$this->user->id);\n\t\tforeach ($tags as $row) {\n\t\t\t$this->user->tags[$row->ident] = $row->tag_key;\n\t\t}\n\t\treturn $this->user->tags;\n\t}", "title": "" }, { "docid": "3fd5ab8d2cd0813d58a0eb80f4033825", "score": "0.67755675", "text": "public function used_tags () {\n\n $list = array();\n\n $result = $this->connection->query (\n 'SELECT DISTINCT t.tag FROM tag t, header h WHERE h.id=t.hdr_id AND h.exper_id='.$this->id().\n ' ORDER BY tag' );\n\n $nrows = mysql_numrows( $result );\n for( $i=0; $i<$nrows; $i++ )\n array_push( $list,mysql_result( $result, $i ));\n\n return $list;\n }", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.67304134", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.67304134", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.67304134", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.67304134", "text": "public function getTags();", "title": "" }, { "docid": "4ac8e4a2562da308dc3eb67fbc35c421", "score": "0.6726067", "text": "public function getTagList();", "title": "" }, { "docid": "595dfdfc0f57b98dfc585c2edc21b50a", "score": "0.6674998", "text": "public function tags(): array\n {\n return [\n 'user:'.$this->user->uid,\n ];\n }", "title": "" }, { "docid": "595dfdfc0f57b98dfc585c2edc21b50a", "score": "0.6674998", "text": "public function tags(): array\n {\n return [\n 'user:'.$this->user->uid,\n ];\n }", "title": "" }, { "docid": "a0f1ec538cbeafa01857897bb146ee83", "score": "0.6670718", "text": "public function getTagList(){\n\t\treturn array_unique($this->tagList);\n\t}", "title": "" }, { "docid": "9dee9c43856b0f6e5292f9eeee8cd3a6", "score": "0.660772", "text": "public function getTags()\n {\n return Arrays::get($this->addressModel, 'tags', []);\n }", "title": "" }, { "docid": "7f66da0627ff2ae6ee152a4f6f206fd1", "score": "0.65460527", "text": "public function getTags()\n {\n return $this->_getCallObjects('wp.getTags', 'tag');\n }", "title": "" }, { "docid": "f9f96bb8f88754584e9bbae36d643f84", "score": "0.65192264", "text": "public function tags()\n {\n return UserTag::leftJoin('tags', 'user_tags.tag_id', '=', 'tags.id')\n ->whereNull('user_tags.deleted_at')\n ->where('user_tags.user_id', '=', $this->id)\n ->select('tags.*')\n ->get();\n }", "title": "" }, { "docid": "cd36159132ee05abf3e562ba1f28ce80", "score": "0.64695", "text": "public function getTags()\n {\n return $this->_slowBackend->getTags();\n }", "title": "" }, { "docid": "3b43545228a7ee26a296026502aab2c4", "score": "0.6458808", "text": "public function getTags() {\n\t\t$listEntries = Temboo_Results::getSubItemByKey(Temboo_Results::getSubArrayByKey($this->base, \"tags\"), \"data\");\n\t\t$resultArray = array();\n\t\tif(!is_null($listEntries)) {\n\t\t\tforeach ($listEntries as $entry) {\n\t\t \tarray_push($resultArray, new Facebook_Tag_output($entry));\n\t\t\t}\n\t\t}\n\t\treturn $resultArray;\n\t}", "title": "" }, { "docid": "e59d2ee7aa1378216ac7d2f9bbd6a870", "score": "0.6401482", "text": "public function getTags()\r\n {\r\n return $this->hasMany(Tag::className(), ['createdBy' => 'id']);\r\n }", "title": "" }, { "docid": "29e3acfbd6a3d6ead800841d5b3d92e3", "score": "0.6400085", "text": "public function allTags()\n {\n return Tag::get();\n }", "title": "" }, { "docid": "8418f98b59ff117bcda8a8d7a71e35bc", "score": "0.63959503", "text": "public function includeTags(User $contact)\n {\n if ($contact->tags) {\n return $this->collection($contact->tags, new TagTransformer());\n }\n }", "title": "" }, { "docid": "5ec7de69f50c009b16ec80044781dff7", "score": "0.6381446", "text": "function gettags()\n\t{\n\t\t$query = 'SELECT * FROM #__quickfaq_tags ORDER BY name';\n\t\t$this->_db->setQuery($query);\n\t\t$tags = $this->_db->loadObjectlist();\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "9df69a99cdf7380182df9c8f3f187ca8", "score": "0.63438356", "text": "public function getTags()\n {\n return $this->tags;\n }", "title": "" }, { "docid": "4da352a09d96b315676856dcae222957", "score": "0.63024426", "text": "public function get_tags() {\n return $this->tags;\n }", "title": "" }, { "docid": "28992636f9b642e9936678d202b5c5d5", "score": "0.62935156", "text": "public function getTags()\n {\n return $this->_tags;\n }", "title": "" }, { "docid": "28992636f9b642e9936678d202b5c5d5", "score": "0.62935156", "text": "public function getTags()\n {\n return $this->_tags;\n }", "title": "" }, { "docid": "30d1fdbbcf8c4370b6fb3da42dc45cb1", "score": "0.6272109", "text": "public function getTagsCloudFront() {\n $key = md5('tagsfront' . $this->getUserRole());\n if (!$tags = $this->_cache->load($key)){\n $tags = $this->getAdapter();\n $select = $tags->select()\n ->from($this->_name,array('total' => 'COUNT(*)','term'))\n ->joinLeft('finds',$this->_name . '.contentID = finds.id',\n array())\n ->where('contenttype = ?', (string)'findsrecord')\n ->where('origin != ?', (string)'YahooGeo')\n ->order('total DESC')\n ->group('term')\n ->limit(25);\n $data = $tags->fetchAll($select);\n $this->_cache->save($data, $key);\n }\n return $tags;\n }", "title": "" }, { "docid": "36e590563b0492a7c6524a1e446ab229", "score": "0.62672853", "text": "public function getTags() {\n return $this->tags;\n }", "title": "" }, { "docid": "2c38e3d57d9d995b4b38df294bc38845", "score": "0.62603104", "text": "public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}", "title": "" }, { "docid": "2c38e3d57d9d995b4b38df294bc38845", "score": "0.62603104", "text": "public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}", "title": "" }, { "docid": "2c38e3d57d9d995b4b38df294bc38845", "score": "0.62603104", "text": "public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}", "title": "" }, { "docid": "3b2f49045f1564a68848285831de32c8", "score": "0.6253042", "text": "public function getTags()\n\t{\n\t\treturn $this->hasMany(Terms::className(), ['term_id' => 'term_id'])\n\t\t\t\t\t->viaTable(TermRelations::tableName(), ['object_id' => 'ID'])\n\t\t\t\t\t->andWhere(['term_type'=>'tag']);\n\t}", "title": "" }, { "docid": "d4b2c766a38dbb3535cc067d2edc987b", "score": "0.6243859", "text": "public function getTags() {\r\n\t\treturn $this->tags;\r\n\t}", "title": "" }, { "docid": "58c95f9a05263505de63d70dd38643d5", "score": "0.6234949", "text": "function getTags() {\n\tif(in_context(ZP_IMAGE)) {\n\t\tglobal $_zp_current_image;\n\t\treturn $_zp_current_image->getTags();\n\t} else if (in_context(ZP_ALBUM)) {\n\t\tglobal $_zp_current_album;\n\t\treturn $_zp_current_album->getTags();\n\t} else if(in_context(ZP_ZENPAGE_PAGE)) {\n\t\tglobal $_zp_current_zenpage_page;\n\t\treturn $_zp_current_zenpage_page->getTags();\n\t} else if(in_context(ZP_ZENPAGE_NEWS_ARTICLE)) {\n\t\tglobal $_zp_current_zenpage_news;\n\t\treturn $_zp_current_zenpage_news->getTags();\n\t}\n\treturn array();\n}", "title": "" }, { "docid": "dac3495d1ecccebac43c9bd95140dd9c", "score": "0.62197906", "text": "public function getAllTags() {\n return Tag::all();\n }", "title": "" }, { "docid": "555dfb3e3945df61509ba7bbb2daa26b", "score": "0.6218312", "text": "public function getTags(){\n return $this->tags;\n }", "title": "" }, { "docid": "a658e9c5aa7a382a9cf759936154fc61", "score": "0.6191734", "text": "public function tags(): BelongsToMany\n {\n return $this->belongsToMany(Tag::class, 'contact_tag');\n }", "title": "" }, { "docid": "1340346f29667d859836df39ed0f4abe", "score": "0.6188178", "text": "public function getTags()\n {\n return $this->_client->getTags();\n }", "title": "" }, { "docid": "b214320750f2e8c373de157a5922bd44", "score": "0.6183815", "text": "public function UsedTags()\n {\n return $this->owner->Parent()->UsedTags();\n }", "title": "" }, { "docid": "0a0a57e69047d966b04008740ee4f762", "score": "0.6172634", "text": "public function getTags() {\n return $this->_doRequest(\n sprintf('%s/%s/tags/get?', API_URL, API_VERSION)\n );\n }", "title": "" }, { "docid": "6162ce543b0d0f7b3ee3de4b490aadd1", "score": "0.6137391", "text": "public static function tags()\n {\n return static::select('tags')\n ->distinct()\n ->where('tags', '<>', '')\n ->orderBy('tags')\n ->get();\n }", "title": "" }, { "docid": "f6f4c715276c11517a41798b6027a5cc", "score": "0.6136364", "text": "public function getTags()\n {\n return $this->hasMany(Tag::className(), ['id' => 'tag_id'])->viaTable(self::tablePrefix().'cms_post_tag', ['post_id' => 'id']);\n }", "title": "" }, { "docid": "a8f27359c415cd4087f487970729f5d0", "score": "0.6127815", "text": "public function getAll()\n\t{\n\t\treturn $this->tag->all();\n\t}", "title": "" }, { "docid": "46bfbca59b994dbeb7a2f2a3108c6ffa", "score": "0.6122212", "text": "public function getTags()\n {\n return $this->getMeta('tag');\n }", "title": "" }, { "docid": "7996c21bc8ca524949cac6adcfb2c7ff", "score": "0.61202323", "text": "function __alltags() {\r\n\t\t\r\n\t\t$result = Posts::find('all', array(\r\n\t\t\t'fields' => array('tags')\r\n\t\t));\r\n\t\r\n\t\t$tags = array();\r\n\t\t\r\n\t\tforeach($result as $t){\r\n\t\t\tif(is_object($t->tags)) {\r\n\t\t\t\t$tags = array_merge($tags,$t->tags->to('array'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn array_unique($tags);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b3e6495a329f1ecf2265000704bf0ae2", "score": "0.6111813", "text": "public function get_tags() {\n\t\t \tglobal $db;\n\t\t \t\n\t\t \t$tag_assocs = Tag_Association::find_by_pid($this->id);\n\t\t \tforeach ($tag_assocs as $tag_assoc) {\n\t\t \t\t$tag = Tag::find_by_id($tag_assoc);\n\t\t \t\t$this->tags[] = $tag;\n\t\t \t}\n\t\t}", "title": "" }, { "docid": "3aa718f89c85e3c9aab9681e6c914ec8", "score": "0.6107771", "text": "public function getList()\n {\n $_params = array();\n return $this->master->call('tags/list', $_params);\n }", "title": "" }, { "docid": "e81d4c01240c9e3432d17698efcbce8e", "score": "0.60873145", "text": "public function getAllTags()\n {\n $cacheid = \"getAllTags\";\n if (($memory = $this->inMemory($cacheid)) !== null) {\n return $memory;\n }\n $uri = $this->_uriBuilder->build('search|alltags');\n $directive = new PCMS_Service_Directive_Json($uri);\n $directive->setTags(array('tags'));\n $result = $this->getClient()->fetch($directive);\n if ($result->isSuccessful()) {\n $this->stashMemory($cacheid, $result);\n return $result;\n }\n return null;\n }", "title": "" }, { "docid": "ed2c6a8919b019884378bb3e9143ec45", "score": "0.6067615", "text": "public function getUsedTags()\n {\n $tags = $this->articles()->toStructure()->pluck('tags', ',', true);\n asort($tags);\n return $tags;\n }", "title": "" }, { "docid": "38af2d635e3cd1ccdeae39ccdccc0168", "score": "0.6059103", "text": "function getTags()\n {\n $this->tags = $this->tags ?: new ArrayCollection();\n return $this->tags;\n }", "title": "" }, { "docid": "a12736935dd47cbfbe977e5f4b80e990", "score": "0.604841", "text": "private function getTags(){\n\t\t\t$tags = $this->conn->select('tag','');\n\t\t\treturn($tags);\n\t\t}", "title": "" }, { "docid": "da13b314c81347939bdcc79556d9ca81", "score": "0.6030755", "text": "public function getAllTags() {\n\t\t\n\t\t$blogEntryTags = new Datasource_Cms_Connect_BlogEntryTags();\n\t\t$allTags = $blogEntryTags->getAll();\n\t\t\n\t\t$returnArray = array();\n\t\tforeach($allTags as $currentTag) {\n\n\t\t\t$returnArray[] = array(\n\t\t\t\t'id' => $currentTag['id'],\n\t\t\t\t'tag' => $currentTag['tag']);\n\t\t}\n\t\t\n\t\tif(empty($returnArray)) {\n\t\t\t\n\t\t\t$returnVal = null;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t$returnVal = $returnArray;\n\t\t}\n\t\treturn $returnVal;\n\t}", "title": "" }, { "docid": "80fd73ef5af96dda2f09fca37bdf5b1c", "score": "0.60269046", "text": "public function Tags()\n\t{\n\t\tif (!$this->CheckRedProductFinder())\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t/* Get all the fields based on the limits */\n\t\t$query = \"SELECT t.* FROM #__redproductfinder_tags t\n\t\t\t\t LEFT JOIN #__redproductfinder_tag_type y ON t.id = y.tag_id\n\t\t\t\t GROUP BY t.id\n\t\t\t\t ORDER BY t.ordering\";\n\t\t$this->_db->setQuery($query);\n\n\t\treturn $this->_db->loadObjectList();\n\t}", "title": "" }, { "docid": "1318f382ffdafcb9ee2c991bd625bcba", "score": "0.60231704", "text": "public function getTags()\n {\n $result = array();\n\n $command = $this->getCommand('for-each-ref')\n ->setOption('format', '%(refname),%(objectname)')\n ->addArgument('refs/tags');\n\n $commandResult = explode(PHP_EOL, trim($command->execute()));\n foreach ($commandResult as $v) {\n $pieces = explode(',', $v);\n if (2 == count($pieces)) {\n $result[substr($pieces[0], strlen('refs/tags/'))] = $pieces[1];\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "6edbfe772617320ecd6a6d095527300a", "score": "0.60172147", "text": "public function listTagInfo($tags = null, $user = null)\n {\n return $GLOBALS['injector']->getInstance('Mnemo_Tagger')\n ->getTagInfo($tags, 500, null, $user);\n }", "title": "" }, { "docid": "d372627adcda46c2ec6e4c84b3579b32", "score": "0.6014617", "text": "public static function list_recommend_tag() {\n $tagNameRows = Mysql::getInstance()->selectAll(\"SELECT tag_name FROM tag LIMIT 0,4\");\n $tagNames = array();\n foreach ($tagNameRows as $tagNameRow) {\n $tagNames[] = $tagNameRow['tag_name'];\n }\n return $tagNames;\n }", "title": "" }, { "docid": "63dfe7be2f03051428c884b67c3fe8ee", "score": "0.60033476", "text": "public function getTags(): array\n {\n return $this->tags;\n }", "title": "" }, { "docid": "4a615f3d2122401b0bb95560a11b96aa", "score": "0.59850574", "text": "public function getTagListAttribute()\n {\n return $this->tags->lists('name')->all();\n }", "title": "" }, { "docid": "8e92bde09ee8bb69fcc8cb3cf160f14f", "score": "0.59847254", "text": "function getAllUserTagsForObjectHTML()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$ttpl = new ilTemplate(\"tpl.tag_cloud.html\", true, true, \"Services/Tagging\");\n\t\t$tags = ilTagging::getTagsForObject($this->obj_id, $this->obj_type,\n\t\t\t$this->sub_obj_id, $this->sub_obj_type);\n\n\t\t$max = 1;\n\t\tforeach ($tags as $tag)\n\t\t{\n\t\t\t$max = max($max, $tag[\"cnt\"]);\n\t\t}\n\t\treset($tags);\n\t\tforeach ($tags as $tag)\n\t\t{\n\t\t\tif (!$this->isForbidden($tag[\"tag\"]))\n\t\t\t{\n\t\t\t\t$ttpl->setCurrentBlock(\"unlinked_tag\");\n\t\t\t\t$ttpl->setVariable(\"REL_CLASS\",\n\t\t\t\t\tilTagging::getRelevanceClass($tag[\"cnt\"], $max));\n\t\t\t\t$ttpl->setVariable(\"TAG_TITLE\", $tag[\"tag\"]);\n\t\t\t\t$ttpl->parseCurrentBlock();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ttpl->get();\n\t}", "title": "" }, { "docid": "463bd6dd42de1759dad46e1b52768da6", "score": "0.59609646", "text": "public function getTagNames() {\n $tags_query = $this->db->query(\"SELECT name FROM tags\");\n $tags = array();\n while ($tag = $tags_query->fetch_assoc()) {\n $tags[] = $tag;\n }\n return $tags;\n }", "title": "" }, { "docid": "dc9fbd7b6b85ec9e6d1f7ed424486a55", "score": "0.59428155", "text": "public function getTags() {\n if ( !$this->tags ) {\n $this->tags = new TagCollection( $this->data->tags, $this->proxy );\n }\n return $this->tags;\n }", "title": "" }, { "docid": "b7d159f3e4e1c8d51d080800f3dc0863", "score": "0.593526", "text": "public function getTags(): Collection\n {\n return $this->tags;\n }", "title": "" }, { "docid": "3f2a4d0bfcf0c4c56a8a99847fa17270", "score": "0.59150994", "text": "function getTags() {\n\t\treturn readTags($this->id, 'albums');\n\t}", "title": "" }, { "docid": "7fe319df7e2f2989f8377c6faff875b3", "score": "0.5902814", "text": "public function findtag(Request $request)\n { \n \n $uids = $request->uid;\n $id = $request->x;\n \n $tag = Tag::find($id)\n ->contact()\n ->where('user_id',$uids)\n ->get();\n\n if($tag->isEmpty())\n {\n return \"No Tag Available\";\n }\n \n else\n {\n foreach ($tag as $key => $value)\n { \n $tags = DB::table('contact_tag')\n ->where('contact_id', $value->id)\n ->get();\n if($tags != [] ||$tags != '' || $tags != undefined)\n {\n foreach ($tags as $keys => $values) \n {\n $tg = DB::table('tags')->where('id', $values->tag_id)->pluck('name');\n $tags[$keys] = $tg;\n }\n $tag[$key]->tags = $tags;\n }\n }\n return $tag;\n }\n }", "title": "" }, { "docid": "e6edc5a9c9630708b10d56b3de1c590f", "score": "0.5901135", "text": "public function getAll() {\n // Return a copy of the values.\n return self::$tags;\n }", "title": "" }, { "docid": "6a1e9e4fcfdaeab7feaa63791816f71b", "score": "0.58955395", "text": "public function getTags() {\n\t\t$dohvati = $this -> db -> query('select b.name as tag,b.id as id, count(*) as numb from item_tag a join tag b on b.id=a.tag group by a.tag;');\n\t\treturn $dohvati -> result();\n\t}", "title": "" }, { "docid": "276433732482603b799f4c3e0219c066", "score": "0.5895227", "text": "protected static function getAllTags()\n\t{\n\t\t$tags = array();\n\t\tforeach (self::$sites as $site)\n\t\t{\n\t\t\t$tags += $site[self::KEY_TAGS];\n\t\t}\n\t\tksort($tags);\n\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "c3407101c6953b2e5e3ece1890bae8da", "score": "0.58885247", "text": "private function getTagNames()\n {\n $tags = '';\n\n foreach ( $this->stored_tags as $tag )\n {\n $tags .= $tag->name . ', ';\n }\n\n return $tags;\n }", "title": "" }, { "docid": "5f3e2330c26749597b73d1130abba2f7", "score": "0.5869809", "text": "public function getTagNames()\n {\n return $this->tags->pluck('name')->toArray();\n }", "title": "" }, { "docid": "46784ad85ac8987849018d2fa9636d80", "score": "0.5854621", "text": "public function getTagsArray() {\r\n\t\t$tagArray = array ();\r\n\t\t\r\n\t\tif ($this->tags->count () > 0) {\r\n\t\t\tforeach ( $this->tags as $tag ) {\r\n\t\t\t\t$tagArray [] = $tag->getName ();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $tagArray;\r\n\t}", "title": "" }, { "docid": "6d47cb6082e95027f2fb8919ae81e7e3", "score": "0.5854541", "text": "public function gettags()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken() or die(JText::_('JINVALID_TOKEN'));\n\n\t\t$id = $this->input->get('id', 0, 'int');\n\t\t$record_model = $this->getModel($this->record_name);\n\t\t$tags = $record_model->gettags();\n\t\t$user = JFactory::getUser();\n\n\t\t// Get tag ids if non-new item\n\t\t$used = $id ? $record_model->getUsedtagsIds($id) : null;\n\t\t$used = is_array($used) ? $used : array();\n\n\t\t$permission = FlexicontentHelperPerm::getPerm();\n\t\t$CanCreateTags = $permission->CanCreateTags;\n\t\t$CanUseTags = $permission->CanUseTags;\n\n\t\t$CanUseTags = $CanUseTags ? '' : ' disabled=\"disabled\"';\n\t\t$n = count($tags);\n\t\t$html = '';\n\n\t\t// Create list of current item's already assigned tags\n\t\tif ($n)\n\t\t{\n\t\t\t$html .= '<div class=\"fc_tagbox\" id=\"fc_tagbox\">';\n\t\t\t$html .= '<ul id=\"ultagbox\">';\n\n\t\t\tfor ($i = 0, $n; $i < $n; $i++)\n\t\t\t{\n\t\t\t\t$tag = $tags[$i];\n\n\t\t\t\tif (!in_array($tag->id, $used))\n\t\t\t\t{\n\t\t\t\t\tcontinue; // Tag not assigned to item\n\t\t\t\t}\n\n\t\t\t\tif ($CanUseTags && in_array($tag->id, $used))\n\t\t\t\t{\n\t\t\t\t\t$html .= '\n\t\t\t\t\t<li class=\"tagitem\">\n\t\t\t\t\t\t<span>' . $tag->name . '</span>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"jform[tag][]\" value=\"' . $tag->tid . '\" />\n\t\t\t\t\t\t<a href=\"javascript:;\" class=\"deletetag\" onclick=\"javascript:deleteTag(this);\" title=\"' . JText::_('FLEXI_DELETE_TAG') . '\"></a>\n\t\t\t\t\t</li>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= '\n\t\t\t\t\t<li class=\"tagitem plain\">\n\t\t\t\t\t\t<span>' . $tag->name . '</span>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"jform[tag][]\" value=\"' . $tag->tid . '\" />\n\t\t\t\t\t</li>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$html .= '</ul>';\n\t\t\t$html .= '</div>';\n\t\t\t$html .= '<div class=\"fcclear\"></div>';\n\t\t}\n\n\t\tif ($CanCreateTags)\n\t\t{\n\t\t\t$html .= '\n\t\t\t<div class=\"fc_addtag\">\n\t\t\t\t<label for=\"addtags\">' . JText::_('FLEXI_ADD_TAG') . '</label>\n\t\t\t\t<input type=\"text\" id=\"tagname\" class=\"inputbox\" size=\"30\" />\n\t\t\t\t<input type=\"button\" class=\"fc_button\" value=\"' . JText::_('FLEXI_ADD') . '\" onclick=\"addtag()\" />\n\t\t\t</div>';\n\t\t}\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "a7bdbf5d3f19397a889d933e634684a8", "score": "0.5835548", "text": "public function getTagListAttribute()\n {\n return $this->tags->lists('id')->all();\n }", "title": "" }, { "docid": "f3c20276baa76ede0fde6d3857fbbc99", "score": "0.5835082", "text": "public function getTags() {\n\t\t$tagData = $this->_getTagData();\n\t\treturn array_keys($tagData);\n\t}", "title": "" }, { "docid": "2acd283ea922e3c8566856712859fc66", "score": "0.5830733", "text": "public function get_tags_user($tags)\n {\n $sql = \"SELECT user_id FROM user_tags WHERE tag_id in(\" . $tags . \") group by user_id\";\n $query = DB::query(Database::SELECT, $sql);\n $list = $query->execute()->as_array();\n return $list;\n }", "title": "" }, { "docid": "d0881a5c8aa23efba4f5eb87b00532d9", "score": "0.5823982", "text": "public function getTags()\n {\n $response = $this->makeRequest(self::PATH_TAGS);\n\n return self::_xmlResponseToArray($response, 'tags', 'tag', 'tag', 'count');\n }", "title": "" }, { "docid": "6be258ff7e07904aecc724bc3058f7de", "score": "0.5822411", "text": "public static function findAll() {\n $sql = \"SELECT * FROM Tags\";\n return mysqlHelper::get_mysql_obj_array($sql, 'Tag');\n }", "title": "" }, { "docid": "1083808b3fe97b5ef29eeb505248d312", "score": "0.5819974", "text": "public function allActiveTag(): array\n {\n return Tag::find()->notHidden()->all();\n }", "title": "" }, { "docid": "d088a22219313669546436f0aa06766a", "score": "0.58190066", "text": "public function getUserTags($user_id) {\n\t\t$t_table = Engine_Api::_() -> getDbtable('tags', 'core');\n\t\t$tName = $t_table -> info('name');\n\t\t$select = $t_table -> select() -> from($tName, array(\"$tName.*\", \"Count($tName.tag_id) as count\")) -> joinLeft(\"engine4_core_tagmaps\", \"engine4_core_tagmaps.tag_id = $tName.tag_id\", '') -> order(\"$tName.text\") -> group(\"$tName.text\") -> where(\"engine4_core_tagmaps.tagger_id = ?\", $user_id) -> where(\"engine4_core_tagmaps.resource_type = ?\", \"blog\");\n\t\t$this -> view -> userTags = $t_table -> fetchAll($select);\n\t}", "title": "" }, { "docid": "1977c43babe4846fad8c3089cf6fb2ae", "score": "0.5816066", "text": "protected function _getUserDefinedTags()\n {\n if (!isset(self::$_userDefinedTags)) {\n assert(!isset($builder), 'Cannot redeclare var $builder');\n assert(!isset($application), 'Cannot redeclare var $application');\n $builder = new \\Yana\\ApplicationBuilder();\n $application = $builder->buildApplication();\n unset($builder);\n self::$_userDefinedTags = $application->getVar('PROFILE.EMBTAG');\n }\n return self::$_userDefinedTags;\n }", "title": "" }, { "docid": "4da4bbfbc472bebdc1d0fba917732547", "score": "0.5810785", "text": "public static function getCachedTags(): array\n {\n return self::$tags;\n }", "title": "" }, { "docid": "a969b9f0ed863bc221b9947f61d28c28", "score": "0.58033043", "text": "public function getEmailTags() {\n\t\treturn array('module' => array(\"*\"), 'package' => array(\"*\"), 'service' => array(\"*\"));\n\t}", "title": "" }, { "docid": "2ca1fb24fc396242b896853b91b13836", "score": "0.5801846", "text": "public function getTags()\n {\n // Ensure image exists\n if (! $this->exists())\n {\n return array();\n }\n \n $this->tags = (new Tag())->getByImage($this->id);\n return $this->tags;\n }", "title": "" }, { "docid": "9f181a6c77a080181273787cfe0e3c7f", "score": "0.57986736", "text": "function tags() {\n\n\tglobal $app;\n\tglobal $globalSettings;\n\n\t$tags = R::find('tags', ' 1 ORDER BY name');\n\t$grouped_tags = mkInitialedList($tags);\n\t$app->render('tags.html',array('page' => mkPage($globalSettings['langa']['tags']),'tags' => $grouped_tags));\n\tR::close();\n\n}", "title": "" }, { "docid": "ba2e4ba04de067ea3f5788d2d63b6142", "score": "0.57974", "text": "public function getAllTags() {\n $tags = array();\n \n $query = \"SELECT `tag`, `tagid`, `counter`,`IdName`,`tag_description`, IdDescription FROM `forums_tags` ORDER BY `counter` DESC LIMIT 25 \";\n $s = $this->dao->query($query);\n if (!$s) {\n throw new PException('Could not retrieve tags!');\n }\n while ($row = $s->fetch(PDB::FETCH_OBJ)) {\n\t\t \t$row->tag=$this->words->fTrad($row->IdName) ; // Retrieve the real tags content\n\t\t\tif (empty($row->IdDescription)) {\n\t\t\t\t$row->TagDescription=\"\" ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$row->TagDescription=$this->words->fTrad($row->IdDescription) ; // Retrieve the description if any\n\t\t\t}\n $tags[$row->tagid] = $row;\n }\n shuffle($tags);\n return $tags;\n }", "title": "" }, { "docid": "20ea29357b8fd5198aa8a4fd4dcf691a", "score": "0.5789503", "text": "function getTags() {\n\t\tif (is_file(\"photos/{$this->_id}.xml\")) {\n\t\t\t$tags = array();\n\t\t\t$xml = simplexml_load_file(\"photos/{$this->_id}.xml\");\n\t\t\tforeach ($xml->tags->children() as $tag) {\n\t\t\t\t$tags[] = str_replace(\"_\", \" \", $tag.\"\");\n\t\t\t}\n\t\t\treturn $tags;\n\t\t}\n\t\telse {\n\t\t\tthrow new PhotoException(\"Photo with id {$this->_id} does not exist\");\n\t\t}\n\t}", "title": "" }, { "docid": "8d336c25c2dea55610f257271dbfcdbb", "score": "0.5784774", "text": "function getOfTags($tags) {\n $rel = $this->getRelation('_tags');\n $res = $rel->getSrc($tags); \n return $res;\n }", "title": "" }, { "docid": "0668b394e62ac6af99c459b64c0dc6f6", "score": "0.57791406", "text": "public function getPhotoTags() {\n\t\t$listEntries = Temboo_Results::getSubItemByKey(json_decode($this->get('Response'), true), \"data\");\n\t\t$resultArray = array();\n\t\tif(!is_null($listEntries)) {\n\t\t\tforeach ($listEntries as $entry) {\n\t\t \tarray_push($resultArray, new Facebook_PhotoTag_output($entry));\n\t\t\t}\n\t\t}\n\t\treturn $resultArray;\n\t}", "title": "" }, { "docid": "effad8df674044fc7088a559c65f53e9", "score": "0.5772948", "text": "public function contacts(): MorphToMany\n {\n return $this->morphedByMany(Contact::class, 'taggable');\n }", "title": "" }, { "docid": "92a3374dd0603520b260cb74722d9467", "score": "0.5771701", "text": "public function getTags()\n {\n return $this->getProperty()->tags;\n }", "title": "" }, { "docid": "1a55dfe4ebdaa7c30329dedc59c4c101", "score": "0.57697374", "text": "public function getTags() {\n try {\n // Call the API to fetch the tags\n $response = $this->infusionsoft->tags()->get()->toArray();\n return $this->response($response);\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "e493961ec91cc757924beebb07154d77", "score": "0.5761558", "text": "public function getTaggings() : array\r\n {\r\n return $this->taggings;\r\n }", "title": "" }, { "docid": "89a2a626230adae94dd78809e6fc8831", "score": "0.575182", "text": "public function get_tags()\n {\n $tags = array();\n\n foreach ((array)$this->data['categories'] as $cat) {\n $tags[] = rcube_utils::normalize_string($cat);\n }\n\n if (!empty($this->data['alarms'])) {\n $tags[] = 'x-has-alarms';\n }\n\n return $tags;\n }", "title": "" }, { "docid": "b866914d6f50dbb47ab4d5b3aa997070", "score": "0.5749318", "text": "function getOGTags();", "title": "" } ]
b99b84dc689a4e3488e3078e214f855a
Exibe a tela para selecionar a data
[ { "docid": "1122757232ddf4e9f403db5ac390a5ea", "score": "0.0", "text": "public function index() {\r\n\t\ttry {\r\n\t\t\t$data ['page_title'] = 'Relatório da Agenda';\r\n\t\t\t// recupera as consultas ordenadas pela hora de incio da consulta\r\n\t\t} catch ( \\Exception $e ) {\r\n\t\t\tLog::error ( $e );\r\n\t\t\talert ()->error ( $e->getMessage (), 'Atenção' )->persistent ( 'Fechar' );\r\n\t\t}\r\n\t\treturn view ( 'paginas.relatorio.dia.index' )->with ( $data );\r\n\t}", "title": "" } ]
[ { "docid": "86a5044e9993ab27472937e51e7f451a", "score": "0.68484485", "text": "function select() {\n\t\t\t\t// MODEL\n\t\t\t\t// MENGARAH KE METHOD DI CLASS MODEL AGAMA\n\t\t\t\t$data\t\t\t = $this->sistem->dataHome();\n\t\t\t\t$data_pegawai\t\t\t\t= $this->mutasi->dataSelect();\n\n\t\t\t\t\n\t\t\t\t// VIEW\n\t\t\t\t// MENGARAHKAN KE FILE VIEW/SELECT.PHP\n\t\t\t\tinclude \"view/dashboard.php\";\n\t\t\t}", "title": "" }, { "docid": "5afeac23225ff218b29ad69c4cb385fd", "score": "0.6783596", "text": "public function selector()\n {\n\n $year = (new Info)->getColumnAttributes(\"CAL_YEAR\");\n $province = (new Info(\"info\"))->getColumnAttributes(\"PROVINCE COLLATE NOCASE\");\n sort($year);\n $this->assign('title', 'Data selector');\n $this->assign('year', $year);\n $this->assign('province', $province);\n $this->render();\n\n }", "title": "" }, { "docid": "6772573731fe64839c72365dc5d676b2", "score": "0.6584348", "text": "public function select(){\n\t\t$sql = \"SELECT * FROM equipo_tipo\n\t\t\t\twhere equi_tip_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "00c43c27cb2117048a90f5006d5e14a7", "score": "0.65648305", "text": "public function selecionarAction() {\r\n\r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n // Instancia a classe de sistemas web\r\n $tabelas = new TabelaRModel();\r\n\t\t$consColuna = new ConsultaColunaModel();\r\n\r\n // Captura o código da transação pai\r\n $pai_cd_consulta = Zend_Registry::get(\"pai_cd_consulta\");\r\n\r\n // Define os filtros para a cosulta\r\n $where1 = $tabelas->addWhere(array(\"CC.CD_CONSULTA = ?\" => $pai_cd_consulta))\r\n ->getWhere();\r\n\r\n // Busca os dados para serem mostrados na view\r\n $select1 = $tabelas->select()\r\n\t\t\t\t\t\t ->distinct()\r\n ->setIntegrityCheck(false)\r\n ->from(array(\"TB\" => \"TABELA_R\"), array(\"CC.CD_CONSULTA\",\r\n \"CC.ALIAS_TABELA\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t \"TB.CD_TABELA\", \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"TB.NO_TABELA\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"TB.DS_TABELA\"))\r\n ->join(array(\"CC\" => \"CONSULTA_COLUNA\"), \"CC.CD_TABELA = TB.CD_TABELA\", array())\r\n ->where($where1);\r\n\r\n // Joga em um array todas as ações\r\n $arrayTabelas = $tabelas->fetchAll($select1);\r\n\r\n\t\t// Joga para a view as tabelas já vinculadas à consulta\r\n $this->view->tabsVinculadas = $arrayTabelas; \r\n\r\n // Define os filtros para a cosulta\r\n $where2 = $tabelas->addWhere(array(\"CC.CD_CONSULTA = ?\" => $pai_cd_consulta))\r\n\t\t\t\t\t\t ->addWhere(array(\"CC.CD_TABELA = ?\" => $params['cd_tabela']))\r\n ->addWhere(array(\"CC.ALIAS_TABELA = ?\" => $params['alias_tabela']))\r\n ->getWhere();\r\n\r\n $select2 = $tabelas->select()\r\n ->distinct()\r\n ->setIntegrityCheck(false)\r\n ->from(array(\"TB\" => \"TABELA_R\"), array(\"CC.CD_CONSULTA\",\r\n \"CC.ALIAS_TABELA\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"TB.CD_TABELA\", \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"TB.NO_TABELA\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"TB.DS_TABELA\"))\r\n ->join(array(\"CC\" => \"CONSULTA_COLUNA\"), \"CC.CD_TABELA = TB.CD_TABELA\", array())\r\n ->where($where2);\r\n\r\n // Define os parâmetros para a consulta e retorna o resultado da pesquisa\r\n $linhaConsulta = $tabelas->fetchRow($select2)->toArray();\r\n $linhaConsulta[\"ALIAS_TABELA_NOVA\"] = $linhaConsulta[\"ALIAS_TABELA\"];\r\n \r\n // Busca a consulta pai\r\n $where3 = $consColuna->addWhere(array(\"CC.CD_CONSULTA = ?\" => $pai_cd_consulta))\r\n ->getWhere();\r\n\r\n // Busca porcentagem das colunas já cadastradas\r\n $select3 = $consColuna->select()\r\n ->setIntegrityCheck(false)\r\n ->from(array(\"CC\" => \"CONSULTA_COLUNA\"), array(\"SUM(CC.TAM_LARGURA) AS TAM_LARGURA\"))\r\n ->where($where3);\r\n\r\n // Define os parâmetros para a consulta e retorna o resultado da pesquisa\r\n $resConsulta = $consColuna->fetchRow($select3);\r\n\r\n\t\t$this->view->perc_colunas = $resConsulta['TAM_LARGURA'];\r\n\r\n // Reenvia os valores para o formulário\r\n $this->_helper->RePopulaFormulario->repopular($linhaConsulta, \"lower\");\r\n\r\n }", "title": "" }, { "docid": "3cc0a04bdc327a4c99ee57cb00d91a1f", "score": "0.64791983", "text": "public function Individualgetdata();", "title": "" }, { "docid": "e6b17a25e84833ca0d18d39aa9314162", "score": "0.644738", "text": "public function selected()\n {\n $year = $_POST['year'];\n $province = $_POST['province'];\n $param = array();\n $where = array();\n $items = null;\n $info = new Info();\n if (isset($_POST[\"tables\"])) {\n $tables = $this->tableSelector($_POST['tables']);\n $info->setJoinTables($tables);\n }\n\n\n if ($year === \"all\" && $province === \"all\") {\n $items = $info->fetchAll();\n } else if ($year == \"all\") {\n\n $where = array(' PROVINCE = :PROVINCE');\n $param = array(':PROVINCE' => $province);\n $items = $info->where($where, $param)->fetchAll();\n\n } else if ($province == \"all\") {\n $where = array('CAL_YEAR = :CAL_YEAR');\n $param = array(':CAL_YEAR' => $year);\n $items = $info->where($where, $param)->fetchAll();\n } else {\n $where = array('CAL_YEAR = :CAL_YEAR', ' and PROVINCE = :PROVINCE');\n $param = array(':CAL_YEAR' => $year, ':PROVINCE' => $province);\n\n\n $items = $info->where($where, $param)->fetchAll();\n\n }\n\n\n $this->assign('entities', $items);\n $this->assign('title', 'Data selected');\n $this->render();\n\n }", "title": "" }, { "docid": "79507c966b2fbb0ab1cd61ff14b72256", "score": "0.64195997", "text": "public function selecionarAction() { \r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n // Instancia a classes de dados\r\n $menus = new WebMenuSistemaModel();\r\n \r\n // Retorna para a view os menus cadastrados\r\n $this->view->menus = $menus->getMenus();\r\n \r\n // Define os filtros para a cosulta\r\n $where = $menus->addWhere(array(\"CD_MENU = ?\" => $params['cd_menu']))->getWhere();\r\n \r\n // Recupera o sistema selecionado\r\n $menu = $menus->fetchRow($where);\r\n \r\n // Reenvia os valores para o formulário\r\n $this->_helper->RePopulaFormulario->repopular($menu->toArray(), \"lower\");\r\n }", "title": "" }, { "docid": "4fcac6ad4810e82249828a49290478a0", "score": "0.6354095", "text": "function consultar(){\n\t\t//entonces listo los alumnos\n\t\tif(!isset($_REQUEST['accion'])){\n\t\t\t$profesor_array = $this->modelo->profesorTodo();\t\n\t\t\t\t//incluir la vista para listar\n\t\t\t\tinclude('vista/profesorTabla.php');\n\t\t\t\t$vista = new profesorTabla();\n\t\t\t\t$vista -> mostrar_tabla($profesor_array);\n\t\t}\n\t}", "title": "" }, { "docid": "855795adb9b7c04c115e9d0a8deb0c24", "score": "0.63047564", "text": "function seleccionado()\n\t{\n\t\treturn $this->tiene_estado();\n\t}", "title": "" }, { "docid": "8db86c6108378d94f8953a6603cd1d49", "score": "0.62654877", "text": "public function getPersonalShow($data)\n {\n $sql = \"SELECT * FROM \".$this->tabla.\" WHERE id=\".$data->data;\n $tmp=$this->executeQuery($sql);\n $tablas['datos'] = $tmp[0];\n $tablas['error'] = 0;\n return $tablas;\n }", "title": "" }, { "docid": "a39896acdcdc01f223c5cc9f6c7fbe7a", "score": "0.626518", "text": "public function select(){\n\t\t$sql = \"SELECT * FROM equipo\n\t\t\t\twhere equi_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "c9734d367888c9cdcf3aa19ef81195bb", "score": "0.6261079", "text": "public function cargar_retenciones()\r\n {\r\n $cod_org = usuario_actual('cod_organizacion');\r\n $ano=$this->drop_ano->SelectedValue;\r\n $sql2 = \"select * from presupuesto.retencion where cod_organizacion='$cod_org' and ano='$ano' \";\r\n $datos2 = cargar_data($sql2,$this);\r\n // array_unshift($datos2, \"Seleccione\");\r\n $this->drop_retenciones->Datasource = $datos2;\r\n $this->drop_retenciones->dataBind();\r\n }", "title": "" }, { "docid": "0afe505ef320f460a115e7dd73ebbc7e", "score": "0.62436247", "text": "public function seleccionar(){\n //sql de la consulta\n $sql = \"SELECT * FROM especialidad E WHERE E.Estado = 1;\";\n //preparando la consulta\n $query = $this->conexion->prepare($sql);\n //ejecutandola\n $query->execute();\n //obteniendo el resultado en un arreglo asociativo\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n $this->conexion = null;\n return $result;\n }", "title": "" }, { "docid": "201cd5c6f1e8d74adf96ffb65aff0bd4", "score": "0.6240931", "text": "function buscatransporte() {\n $id = $_REQUEST['id'];\n $transporte = new Transporte();\n $cliente = new Cliente();\n $data = $transporte->buscarxCliente($id);\n //$dataCliente=$cliente->buscaCliente($id);\n for ($i = 0; $i < count($data); $i++) {\n /* if($data[$i]['idtransporte']==$dataCliente[0]['transporte']){\n echo '<option value=\"'.$data[$i]['idtransporte'].'\" selected>'.$data[$i]['trazonsocial'];\n }else{ */\n echo '<option value=\"' . $data[$i]['idclientetransporte'] . '\">' . $data[$i]['trazonsocial'];\n //}\n }\n }", "title": "" }, { "docid": "a6e644b27b1b827ac5a716bc6b1051fb", "score": "0.6234553", "text": "function getdatait(){\n\t\t$id = $this->uri->segment(4);\n\t\tif ($id === false ){\n\t\t\t$id = $this->datasis->dameval(\"SELECT id FROM tbrutas ORDER BY codrut LIMIT 1\");\n\t\t}\n\t\tif(empty($id)) return '';\n\t\t$dbid = $this->db->escape($id);\n\n\t\t$row = $this->datasis->damerow('SELECT codrut FROM tbrutas WHERE id='.$dbid);\n\n\t\t$codrut = $this->db->escape($row['codrut']);\n\n\t\t$grid = $this->jqdatagrid;\n\t\t$mSQL = \"\n\t\tSELECT a.*, b.desofi odesofi, c.desofi ddesofi\n\t\tFROM tbdestinos a\n\t\t\tJOIN tbofici b ON a.codofiorg=b.codofi\n\t\t\tJOIN tbofici c ON a.codofides=c.codofi\n\t\tWHERE codrut=${codrut} AND a.mostrar='S'\n\t\tORDER BY orden, a.codofiorg \";\n\n\t\t$response = $grid->getDataSimple($mSQL);\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "0255677efe19a514bd5967780bfe140d", "score": "0.62205935", "text": "function retriveDataRow(){\r\n\t\t$coal_name = $this->getName();\r\n\t\tmysql_query(\"SET NAMES 'latin2'\");\r\n\t\tif(gettype($this->data) == 'boolean' && !is_null($coal_name)){\r\n\t\t\t$query = \"SELECT * FROM \". TBL_COALITION .\r\n \" WHERE nazwa = '$coal_name'\";\r\n\t\t\tif($result = mysql_query($query)){\r\n\t\t\t\tif(mysql_num_rows($result) == 0){\r\n\t\t\t\t\t$this->data = NULL;\r\n\t\t\t\t\t$this->coalition = NULL;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$row = mysql_fetch_array($result, MYSQL_ASSOC);\r\n\t\t\t\t\t$this->data = $row;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$this->data = NULL;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "85e209690a131b49504a183ecdd70ba9", "score": "0.61991775", "text": "function select() {\n if ($row = parent::select()) {\n // seta os valores do registro selecionado\n $this->setDatas($row);\n \n $this->id = $row[$this->primary_name];\n \n return true;\n \n } else\n return false;\n }", "title": "" }, { "docid": "abb8f63084778af023f0d818eeca11ed", "score": "0.6186192", "text": "public function select($fertilizante_has_ingrediente);", "title": "" }, { "docid": "265921b36572832c6b9d45f4acfcfbe3", "score": "0.6167953", "text": "public function getSingleData(){\n //buatlah query\n $sqlQuery = \"SELECT \n * \n FROM\n \".$this->t_name.\"\n WHERE \n id = ?\n LIMIT 0,1\";\n //siapkan stmt\n $stmt = $this->conn->prepare($sqlQuery);\n //bindParam\n $stmt->bindParam(1,$this->id);\n //eksekusi perintahnya\n $stmt->execute();\n\n $dataRow = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->name = $dataRow['name'];\n $this->email = $dataRow['email'];\n $this->age = $dataRow['age'];\n $this->designation = $dataRow['designation'];\n $this->created = $dataRow['created'];\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.61612993", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.61612993", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.61612993", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "bec294f027331ca15dd3abfff8097f59", "score": "0.6159638", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "debd2d66f9510811e50c38ac908c1fff", "score": "0.611774", "text": "public function mostrarSeleccionado(){\n\t\t//se recibe por metodo post el id del estado a mostar\n\t\t$idestado = $_POST['idestado'];\n\t\t$res = Estado::selectEstado($idestado);\n\t\techo json_encode($res);\n\t}", "title": "" }, { "docid": "ee1c74195986f85ffb09a58d76c8da02", "score": "0.61098903", "text": "public function altaAction()\n\t{\n\t\t//$rows = $this->_services_simple_crud->getAll($this->_solicitud->getModel());\n\t\t//$this->view->rows = $rows;\n\t}", "title": "" }, { "docid": "0cecedcdd5f524ffff44e2dc4c84f36b", "score": "0.6098284", "text": "public function showdata()\n {\n $datatable = \"<ul style=\\\"list-style-type:none;padding:10px;\\\"><li style=\\\"color:white;\\\">No data suggestion</li>\";\n if ($_GET) {\n if ($_GET[\"q\"]) {\n $like[\"p.name\"] = \"%{$_GET[\"q\"]}%\";\n $like['p.sku'] = \"%{$_GET[\"q\"]}%\";\n $option[\"limit\"] = 50;\n $all_ca_list = $this->sc['Product']->getDao('ProductComplementaryAcc')->getAllAccessory($where, $option, $like);\n $arr = (array)$all_ca_list;\n if (!empty($arr)) {\n $datatable = \"<ul style=\\\"list-style-type:none;padding:10px;\\\">\";\n foreach ($all_ca_list as $key => $value) {\n $datatable .= <<<HTML\n <li>\n <a href=\"#\" onclick=\"selected('{$_GET[\"ctry\"]}', '{$value->getAccessorySku()}');return false;\"\n style=\"color:white;\"\n onmouseover=\"this.style.color='#F7E741';style.fontWeight='bold';\"\n onmouseout=\"this.style.color='white';style.fontWeight='normal';\"\n >\n {$value->getAccessorySku()} :: {$value->getName()}\n </a>\n </li><hr></hr>\nHTML;\n }\n $datatable .= \"</u>\";\n }\n }\n }\n\n echo $datatable;\n }", "title": "" }, { "docid": "97a15d42fe81f1af3b1545eb6d28bb7e", "score": "0.6072823", "text": "public function getEduardoShow($data)\n {\n $sql = \"SELECT * FROM \".$this->tabla.\" WHERE id=\".$data->data;\n $tmp=$this->executeQuery($sql);\n $tablas['datos'] = $tmp[0];\n $tablas['error'] = 0;\n return $tablas;\n }", "title": "" }, { "docid": "c3d80fe8fcefb291d15153310a6542c0", "score": "0.6064865", "text": "public function select(){\n\t$sql=\"SELECT * FROM tipousuario\";\n\treturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "fe0513a9dd45ca9ce1da31bd45b7ad49", "score": "0.6058304", "text": "public function pubSelectXX($data){\r\n\t\t\treturn $output;\r\n\t\t}", "title": "" }, { "docid": "29418dd4f07e2a74cef86d8d9fe6aadb", "score": "0.60524815", "text": "public function retreiveData($data_label = \"\")\n\t{\n\n\t}", "title": "" }, { "docid": "95df60faa04a6bc67adba346b49b314c", "score": "0.60486865", "text": "public function selector_tip_doc(){\n $sql = \"SELECT * FROM tbltipo_documento WHERE tblestado_general_est_gen_id=1\";\n $result = mysqli_query($this->conection,$sql);\n return $result;\n }", "title": "" }, { "docid": "6599cfafed37f9a127b9649a2cb8566e", "score": "0.6048648", "text": "public function getSelect();", "title": "" }, { "docid": "0fc5a752e52dab5c04cdffa2f1e26a2f", "score": "0.6043795", "text": "public function seleccionarTodos();", "title": "" }, { "docid": "bf945ae4f5eb677a157655e29e4974c4", "score": "0.6040615", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('tbenvio');\n\n\t\t$response = $grid->getData('tbenvio', array(array()), array(), false, $mWHERE,'id', 'desc');\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "44287c25f77d814d9b2ff6a90b082923", "score": "0.599987", "text": "private function loadData()\n {\n if ($this->selectedOption == 'all' || $this->selectedOption == 'a') {\n $this->syncService->getAllData();\n } else {\n $this->syncService->getData($this->selectedOption);\n }\n }", "title": "" }, { "docid": "82d956800783a8a52fd9e83d98952e4c", "score": "0.59747595", "text": "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM aattribut WHERE aatribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->id_produit = $row->id_produit;\r\n\r\n$this->valeur = $row->valeur;\r\n\r\n}", "title": "" }, { "docid": "e5124edd81fab29b61412f7035872f9a", "score": "0.5974728", "text": "function evt__cuadro__seleccion($datos)\r\n {\r\n $this->dep('datos')->tabla('recibo')->cargar($datos);\r\n $this->set_pantalla('pant_impresion');\r\n }", "title": "" }, { "docid": "3ac225002f5efd98efe5cf3e4a7886b1", "score": "0.5967189", "text": "public function cargarCita(){\n if(isset($_GET[\"id\"])){\n echo ($_GET[\"datos\"]);\n }\n else\n {\n echo (\"No hay Id\");\n }\n }", "title": "" }, { "docid": "0f404eb68d9f2dd865d405e03cb64046", "score": "0.5964359", "text": "public function opsi(){\r\n\t\t\r\n\t\t$query=\"SELECT * FROM kota\";\r\n\t\t$result= $this->mysqli->query($query) or die(mysqli_connect_errno().\"salah\");\r\n\t\t//echo \"<select>\";\r\n\t\tif($result){\r\n\t\t\twhile($rows=$result->fetch_assoc()){\r\n\t\t\t\t$this->data[]=$rows;\r\n\t\t\t\t//$this->data[]=$rows;\r\n\t\t\t\t//echo(\"<option value='$rows['id_status']'>$rows['status']</option>\");\r\n\t\t\t\t//print_r($rows);\r\n\t\t\t\t//echo \"<option>\".$rows['status'].\"</option>\";\r\n\t\t\t}\r\n\t\t\treturn $this->data;\r\n\t\t}\r\n\t\t//echo \"</select>\";\r\n\t}", "title": "" }, { "docid": "c93cb076ee70ac92f30035fae136d373", "score": "0.59613776", "text": "function select() {\r\n $umed_codigo = $this->umed_codigo;\r\n $sql = \"SELECT * FROM proc_umedida WHERE umed_codigo = $umed_codigo;\";\r\n $result = $this->database->query($sql);\r\n// $result = $this->database->result;\r\n// $row = mysql_fetch_object($result);\r\n\r\n\r\n// $this->umed_codigo = $row->umed_codigo;\r\n//\r\n// $this->umed_nombre = $row->umed_nombre;\r\n//\r\n// $this->umed_descripcion = $row->umed_descripcion;\r\n//\r\n// $this->umed_sigla = $row->umed_sigla;\r\n $i=0;\r\n \r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arrprocume[$i]['umed_codigo'] = $datos['umed_codigo'];\r\n $this->arrprocume[$i]['umed_nombre'] = $datos['umed_nombre'];\r\n $this->arrprocume[$i]['umed_descripcion'] = $datos['umed_descripcion'];\r\n $this->arrprocume[$i]['umed_sigla'] = $datos['umed_sigla'];\r\n }\r\n }", "title": "" }, { "docid": "0984b89298d9e6fd47ef40b8af9def05", "score": "0.59591055", "text": "public function show()\n {\n\t\t//$result = $a->selectAll();\n include(\"view/bureau.html\");\n }", "title": "" }, { "docid": "b40f849eba90d1d978d44fdb6690d2fe", "score": "0.5955867", "text": "function loadSeeOpcion() {\n $r = $this->dopc->getSeeOpcionById($this->id);\n if ($r != -1) {\n $this->nombre = $r[\"nombre\"];\n $this->variable = $r[\"variable\"];\n $this->url = $r[\"url\"];\n $this->nivel = $r[\"nivel\"];\n $this->padre = $r[\"padre\"];\n $this->orden = $r[\"orden\"];\n $this->layout = $r[\"layout\"];\n $this->operador = $r[\"operador\"];\n } else {\n $this->nombre = \"\";\n $this->variable = \"\";\n $this->url = \"\";\n $this->nivel = \"\";\n $this->padre = \"\";\n $this->orden = \"\";\n $this->layout = \"\";\n $this->operador = \"\";\n }\n }", "title": "" }, { "docid": "d5de958605dd6134664863de7d664e84", "score": "0.59453106", "text": "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM atividade WHERE id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = $result->fetch_object();\r\n\r\n\r\n$this->id = $row->id;\r\n\r\n$this->nome = $row->nome;\r\n\r\n$this->vagas = $row->vagas;\r\n\r\n$this->valor = $row->valor;\r\n\r\n}", "title": "" }, { "docid": "94fdd0f600afac0e311335a39549d2f6", "score": "0.5943711", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('scon');\n\n\t\t$response = $grid->getData('scon', array(array()), array(), false, $mWHERE, 'id','desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "fcad5f84a74a3ca20966cbc44c576a73", "score": "0.5937897", "text": "public function dataSelect()\n\t{\n\t\t// Check for schema information\n\t\t$Schema = $this->session->__get('PRIMARY_SCHEMA');\n\t\t$Table = $this->session->__get('PRIMARY_TABLE');\n\n\t\tif(!empty($Schema) && !empty($Table))\n\t\t{\n\t\t\t$this->set('schemaName', $Schema->getSchemaName());\n\t\t\t$this->set('tableName', $Table->getTableFriendlyName());\n\n\t\t\t// Get the tables to reference\n\t\t\t$Tables = array();\n\n\t\t\t$Tables[] = array(\n\t\t\t\t'TABLE' => $Table,\n\t\t\t\t'COLUMNS' => THINKER_Object_Table::getTableColumnNames($Schema->getSchemaName(), $Table->getTableName()),\n\t\t\t\t'RELATIONSHIP' => null\n\t\t\t\t);\n\n\t\t\t// Discover relationships\n\t\t\t$Relationships = $Table->discoverRelationships();\n\n\t\t\tif($Relationships)\n\t\t\t{\n\t\t\t\t// Compile columns from relationship tables\n\t\t\t\tforeach($Relationships as $T)\n\t\t\t\t{\n\t\t\t\t\t$Tables[] = array(\n\t\t\t\t\t\t'TABLE' => THINKER_Object_Table::createFromDB($T->getReferencedSchema(), $T->getReferencedTable()),\n\t\t\t\t\t\t'COLUMNS' => THINKER_Object_Table::getTableColumnNames($T->getReferencedSchema(), $T->getReferencedTable()),\n\t\t\t\t\t\t'RELATIONSHIP' => $T\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now perform any actions specified, since we can use the columns to pull the selected fields\n\t\t\t$phase = getPageVar('phase', 'str', 'GET');\n\n\t\t\tswitch($phase)\n\t\t\t{\n\t\t\t\tcase 'noCols':\n\t\t\t\t\tpushMessage('Invalid or no columns selected!', 'warning');\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'proceed':\n\t\t\t\t\t// Gather all possible column selections\n\t\t\t\t\t// For each column, create the expected ID string and try to grab its value\n\t\t\t\t\t$selectCols = array();\n\n\t\t\t\t\tforeach($Tables as $t)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ColTable = $t['TABLE'];\n\t\t\t\t\t\t$cols = $t['COLUMNS'];\n\t\t\t\t\t\t$ColRelationship = $t['RELATIONSHIP'];\n\n\t\t\t\t\t\t// Loop through cols\n\t\t\t\t\t\tforeach($cols as $col)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($colName, $colFriendlyName) = $col;\n\n\t\t\t\t\t\t\t$srcRelationCol = null;\n\n\t\t\t\t\t\t\tif(!empty($ColRelationship))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$srcRelationCol = $ColRelationship->getSourceColumn();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$id = $this->createColId($ColTable->getTableSchema(), $ColTable->getTableName(), $colName, $srcRelationCol);\n\n\t\t\t\t\t\t\t// Pull data\n\t\t\t\t\t\t\t$val = getPageVar($id, 'checkbox', 'POST', false);\n\n\t\t\t\t\t\t\tif($val)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Add to list of columns to pull\n\t\t\t\t\t\t\t\t$selectCols[$id] = array(\n\t\t\t\t\t\t\t\t\t'TABLE' => $ColTable,\n\t\t\t\t\t\t\t\t\t'COLUMN' => THINKER_Object_Column::createFromDB($ColTable->getTableSchema(), $ColTable->getTableName(), $colName),\n\t\t\t\t\t\t\t\t\t'RELATIONSHIP' => $ColRelationship\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}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!empty($selectCols))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Add to session and redirect\n\t\t\t\t\t\t$this->session->__set('PULL_COLUMNS', $selectCols);\n\t\t\t\t\t\tredirect('DataPull', 'filterSelect');\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// Try again\n\t\t\t\t\t\tredirect('DataPull', 'dataSelect', array('phase' => 'noCols'));\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$this->set('tables', $Tables);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Redirect back to database selection\n\t\t\tredirect('DataPull', 'dbSelect', array('phase' => 'invalidCombo'));\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "930e26f4e01f0d972a7a528107749265", "score": "0.5935149", "text": "public function select()\n {\n }", "title": "" }, { "docid": "2baf176ce70b49daf4f415adb5396504", "score": "0.5934946", "text": "public function selecionar($id_usuario){\n $_vetor = array();\n $stmt = $this->_conn->prepare(\"SELECT * FROM ge_usuario WHERE ativo = 'S' ORDER BY nome\");\n $stmt->execute();\n //retornar para cada linha na tabela ge_usuario, um objeto usuario e insere em um array de usuarios \n $result = $stmt->fetchAll();\n foreach ($result as $key => $linha){ \n $usuario = new Usuario($linha[\"id_usuario\"]\n ,$linha[\"usuario\"]\n ,$linha[\"senha\"]\n ,$linha[\"nome\"]\n ,$linha[\"email\"] \n ,$linha[\"celular\"]\n ,$linha[\"telefone\"]\n ,$linha[\"ativo\"]\n ,$linha[\"id_ultimo_sinal\"]\n ,$linha[\"perfil\"]);\n $_vetor[$key] = $usuario; \n }\n $html = \"<option value=''>\".\"Selecione um usuário\".\"</option>\\n\";\n foreach ($_vetor as $usuario) {\n $id = $usuario->getId();\n $nome = $usuario->getNome();\n $html .= \"<option value=\".$id;\n if($id == $id_usuario){ \n $html .= \" selected\";\n }\n $html .= \" >\".$nome.\"</option>\\n\";\n } \n return $html;\n //fecha conexão\n //$this->_conn->__destruct();\n }", "title": "" }, { "docid": "bc115e29107869bc5711c952ad8a6fce", "score": "0.5933675", "text": "public function select($alternativa);", "title": "" }, { "docid": "ca79c0e842981da5f5782493cf094f82", "score": "0.59301436", "text": "public function selecionar(Persistente $persistente){\n // `agendamento` ag,`cidadao` cd,`agendamento_cidadao` ac,`servico` se, `secretaria` sc\n // WHERE ag.id = ac.agendamento_id and cd.id = ac.cidadao_id and se.id = ag.servico_id and sc.id = se.secretaria_id and cd.cpf = :cpf\";\n // return $this->select($sql,array(\"cpf\"=> $persistente->getCidadao()->getCpf()));\n }", "title": "" }, { "docid": "58a74efa2fea5a23cec47f82ea6e102f", "score": "0.59300774", "text": "public function select()\n {\n\n }", "title": "" }, { "docid": "6d22b76902591efbcfe591407431deaf", "score": "0.5925939", "text": "public function Listar(){\n $dica_saude = new Exame();\n\n //Chama o método para selecionar os registros\n return $dica_saude::Select();\n }", "title": "" }, { "docid": "da4ea6dd8a87127859f476cfd6230671", "score": "0.59256697", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('prdo');\n\n\t\t$response = $grid->getData('prdo', array(array()), array(), false, $mWHERE, 'id', 'Desc' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "f331c20236118f362accadcc1f8292aa", "score": "0.5914131", "text": "public function select() { }", "title": "" }, { "docid": "519a623cfa8ec21cb700e8b9a1c5a26c", "score": "0.59088707", "text": "function bring_information( $nombre_lista, $tabla, $campo_llave_primaria, $campo_a_mostrar,$method,$action )//esta funcion se encarga de traer la informacion en pantalla\n { //esta es la funcion que trae la informacion dela base de datos\n\t\t $departure = \"\";\n\t\t include 'config.php';\n\n\t\t $sql = \"SELECT * FROM $tabla \";\n\t\t \n\t\t echo $sql;\n\t\t //este son los codigos del titulo//\t\n\t\t if($sn_pruebas==\"s\") echo \"<h2><b><p class='bg-success'>SELECT YOUR SYMPTOM</p></b></h2>\";\n\t\t $result = $this->Connection->query( $sql );\n\n\t\t $departure = \"<SELECT id='sintomas' ng-model='lista' ng-change='cargar_datos_php()' multiple size='20' class='form-control'>\";\n\n\t\t\t$contador=0;\n\t\t while( $row = mysqli_fetch_assoc( $result ) )\n {\n\t\t\n\t\t\n\t\t $departure .=\n\t\t\t \"<tr>\n\t\t\t <td>\n\t\t\t\t \n\t\t <option value='\".$row[ $campo_llave_primaria ].\"'>\".$row[ $campo_a_mostrar ].\"</option>\n\n\t\t\t </td>\n\t\t\t </tr>\";\n\t\t\n }\n\n\n\t\t $departure .=\" </tbody>\n\t\t </table>\n\t\t <input type='hidden' >\n\n\t\t \";\n\n\t\t return $departure;\t\n\n\n }", "title": "" }, { "docid": "5852ae54dc073732bf4fe4755994eb99", "score": "0.59077305", "text": "public function select($administracion);", "title": "" }, { "docid": "0456c6ad8fdfedfb650c3292fd18a98c", "score": "0.5902783", "text": "function visualizar(){\r\n $pessoa_dao= new pessoa_dao();\r\n $ativo=\"disabled\";\r\n $resultado=$pessoa_dao::selecionar($_POST[\"id\"],$ativo);\r\n echo \"Visualizar pessoa¨\".$resultado;\r\n //echo $resultado;\r\n\r\n }", "title": "" }, { "docid": "0110247c58d39961ac17ea4cd340ad44", "score": "0.5901697", "text": "public function select($calendario);", "title": "" }, { "docid": "d626845f17d09f7e8e50275c0cbdc025", "score": "0.59015334", "text": "private function obtenerDatos(){\n\t\t$this->datos['lista_tipos_tareas'] = $this->DB_Tarea->lista_Tipos();\n\t}", "title": "" }, { "docid": "4935a0354680da3ed45b2eb0885025b6", "score": "0.59002864", "text": "public function select()\n {\n }", "title": "" }, { "docid": "6577700ed6c4f84bb80f5751ecd87b02", "score": "0.58962184", "text": "public function selectdata(){\n$this->autoRender=false;\n$data=$this->connection->execute(\"select * from users\")->fetchAll();\nprint_r($data);\n}", "title": "" }, { "docid": "78a1ba915ad63534d689e4f9f62dea1d", "score": "0.589593", "text": "public function loadAction() {\n \t// set no render\n \t$this->_helper->getHelper('viewRenderer')->setNoRender();\n \t// If you use layout, disable it\n \t$this->_helper->layout()->disableLayout();\n \n \t// Get the id from request\n \t$id = $_POST['id'];\n \tif($id != 0){\n\t \t// Query from database\n\t \t$data = Khcn_Api::_()->getDbTable('bo_mon','default')->getBoMonByDonViAssoc($id);\n\t \t$result = '';\n\t \tforeach ($data as $k=>$v)\n\t \t{\n\t \t\t$result .= '<option value=' . $k . '>' . $v .'</option>';\n\t \t}\n\t \techo $result;\n \t}else{\n \t\techo '<option value=\"0\">===== Chọn bộ môn =====</option>';\n \t}\n }", "title": "" }, { "docid": "f4cf5a79dad150259313ff3110a2ca3e", "score": "0.5892526", "text": "public function tratarDados(){\r\n\t\r\n\t\r\n }", "title": "" }, { "docid": "21678d47d3e4ec0138b758f622adc6b5", "score": "0.58839774", "text": "public function selectMedecin(){\n $bdd=Connexion::getInstance();\n $req=\" select * from utilisateur u ,specialite s,service ser \n WHERE u.idSpecialite=s.idSpecialite and s.idService=ser.idService\n AND idStatus=\".self::NIVEAU_1;\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "title": "" }, { "docid": "6c65e546f430c129338223d273932423", "score": "0.5881244", "text": "function seleccionInicio($idP){\r\n }", "title": "" }, { "docid": "cfc2b0ddc81b0c082a37f167a909f1a2", "score": "0.5878945", "text": "static public function selectInfo($info);", "title": "" }, { "docid": "083bc08113413e9fe1163bc9c4262388", "score": "0.58788794", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('tbrutas');\n\n\t\t$response = $grid->getData('tbrutas', array(array()), array(), false, $mWHERE, 'codrut' );\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "de965a869ee36c8b40986502ac14af44", "score": "0.58775246", "text": "public function select($area_empresa);", "title": "" }, { "docid": "4dee1585ff9b761692c604d54f89e104", "score": "0.5874196", "text": "public function ApiSelect(){\r\n\t\t\t$this->SetDefaults();\r\n\t\t\t$this->WorkWithApiFilter();\r\n\t\t\t$this->WorkWithApiSorting();\r\n\t\t\t$this->Load($this->LoadRows(false)); //set others before\r\n\t\t}", "title": "" }, { "docid": "47114ca6c81e1bc4a0b8dea9fe17e6bb", "score": "0.58622164", "text": "function get_data_request_options()\r\n{\r\n\t//kijk wat het abstractie niveau is van de huidige opties\r\n\t$current_abstraction_level_query = 'select option_type from Requestable_data where option_name == \":current_selected_option\"';\r\n\t$current_abstraction_level = execute_sql_extract_data($current_abstraction_level_query);\r\n\t\r\n\t//haal de opties maar op uit de DB\r\n\t$requestable_data_descriptions = 'select option_name from Requestable_data where option_type = ' . $current_abstraction_level;\r\n\texecute_sql_extract_data($requestable_data_descriptions);\r\n}", "title": "" }, { "docid": "0d91324b5749326bd1682a7c1e4f9446", "score": "0.58546174", "text": "public function obtenersaldo();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5853781", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5853781", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5853781", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5853781", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5853781", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5853781", "text": "public function select();", "title": "" }, { "docid": "08977afa9ec4d9381b19bf502cdb7f0b", "score": "0.5849944", "text": "private function selectTable(){\n\t\tView::show(\"user/seleccionaTablas\");\n\t}", "title": "" }, { "docid": "99e750a1181e2285d9a9223b80cb66e1", "score": "0.58477926", "text": "function loadMenu(){\r\n $this->procedimiento='vef.ft_cierre_documento_ime';\r\n $this->transaccion='VF_LOAD_MENU_FETCH';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('codigo','codigo','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n //echo ($this->consulta);exit;\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "d5616fa3521608c8cfee5a3840270553", "score": "0.58471835", "text": "function readOne(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=? LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id'];\n\t\t$this->nk = $row['nama_kelas']; \n\t\t$this->ket = $row['keterangan']; \n\t\t$this->id_ta = $row['id_tahun_akademik']; \n\t}", "title": "" }, { "docid": "eed49a456f268360de73af5365ae03f3", "score": "0.5843745", "text": "public function SelectCierraCaja()\r\n {\r\n $this->init();\r\n \r\n $this->_sp = \"sp_selCajaCierreParcial\";\r\n \r\n return Database::getInstance()->DoQuery($this->_sp);\r\n }", "title": "" }, { "docid": "67cb0f6729e8b462bb155ac67ecdb536", "score": "0.58421665", "text": "private function retrieveData(){\n $dbo=new DB();\n\t\t$db=$dbo->db;\n\t\t$stmt = $db->prepare(\t'SELECT `doors`.`door_type`,'.\n\t\t\t\t\t\t\t\t\t\t'`doors`.`current_durability`, '.\n '`doors`.`state`, '.\n\t\t\t\t\t\t\t\t\t\t'`door_types`.`description`, '.\n\t\t\t\t\t\t\t\t\t\t'`door_types`.`durability`, '.\n\t\t\t\t\t\t\t\t\t\t'`door_types`.`key` '.\n\t\t\t\t\t\t\t\t'FROM `doors`,`door_types` '.\n\t\t\t\t\t\t\t\t'WHERE `doors`.`door` = ? AND '.\n\t\t\t\t\t\t\t\t\t\t'`doors`.`door_type` = `door_types`.`door_type` '.\n\t\t\t\t\t\t\t\t'LIMIT 1'\n\t\t\t\t\t\t\t\t);\n\t $stmt->bind_param(\"i\", $this->id);\n\t $stmt->bind_result($this->type,$this->currDurability,$this->state,$this->description,$this->maxDurability,$this->key);\n\t $stmt->execute();\n\t $stmt->fetch();\n \t\t$stmt->close();\n }", "title": "" }, { "docid": "bab4a9af7fa15c556f316174f81c832a", "score": "0.58377767", "text": "function getdata(){\n\t\t$grid = $this->jqdatagrid;\n\t\t// CREA EL WHERE PARA LA BUSQUEDA EN EL ENCABEZADO\n\t\t$mWHERE = $grid->geneTopWhere('scst');\n\t\t$response = $grid->getData('scst', array(array()), array(), false, $mWHERE, '(tipo_doc=\"XX\"), (fecha>actuali) desc, fecha', 'desc');\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "title": "" }, { "docid": "e6595f456b54f9106522927606500e0a", "score": "0.58366334", "text": "function get_data() {\n $query = $this->db->query('SELECT * from paciente where activo=1');\n return $query->result();\n }", "title": "" }, { "docid": "8a35ad3c5e49828cd7c6e3cd33f096c3", "score": "0.58344644", "text": "public function get_data()\n {\n\n\n }", "title": "" }, { "docid": "bba6f7dd71df7c28de9f15f37ef8a182", "score": "0.5827079", "text": "public function getSelected() {}", "title": "" }, { "docid": "bba6f7dd71df7c28de9f15f37ef8a182", "score": "0.5826613", "text": "public function getSelected() {}", "title": "" }, { "docid": "99ee70c65fd1b6f0e9691da36954aff9", "score": "0.5823546", "text": "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM funcionario_filho WHERE id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = $result->fetch_object();\r\n\r\n\r\n$this->id = $row->id;\r\n\r\n$this->idx_funcionario = $row->idx_funcionario;\r\n\r\n$this->nome = $row->nome;\r\n\r\n$this->nascimento = $row->nascimento;\r\n\r\n}", "title": "" }, { "docid": "70fc623d85a5bdac27a0c05788853685", "score": "0.5817627", "text": "function datos_seleccion($id_seleccion,$id_usuario) {\n\t\t$query = \"SELECT seleccion.*\n\t\tFROM seleccion\n\t\tWHERE seleccion.id_seleccion = '$id_seleccion'\n\t\tAND seleccion.id_usuario='$id_usuario'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "title": "" }, { "docid": "6df2bddeff202a2e6680bb5b18c49a85", "score": "0.57979864", "text": "public function get_data()\n {\n }", "title": "" }, { "docid": "a46a236ce29e84ead25e7bfeaff6e5b5", "score": "0.5776535", "text": "public function get_detalle_aros_rec_ini($numero_venta){\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select p.marca,p.color,p.modelo,p.categoria,d.id_producto,d.numero_venta from producto as p join detalle_ventas as d where p.id_producto=d.id_producto and d.numero_venta=? and categoria='aros';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$numero_venta);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "title": "" }, { "docid": "5ae2163f24f6768ed71877d4ad2cead2", "score": "0.57741207", "text": "public function select($datos_){\n $id=$datos_->getId();\n\n try {\n $sql= \"SELECT `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`\"\n .\"FROM `datos_`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $datos_->setId($data[$i]['id']);\n $datos_->setNombre_proyecto($data[$i]['nombre_proyecto']);\n $datos_->setNombre_actividad($data[$i]['nombre_actividad']);\n $datos_->setModalidad_participacion($data[$i]['modalidad_participacion']);\n $datos_->setResponsable($data[$i]['responsable']);\n $datos_->setFecha_realizacion($data[$i]['fecha_realizacion']);\n $datos_->setProducto($data[$i]['producto']);\n $semillero = new Semillero();\n $semillero->setId($data[$i]['semillero_id']);\n $datos_->setSemillero_id($semillero);\n\n }\n return $datos_; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "5d0f6d4ed37799233ade1ef44ea34e2e", "score": "0.5769384", "text": "private function load_selected()\r\n {\r\n $this->arSelected[\"ctx\"] = $this->get_by_id($this->idSelected);\r\n if($this->arSelected[\"ctx\"])\r\n $this->arSelected[\"ctx\"] = $this->arSelected[\"ctx\"][array_keys($this->arSelected[\"ctx\"])[0]];\r\n\r\n $this->arSelected[\"noconfig\"] = $this->get_noconfig_by(\"id\",$this->idSelected);\r\n //pr($this->arSelected,\"arSelected\");\r\n }", "title": "" }, { "docid": "91660d449425b843aa9ed2a258fd6f37", "score": "0.57640684", "text": "function clients_selectmenu_fetchData($ctlData,$clientID) {\t\n\treturn clients_selectmenu_getData($ctlData,$clientID);\n}", "title": "" }, { "docid": "8d5f886108151e4f0dc6009c1a00eefa", "score": "0.57589024", "text": "public function selectById()\n\t\t{\n\t\t}", "title": "" }, { "docid": "e853d2f45a5813ef93b45f9d2ed90f69", "score": "0.5758406", "text": "public function selectAllactor() {\n\t\t$this->dbAdapter->dbOpen();\n\t\t$result = $this->dbAdapter->actorSelectAll();\n\t\t$this->dbAdapter->dbClose();\n\t\t$this->error = $this->dbAdapter->lastError();\n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "ad112d216dc5ae4d689fc03fee01d18e", "score": "0.5753902", "text": "function get_data() {\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id = :id\";\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(':id', $this->id);\n $stmt->execute();\n $article_data = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->title = $article_data['title'];\n $this->illustration = $article_data['illustration'];\n $this->creation_date = $article_data['creation_date'];\n $this->category = $article_data['category'];\n $this->content = $article_data['content'];\n }", "title": "" }, { "docid": "d7443179a0b82f0ab3f9576f15b40601", "score": "0.5750067", "text": "function readOne(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=? LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id']; \n\t\t$this->nis = $row['nis']; \n\t\t$this->nm = $row['nama_santri']; \n\t\t$this->ta = $row['tahun_akademik']; \n\t\t$this->sta = $row['status_santri']; \n\t}", "title": "" }, { "docid": "662f75c9373909afc20ee14d54af7b91", "score": "0.5747221", "text": "public function getDataAction () {\n\t\t$this->getAnswer();\n\t}", "title": "" }, { "docid": "abf6a1f2d3c92c7e745d82186e87db96", "score": "0.57359415", "text": "public function get_Docente(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from docente;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "a1c6b0ae43c913352bdec508a032b9ca", "score": "0.5734537", "text": "function listarTipoEquipo(){\n\t\t$this->procedimiento='gem.f_tipo_equipo_sel';\n\t\t$this->transaccion='GEM_TEQ_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_equipo','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('descripcion','text');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\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": "6e5bd0cd29ba411710693280b85f3425", "score": "0.5732942", "text": "function mostrar_subcategoria(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM subcategoria WHERE id_sub='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_sub'];\n\t\t\t$this->prioridad=$resultado['prioridad_sub'];\n\t\t}\n\t}", "title": "" } ]
58b5b25db7ce740045f7b58c83d3b57b
/ Save/Add Gift Assets... datta...
[ { "docid": "4a7dbeabeeca77e35c7a59baeffb1770", "score": "0.5500588", "text": "public function save_other_gift_assets(){\n $will_id = $this->session->userdata('will_id');\n $other_gift_assets_data = array(\n 'will_id' => $will_id,\n 'gift_type' => $this->input->post('gift_type'),\n 'gift_description' => $this->input->post('gift_description'),\n );\n $this->Will_Model->save_other_gift_assets($other_gift_assets_data);\n }", "title": "" } ]
[ { "docid": "423241a6249e59a82e2a8a488646bf88", "score": "0.6243566", "text": "public function create() {\n //save media to $imree_assets_directory/$asset_id/\n //save xml version of metadata to media directory \n //generate thumbnail for media and save to media directory\n //generate openzoom image and save to media directory\n }", "title": "" }, { "docid": "d1c7c9962232747b607da7ec7de00978", "score": "0.58007133", "text": "public abstract function assets();", "title": "" }, { "docid": "9da670e42a913266d791aaa174ea62ce", "score": "0.5743169", "text": "public function putAssets()\n {\n\n $json = \\Input::all();\n\n $key = \\Input::get('key');\n\n $json['mode'] = 'edit';\n\n $batch = \\Input::get('batch');\n\n \\Dumper::insert($json);\n\n }", "title": "" }, { "docid": "7b33d94a2f1a819eeef7ca0d70ff6cc8", "score": "0.5508491", "text": "public function saveImage()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "c071aad04dae2bbb4bcf9c996e9b1f20", "score": "0.5506362", "text": "public function add_assets(){\n\t\t\t\n\t\t\t$this->add_js();\n\t\t\t$this->add_css();\n\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "f709f0c694a1551c2186d39d064fa553", "score": "0.5456095", "text": "public function assets()\n {\n }", "title": "" }, { "docid": "a81db144301d416cb50a7a0a601963b1", "score": "0.54510933", "text": "public function addAssetAction() \n\t\t {\n\t\t \t//$this->view->headTitle('Home');\n\t\t\t//$this->view->title = 'Zend_Form_Element_File Example';\n\t\t\t//$this->view->bodyCopy = \"<p>Please fill out this form.</p>\";\n\t\t\t\n\t\t\t$form = new forms_UploadwfForm();\n\t\t\t\n\t\t\tif ($this->_request->isPost()) {\n\t\t\t\t$formData = $this->_request->getPost();\n\t\t\t\tif ($form->isValid($formData)) {\n\t\t\t\t\n\n\t\t\t\t\t// success -\n\t\t\t\t\t$uploadedData = $form->getValues();\n\t\t\t\t\t$fullFilePath = $form->file->getFileName();\n\t\t\t\t\t$mapper = CModel_DevWireframeMapper::singleton();\n\t\t\t\t\t$w = $mapper->getByAction($as = $this->_getParam('as'), $a = $this->_getParam('a'));\n\t\t\t\t\t$w->addComment($fullFilePath, ($u = CModel_User::getCurrentUser()) ? $u->username : $_POST['author']);\n\t\t\t\t\t$mapper->save($w);\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->_helper->redirector($a, $as);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->view->form = $form;\n\t\t\n\t\t}", "title": "" }, { "docid": "4f29ab28ad9bcff3b20720bdbd5fdbf4", "score": "0.5406868", "text": "public function lateAssets()\n {\n\n }", "title": "" }, { "docid": "413f060ea93d1ea3c814650a63c640fe", "score": "0.5403736", "text": "public function createsAssets($folderName,$fileName,$Delete = true){\n $shop = \\ShopifyApp::shop();\n\n //upload the metafield to assets\n $AssetApi = [ \"key\" => \"assets/\".$fileName, \"src\" => \"http://ibigecommerce.com/shopify/\".$fileName];\n $allAssets = $shop->api()->rest('PUT', '/admin/api/2019-04/themes/74304454730/assets.json',[\"asset\"=>$AssetApi]);\n\n //Duplicate metafield\n $AssetMetafield = [ \"key\" => $folderName.\"/\".$fileName, \"source_key\" => \"assets/\".$fileName];\n $allAssets = $shop->api()->rest('PUT', '/admin/api/2019-04/themes/74304454730/assets.json',[\"asset\"=>$AssetMetafield]);\n\n //Delete The metafield assets\n if($Delete) $shop->api()->rest('DELETE', '/admin/api/2019-04/themes/74304454730/assets.json?asset[key]=assets/'.$fileName);\n }", "title": "" }, { "docid": "a7df6b9fed838bdb45deab0e70cc40ca", "score": "0.53898484", "text": "public function dumpAssets()\n {\n $this->dumpManagerAssets($this->am);\n $this->dumpManagerAssets($this->lam);\n }", "title": "" }, { "docid": "17acde36568f21841ec078fc1256c2ac", "score": "0.5388178", "text": "public function save_layers(){\n\t\tglobal $wpdb;\n\t\t\n\t\t$table\t\t\t= ($this->static_slide) ? $wpdb->prefix . RevSliderFront::TABLE_STATIC_SLIDES : $wpdb->prefix . RevSliderFront::TABLE_SLIDES;\n\t\t$this->layers\t= apply_filters('revslider_slide_saveLayers', $this->layers, $this->static_slide, $this);\n\t\t\n\t\t$wpdb->update($table, array('layers' => json_encode($this->layers)), array('id' => $this->id));\n\t}", "title": "" }, { "docid": "d3932a1a72f903989ebf4b7c532ed276", "score": "0.53755116", "text": "function _save_file()\n\t{\n\t\t$data = $this->encode_data();\n\t\t$fp = @fopen($this->_storagefile,'wb');\n\t\t@fwrite($fp, $data);\n\t\t@fclose($fp);\n\t}", "title": "" }, { "docid": "645e184638eebdaf7988dd609343acd2", "score": "0.5357179", "text": "public function saveAction()\r\n {\r\n $imageData = [];\r\n\r\n if ( ! empty($_FILES['image']['name'])) {\r\n try {\r\n $ext = substr($_FILES['image']['name'], strrpos($_FILES['image']['name'], '.') + 1);\r\n $fileName = 'banner-' . time() . '.' . $ext;\r\n $uploader = new Varien_File_Uploader('image');\r\n $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);\r\n\r\n $uploader->setAllowRenameFiles(true);\r\n $uploader->setFilesDispersion(false);\r\n\r\n $path = Mage::getBaseDir('media').DS.'acbanners';\r\n\r\n $uploader->save($path, $fileName);\r\n\r\n $imageData['image'] = 'acbanners/'.$fileName;\r\n } catch (Exception $e) {\r\n return $this->error($e);\r\n }\r\n }\r\n\r\n $data = $this->getRequest()->getPost();\r\n\r\n if ($data) {\r\n if ( ! empty($imageData['image'])) {\r\n $data['image'] = $imageData['image'];\r\n } else {\r\n if (isset($data['image']['delete']) && $data['image']['delete'] == 1) {\r\n if ($data['image']['value'] != '') {\r\n $_helper = Mage::helper('acbanners');\r\n $this->removeFile(Mage::getBaseDir('media').DS.$_helper->updateDirSepereator($data['image']['value']));\r\n }\r\n\r\n $data['image'] = '';\r\n } else {\r\n $data['image'] = $data['image']['value'];\r\n }\r\n }\r\n\r\n $bannerId = $this->getRequest()->getParam('id');\r\n $bannersModel = Mage::getModel('acbanners/acbanners')->load($bannerId);\r\n\r\n $bannersModel->setData($data)->setId($this->getRequest()->getParam('id'))\r\n ->setTitle($data['title'])\r\n ->setImage($data['image'])\r\n ->setDescription($data['description'])\r\n ->setUrl($data['url'])\r\n ->setSortOrder($data['sort_order'])\r\n ->setStatus($data['status'])\r\n ->save();\r\n\r\n try {\r\n if ($bannersModel->getCreatedTime == NULL || $bannersModel->getUpdateTime() == NULL) {\r\n $bannersModel->setCreatedTime(now())->setUpdateTime(now());\r\n } else {\r\n $bannersModel->setUpdateTime(now());\r\n }\r\n\r\n $bannersModel->save();\r\n\r\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('acbanners')->__('Banner was successfully saved'));\r\n Mage::getSingleton('adminhtml/session')->setFormData(false);\r\n\r\n if ($this->getRequest()->getParam('back')) {\r\n $this->_redirect('*/*/edit', array('id' => $bannersModel->getId()));\r\n \r\n return;\r\n }\r\n\r\n $this->_redirect('*/*/');\r\n \r\n return;\r\n } catch (Exception $e) {\r\n return $this->error($e);\r\n }\r\n }\r\n\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('acbanners')->__('Unable to find banner to save'));\r\n \r\n $this->_redirect('*/*/');\r\n }", "title": "" }, { "docid": "0c833b8c0d3d97512a151717bd34bc73", "score": "0.53469354", "text": "function saveToCache() {\n\t\tglobal $wgMemc;\n\t\t$this->load();\n\t\t$keys = $this->getCacheKeys();\n\t\tif ( $this->fileExists ) {\n\t\t\t// We can't cache negative metadata for non-existent files,\n\t\t\t// because if the file later appears in commons, the local\n\t\t\t// keys won't be purged.\n\t\t\t$cachedValues = array(\n\t\t\t\t'version' => MW_IMAGE_VERSION,\n\t\t\t\t'name' => $this->name,\n\t\t\t\t'imagePath' => $this->imagePath,\n\t\t\t\t'fileExists' => $this->fileExists,\n\t\t\t\t'fromShared' => $this->fromSharedDirectory,\n\t\t\t\t'width' => $this->width,\n\t\t\t\t'height' => $this->height,\n\t\t\t\t'bits' => $this->bits,\n\t\t\t\t'type' => $this->type,\n\t\t\t\t'mime' => $this->mime,\n\t\t\t\t'metadata' => $this->metadata,\n\t\t\t\t'size' => $this->size );\n\n\t\t\t$wgMemc->set( $keys[0], $cachedValues );\n\t\t} else {\n\t\t\t// However we should clear them, so they aren't leftover\n\t\t\t// if we've deleted the file.\n\t\t\t$wgMemc->delete( $keys[0] );\n\t\t}\n\t}", "title": "" }, { "docid": "057f6263bfa49a031690b2b94f0348ac", "score": "0.53272265", "text": "function AddAssetsFromDir($fileExtension, $assetType)\n{\n global $ATTACHMENTS_SET_PATH, $ASSET_SERVICE_URI;\n \n $assetsGlob = \"$ATTACHMENTS_SET_PATH/*\" . $fileExtension;\n \n echo \"Uploading assets from $assetsGlob\\n\";\n \n $assetPaths = glob($assetsGlob);\n foreach ($assetPaths as $assetPath)\n { \n $assetData = file_get_contents($assetPath);\n $assetFilename = basename($assetPath);\n $assetId = GetUuidFromAssetFilename($assetFilename);\n \n echo \"Uploading asset $assetFilename\\n\";\n \n AddAsset(\n $ASSET_SERVICE_URI, \n CreateAssetXml($assetData, $assetId, $assetId, \"\", $assetType));\n } \n}", "title": "" }, { "docid": "075c010aa24e41f627e1e80b1bc08691", "score": "0.5309884", "text": "function _smpl_imgedit_save($id, $url, $smpltemp){\n global $base_url;\n \n $root = smpl_root();\n $mp = drupal_get_path('module','smplphotoalbum');\n $path = $_SESSION['smpl_path'];\n $tempname = $_SESSION['smpl_tempname'];\n $name = $_SESSION['smpl_name'];\n \n $src = $smpltemp.$tempname;\n $dst = realpath($root.$path.$name);\n \n $ok = copy($src, $dst);\n \n //Makes new thumbnail after save the file\n _smpl_new_thumbnail($root,$path,$name);\n $mt = \"&rnd=\".microtime();\n if(file_exists($root . $path . TN . $name)){\n $out = $base_url.\"/\".$mp.\"/v.php?i=\".$path . TN . $name . $mt.\"&tn=1\";\n }else{\n $out = $base_url.\"/\".$mp.\"/v.php?i=\".$path . $name . $mt;\n }\n smpl_unset();\n return $out;\n}", "title": "" }, { "docid": "53f94a269648d34533dc0c5ad51062b9", "score": "0.5291469", "text": "public function assets()\n {\n\n }", "title": "" }, { "docid": "5c23324ff8aaf175c2f97c427d7c55b6", "score": "0.52820086", "text": "function json_save_point( $path ) {\n\n // update path\n $path = get_stylesheet_directory() . '/lib/acf-json';\n\n // return\n return $path;\n\n}", "title": "" }, { "docid": "13c204eb2d8aca77934a2e21d8724129", "score": "0.5276493", "text": "public function save() {\n\t\tif(isset($this->requestParams['originalFile']) && isset($this->requestParams['editedFile'])) {\n\t\t\t$originalFile = $this->requestParams['originalFile'];\n\t\t\t$editedFile = $this->requestParams['editedFile'];\n\t\t\tif(strpos($originalFile,'?') !== false) $originalFile = substr($originalFile,0,strpos($originalFile,'?'));\n\t\t\tif($this->checkFileExists($originalFile) && $this->checkFileExists($editedFile)) {\n\t\t\t\tif($editedFile != $originalFile && copy($this->url2File($editedFile),$this->url2File($originalFile))) {\n\t\t\t\t\t$image = DataObject::get_one('File','Filename = \\'' . substr($this->url2File($originalFile),3) . '\\'');\n $image->deleteFormattedImages();\n\t\t\t\t\t$image->generateFormattedImage('AssetLibraryPreview');\n\t\t\t\t} else {\n\t\t\t\t\t$this->raiseError();\n\t\t\t\t}\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->raiseError();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->raiseError();\n\t\t}\n\t\treturn 'parent.parent.parent.statusMessage(\\'Image saved\\',\\'good\\',false);';\n\t}", "title": "" }, { "docid": "ba5e5594d941049d426e9f9268c53aca", "score": "0.52728564", "text": "public function actionAddbrand()\n{\n $model = new ShoeBrand();\n\n if ($model->load(Yii::$app->request->post())) {\n //generates images with unique names\n $imageName = bin2hex(openssl_random_pseudo_bytes(10));\n $model->brand_logo = UploadedFile::getInstance($model, 'brand_logo');\n //saves file in the root directory\n $model->brand_logo->saveAs('img/brand/'.$imageName.'.'.$model->brand_logo->extension);\n //save in the db\n $model->brand_logo='img/brand/'.$imageName.'.'.$model->brand_logo->extension;\n\n $model->save();\n \n return $this->redirect(['create']);\n \n }\n\n return $this->renderAjax('addbrand', [\n 'model' => $model,\n ]);\n}", "title": "" }, { "docid": "8c3877d463a5d5f554d4f8e8da4596d3", "score": "0.5206373", "text": "public function register_assets() {\n\t\t// Bring in tab specific assets.\n\t\tif ( ! empty( $this->ui['tabs'] ) ) {\n\t\t\tforeach ( $this->ui['tabs'] as $tab_slug => $tab ) {\n\t\t\t\tif ( empty( $tab['assets'] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->register_tab_assets( $tab_slug );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2c2afc309249348e65d6a306fcd78d09", "score": "0.51681346", "text": "function addFile() {\n $app_size = $_FILES['user_apk']['size']; // bytes divid on 1048 bytes/1048 = MB\n $info = explode('.', $_FILES['user_apk']['name']); // file extension \n $extensions = array(\"apk\"); // $extensions = array(\"pdf\", \"png\", \"apk\");\n// 10,485,760 bytes = 10 MB\n if (in_array(end($info), $extensions) and $app_size <= 10485760) {\n\n//\t\t move_uploaded_file($_FILES['user_apk']['tmp_name'],\"apk/\".time().\".\".end($info));\n\n $path = \"../view/home/apk/\" . time() . \".\" . end(explode(\".\", $_FILES['user_apk']['name']));\n move_uploaded_file($_FILES['user_apk']['tmp_name'], $path);\n $name_to_DB = time() . \".\" . end(explode(\".\", $_FILES['user_apk']['name']));\n\n// echo $name_to_DB;\n return $name_to_DB;\n } else {\n// echo \"This type is not allowed\";\n return null;\n }\n }", "title": "" }, { "docid": "71f01f6c56dadffd3d052757505fc335", "score": "0.5161837", "text": "public function store(Request $request)\n {\n\n\n $imagearray=[];\n if ( $request->hasFile('image')) {\n foreach ($request->image as $image) {\n\n $paths = 'images/package/';\n $fileNameToStore = CommonController::save_image($image, $paths);\n $imagearray[] = $fileNameToStore;\n }\n\n } else {\n $fileNameToStore = 'noimage.jpg';\n $imagearray[] =$fileNameToStore;\n }\n $package = new Package();\n $package->name = $request->name;\n $package->type = $request->type;\n $package->pcategory_id = $request->category;\n $package->duration = $request->duration;\n $package->amount = $request->amount;\n $package->group_size = $request->group_size;\n $package->details = $request->editor1;\n $package->image = serialize($imagearray);\n\n $package->save();\n\n return redirect()->route('package.index');\n\n\n }", "title": "" }, { "docid": "a4042711b049328e505ab267a86eae0d", "score": "0.515984", "text": "function saveAd($item)\n{\n $list_items = new ItemActions(true);\n Params::setParam('userId', $item['user_id']);\n Params::setParam('catId', $item['catId']);\n Params::setParam('contactName', $item['contactName']);\n Params::setParam('contactEmail', $item['contactEmail']);\n Params::setParam('title', $item['title']);\n Params::setParam('description', $item['description']);\n Params::setParam('price', $item['price']);\n Params::setParam('countryId', $item['countryId']);\n Params::setParam('country', $item['country']);\n Params::setParam('region', $item['region']);\n Params::setParam('regionId', $item['regionId']);\n Params::setParam('city', $item['city']);\n Params::setParam('cityId', $item['cityId']);\n Params::setParam('cityArea', $item['cityArea']);\n Params::setParam('address', $item['address']);\n Params::setParam('currency', $item['currency']);\n Params::setParam('zip', $item['zip']);\n Params::setParam('dt_expiration', $item['dt_expiration']);\n Params::setParam('meta', $item['meta']);\n Params::setParam('showEmail', 1);\n\n $image_list = $item['photos'];\n\n foreach ($image_list as $image) {\n\n $ext = pathinfo($image, PATHINFO_EXTENSION);\n $tmp_name = \"proxml_\" . rand(0, 99999) . \".\" . $ext;\n $image_ok = osc_downloadFile($image, $tmp_name);\n\n if ($image_ok) {\n $photos['error'][] = UPLOAD_ERR_OK;\n $photos['size'][] = 0;\n $photos['type'][] = 'image/*';\n $photos['tmp_name'][] = osc_content_path() . \"downloads/\" . $tmp_name;\n }\n }\n $_FILES['photos'] = $photos;\n\n\n $list_items->prepareData(true);\n\n $list_items->data['userId'] = $item['user_id'];\n\n $result = $list_items->add();\n if (isset($photos['tmp_name'])) {\n foreach ($photos['tmp_name'] as $photo)\n @unlink(osc_content_path() . \"downloads/\" . $photo);\n }\n\n return $result;\n}", "title": "" }, { "docid": "97f141d2720bb498bfb4325eb09229f8", "score": "0.5153287", "text": "function Savedata($data)\n\t\t{\n\t\t\t//if (!$this->FileExistInCache())\n\t\t\t//{\n\t\t\t\t$this->SetContent($data);\n\t\t\t\t$this->WriteFileToCache();\n\t\t\t//}\n\t\t}", "title": "" }, { "docid": "d2d047d5e73dcce770b91907baa10817", "score": "0.5149986", "text": "public static function save()\n {\n file_put_contents(self::$path, json_encode(self::$cache));\n\n }", "title": "" }, { "docid": "aa84d2b2b0e46777491a336ca054ddc0", "score": "0.51475257", "text": "public function register_assets() {\n // reuseable data\n $url = QSOT::plugin_url();\n $version = QSOT::version();\n\n // register some scripts\n wp_register_script( 'qsot-event-area-admin', $url . 'assets/js/admin/event-area-admin.js', array( 'qsot-admin-tools' ), $version );\n wp_register_script( 'qsot-event-event-area-settings', $url . 'assets/js/admin/event-area/event-settings.js', array( 'qsot-event-ui' ), $version );\n wp_register_script( 'qsot-admin-ticket-selection', $url . 'assets/js/admin/order/ticket-selection.js', array( 'qsot-admin-tools', 'jquery-ui-dialog', 'qsot-frontend-calendar' ), $version );\n\n // register all the area type assets\n foreach ( $this->area_types as $area_type )\n $area_type->register_assets();\n }", "title": "" }, { "docid": "ee1372fca72abb09fac2e0a231e8d667", "score": "0.5146885", "text": "private function saveJson() {\n $json = array();\n //arquivo\n $fileJson = \"assets/json/ap.json\";\n\n //deleta json atual se existi\n if (file_exists($fileJson)) {\n unlink($fileJson);\n }\n\n $cidadeModel = new cidade();\n $cidades = $cidadeModel->read(\"SELECT * FROM sgl_cidade_area_atuacao ORDER BY sgl_cidade_area_atuacao.cidade_area_atuacao ASC;\", array());\n $aps = $this->read(\"SELECT DISTINCT(c.cidade_area_atuacao), ap.* FROM sgl_cidade_area_atuacao AS c INNER JOIN sgl_ap AS ap ON c.cod_area_atuacao=ap.cod_area_atuacao ORDER BY c.cidade_area_atuacao ASC, ap.nome_ap ASC;\", array());\n if (isset($cidades) && is_array($cidades) && isset($aps) && is_array($aps)) {\n foreach ($cidades as $cidade) {\n foreach ($aps as $ap) {\n if ($cidade['cod_area_atuacao'] == $ap['cod_area_atuacao']) {\n $json[$cidade['cod_area_atuacao']][] = array(\"cod\" => $ap['cod_ap'], \"nome\" => $ap['nome_ap']);\n }\n }\n }\n file_put_contents($fileJson, json_encode($json));\n }\n }", "title": "" }, { "docid": "96f9ea1b7b715bcc7f648f85037de79a", "score": "0.5143015", "text": "function salva()\n\t{\n\t\tif($this->mapa->getmetadata(\"interface\") == \"googlemaps\"){\n\t\t\t$this->mapa->setProjection($this->projO);\n\t\t}\n\t\trestauraConObj($this->mapa,$this->postgis_mapa);\n\t\tif($this->arquivo != \"\"){\n\t\t\t$this->mapa->save($this->arquivo);\n\t\t}\n\t}", "title": "" }, { "docid": "c3b3d9cc8b6f1448b8d6c0aa789bcb64", "score": "0.51417726", "text": "public function saveAsset()\n {\n if(!empty($this->uploadedFile))\n {\n // If file is exist -> remove him\n if(!empty($this->filename) && file_exists($this->getFilePath()))\n {\n unlink($this->getFilePath());\n }\n $this->genFilename();\n if(!$this->save()) {\n return false;\n }\n $this->createFilePath();\n // svg \n if($this->uploadedFile->type == 'image/svg+xml') {\n $this->uploadedFile->saveAs($this->getFilePath());\n return true;\n }\n $img = Image::getImagine()->open($this->uploadedFile->tempName);\n }\n else\n {\n if(file_exists($this->getFilePath())) {\n $img = Image::getImagine()->open($this->getFilePath());\n } else return false;\n }\n\n $size = $img->getSize();\n $box = $this->getImageBox($size);\n\n if (($img->getSize()->getWidth() <= $box->getWidth() && $img->getSize()->getHeight() <= $box->getHeight()) || (!$box->getWidth() && !$box->getHeight())) {\n $img->copy()->save($this->getFilePath());\n return true;\n }\n\n $img = $img->thumbnail($box, ManipulatorInterface::THUMBNAIL_OUTBOUND);\n\n // create empty image to preserve aspect ratio of thumbnail\n $thumb = Image::getImagine()->create($box, new Color('FFF', 100));\n\n // calculate points\n $startX = 0;\n $startY = 0;\n if ($size->getWidth() < $box->getWidth()) {\n $startX = ceil($box->getWidth() - $size->getWidth()) / 2;\n }\n if ($size->getHeight() < $box->getHeight()) {\n $startY = ceil($box->getHeight() - $size->getHeight()) / 2;\n }\n\n $thumb->paste($img, new Point($startX, $startY));\n $thumb->save($this->getFilePath());\n\n return true;\n }", "title": "" }, { "docid": "c21c1009bdccdb64bbf65acc7c3f9b4b", "score": "0.51293916", "text": "private function generateassets() {\n global $CFG;\n\n if ($this->embedtype === 'div') {\n $context = \\context_system::instance();\n $hvppath = \"/pluginfile.php/{$context->id}/mod_hvp\";\n\n // Schedule JavaScripts for loading through Moodle.\n foreach ($this->files['scripts'] as $script) {\n $url = $script->path . $script->version;\n\n // Add URL prefix if not external.\n $isexternal = strpos($script->path, '://');\n if ($isexternal === false) {\n $url = $hvppath . $url;\n }\n $this->settings['loadedJs'][] = $url;\n $this->jsrequires[] = new \\moodle_url($isexternal ? $url : $CFG->httpswwwroot . $url);\n }\n\n // Schedule stylesheets for loading through Moodle.\n foreach ($this->files['styles'] as $style) {\n $url = $style->path . $style->version;\n\n // Add URL prefix if not external.\n $isexternal = strpos($style->path, '://');\n if ($isexternal === false) {\n $url = $hvppath . $url;\n }\n $this->settings['loadedCss'][] = $url;\n $this->cssrequires[] = new \\moodle_url($isexternal ? $url : $CFG->httpswwwroot . $url);\n }\n } else {\n // JavaScripts and stylesheets will be loaded through h5p.js.\n $cid = 'cid-' . $this->content['id'];\n $this->settings['contents'][ $cid ]['scripts'] = $this->core->getAssetsUrls($this->files['scripts']);\n $this->settings['contents'][ $cid ]['styles'] = $this->core->getAssetsUrls($this->files['styles']);\n }\n }", "title": "" }, { "docid": "06eacd0c835d81da7dc33736c0a687ef", "score": "0.51281637", "text": "function save(){\n\t\tforeach ($_FILES['gambar']['name'] as $key => $image) {\n\t\t\t\t// print_r($image.\"<br>\");\n if($_FILES['gambar']['name'][$key] == \"\")\n {\n\n }else{\n move_uploaded_file($_FILES[\"gambar\"][\"tmp_name\"][$key], './assets/gambar/'.$_FILES[\"gambar\"][\"name\"][$key]);\n\n $gambar=$_FILES[\"gambar\"][\"name\"][$key];\n\t\t\t\t\t\t$insbuku['gambar'] = $gambar;\n \t\t\t//$this->Mtransaksi->save_bb_cust($file_bb_cust);\n \t\t\t}\n\t\t\t}\n $insbuku['judul_buku'] = $this->input->post('judul_buku');\n\t\t$insbuku['id_kategori'] = $this->input->post('id_kategori');\n $insbuku['pengarang'] = $this->input->post('pengarang');\n $insbuku['thn_terbit'] = $this->input->post('thn_terbit');\n $insbuku['penerbit'] = $this->input->post('penerbit');\n $insbuku['isbn'] = $this->input->post('isbn');\n $insbuku['lokasi'] = $this->input->post('judul_buku');\n $insbuku['status_buku'] = 0;\n $this->db->insert('buku',$insbuku);\n redirect($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "701c93479953eaf5bb6fe3cda46739df", "score": "0.5124815", "text": "function salva()\n {\n restauraConObj($this->mapa, $this->postgis_mapa);\n $this->mapa->save($this->arquivo);\n }", "title": "" }, { "docid": "d2944f20077e2ad688b00c64913d558a", "score": "0.5118758", "text": "function save()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\tparent::save();\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$catscache = JFactory::getCache('com_flexicontent_cats');\n\t\t$catscache->clean();\n\t}", "title": "" }, { "docid": "0a84c47f69c7834d4f170988fdf60117", "score": "0.5103462", "text": "public function saveToFile()\n {\n $this->dataForSave();\n echo 'Path: '. __DIR__.'\\\\'. $this->name. PHP_EOL. 'Pictures: ' .count($this->data);\n fclose($this->file);\n }", "title": "" }, { "docid": "23ad955988205523a8e3b5dd7ac6ddc2", "score": "0.51015675", "text": "function action_saveEditorImg(){\n // todo check secret key when upload (?)\n\n $source = Arr::get($_POST, \"source\");\n\n if ($source == \"url\"){\n if (!$url = Arr::get($_POST, \"url\"))\n die();\n\n $image_name = uniqid() . \".jpg\";\n\n $uploaddir = '/upload/redactor/';\n $uploaddirPhp = $_SERVER['DOCUMENT_ROOT'] . $uploaddir;\n\n $response = Request::factory($url)->execute();\n $file = new SplFileObject($uploaddirPhp . $image_name, 'w');\n $file->fwrite($response->body());\n\n echo $uploaddir . $image_name;\n die();\n\n } else if ($source == \"file\") {\n $filePath = $this->methods->SavePostFile(\"EDITOR_IMG\", \"redactor/\", 2097152, array('jpg','jpeg','gif','png','bmp'));\n\n echo $filePath;\n die();\n }\n }", "title": "" }, { "docid": "5173a648a2957c43a0ee3a6dd47730bb", "score": "0.50945634", "text": "public function save()\n\t{\n\t\t$this->clean();\n\t\t$buffer = pack('a3cccN', $this->_headers['signature'], $this->_headers['version_major'], $this->_headers['version_minor'], $this->_headers['flags'], $this->getSize());\n\t\tforeach ($this->_properties as $tag => $obj) {\n\t\t\tif ($obj instanceof Collection) {\n\t\t\t\tforeach ($obj as $item)\n\t\t\t\t\t$buffer .= strtoupper($tag) . $item->write();\n\t\t\t}\n\t\t\telse\n\t\t\t\t$buffer .= strtoupper($tag) . $obj->write();\n\t\t}\n\t\t$this->_reader = fopen($this->_mediaFile, 'rb+');\n\t\tfwrite($this->_reader, $buffer);\n\t\tfclose($this->_reader);\n\t}", "title": "" }, { "docid": "0b36211d2e2f721bc2cf0c16bf78d2fa", "score": "0.50893736", "text": "function upload(){\n\t$_UP['pasta'] = 'uploads/';\n\n}", "title": "" }, { "docid": "0ee2145a01ef9f779d4a60a03ca5edb4", "score": "0.5087252", "text": "public function add_admin_assets(){\n\t\t\t\n\t\t\t$this->add_admin_js();\n\t\t\t$this->add_admin_css();\n\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "b74fbfbd7df817a9b53f8e0d23a45f62", "score": "0.5051409", "text": "public function assets(): FactoryAssets;", "title": "" }, { "docid": "9961f64d4e1311d818bce5b1de839d05", "score": "0.504722", "text": "public function setAssets() {\n\t\t// append css and js\n\t\t$arrAssets = array();\n\t\t$arrAssets['js'] = $this->getJs();\n\t\t$arrAssets['css'] = $this->getCss();\n\n\t\tif (!empty($this->arrAssets['css'])) {\n\t\t\tforeach ($this->arrAssets['css'] as $arrFile) {\n\t\t\t\t$arrAssets['css'][] = $arrFile;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->arrAssets['js'])) {\n\t\t\tforeach ($this->arrAssets['js'] as $arrFile) {\n\t\t\t\t$arrAssets['js'][] = $arrFile;\n\t\t\t}\n\t\t}\n\n\t\t$this->set('arrAssets', $arrAssets);\n\t\t$this->set('strLogo', $this->getLogo());\n\t\t$this->set('strFavicon', $this->getFavicon());\n\t\t$this->set('strActiveNavbar', $this->strActiveNavbar);\n\n\t\t// navigation\n\t\t$this->set('strNavbar', 'navbar');\n\n\t\t// CI\n\t\t$this->set('ci', $this->getCi());\n\n\t\t// elements\n\t\t// $arrElements = array();\n\t\t// $arrElements[] = array('name' => $page);\n\t\t// $this->set('arrElements', $arrElements);\n\t}", "title": "" }, { "docid": "45173b1480da8c3a1e51494b6568612a", "score": "0.50439876", "text": "private function _set_datas () {\n return file_put_contents($this->__datas, \"[\". json_encode($this->__cache, JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK) .\"]\");\n }", "title": "" }, { "docid": "9063154f9a00e5b3b7594377d6c199bc", "score": "0.5036018", "text": "private function addMetaMedia($data, &$zip){\n if (isset($data['familypic'])){\n preg_match('/\\{\\{([^}|?]+)[^}]*\\}\\}/',$data['familypic'],$matches);\n $this->_resolve_mediaid(getNS($matches[1]),$matches[1],$exists);\n if ($exists){\n $zip->addFile(mediaFN($matches[1]), 'img/portada.png');\n }else{\n $text = sprintf(WikiIocLangManager::getLang(\"imageNotFoundExporting\", \"iocexportl\"), $f, \" la tapa (familypic)\");\n throw new ImageNotFoundException($f, $text);\n }\n }\n\n if (isset($data['copylogo'])){\n preg_match('/\\{\\{([^}|?]+)[^}]*\\}\\}/',$data['copylogo'],$matches);\n $this->_resolve_mediaid(getNS($matches[1]),$matches[1],$exists);\n if ($exists){\n $zip->addFile(mediaFN($matches[1]), 'img/license.png');\n }else{\n $text = sprintf(WikiIocLangManager::getLang(\"imageNotFoundExporting\", \"iocexportl\"), $f, \" la tapa (logo CC)\");\n throw new ImageNotFoundException($f, $text);\n }\n }\n\n if(isset($data['familia'])){\n $urlfamily = DOKU_IOCEXPORTL_TEMPLATES;\n if (preg_match('/administraci/i', $data['familia'])){\n $urlfamily .= 'gad';\n }elseif (preg_match('/electricitat/i', $data['familia'])){\n $urlfamily .= 'iea';\n }elseif (preg_match('/socioculturals/i', $data['familia'])){\n $urlfamily .= 'edi';\n }elseif (preg_match('/sanitat/i', $data['familia'])){\n $urlfamily .= 'cai';\n }else{\n $urlfamily .= 'asix';\n }\n $urlfamily .= '_family_icon.png';\n $zip->addFile($urlfamily, 'img/family_icon.png');\n }\n }", "title": "" }, { "docid": "61358949685a88849cdede42fb6bbef8", "score": "0.50234324", "text": "public function lateAdminAssets()\n {\n\n }", "title": "" }, { "docid": "ce8a719077d85ca90682c2491cb69c90", "score": "0.50169", "text": "public function save_meta_all();", "title": "" }, { "docid": "d8159908c6d539ef6c07b43da3521d64", "score": "0.5000314", "text": "public function save() {\n\t\tupdate_option( 'backup-to-dropbox-file-list', array( $this->partial_directories, $this->excluded_files ) );\n\t}", "title": "" }, { "docid": "9485c7563af82ed83c8347acc73f9ba6", "score": "0.49958238", "text": "function save_and_exit() {\n\tfile_put_contents(LOCAL_DATA_FILE, gzcompress(serialize($GLOBALS['local'])));\n\texit;\n}", "title": "" }, { "docid": "bfe84c034039f3140a99618a346fc84d", "score": "0.49877775", "text": "private function setupAssetStore()\n {\n TestAssetStore::activate('TagsToShortcodeHelperTest/assets');\n\n /** @var File $file */\n foreach (File::get()->filter('ClassName', File::class) as $file) {\n $file->setFromString($file->getFilename(), $file->getFilename(), $file->getHash());\n }\n\n $from = __DIR__ . '/../../ImageTest/test-image-low-quality.jpg';\n foreach (Image::get() as $file) {\n $file->setFromLocalFile($from, $file->getFilename(), $file->getHash());\n $file->setFromLocalFile($from, $file->getFilename(), $file->getHash(), 'ResizedImageWzY0LDY0XQ');\n }\n }", "title": "" }, { "docid": "5c763b65e197706b712ca1449fd719e3", "score": "0.49795505", "text": "public function add($name)\n\t{\n\t\t$assetPath = null;\n\n\t\t// Check to see if the asset has been aliased, if it has then we'll use its value as the\n\t\t// asset name as aliased assets may make use of remote assets or path prefixed assets.\n\t\tif ($this->app['config']->has(\"basset::assets.{$name}\"))\n\t\t{\n\t\t\t$name = $this->app['config']->get(\"basset::assets.{$name}\");\n\t\t}\n\n\t\t// Add the path when accessing from directory() method closure.\n\t\tif ($this->directory instanceof Directory)\n\t\t{\n\t\t\t$assetPath = $this->directory->getPath().'/'.$name;\n\t\t}\n\t\t// Add an asset by using the full path to its location.\n\t\telseif (starts_with($name, 'path: '))\n\t\t{\n\t\t\t$assetPath = substr($name, 6);\n\t\t}\n\n\t\t// Check if the asset is a remotely hosted asset such as jQuery.\n\t\telseif (parse_url($name, PHP_URL_SCHEME))\n\t\t{\n\t\t\t$assetPath = $name;\n\t\t}\n\n\t\t// Add an asset that's located within the public directory.\n\t\telseif ($this->app['files']->exists($this->app['path.public'].'/'.$name))\n\t\t{\n\t\t\t$assetPath = $this->app['path.public'].'/'.$name;\t\n\t\t}\n\n\t\t// Add an asset that's within one of the configured directories.\n\t\telse\n\t\t{\n\t\t\tforeach ($this->app['config']->get('basset::directories') as $directory => $path)\n\t\t\t{\n\t\t\t\t$directory = $this->parseDirectory($path);\n\n\t\t\t\tforeach ($directory->recursivelyIterateDirectory() as $file)\n\t\t\t\t{\n\t\t\t\t\t// Once we find the first occurance of the file we'll add it to the array of assets if it\n\t\t\t\t\t// does not already exist. This is called cascading file loading.\n\t\t\t\t\t$directoryPath = $directory->getPath();\n\n\t\t\t\t\tif (realpath($directoryPath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directoryPath = realpath($directoryPath);\n\t\t\t\t\t}\n\n\t\t\t\t\t$filename = trim(str_replace(array($directoryPath, '\\\\'), array('', '/'), $file->getRealPath()), '/');\n\n\t\t\t\t\tif ($filename == $name)\n\t\t\t\t\t{\n\t\t\t\t\t\t$assetPath = $file->getPathname();\n\n\t\t\t\t\t\tbreak 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create a new Asset instance and validate it, if it's not already in the array of assets or pending assets\n\t\t// we can go ahead and add it.\n\t\t$asset = new Asset($assetPath, $this->app);\n\n\t\tif (( ! in_array($asset, $this->assets) or ! in_array($asset, $this->pending)) and $asset->isValid())\n\t\t{\n\t\t\treturn $this->pending[] = $asset;\n\t\t}\n\n\t\tthrow new RuntimeException(\"Could not find asset [{$name}]\");\n\t}", "title": "" }, { "docid": "786457c09420561b918f580f14b1c097", "score": "0.49761", "text": "public function addToAssetList($assets)\n {\n $assets['core'][$this->tag]['settings'] = 'Y';\n // $assets['core'][$this->tag]['image'] = OPPP_BASE_URL . 'images/elements/' . $this->tag . '/' . $this->tag . '.png';\n $assets['core'][$this->tag]['base_path'] = OPPP_BASE_URL . 'js/elements/';\n\n return $assets;\n }", "title": "" }, { "docid": "5c6f299a568ff54fddbf299e07ec3d22", "score": "0.49698627", "text": "function save($srcFilePath, $path) {\n\n if ($result = parent::save($srcFilePath, $path)) {\n if (br()->request()->get('tw') && br()->request()->get('th')) {\n $result['thumbnail'] = br()->images()->generateThumbnail($result['internal']['filePath'], br()->request()->get('tw'), br()->request()->get('th'));\n }\n }\n\n return $result;\n\n }", "title": "" }, { "docid": "d7e2b641caee32263becf84bc1213bab", "score": "0.4969401", "text": "public function getAssets()\n {\n return array();\n }", "title": "" }, { "docid": "38a0ff28043e47903646d4ab01ea18f9", "score": "0.49670377", "text": "function saveXMLOutput() {\r\n \r\n $xmlFile = fopen($this->_v_saveToLocation.\"/ImageProperties.xml\", 'w');\r\n fwrite($xmlFile,$this->getXMLOutput());\r\n fclose( $xmlFile);\r\n chmod($this->_v_saveToLocation.\"/ImageProperties.xml\",0777);\r\n //chgrp($this->_v_saveToLocation.\"/ImageProperties.xml\",$this->_filegroup);\r\n }", "title": "" }, { "docid": "d0c8564f02eb3f4c43a0dc66b6d388b2", "score": "0.49670202", "text": "private static function _saveCacheFile($url, $data) {\n $cacheFile = THUMBNAIL_STORAGE . md5($url) . '.' . IMAGE_CACHE_EXT;\n $file = fopen($cacheFile, 'cb');\n if ($file) {\n fwrite($file, $data->type);\n fwrite($file, $data->data);\n fclose($file);\n }\n }", "title": "" }, { "docid": "dea1ce064aa33f3399efc2ded4c94016", "score": "0.49632695", "text": "function fromphpbb_save_metas()\n{\n\tglobal $spipbb_fromphpbb;\n\tif (is_array($spipbb_fromphpbb))\n\t{\n\t\tinclude_spip('inc/meta');\n\t\tecrire_meta('spipbb_fromphpbb', serialize($spipbb_fromphpbb));\n\t\tecrire_metas();\n\t\tspipbb_log('OK',3,\"A_f_save_metas\");\n\t}\n}", "title": "" }, { "docid": "66b3ad1ce1aec34b855fbc69625de7ff", "score": "0.49506298", "text": "public function adminAssets()\n {\n\n }", "title": "" }, { "docid": "3b1e586c5c7c49bbbe98744ad926d684", "score": "0.49499735", "text": "public function getAssets();", "title": "" }, { "docid": "6b134a01111376aa1571e60b79f24ec0", "score": "0.49416894", "text": "function save($path=null){\n\n\t\t$file = $this->name;\n\n\t\tif($path == null)\n\t\t\t$path = $this->destinationfolder.$file.'-new-'.substr(md5(rand()), 0, 3).'.'.$this->extension;\n\t\t$new_file = $path;\n\n\t\t$imgoutput = 'image'.$this->extension;\n\t\t$imgoutput($this->image,$path);\n\t\t$this->savepath = $path;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c46e291828a563eb70841ccf9a7ea81f", "score": "0.4939882", "text": "public function export()\n {\n /*\\Yii::$app->urlManager->baseUrl = $this->base_url;\n \\Yii::$app->urlManager->scriptUrl = $this->base_url;*/\n\n ini_set(\"memory_limit\", \"8192M\");\n set_time_limit(0);\n\n //Создание дирректории\n if ($dirName = dirname($this->rootFilePath)) {\n $this->result->stdout(\"Создание дирректории\\n\");\n\n if (!is_dir($dirName) && !FileHelper::createDirectory($dirName)) {\n throw new Exception(\"Не удалось создать директорию для файла\");\n }\n }\n\n $imp = new \\DOMImplementation();\n $dtd = $imp->createDocumentType('yml_catalog', '', \"shops.dtd\");\n //$xml = $imp->createDocument('', '', $dtd);\n $xml = $imp->createDocument('', '');\n //$xml->version = '1.1';\n $xml->encoding = 'utf-8';\n //$xml->formatOutput = true;\n\n $yml_catalog = $xml->appendChild(new \\DOMElement('yml_catalog'));\n $yml_catalog->appendChild(new \\DOMAttr('date', \\Yii::$app->formatter->asDate(time(), 'php:Y-m-d H:i:s')));\n\n $this->result->stdout(\"\\tДобавление основной информации\\n\");\n\n $shop = $yml_catalog->appendChild(new \\DOMElement('shop'));\n\n $shop->appendChild(new \\DOMElement('name', $this->shop_name ? htmlspecialchars($this->shop_name) : htmlspecialchars(\\Yii::$app->name)));\n $shop->appendChild(new \\DOMElement('company', $this->shop_company ? htmlspecialchars($this->shop_company) : htmlspecialchars(\\Yii::$app->name)));\n $shop->appendChild(new \\DOMElement('email', $this->shop_email ? htmlspecialchars($this->shop_email) : htmlspecialchars(\\Yii::$app->cms->adminEmail)));\n $shop->appendChild(new \\DOMElement('url', htmlspecialchars(\n $this->base_url\n )));\n $shop->appendChild(new \\DOMElement('platform', \"SkeekS CMS\"));\n\n\n $this->_appendCurrencies($shop);\n $this->_appendCategories($shop);\n $this->_appendOffers($shop);\n\n $xml->formatOutput = true;\n $xml->save($this->rootFilePath);\n\n return $this->result;\n }", "title": "" }, { "docid": "3689d682daf41b68213e358aa7c7df79", "score": "0.49327928", "text": "function save(){\r\t\t\trequire_once('themes/lte/assets/plugins/uploader/FileUploader.php');\t//Requiere este metodo para obtener la ruta de img\r\t\t\t//$_POST['foto']=$target_path;\r\t\t\t#if(isset($_POST[\"file\"])){ $_POST['foto']=$target_path;}\r\r\t\t$id_sucursal = '';\r\t\tif(isset($_SESSION[\"id_role\"]) && $_SESSION[\"id_role\"] !== '1'){\t//NO ES EL ADMIN GENERAL\r\t\t\t$id_sucursal = $_SESSION[\"id_sucursal\"];\t//EL form se les deshabilita y no envia el POST, entonces recurrir a su SESSION\r\t\t} else {\r\t\t\tif(isset($_POST[\"IdSucursal\"])){\r\t\t\t\t$id_sucursal = $_POST[\"IdSucursal\"];\t//El admin general si puede decidir que Id de Sucursal mandar en un Request tipo $_POST\t\t\t\t\r\t\t\t}\r\t\t}\r\t\t\r\t\t$inventario= new InventarioModel(null,$_POST['Precio'],$_POST['Descripcion'],$_POST['Incluye'],$_POST['cantidad'],$_POST['IdUnidadRenta'],$id_sucursal,$_POST['IdTipoUnidades'],'themes/lte/assets/dist/img/no-photo.jpg');\r\t\tInventarioModel::save($inventario);\r\t\t#$this->show();\r\t}", "title": "" }, { "docid": "9d19fc4abb8cb5c514960fb163a892de", "score": "0.49311942", "text": "function asset_url(){\n\t\treturn 'http://developers.activeitzone.com/activesupershopv1.4/';\n\t}", "title": "" }, { "docid": "3cc5a18c90a5b064bd4b77f5842fd886", "score": "0.49269235", "text": "public function save_gambar()\n\t{\n\t\t$data = array(\n\t\t\t'id_produk' => $_POST[\"id_produk\"],\n\t\t\t'foto' => $this->do_upload_gambar(),\n\t\t);\n\n\t\treturn $this->db->insert('tbl_foto_produk', $data);\n\t}", "title": "" }, { "docid": "a13c70325e7a17467a7724613cb1606a", "score": "0.49263686", "text": "public function register_assets() {\n\t\t\twp_register_style( 'spg-shuffle', plugins_url( 'css/style.css', __FILE__ ), array(), SPG_PLUGIN_VERSION, 'all' );\n\n\t\t\t// Register shuffle.js script and init script\n\t\t\twp_register_script( 'spg-shuffle', plugins_url( 'js/shuffle.min.js', __FILE__ ), array(), SPG_PLUGIN_VERSION, true );\n\t\t\twp_register_script( 'spg-shuffle-init', plugins_url( 'js/init.js', __FILE__ ), array( 'spg-shuffle' ), SPG_PLUGIN_VERSION, true );\n }", "title": "" }, { "docid": "0feb48c8b8268eb59ab5d0df4ab23f5f", "score": "0.49166438", "text": "function adicionaTemaIMG($arq)\n {\n if (file_exists($arq)) {\n $layer = criaLayer($this->mapa, MS_LAYER_RASTER, MS_DEFAULT, basename($arq), \"SIM\");\n $layer->set(\"data\", $arq);\n $layer->set(\"name\", basename($arq));\n $layer->setmetadata(\"DOWNLOAD\", \"nao\");\n $layer->setmetadata(\"TEMALOCAL\", \"NAO\");\n }\n return (\"ok\");\n }", "title": "" }, { "docid": "3bde1b077a3be0c02971789695a2b592", "score": "0.4910348", "text": "public function savePreset(){\n\t\t\n\t\tif( !osc_is_admin_user_logged_in() ){\n\t\t\treturn 2;\n\t\t}\n\t\t\n\t\t$preset_name = Params::getParam('preset_name');\n\t\t\n\t\t$data = osc_get_preference( osc_current_web_theme(), 'lz_theme_options' );\n\t\t\n\t\tif( !empty($data) ){\n\t\t\t$data = unserialize($data);\n\t\t}\n\n\t\tif( !is_array($data) ){\n\t\t\t$data = array();\n\t\t} \n\t\t\n\t\t$uploads = Uploader::getFiles();\n\t\t\n\t\tif( count( $uploads ) > 0 ){\n\t\t\t$data['uploads'] = $uploads;\n\t\t}\n\n\t\tif( empty($data) ){\n\t\t\treturn 1;\n\t\t}\n\n\t\t$preset_json = json_encode($data);\n\t\t//chmod( LZO_UPLOAD_PATH , 0755);\n\n\t\tif( $this->zipPreset( $preset_json, LZO_UPLOAD_PATH, $preset_name ) ){\n\t\t\treturn 3;\n\t\t}\n\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "20cca809922ae692949da295a1afc1fc", "score": "0.49097493", "text": "private function galeriasave() {\n $keyid = isset($_REQUEST['keyid']) ? $_REQUEST['keyid'] : ''; //ID QUE ME TRAIGO DEL FORMULARIO\n $id = 0;\n //Informacion de la imagen\n $file_name = $_SESSION[\"nombrearchivo\"];\n $file_type = $_SESSION[\"tipoarchivo\"];\n $contenido = $_SESSION[\"contenidooarchivo\"];\n $file_size = $_SESSION[\"tamanio\"];\n $file_error = $_SESSION[\"error\"];\n $idfile = 0;\n if ($keyid > 0) {\n //se actualzia la información\n $q = \"SELECT arc_id FROM tiendaonline_archivos WHERE arc_id = \" . $keyid;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->arc_id;\n $table = \"tiendaonline_archivos\";\n $arrfieldscomma = array(\n 'arc_descrip' => $this->descrip,\n 'arc_estado' => $this->habilitado);\n $arrfieldsnocomma = array('categoria_id' => $this->idcategoria, 'product_id' => $this->idproducto, 'arc_dtcreate' => $this->UTILITY->date_now_server());\n $q = $this->UTILITY->make_query_update($table, \"arc_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n // $arrjson = array('output' => array('valid' => true, 'id' => $id));\n header('Location: galerias.php');\n }\n //ACTULIZAR REGITSRO DE ARCHIVOS\n if ($file_name != '') {\n if ($file_error == 0 && $file_size > 0 && $file_size < 14716800) {\n $q = \"UPDATE tiendaonline_archivos SET arc_nombre='\" . $file_name . \"' ,arc_tipo='\" . $file_type . \"',arc_contenido='\" . $contenido . \"',arc_tamanio='\" . $file_size . \"' WHERE arc_id=\" . $keyid;\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n if ($idfile <= 0) {\n header('Location: galerias.php');\n }\n $_SESSION[\"nombrearchivo\"] = \"\";\n $_SESSION[\"tipoarchivo\"] = \"\";\n $_SESSION[\"contenidooarchivo\"] = \"\";\n $_SESSION[\"tamanio\"] = \"\";\n $_SESSION[\"error\"] = \"\";\n header('Location: galerias.php');\n }\n }\n header('Location: galerias.php');\n } else {\n /* AQUI ES DONDE SE INGRESAN LAS FOTOS */\n if ($file_name != '') {\n if ($file_error == 0 && $file_size > 0 && $file_size < 14716800) {\n $q = \"INSERT INTO tiendaonline_archivos (arc_dtcreate, categoria_id,product_id,arc_descrip,arc_estado,arc_nombre,arc_tipo,arc_contenido,arc_tamanio) VALUES (\" . $this->UTILITY->date_now_server() . \", $this->idcategoria, $this->idproducto, '$this->descrip','$this->habilitado','\" . $file_name . \"','\" . $file_type . \"','\" . $contenido . \"','\" . $file_size . \"')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $_SESSION[\"nombrearchivo\"] = \"\";\n $_SESSION[\"tipoarchivo\"] = \"\";\n $_SESSION[\"contenidooarchivo\"] = \"\";\n $_SESSION[\"tamanio\"] = \"\";\n $_SESSION[\"error\"] = \"\";\n header('Location: galerias.php');\n }\n } else {\n //Si no manda images\n $q = \"INSERT INTO tiendaonline_archivos (arc_dtcreate,categoria_id, product_id,arc_descrip,arc_estado) VALUES (\" . $this->UTILITY->date_now_server() . \", $this->idcategoria,$this->idproducto, '$this->descrip','$this->habilitado')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $_SESSION[\"nombrearchivo\"] = \"\";\n $_SESSION[\"tipoarchivo\"] = \"\";\n $_SESSION[\"contenidooarchivo\"] = \"\";\n $_SESSION[\"tamanio\"] = \"\";\n $_SESSION[\"error\"] = \"\";\n header('Location: galerias.php');\n }\n }\n header('Location: galerias.php');\n }", "title": "" }, { "docid": "c6f2767e49477604cf5168ea9149a8ba", "score": "0.4901374", "text": "function add() {\n\t\t$this->data['SavedItem']['customer_id'] = $this->get_customer_id();\n\n\t\t$build_data = array();\n\t\t$build_data['code'] = $this->build['Product']['code'];\n\t\t$build_data['catalog_number'] = !empty($this->build['GalleryImage']) ? $this->build['GalleryImage']['catalog_number'] : null;\n\t\t$build_data['image_id'] = !empty($this->build['CustomImage']) ? $this->build['CustomImage']['Image_ID'] : null;\n\t\t$build_data['options'] = $this->build['options'];\n\t\t$build_data['quantity'] = $this->build['quantity'];\n\t\tif(!empty($this->build['quantity_size']))\n\t\t{\n\t\t\t$build_data['quantity_size'] = $this->build['quantity_size'];\n\t\t}\n\t\t$build_data['template'] = $this->build['template'];\n\t\t$build_data['rotate'] = $this->build['rotate'];\n\t\t$build_data['crop'] = $this->build['crop'];\n\n\t\t$this->data['SavedItem']['build_data'] = serialize($build_data);\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t$this->SavedItem->create();\n\t\t\tif ($this->SavedItem->save($this->data)) {\n\t\t\t\t$things = strtolower(Inflector::pluralize($this->build['Product']['name']));\n\t\t\t\t$this->Session->setFlash(\"Your design has been saved. <a href='/build'>Return to building your custom $things</a>. \", 'flash_good');\n\t\t\t\t$this->Session->write(\"Build.saved\", true);\n\t\t\t\t#if(!empty($goto))\n\t\t\t\t#{\n\t\t\t\t#\t$this->Session->delete(\"savegoto\");\n\t\t\t\t#\t$this->redirect($goto);\n\t\t\t\t##}\n\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('The SavedItem could not be saved. Please, try again.', true));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b5f2aab8a0218604b3d6ff4cdce0811d", "score": "0.48994204", "text": "public static function kal_write_css() {\r\n # und Kopieren derselben in den Ordner /assets/addons/AddOn/\r\n # benutzte functions:\r\n # self::kal_define_css()\r\n #\r\n # --- Erzeugen des Stylesheet-Textes\r\n $buffer=self::kal_define_css();\r\n #\r\n # --- ggf. Erzeugen des Ordners\r\n $dir=rex_path::addon(PACKAGE).'assets';\r\n if(!file_exists($dir)) mkdir($dir);\r\n #\r\n # --- Schreiben der Datei\r\n $file=$dir.'/'.PACKAGE.'.css';\r\n $handle=fopen($file,'w');\r\n fwrite($handle,$buffer);\r\n fclose($handle);\r\n #\r\n # --- Kopieren in den Ordner /assets/addons/AddOn/\r\n $copydir=rex_path::addonAssets(PACKAGE);\r\n if(!file_exists($copydir)) mkdir($copydir);\r\n $copyfile=$copydir.PACKAGE.'.css';\r\n copy($file,$copyfile);\r\n }", "title": "" }, { "docid": "5b62b01a42e4533707496d6d79434da4", "score": "0.4890499", "text": "function save($file);", "title": "" }, { "docid": "525a666c6d6babc4969818f2d9b9776d", "score": "0.48813125", "text": "private function flushAttributesets()\r\n {\r\n $fp = fopen(Attributeprovider::ATTRIBUTES_STORAGE, \"w\");\r\n fwrite($fp, serialize($this->attributesets));\r\n fclose($fp);\r\n }", "title": "" }, { "docid": "49d53d9e6ca0c61ca92228a5b1e995b6", "score": "0.48711124", "text": "public function beforeSave()\n {\n $this->image = $this->file->getPath();\n }", "title": "" }, { "docid": "82305dc5685a675d385bbe3ec9a47b04", "score": "0.48698834", "text": "public function run()\n {\n //1\n $technology = new Technology();\n $technology->name = \"HTML5\";\n $technology->thumbnail = \"HTML5.svg\";\n $technology->save();\n\n //2\n $technology = new Technology();\n $technology->name = \"CSS3\";\n $technology->thumbnail = \"CSS3.svg\";\n $technology->save();\n\n //3\n $technology = new Technology();\n $technology->name = \"SASS\";\n $technology->thumbnail = \"SASS.svg\";\n $technology->save();\n\n //4\n $technology = new Technology();\n $technology->name = \"LESS\";\n $technology->thumbnail = \"less.svg\";\n $technology->save();\n\n //5\n $technology = new Technology();\n $technology->name = \"stylus\";\n $technology->thumbnail = \"stylus.svg\";\n $technology->save();\n\n //6\n $technology = new Technology();\n $technology->name = \"RWD\";\n $technology->thumbnail = \"RWD.svg\";\n $technology->save();\n\n //7\n $technology = new Technology();\n $technology->name = \"JavaScript\";\n $technology->thumbnail = \"JavaScript.svg\";\n $technology->save();\n\n //8\n $technology = new Technology();\n $technology->name = \"Canvas\";\n $technology->thumbnail = \"canvas.svg\";\n $technology->save();\n\n //9\n $technology = new Technology();\n $technology->name = \"EcmaScript6\";\n $technology->thumbnail = \"EcmaScript6.svg\";\n $technology->save();\n\n //10\n $technology = new Technology();\n $technology->name = \"TypeScript\";\n $technology->thumbnail = \"TypeScript.svg\";\n $technology->save();\n\n //11\n $technology = new Technology();\n $technology->name = \"CoffeeScript\";\n $technology->thumbnail = \"CoffeeScript.svg\";\n $technology->save();\n\n //12\n $technology = new Technology();\n $technology->name = \"Babel\";\n $technology->thumbnail = \"babel.svg\";\n $technology->save();\n\n //13\n $technology = new Technology();\n $technology->name = \"jQuery\";\n $technology->thumbnail = \"jQuery.svg\";\n $technology->save();\n\n //14\n $technology = new Technology();\n $technology->name = \"AJAX\";\n $technology->thumbnail = \"AJAX.svg\";\n $technology->save();\n\n //15\n $technology = new Technology();\n $technology->name = \"Bootstrap\";\n $technology->thumbnail = \"Bootstrap.svg\";\n $technology->save();\n\n //16\n $technology = new Technology();\n $technology->name = \"Foundation\";\n $technology->thumbnail = \"foundation.svg\";\n $technology->save();\n\n //17\n $technology = new Technology();\n $technology->name = \"Semantic UI\";\n $technology->thumbnail = \"SemanticUI.svg\";\n $technology->save();\n\n //18\n $technology = new Technology();\n $technology->name = \"gulp.js\";\n $technology->thumbnail = \"gulp.svg\";\n $technology->save();\n\n //19\n $technology = new Technology();\n $technology->name = \"grunt.js\";\n $technology->thumbnail = \"grunt.svg\";\n $technology->save();\n\n //20\n $technology = new Technology();\n $technology->name = \"Webpack\";\n $technology->thumbnail = \"webpack.svg\";\n $technology->save();\n\n //21\n $technology = new Technology();\n $technology->name = \"Yeoman\";\n $technology->thumbnail = \"yeoman.svg\";\n $technology->save();\n\n //22\n $technology = new Technology();\n $technology->name = \"bower\";\n $technology->thumbnail = \"bower.svg\";\n $technology->save();\n\n //23\n $technology = new Technology();\n $technology->name = \"Require.js\";\n $technology->thumbnail = \"require.svg\";\n $technology->save();\n\n //24\n $technology = new Technology();\n $technology->name = \"Browserify\";\n $technology->thumbnail = \"browserify.svg\";\n $technology->save();\n\n //25\n $technology = new Technology();\n $technology->name = \"React.js\";\n $technology->thumbnail = \"react.svg\";\n $technology->save();\n\n //26\n $technology = new Technology();\n $technology->name = \"Angular.js\";\n $technology->thumbnail = \"angular.svg\";\n $technology->save();\n\n //27\n $technology = new Technology();\n $technology->name = \"Vue.js\";\n $technology->thumbnail = \"vue.svg\";\n $technology->save();\n\n //28\n $technology = new Technology();\n $technology->name = \"Backbone.js\";\n $technology->thumbnail = \"backbone.svg\";\n $technology->save();\n\n //29\n $technology = new Technology();\n $technology->name = \"Ember.js\";\n $technology->thumbnail = \"ember.svg\";\n $technology->save();\n\n //30\n $technology = new Technology();\n $technology->name = \"Knockout\";\n $technology->thumbnail = \"knockout.svg\";\n $technology->save();\n\n //31\n $technology = new Technology();\n $technology->name = \"d3.js\";\n $technology->thumbnail = \"d3.svg\";\n $technology->save();\n\n //32\n $technology = new Technology();\n $technology->name = \"p5.js\";\n $technology->thumbnail = \"p5.svg\";\n $technology->save();\n\n //33\n $technology = new Technology();\n $technology->name = \"node.js\";\n $technology->thumbnail = \"node.svg\";\n $technology->save();\n\n //34\n $technology = new Technology();\n $technology->name = \"express.js\";\n $technology->thumbnail = \"express.svg\";\n $technology->save();\n\n //35\n $technology = new Technology();\n $technology->name = \"keystone.js\";\n $technology->thumbnail = \"keystone.svg\";\n $technology->save();\n\n //36\n $technology = new Technology();\n $technology->name = \"meteor.js\";\n $technology->thumbnail = \"meteor.svg\";\n $technology->save();\n\n //37\n $technology = new Technology();\n $technology->name = \"PHP\";\n $technology->thumbnail = \"php.svg\";\n $technology->save();\n\n //38\n $technology = new Technology();\n $technology->name = \"Laravel\";\n $technology->thumbnail = \"laravel.svg\";\n $technology->save();\n\n //39\n $technology = new Technology();\n $technology->name = \"Symfony\";\n $technology->thumbnail = \"symfony.svg\";\n $technology->save();\n\n //40\n $technology = new Technology();\n $technology->name = \"MySQL\";\n $technology->thumbnail = \"MySQL.svg\";\n $technology->save();\n\n //41\n $technology = new Technology();\n $technology->name = \"MongoDB\";\n $technology->thumbnail = \"mongoDB.svg\";\n $technology->save();\n\n //42\n $technology = new Technology();\n $technology->name = \"GIT\";\n $technology->thumbnail = \"git.svg\";\n $technology->save();\n\n //43\n $technology = new Technology();\n $technology->name = \"GitHub\";\n $technology->thumbnail = \"GitHub.svg\";\n $technology->save();\n\n //44\n $technology = new Technology();\n $technology->name = \"WordPress\";\n $technology->thumbnail = \"wordpress.svg\";\n $technology->save();\n\n //45\n $technology = new Technology();\n $technology->name = \"Joomla!\";\n $technology->thumbnail = \"joomla.svg\";\n $technology->save();\n\n //46\n $technology = new Technology();\n $technology->name = \"Photoshop\";\n $technology->thumbnail = \"PS.svg\";\n $technology->save();\n\n //47\n $technology = new Technology();\n $technology->name = \"Illustrator\";\n $technology->thumbnail = \"AI.svg\";\n $technology->save();\n\n //48\n $technology = new Technology();\n $technology->name = \"InDesign\";\n $technology->thumbnail = \"ID.svg\";\n $technology->save();\n\n //49\n $technology = new Technology();\n $technology->name = \"Pro Premiere\";\n $technology->thumbnail = \"premiere.svg\";\n $technology->save();\n\n //50\n $technology = new Technology();\n $technology->name = \"After Effects\";\n $technology->thumbnail = \"ae.svg\";\n $technology->save();\n\n //51\n $technology = new Technology();\n $technology->name = \"UI/UX Design\";\n $technology->thumbnail = \"uxui.svg\";\n $technology->save();\n\n //52\n $technology = new Technology();\n $technology->name = \"MVC\";\n $technology->thumbnail = \"MVC.svg\";\n $technology->save();\n\n //53\n $technology = new Technology();\n $technology->name = \"CRUD\";\n $technology->thumbnail = \"CRUD.svg\";\n $technology->save();\n\n //54\n $technology = new Technology();\n $technology->name = \"ACL\";\n $technology->thumbnail = \"ACL.svg\";\n $technology->save();\n\n //55\n $technology = new Technology();\n $technology->name = \"RESTful API\";\n $technology->thumbnail = \"REST.svg\";\n $technology->save();\n\n //56\n $technology = new Technology();\n $technology->name = \"BEM\";\n $technology->thumbnail = \"BEM.svg\";\n $technology->save();\n\n //57\n $technology = new Technology();\n $technology->name = \"SMACSS\";\n $technology->thumbnail = \"SMACSS.svg\";\n $technology->save();\n\n //58\n $technology = new Technology();\n $technology->name = \"OOCSS\";\n $technology->thumbnail = \"OOCSS.svg\";\n $technology->save();\n }", "title": "" }, { "docid": "ca116f876a7b3d3e2edb37ad12444cfb", "score": "0.48693106", "text": "private function _load_assets()\n\t{\n\t\t$header = array();\n\n\t\t// -------------------------------------\n\t\t// Recorremos el array de assets\n\t\t// -------------------------------------\n\n\t\t$asset_url = ((defined('URL_THIRD_THEMES'))\n\t\t ? URL_THIRD_THEMES\n\t\t : $this->EE->config->item('theme_folder_url') . 'third_party/')\n\t\t . $this->package . '/';\n\n\t\tforeach ($this->mcp_assets AS $file)\n\t\t{\n\t\t\t// ubicacion en el server\n\t\t\t$file_url = $asset_url.$file;\n\n\t\t\tif (substr($file, -3) == 'css')\n\t\t\t{\n\t\t\t\t$header[] = '<link charset=\"utf-8\" type=\"text/css\" href=\"'.$file_url.'\" rel=\"stylesheet\" media=\"screen\" />';\n\t\t\t}\n\t\t\telseif (substr($file, -2) == 'js')\n\t\t\t{\n\t\t\t\t$header[] = '<script charset=\"utf-8\" type=\"text/javascript\" src=\"'.$file_url.'\"></script>';\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// por ultimo agregamos los assets al header\n\t\t// -------------------------------------\n\n\t\tif ($header)\n\t\t{\n\t\t\t$this->EE->cp->add_to_head(\n\t\t\t\tNL.\"<!-- {$this->package} assets -->\".NL.\n\t\t\t\timplode(NL, $header).\n\t\t\t\tNL.\"<!-- / {$this->package} assets -->\".NL\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "1f86fa9f650a2d509909f95b463fc95e", "score": "0.4860733", "text": "abstract public function _loadAsset();", "title": "" }, { "docid": "040f001461088308fe4aaae1da071740", "score": "0.48596624", "text": "public function preloadAssets()\n\t{\n }", "title": "" }, { "docid": "c6cd9ec95de9149e6350136d895a24bd", "score": "0.4858514", "text": "public function save()\n {\n App::config('theme')->set($this->name, $this->config(['menus', 'positions', 'widgets']));\n }", "title": "" }, { "docid": "815b1e881b4cf80a79872f052d3b0b8b", "score": "0.48566166", "text": "function save_gallery_json($post_id){\r\n if (get_page_template_slug($post_id) == 'page-templates/gallery.php'){\r\n if ($rows = get_field('gallery',$post_id)){\r\n $gallery = array();\r\n // Create category for all images\r\n $gallery[0]=array(\r\n 'category'=>'All',\r\n 'images'=>array()\r\n );\r\n // Categories\r\n foreach($rows as $row){\r\n // Images\r\n $images = array();\r\n if (!empty($row['images'])){\r\n foreach ($row['images'] as $row2){\r\n $image = array(\r\n 'url' => $row2['image']['sizes']['gallery-full'],\r\n 'thumb' => $row2['image']['sizes']['gallery-thumb'],\r\n 'caption' => $row2['caption']\r\n );\r\n // Add image to category\r\n $images[] = $image;\r\n\r\n // Add image to all images array\r\n $gallery[0]['images'][] = $image;\r\n }\r\n }\r\n $gallery[] = array(\r\n 'category' => $row['category'],\r\n 'images' => $images\r\n );\r\n }\r\n file_put_contents(get_template_directory() . '/JSON/gallery.json',json_encode($gallery));\r\n }\r\n }\r\n}", "title": "" }, { "docid": "e7c78db4eaf7427b575f9e4cfe528573", "score": "0.48537263", "text": "public function index()\n\t{\n\n $key = Input::get('key');\n\t\t//\n $locations = \\Assetlocation::get();\n for($i = 0; $i < count($locations);$i++){\n\n $locations[$i]->extId = $locations[$i]->_id;\n\n unset($locations[$i]->_id);\n unset($locations[$i]->_token);\n\n unset($locations[$i]->thumbnail_url);\n unset($locations[$i]->large_url);\n unset($locations[$i]->medium_url);\n unset($locations[$i]->full_url);\n unset($locations[$i]->delete_type);\n unset($locations[$i]->delete_url);\n unset($locations[$i]->filename);\n unset($locations[$i]->filesize);\n unset($locations[$i]->temp_dir);\n unset($locations[$i]->filetype);\n unset($locations[$i]->is_image);\n unset($locations[$i]->is_audio);\n unset($locations[$i]->is_video);\n unset($locations[$i]->fileurl);\n unset($locations[$i]->file_id);\n unset($locations[$i]->caption);\n unset($locations[$i]->files);\n unset($locations[$i]->medium_portrait_url);\n\n if(isset($locations[$i]->defaultpictures)){\n $dp = $locations[$i]->defaultpictures;\n\n unset($dp['delete_type']);\n unset($dp['delete_url']);\n unset($dp['temp_dir']);\n\n foreach($dp as $k=>$v){\n $name = 'picture'.str_replace(' ', '', ucwords( str_replace('_', ' ', $k) ));\n $locations[$i]->{$name} = $v;\n }\n unset($locations[$i]->defaultpictures);\n\n }else{\n $locations[$i]->pictureThumbnailUrl = '';\n $locations[$i]->pictureLargeUrl = '';\n $locations[$i]->pictureMediumUrl = '';\n $locations[$i]->pictureFullUrl = '';\n $locations[$i]->pictureBrchead = '';\n $locations[$i]->pictureBrc1 = '';\n $locations[$i]->pictureBrc2 = '';\n $locations[$i]->pictureBrc3 = '';\n }\n\n $locations[$i]->createdDate = date('Y-m-d H:i:s',$locations[$i]->createdDate->sec);\n $locations[$i]->lastUpdate = date('Y-m-d H:i:s',$locations[$i]->lastUpdate->sec);\n\n }\n\n $actor = $key;\n \\Event::fire('log.api',array($this->controller_name, 'get' ,$actor,'location list'));\n\n return $locations;\n\t}", "title": "" }, { "docid": "cd9084aefdeff0058f5676ecfa23585f", "score": "0.48493677", "text": "function SaveMetaXML($arr) {\n $db = new DB();\n $options = array(\n 'market_name' => $this->settings['name'], // Название вашего магазина\n 'encoding' => 'WINDOWS-1251', // Кодировка\n 'file_name' => SITE_PATH . $this->exportFolder . $this->resultXMLFilenameArr['meta'],\n );\n\n /*\n * Инициализируем библиотеку\n */\n $price = new META_export($options);\n /*\n * Начинаем создание прайс-листа.\n * Этот метод вызывать обязательно.\n */\n $price->start();\n\n /*\n * Например делаем выборку наших категорий из базы данных так\n */\n $q = \"SELECT `\" . TblModCatalog . \"`.*, `\" . TblModCatalogSprName . \"`.`name`\n FROM `\" . TblModCatalog . \"`, `\" . TblModCatalogSprName . \"`\n WHERE `\" . TblModCatalog . \"`.`id`>0\n AND `\" . TblModCatalog . \"`.`visible`='2'\n AND `\" . TblModCatalog . \"`.`id`=`\" . TblModCatalogSprName . \"`.`cod`\n AND `\" . TblModCatalogSprName . \"`.`lang_id`='\" . $this->lang_id . \"'\n ORDER BY `\" . TblModCatalog . \"` .`move` asc\";\n $res = $db->db_Query($q);\n while ($r = $db->db_FetchAssoc()) {\n $price->addCategory(\n array(\n 'id' => $r['id'], // ИД\n 'name' => stripslashes($r['name']), // Название категории\n 'parent' => $r['level'], // ИД родительской категории если есть\n )\n );\n }\n\n /* Например делаем выборку курсов валют так */\n $Currency = new SystemCurrencies();\n $value = $Currency->GetValue(5); //UAH\n $price->addCurrency(\n array(\n 'name' => \"UAH\",\n 'value' => \"1\",\n )\n );\n //print_r($arr);\n $n = count($arr);\n for ($j = 0; $j < $n; $j++) {\n $price->addOffer(\n array(\n 'id' => $arr[$j]['id'], // ИД товара\n 'category' => $arr[$j]['category'], // ИД категории в которой находится товар\n 'priority' => $arr[$j]['priority'], // Приоритет - пока не используется\n 'img' => $this->settings['url'] . $arr[$j]['img'], // Адрес(URL) картинки\n 'click' => $this->settings['url'] . $arr[$j]['click'], // Адрес(URL) куда должен перейти пользователь на ваш сайт при клике на товар\n 'type' => $arr[$j]['type'], // Тип товара, например - монитор\n 'name' => $arr[$j]['name'], // Название товара\n 'currency' => $arr[$j]['currency'], // Буквенный код валюты, например UAH\n 'price' => $arr[$j]['price'], // Цена товара в указаной валюте\n 'description' => $arr[$j]['description'], // Описание товара\n )\n );\n } // end for\n\n /*\n * Завершаем создание прайс-листа.\n * Этот метод вызывать обязательно.\n */\n $price->end();\n\n /*\n * Если вы указали название файла, результат работы скрипта будет сохранен в этот файл, и\n * вы можете вывести его содержимое так\n */\n // $price->output();\n }", "title": "" }, { "docid": "1fa83b20c2cb4e4baf7eb29d5a9412d2", "score": "0.4847713", "text": "function saveDatatoFile($url, $data) {\n $dataJson = json_encode($data);\n file_put_contents($url, $dataJson);\n }", "title": "" }, { "docid": "b9d534d04e971e1614e54dc65f8e4b67", "score": "0.48434517", "text": "function storeFiles()\n {\n }", "title": "" }, { "docid": "75db3cc3789cb0731fd3877fa7986a6b", "score": "0.4841189", "text": "function bp_gifts_activate() {\r\n\r\n\r\n\r\n\tglobal $wpdb;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\tif ( !empty($wpdb->charset) )\r\n\r\n\r\n\r\n\t\t$charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t$sql[] = \"CREATE TABLE {$wpdb->base_prefix}bp_gifts (\r\n\r\n\r\n\r\n\t\t \t\tid bigint(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,\r\n\r\n\r\n\r\n\t\t\t\tgift_name varchar(100) NOT NULL,\r\n\r\n\r\n\r\n\t\t\t\tgift_image varchar(100) NOT NULL,\r\n\r\n\r\n\r\n\t\t\t\tcategory varchar(100) NOT NULL DEFAULT 'gift',\r\n\r\n\r\n\r\n\t\t\t\tpoint bigint(20) NOT NULL DEFAULT '0',\r\n\r\n\r\n\r\n\t\t\t KEY gift_name (gift_name),\r\n\r\n\r\n\r\n\t\t\t\tKEY category (category)\r\n\r\n\r\n\r\n\t\t \t ) {$charset_collate};\";\r\n\r\n\r\n\r\n\r\n\r\n\trequire_once( ABSPATH . 'wp-admin/upgrade-functions.php' );\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t/**\r\n\r\n\r\n\r\n\t * The dbDelta call is commented out so the example table is not installed.\r\n\r\n\r\n\r\n\t * Once you define the SQL for your new table, uncomment this line to install\r\n\r\n\r\n\r\n\t * the table. (Make sure you increment the BP_EXAMPLE_DB_VERSION constant though).\r\n\r\n\r\n\r\n\t */\r\n\r\n\r\n\r\n\tdbDelta($sql);\r\n\r\n\r\n\r\n\t\r\n\r\n\t/* insert gift images to table - place your image in images folder and remove default image if want */\r\n\r\n\t\r\n\r\n\tif (get_site_option('bp-gifts-db-version') == '') { // if first install load image to gifts table\r\n\r\n\t\r\n\r\n\tif ($handle = opendir( dirname( __FILE__ ) . '/includes/images/') ) {\r\n\r\n\r\n\r\n\t while (false !== ($imagefile = readdir($handle))) {\r\n\r\n\r\n\r\n\t\tif (imagefile != 'admin' && imagefile != '' && $imagefile != '.' && imagefile != '..') {\r\n\r\n\r\n\r\n\t\t\t$imagename = explode(\".\", $imagefile);\r\n\r\n\r\n\r\n\tif ( $imagename[0] != 'admin' && $imagename[0] != '' ){\r\n\r\n \t\t$insert = $wpdb->prepare( \"INSERT INTO \" . $wpdb->base_prefix . \"bp_gifts ( gift_name, gift_image ) VALUES ( %s, %s )\", $imagename[0], $imagefile );\r\n\r\n\r\n\r\n\t\t$results = $wpdb->query( $insert );\r\n\r\n\t}\r\n\r\n\t\t}\r\n\r\n\r\n\r\n \t }\r\n\r\n\r\n\r\n \t}\r\n\r\n\r\n\r\n \tclosedir($handle);\r\n\r\n\t}\r\n\r\n\t\r\n\r\n\tupdate_site_option( 'bp-gifts-db-version', BP_GIFTS_DB_VERSION );\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "4c82964528902bbeb5c5dc9616a6e3d8", "score": "0.48401374", "text": "function imagefield_widget_settings_save($widget) {\r\n $filefield_settings = module_invoke('filefield', 'widget_settings', 'save', $widget);\r\n return array_merge($filefield_settings, array('max_resolution', 'min_resolution', 'alt', 'custom_alt', 'title', 'custom_title', 'title_type', 'default_image', 'use_default_image'));\r\n}", "title": "" }, { "docid": "f20d8e6aa388c02a53c57362606be0c2", "score": "0.48399135", "text": "public function exportSkins()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->assertPermission();\n\n\t\t\t// Get all skins form db\n\t\t\t$skins = $this->model->getAllSkins();\n\n\t\t\t// Get all options from db\n\t\t\t$skin_options = $this->model->getAllSkinOptions();\n\n\t\t\t// Group options by skin\n\t\t\tforeach ($skins as $key => &$skin)\n\t\t\t{\n\t\t\t\tif (isset($skin_options[$key]))\n\t\t\t\t{\n\t\t\t\t\t$skin['options'] = $skin_options[$key];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->response->addheader('Pragma: public');\n\t\t\t$this->response->addheader('Expires: 0');\n\t\t\t$this->response->addheader('Content-Description: File Transfer');\n\t\t\t$this->response->addheader('Content-Type: application/octet-stream');\n\t\t\t$this->response->addheader('Content-Disposition: attachment; filename=kuler_cp_backup_' . date('Y-m-d_H-i-s', time()) . '.json');\n\t\t\t$this->response->addheader('Content-Transfer-Encoding: binary');\n\n\t\t\tif (ob_get_level()) ob_end_clean();\n\n\t\t\t$this->response->setOutput(json_encode($skins));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// TODO: Improve error showing better\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "1ead392b2431b557e90530d0a3b78e98", "score": "0.48365733", "text": "public function save()\n {\n $config = Registry::getConfig();\n $sTheme = $this->getsTheme();\n\n $params = $config->getRequestParameter(\"confstrs\");\n $name = $params[\"sLogoFile\"];\n $tmp_name = $_FILES[\"logotitleupload\"][\"tmp_name\"];\n if (is_uploaded_file($tmp_name)) {\n if(move_uploaded_file($tmp_name, getShopBasePath() . \"out/\" . $sTheme . \"/img/\" . $name)){\n $this->upload_message[\"success\"][] = \"FCDESIGNEDITOR_MAIN_LOGOTITLEUPLOAD_SUCCESS\";\n }else{\n $this->upload_message[\"errors\"][] = \"FCDESIGNEDITOR_MAIN_LOGOTITLEUPLOAD_ERROR\";\n }\n }\n\n $name = $params[\"sEmailLogo\"];\n $tmp_name = $_FILES[\"logoemailupload\"][\"tmp_name\"];\n if (is_uploaded_file($tmp_name)) {\n if(move_uploaded_file($tmp_name, getShopBasePath() . \"out/\" . $sTheme . \"/img/\" . $name)){\n $this->upload_message[\"success\"][] = \"FCDESIGNEDITOR_MAIN_LOGOEMAILUPLOAD_SUCCESS\";\n }else{\n $this->upload_message[\"errors\"][] = \"FCDESIGNEDITOR_MAIN_LOGOEMAILUPLOAD_ERROR\";\n }\n }\n $name = $params[\"sFaviconFile\"];\n $tmp_name = $_FILES[\"faviconupload\"][\"tmp_name\"];\n $fileStatus = $_FILES[\"faviconupload\"][\"error\"];\n $fileType = $_FILES[\"faviconupload\"][\"type\"];\n if ($fileStatus === UPLOAD_ERR_OK && $fileType == \"image/x-icon\") {\n if (is_uploaded_file($tmp_name)) {\n if(move_uploaded_file($tmp_name, getShopBasePath() . \"out/\" . $sTheme . \"/img/favicons/\" . $name)){\n $this->upload_message[\"success\"][] = \"FCDESIGNEDITOR_MAIN_FAVICONUPLOAD_SUCCESS\";\n }else{\n $this->upload_message[\"errors\"][] = \"FCDESIGNEDITOR_MAIN_FAVICONUPLOAD_ERROR\";\n }\n }\n } elseif ($fileStatus === UPLOAD_ERR_OK && $fileType != \"image/x-icon\") {\n $this->upload_message[\"errors\"][] = \"FCDESIGNEDITOR_MAIN_FAVICONUPLOAD_NOTRIGHTFILE\";\n }\n parent::save();\n }", "title": "" }, { "docid": "3ebfeef062112dc38327bedd0b223260", "score": "0.4834619", "text": "function save(){\n\t\tglobal $deal_controller;\n\t\t$deal_controller->load_script($deal_controller->get_path('/classes/db.php'), 'class', 'DealImportDb');\n\t\t\n\t\t$a_deal = new DealImportDb();\n\t\t$deal_id = $a_deal->insert_deal($this->deal_id, $this->post_title, $this->post_content, $this->end_date);\n\t\t$a_deal->insert_deal_meta($deal_id, $this->meta_info);\t\t\n\t}", "title": "" }, { "docid": "616b7f85f528ef56b9068c3a7d449ab2", "score": "0.48338857", "text": "public function gambarsave($upload,$id){\n\t rename(\"./assets/images/tidakmasuk/\".$upload['file']['file_name'],\"./assets/images/tidakmasuk/\".$id.\".\".strtolower(end(explode('.',$upload['file']['file_name']))));\n $data = array(\n 'filename'=>$id.\".\".strtolower(end(explode('.',$upload['file']['file_name']))),\n\t 'upload'=>date('Y-m-d H:i:s')\n );\n\t\n\t$this->db->where($this->primary_key,$id);\n $this->db->update('surattidakmasuk', $data);\n }", "title": "" }, { "docid": "a5b0893e3f7dd85b54e95c901a489176", "score": "0.4833089", "text": "public function saveLayers(){\n\t\treturn $this->save_layers();\n\t}", "title": "" }, { "docid": "a644307fce5550a5a24c6bb311350819", "score": "0.483181", "text": "function saveXML() {\n\t\t\t$xmlArray = $this->t3dkptw;\n\t\t\t$xmlDescription = $this->t3dkptw['xmlFileDesc'];\n\t\t\tunset($xmlArray['createNew']);\n\t\t\tunset($xmlArray['gotoStep3']);\n\t\t\tunset($xmlArray['gotoStep4']);\n\t\t\tunset($xmlArray['parentPage']);\n\t\t\tunset($xmlArray['xmlContent']);\n\t\t\tunset($xmlArray['xmlFileName']);\n\t\t\tunset($xmlArray['xmlFileDesc']);\n\t\t\tunset($xmlArray['saveXML']);\n\t\t\tunset($xmlArray['preset']);\n\t\t\t$this->t3dkptw['xmlFileName']=strtolower($this->t3dkptw['xmlFileName']);\n\t\t\t$xmlTree .= t3lib_div::array2xml($xmlArray);\n\t\t\tif (!file_exists('preset/custom/'.$this->t3dkptw['xmlFileName'])) {\n\t\t\t\tmkdir('preset/custom/'.$this->t3dkptw['xmlFileName'], 0744);\n\t\t\t}\n\t\t\tif (!file_exists('preset/custom/'.$this->t3dkptw['xmlFileName'].'/structure.xml')) {\n\t\t\t\t$xmlFile = fopen('preset/custom/'.$this->t3dkptw['xmlFileName'].'/structure.xml', 'x');\n\t\t\t\tfwrite($xmlFile, $xmlTree);\n\t\t\t} else {\n\t\t\t\t$xmlFile = fopen('preset/custom/'.$this->t3dkptw['xmlFileName'].'/structure.xml', 'w');\n\t\t\t\tfwrite($xmlFile, $xmlTree);\n\t\t\t}\n\t\t\tfclose($xmlFile);\n\t\t\tif (!file_exists('preset/custom/'.$this->t3dkptw['xmlFileName'].'/description.txt')) {\n\t\t\t\t$descFile = fopen('preset/custom/'.$this->t3dkptw['xmlFileName'].'/description.txt', 'x');\n\t\t\t\tfwrite($descFile, $xmlDescription);\n\t\t\t} else {\n\t\t\t\t$descFile = fopen('preset/custom/'.$this->t3dkptw['xmlFileName'].'/description.txt', 'w');\n\t\t\t\tfwrite($descFile, $xmlDescription);\n\t\t\t}\n\t\t\tfclose($descFile);\n\t\t}", "title": "" }, { "docid": "692859f5a691ac2f94c5eeb7fcfc4a91", "score": "0.48295724", "text": "public function saveAndAssignMaterialsObject()\n\t{\n\t\tglobal $ilLog;\n\t\t\n\t\t$this->saveObject(false);\n\t\t\n\t\t/*\n\t\t$this->ctrl->setParameter($this,'ref_id',$this->object->getRefId());\n\t\t$target = $this->ctrl->getLinkTarget($this,'materials');\n\t\t$target = str_replace('new_type=','nt=',$target);\n\t\t*/\n\t\t$this->ctrl->setParameter($this,'ref_id',$this->object->getRefId());\n\t\t$this->ctrl->redirect($this,'materials');\n\t}", "title": "" }, { "docid": "14d416c9c2dea6458bab471ef9960d83", "score": "0.48284277", "text": "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t\twp_enqueue_script( 'satispress-access' );\n\t\twp_enqueue_script( 'satispress-repository' );\n\n\t\twp_localize_script(\n\t\t\t'satispress-access',\n\t\t\t'_satispressAccessData',\n\t\t\t[\n\t\t\t\t'editedUserId' => get_current_user_id(),\n\t\t\t]\n\t\t);\n\n\t\t$preload_paths = [\n\t\t\t'/satispress/v1/packages',\n\t\t];\n\n\t\tif ( current_user_can( Capabilities::MANAGE_OPTIONS ) ) {\n\t\t\t$preload_paths = array_merge(\n\t\t\t\t$preload_paths,\n\t\t\t\t[\n\t\t\t\t\t'/satispress/v1/apikeys?user=' . get_current_user_id(),\n\t\t\t\t\t'/satispress/v1/plugins?_fields=slug,name,type',\n\t\t\t\t\t'/satispress/v1/themes?_fields=slug,name,type',\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\tpreload_rest_data( $preload_paths );\n\t}", "title": "" }, { "docid": "679f77495639e81a4750bc71fbf95907", "score": "0.4826926", "text": "function prepareAssetDir() {\n if ( !is_dir($this->app_root.$this->assets_dir) ) {\n\t\t\tumask(0007);\n @mkdir($this->app_root.$this->assets_dir, 0775, true);\n }\n }", "title": "" }, { "docid": "0ba5234f850c5d4735bc05e45ae4616e", "score": "0.4824116", "text": "public function save($filename, $data);", "title": "" }, { "docid": "28ffe37afaf2a9860e4d6841bea980db", "score": "0.4820926", "text": "public function saveImports()\n\t{ \n // Get the input\n $input = JFactory::getApplication()->input;\n\n // Get the model\n $model = $this->getModel();\n\n // Kiểm tra người dùng về quyền cập nhật\n $user = JFactory::getUser();\n\n $data = [];\n \n $tmp_src = $_FILES[\"jsonfile\"][\"tmp_name\"];\n \n switch (mime_content_type($_FILES[\"jsonfile\"][\"tmp_name\"])) {\n case 'text/plain': // có thể là json, geojson\n $str = file_get_contents($tmp_src);\n $json = json_decode($str, true);\n $markers = $json['markers'];\n foreach($markers as $marker) {\n if (intval($marker['id']) === 0 || intval($marker['created_by']) === 0) {\n $item['created_by'] = $user->id;\n $item['modified_by'] = $user->id;\n } else {\n $item['modified_by'] = $user->id;\n }\n $item['state'] = isset($marker['state']) ? intval($marker['state']) : 1;\n \n $item['title'] = $marker['properties']['name'];\n $item['pos'] = $marker['geometry']['coordinates'][1].','.$marker['geometry']['coordinates'][0];\n $item['alias'] = JFilterOutput::stringURLSafe(trim($item['title']));\n //$item['properties'] = json_encode($marker['properties']);\n array_push($data, $item);\n }\n break;\n case 'application/xml': // có thể là xml, gpx\n $xml = simplexml_load_file($tmp_src) or die(\"Error: Cannot create object\");\n $wpts = $xml->wpt;\n foreach($wpts as $wpt) { \n if (intval($wpt['id']) === 0 || intval($wpt['created_by']) === 0) {\n $item['created_by'] = $user->id;\n $item['modified_by'] = $user->id;\n } else {\n $item['modified_by'] = $user->id;\n }\n $item['state'] = isset($wpt['state']) ? intval($wpt['state']) : 1;\n $item['title'] = (string)$wpt->name;\n $item['pos'] = (float)$wpt['lat'].','.(float)$wpt['lon'];\n $item['alias'] = JFilterOutput::stringURLSafe(trim($item['title']));\n //$item['properties'] = json_encode(array('desc'=>(string)$wpt->desc));\n array_push($data, $item);\n }\n break;\n default:\n break;\n }\n // Save the imports\n $return = $model->importItems($data);//saveImports($data);\n\n if ($return)\n {\n $this->setMessage(Jtext::_('COM_GTMARKERS_ITEMS_SUCCESS_IMPORTS'));\n }\n $this->setRedirect('index.php?option=com_gtmarkers&view=imports');\n // Close the application\n //JFactory::getApplication()->close();\n\t}", "title": "" }, { "docid": "941229496c17925974bf11b1f07600be", "score": "0.48136875", "text": "protected function addAssets(): void\n {\n // we request the Recursive variable font with a range of weights between\n // 400 and 700 (normal and bold) and a slant range of -15 to 0 (italic to\n // vertical).\n \n $this->enqueue('//fonts.googleapis.com/css2?family=Recursive:slnt,[email protected],400..700&display=swap');\n $this->enqueue('assets/dashifen.css');\n \n // for our script, we enqueue it and then we add a an inline script after\n // it that'll guarantee that we have a variable that tells scripts where\n // the WP admin ajax page is.\n \n wp_add_inline_script(\n $this->enqueue('assets/dashifen.js'),\n 'window.ajaxUrl = \"' . admin_url('admin-ajax.php') . '\";'\n );\n }", "title": "" }, { "docid": "66bda4e498d10cdd64302140ab93b6a5", "score": "0.48110288", "text": "public function addAction() {\n $this->_helper->layout()->disableLayout();\n\n $form = new Dis_Form_Taxi();\n $form->setAction($this->_helper->url('add-save'));\n\n $src = '/image/profile/female_or_male_default.jpg';\n $form->setSource($src);\n\n $srcTaxi = '/image/profile/logo-taxi.png';\n $form->setSourceTaxi($srcTaxi);\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "bd076c4d180eda79a1c7728ddddd472c", "score": "0.4806985", "text": "public function save($data)\n\t{\n\t\t// Find the gallery and create it if needed\n\t\t$gallery = $this->galleryRepo->createOrUpdate(array(\n\t\t\t'entry_id' => (int) Input::get('entry_id'),\n\t\t\t'field_id' => $this->name,\n\t\t));\n\n\t\t// Paths to uploaded file\n\t\t$paths = array_unique(explode(\";\", trim(Input::get('uploaded-files-' . $this->name), \";\")));\n\n\t\t// Save all uploaded items\n\t\tif ($paths)\n\t\t{\n\t\t\tforeach ($paths as $key => $path)\n\t\t\t{\n\t\t\t\tif (File::exists($path))\n\t\t\t\t{\n\t\t\t\t\t// Get and create target path\n\t\t\t\t\t$target = $this->mediaPath(pathinfo($path, PATHINFO_BASENAME), true);\n\n\t\t\t\t\t// Get relative path\n\t\t\t\t\t$relativePath = str_replace(public_path(), '', $target);\n\n\t\t\t\t\t// Move the file\n\t\t\t\t\tFile::move($path, $target);\n\n\t\t\t\t\t// Create predefined dimmensions\n\t\t\t\t\t$dimensions = Config::get('krustr::media.image_dimensions');\n\t\t\t\t\tapp('krustr.image')->createDimensions($relativePath, $dimensions);\n\n\t\t\t\t\t// And create database entry\n\t\t\t\t\t$this->mediaRepo->create(array(\n\t\t\t\t\t\t'parent_id' => $gallery->id,\n\t\t\t\t\t\t'entry_id' => (int) Input::get('entry_id'),\n\t\t\t\t\t\t'field_id' => $this->name,\n\t\t\t\t\t\t'path' => $relativePath\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $gallery->id;\n\t}", "title": "" }, { "docid": "5c32a9088f06e4d09ad4f787dfbcc196", "score": "0.4806478", "text": "function add_package()\n {\n if (isset($_POST['addpkg_btn'])) {\n $a = $_POST['name'];\n $b = $_POST['from'];\n $c = $_POST['to'];\n $d = $_POST['price'];\n $e = $_POST['day'];\n $f = $_POST['night'];\n $g = $_POST['desc'];\n $h = $_POST['person'];\n $i = $_POST['location'];\n\n foreach ($this->user_live() as $lorem) {\n $by = $lorem['agent_id'];\n }\n $imgs = json_encode($_FILES['image']['name']);\n $sql = \"INSERT INTO `packages`(`pkg_name`, `pkg_createBY`, `pkg_location`,`pkg_from`, `pkg_to`, `pkg_price`, `pkg_day`, `pkg_night`, `pkg_image`, `pkg_description`, `pkg_person`) VALUES ('$a','$by','$i','$b','$c','$d','$e','$f','$imgs','$g','$h')\";\n $query = mysqli_query($this->connection(), $sql);\n\n if (!$query) {\n echo ('<script>alert(\"Sorry SOme Went Wrong\")</script>');\n } else {\n\n $count = count($_FILES['image']['name']);\n\n for ($i = 0; $i < $count; $i++) {\n $tmp = $_FILES['image']['tmp_name'][$i];\n $path = \"uploads/pkg/\" . $_FILES['image']['name'][$i];\n move_uploaded_file($tmp, $path);\n }\n\n echo ('<script>alert(\"Package Added Successfully\")</script>');\n }\n }\n }", "title": "" }, { "docid": "cb5b335595ca6143838bae143d16d856", "score": "0.48052555", "text": "function add_image_attachment_fields_to_save($post, $attachment) {\n // $post['post_type'] == 'attachment'\n if( isset($attachment['credit']) ){\n // update_post_meta(postID, meta_key, meta_value);\n update_post_meta($post['ID'], '_credit', $attachment['credit']);\n }\n return $post;\n}", "title": "" }, { "docid": "48dbd4f16f8d2333917ee83b31c9e99d", "score": "0.4783002", "text": "public function saveData();", "title": "" } ]
a0a82e0fb18fc9f02e7bbedf798120e2
Determine if the variation type is correct for this controller
[ { "docid": "c973eb95951d858a7c6c67987c9e0334", "score": "0.796474", "text": "protected function isVariationTypeCorrect()\n {\n return $this->fetchDataForLva()['variationType'] === null;\n }", "title": "" } ]
[ { "docid": "5c99c68e22e5426af8167bf1febd52fd", "score": "0.6720647", "text": "public function IsProductVariation();", "title": "" }, { "docid": "f19a5e9f9563a4984a195421acee2dac", "score": "0.65447205", "text": "public function getSetupType(){\n $attrCode = $this->getTypeAttribute()->getAttribute()->getOptionsSourceAttribute();\n /** @var Mage_Eav_Model_Config $config */\n $config = Mage::getModel('eav/config');\n $productAttribute = $config->getAttribute($this->getEntityCode(), $attrCode);\n if ($productAttribute->getId()){\n $type = $productAttribute->getBackendType();\n if ($type == 'static'){\n return false;\n }\n return $type;\n }\n return false;\n }", "title": "" }, { "docid": "cbb17c2f8f09129610754b0c5dfb695f", "score": "0.6452444", "text": "public function isTestByVariants()\n {\n return self::TYPE_VARIANT === $this->type;\n }", "title": "" }, { "docid": "45128687f8f7c1fe9e01095527dd1803", "score": "0.6275993", "text": "protected function getEntityType() {\n return \"commerce_product_variation\";\n }", "title": "" }, { "docid": "2bf12b3f19fb88584b32f4cb7667867a", "score": "0.608171", "text": "public function hasVariations() {\n return (bool) $this->getHasVariations();\n }", "title": "" }, { "docid": "0e3bc5c393add7c1d885e0557ee5ad6f", "score": "0.6044355", "text": "function wpsc_have_variations() {\n\tglobal $wpsc_variations;\n\treturn $wpsc_variations->have_variations();\n}", "title": "" }, { "docid": "9898d692ff55206092fa9c411e4e7c11", "score": "0.60086906", "text": "public function type()\n {\n return $this->hasOne(ProductVariationType::class, 'id', 'product_variation_type_id');\n }", "title": "" }, { "docid": "b311b3093461fe187d33311874e0c127", "score": "0.59001875", "text": "public function variation_is_visible()\n {\n }", "title": "" }, { "docid": "caf5b29b506349d2be139e9449f7d767", "score": "0.5860202", "text": "function Variation() {\n\t $itemOptions = $this->ItemOptions();\n\t $variation = null;\n\t \n\t if ($itemOptions && $itemOptions->exists()) foreach ($itemOptions as $itemOption) {\n\t \n\t if ($itemOption->ObjectClass == 'Variation') {\n\t $variation = $itemOption->Object();\n\t }\n\t } \n\t return $variation;\n\t}", "title": "" }, { "docid": "6749549cb03440115fb2326f39c16b51", "score": "0.584441", "text": "public function variation_is_active()\n {\n }", "title": "" }, { "docid": "3acb46b18df8ada3be8b8413b77013f4", "score": "0.58128434", "text": "public function getHasVariations() {\n return $this->has_variations;\n }", "title": "" }, { "docid": "57de3d0fa7ccf3220c97cd1933ff3fe4", "score": "0.57889676", "text": "public function testUpdateProductsVariationType()\n {\n }", "title": "" }, { "docid": "d60db9597a472c9a19d6a6e24a9b5a87", "score": "0.57881445", "text": "public function testShowProductsVariationType()\n {\n }", "title": "" }, { "docid": "91fe6aaf73c7748b4309f26e1f9def14", "score": "0.5743261", "text": "protected function isVariantsProduct()\n {\n return !empty($this->product->get_parent_id());\n }", "title": "" }, { "docid": "a045c2e6791a363cbe6ca0160f3c0fd8", "score": "0.5721208", "text": "public function testStoreProductsVariationType()\n {\n }", "title": "" }, { "docid": "e233f6a410eb4f1a63ae9fb5f3d0f5a8", "score": "0.566609", "text": "public function hasVariants(): bool;", "title": "" }, { "docid": "2c7c50706e44a2f37032e81df9623849", "score": "0.5633636", "text": "public function type() {\n\t\t$type = $this->meta( 'wprm_type', 'food' );\n\t\t$type = 'non-food' === $type ? 'other' : $type; // Use \"other\" instead of \"non-food\" as of 4.0.3.\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "55a6cdc435ae96ed80dbea0f821f698b", "score": "0.55996054", "text": "public function type()\n {\n return $this->hasManyThrough(ProductVariationType::class, ProductVariation::class);\n }", "title": "" }, { "docid": "e79da80359655cd9b041b282cec37642", "score": "0.5586005", "text": "function correctType() : bool{\n return $_POST['type'] == 'Aero' || $_POST['type'] == 'Climbing' || $_POST['type'] == 'Endurance';\n}", "title": "" }, { "docid": "64027e5ca6eedbe56fad6d8023df27b1", "score": "0.55755585", "text": "public function isVariateBy($name)\n {\n return in_array($name, $this->variationFields);\n }", "title": "" }, { "docid": "8176e8781a0fc0e470cb1e5e85b80eee", "score": "0.5551015", "text": "public function checkWarehouseTypeAction() {\n\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(TRUE);\n $form_values = $this->_request->getPost();\n\n $warehouse_types = new Model_WarehouseTypes();\n\n if ($form_values['warehouse_type_name'] !== $form_values['warehouse_type_name_hidden']) {\n $warehouse_types->form_values['warehouse_type_name'] = $form_values['warehouse_type_name'];\n $result = $warehouse_types->checkWarehouseType();\n if (count($result) > 0) {\n echo 'false';\n } else {\n echo 'true';\n }\n } else {\n echo 'true';\n }\n }", "title": "" }, { "docid": "c1922992d2e63a3aae541476c67e7758", "score": "0.54961234", "text": "function checkVariants();", "title": "" }, { "docid": "2a3b2465ed2e8f5bd3bcacf1d541734e", "score": "0.54841393", "text": "public function validateType()\n {\n $validTalkTypes = array(\n 'half-day-tutorial',\n 'full-day-tutorial',\n 'regular',\n 'lightning'\n );\n\n if (empty($this->_sanitized_data['type']) || !isset($this->_sanitized_data['type'])) {\n $this->error_messages[] = \"You must choose what type of talk you are submitting\";\n return false;\n }\n\n if (!in_array($this->_sanitized_data['type'], $validTalkTypes)) {\n $this->error_messages[] = \"You did not choose a valid talk type\";\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d6d3928f2c89c130e090b09d1422669a", "score": "0.5479266", "text": "function testProductVariationOptions() {\n\t \n\t $smallRedCotton = $this->objFromFixture('Variation', 'teeshirtSmallRedCotton');\n\t \n\t $this->assertEquals('Enabled', $smallRedCotton->Status, 'Variation should be status Enabled by default.');\n\t \n\t //Ensure correct options\n\t $options = $smallRedCotton->Options();\n\t $this->assertInstanceOf('ComponentSet', $options);\n\t $this->assertEquals(3, $options->Count());\n\t \n\t //Add variation to the cart\n\t $sizeAttr = $this->objFromFixture('Attribute', 'attrSize');\n\t $colorAttr = $this->objFromFixture('Attribute', 'attrColor');\n\t $materialAttr = $this->objFromFixture('Attribute', 'attrMaterial');\n\t \n\t $teeshirtASmallOpt = $this->objFromFixture('Option', 'optSmallTeeshirt');\n\t $teeshirtARedOpt = $this->objFromFixture('Option', 'optRedTeeshirt');\n\t $teeshirtACottonOpt = $this->objFromFixture('Option', 'optCottonTeeshirt');\n\t \n\t $this->assertEquals(array(\n\t $teeshirtACottonOpt->ID => 'Cotton',\n\t $teeshirtARedOpt->ID => 'Red',\n\t $teeshirtASmallOpt->ID => 'Small'\n\t ), $options->map('ID', 'Title'));\n\t}", "title": "" }, { "docid": "eb0e711b2d6ebdb235bc50522aada68d", "score": "0.54727685", "text": "public function actionVariation()\n {\n $session = Yii::$app->session;\n $id = $_GET['id'];\n $trend =$_GET['trend'];\n if(isset($session['cart'][$id]) || isset($session['addcart'][$id]) )\n {\n $variation = new Basket();\n $variation->variationNumber();\n }\n else return false;\n }", "title": "" }, { "docid": "5644de0f3e429b89acfe0bb5b8a80c78", "score": "0.54603314", "text": "private function variation_is_available(\\WC_Product_Variation $variation)\n {\n }", "title": "" }, { "docid": "63c59625dcfc801a4d537f114ce24f0d", "score": "0.54533875", "text": "public function is_item_variation( $item_id ) {\n\n\t\tif ( ! empty( $this->items ) && isset( $this->items[ $item_id ] ) && isset( $this->items[ $item_id ][ 'is_variation' ] ) && $this->items[ $item_id ][ 'is_variation' ] )\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "04661ff3826e6958bb6e63ee39cace8f", "score": "0.5443989", "text": "public function filter_variations($bool, $variation_id, $product_id, $variation) {\n if (current_user_can('manage_woocommerce')) {\n return true;\n }\n global $current_user;\n $starting = substr($variation->sku, 0, 4);\n //echo $starting;\n if (is_user_logged_in() && ! in_array('b2b_retail', $current_user->roles) && $starting === '102-' ||\n in_array('b2b_retail', $current_user->roles) ||\n ! is_user_logged_in() && $starting != '101-') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "abb4f0148442f12d34012ff5d6d56b05", "score": "0.54356813", "text": "public static function get_variation()\n {\n }", "title": "" }, { "docid": "f584de4e30d62bc4d5f508edc4468985", "score": "0.5415442", "text": "function wpsc_check_display_type(){\n\tglobal $wpsc_query, $post;\n\tif(isset($wpsc_query->query_vars['taxonomy']) && 'wpsc_product_category' == $wpsc_query->query_vars['taxonomy'] && is_string($wpsc_query->query_vars['term']) && 1 < $wpsc_query->post_count)\n\t\t$display_type =\twpsc_get_the_category_display($wpsc_query->query_vars['term']);\n\telse\n\t\t$display_type = get_option('product_view');\n\treturn $display_type;\n}", "title": "" }, { "docid": "1f43e6caf11158b17398dc7fb841baaf", "score": "0.5395771", "text": "public function testStoreProductVariationOption()\n {\n }", "title": "" }, { "docid": "8111c1cba70b28f6bb650cc90009bf51", "score": "0.5390949", "text": "public function get_product_type()\n {\n }", "title": "" }, { "docid": "0f5ef58c307fdf0262d1910a0e5b730f", "score": "0.538542", "text": "public function testIndexProductsVariationType()\n {\n }", "title": "" }, { "docid": "c42617f0e5da017db503b5a6153f0fb2", "score": "0.53375167", "text": "public function testShowProductVariationOption()\n {\n }", "title": "" }, { "docid": "98a537f1f80583901b851e4c846ede51", "score": "0.53232765", "text": "public function get_available_variation($variation)\n {\n }", "title": "" }, { "docid": "881d3a5a6c359f564a652a311c85073d", "score": "0.5309375", "text": "protected function isPsv()\n {\n if ($this->isPsv === null) {\n $data = $this->getVariationCompletionStatusData();\n\n $this->isPsv = $data['goodsOrPsv']['id'] === LicenceEntityService::LICENCE_CATEGORY_PSV;\n }\n\n return $this->isPsv;\n }", "title": "" }, { "docid": "560ab5077244edf4077104b14e757b59", "score": "0.52976584", "text": "public function getDetailsType()\n\t{\n\t\t$detailsType = $this->getSetting('payProvFormType');\n\t\tif ($detailsType == 'none') {\n\t\t\t$detailsType = false;\n\t\t}\n\t\treturn $detailsType;\n\t}", "title": "" }, { "docid": "ac47fd7ffe59d6d26e0f7569827bc47b", "score": "0.52961874", "text": "public function issetVariations($index)\n {\n return isset($this->variations[$index]);\n }", "title": "" }, { "docid": "c2d239c36190e57d51bc6403a38eac9f", "score": "0.5269038", "text": "function wpsc_have_variation_groups() {\n\tglobal $wpsc_variations;\n\treturn $wpsc_variations->have_variation_groups();\n}", "title": "" }, { "docid": "9fe0b96591a582c5caed1524c0745173", "score": "0.5262104", "text": "public function isRequiredType ()\n {\n if ($_SESSION['userType'] == $this->getRequiredType()) {\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "1ac0961d87835c919e59d37f6711ecea", "score": "0.5246167", "text": "public static function validate($type){\n return in_array($type, self::DESIGNER_TYPE);\n }", "title": "" }, { "docid": "cbabda6c44659866721717201c36cef7", "score": "0.5208333", "text": "public function is_setting_type_valid($type)\n {\n }", "title": "" }, { "docid": "da7eb614654655045aceff61ee3103a2", "score": "0.5203593", "text": "public function show(Variation $variation)\n {\n //\n }", "title": "" }, { "docid": "1023ce041c2f5769ff5079984d973a00", "score": "0.5202956", "text": "public static function load_variations()\n {\n }", "title": "" }, { "docid": "b467fd1e46c8c1169151e311e67395b4", "score": "0.519683", "text": "public function testForcedVariation(): void\n {\n $user = $this->client->user([\"id\" => \"1\"]);\n $experiment = new Experiment(\"my-test\");\n $this->assertEquals(1, $this->chooseVariation($user, $experiment));\n\n $experiment->force = -1;\n $this->assertEquals(-1, $this->chooseVariation($user, $experiment));\n\n $experiment->force = 0;\n $this->assertEquals(0, $this->chooseVariation($user, $experiment));\n\n $experiment->force = 1;\n $this->assertEquals(1, $this->chooseVariation($user, $experiment));\n }", "title": "" }, { "docid": "7fdb81012fd8fe69fa899ceca7ad8d6b", "score": "0.5196333", "text": "public function testGettingProductType()\n {\n // Hardback\n $this->assertSame('Hardback', $this->groschen->getProductType());\n\n // ePub 3\n $groschen = new Groschen('9789510441374');\n $this->assertSame('ePub3', $groschen->getProductType());\n\n // Downloadable audio file\n $groschen = new Groschen('9789510423783');\n $this->assertSame('Downloadable audio file', $groschen->getProductType());\n }", "title": "" }, { "docid": "6d88e2ff8e784942fd9af572108d25db", "score": "0.5192119", "text": "protected static function typeCondition()\n {\n \n }", "title": "" }, { "docid": "3aecb00308ee6c819b83f6ef1c1709e2", "score": "0.5187335", "text": "public function getTypeDecision()\n\t{\n\t\treturn $this->_type_decision;\n\t}", "title": "" }, { "docid": "7d0a445583b7f6620dc248f86e36d9b5", "score": "0.5177002", "text": "private function determineKind(&$value, &$pro_args, $ajax_die_code = false, $suffix = 'tt', $prefix = 'products_', $mod_suffix = \"_edited\") {\n return true;\n }", "title": "" }, { "docid": "dd253b6925d0119df502a23252f69a5e", "score": "0.5170199", "text": "function is_product_taxonomy()\n {\n }", "title": "" }, { "docid": "9d5ef45e62715f054d1c0fdd675d941e", "score": "0.51663154", "text": "public function isStatic()\n {\n return $this->getAttribute('backend_type') == self::TYPE_STATIC || $this->getAttribute('backend_type') == '';\n }", "title": "" }, { "docid": "a1de447f33866cad18b3022e061f52dd", "score": "0.5166289", "text": "function checkViewType($slimAppInstance) {\n\t$viewType = $slimAppInstance->request->headers->get(\"Content-Type\");\n\t\n\tif($viewType == RESPONSE_FORMAT_XML)\n\t\t$viewType = \"xmlView\";\n\telse\n\t\t$viewType = \"jsonView\";\n\t\n\treturn $viewType;\n}", "title": "" }, { "docid": "405da48e1f72c60571afa95d778693ed", "score": "0.5141038", "text": "public function authorize()\n {\n return $this->user()->can('create-product-variations');\n }", "title": "" }, { "docid": "81946a77d591e980046cbd13d6381eb5", "score": "0.5130861", "text": "public static function save_variations()\n {\n }", "title": "" }, { "docid": "865c8700222eb170750cfb681451a2ee", "score": "0.5126937", "text": "public function fileTypeIsCorrect()\n {\n $extensions = array(\"image/jpeg\", \"image/jpg\", \"image/png\", \"image/gif\");\n\n if ( in_array($this->file_type, $extensions) ){\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "title": "" }, { "docid": "9c05b79c4bd77833119640df10c07546", "score": "0.5116057", "text": "function _acf_apply_hook_variations()\n{\n}", "title": "" }, { "docid": "b54f16ff2baa091fa0efd7b22c8cae3f", "score": "0.51103073", "text": "public static function remove_variations()\n {\n }", "title": "" }, { "docid": "5b9cbd490810483c68dbdd4cea03b281", "score": "0.51011574", "text": "public function handles(InputType $inputType)\n {\n return $inputType instanceof VoucherOptionsInput;\n }", "title": "" }, { "docid": "59fa7655c67fdfe1862141e4861f1c5e", "score": "0.5095022", "text": "public function get_type() {\n\n\t\tif ( ! isset( $this->type ) ) {\n\n\t\t\t$this->type = give_get_meta( $this->ID, '_give_price_option', true );\n\n\t\t\tif ( empty( $this->type ) ) {\n\t\t\t\t$this->type = 'set';\n\t\t\t}\n\n\t\t}\n\n\t\treturn apply_filters( 'give_get_form_type', $this->type, $this->ID );\n\n\t}", "title": "" }, { "docid": "0de5f7326ca434e4115a81462137abe7", "score": "0.5076821", "text": "public function varTypeAction()\n {\n $response = new Response();\n $data = $this->data->get();\n if ($data) {\n $response->ok($data);\n } else {\n $response->badRequest('Data malformed or missing');\n }\n return $response;\n }", "title": "" }, { "docid": "27443f9d64250253377eca1994c9e276", "score": "0.50735646", "text": "function testAddInvalidProductVariationToCart() {\n\t \n\t $teeshirtA = $this->objFromFixture('Product', 'teeshirtA');\n\t $teeshirtAVariation = $this->objFromFixture('Variation', 'teeshirtSmallRedCotton'); \n\n $this->logInAs('admin');\n\t $teeshirtA->doPublish();\n\t $this->logOut();\n\n\t $this->get(Director::makeRelative($teeshirtA->Link())); \n\n\t //Add variation to the cart\n\t $sizeAttr = $this->objFromFixture('Attribute', 'attrSize');\n\t $colorAttr = $this->objFromFixture('Attribute', 'attrColor');\n\t $materialAttr = $this->objFromFixture('Attribute', 'attrMaterial');\n\t \n\t $teeshirtASmallOpt = $this->objFromFixture('Option', 'optSmallTeeshirt');\n\t $teeshirtAMediumOpt = $this->objFromFixture('Option', 'optMediumTeeshirt');\n\t $teeshirtARedOpt = $this->objFromFixture('Option', 'optRedTeeshirt');\n\t $teeshirtACottonOpt = $this->objFromFixture('Option', 'optCottonTeeshirt');\n\t \n\t $this->assertEquals($teeshirtASmallOpt->ID, $teeshirtAVariation->getOptionForAttribute($sizeAttr->ID)->ID);\n\t $this->assertFalse($teeshirtAMediumOpt->ID == $teeshirtAVariation->getOptionForAttribute($sizeAttr->ID)->ID);\n\t $this->assertEquals($teeshirtARedOpt->ID, $teeshirtAVariation->getOptionForAttribute($colorAttr->ID)->ID);\n\t $this->assertEquals($teeshirtACottonOpt->ID, $teeshirtAVariation->getOptionForAttribute($materialAttr->ID)->ID);\n\t \n\t //Submit with incorrect variation values, for Medium, Red, Cotton\n\t /*\n\t $this->submitForm('AddToCartForm_AddToCartForm', null, array(\n\t 'Quantity' => 1,\n\t \"Options[{$sizeAttr->ID}]\" => $teeshirtAMediumOpt->ID, //Medium\n\t \"Options[{$colorAttr->ID}]\" => $teeshirtARedOpt->ID, //Red\n\t \"Options[{$materialAttr->ID}]\" => $teeshirtACottonOpt->ID, //Cotton\n\t ));\n\t */\n\t $data = $this->getFormData('AddToCartForm_AddToCartForm');\n $data['Quantity'] = 1;\n $data[\"Options[{$sizeAttr->ID}]\"] = $teeshirtAMediumOpt->ID; //Medium\n $data[\"Options[{$colorAttr->ID}]\"] = $teeshirtARedOpt->ID; //Red\n $data[\"Options[{$materialAttr->ID}]\"] = $teeshirtACottonOpt->ID; //Cotton\n \n $this->post(\n Director::absoluteURL($teeshirtA->Link() . '/AddToCartForm/'),\n $data\n );\n\n\t $order = CartControllerExtension::get_current_order();\n\t $items = $order->Items();\n\n\t $this->assertEquals(0, $items->Count());\n\t}", "title": "" }, { "docid": "27e7b69141458d8dcb2eb3f5dfb3eec7", "score": "0.507287", "text": "function isStandardType();", "title": "" }, { "docid": "e11153bb92d3125a41695126d01f48bb", "score": "0.50647783", "text": "function is_recognized_type() {\n return @$this->type['restore'] || @$this->type['backup'];\n }", "title": "" }, { "docid": "3dfb4fbe0404210de04b21dfc1f184ce", "score": "0.5064641", "text": "protected function checkTigger()\n {\n if (Mage::getSingleton('api/server')->getAdapter()) {\n return Crizza_Stock_Model_Variation::TRIGGER_API;\n } else if (Mage::getSingleton('admin/session')->isLoggedIn()) {\n return Crizza_Stock_Model_Variation::TRIGGER_ADMIN;\n } else {\n return Crizza_Stock_Model_Variation::TRIGGER_PURCHASE;\n }\n }", "title": "" }, { "docid": "b9169bce89568bb5e27e7ff69d11b492", "score": "0.50602937", "text": "public function test_it_has_many_variations()\n {\n $product = factory(Product::class)->create();\n\n // and that product has a variation\n $product->variations()->save(factory(ProductVariation::class)->create());\n \n // if we list that products variations, then it should be\n // then it should be a productvariation\n $this->assertInstanceOf(ProductVariation::class, $product->variations->first());\n }", "title": "" }, { "docid": "5f33a1d83a24285eab397d1d71d62902", "score": "0.5049258", "text": "public function isValutationProduct($product)\r\n {\r\n return $product->getTypeId() === \"valutation_product\";\r\n }", "title": "" }, { "docid": "e09ce24bf191e71b9a2f6c5a16c21d9c", "score": "0.50455827", "text": "public function update(Request $request, Variation $variation)\n {\n\n $this->validate($request, [\n 'name' => 'required|min:4|unique:variations,name,'.$variation->id\n ]);\n\n if($variation->update(['name' => $request->name])){\n\n if($request->names){\n foreach ($request->names as $key => $name) {\n $data = [];\n $type = ($request->types)? $request->types[$key] : null;\n if($name) $data['name'] = $name;\n if($request->datas){\n $color = (isset($request->datas[$key]))? $request->datas[$key] : null;\n if( $name && $color && $type && ($type == 'color') ){ \n $data['type'] = 'color';\n $data['data'] = $color;\n } \n }\n if(!empty($data)) $variation->values()->create($data);\n } \n }\n\n if($request->v_dels){\n try{\n VariationValue::destroy($request->v_dels); \n }catch(\\Exception $e){\n\n } \n }\n\n if($request->old_names){\n foreach ($request->old_names as $id => $name) {\n $variation_update = VariationValue::find($id);\n if($variation_update){\n\n $data = [];\n $type = ($request->old_types)? $request->old_types[$id] : null;\n if($name) $data['name'] = $name;\n if($request->old_datas){\n $color = (isset($request->old_datas[$id]))? $request->old_datas[$id] : null;\n if( $name && $color && $type && ($type == 'color') ){ \n $data['type'] = 'color';\n $data['data'] = $color;\n } \n }\n\n if(!empty($data)) $variation_update->update($data);\n } \n } \n }\n\n return redirect()->back()->with('success', 'Variation update success!');\n }\n return back()->with('error', 'Variation update failed!');\n }", "title": "" }, { "docid": "84de7422e6677136926b799aac13924d", "score": "0.5042422", "text": "public function testIndexProductVariationOption()\n {\n }", "title": "" }, { "docid": "bd1322b53e12cae0d043842da8ef816d", "score": "0.50392264", "text": "public function isProd(): bool\n {\n $nodeType = $this->isEmulated()\n ? $this->emulatedNodeType\n : $this->nodeType;\n\n return ($nodeType === self::PROD || $nodeType === self::STAGE);\n }", "title": "" }, { "docid": "e07af54509fe276ed56a767123c1d51b", "score": "0.50357234", "text": "public function testGetVarietyByName()\n {\n $response = $this->post('api/coins/varietyType', [\n 'coin_id' => 3664, //$this->coin['coin_id'],\n 'variety' => \"Doubled Die Reverse\" //$this->coin['variety']\n ]);\n $data = $response->getOriginalContent();\n $this->assertEquals(\"Doubled Die Reverse\", $data['varietyList'][0]->variety);\n $this->assertEquals(200, $response->getStatusCode());\n }", "title": "" }, { "docid": "58a2699bbb45a9802a17fe054fc380d3", "score": "0.50305045", "text": "function wpsc_the_variation() {\n\tglobal $wpsc_variations;\n\t$wpsc_variations->the_variation();\n}", "title": "" }, { "docid": "b9078baced092943e9bfb8199ef0c0a9", "score": "0.5023042", "text": "public function testDeleteProductsVariationType()\n {\n }", "title": "" }, { "docid": "c2e66650bee9ee744cd95e6b4aaef5f3", "score": "0.5012219", "text": "public static function output_variations()\n {\n }", "title": "" }, { "docid": "69f217cdbd5ad56fc4cec1e49335175c", "score": "0.5004741", "text": "public function hasType(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "6c92ca0c4f1b6bca0e8716412f4b7db2", "score": "0.5003617", "text": "function getQuestionType($item_num){\n\t\tswitch ($this->field_entry[$item_num]['qmd_questiontype']){\n\t\t\tcase 'Multiple-choice':\n\t\t\t\t//1, 4\n\t\t\t\t//likert have no answers\n\t\t\t\tif (empty($this->answers)){\n\t\t\t\t\treturn 4;\n\t\t\t\t}\n\t\t\t\treturn 1;\n\t\t\t\tbreak;\n\t\t\tcase 'True/false':\n\t\t\t\treturn 2;\n\t\t\t\tbreak;\n\t\t\tcase 'FIB-string':\n\t\t\t\treturn 3;\n\t\t\t\tbreak;\n\t\t\tcase 'Drag-and-drop':\n\t\t\t\treturn 5;\n\t\t\t\tbreak;\n\t\t\tcase 'Multiple-response':\n\t\t\t\treturn 7;\n\t\t\t\tbreak;\n\t\t} \n\n\t\tswitch ($this->field_entry[$item_num]['qmd_itemtype']){\n\t\t\tcase 'Matching':\n\t\t\t\t//matching\n\t\t\t\treturn 5;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//handles CC packages\n\t\tswitch ($this->field_entry[$item_num]['cc_profile']){\n\t\t\tcase 'cc.multiple_choice.v0p1':\n\t\t\t\treturn 1;\n\t\t\t\tbreak;\n\t\t\tcase 'cc.true_false.v0p1':\n\t\t\t\treturn 2;\n\t\t\t\tbreak;\n\t\t\tcase 'cc.fib.v0p1':\n\t\t\t\treturn 3;\n\t\t\t\tbreak;\n\t\t\tcase 'cc.multiple_response.v0p1':\n\t\t\t\treturn 7;\n\t\t\t\tbreak;\n\t\t}\n\t\n\n\t\t//Check if this is an ordering, or matching\n\t\t$response_obj;\n\t\tswitch ($this->response_type[$item_num]){\n\t\t\tcase TR_QTI_REPONSE_LID:\n\t\t\t\t$response_obj = $this->attributes[$item_num]['response_lid'];\n\t\t\t\tbreak;\n\t\t\tcase TR_QTI_REPONSE_GRP:\n\t\t\t\t$response_obj = $this->attributes[$item_num]['response_grp'];\n\t\t\t\tbreak;\n\t\t\tcase TR_QTI_REPONSE_STR:\n\t\t\t\t$response_obj = $this->attributes[$item_num]['response_str'];\n\t\t\t\treturn 3;\t//no need to parse the rcardinality?\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($response_obj['rcardinality'] == 'Ordered'){\n\t\t\treturn 6;\n\t\t} elseif ($response_obj['rcardinality'] == 'Multiple'){\n\t\t\t//TODO Multiple answers, Simple matching and Graphical matching\n\t\t\tif (empty($this->field_entry[$item_num])){\n\t\t\t\treturn 7;\n\t\t\t}\n\t\t\treturn 5;\n\t\t} elseif ($response_obj['rcardinality'] == 'Single'){\n\t\t\treturn 1; //assume mc\n\t\t}\n\n\t\t//None found.\n\t\treturn false;\n\t}", "title": "" }, { "docid": "64efb50c7753c45bb94a6ded8c8842eb", "score": "0.4999335", "text": "protected function isCustomType()\n\t{\n\t\treturn ($this->data['TYPE'] != self::TYPE_STANDARD);\n\t}", "title": "" }, { "docid": "d46ead1445518059195a20a9b496a920", "score": "0.49990284", "text": "function woocommerce_single_variation()\n {\n }", "title": "" }, { "docid": "2c68a889be5a76545345596bd7bad672", "score": "0.49965313", "text": "public static function add_variation()\n {\n }", "title": "" }, { "docid": "b2e92e675818214e0830c557daa440c2", "score": "0.4996441", "text": "public static function product_variations_options( $loop, $variation_data, $variation ) {\r\n\r\n\t\t$variation_object = wc_get_product( $variation->ID );\r\n\r\n\t\t$variation_is_nyp = $variation_object->get_meta( '_nyp', 'edit' );\r\n\t\t?>\r\n\r\n\t\t<label><input type=\"checkbox\" class=\"checkbox variation_is_nyp\" name=\"variation_is_nyp[<?php echo esc_attr( $loop ); ?>]\" <?php checked( $variation_is_nyp, 'yes' ); ?> /> <?php esc_html_e( 'Name Your Price', 'wc_name_your_price' ); ?> <a class=\"tips\" data-tip=\"<?php esc_attr_e( 'Customers are allowed to determine their own price.', 'wc_name_your_price' ); ?>\" href=\"#\">[?]</a></label>\r\n\r\n\t\t<?php\r\n\r\n\t}", "title": "" }, { "docid": "b9e4ea4d5a6860d542b10b8a165a98ac", "score": "0.4975708", "text": "function is_vendorview($status,$product){\n\t\t// print_r($product);\n\t\tif($product->is_type('auction') && wac_is_vendor()){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "be13b7cbbe81be22e93d067d2d577eb5", "score": "0.49722582", "text": "public function getValidVariantIds() {\n return \\Drupal::entityTypeManager()->getStorage('commerce_product_variation')\n ->getQuery()\n ->condition('type', 'gift')\n ->condition('product_id.entity.type', 'gift')\n ->execute();\n }", "title": "" }, { "docid": "7ec26e845c050407d859a4d6d4481684", "score": "0.4970243", "text": "function getQuestionType() {\n\t\treturn 'choice';\n\t}", "title": "" }, { "docid": "7ee08f23b3ce29457bc1870f8dc3f95c", "score": "0.49599904", "text": "public function hasPokemonType()\n {\n return $this->pokemon_type !== null;\n }", "title": "" }, { "docid": "31f18961fa5f50b920f7809117faa9af", "score": "0.4955426", "text": "public function getHandlingType()\n {\n return $this->scopeConfig->getValue('carriers/vip/handling_type', ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "668872c43e26ef153028edb8d8b800c5", "score": "0.49436915", "text": "public function changeVariationType($product_variation_type_id)\n {\n $this->emit('changeVariationType', $product_variation_type_id);\n }", "title": "" }, { "docid": "63392e3c4984f3b5d724c342ec99f158", "score": "0.49393663", "text": "function is($type)\n {\n return $type===$this->type;\n }", "title": "" }, { "docid": "7a85b5eb6ba3255707d5ebb75ca4d9bf", "score": "0.49326485", "text": "public function hasType()\n {\n return $this->get(self::TYPE) !== null;\n }", "title": "" }, { "docid": "7a85b5eb6ba3255707d5ebb75ca4d9bf", "score": "0.49326485", "text": "public function hasType()\n {\n return $this->get(self::TYPE) !== null;\n }", "title": "" }, { "docid": "0ac8852298cc8dd3ac6eb7130eb926df", "score": "0.49141586", "text": "public function canCreateTyreReplacement(){\n\n return $this->checkPrivilege('Vehicle Tyre Replacement','Create');\n }", "title": "" }, { "docid": "62ac3454b91af6c1f2ec7a014aea4af9", "score": "0.49132866", "text": "public function type()\n {\n return ($this->type_id === 1) ? 'Default' : 'Decision';\n \n }", "title": "" }, { "docid": "2a0e7e39b737337c4ffec437cc49d56c", "score": "0.49025846", "text": "public function testShowProductsVariation()\n {\n }", "title": "" }, { "docid": "308625b9942309684012adf7f176fc3a", "score": "0.4899736", "text": "public function setTypeLogic()\n {\n return $this->setType(self::CRITICAL);\n }", "title": "" }, { "docid": "4f2a90fbb1d08f56af033dbda269978c", "score": "0.48941195", "text": "function checkProduct($netType) {\n if (null == $netType) {\n return null;\n } else {\n $myProd = \"none\";\n switch ($netType) {\n case \"1\":\n $myProd = \"None\";\n break;\n case \"2\":\n $myProd = \"Fibre / Ethernet\";\n break;\n case \"3\":\n $myProd = \"Cable\";\n break;\n case \"4\":\n $myProd = \"VDSL / EOC\";\n break;\n case \"5\":\n $myProd = \"ADSL2+\";\n break;\n case \"6\":\n $myProd = \"Naked Adsl2+\";\n break;\n case \"7\":\n $myProd = \"On Net ADSL2+\";\n break;\n default:\n $myProd = \"Mo match Found\";\n break;\n }\n return $myProd;\n }\n}", "title": "" }, { "docid": "0caeac1606aaa9d06c06cc4aa3272190", "score": "0.4890722", "text": "public function variation()\n {\n return $this->morphToMany(app('variation'), 'variation');\n }", "title": "" }, { "docid": "263ceca8d0fffd6e6c2ebc1f7aee30e0", "score": "0.48895738", "text": "function testSaveInvalidProductVariation() {\n\n\t return;\n\t \n\t //This variation only has 1 option instead of 2\n\t $brokenProductVariation = $this->objFromFixture('Variation', 'brokenMedium');\n\t $options = $brokenProductVariation->Options();\n\t $this->assertInstanceOf('ComponentSet', $options);\n\t $this->assertEquals(1, $options->Count());\n\t \n\t $e = null;\n\t try {\n\t $brokenProductVariation->write();\n\t }\n\t catch (ValidationException $e) {\n\t $message = $e->getMessage();\n\t }\n\t $this->assertInstanceOf('ValidationException', $e);\n\t}", "title": "" }, { "docid": "d61bd04cc07141901a12434973ab8976", "score": "0.48869258", "text": "public function hasType()\n {\n return $this->type !== null;\n }", "title": "" }, { "docid": "1167a7ca59eb5dd590490db7c6d13e18", "score": "0.48864263", "text": "private function type_check() {\n $ext = check_ext(basename($this->name));\n // If the extension is jpg, turn to jpeg for mimetype //\n if ($ext == 'jpg' || $ext == 'JPG') {\n $type = 'jpeg';\n } else {\n $type = $ext;\n }\n return $type;\n }", "title": "" }, { "docid": "c292b4d85d6381463e684ce5d4bb0854", "score": "0.48842612", "text": "function other_meta_key_check( $type ){\n\n\t\t// Add additional meta meta for specific options values\n\t\t$additional_meta_key = array_search( $type, $this->additional_options_meta_key );\n\t\tif( $additional_meta_key ) return $additional_meta_key;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "49ff72980ff37b9429bc2e15fb3099e2", "score": "0.48830336", "text": "function wc_render_invalid_variation_notice($product_object)\n {\n }", "title": "" }, { "docid": "adf1e118948c5aa2e35aa421f88c5f81", "score": "0.48782712", "text": "function zen_get_attributes_type($check_attribute) {\n global $db;\n $check_options_id_query = $db->Execute(\"select options_id from \" . TABLE_PRODUCTS_ATTRIBUTES . \" where products_attributes_id='\" . (int)$check_attribute . \"'\");\n $check_type_query = $db->Execute(\"select products_options_type from \" . TABLE_PRODUCTS_OPTIONS . \" where products_options_id='\" . (int)$check_options_id_query->fields['options_id'] . \"'\");\n return $check_type_query->fields['products_options_type'];\n }", "title": "" } ]
cd26c3729956f1fa95cd2f22e90bd11a
This method generates a random string of a given length.
[ { "docid": "4f3bfd16187b65f266c3ce4f430b0356", "score": "0.0", "text": "function util_random_string($max=30)\n{\n\tsrand(time());\n\t\n\t$source = \"abcdefghijklmnopqrstuvwxyz0123456789\" ;\n\t$shuffled = str_shuffle($source);\n\twhile (strlen($shuffled) < 3*$max)\n\t{\n\t\t$shuffled .= str_shuffle($source);\n\t}\n\t$start = rand(0, $max);\n\treturn substr($shuffled, $start, $max);\n\t/*\n\t$chars = explode(\" \", \"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\tfor($i = 0; $i < $max; $i++){\n\t\t$rnd = array_rand($chars);\n\t\t$rtn .= base64_encode(md5($chars[$rnd]));\n\t}\n\treturn substr(str_shuffle(strtolower($rtn)), 0, $max);\n\t $key = '';\n\t$keys = array_merge(range(0, 9), range('a', 'z'));\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$key .= $keys[array_rand($keys)];\n\t}\n\treturn $key;\n\t*/\n}", "title": "" } ]
[ { "docid": "981b7b9b87f6fe6307dd4d87673c517e", "score": "0.8632773", "text": "function str_random($length)\n {\n return str_generate($length, '0123456789ABCDEDFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');\n }", "title": "" }, { "docid": "5fda18afe303f5f6f1fd5aacc790af14", "score": "0.8573319", "text": "function string_random_string($length)\r\n\t{\r\n\t\t$string = \"\";\r\n\t\t$chaine = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789\";\r\n\t\tsrand((double)microtime()*1000000);\r\n\t\tfor ($i=0; $i<$length; $i++)\r\n\t\t{\r\n\t\t\t$string .= $chaine[rand()%strlen($chaine)];\r\n\t\t}\r\n\t\treturn $string;\r\n\t}", "title": "" }, { "docid": "91d171f60fffcb060e94a90993af5cff", "score": "0.8546723", "text": "function generateRandomString($length = 32)\n {\n return Str::random($length);\n }", "title": "" }, { "docid": "aaa2d1029f76e05423ba549a185ab4af", "score": "0.8494145", "text": "function RandomString($length)\n{\n $string = md5(microtime());\n $highest_startpoint = 32-$length;\n $randomString = substr($string,rand(0,$highest_startpoint),$length);\n return $randomString;\n\n}", "title": "" }, { "docid": "7bf9666467d1c603191db9119f6482ce", "score": "0.84897685", "text": "public function str_random($length = 16)\n {\n return Str::random($length);\n }", "title": "" }, { "docid": "8bf9acebed5add48765c8d5c17414980", "score": "0.84828675", "text": "function genRandomString($length) {\n $characters = '0123456789';\n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n}", "title": "" }, { "docid": "0dd9cd3de6dd6aaad95e738dd58241fa", "score": "0.84707993", "text": "private function rand_string($length)\n {\n $chars = \"abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ23456789\";\n return substr(str_shuffle($chars),0,$length);\n }", "title": "" }, { "docid": "afb69d89fbb934587f142c2e5cd6fc76", "score": "0.84696597", "text": "function str_random($length = 16)\n {\n return Str::random($length);\n }", "title": "" }, { "docid": "dd90bb8e498730f8332b27000e422cfb", "score": "0.8469089", "text": "public function generateRandomString($length = 10) {\n \n $characters = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n \n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n \n return $randomString;\n \n}", "title": "" }, { "docid": "0504b93992881232989802047ce7c89f", "score": "0.84618187", "text": "private static function randomString($length = 12)\n {\n return substr(str_shuffle('23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'), 0, $length);\n }", "title": "" }, { "docid": "21bd9d788479178000598807173b6564", "score": "0.84173983", "text": "public function str_random($length)\n\t{\n\t\treturn str_random($length);\n\t}", "title": "" }, { "docid": "99268c236dbcf3e2a30df7fcda55460f", "score": "0.84173924", "text": "public static function getRandomString($length) \n{\n$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nreturn substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n}", "title": "" }, { "docid": "8a35ede56e5fe880b0a7e9e0abb131f2", "score": "0.8396029", "text": "function str_random($length = 16)\n\t{\n\t\treturn Illuminate\\Support\\Str::random($length);\n\t}", "title": "" }, { "docid": "48bbf4b3cb5973e717fc191515bab92b", "score": "0.8391296", "text": "function random_string_length($length)\n {\n $len = $length;\n $base = \"ABCDEFGHIJKLMNRSTUVWXYabcdefghijklmnopqrstuvwxyz123456789\";\n $max = strlen($base) - 1;\n $activatecode = '';\n mt_srand((double)microtime()*1000000);\n while(strlen($activatecode) < $len + 1)\n $activatecode .= $base{mt_rand(0,$max)};\n return $activatecode;\n }", "title": "" }, { "docid": "13622a6905e69a0f51c14096590c8700", "score": "0.83900064", "text": "function random_string($length = 6) {\n\t$text = '';\n\t$characters = '0123456789abcdefghijkmnopqrstuvwxyz';\n\t$nro = 0;\n\twhile ($nro < $length) {\n\t\t$caracter = substr($characters, mt_rand(0, strlen($characters)-1), 1);\n\t\t$text .= $caracter;\n\t\t$nro++;\n\t}\n\treturn $text;\n}", "title": "" }, { "docid": "165bb721481f185496329fe1120c8969", "score": "0.8373304", "text": "function generateRandStr($length){\n \t\t$randstr = \"\";\n \t\tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n\t\t\t\tif($randnum < 10){\n \t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t$randstr .= chr($randnum+61);\n \t\t}\n \t\t}\n \t\treturn $randstr;\n \t\t}", "title": "" }, { "docid": "12f6b4c6893f3d2f3a2c0ca4223d07dd", "score": "0.83594805", "text": "function generateRandomString($length) {\n return strtoupper(substr(str_shuffle(str_repeat($x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / strlen($x)))), 1, $length));\n }", "title": "" }, { "docid": "db804a8a7b482647efdb9197133cf510", "score": "0.83555424", "text": "static function generateRandomString($length) {\n $characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "1e3ea0afbc5dcb815e8418e2bd18f454", "score": "0.8354182", "text": "function getRandomString(int $length = 40): string\n{\n return bin2hex( random_bytes($length / 2) );\n}", "title": "" }, { "docid": "7791901dbba5ed497ef679d4abcdcaab", "score": "0.83473593", "text": "public static function generateRandomString($length=20) {\n $haystack = '012345678'\n . 'abcdefghijklmnopqrstuvwxyz'\n . 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $iLen = strlen($haystack);\n $result = '';\n\n mt_srand((double) microtime() * 1000000);\n for ( $i=0; $i<$length; $i++ ) {\n $result .= substr($haystack, (mt_rand() % ($iLen)), 1);\n }\n return($result);\n }", "title": "" }, { "docid": "e979119e56134d2d1ab5b17a6fe017e0", "score": "0.83459705", "text": "public function generateRandStr($length) {\n $randstr = \"\";\n for ($i = 0; $i < $length; $i++) {\n $randnum = mt_rand(0, 61);\n if ($randnum < 10) {\n $randstr .= chr($randnum + 48);\n } else if ($randnum < 36) {\n $randstr .= chr($randnum + 55);\n } else {\n $randstr .= chr($randnum + 61);\n }\n }\n return $randstr;\n }", "title": "" }, { "docid": "78b464f35bdd460603711e0c3500233d", "score": "0.8326805", "text": "static function GetRandString($length)\n\t\t{\n\t\t\t$str = \"\" ;\n\t\t\t\n\t\t\tfor($index = 0; $index < $length; $index++)\n\t\t\t{\n\t\t\t\t$str .= chr(rand(33,255)) ;\n\t\t\t}\n\t\t\t\n\t\t\treturn $str ;\n\t\t}", "title": "" }, { "docid": "f815fae68afb28923032edb05cd451c7", "score": "0.83225405", "text": "public static function string( $length ) {\n\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\t\n $str = '';\n\t$size = strlen( $chars );\n\tfor( $i = 0; $i < $length; $i++ ) {\n\t\t$str .= $chars[ rand( 0, $size - 1 ) ];\n\t}\n\n\treturn $str;\n }", "title": "" }, { "docid": "3faf2c500be1dee343d5211003ac3aff", "score": "0.8319845", "text": "private function generateString($length)\r\n {\r\n\r\n $alphabet=\"qazxswedcvfrtgbnhyujmklpoi0987654321\";\r\n $ris='';\r\n\r\n for ($i=0; $i < $length; $i++) {\r\n srand($this->makeSeed());\r\n $ris .= $alphabet[rand(0,(strlen($alphabet)-1))];\r\n }\r\n\r\n return($ris);\r\n }", "title": "" }, { "docid": "cad8313239b9138880e66530f83f1156", "score": "0.8314846", "text": "public static function str_random($length = 16)\n\t{\n\t $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n\t return substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n\t}", "title": "" }, { "docid": "17986bc83c470708dc91467a53d97b1b", "score": "0.82964295", "text": "public static function rand_string($length) {\n\n $chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n return substr(str_shuffle($chars), 0, $length);\n\n }", "title": "" }, { "docid": "010bbc2094b64911376bfc208ce6a399", "score": "0.8294267", "text": "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "253f6008cc6e1bd031f25af51b752a20", "score": "0.82920384", "text": "public static function randomString($length)\n\t{\n\t\t$chars = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n\t\tmt_srand((double)microtime() * 1000000);\n\t\t$string = NULL;\n\t\twhile (strlen($string) < $length) {\n\t\t\t$string .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "1a3676bf1b476020bce5cf47d6d74ddc", "score": "0.82890165", "text": "public static function string ($length = 10) {\n\t\t$randstr = \"\";\n\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$randnum = mt_rand(0,61);\n\n\t\t\tif($randnum < 10) {\n\t\t\t\t$randstr .= chr($randnum+48);\n\n\t\t\t} else if($randnum < 36) {\n\t\t\t\t$randstr .= chr($randnum+55);\n\n\t\t\t} else {\n\t\t\t\t$randstr .= chr($randnum+61);\n\n\t\t\t}\n\t\t}\n\n\t\treturn $randstr;\n\t}", "title": "" }, { "docid": "667195e1e466b7f886dd8be6e3fc5daa", "score": "0.8282477", "text": "private function generateRandomString($length = 16)\n {\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "cf2aa34e9d2d42354c9e55018a8ad1fe", "score": "0.82811254", "text": "public static function randString($length=32) {\r\n\t\treturn substr(sha1(uniqid(rand(),true)), 0, $length);\r\n\t}", "title": "" }, { "docid": "8417229b81631327e8acf65dcf141dee", "score": "0.82805395", "text": "function generateRandomString($length = 10) {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$characterLength = strlen($characters);\n\t\t$randomString = '';\n\n\t\tfor($i = 0; $i < $length; $i++) {\n\t\t\t$randomString .= $characters[rand(0, $characterLength - 1)];\n\t\t}\n\t\treturn $randomString;\n\t}", "title": "" }, { "docid": "1dc2f81bc20f3b37bdba403ba21e6f59", "score": "0.8260515", "text": "function str_generate($length, $chars)\n {\n return substr(str_shuffle(str_repeat($chars, $length)), 0, $length);\n }", "title": "" }, { "docid": "47ccb7db1467179614c5942781720637", "score": "0.8259395", "text": "function generateRandStr($length){\r\n \t\t$randstr = \"\";\r\n \t\tfor($i=0; $i<$length; $i++){\r\n \t\t$randnum = mt_rand(0,61);\r\n\t\t\t\tif($randnum < 10){\r\n \t\t$randstr .= chr($randnum+48);\r\n \t\t}else if($randnum < 36){\r\n \t\t$randstr .= chr($randnum+55);\r\n \t\t}else{\r\n \t\t$randstr .= chr($randnum+61);\r\n \t\t}\r\n \t\t}\r\n \t\treturn $randstr;\r\n \t\t}", "title": "" }, { "docid": "6b655a488a862c2f6ef457bd755a1fdb", "score": "0.8256808", "text": "public function randomString($length = 12) {\r\n\t\t$str = \"\";\r\n\t\t$characters = array_merge(range('A','Z'), range('a','z'), range('0','9'));\r\n\t\t$max = count($characters) - 1;\r\n\t\tfor ($i = 0; $i < $length; $i++) {\r\n\t\t\t$rand = mt_rand(0, $max);\r\n\t\t\t$str .= $characters[$rand];\r\n\t\t}\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "e1637d981f0232915e694d1e6056ca76", "score": "0.8246319", "text": "public static function generateRandomString($length = 6) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "1454ca0b09fb7c807a4aee99e374ea8e", "score": "0.82440966", "text": "function generateRandomString($length = 10) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $charactersLength = strlen($characters);\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, $charactersLength - 1)];\r\n }\r\n return $randomString;\r\n }", "title": "" }, { "docid": "ac38284681f19a1930c2df950b4b4f56", "score": "0.8238118", "text": "function randomString($length = 1) {\n $str = \"\";\n $characters = array_merge(range('A','Z'), range('a','z') );\n $max = count($characters) - 1;\n for ($i = 0; $i < $length; $i++) {\n $rand = mt_rand(0, $max);\n $str .= $characters[$rand];\n }\n return $str;\n }", "title": "" }, { "docid": "19e98d2b31355a417dbda1b206d6b7c8", "score": "0.8235156", "text": "function generateRandomString($length) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n //cuenta la cantidad de caracteres\n $charactersLength = strlen($characters);\n //inicial random string\n $randomString = '';\n //ciclo que arma el codigo random\n for ($i = 0; $i < $length; $i++) {\n //concatenando al azar un caracter de todas las opciones\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n //devolviendo el codigo random\n return $randomString;\n }", "title": "" }, { "docid": "e75e93761ce0db90e256a1bfdca81d4f", "score": "0.823425", "text": "private function generateRandomString($length)\n {\n return bin2hex(openssl_random_pseudo_bytes($length));\n }", "title": "" }, { "docid": "93d0fd8b67a6107e6cafc4cee223daba", "score": "0.82284915", "text": "function randomString($length = 8)\n {\n srand((double) microtime(true) * 1000000);\n \n $chars = array(\n 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'p',\n 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5',\n '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\n 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n '1', '2', '3', '4', '5', '6', '7', '8', '9');\n \n $randstr = null;\n\n for ($rand = 0; $rand <= $length; $rand++) {\n $random = rand(0, count($chars) - 1);\n $randstr .= $chars[$random];\n }\n\n return $randstr;\n }", "title": "" }, { "docid": "2ad4c54ea424607a843d445a47a93e90", "score": "0.82258207", "text": "public static function generate($length = 8){\n\t\t\t$chars = \"abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?1234567890\";\n\t\t\treturn substr(str_shuffle($chars), 0, $length);\n\t\t}", "title": "" }, { "docid": "4aa21c3f3cecba02dd92c676d23bed96", "score": "0.82248646", "text": "private function random($length = 16)\n {\n $string = '';\n while (($len = strlen($string)) < $length) {\n $size = $length - $len;\n // $bytes = random_bytes($size);\n $bytes = bin2hex(openssl_random_pseudo_bytes(32));\n $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);\n }\n return $string;\n }", "title": "" }, { "docid": "03ed24aaaa64ecab1fe924d9d7d98e1c", "score": "0.8223374", "text": "function generateRandomString($length) {\n //$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "0abec07300244d9f1ecd3f14c2369418", "score": "0.8218092", "text": "public function get_rand_str($length = '5') {\n\t\treturn substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $length);\n\t}", "title": "" }, { "docid": "aca21ec32c196ee72ee1f6200511bf08", "score": "0.8215269", "text": "function wpbm_generate_random_string( $length ){\n $string = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $random_string = '';\n for ( $i = 1; $i <= $length; $i ++ ) {\n $random_string .= $string[ rand( 0, 61 ) ];\n }\n return $random_string;\n }", "title": "" }, { "docid": "9f632c1b0f565130543bf9d5be18c7fa", "score": "0.82089126", "text": "protected static function randomString($length = 12)\n {\n return substr(str_shuffle('23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'), 0, max($length, 3));\n }", "title": "" }, { "docid": "70358b03285ae48e928d71f4df29b7fa", "score": "0.82076716", "text": "public function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "9556bab4ebb0cea3b0996ef5ecde4090", "score": "0.819428", "text": "public function genRandString($length = 0) {\n\n $charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\n $str = '';\n\n $count = strlen($charset);\n\n while ($length-- > 0) {\n\n $str .= $charset[mt_rand(0, $count - 1)];\n\n }\n\n return $str;\n\n }", "title": "" }, { "docid": "3527b564c7dc5ce9809359011575ec2b", "score": "0.8181407", "text": "public function generateRandomString($length = 5) {\n return substr(\n str_shuffle(\n str_repeat(\n $x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', \n ceil($length/strlen($x)) \n )\n ), 1 , $length);\n }", "title": "" }, { "docid": "b806ba9b090068d093883192b2d91254", "score": "0.8178568", "text": "public function randomString($length = 6)\n {\n $str = \"\";\n $characters = array_merge(range('A', 'Z'));\n // $characters = array_merge(range('A','Z'), range('a','z'), range('0','9'));\n $max = count($characters) - 1;\n for ($i = 0; $i < $length; $i++) {\n $rand = mt_rand(0, $max);\n $str .= $characters[$rand];\n }\n return $str;\n }", "title": "" }, { "docid": "f661e752a1338bb246548aa3992e29ac", "score": "0.81726134", "text": "function get_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "e5322e431ef91a51735c11d757b38155", "score": "0.81722486", "text": "public function randomString($length = 10)\n {\n $str = \"\";\n $characters = array_merge(range('A','Z'), range('a','z'), range('0','9'));\n $max = count($characters) - 1;\n for ($i = 0; $i < $length; $i++)\n {\n $rand = mt_rand(0, $max);\n $str .= $characters[$rand];\n }\n return $str;\n }", "title": "" }, { "docid": "5dfc4be83f4babae82d86ce886638f81", "score": "0.8171944", "text": "public static function generate($length=64)\n {\n if($length<self::$min_length) throw new \\Exception(sprintf(\"Error: the random string must be at least %s characters\", self::$min_length), 1);\n \n $characters_array = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9));\n $characters_length = count($characters_array);\n $random_string = '';\n for ($i = 0; $i < $length; $i++)\n {\n $random_string .= $characters_array[mt_rand(0, $characters_length-1)];\n }\n return $random_string;\n }", "title": "" }, { "docid": "934645539f49acd6bc199bf8c23122f9", "score": "0.81696147", "text": "public function generate(int $length): string;", "title": "" }, { "docid": "b57bc0b6b2c764185d39979052f0920f", "score": "0.81682754", "text": "private function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "8530c49ecc4583e8c7b8dd2fe13502ec", "score": "0.8167798", "text": "function generateRandomString($length = 15) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n \t for ($i = 0; $i < $length; $i++) {\n \t $randomString .= $characters[rand(0, strlen($characters) - 1)];\n \t }\n \t\t return $randomString;\n\t\t }", "title": "" }, { "docid": "f296fb79cae224b0a22dbd12caa2436e", "score": "0.8165103", "text": "private function generateRandomString($length) {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $randomString;\n }", "title": "" }, { "docid": "ec1652fe2046357b20156c7d59cc2bb5", "score": "0.81608725", "text": "function generateRandomString($length = 10)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i ++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "d9abac9d618eefa642991dfb0bd287e2", "score": "0.81534666", "text": "function generateRandomString($length = 8) {\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $randomString = '';\r\n for ($i = 0; $i < $length; $i++) {\r\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\r\n }\r\n return $randomString;\r\n}", "title": "" }, { "docid": "40a4bbb582c642393da9d35487acbd10", "score": "0.8152558", "text": "function getRandomString($length) {\n\t$validCharacters = \"123456789abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ\";\n\t$validCharNumber = strlen($validCharacters);\n\t$result = \"\";\n\t\n\tfor ($i = 0; $i < $length; $i++) {\n\t\t$index = mt_rand(0, $validCharNumber - 1);\n\t\t$result .= $validCharacters[$index];\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "68dbd54150513f41565946221454a1de", "score": "0.8145359", "text": "static function random(int $length = 16): string {\n $string = '';\n while (($len = \\strlen($string)) < $length) {\n /** @var positive-int $size */\n $size = $length - $len;\n $bytes = random_bytes($size);\n $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size);\n }\n\n return $string;\n }", "title": "" }, { "docid": "4337e7c3cadf8cc88888e6d1b5714b1d", "score": "0.8139797", "text": "function getRandStr($length) {\r\n $str = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n $randString = '';\r\n $len = strlen($str)-1;\r\n for($i = 0;$i < $length;$i ++){\r\n $num = mt_rand(0, $len);\r\n $randString .= $str[$num];\r\n }\r\n return $randString ;\r\n}", "title": "" }, { "docid": "d9350247810a16e54aa9a71d624eb687", "score": "0.8137082", "text": "public static function stringRandom($length = 32)\n {\n return bin2hex(random_bytes($length / 2));\n }", "title": "" }, { "docid": "6fd990f1d5a6dcbf5ce924b7c4b79995", "score": "0.81276125", "text": "private function generateRandomString($length = 10)\n {\n $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n $charactersLength = strlen($characters);\n\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n\n return $randomString;\n }", "title": "" }, { "docid": "5a6f5d739e29e690ee19563f3dfe144e", "score": "0.8127105", "text": "private function generateRandomString(int $length = 10): string\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "a7c61bd4d62c7ff4727555dbe7b964f2", "score": "0.8124896", "text": "function genRandomString() {\n //credits: http://bit.ly/a9rDYd\n $length = 50;\n $characters = \"0123456789abcdef\"; \n for ($p = 0; $p < $length ; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n\n return $string;\n }", "title": "" }, { "docid": "c307b632c72e4af6dc02af0330da9a67", "score": "0.8119464", "text": "protected function _generateRandomString($length) {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyz';\n\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $randomString;\n }", "title": "" }, { "docid": "359c621cf3636573e0b65bdf8bc2a052", "score": "0.81172436", "text": "function random_str($length){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "cbff35ffaea94c0c05e29faf005846c4", "score": "0.8115756", "text": "public static function generateSomewhatRandomString($length = 22)\n {\n $chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz\";\n srand((double) microtime() * 1000000);\n $i = 0;\n $somewhatRandom = '';\n\n while ($i < $length) {\n $num = rand() % 60;\n $tmp = substr($chars, $num, 1);\n $somewhatRandom = $somewhatRandom.$tmp;\n $i++;\n }\n\n return $somewhatRandom;\n }", "title": "" }, { "docid": "c281fc5228112038a2e3e54db2f65bcd", "score": "0.81099087", "text": "private function get_random_string( $length = 6) {\r\n\t\r\n\t\t$valid_characters = \"abcdefghijklmnopqrstuxyvwzABCDEFGHIJKLMNOPQRSTUXYVWZ\";\r\n\t\t$valid_char_number = strlen( $valid_characters);\r\n\t\r\n\t\t$result = \"\";\r\n\t\r\n\t\tfor ( $i = 0; $i < $length; $i++)\r\n\t\t{\r\n\t\t\t$index = mt_rand( 0, $valid_char_number - 1);\r\n\t\t\t$result .= $valid_characters[ $index];\r\n\t\t}\r\n\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "1fd327eef3ecb06b6468a40aadcc2d8f", "score": "0.81089777", "text": "public function gen_rand($length = 14) {\r\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\t\t$randomString = '';\r\n\t\tfor ($i = 0; $i < $length; $i++) {\r\n\t\t\t$randomString .= $characters[rand(0, strlen($characters) - 1)];\r\n\t\t}\r\n\t\treturn $randomString;\r\n\t}", "title": "" }, { "docid": "b4808e73dbb07fceec01162635ef0f33", "score": "0.81051946", "text": "function randomString($length = 6)\n{\n $str = '';\n $pattern = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ';\n for ($i = 0; $i < $length; $i++) {\n $str .= $pattern[mt_rand(0, strlen($pattern) - 1)];\n }\n return $str;\n}", "title": "" }, { "docid": "ff6817aff37019c241659af6a5907e33", "score": "0.81004", "text": "public function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "278a24157172dfe0369bdd57eb6589d3", "score": "0.8100213", "text": "function generateRandomString($length = 32) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "5171b3107780d4a25c0984e180660fef", "score": "0.809969", "text": "function randomStringGen($length)\n {\n /* this are the letters who can be used randomly : */ \n $lettering = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $lengthMax = strlen($lettering);\n $randomString = '';\n /* A for loop to catch the letters from $lettering */\n for ($i = 0; $i < $length; $i++)\n {\n $randomString .= $lettering[rand(0, $lengthMax - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "5bd127227924699bc9d4844e084869a0", "score": "0.80965275", "text": "public static function randomString($length = 40)\n {\n assert('is_integer($length)');\n assert('$length > 0');\n $alphachars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX';\n $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n $string = $alphachars[mt_rand(0, strlen($alphachars) - 1)];\n $len = strlen($chars) - 1;\n for($i = 0; $i < ($length-1); $i++) $string .= $chars[mt_rand(0, $len)];\n return $string;\n }", "title": "" }, { "docid": "09215ed76631bf5e25669e8fab297264", "score": "0.8091159", "text": "private function get_random_string($length = 10)\n\t{\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$string = '';\n\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$string .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "12fe19d1d3a8d5904a3e2e432e72f2f4", "score": "0.8090753", "text": "public static function randomString(int $length): string\n {\n try {\n $rand = bin2hex(random_bytes($length));\n // bytes_length = length * 2\n $rand = substr($rand, 0, $length);\n } catch (\\Exception $ce) {\n $rand = Str::randomLatinNumeric($length);\n }\n\n return $rand;\n }", "title": "" }, { "docid": "f1886d6183af146ab2b4e65762bd94d7", "score": "0.8090343", "text": "function generateRandomString($length = 8)\n{\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "493b7e83bbeb6888c6f3b336eb9fbf6d", "score": "0.8087689", "text": "public function get_rand_str($length = 6) {\n\t\treturn substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, $length);\n\t}", "title": "" }, { "docid": "ce119f6abc26646c097431133799e33f", "score": "0.8086452", "text": "function generateRandomString($length = 6)\r\r\n{\r\r\n return substr(str_shuffle(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") , 0, $length);\r\r\n}", "title": "" }, { "docid": "15761e0bbfdf20d7c40b38b4d8e01c13", "score": "0.80846286", "text": "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "15761e0bbfdf20d7c40b38b4d8e01c13", "score": "0.80846286", "text": "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "15761e0bbfdf20d7c40b38b4d8e01c13", "score": "0.80846286", "text": "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "15761e0bbfdf20d7c40b38b4d8e01c13", "score": "0.80846286", "text": "function generateRandomString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "6579201e17b3bf6f20b4a429b99e9134", "score": "0.80765986", "text": "private function generateRandomString($length = 10)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "8fe4fb9c3fced47f62ec96906a4221d9", "score": "0.8063054", "text": "function generate_random_string($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++) :\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n endfor;\n\n return $randomString;\n}", "title": "" }, { "docid": "d0692fc50aaa26a055b69801133ae14b", "score": "0.80602276", "text": "public static function RandomString($length = 10): string {\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$charactersLength = strlen($characters);\n\t\t$randomString = '';\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\n\t\t}\n\t\treturn $randomString;\n\t}", "title": "" }, { "docid": "9f25de6c3dad19e0cee64761ae041e86", "score": "0.80601346", "text": "public static function string($length)\n {\n return openssl_random_pseudo_bytes($length, $is_strong);\n }", "title": "" }, { "docid": "478d9d9372f7c9a0d5fa97dc701951c7", "score": "0.80598617", "text": "public static function getRandomString($_length)\n {\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n \n $randomString = '';;\n for ($i=0; $i<(int)$_length; $i++) {\n $randomString .= $chars[mt_rand(1, strlen($chars)) -1];\n }\n \n return $randomString;\n }", "title": "" }, { "docid": "6218c8454c9136e56577e882edd70b4f", "score": "0.8059228", "text": "public function randomString($length = 8)\n {\n $values = array_merge(range(65, 90), range(97, 122), range(48, 57));\n $max = count($values) - 1;\n $str = chr(mt_rand(97, 122));\n for ($i = 1; $i < $length; $i++) {\n $str .= chr($values[mt_rand(0, $max)]);\n }\n return $str;\n }", "title": "" }, { "docid": "8a49e064fbabb264d63fd2194a6eaeb6", "score": "0.8057487", "text": "public static function generateRandomString($length = 6)\n {\n return bin2hex(openssl_random_pseudo_bytes($length));\n }", "title": "" }, { "docid": "547d1e157131a35311b433289bf89f49", "score": "0.8055382", "text": "public function generateRandomString($length = 10) : string {\n // Source\n // https://stackoverflow.com/questions/4356289/php-random-string-generator\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "c9fe78b6f8c638a2a6f4da2d5b756936", "score": "0.8052122", "text": "function generate_random_string($name_length = 8) {\n $alpha_numeric = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n return substr(str_shuffle($alpha_numeric), 0, $name_length);\n }", "title": "" }, { "docid": "020fcfe3ced70dd38dcb9e48c67fc479", "score": "0.8038031", "text": "private function generateRandomString($length = 10)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n\n for ($i = 0; $i < $length; $i++)\n {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n\n return $randomString;\n }", "title": "" }, { "docid": "3b7af04d38e12430d683f270dad457f1", "score": "0.80333835", "text": "function generate_random_string($name_length = 8) \n\t{\n\t\t$alpha_numeric = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\treturn substr(str_shuffle($alpha_numeric), 0, $name_length);\n\t}", "title": "" }, { "docid": "09932d583e017bfe676e7f29dd1c0a13", "score": "0.80292296", "text": "function randString($length = 5)\n{\n $str='';\n $cha = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n\n for($x=0; $x<$length; $x++)\n $str .= $cha[mt_rand(0,strlen($cha))];\n return $str;\n}", "title": "" }, { "docid": "75285efac00bdebd07f3d41a23058624", "score": "0.80270684", "text": "private function generate($length)\n {\n $rand = '';\n for ($index = 1; $index < $length; $index++) {\n $rand .= Rand::getInteger(0, 9);\n }\n\n return $rand;\n }", "title": "" }, { "docid": "013b853d86282da317f0a1435e3046c9", "score": "0.80261636", "text": "function random_strings($length_of_string) {\n // of specified length \n return substr(md5(time()), 0, $length_of_string);\n }", "title": "" }, { "docid": "a80ed93e2c8ed6c447bb7417d6fba4fa", "score": "0.8022361", "text": "public static function getRandomString($length = 16) {\r\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\t\t$charactersLength = strlen($characters);\r\n\t\t$randomString = '';\r\n\t\tfor ($i = 0; $i < rand(4,$length); $i++) {\r\n\t\t\t$randomString .= $characters[rand(0, $charactersLength - 1)];\r\n\t\t}\r\n\t\treturn $randomString;\r\n\t}", "title": "" } ]
bd588f7e91a2d5e3a35f6601de78692c
metodo auxiliar para el balance de comprobacion
[ { "docid": "7ddad8ac6310763f0189a7f43a9888cf", "score": "0.0", "text": "public function cuenta_otro_balance_comp(Request $request){\n $fecha = $request->fecha;\n return redirect()->route('balanceComprobacion', $fecha);\n }", "title": "" } ]
[ { "docid": "65a95f75bde21018451c741b918c4dc8", "score": "0.76704526", "text": "public function balancear() \n\t{\n\t\t// OBTENGO CUANTO TENGO ACUMULADO\n\t\t$acumulado = $this->acumulado();\n\t\t// TRAIGO TODOS LOS PAGOS DEL TRATAMIENTO\n\t\t$this->get_payments();\n\n\t\tforeach ($this->payments as $Payment) {\n\n\t\t\t$Payment->acumulado = $acumulado;\n\n\t\t\t$Payment->balance = $this->presupuesto - $Payment->acumulado;\n\n\t\t\t$acumulado -= $Payment->monto;\n\n\t\t\t$Payment->update();\n\t\t}\n\t}", "title": "" }, { "docid": "817ffef35f0a746869ff74644f5c4bdb", "score": "0.72912663", "text": "public function balance() : int;", "title": "" }, { "docid": "ea6b0349ea272f2d4b8233b321426d2d", "score": "0.7193325", "text": "public function calculateBalance(): void\n {\n $this->balance = 0;\n\n foreach ($this->withdrawals as $withdrawal) {\n $this->balance = $this->balance - $withdrawal;\n }\n\n foreach ($this->deposits as $deposit) {\n $this->balance = $this->balance + $deposit;\n }\n }", "title": "" }, { "docid": "7153132cba38c8f0bad4f96e7c70a49d", "score": "0.70375717", "text": "public function get_nbl_balance(){\n\t\t\n\t}", "title": "" }, { "docid": "65d304ba69c3d5d497b1f6e531509730", "score": "0.69492096", "text": "private function _updateBalance()\n\t{\n\t\t$id = $this->_data['id'];\n\n\t\t$sql = 'update workorder set ';\n\t\t$sql.= 'bill_amount = (';\n\t\t\t$sql.= \"select sum(a_quantity * a_rate) from workorder_item \";\n\t\t\t$sql.= \" where workorder_id=$id and status = 'Billed' ) \";\n\t\t$sql.= ',';\n\t\t$sql.= 'open_amount = (';\n\t\t\t$sql.= 'select sum(a_quantity * a_rate) from workorder_item ';\n\t\t\t$sql.= \" where workorder_id = $id and status in ('Active','Complete') \";\n\t\t$sql.= \") where id=$id\";\n\t\tSQL::query($sql);\n\n\t\t$this->bill_amount = SQL::fetch_one(\"SELECT bill_amount FROM workorder WHERE id = $id\");\n\t\t$this->open_amount = SQL::fetch_one(\"SELECT open_amount FROM workorder WHERE id = $id\");\n\t}", "title": "" }, { "docid": "c7e4fca82c085a4aa112bb720777666a", "score": "0.6728923", "text": "public function calculateBalance($account);", "title": "" }, { "docid": "fee05fe19cefa2d6031d82e19666e0aa", "score": "0.6677906", "text": "public function balance()\n {\n $balance = 0;\n foreach ((array)$this->debts as $debt) {\n $balance+=$debt->balance;\n }\n return $balance;\n }", "title": "" }, { "docid": "d8bc7339feed3c5f1ae796d2ce8f1602", "score": "0.66703486", "text": "private function update_account_balance () : bool {\n\n $action = ($this->update_record($this->users_table_name , \"account_balance\" , $this->newAccountBalance , 'user_id' , $this->userID)) ? $this->executeSQL(\"UPDATE {$this->stats_table_name} SET total_amount_funded = total_amount_funded + {$this->amount}\") : false;\n return $this->executeSQL(\"UPDATE {$this->stats_table_name} SET account_balance = account_balance + {$this->amount}\");\n\n }", "title": "" }, { "docid": "72228371ebdb636857748e54a2858b70", "score": "0.6636116", "text": "public function balanceBooks(){\r\n $con= Core::getInstance();\r\n // check if time is 4:30pm and date is last day of month\r\n if(date('M j Y g:i A', strtotime('$period'))){\r\n try{\r\n $con->dbh->beginTransaction();\r\n $input=$con->prepare(\"SELECT SUM(DEBIT) AS debit, SUM(CREDIT) as credit FROM tbl_general_ledger_transactions WHERE MONTH(TRANS_DATE) = MONTH('$period')\" );\r\n $input->execute();\r\n \r\n $result = $input->fetchAll();\r\n foreach($result as $output)\r\n { \r\n //if the balance is a debit balance\r\n echo $difference= $output['debit'] - $output['credit']; \r\n if($output['debit']>$output['credit']){\r\n \r\n $query = \"INSERT INTO `tbl_general_ledger_transactions` ( `CHEQUE_NUMBER`, `TRANS_DATE`, `PERIOD`, `ACCOUNT`, `NARRATIVE`, `DEBIT`, `CREDIT`, `TAG`, `ACTOR`) VALUES ('$source', '$cheque','$date','$period', '$ledger', 'Balance b/f', '$difference', '0.000', '', '')\";\r\n\r\n $stmt = $con->prepare( $query );\r\n\r\n $stmt->execute();\r\n }\r\n //else then is a credit balance\r\n else{\r\n $difference= $output['debit'] - $output['credit']; \r\n $query = \"INSERT INTO `tbl_general_ledger_transactions` ( `CHEQUE_NUMBER`, `TRANS_DATE`, `PERIOD`, `ACCOUNT`, `NARRATIVE`, `DEBIT`, `CREDIT`, `TAG`, `ACTOR`) VALUES ('$source', '$cheque','$date','$period', '$ledger', 'Balance b/f', '0.000', '$difference', '', '')\";\r\n\r\n $stmt = $con->prepare( $query );\r\n\r\n $stmt->execute();\r\n }\r\n \r\n }\r\n \r\n }\r\n catch(Exception $message){\r\n $con->dbh->rollBack();\r\n $message->getMessage();\r\n\r\n } \r\n }\r\n }", "title": "" }, { "docid": "fb8b0f65d29c4e3c15de540d869bb1b3", "score": "0.6568334", "text": "public function getWalletBalance()\n {\n }", "title": "" }, { "docid": "827da0487f0691ef0a7a53aa55b0d0ea", "score": "0.65620726", "text": "public function get_balance(){\n $url = $this->url.$this->version.'/'.$this->coin.'/get-balance';\n $res = $this->curl_call($url, $this->param);\n return $res;\n }", "title": "" }, { "docid": "971f78caa777f58e9a450cc1cbf2cbe5", "score": "0.65318865", "text": "public function getBalance($object);", "title": "" }, { "docid": "e381a86a55be6f24233c26998f15e859", "score": "0.65188134", "text": "public function credit_balance()\n {\n\t\t\t//credit balance\n\t\t\t$total_credit = $this->my_library->total_credit();\n\t\t\t\n\t\t\t//return balance\n\t\t\treturn $total_balance;\n }", "title": "" }, { "docid": "41f0cfd642713c7444e0464f53ce9a0a", "score": "0.64793307", "text": "public function get_balance()\n {\n return $this->account['balance'];\n }", "title": "" }, { "docid": "6ffd3d58d57f35f479cde4d2e5d7a5a5", "score": "0.64722496", "text": "Public Function CalcBalance()\n\t{\n\t\t// <!-- ifdef __SelfHosted__ -->\n\t\t\n\t\tif (Zend_Registry::get('Application/Mode') != 'SelfHosted')\n\t\t{\n\t\t\t$Credit = $this->CalcCredit();\n\t\t\t$Usage = $this->CalcUsage();\n\n\t\t\t$this->Balance = $Credit - $Usage;\n\t\t}\n\t\t\n\t\t// <!-- endif __SelfHosted__ -->\n\t\t\n\t\tif (Zend_Registry::get('Application/Mode') == 'SelfHosted')\n\t\t{\n\t\t\t$this->Balance = 99999;\n\t\t\treturn 99999;\n\t\t}\n\t}", "title": "" }, { "docid": "f6a277020cd3f11dca24fcbceeb4e4db", "score": "0.63951325", "text": "public function getAvailableBalance($user_id){\n $debit = StoreTransaction::where('user_id',$user_id)->where('transaction_type','debit')->sum('amount');\n $credit = StoreTransaction::where('user_id',$user_id)->where('transaction_type','credit')->sum('amount');\n $balance = $credit - $debit;\n return $balance;\n }", "title": "" }, { "docid": "bdb517d84daa56dacfa3ba717fda4efe", "score": "0.6370797", "text": "public function balance()\n {\n return isset($this->data[__FUNCTION__]) ? $this->data[__FUNCTION__] : 0;\n }", "title": "" }, { "docid": "57eac719d37ae31182397c505f81993a", "score": "0.6369564", "text": "public function getBalance($account_id) {\n $this->debug->append(\"STA \" . __METHOD__, 4);\n $stmt = $this->mysqli->prepare(\"\n SELECT\n IFNULL(ROUND((\n SUM( IF( ( t.type IN ('Credit','Bonus') AND b.confirmations >= ? ) OR t.type = 'Credit_PPS', t.amount, 0 ) ) -\n SUM( IF( t.type IN ('Debit_MP', 'Debit_AP'), t.amount, 0 ) ) -\n SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) )\n ), 8), 0) AS confirmed,\n IFNULL(ROUND((\n SUM( IF( ( t.type IN ('Convertible') AND b.confirmations >= ? ), t.amount, 0 ) ) -\n SUM( IF( t.type IN ('Convertible_Transfer'), t.amount, 0 ) ) -\n SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) )\n ), 8), 0) AS convertible,\n IFNULL(ROUND((\n SUM( IF( t.type IN ('Credit','Bonus') AND b.confirmations < ? AND b.confirmations >= 0, t.amount, 0 ) ) -\n SUM( IF( t.type IN ('Donation','Fee') AND b.confirmations < ? AND b.confirmations >= 0, t.amount, 0 ) )\n ), 8), 0) AS unconfirmed,\n IFNULL(ROUND((\n SUM( IF( t.type IN ('Credit','Bonus') AND b.confirmations = -1, t.amount, 0) ) -\n SUM( IF( t.type IN ('Donation','Fee') AND b.confirmations = -1, t.amount, 0) )\n ), 8), 0) AS orphaned\n FROM $this->table AS t\n LEFT JOIN \" . $this->block->getTableName() . \" AS b\n ON t.block_id = b.id\n WHERE t.account_id = ?\n AND archived = 0\n \");\n if ($this->checkStmt($stmt) && $stmt->bind_param(\"iiiiiii\", $this->config['confirmations'], $this->config['confirmations'], $this->config['confirmations'], $this->config['confirmations'], $this->config['confirmations'], $this->config['confirmations'], $account_id) && $stmt->execute() && $result = $stmt->get_result())\n return $result->fetch_assoc();\n return $this->sqlError();\n }", "title": "" }, { "docid": "8491d3fa2970bea130ccde21171b3a9a", "score": "0.63599867", "text": "public function outlet_balance()\n {\n // return ($bal);\n // $test = {\"data\":{\"transactionNumber\":\"PagIbig-13201508-000005\",\"referenceNumber\":\"14\",\"dateEntry\":\"2015-08-11T17:12:40.687\"};\n // dd({\"responseCode\":100,\"remarks\":\"REQUESTACCEPTED\",\"data\":{\"transactionNumber\":\"PagIbig-13201508-000005\",\"referenceNumber\":\"14\",\"dateEntry\":\"2015-08-11T17:12:40.687\"}});\n // dd($test);\n // {\"responseCode\":100,\"remarks\":\"REQUESTACCEPTED\",\"data\":{\"transactionNumber\":\"PagIbig-13201508-000003\",\"referenceNumber\":\"12\",\"dateEntry\":\"2015-08-11T16:33:46.583\"}}\n }", "title": "" }, { "docid": "24c7c4176f9bc3d61b71c07f6b2f266c", "score": "0.63507354", "text": "public function getLockedBalance() {\n $this->debug->append(\"STA \" . __METHOD__, 4);\n $stmt = $this->mysqli->prepare(\"\n SELECT\n ROUND((\n SUM( IF( ( t.type IN ('Credit','Bonus') AND b.confirmations >= ? ) OR t.type = 'Credit_PPS', t.amount, 0 ) ) -\n SUM( IF( t.type IN ('Debit_MP', 'Debit_AP'), t.amount, 0 ) ) -\n SUM( IF( ( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR ( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') ), t.amount, 0 ) )\n ), 8) AS balance\n FROM $this->table AS t\n LEFT JOIN \" . $this->block->getTableName() . \" AS b\n ON t.block_id = b.id\n WHERE archived = 0\");\n if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $this->config['confirmations'], $this->config['confirmations']) && $stmt->execute() && $stmt->bind_result($dBalance) && $stmt->fetch())\n return $dBalance;\n return $this->sqlError();\n }", "title": "" }, { "docid": "8a77eb73114091fb9f1702dfe59ecc8a", "score": "0.63351077", "text": "public function get_card_balance()\n\t {\n\t\t$card_ubc \t\t\t= $this->input->post('gcubn');\n\t\t$gift_card_credit \t= $this->gift_cards_model->get_card_data($card_ubc); \n\t\t$gift_card_debit\t= $this->gift_cards_model->giftcard_debits($card_ubc);\n\t\t$gift_card_amount\t= $gift_card_credit->GIFT_CARD_AMOUNT - $gift_card_debit;\n\t\t\n\t\techo $gift_card_amount;\n\t }", "title": "" }, { "docid": "7459b57ae26102a19512d3965bc492d5", "score": "0.6332522", "text": "public function getBalance()\n {\n return $this->balance;\n }", "title": "" }, { "docid": "7459b57ae26102a19512d3965bc492d5", "score": "0.6332522", "text": "public function getBalance()\n {\n return $this->balance;\n }", "title": "" }, { "docid": "7459b57ae26102a19512d3965bc492d5", "score": "0.6332522", "text": "public function getBalance()\n {\n return $this->balance;\n }", "title": "" }, { "docid": "7459b57ae26102a19512d3965bc492d5", "score": "0.6332522", "text": "public function getBalance()\n {\n return $this->balance;\n }", "title": "" }, { "docid": "0e85f42b020880a78a2ee59b566ec1b3", "score": "0.6312278", "text": "private function _calculateCommission() {\n $this->commission = $this->amount * Yii::$app->params['commission'];\n }", "title": "" }, { "docid": "84065cedc8cf93afd97dfee523746ffa", "score": "0.6312179", "text": "public function get_balance() {\n\t\t\t// https://api.stripe.com/v1/balance\n\t\t\treturn $this->run( 'balance' );\n\t\t}", "title": "" }, { "docid": "09ca582caa46eef4fede97ee0392bdf0", "score": "0.62889856", "text": "function invoiceBalance($id)\r\n{\r\n $DB = new database;\r\n $DB2 = new database;\r\n $DB->Select('item', 'SUM(price * quantity) as balance', 'invoice_id = ' . $id);\r\n $price = $DB->Select_Result[0]['balance'];\r\n $DB2->Select('invoice', 'vat,discount', 'id = ' . $id);\r\n $vat = $DB2->Select_Result[0]['vat'];\r\n $discount = $DB2->Select_Result[0]['discount'];\r\n if ($price) {\r\n $afterDiscount = $price - ($price / 100 * $discount);\r\n return (int)($afterDiscount + ($afterDiscount / 100 * $vat));\r\n } else {\r\n return 0;\r\n }\r\n}", "title": "" }, { "docid": "3b433d99d3638651b48c92d364c02cb7", "score": "0.6286546", "text": "public function getBalance()\n {\n $balance = 0;\n\n foreach ($this->transactions as $transaction){\n switch($transaction->type){\n case 'charge':\n $balance += $transaction->amount;\n break;\n case 'payment':\n case 'credit':\n $balance -= $transaction->amount;\n break;\n }\n }\n\n return $balance;\n }", "title": "" }, { "docid": "6c1e8dcb597692642141cc72b39df7af", "score": "0.62604475", "text": "public function getAcccountBalances(){\n\n }", "title": "" }, { "docid": "440534263e36742a93ee607a256cc37c", "score": "0.62598825", "text": "public function getBalance($login)\n {\n }", "title": "" }, { "docid": "521b8ef025e12577b6609916763fb0bf", "score": "0.6256754", "text": "public function getBalance()\n {\n return $this->getValue('balance');\n }", "title": "" }, { "docid": "feea5e7342e4e598236a6861caba0a8e", "score": "0.625441", "text": "function uf_balance_general($ad_fecfin,$ai_nivel)\r\n\t{\r\n\t\t$lb_valido=true;\r\n\t\t$ds_Balance2=new class_datastore();\r\n\t\t$ldec_resultado=0;\r\n\t\t$ld_saldo_ganancia=0;\r\n\t\t$this->ls_activo=trim($this->la_empresa[\"activo\"]);\r\n\t\t$this->ls_pasivo=trim($this->la_empresa[\"pasivo\"]);\r\n\t\t$this->ls_resultado=trim($this->la_empresa[\"resultado\"]);\r\n\t\t$this->ls_capital=trim($this->la_empresa[\"capital\"]);\r\n\t\t$this->ls_orden_d=trim($this->la_empresa[\"orden_d\"]);\r\n\t\t$this->ls_orden_h=trim($this->la_empresa[\"orden_h\"]);\r\n\t\t$this->ls_ingreso=trim($this->la_empresa[\"ingreso\"]);\r\n\t\t$this->ls_gastos =trim($this->la_empresa[\"gasto\"]);\r\n\t\t$this->ls_cta_resultado = trim($this->la_empresa[\"c_resultad\"]);\r\n\t\t$ad_fecfin=$this->io_fun->uf_convertirdatetobd($ad_fecfin);\r\n\t\t$ls_codemp=$this->la_empresa[\"codemp\"];\r\n\t\t$ls_sql=\" SELECT SC.sc_cuenta,SC.denominacion,SC.status,SC.nivel as rnivel, \".\r\n \" coalesce(curSaldo.T_Debe,0) as total_debe, \".\r\n \" coalesce(curSaldo.T_Haber,0) as total_haber,0 as nivel \".\r\n \" FROM scg_cuentas SC LEFT OUTER JOIN (SELECT codemp,sc_cuenta, coalesce(sum(debe_mes),0)as T_Debe, \".\r\n\t\t\t \" coalesce(sum(haber_mes),0) as T_Haber \".\r\n \" FROM scg_saldos \".\r\n \" WHERE codemp='\".$ls_codemp.\"' AND fecsal<='\".$ad_fecfin.\"' \".\r\n \" GROUP BY codemp,sc_cuenta) curSaldo \".\r\n \" ON SC.sc_cuenta=curSaldo.sc_cuenta \".\r\n \" WHERE SC.codemp=curSaldo.codemp AND curSaldo.codemp='\".$ls_codemp.\"' AND \".\r\n\t\t\t \" (SC.sc_cuenta like '\".$this->ls_activo.\"%' OR SC.sc_cuenta like '\".$this->ls_pasivo.\"%' OR \".\r\n\t\t\t \" SC.sc_cuenta like '\".$this->ls_capital.\"%' OR \".\r\n\t\t// QUITO FILTRAR LA CUENTA DE RESULTADO PORQUE PARA BARVIALSA ES LA CUENTA DE ORDEN\r\n\t\t//\t \" SC.sc_cuenta like '\".$this->ls_resultado.\"%' OR SC.sc_cuenta like '\".$this->ls_capital.\"%' OR \".\r\n\t\t//\t \" SC.sc_cuenta like '\".$this->ls_resultado.\"%' OR SC.sc_cuenta like '\".$this->ls_capital.\"%' OR \".\r\n\t\t\t \" SC.sc_cuenta like '\".$this->ls_orden_d.\"%' OR SC.sc_cuenta like '\".$this->ls_orden_h.\"%') \".\r\n \" ORDER BY SC.sc_cuenta \";\r\n//print $ls_sql;\r\n\t\t $rs_data=$this->io_sql->select($ls_sql);\r\n\t\t if($rs_data===false)\r\n\t\t {// error interno sql\r\n\t\t\t$this->is_msg_error=\"Error en consulta metodo uf_scg_reporte_balance_general \".$this->io_fun->uf_convertirmsg($this->io_sql->message);\r\n\t\t\tprint $this->io_sql->message;\r\n\t\t\t$lb_valido = false;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n $ld_saldo_ganancia=0;\r\n\t\t while($row=$this->io_sql->fetch_row($rs_data))\r\n\t\t {\r\n\t\t\t $ls_sc_cuenta=$row[\"sc_cuenta\"];\r\n\t\t\t $ls_denominacion=$row[\"denominacion\"];\r\n\t\t\t $ls_status=$row[\"status\"];\r\n\t\t\t $ls_rnivel=$row[\"rnivel\"];\r\n\t\t\t $ld_total_debe=$row[\"total_debe\"];\r\n\t\t\t $ld_total_haber=$row[\"total_haber\"];\r\n\t\t\t if($ls_status==\"C\")\r\n\t\t\t {\r\n\t\t\t\t$ls_nivel=\"4\";\t\t\r\n\t\t\t }//if\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t$ls_nivel=$ls_rnivel;\t\t\r\n\t\t\t }//else\r\n\t\t\t if($ls_nivel<=$ai_nivel)\r\n\t\t\t {\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"denominacion\",$ls_denominacion);\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"status\",$ls_status);\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"nivel\",$ls_nivel);\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"rnivel\",$ls_rnivel);\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"total_debe\",$ld_total_debe);\r\n\t\t\t\t $this->ds_Prebalance->insertRow(\"total_haber\",$ld_total_haber);\r\n\t\t\t\t $lb_valido = true;\r\n\t\t\t }//if\r\n\t\t\t}//while\r\n\t\t\t$li=$this->ds_Prebalance->getRowCount(\"sc_cuenta\");\r\n\t\t\tif($li==0)\r\n\t\t\t{\r\n\t\t\t $lb_valido = false;\r\n\t\t\t return false;\r\n\t\t\t}//if\r\n\t\t } //else\r\n\t\t $ld_saldo_i=0;\t\t\r\n\t\t\t\r\n\t\t if($lb_valido)\r\n\t\t {\r\n\t\t $lb_valido=$this->uf_scg_reporte_select_saldo_ingreso_BG($ad_fecfin,$this->ls_ingreso,$ld_saldo_i);\r\n\t\t } \r\n\t\t if($lb_valido)\r\n\t\t {\r\n\t\t $ld_saldo_g=0;\r\n\t\t $ld_saldo_orden=0;\r\n\t\t $lb_valido=$this->uf_scg_reporte_select_saldo_gasto_BG($ad_fecfin,$this->ls_gastos,$ld_saldo_g);\r\n \t\t $lb_valido=$this->uf_scg_reporte_select_saldo_gasto_BG($ad_fecfin,$this->ls_resultado,$ld_saldo_orden);\r\n\t\t }//if\r\n\t\t if($lb_valido)\r\n\t\t {\r\n\t\t $ld_saldo_ganancia=$ld_saldo_ganancia+($ld_saldo_i+$ld_saldo_g)+($ld_saldo_orden);\r\n\t\t }//if\r\n\t\t $la_sc_cuenta=array();\r\n\t\t $la_denominacion=array();\r\n\t\t $la_saldo=array();\r\n\t\t for($i=1;$i<=$ai_nivel;$i++)\r\n\t\t {\r\n\t\t\t $la_sc_cuenta[$i]=\"\";\r\n\t\t\t $la_denominacion[$i]=\"\";\r\n\t\t\t $la_saldo[$i]=0;\r\n\t\t }//for\r\n\t\t $li_nro_reg=0;\r\n\t\t $ld_saldo_resultado=0;\r\n\t\t $li_row=$this->ds_Prebalance->getRowCount(\"sc_cuenta\");\t\r\n\t\t for($li_z=1;$li_z<=$li_row;$li_z++)\r\n\t\t {\r\n\t\t\t$ls_sc_cuenta=$this->ds_Prebalance->getValue(\"sc_cuenta\",$li_z);\r\n\t\t\tif(substr($ls_sc_cuenta,0,1)==\"5\")\r\n\t\t\t{\r\n\t\t\t\t$ldec_debe=0;\r\n\t\t\t\t$ldec_haber=0; \r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{ \r\n\t\t\t\t$ldec_debe=$this->ds_Prebalance->getValue(\"total_debe\",$li_z);\r\n\t\t\t\t$ldec_haber=$this->ds_Prebalance->getValue(\"total_haber\",$li_z);\r\n\t\t\t}\r\n\t\t\t$li_nivel=$this->ds_Prebalance->getValue(\"nivel\",$li_z);\t\r\n\t\t\t$ls_denominacion=$this->ds_Prebalance->getValue(\"denominacion\",$li_z);\t\r\n\t\t\t$ls_tipo_cuenta=substr($ls_sc_cuenta,0,1);\r\n\t\t\tswitch($ls_tipo_cuenta){\r\n\t\t\t\tcase $this->ls_activo:\r\n\t\t\t\t\t$ls_orden=1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase $this->ls_pasivo:\r\n\t\t\t\t\t$ls_orden=2;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase $this->ls_capital:\r\n\t\t\t\t\t$ls_orden=3;\r\n\t\t\t\t\tbreak;\t\t\t\t\r\n\t\t\t\tcase $this->ls_resultado:\r\n\t\t\t\t\t$ls_orden=4;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase $this->ls_orden_d:\r\n\t\t\t\t\t$ls_orden=5;\r\n\t\t\t\t\tbreak;\t\t\r\n\t\t\t\tcase $this->ls_orden_h:\r\n\t\t\t\t\t$ls_orden=6;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$ls_orden=7;\t\t\r\n\t\t\t}\r\n\t\t\t$ldec_saldo=$ldec_debe-$ldec_haber;\r\n\t\t\t\r\n\t\t\tif( (($ls_tipo_cuenta==$this->ls_pasivo)||($ls_tipo_cuenta==$this->ls_resultado)||($ls_tipo_cuenta==$this->ls_capital))&&($li_nivel==1))\r\n\t\t\t{\r\n\t\t\t\t$ld_saldo_resultado=$ld_saldo_resultado+$ldec_saldo;\r\n\t\t\t\t//print $ld_saldo_resultado;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif($li_nivel==4)\t\r\n\t\t\t{\r\n\t\t\t\t$li_nro_reg=$li_nro_reg+1;\r\n\t\t\t\t$this->ds_Balance1->insertRow(\"orden\",$ls_orden);\r\n\t\t\t\t$this->ds_Balance1->insertRow(\"num_reg\",$li_nro_reg);\r\n\t\t\t\t$this->ds_Balance1->insertRow(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t\t$this->ds_Balance1->insertRow(\"denominacion\",$ls_denominacion);\r\n\t\t\t\t$this->ds_Balance1->insertRow(\"nivel\",$li_nivel);\r\n\t\t\t\t$this->ds_Balance1->insertRow(\"saldo\",$ldec_saldo);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(empty($la_sc_cuenta[$li_nivel]))\r\n\t\t\t\t{\r\n\t\t\t\t $la_sc_cuenta[$ls_nivel]=$ls_sc_cuenta;\r\n\t\t\t\t $la_denominacion[$ls_nivel]=$ls_denominacion;\r\n\t\t\t\t $la_saldo[$ls_nivel]=$ldec_saldo;\r\n\t\t\t\t $li_nro_reg=$li_nro_reg+1;\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"orden\",$ls_orden);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"num_reg\",$li_nro_reg);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"denominacion\",$ls_denominacion);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"nivel\",-$li_nivel);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"saldo\",$ldec_saldo);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t $this->uf_scg_reporte_calcular_total_BG($li_nro_reg,$ls_prev_nivel,$ls_nivel,$la_sc_cuenta,$la_denominacion,$la_saldo); \r\n\t\t\t\t $la_sc_cuenta[$ls_nivel]=$ls_sc_cuenta;\r\n\t\t\t\t $la_denominacion[$ls_nivel]=$ls_denominacion;\r\n\t\t\t\t $la_saldo[$ls_nivel]=$ldec_saldo;\r\n\t\t\t\t $li_nro_reg=$li_nro_reg+1;\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"orden\",$ls_orden);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"num_reg\",$li_nro_reg);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"denominacion\",$ls_denominacion);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"nivel\",-$li_nivel);\r\n\t\t\t\t $this->ds_Balance1->insertRow(\"saldo\",$ldec_saldo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$ls_prev_nivel=$li_nivel;\t\t\r\n\t\t }\t\t\t\t\t\r\n\t\t $this->uf_scg_reporte_calcular_total_BG(&$li_nro_reg,$ls_prev_nivel,1,$la_sc_cuenta,$la_denominacion,$la_saldo); \t\t\t\r\n\t\t $ld_saldo_resultado=($ld_saldo_resultado+$ld_saldo_ganancia);\r\n\t\t \r\n\t\t /*if($ld_saldo_ganancia>0)\r\n\t\t {\r\n\t\t\t$ld_saldo_resultado=$ld_saldo_resultado-$ld_saldo_ganancia;\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t$ld_saldo_resultado=$ld_saldo_resultado+abs($ld_saldo_ganancia);\r\n\t\t }\t*/\r\n\t\t// COMENTE ESTA LINEA PARA QUE NO BUSQUE LAS CUENTAS DE RESULTADO\r\n\t\t// $this->uf_scg_reporte_actualizar_resultado_BG($this->ls_cta_resultado,$ld_saldo_ganancia,$li_nro_reg,$ls_orden); \r\n\t\t \r\n\t\t $li_total=$this->ds_Balance1->getRowCount(\"sc_cuenta\");\r\n\t\t for($li_i=1;$li_i<=$li_total;$li_i++)\r\n\t\t {\t\r\n\t\t\t $ls_sc_cuenta=$this->ds_Balance1->data[\"sc_cuenta\"][$li_i];\r\n\t\t\t $ls_orden=$this->ds_Balance1->data[\"orden\"][$li_i];\r\n\t\t\t $li_nro_reg=$this->ds_Balance1->data[\"num_reg\"][$li_i];\r\n\t\t\t $ls_denominacion=$this->ds_Balance1->data[\"denominacion\"][$li_i];\r\n\t\t\t $ls_nivel=$this->ds_Balance1->data[\"nivel\"][$li_i];\r\n\t\t\t $ld_saldo=$this->ds_Balance1->data[\"saldo\"][$li_i];\r\n\t\t\t $li_pos=$this->ds_Prebalance->find(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t if($li_pos>0)\r\n\t\t\t { \r\n\t\t\t\t$ls_rnivel=$this->ds_Prebalance->data[\"rnivel\"][$li_pos];\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t$ls_rnivel=0;\r\n\t\t\t }\r\n\t\t\t $ds_Balance2->insertRow(\"orden\",$ls_orden);\r\n\t\t\t $ds_Balance2->insertRow(\"num_reg\",$li_nro_reg);\r\n\t\t\t $ds_Balance2->insertRow(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t $ds_Balance2->insertRow(\"denominacion\",$ls_denominacion);\r\n\t\t\t $ds_Balance2->insertRow(\"nivel\",$ls_nivel);\r\n\t\t\t $ds_Balance2->insertRow(\"saldo\",$ld_saldo);\r\n\t\t\t $ds_Balance2->insertRow(\"rnivel\",$ls_rnivel);\r\n\t\t\t $ds_Balance2->insertRow(\"total\",$ld_saldo_resultado);\r\n\t\t }//for\r\n\t\t $li_tot=$ds_Balance2->getRowCount(\"sc_cuenta\");\r\n\t\t for($li_i=1;$li_i<=$li_tot;$li_i++)\r\n\t\t { \r\n\t\t\t $ls_sc_cuenta=$ds_Balance2->data[\"sc_cuenta\"][$li_i];\r\n\t\t\t $ls_orden=$ds_Balance2->data[\"orden\"][$li_i];\r\n\t\t\t $li_nro_reg=$ds_Balance2->data[\"num_reg\"][$li_i];\r\n\t\t\t $ls_denominacion=$ds_Balance2->data[\"denominacion\"][$li_i];\r\n\t\t\t $ls_nivel=$ds_Balance2->data[\"nivel\"][$li_i];\r\n\t\t\t $ld_saldo=$ds_Balance2->data[\"saldo\"][$li_i];\r\n\t\t\t $ls_rnivel=$ds_Balance2->data[\"rnivel\"][$li_i];\r\n\t\t\t $ld_saldo_resultado=$ds_Balance2->data[\"total\"][$li_i];\r\n\t\t\t if($ls_rnivel<=$ai_nivel)\r\n\t\t\t {\r\n\t\t\t\t $this->ds_reporte->insertRow(\"orden\",$ls_orden);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"num_reg\",$li_nro_reg);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"sc_cuenta\",$ls_sc_cuenta);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"denominacion\",$ls_denominacion);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"nivel\",$ls_nivel);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"saldo\",$ld_saldo);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"rnivel\",$ls_rnivel);\r\n\t\t\t\t $this->ds_reporte->insertRow(\"total\",$ld_saldo_resultado);\r\n\t\t\t }//if\t \r\n\t\t }//for\r\n\t\t unset($this->ds_Prebalance);\r\n\t\t unset($this->ds_Balance1);\r\n\t\t unset($ds_Balance2);\r\n\t\t return $lb_valido; \r\n\t}", "title": "" }, { "docid": "371e57518b47c8626271cd2d668b342b", "score": "0.62484497", "text": "function testInvalidBalance() {\n // empty\n }", "title": "" }, { "docid": "f7c02b3aaebfbdda09c3d260f77764db", "score": "0.62322235", "text": "public function getBalanceAttribute();", "title": "" }, { "docid": "530b58fd3bce0969cb5e44f22a397c5c", "score": "0.6231159", "text": "public function BuyAction(Request $request){\n //$id=$request->get('id');\n $empresa= $request->get ('empresa');\n $acciones=$request->get('acciones');\n //$valor=$request->get ('valor');\n //$valor=$valor_action;\n $cant=$request->get('cant'); \n\n // $vista=view('inversion', compact('empresa','acciones','valor', 'cant'))->render();\n\n $id_action= Cartera::select('id','acciones')\n ->where('empresa',$empresa)\n ->limit(1)\n ->get();\n //Obtener el valor de esa accion seleccionada//\n $valor_action= Investment::select('valor')\n ->where('empresa',$empresa)\n ->get(); \n \n //Si no encuentra un registro con esa validacion debe Insertar nuevo registro en Cartera\n if (empty($id_action[0]['id']))\n { \n $compra = new Cartera;\n $compra->empresa=$empresa;\n $compra->acciones=$cant;\n $compra->valor=$valor_action[0]['valor'];\n //$compra->total=$cant*$valor;\n $compra->save();\n\n }else{ \n //Si existe actualiza el saldo de ese registro\n $compra=Cartera::find($id_action[0]['id']);\n //$compra->acciones=$cant;\n $compra->acciones=$id_action[0]['acciones']+$cant;\n $compra->save();\n }\n\n//variable que devuelve el ultimo dato de saldo ordenado por id descendiente-Limitamos a1 para que sólo traiga el ultimo \n \n $lastSaldo= Balance::select('saldo')\n ->orderBy('id', 'desc')\n ->limit(1)\n ->get();\n\n $total=$valor_action[0]['valor']*$cant;\n //Creo el objeto para guardar los datos en la tabla Balance\n $transaction=new Balance;\n $transaction->fecha=date('y-m-d');\n $transaction->tipo_op=6;\n $transaction->descrip='Compra de Acciones de '.$empresa;\n $transaction->importe=$total;\n // $transaction->saldo=ObtenerSaldo($lastSaldo)-$money;\n $transaction->saldo=$lastSaldo[0]['saldo']-$total; // a $LastSaldo le indicamos que traiga sólo el contenido de su unico campo ya q sino lo devuelve como un array\n $transaction->save();\n\n return response()->json(array('success'=>true));\n }", "title": "" }, { "docid": "d921c8fde979701f9ff234775ac095a8", "score": "0.6220719", "text": "public function currentClosingBalance($cl_total,$cl_total_dc,$child_total,$child_total_dc)\r\n\t{\r\n\t\t\t$cl_total=round($cl_total,2);\r\n\t\t\t$child_total=round($child_total,2);\r\n\t\t\tif($cl_total_dc == '' && $child_total_dc =='')\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t\telse if($cl_total_dc == '' && $child_total_dc !='')\r\n\t\t\t{\r\n\t\t\t\t$cl_total_dc=$child_total_dc;\r\n\t\t\t\t$cl_total=$child_total;\r\n\r\n\t\t\t}\r\n\t\t\telse if($cl_total_dc != '' && $child_total_dc =='')\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if($child_total_dc != $cl_total_dc)\r\n {\r\n $cl_total=$cl_total - $child_total;\r\n if($cl_total < 0)\r\n {\r\n\r\n $cl_total_dc = $cl_total_dc == 'D'?'C':'D';\r\n }\r\n } \r\n else\r\n {\r\n $cl_total=$cl_total + $child_total;\r\n } \r\n\r\n\r\n $data['amount']=abs($cl_total);\r\n $data['amount_dc']=$cl_total_dc;\r\n\t\treturn $data;\r\n\r\n\t}", "title": "" }, { "docid": "7aa630ac27524ad3954814c319991b1b", "score": "0.62135524", "text": "public function getOldBalance() {\n // current academic year\n $academicYear = AccountSetting::getCurrentAcademicYear();\n\n // caculated balance\n $balance = 0;\n\n $studentOldBalance = StudentOldBalance::where('student_id', $this->id)->first();\n\n $balance += optional($studentOldBalance)->value;\n\n // check on payment value\n $balance -= Payment::where('student_id', $this->id)->whereIn('model_type', ['old_academic_year_expense'])->sum('value');\n\n // check if there is paid installment for old value\n $balance -= Installment::where('student_id', $this->id)->where('type', 'old')->where('paid', '1')->sum('value');\n\n // sum balance reset\n $balanceResets = BalanceReset::where('student_id', $this->id)->where('type', 'old')->sum('value');\n\n // decreate reset balance\n $balance -= $balanceResets;\n\n return $balance;\n }", "title": "" }, { "docid": "e8b18afe1b6c421472ebf2474c5e0037", "score": "0.61574584", "text": "private function calBER(){\r\n\t\t$total = ($this->getField('loan_amount')*12+$this->getField('loan_amount2')*12+$this->getField('total_expense'))/$this->getField('GOI');\r\n\t\treturn $total;\r\n\t}", "title": "" }, { "docid": "36bcf164944f9523d33326a5f32eeb0e", "score": "0.6142671", "text": "public function calculatePayment()\n {\n }", "title": "" }, { "docid": "bf35043d3ec7fd7c5b52110246d1cfaa", "score": "0.6142668", "text": "function getPrisonerPropertyBalance($prisoner_id, $currency='')\r\n {\r\n if(!empty($prisoner_id))\r\n {\r\n $balance_amount = 0;\r\n if(empty($currency))\r\n $currency = Configure::read('UGANDA-CURRENCY');\r\n\r\n //get prisoner amount \r\n $sql = \"select SUM(CASE WHEN transaction_type='Credit' THEN transaction_amount END) as credit_amount, SUM(CASE WHEN transaction_type='Debit' THEN transaction_amount END) as debit_amount from property_transactions as PropertyTransaction where currency_id=\".$currency.\" AND prisoner_id=\".$prisoner_id; \r\n //echo $sql; exit;\r\n $data = $this->PropertyTransaction->query($sql);\r\n if(!empty($data))\r\n {\r\n $credit_amount = 0;$debit_amount = 0;\r\n if(isset($data[0][0]['credit_amount']) && !empty($data[0][0]['credit_amount']))\r\n {\r\n $credit_amount = $data[0][0]['credit_amount'];\r\n }\r\n if(isset($data[0][0]['debit_amount']) && !empty($data[0][0]['debit_amount']))\r\n {\r\n $debit_amount = $data[0][0]['debit_amount'];\r\n }\r\n $balance_amount = $credit_amount-$debit_amount;\r\n }\r\n return $balance_amount;\r\n }\r\n }", "title": "" }, { "docid": "ac0e4d13cee04c73ebc662a4c99360c5", "score": "0.6142314", "text": "public function getBalanceAttribute()\n {\n return $this->offer - $this->invoiced;\n }", "title": "" }, { "docid": "b34c0ad2bf430d30b98954b3114897be", "score": "0.6133339", "text": "public function index()\n {\n // Bank accounts\n $banks = BankAccount::all(); // getting records for calculations\n $opening_balance = [];\n foreach ($banks as $bank) {\n $opening_balance[$bank->code] = $bank->opening_balance; \n }\n\n // Payment dues + join vendors\n $payment_dues = Payment::select(\n 'payments.id as PID', \n 'payments.*', \n // 'bank_accounts.opening_balance',\n // 'bank_accounts.bcode',\n 'vendors.*',\n 'vendors.code as vcode'\n )\n ->join('vendors', 'payments.code', '=', 'vendors.code')\n ->get();\n \n $current_balance = $opening_balance; // copying as we want to remember opening balance\n $remaining_payments = [];\n\n foreach ($payment_dues as $payment) {\n $transaction_bank = null; // to get which bank is used to transfer\n if($current_balance[$payment->first_bank] >= $payment->amount) { // we can use as we have stored bank codes in array before \n \n $current_balance[$payment->first_bank] -= $payment->amount;\n $transaction_bank = BankAccount::where('code', '=', $payment->first_bank)->first(); \n // $total_transfer[$payment->first_bank]; \n $this->trigger_transfer($payment, $payment->first_bank);\n }\n else if($current_balance[$payment->second_bank] >= $payment->amount) { // we can use as we have stored bank codes in array before \n \n $current_balance[$payment->second_bank] -= $payment->amount;\n $transaction_bank = BankAccount::where('code', '=', $payment->second_bank)->first();\n $this->trigger_transfer($payment, $payment->second_bank);\n }\n else if($current_balance[$payment->third_bank] >= $payment->amount) { // we can use as we have stored bank codes in array before \n \n $current_balance[$payment->third_bank] -= $payment->amount;\n $transaction_bank = BankAccount::where('code', '=', $payment->third_bank)->first();\n $this->trigger_transfer($payment, $payment->third_bank);\n }\n else {\n // ======= RP-4 'No bank had enough balance out of all 3';\n $remaining_payments[] = [\n 'vendor_code' => $payment->code,\n 'vendor_name' => $payment->name,\n 'amount_to_transfered' => $payment->amount \n ];\n $payment->amount = 0;\n } \n $rp1[] = [\n 'vendor_name' => $payment->name,\n 'amount_transfered' => $payment->amount,\n 'bank_ac_id' => $transaction_bank->id ?? null, \n 'bank_code' => $transaction_bank->code ?? null,\n 'bank_name' => $transaction_bank->name ?? null,\n 'ac_no' => $transaction_bank->ac_no ?? null,\n ];\n\n // RP-2\n $transfers = Payment::groupBy('payments.transfered_bank','bank_accounts.name','bank_accounts.id','bank_accounts.ac_no')\n ->selectRaw('sum(payments.transfered_amount) as sum, \n payments.transfered_bank, \n bank_accounts.id as bid,\n bank_accounts.name,\n bank_accounts.ac_no'\n )\n ->join('bank_accounts', 'bank_accounts.code', '=', 'payments.transfered_bank')\n ->orderBy('sum', 'DESC')\n ->get();\n \n \n }\n\n // ========== RP-3 available_balances\n arsort($current_balance); // to get highest balance first\n foreach($current_balance as $bank_code => $balance) {\n $curr_bank = BankAccount::where('code', $bank_code)->first();\n \n $available_balances[] = [\n 'bank_ac_id' => $curr_bank->id,\n 'bank_name' => $curr_bank->name,\n 'ac_no' => $curr_bank->ac_no,\n 'balance' => $balance\n ];\n }\n\n return view('welcome',compact('rp1', 'transfers', 'available_balances', 'remaining_payments'))->with('i');\n }", "title": "" }, { "docid": "5202aaf064add42fd868b53a8b8c880b", "score": "0.6127278", "text": "function getGncBalance($accountName, $startDate, $endDate) \n{\n global $db;\n global $mainCurrency;\n\n console_log('Get balance of account \\'' . $accountName . '\\'');\n // - if placeholder, return 0\n $q='Select hidden, placeholder';\n $q= $q . ' From accounts Where accounts.name = \\'' . $accountName . '\\'';\n console_log($q);\n $result = $db->query($q);\n $nrows = getNRows($result);\n if ($nrows == 0) {\n //account not found\n report_error('Did not find account: '. $accountName);\n return 0.0;\n } elseif ($nrows > 1) {\n report_error('Multiple accounts with the same name detected, not supported: '.$accountName);\n return 0.0;\n }\n $accountRecord = $result->fetchArray();\n if (($accountRecord['hidden'] != 0) || ($accountRecord['placeholder'] != 0)) {\n //no balance for place-holder or hidden accounts\n console_log('Account is hidden or placeholder. Return 0.0');\n return 0.0;\n }\n\n // - get cummodity for this account\n $q = 'Select commodities.mnemonic From accounts,commodities';\n $q = $q . ' Where accounts.name = \\''.$accountName.'\\'';\n $q = $q . ' And accounts.commodity_guid=commodities.guid';\n console_log($q);\n $result = $db->query($q);\n $nrows = getNRows($result);\n if ($nrows == 0) {\n //check if a commodity guid is set at all\n $q = 'Select commodity_guid from accounts Where name = \\''.$accountName.'\\'';\n $result= $db->query($q);\n $guidCommodity = $result->fetchArray()[\"commodity_guid\"];\n if ($guidCommodity == null) {\n // no commodity defined for this account, ok (likely a 'Root Account'\n console_log('No commodity defined for account: '.$accountName.'. OK. Return 0.0;');\n return 0.0;\n } else {\n report_error('Did not find commodity guid for account: '.$accountName.'; commodity_guid='.$guidCommodity);\n return 0.0; \n }\n } \n $accountRecord = $result->fetchArray();\n $accountCommodity=$accountRecord['mnemonic'];\n console_log('Commodity = ' . $accountCommodity);\n\n // - get exchange rate, if not main currency\n $convRate=1.0;\n if ($accountCommodity != $mainCurrency) {\n $q = 'Select value_num,value_denom From prices';\n $q = $q . ' Where commodity_guid =';\n $q = $q . ' (Select guid From commodities Where mnemonic=\\''.$accountCommodity.'\\')';\n $q = $q . ' And currency_guid = ';\n $q = $q . ' (Select guid From commodities Where mnemonic=\\'' . $mainCurrency . '\\')';\n $q = $q . ' Order By date DESC';\n console_log($q);\n $result = $db->query($q);\n $nrows = getNRows($result);\n if ($nrows == 0) {\n report_error('Could not convert commodity '.$accountCommodity.' for account '.$accountCommodity);\n return 0.0;\n } \n $accountRecord = $result->fetchArray();\n $convRate = (real)$accountRecord['value_num'];\n $convRate = $convRate / $accountRecord['value_denom'];\n }\n console_log('Conversion rate (' . $accountCommodity . '/' . $mainCurrency . '): ' . $convRate);\n\n // - calculate balance and convert in main currency\n $q = 'Select Sum(Cast(splits.value_num As Real) / splits.value_denom)';\n $q = $q . ' From splits Inner Join accounts On accounts.guid = splits.account_guid Inner Join';\n $q = $q . ' transactions On splits.tx_guid = transactions.guid';\n $q = $q . ' Where accounts.name = \\''.$accountName.'\\'';\n $q = $q . ' And transactions.post_date >= \\''.$startDate.'\\'';\n $q = $q . ' And transactions.post_date <= \\''.$endDate.'\\'';\n console_log($q);\n $result = $db->query($q);\n $accountRecord = $result->fetchArray();\n $balance = (real)$accountRecord[0];\n console_log('Balance in original commodity: ' . $balance);\n $balance = $balance * $convRate;\n\n // - return final balance\n console_log('Balance (' . $mainCurrency . '): ' . $balance);\n return $balance;\n \n}", "title": "" }, { "docid": "441f5496f803773b9e2c6d7183c75034", "score": "0.6126105", "text": "public function getBalance() {\n return Balance::retrieve($this->payout->__get('data')['object']['balance_transaction']);\n }", "title": "" }, { "docid": "f5ed65cdb31452407f01bb41bf0971a4", "score": "0.61133635", "text": "public function amount();", "title": "" }, { "docid": "de52302b905708330b7c2c74031f10fc", "score": "0.61077553", "text": "private function calculate_total_and_fees() {\n $this->subtotal = 0;\n $this->exchange_fees = 0;\n\n foreach ($this->Growers as $OrderGrower) {\n $this->subtotal += $OrderGrower->subtotal;\n $this->exchange_fees += $OrderGrower->Exchange->fee;\n }\n\n // Set rate gradiations between 5% ($100+) and 7.5% ($75-)\n if ($this->subtotal >= 10000) {\n $rate = 0.05;\n } else if ($this->subtotal < 10000 && $this->subtotal >= 9500) {\n $rate = 0.055;\n } else if ($this->subtotal < 9500 && $this->subtotal >= 9000) {\n $rate = 0.06;\n } else if ($this->subtotal < 9000 && $this->subtotal >= 8500) {\n $rate = 0.0625;\n } else if ($this->subtotal < 8500 && $this->subtotal >= 8000) {\n $rate = 0.065;\n } else if ($this->subtotal < 8000 && $this->subtotal >= 7500) {\n $rate = 0.07;\n } else if ($this->subtotal < 7500) {\n $rate = 0.075;\n }\n \n $fff_fee = round($this->subtotal * $rate);\n \n // Charge minimum of $0.50\n $this->fff_fee = ($fff_fee < 50) ? 50 : $fff_fee;\n\n $this->total = $this->subtotal + $this->exchange_fees + $this->fff_fee;\n\n $this->update([\n 'subtotal' => $this->subtotal,\n 'exchange_fees' => $this->exchange_fees,\n 'fff_fee' => $this->fff_fee,\n 'total' => $this->total\n ]);\n }", "title": "" }, { "docid": "1e32c5c6592442be6913c58fe522602c", "score": "0.61062664", "text": "public function testLedgerAccountBalance()\n {\n $account = factory(Account::class)->create([\n 'category_id' => null,\n \"account_type\" => Account::INVENTORY\n ]);\n\n factory(Ledger::class, 3)->create([\n \"post_account\" => $account->id,\n \"entry_type\" => Balance::DEBIT,\n \"posting_date\" => Carbon::now(),\n \"amount\" => 50\n ]);\n\n factory(Ledger::class, 2)->create([\n \"post_account\" => $account->id,\n \"entry_type\" => Balance::CREDIT,\n \"posting_date\" => Carbon::now(),\n \"amount\" => 95\n ]);\n\n $localBalance = Ledger::balance($account, Carbon::now()->startOfYear(), Carbon::now());\n $this->assertEquals($localBalance[$this->reportingCurrencyId], -40);\n }", "title": "" }, { "docid": "513137a9e1ffa056e3c86a945c21c028", "score": "0.60834855", "text": "public function getBalance(): int\n {\n return $this->balance;\n }", "title": "" }, { "docid": "244a1cb59f2b46e063b9e681afed6637", "score": "0.6080656", "text": "public function incBalance($object, $amount);", "title": "" }, { "docid": "97aa09a8d78674c4b45ff1d0c3f8a297", "score": "0.6072685", "text": "function bet_amount_credited($user_id, $bet_id, $win_amt, $win_on) {\n\n //check User Active \n $ch = $this->Common_model->getAll('users', array('user_id' => $user_id, 'status' => 'Active'))->num_rows();\n if ($ch == 1) {\n if ($win_amt > 0) {\n $userWallet = $this->Common_model->getAll('wallet', array('user_id' => $user_id))->row();\n $totalAmount = $win_amt + $userWallet->curr_balance;\n\n $upWallet['curr_balance'] = $totalAmount;\n $upWallet['updated_at'] = date('Y-m-d H:i:s');\n $up = $this->Common_model->update('wallet', $upWallet, array('user_id' => $user_id));\n if ($up) {\n //Wallet History\n $wallet_particular_data = array(\n 'user_id' => $user_id,\n 'amt_type' => 'credit',\n 'pre_amount' => $userWallet->curr_balance,\n 'current_amount' => round($totalAmount, 2),\n 'trans_amount' => $win_amt,\n 'amt_description' => 'Win on ' . $win_on,\n 'trans_status' => 'success',\n 'added_by' => 1,\n );\n $result_history = $this->Common_model->insert('wallet_history', $wallet_particular_data);\n }\n }\n }\n }", "title": "" }, { "docid": "585252c8aaacecc6fafb4841ee182fbd", "score": "0.6064377", "text": "function userBalance($id)\r\n{\r\n $DB = new database;\r\n $DB->Select('invoice', 'id', 'customer_id = ' . $id . ' and type = 1 and status = 0 and gen_date <= curdate()');\r\n $num = $DB->Select_Rows;\r\n $sum = 0;\r\n for ($i = 0; $i < $num; $i++) {\r\n $sum += invoiceBalance($DB->Select_Result[$i]['id']);\r\n }\r\n return (int)$sum;\r\n}", "title": "" }, { "docid": "62575569a44b405d92058363707cd7bc", "score": "0.6059452", "text": "public function prepareLedger(){\r\n $date= date(\"d/m/Y\");\r\n $period=date(\"t/m/Y\");\r\n $helper=new helpers();\r\n $memo_id=$helper->getMemo();\r\n $counter=$this->connect->Prepare(\"SELECT * FROM tbl_general_ledger WHERE TRANSFERED='0' AND PERIOD='$period'\");\r\n $stmt=$this->connect->Execute($counter);\r\n $count=$stmt->RecordCount();\r\n \r\n \r\n $STM2 = $this->connect->Prepare(\"SELECT * FROM tbl_general_ledger WHERE TRANSFERED='0' AND PERIOD='$period' \"); \r\n $result = $this->connect->Execute($STM2);\r\n \r\n while($rtmt=$result->FetchRow()){\r\n {\r\n $count++;\r\n $memo=\"GL\".$count;\r\n extract($rtmt);\r\n echo $account= $ACCOUNT_ID;\r\n \r\n if(!empty($GENERAL_LEDGER_DEBIT)){\r\n $balance=\"Debit\";\r\n $amount=$GENERAL_LEDGER_DEBIT;\r\n }\r\n else{\r\n $balance=\"Credit\";\r\n $amount=$GENERAL_LEDGER_CREDIT;\r\n }\r\n echo $balance;\r\n print_r( $rtmt = $this->connect->Prepare(\"SELECT * FROM tbl_general_ledger_transactions WHERE NARRATIVE='Opening Balances' AND ACCOUNT='$account' AND PERIOD='$period' \")); \r\n $out = $this->connect->Execute($rtmt);\r\n $a=$out->FetchNextObject();\r\n if($out->RecordCount()==0){\r\n if($balance=='Credit'){\r\n \r\n $qt=$this->connect->Prepare(\"INSERT INTO `tbl_general_ledger_transactions` ( `TRANS_DATE`, `PERIOD`, `ACCOUNT`, `NARRATIVE`, `CREDIT`,TRANSACTION_ID, `ACTOR`) VALUES ( '$date','$period', '$ACCOUNT_ID', 'Opening Balances', '$amount', '$memo_id', '$_SESSION[ID]')\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n $helper->UpdateMemo();\r\n }\r\n elseif($balance=='Debit'){\r\n \r\n $qt=$this->connect->Prepare(\"INSERT INTO `tbl_general_ledger_transactions` ( `TRANS_DATE`, `PERIOD`, `ACCOUNT`, `NARRATIVE`, `DEBIT`,TRANSACTION_ID, `ACTOR`) VALUES ( '$date','$period', '$ACCOUNT_ID', 'Opening Balances', '$amount', '$memo_id', '$_SESSION[ID]')\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n $helper->UpdateMemo();\r\n }\r\n \r\n } \r\n // update opening balances\r\n else{\r\n if($balance=='Credit'){\r\n \r\n $qt=$this->connect->Prepare(\"UPDATE `tbl_general_ledger_transactions` SET CREDIT='$amount' WHERE ACCOUNT='$account'\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n \r\n }\r\n elseif($balance=='Debit'){\r\n \r\n $qt=$this->connect->Prepare(\"UPDATE `tbl_general_ledger_transactions` SET DEBIT='$amount' WHERE ACCOUNT='$account'\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n \r\n }\r\n }\r\n \r\n }\r\n\r\n \r\n }\r\n \r\n }", "title": "" }, { "docid": "901d106c352134fdef3002cb1795bf58", "score": "0.60401255", "text": "public function index()\n {\n setlocale(LC_ALL, \"pt_BR\", \"pt_BR.iso-8859-1\", \"pt_BR.utf-8\", \"portuguese\");\n date_default_timezone_set('America/Sao_Paulo');\n\n $balance = Balance::orderBy('id', 'DESC')->where( 'user_id', Auth::id() )->first();\n \n // SALDO DE HOJE\n // $hoje = Carbon::now(); \n // $balanceToday = DB::table('transactions')\n // ->where( 'created_at', '>=', $hoje->startOfDay() ) // Desde a meia noite\n // ->where( 'created_at', '<=', date('Y-m-d H:i:s') ) // Até agora\n // ->where( 'user_id', Auth::id() )\n // ->where( 'done', 1 )\n // //->get();\n // ->sum( 'amount' );\n \n\n // // BALANCE\n // $lastBalance = Balance::orderBy('id', 'DESC')->where( 'user_id', Auth::id() )->first();\n // if( !$lastBalance ){ \n // // PRIMEIRO BALANCO\n // $firstBalance = DB::table('transactions') \n // ->where( 'created_at', '<', $hoje->startOfDay() ) // Até agora\n // ->where( 'user_id', Auth::id() )\n // ->where( 'done', 1 )\n // //->get();\n // ->sum( 'amount' );\n\n // $lastBalance = Balance::create(['amount'=>$firstBalance]) ;\n // }\n\n // // BALANCE é DE HOJE?\n // if ( date('Y-m-d') == date(\"Y-m-d\", strtotime($lastBalance->crated_at) ) ) {\n // //atualiza\n // $lastBalance->amount = ($balanceToday + $lastBalance->amount);\n // $balance = $lastBalance;\n // }else{\n // //Cria novo\n // $newBalance = new Balance;\n // $newBalance->amount = ($balanceToday + $lastBalance->amount);\n // $balance = $newBalance;\n // }\n\n // echo \"Saldo anterior: \" . $lastBalance->amount;\n // echo \"<br />\";\n\n // echo \"Hoje: \" . $balanceToday; \n\n // echo \"<br />\";\n\n // echo \"Total: \" . $balance->amount;\n \n return Response::json( $balance );\n exit;\n\n\n\n\n // SE NÃO EXISTE REGISTRO DE SALDO, CRIA NOVO\n if( !$balance ){\n $balance = new Balance;\n // Calcula Valor inicial do novo saldo\n $amount = DB::table('transactions')->where( 'created_at', '<', $hoje->startOfDay() )->where('user_id', Auth::id() )->where('done', 1 )->sum('amount');\n $balance->amount = $amount;\n $balance->save();\n }\n \n \n $lastBalanceDate = Carbon::createFromFormat('Y-m-d H:i:s', $balance->created_at );\n\n\n // SE O SALDO NÂO É DE HOJE, CRIA NOVO\n if( !$lastBalanceDate->isToday() ){\n $lastBalance = $balance->amount;\n $balance = new Balance;\n $balance->amount = $lastBalance;\n $balance->save();\n \n }\n \n // ATUALIZA O ÚLTIMO BALANCE\n $amount = DB::table('transactions')\n ->where( 'created_at', '>=', $hoje->startOfDay() ) // Desde a meia noite\n ->where( 'created_at', '<=', date('Y-m-d H:i:s') ) // Até agora\n ->where( 'user_id', Auth::id() )\n ->where( 'done', 1 )\n //->get();\n ->sum( 'amount' );\n \n // $transactionsToday = Transaction::where( 'created_at', '>=', $hoje->startOfDay() )\n // ->where( 'created_at', '<=', date('Y-m-d H:i:s') )\n // ->where( 'user_id', Auth::id() )\n // ->where( 'done', 1 )\n // ->get();\n\n\n // Soma valor do dia com o saldo anterior\n $amount = ($amount + $balance->amount);\n\n // return Response::json( $amount );\n // exit;\n\n // Atualiza o saldo no banco\n $balance->amount = $amount;\n $balance->save();\n\n return $balance->amount;\n }", "title": "" }, { "docid": "67489dc08e8efc544d391a9445319448", "score": "0.60388565", "text": "function get_current_commission_balance($affiliate_user_id) {\n\t$sql = \"SELECT balance FROM affiliate_account WHERE user_id='\" . $affiliate_user_id . \"'\";\n\t$res = mysql_query($sql);\n\t$row = mysql_fetch_array($res);\n\treturn $row['balance'];\n}", "title": "" }, { "docid": "ced29c6648031d75eaef57030ec1af5a", "score": "0.60331374", "text": "function balance_ami($id1, $id2){\n\n $dette = dette_ami($id1, $id2);\n $creance = creance_ami($id1, $id2);\n $balance = $creance - $dette;\n\n return $balance;\n}", "title": "" }, { "docid": "360b8ee82f434cf1122f4cbddd0db5e0", "score": "0.60298765", "text": "abstract public function getAmount();", "title": "" }, { "docid": "ec6d1cb4eafa3ec84e684166f835f1eb", "score": "0.6028963", "text": "public function fundWallet(){\n\n $user = Auth::user();\n $paymentDetails = Paystack::getPaymentData();\n\n //Paystack returns the amount in Kobo, so we divide by 100 to convert to Naira\n $amountFromPaystack = $paymentDetails['data']['amount'] / 100;\n\n $amountCommission = $amountFromPaystack * 0.02;\n\n $amountToCredit = $amount - $amountCommission;\n\n $wallet = $user->wallet()->first();\n\n $current_balance = $wallet->balance;\n\n $new_balance = $current_balance + $amountToCredit;\n\n $wallet->balance = $new_balance;\n\n // Also save it in the wallet transaction history\n $wallet_transaction = new WalletTransaction();\n\n $wallet_transaction->type = 'Credit';\n $wallet_transaction->amount = $amountToCredit;\n\n $wallet->walletTransaction()->save($wallet_transaction);\n $wallet->save();\n\n return redirect()->route('home');\n }", "title": "" }, { "docid": "6f4b3fe2fb407cbe8f593ed6d11911de", "score": "0.6012815", "text": "public function get_balance()\n\t{\n\t\t$this->db->select('SUM(price*quantity) AS total_orders');\n\t\t$this->db->where('order_status = 2 AND orders.order_id = order_item.order_id');\n\t\t$this->db->from('orders, order_item');\n\t\t$query = $this->db->get();\n\t\t\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->total_orders;\n\t}", "title": "" }, { "docid": "45773206acc4a529cedd55cf7c2209db", "score": "0.60077065", "text": "public function balance(Request $request){\n // body\n $transaction = new Transaction();\n $data = $transaction->balance($request);\n\n // return\n return $data;\n }", "title": "" }, { "docid": "a17dbf7abe20722937840b69cab5f5d7", "score": "0.5988363", "text": "public function get_available_to_trade()\n {\n return $this->account['balance'] - $this->account['margin_required'];\n }", "title": "" }, { "docid": "097bbad35acbfaf5ac85262e8fb910b0", "score": "0.5985868", "text": "function get_balance_amount($bill_id) {\r\n\r\n\t\t$query = $this->db->get_where('bill', array('bill_id' => $bill_id));\r\n\r\n\t\tif ($query->num_rows() > 0){\r\n\r\n\t\t\t$bill = $query->row_array();\r\n\r\n\t\t\t$balance_amount = $bill['due_amount'];\r\n\r\n\t\t}else{\r\n\r\n\t\t\t$balance_amount = 0;\r\n\r\n\t\t}\r\n\r\n\t\treturn $balance_amount;\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "a8d9cbd05ac73ece575449c369300ea2", "score": "0.59709924", "text": "public function getLedgerBalance($account,$periodFrom,$periodTo,$tag){\r\n if ($tag=='') {\r\n $end=\"WHERE ACCOUNT='$account' AND TRANS_DATE BETWEEN '$periodFrom' AND '$periodTo' \";\r\n }\r\n \r\n else {\r\n $end=\"WHERE ACCOUNT='$account' AND TRANS_DATE BETWEEN '$periodFrom' AND '$periodTo' AND TAG='$tag' \";\r\n \r\n }\r\n \r\n $query=$this->connect->Prepare(\"SELECT SUM(DEBIT) AS debit, SUM(CREDIT) as credit FROM tbl_general_ledger_transactions $end\" );\r\n $result=$this->connect->Execute($query);\r\n $rtmt=$result->FetchNextObject();\r\n \r\n return $difference=abs( ($rtmt->DEBIT) - ($rtmt->CREDIT)); \r\n \r\n }", "title": "" }, { "docid": "92c60b5390464b8c652231690854625c", "score": "0.5959262", "text": "public function getBalance() {\n\t\t$incoming = $this->getTotalIncoming();\n\t\t$expenses = $this->getTotalExpenses();\n\n\t\treturn array(\n\t\t\t'total' => number_format($incoming - $expenses, 2, '.', ''),\n\t\t\t'expenses' => $expenses,\n\t\t\t'incoming' => $incoming,\n\t\t\t'positive' => ($incoming >= $expenses ? true : false)\n\t\t);\n\t}", "title": "" }, { "docid": "b0602bdeee7e5c3d61c9497fe53484fe", "score": "0.5953558", "text": "public function payment_history(Request $request){\n $get=Invoices_Sales::where(\"id\",$request->payment[\"id\"])->first();\n $a = $get->paid;\n $b= $get->due;\n Invoices_Sales::where(\"id\",$request->payment[\"id\"])->update([\n \"paid\"=>($a+$request->payment[\"paid\"]),\n \"due\"=>($b-$request->payment[\"paid\"])\n ]);\n\n $paid_date=Carbon::parse($request->payment[\"date\"])->format(\"Y-m-d H:i\");\n\n /*Calculate last balance*/\n $debt=$request->payment[ \"paid\" ];\n if($debt==null){\n $debt=0;\n }\n $get=Casings::where(\"id\",$request->payment[\"casing\"])->first();\n $total_last_balance=($get->last_balance+$debt);\n Casings::where(\"id\",$request->payment[\"casing\"])->update([\n \"last_balance\"=>$total_last_balance,\n ]);\n /*End.Calculate last balance*/\n HistoryPayment_Add::create([\n \"inv_id\"=>$request->payment[\"id\"],\n \"type_inv\"=>\"sale\",\n \"casing_id\"=> $request->payment[\"casing\"],\n \"names\"=> $request->payment[\"names\"],\n \"method\"=> $request->payment[\"method\"],\n \"last_cash_balance\" => $total_last_balance,\n \"debt\"=>$debt,\n \"paid_date\"=>$paid_date,\n ]);\n return redirect()->back()->with(\"success\",\"Ödeme Başarıyla Yapılmıştır\");\n }", "title": "" }, { "docid": "89c5056cae8bd34189bbb29adf03fae0", "score": "0.5948621", "text": "public function totaldetotal() {\n $request = \\Config\\Services::request();\n $validation = \\Config\\Services::validation();\n $headers = $request->getHeaders();\n\n $registroModel = new RegistrosModel($db);\n $registro = $registroModel->where('estado', 1)\n ->findAll();\n\n //$db = \\Config\\Database::connect();\n //$pager = \\Config\\Services::pager();\n foreach ($registro as $key => $value) {\n\n if (array_key_exists('Authorization', $headers) && !empty($headers['Authorization'])) {\n\n if ($request->getHeader('Authorization') == 'Authorization: Basic ' . base64_encode($value[\"cliente_id\"] . \":\" . $value[\"llave_secreta\"])) {\n\n $balanceModel = new BalanceModel($db);\n $total10 = $balanceModel->get_total_debehaber_10();\n $total12 = $balanceModel->get_total_debehaber_12();\n $total14 = $balanceModel->get_total_debehaber_14();\n $total20 = $balanceModel->get_total_debehaber_20();\n $total33 = $balanceModel->get_total_debehaber_33();\n $total40 = $balanceModel->get_total_debehaber_40();\n $total41 = $balanceModel->get_total_debehaber_41();\n $total42 = $balanceModel->get_total_debehaber_42();\n $total45 = $balanceModel->get_total_debehaber_45();\n $total46 = $balanceModel->get_total_debehaber_46();\n\n $total50 = $balanceModel->get_total_debehaber_50();\n $total59 = $balanceModel->get_total_debehaber_59();\n $total60 = $balanceModel->get_total_debehaber_60();\n $total61 = $balanceModel->get_total_debehaber_61();\n $total62 = $balanceModel->get_total_debehaber_62();\n $total63 = $balanceModel->get_total_debehaber_63();\n $total69 = $balanceModel->get_total_debehaber_69();\n $total70 = $balanceModel->get_total_debehaber_70();\n $total79 = $balanceModel->get_total_debehaber_79();\n $total94 = $balanceModel->get_total_debehaber_94();\n $total95 = $balanceModel->get_total_debehaber_95();\n // $total46 = $balanceModel->get_total_debehaber_46();\n\n \n if (!empty($total10)) {\n\n $data = array(\n \"Status\" => 200,\n \"Total_Resultados\" => count($total10),\n \"Detalle10\" => $total10,\n \"Detalle12\" => $total12,\n \"Detalle14\" => $total14,\n \"Detalle20\" => $total20,\n \"Detalle33\" => $total33,\n\n \"Detalle40\" => $total40,\n \"Detalle41\" => $total41,\n \"Detalle42\" => $total42,\n \"Detalle45\" => $total45,\n \"Detalle46\" => $total46,\n\n \"Detalle50\" => $total50,\n \"Detalle59\" => $total59,\n \"Detalle60\" => $total60,\n \"Detalle61\" => $total61,\n \"Detalle62\" => $total62,\n\n \"Detalle63\" => $total63,\n \"Detalle69\" => $total69,\n \"Detalle70\" => $total70,\n \"Detalle79\" => $total79,\n\n \"Detalle94\" => $total94,\n \"Detalle95\" => $total95\n\n //\"Paginador\"=>$paginador\n );\n return json_encode($data, true);\n } else {\n\n $data = array(\n \"Status\" => 404,\n \"Total_Resultados\" => 0,\n \"Detalle\" => \"Ningún registro cargado\"\n );\n }\n } else {\n\n $data = array(\n \"Status\" => 404,\n \"Detalle\" => \"El token es inválido\"\n );\n }\n } else {\n\n $data = array(\n \"Status\" => 404,\n \"Detalle\" => \"No está autorizado para recibir los registros\"\n );\n }\n }\n\n return json_encode($data, true);\n }", "title": "" }, { "docid": "4f0ae26b52392cb43e07e34a154224a2", "score": "0.5947404", "text": "function cron_update_balance_due() {\n\n\t\t$sql = \"\n\t\tSELECT\n\t\t\t`r`.`reservationID`,\n\t\t\t`r`.`calculated_cron_balancedue`\n\n\t\tFROM\n\t\t\t`reservations` r\n\n\t\tWHERE\n\t\t\t`r`.`active` = 'Yes'\n\n\t\t\";\t\n\n\t\t$result = $this->new_mysql($sql);\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t@$balance = $this->get_balance_due($row['reservationID']);\n\t\t\t$date = date(\"Ymd\");\n\t\t\t$time = date(\"H:i:s\");\n\t\t\t$sql2 = \"UPDATE `reservations` SET \n\t\t\t`calculated_cron_date` = '$date',\n\t\t\t`calculated_cron_time` = '$time',\n\t\t\t`calculated_cron_balancedue` = '$balance[1]'\n\t\t\tWHERE `reservationID` = '$row[reservationID]'\n\t\t\t\";\n\t\t\t$result2 = $this->new_mysql($sql2);\n\t\t\t//print \"$row[reservationID] : $balance[1]<br>\";\t\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "0474dec26389ff1ea75dbaafa2e0686e", "score": "0.5939712", "text": "public function cashierDatewiseCashbookView(Request $request)\n {\n $from_date = trim($request->from_date);\n $to_date = trim($request->to_date);\n $from = date('Y-m-d',strtotime($from_date)) ;\n $to = date('Y-m-d',strtotime($to_date)) ;\n $next_form = date('Y-m-d', strtotime('+1 day', strtotime($from))) ;\n // get clossing balnce befor today\n $previous_colum_balance = DB::table('cashbook')->where('branch_id',$this->branch_id)->where('admin_type',3)->whereNotIn('tr_status',[2])->where('created_at','<=', $from)->get();\n // get befor clossing balance\n $previous_earn_amount = 0 ;\n $previous_cost_amount = 0 ;\n $previous_c2b = 0 ;\n $previous_b2c = 0 ;\n $balance_transfer = 0 ;\n $previous_send_transfer = 0 ;\n $previous_receive_transfer = 0 ;\n $previous_non_cash = 0 ;\n $previous_m2c = 0 ;\n foreach ($previous_colum_balance as $previous_colum_balances) {\n $previous_earn_amount = $previous_earn_amount + $previous_colum_balances->earn ;\n\n $previous_cost_amount = $previous_cost_amount + $previous_colum_balances->cost ;\n\n $previous_non_cash = $previous_non_cash + $previous_colum_balances->get_non_cash_payment ;\n\n $previous_c2b = $previous_c2b + $previous_colum_balances->c2b ;\n\n $previous_b2c = $previous_b2c + $previous_colum_balances->b2c ;\n $previous_m2c = $previous_m2c + $previous_colum_balances->m2c ;\n if($previous_colum_balances->balance_transfer_type == '1' OR $previous_colum_balances->balance_transfer_type == '0'){\n $previous_send_transfer = $previous_send_transfer + $previous_colum_balances->balance_transfer ;\n }else if($previous_colum_balances->balance_transfer_type == '2' OR $previous_colum_balances->balance_transfer_type == '0'){\n $previous_receive_transfer = $previous_receive_transfer + $previous_colum_balances->balance_transfer ;\n }\n }\n $previous_balance = $previous_earn_amount - $previous_cost_amount - $previous_c2b + $previous_b2c - $previous_send_transfer + $previous_receive_transfer - $previous_non_cash + $previous_m2c ;\n $result = DB::table('cashbook')->where('branch_id',$this->branch_id)->where('admin_type',3)->whereNotIn('tr_status',[2])->whereBetween('created_at', [$next_form, $to])->orderby('created_at','asc')->get();\n return view('cashbook.cashierDatewiseCashbookView')->with('result',$result)->with('from',$from)->with('to',$to)->with('next_form',$next_form)->with('previous_balance', $previous_balance)->with('branch_id',$this->branch_id);\n\n }", "title": "" }, { "docid": "3f9672b98f63b61e09bd33bb30a4a488", "score": "0.59307873", "text": "public function bankTransferPayment()\n {\n }", "title": "" }, { "docid": "76b363d09be7851180e99aacab8066e0", "score": "0.59289134", "text": "public function balance()\n\t{ \n\t\t$url= static::SMS_ENDPOINT .'/balance?key=' .$this->sms_api_key;\n\n\t\treturn file_get_contents($url);\n\t}", "title": "" }, { "docid": "ed64a9c2b0d2574fef05797345e36206", "score": "0.59286", "text": "function cry_getallmoney(){\n $cuid = get_current_user_id();\n $cur_currency = get_user_meta( $cuid, \"user_currency\", TRUE );\n if ($cur_currency!='') $cur_currency=\"usd\";\n $a =array();\n global $wpdb;\n $table = $wpdb->prefix.\"wallet\";\n $sql = \"SELECT * FROM \".$table ;\n $res = $wpdb->get_results($sql);\n $balance=0.0;\n foreach ($res as $key => $value) {\n if ($value->currency==\"xrp\")\n {\n $exbl = floatval(cry_getxrpbalance($value->address));\n \n $balance += (((float)$exbl))*((float)cry_exchangeoption($value->currency,$cur_currency));\n }\n else if ($value->currency==\"eth\"){\n $exbl = floatval(current(cry_ReturnAddressval($value->currency,$value->address))['final_balance']);\n $balance += ( ((float)$exbl )/10000000000000000000)*((float)cry_exchangeoption($value->currency,$cur_currency));}\n else {\n $exbl = floatval(current(cry_ReturnAddressval($value->currency,$value->address))['final_balance']);\n $balance += ( ((float)$exbl )/100000000000)*((float)cry_exchangeoption($value->currency,$cur_currency));\n }\n }\n echo $balance;\n die();\n }", "title": "" }, { "docid": "9341c0d9ed595883f56d3c333f89ed39", "score": "0.59268194", "text": "function payment_balance($student_id){\n\t\t\t\t$this->db->select_sum('payment_balance');\n\t\t\t\t$result = $this->db->get_where('student_session', array('student_id'=>$student_id));\n\t\t\t\treturn $result->result_array(0);\n\t\t\t}", "title": "" }, { "docid": "e941a9d02b148ca80d7138a814c6b46d", "score": "0.5926063", "text": "function distribute_commission($payment, $prev_balance){\n $CI = & get_instance();\n $sch_amount_due = 0;\n switch ($payment) {\n case 10000:\n case 2000: \n $ref_amount_due = $prev_balance['referral']->amount + 0.1*$payment;\n $share = array('referral'=>$ref_amount_due, 'school'=>$sch_amount_due);\n return $share;\n case 5000:\n case 4000:\n $ref_amount_due = $prev_balance['referral']->amount + 1000;\n if($CI->session->school_id!=0){\n $sch_amount_due = $prev_balance['school']->amount + 1000;\n }\n $share = array('referral'=>$ref_amount_due, 'school'=>$sch_amount_due);\n return $share;\n }\n }", "title": "" }, { "docid": "5eacd12fe8350252555de0fa523c2667", "score": "0.59116185", "text": "protected function totalBalance($formated = false){\n $sum = Dompet::where('user_id',$this->user_id)->sum('balance');\n if($formated)\n {\n $sum = number_format($sum);\n }\n return $sum;\n }", "title": "" }, { "docid": "f9e294382ab5cb7cccb8e10ee1b29f86", "score": "0.59090304", "text": "private function accountBalanceUpdate($reverse = false)\n {\n //$contact = self::$contact; // static::contact();\n //$currency = $contact->currency;\n\n $ledgers = $this->txn['ledgers'];\n //print_r($ledgers); exit;\n\n if ($reverse) {\n\n $ledgers = $this->txn['original']['ledgers'];\n\n foreach($ledgers as &$ledger) {\n $ledger['total'] = $ledger['total'] * -1;\n }\n unset($ledger);\n }\n\n //Log::info(':: accountBalanceUpdate ------------------------------------------------');\n\n foreach($ledgers as $ledger) {\n\n if (empty($ledger['financial_account_code'])) {\n return true;\n }\n\n //Defaults\n $debit = ($ledger['effect'] == 'debit') ? $ledger['total'] : 0;\n $credit = ($ledger['effect'] == 'credit') ? $ledger['total'] : 0;\n\n $currencies = [];\n $currencies[$ledger['base_currency']] = $ledger['base_currency'];\n $currencies[$ledger['quote_currency']] = $ledger['quote_currency'];\n\n foreach ($currencies as $currency) {\n\n //for multi-currency, apply the exchange rate\n if ($currency == $ledger['base_currency']) {\n //Do nothing because the values are in the base currency\n } else {\n $debit = $debit * $ledger['exchange_rate'];\n $credit = $credit * $ledger['exchange_rate'];\n }\n\n //1. find the last record\n $accountBalance = AccountBalance::whereDate('date', '<=', $ledger['date'])\n ->where('currency', $currency)\n ->where('financial_account_code', $ledger['financial_account_code'])\n ->orderBy('date', 'desc')\n ->first();\n\n //var_dump($accountBalance); exit;\n //Log::info('>>Last account balance entry for account id::'.$ledger['financial_account_code'].' in '.$currency.' date: '.$ledger['date'].': '.$ledger['effect'].' '.$ledger['total']);\n //Log::info($ledger);\n //Log::info($accountBalance);\n\n switch ($accountBalance) {\n case null:\n\n //create a new balance record\n $account_balance = new AccountBalance;\n $account_balance->tenant_id = $ledger['tenant_id'];\n $account_balance->date = $ledger['date'];\n $account_balance->financial_account_code = $ledger['financial_account_code'];\n $account_balance->currency = $currency;\n $account_balance->debit = 0;\n $account_balance->credit = 0;\n $account_balance->save();\n\n break;\n\n default:\n\n //create a new row with the last balances\n if ($ledger['date'] == $accountBalance->date) {\n //do nothing because the records for this dates balances already exists\n } else {\n $account_balance = new AccountBalance;\n $account_balance->tenant_id = $ledger['tenant_id'];\n $account_balance->date = $ledger['date'];\n $account_balance->financial_account_code = $ledger['financial_account_code'];\n $account_balance->currency = $currency;\n $account_balance->debit = $accountBalance->debit;\n $account_balance->credit = $accountBalance->credit;\n $account_balance->save();\n }\n\n break;\n\n }\n\n if ($debit) {\n\n $increment = AccountBalance::whereDate('date', '>=', $ledger['date'])\n ->where('currency', $currency)\n ->where('financial_account_code', $ledger['financial_account_code'])\n ->increment('debit', $debit);\n //Log::info('debit increment: '.$debit);\n //Log::info($increment);\n\n }\n\n if ($credit) {\n\n $increment = AccountBalance::whereDate('date', '>=', $ledger['date'])\n ->where('currency', $currency)\n ->where('financial_account_code', $ledger['financial_account_code'])\n ->increment('credit', $credit);\n //Log::info('credit increment: '.$credit);\n //Log::info($increment);\n\n }\n\n }\n\n }\n\n return true;\n\n }", "title": "" }, { "docid": "d89c482b394aad52e71347859d95acfd", "score": "0.59079045", "text": "public function getTotalLimboBalance()\n {\n return $this->total_limbo_balance;\n }", "title": "" }, { "docid": "0bfbb55f182166b01d2249b764af604a", "score": "0.5898083", "text": "public function closingBalance($ledger_id,$start_date,$end_date)\r\n\t{\r\n\t\t$data=array();\r\n\t\t$op=Ledgers::findOne($ledger_id)->op_balance;\r\n\t\tif($op != 0)\r\n\t\t$opdc=Ledgers::findOne($ledger_id)->op_balance_dc;\r\n\t\telse\r\n\t\t$opdc='';\r\n\t\t$balance=0;\r\n\t\t$ledgerEntryItems=$this->entryItems($ledger_id,$start_date,$end_date);\r\n\t\t$dr_total=0;\r\n\t\t$cr_total=0;\r\n\t\t$cl_total_dc='';\r\n\t\t$cl_total=0;\r\n\t\t$op_total=$op;\r\n\t\t$op_total_dc=$opdc;\r\n\t\tif($ledgerEntryItems == null)\r\n\t\t{\r\n\r\n\t\t\t//Adding Opening Balances\r\n\t\t\t$only_dr_total=$dr_total;\r\n\t\t\t$only_cr_total=$cr_total;\r\n\r\n\t\t\tif($opdc == \"D\")\r\n\t\t\t\t$dr_total+=$op;\r\n\t\t\telseif($opdc == \"C\")\r\n\t\t\t\t$cr_total+=$op;\r\n\r\n\t\t\tif($dr_total > $cr_total)\r\n\t\t\t{\r\n\t\t\t\t$cl_total_dc=\"D\";\r\n\t\t\t\t$cl_total=$dr_total - $cr_total;\r\n\t\t\t}\r\n\t\t\telse if($dr_total < $cr_total)\r\n\t\t\t{\r\n\t\t\t\t$cl_total_dc=\"C\";\r\n\t\t\t\t$cl_total=$cr_total - $dr_total;\t\r\n\t\t\t}\r\n\r\n\t\t\t$data=\r\n\t\t\t[\r\n\t\t\t\t'dr_total'=>$only_dr_total,\r\n\t\t\t\t'cr_total'=>$only_cr_total,\r\n\t\t\t\t'cl_total'=>$cl_total,\r\n\t\t\t\t'cl_total_dc'=>$cl_total_dc,\r\n\t\t\t\t'op_total'=>$op_total,\r\n\t\t\t\t'op_total_dc'=>$op_total_dc\r\n\r\n\t\t\t];\r\n\r\n\t\t\treturn $data;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tforeach ($ledgerEntryItems as $key => $value) \r\n\t\t\t{\r\n\t\t\t\t\tif($value->dc == \"D\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$dr_total+=$value->amount;\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$cr_total+=$value->amount;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t$only_dr_total=$dr_total;\r\n\t\t$only_cr_total=$cr_total;\r\n\r\n\t\tif($opdc == \"D\")\r\n\t\t$dr_total+=$op;\r\n\t\telseif($opdc == \"C\")\r\n\t\t$cr_total+=$op;\r\n\r\n\t\tif($dr_total > $cr_total)\r\n\t\t{\r\n\t\t\t$cl_total_dc=\"D\";\r\n\t\t\t$cl_total=$dr_total - $cr_total;\r\n\t\t}\r\n\t\telse if($dr_total < $cr_total)\r\n\t\t{\r\n\t\t\t$cl_total_dc=\"C\";\r\n\t\t\t$cl_total=$cr_total - $dr_total;\t\r\n\t\t}\r\n\t\r\n\r\n\t\t$data=\r\n\t\t[\r\n\t\t\t'dr_total'=>$only_dr_total,\r\n\t\t\t'cr_total'=>$only_cr_total,\r\n\t\t\t'cl_total'=>$cl_total,\r\n\t\t\t'cl_total_dc'=>$cl_total_dc,\r\n\t\t\t'op_total'=>$op_total,\r\n\t\t\t'op_total_dc'=>$op_total_dc\r\n\t\t];\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "f432c09346cd4d4cde8a6026f3e7b339", "score": "0.58834887", "text": "public function after_insert(\\Orm\\Model $model)\n {\n\n $credit = 0;\n $debit = 0;\n $description = 'Option ID'.$model->id . ', ' . $model->status .' Action ';\n /*\n * --customer balance\n * */\n $sql = 'SELECT user_id, (SUM(debit)*-1) + SUM(credit)\n AS balance FROM balances WHERE user_id = '. $model->user_id . ' GROUP BY user_id ';\n\n $balance = \\DB::query($sql)->execute();\n\n if( 0 === count( $balance ))\n {// zero customer balance means that use has no records or a zero balance, update new balance\n $description .= ' - First Debit';\n $balance = $model->price;\n $debit = abs( $model->price );\n $props = array(\n 'user_id' => $model->user_id,\n 'description' => $description,\n 'debit' => $debit,\n 'credit' => $credit,\n 'balance' => $balance,\n\n );\n }\n else\n {\n $description .= ' - Debit';\n $balance = $balance[0]['balance'];\n $debit = abs( $model->price );\n\n $balance = $balance - $debit;\n $props = array(\n 'user_id' => $model->user_id,\n 'description' => $description,\n 'debit' => $debit,\n 'credit' => $credit,\n 'balance' => $balance,\n\n );\n }\n return Model_Balance::forge($props)->save();\n }", "title": "" }, { "docid": "41dfc25798b77b5fb199e53c1a68f8d2", "score": "0.58803165", "text": "abstract public function balance_before($account_number, \\DateTime $date);", "title": "" }, { "docid": "aca9656849f19282d152f6366d4997e3", "score": "0.5876358", "text": "function checkMoney()\n\t{\t\t\n\t\t//$query = \"update pkr_seat s left join pkr_player p on s.player = p.idplayer set status = ? where idtable = ? and status = ? and p.virtual_money < ?\";\n\t\t//$query = \"update pkr_seat s, pkr_tablecash p set status = ? where s.player = p.idplayer and s.idtable = p.idtable and s.idtable = ? and status = ? and p.virtual_money < ?\";\n\t\t$query = \"update pkr_seat set status = ? where idtable = ? and player > 0 and player in (select idplayer from pkr_tablecash where idtable = ? and virtual_money < ?)\";\n\t\t//$params = array (AWAY, $this->curr_table, PLAYING, $this->min_tbl_credit_to_play);\n\t\t$minval = $this->bblind;\n\t\t$params = array (AWAY, $this->curr_table, $this->curr_table, $minval);\n\t\t$GLOBALS['mydb']->update($query,$params);\n\t}", "title": "" }, { "docid": "774166bc5c4025da1ffd6ce41d7084c7", "score": "0.5875929", "text": "public function test_getTotal_playWithWalletAndAddFunds_returnCreditChargeWithProperTotal()\n {\n $this->markTestSkipped('This test don\\'t works anymore :( | Fix it? ');\n\n $sut = $this->getSut();\n $sut->setIsCheckedWalletBalance(true);\n $sut->addFunds(new Money(500, new Currency('EUR')));\n $sut->setAmountWallet(new Money(1500,new Currency('EUR')));\n $expected = new Money(535, new Currency('EUR'));\n $actual = $sut->getTotal();\n $this->assertEquals($expected,$actual);\n }", "title": "" }, { "docid": "f432d7824035ff2cfde4d8e988454ed3", "score": "0.58755344", "text": "public function getDuesBalance()\n\t{\n\t\t$obligation_dt = $this->getDuesObligation();\n\t\t$adjusted_pt_dt = clone $this->member->duesPaidThruDtObject;\n\t\t$adjusted_pt_dt->modify('+' . $this->getDiscountedMonths() . ' month');\n return isset($this->lob_cd) && isset($this->rate_class) && ($obligation_dt > $this->member->duesPaidThruDtObject)\n ? FeeCalendar::getTrueDuesBalance($this->lob_cd, $this->rate_class, $adjusted_pt_dt->getMySqlDate(), null, $obligation_dt) : 0.00;\n\t}", "title": "" }, { "docid": "5abb41371f4b09dcd8c436119754c844", "score": "0.58723557", "text": "public function sendBalanceUpdateNotification() {\n\t\tif (!$this->getCustomer()->getRewardUpdateNotification()) {\n\t\t\treturn $this;\n\t\t}\n\t\t$delta = (int)$this->getPointsDelta();\n\t\tif ($delta == 0) {\n\t\t\treturn $this;\n\t\t}\n\t\t$store = Mage::app()->getStore($this->getStore());\n\t\t/* @var Df_Core_Model_Email_Template $mail */\n\t\t$mail = Df_Core_Model_Email_Template::i();\n\t\t$mail->setDesignConfig(\n\t\t\tarray(\n\t\t\t 'area' => Df_Core_Const_Design_Area::FRONTEND\n\t\t\t , 'store' => $store->getId()\n\t\t\t)\n\t\t);\n\t\t$templateVars = array(\n\t\t\t'store' => $store\n\t\t\t,'customer' => $this->getCustomer()\n\t\t\t,'unsubscription_url' => Df_Reward_Helper_Customer::s()->getUnsubscribeUrl('update')\n\t\t\t,'points_balance' => $this->getPointsBalance()\n\t\t);\n\t\t$mail->sendTransactional(\n\t\t\t$store->getConfig(\n\t\t\t\tself::XML_PATH_BALANCE_UPDATE_TEMPLATE)\n\t\t\t,$store->getConfig(self::XML_PATH_EMAIL_IDENTITY)\n\t\t\t,$this->getCustomer()->getEmail()\n\t\t\t,null,$templateVars,$store->getId()\n\t\t);\n\t\tif ($mail->getSentSuccess()) {\n\t\t\t$this->setBalanceUpdateSent(true);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "020494f04d257d3dafa4ae462c139b44", "score": "0.5867552", "text": "function updateBalance($adj_type, $adj_amount, $receiver_id)\r\n{\r\n global $connection;\r\n\r\n if ( $adj_type == 'customer' )\r\n {\r\n $sqlu = '\r\n UPDATE\r\n '.TABLE_MEMBER.'\r\n SET\r\n curr_balance = curr_balance + \"'.$adj_amount.'\"\r\n WHERE\r\n member_id = \"'.$receiver_id.'\"';\r\n }\r\n else if ( $adj_type == \"producer\" )\r\n {\r\n $sqlu = '\r\n UPDATE\r\n '.TABLE_PRODUCER.'\r\n SET\r\n curr_balance = curr_balance + \"'.$adj_amount.'\"\r\n WHERE\r\n producer_id = \"'.$receiver_id.'\"';\r\n }\r\n $resultu = @mysql_query($sqlu,$connection) or die(mysql_error());\r\n}", "title": "" }, { "docid": "3ffc22238d328b1d9beffed8ea16687f", "score": "0.5864878", "text": "public function getAccountBalance(): array;", "title": "" }, { "docid": "34112a4f6d43c6ec2fcc9b6a09b95bb3", "score": "0.58631045", "text": "public function current_balance(Payment $payment)\n {\n // RP-3\n // $banks = BankAccount::all(); // getting records for calculations\n \n \n // return view('total_transfers',compact('banks', $current_balance))->with('i');\n // print_r($current_balance);\n }", "title": "" }, { "docid": "2889f7b1cf98ce635b48bd58d5571167", "score": "0.5858906", "text": "public function getDependencies() { return array('Payment'=>1.00); }", "title": "" }, { "docid": "289f1ceeae1e6a44f66c8918d9aa0360", "score": "0.58585274", "text": "function balance($user_id, $expiry) {\n\t\t$expiry_date = date('Y-m-d H:i:s', time() - ($expiry * 24 * 60 * 60));\n\n\t\t$credit = $this->find('all', array('conditions' => array('Credit.user_id' => $user_id, 'Credit.created >=' => $expiry_date), 'fields' => \"SUM(Credit.credit) as 'credit'\"));\n\t\tif(empty($credit[0][0]['credit'])) {\n\t\t\t$credit[0][0]['credit'] = 0;\n\t\t}\n\n\t\t$debit = $this->find('all', array('conditions' => array('Credit.user_id' => $user_id), 'fields' => \"SUM(Credit.debit) as 'debit'\"));\n\t\tif(empty($debit[0][0]['debit'])) {\n\t\t\t$debit[0][0]['debit'] = 0;\n\t\t}\n\n\n\t\treturn $credit[0][0]['credit'] - $debit[0][0]['debit'];\n\t}", "title": "" }, { "docid": "a65a84c67482d9d3eaaf42002ab100f5", "score": "0.585317", "text": "public function haveMoney()\n {\n }", "title": "" }, { "docid": "a65a84c67482d9d3eaaf42002ab100f5", "score": "0.585317", "text": "public function haveMoney()\n {\n }", "title": "" }, { "docid": "e2860dccbfac047421b04b7aba18689c", "score": "0.5850439", "text": "function getEmployeeBalanceInfo($employee_id, $accounting_period) {\r\n\t\r\n\t\t$capconBal = $this->capitalcontribution_model->retrieveCapConBalance($employee_id, $accounting_period);\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t//Get CcMinBal\t\t\t\t\t\t\t\t\r\n\t\t$ccMinBal = $this->parameter_model->getParam('CCMINBAL');\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t//Get employee's company code\t\t\t\t\t\t\t\t\r\n\t\t$company_code = $this->showCompCode($employee_id);\t\t\t\t\t\t\t\t\r\n\t\tlog_message('debug', 'codessss ' . $company_code);\t\t\r\n\t\t//for NWC\t\t\t\t\t\t\t\t\r\n\t\t//Retrieve old Capital after Transaction / 11\t\t\t\t\t\t\t\t\r\n\t\t$oldCapitalAfterTransaction = $this->capitalcontribution_model->getOldCapitalAfterTransaction($employee_id, $accounting_period);\r\n\t\t\r\n\t\t//Retrieve current Capital after Transaction / 11\t\t\t\t\t\t\t\t\r\n\t\t$currentCapitalAfterTransaction = $capconBal / 11;\t\t\t\t\t\t\t\t\r\n\t\t//Compare new and old capital after transaction, use the higher value as capitalAfterTransaction\r\n\t\t$capitalAfterTransaction = $oldCapitalAfterTransaction > $currentCapitalAfterTransaction ? $oldCapitalAfterTransaction : $currentCapitalAfterTransaction;\t\r\n\t\t\r\n\t\t//jdj 08032017\r\n\t\t//retrieve the Highest Capital and its date\r\n\t\t$capitalAfterTransaction11 = $this->getHighestCapitalandDate($employee_id);\r\n\t\tif($capitalAfterTransaction11['list'][0]['eleven'])\r\n\t\t\t$accdate= $capitalAfterTransaction11['list'][0]['accdate'];\r\n\t\t\t$month = substr($accdate, 0,2);\r\n\t\t\t$yr = substr($accdate,2);\r\n\t\t\tswitch($month) {\r\n\t\t\t\tcase \"01\":\r\n\t\t\t\t\t$month=\"January\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"02\":\r\n\t\t\t\t\t$month=\"February\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"03\":\r\n\t\t\t\t\t$month=\"March\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"04\":\r\n\t\t\t\t\t$month=\"April\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"05\":\r\n\t\t\t\t\t$month=\"May\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"06\":\r\n\t\t\t\t\t$month=\"June\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"07\":\r\n\t\t\t\t\t$month=\"July\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"08\":\r\n\t\t\t\t\t$month=\"August\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"09\":\r\n\t\t\t\t\t$month=\"September\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"10\":\r\n\t\t\t\t\t$month=\"October\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"11\":\r\n\t\t\t\t\t$month=\"November\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"12\":\r\n\t\t\t\t\t$month=\"December\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$month=\"Error\";\r\n\t\t\t}\r\n\t\t\t$accdate= $month .\" \".$yr;\r\n\t\t\t\r\n\t\t\t\r\n\t\tif($capitalAfterTransaction11['list'][0]['eleven'])\r\n\t\t\t$eleven= $capitalAfterTransaction11['list'][0]['eleven'];\t\r\n\t\t//end 08312017\r\n\t\t\r\n\t\t\r\n\t\t//[START] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\tlog_message('debug', 'getEmployeeBalanceInfo_oldCapitalAfterTransaction=' . $oldCapitalAfterTransaction);\r\n\t\tlog_message('debug', 'getEmployeeBalanceInfo_currentCapitalAfterTransaction=' . $currentCapitalAfterTransaction);\r\n\t\t//[END] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\t\r\n\t\tif($company_code == \"920\") {//member is a retiree\r\n\t\t\t//Retrieve RLR\t\t\t\t\t\t\t\r\n\t\t\t$retireeLoanRequirement = $this->getRLR($employee_id);\r\n\t\t\t$retireeLoanRequirement1 = $retireeLoanRequirement + $capitalAfterTransaction;\r\n\t\t\t//compare three parameters\t\t\t\t\t\t\t\r\n\t\t\t$nonWithdrawableCapital = max($retireeLoanRequirement1, $capitalAfterTransaction, $ccMinBal);\r\n\t\t\t\r\n\t\t\t//[START] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\t\tlog_message('debug', 'getEmployeeBalanceInfo_retireee_retireeLoanRequirement=' . $retireeLoanRequirement1);\r\n\t\t\tlog_message('debug', 'getEmployeeBalanceInfo_retireee_capitalAfterTransaction=' . $capitalAfterTransaction);\r\n\t\t\tlog_message('debug', 'getEmployeeBalanceInfo_retireee_ccMinBal=' . $ccMinBal);\r\n\t\t\t//[END] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\t}\t\t\t\r\n\t\telse {\t\t\t\t\t\t\r\n\t\t\t//Get 1/3 ReqBalance\t\t\t\t\t\t\t\r\n\t\t\t$oneThirdReqBal = $this->getLoanRequirement($employee_id);\r\n\t\t\t//compare three parameters\t\t\t\t\t\t\t\r\n\t\t\t$nonWithdrawableCapital = max($oneThirdReqBal, $capitalAfterTransaction, $ccMinBal);\r\n\t\t\t\r\n\t\t\t//[START] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\t\tlog_message('debug', 'getEmployeeBalanceInfo_nonRetiree_oneThirdReqBal=' . $oneThirdReqBal);\r\n\t\t\tlog_message('debug', 'getEmployeeBalanceInfo_nonRetiree_capitalAfterTransaction=' . $capitalAfterTransaction);\r\n\t\t\tlog_message('debug', 'getEmployeeBalanceInfo_nonRetiree_ccMinBal=' . $ccMinBal);\r\n\t\t\t//[END] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t$maxWithdrawable = $capconBal - $nonWithdrawableCapital;\t\r\n\t\t\r\n\t\t//[START] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\tlog_message('debug', 'getEmployeeBalanceInfo_capconBal=' . $capconBal);\r\n\t\tlog_message('debug', 'getEmployeeBalanceInfo_nonWithdrawableCapital=' . $nonWithdrawableCapital);\r\n\t\tlog_message('debug', 'getEmployeeBalanceInfo_maxWithdrawable=' . $maxWithdrawable);\r\n\t\t//[END] Modified by Kweeny Libutan for 8th Enhancement - Part 2 (RLR - Remaining Term) 2013/10/10\r\n\t\t\r\n\t\treturn array(\r\n\t\t\t\"capconBal\" => $capconBal\r\n\t\t\t,\"reqBal\" => $nonWithdrawableCapital\r\n\t\t\t,\"maxWdwlAmount\" => $maxWithdrawable\r\n\t\t\t/* [Start] jdj enhancement 0829 added capcon11 for the highest capital and its month date \r\n\t\t\t * \r\n\t\t\t */\r\n\t\t\t,\"capcon11\" => $eleven\r\n\t\t\t,\"accdate\" => $accdate\r\n\t\t);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6a191a84e95fe625f061aaac8f510d62", "score": "0.58500195", "text": "public function verify_deposit(){\n\t\t//if ($_SERVER['HTTP_USER_AGENT'] != 'checkcron') exit;\n $token_rate = DB::table('token_rate')\n ->select('token_price')\n ->first();\n\t\t $last_unapproved_transactions = DB::table('main_wallet_deposit_history')\n ->where('status', '1')\n ->where('created_at', '>', Carbon::now()->subDays(1))\n ->get();\n\t\tif($last_unapproved_transactions){\n\t\t\tforeach($last_unapproved_transactions as $transaction){\n\t\t\t\t$cps = new CoinPaymentsAPI();\n // $cps->Setup('Ae50bdeb136a01877Cbc97097F9827290DAb998353AA910FA69076816C7A2391', '06603c4401674b88a2f235d6e0098e42cdfdce6e42718df89037208006c8da73');\n $cps->Setup('9bBbaa301294dAFC8eC06511d712b50119e52908fBd78d5e44d4D6B451fdc458', '2f79796688e0124749d695cbac23911ed50dc3767bb315633d712ad7e2aefdee');\n \n // See https://www.coinpayments.net/apidoc-create-transaction for all of the available fields\n $result = $cps->get_tx_info($transaction->transaction_id);\n\t\t\t\tif ($result['error'] == 'ok') {\n if(isset($result['result']['status'])){\n if($result['result']['status'] === 100){\n $get_user_details = DB::table('users')\n ->where('id', $transaction->user_id)\n ->first();\n DB::table('users')->where('id',$transaction->user_id)\n ->update([\n 'main_wallet_balance'=> DB::raw('main_wallet_balance + '.$transaction->amount), \n 'self_deposit'=> DB::raw('self_deposit + '.$transaction->amount), \n 'self_active' => '1'\n ]);\n DB::table('users')->where('userid' ,$get_user_details->referrer_id)->increment('direct_active_joinings', 1);\n DB::table('main_wallet_deposit_history')->where('id',$transaction->id)->update(['status'=> '2', 'approved_at' => date('Y-m-d H:i:s')]);\n //calculate level income\n for($j=1; $j <= 11; $j++){\n $commission_percentage = [7, 5, 3, 2, 1, .5, .5, .5, .5, .5, .5];\n $get_user_details = DB::table('users')\n ->where('userid', $get_user_details->referrer_id)\n ->first();\n if(empty($get_user_details)){\n break;\n }\n if($get_user_details->direct_active_joinings < $j){\n continue;\n }\n if($j == 5){\n $self_holding = $get_user_details->fix_holding_wallet_balance + $get_user_details->growth_holding_wallet_balance;\n if($self_holding < 501)\n continue;\n }\n if($j == 11){\n $self_holding = $get_user_details->fix_holding_wallet_balance + $get_user_details->growth_holding_wallet_balance;\n if($self_holding < 1501)\n continue;\n }\n \n $commission_of = $get_user_details->id;\n $commission_by = $transaction->user_id;\n $income_of_level = $j;\n $total_commission_in_usd = $transaction->amount * $commission_percentage[$j-1] / 100;\n $total_commission_in_tokens = $total_commission_in_usd / $token_rate->token_price;\n DB::table('referral_commission_history')\n ->insert(['commission_of'=> $commission_of, 'commission_by'=> $commission_by, 'tokens'=> $total_commission_in_tokens, 'usd'=> $total_commission_in_usd, 'token_rate'=> $token_rate->token_price, 'level'=> $income_of_level, 'commission_for'=> 'Instant' ]);\n DB::table('users')->where('id',$commission_of)->update([\n 'earning_wallet_balance'=> DB::raw('earning_wallet_balance +'.$total_commission_in_tokens),\n 'token_wallet_balance'=> DB::raw('token_wallet_balance +'.$total_commission_in_tokens),\n ]);\n } \n }\n elseif($result['result']['status'] === -1){\n DB::table('main_wallet_deposit_history')->where('id',$transaction->id)->update(['status'=> '0', 'approved_at' => date('Y-m-d H:i:s')]);\n }\t\t\n }\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "8b6659f5821571899dd341c6e51368c6", "score": "0.5842036", "text": "public static function holdingsAndPay() {\n\t\t\n\n\t\tLog::info(\"Holdings from last month\");\n\t\t$holdings = Holding::where('user_id','>',0)->get();\n\n\n\t\t\t$playlevels = playlevels();\n\t\t\t$playnumber = DB::table('sysvars')->max('id');\n\t\t\t\t//\t\tExtra obtener valor de pago de comision y hacer el btcprice string en number_format,8 playlevels estan en arreglo, podria ir a DB, pero x ahorita\n\t\t\t$btcprice = Btcusd::orderBy('id','desc')->first();\n\t\t\t$btcprice = number_format($btcprice->btcprice,8);\n\t\t\t$commission = $btcprice / $playlevels;\n\t\t\t\n\n\n\t\tforeach($holdings as $holding) {\n\n\t\t\t// echo gettype($holding->debit). \"<br>\";\n\t\t\t// echo $holding->debit;\n\t\t\t// $holding->debit = floatval($holding->debit);\n\t\t\t// if($holding->debit != \"0.00000000\") {\n\t\t\t// $holdings = floatval($holding->debit);\n\t\t\t// echo gettype($holdings);\n\t\t\tif($holding->debit > 0) {\n\t\t\t\t// echo \"Is Greater\";\n\t\t\t\tLog::info('YES with holdings');\n\t\t\t\t$blockchain = new Blockchain;\n\t\t\t\t$blockchain->user_id = $holding->user_id;\n\t\t\t\t$blockchain->blockchainaddress = $holding->blockchainaddress;\n\t\t\t\t$blockchain->secret = $holding->secret;\n\t\t\t\t$blockchain->debit = $holding->debit;\n\t\t\t\t$blockchain->reason = \"last_month_holdings\";\n\t\t\t\t$blockchain->save();\n\n\t\t\t\tif($holding->debit >= $btcprice)\n\t\t\t\t{\n\t\t\t\t\t// dd($holding->debit);\n\t\t\t\t\t// Log::info(\"Pay Next Month if holdings are more than price\");\n\t\t\t\t\tRecursivepayment::paynextmonthsingle($holding->user_id, $btcprice, $playnumber, $commission,$holding->debit );\n\t\t\t\t}else{\n\n\t\t\t\t\tLog::info(\"User can not pay next month\");\n\t\t\t\t}\n\n\t\t\t\t$holding->disabled = 1;\n\t\t\t\t$holding->save();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tLog::info('NO holdings');\n\t\t\t}\n\n\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "40778798141e349218c09af0679d8c81", "score": "0.5829118", "text": "public function bankBalance() {\n $data = [];\n $bank = Bank::find(request()->bank_id);\n \n if (!request()->date_from || !request()->date_to || !$bank)\n return [];\n \n $date1 = Carbon::createFromFormat(\"Y-m-d\", request()->date_from);\n $date2 = Carbon::createFromFormat(\"Y-m-d\", request()->date_to);\n $days = $date1->diffInDays($date2);\n $balance = $bank->init_balance;\n \n for($index = 1; $index <= $days; $index ++) {\n $date = Carbon::create(date('Y', strtotime($date1)), date('m', strtotime($date1)), $index)->toDateString();\n $deposites = DB::table('account_transformations')\n ->where('type', 'store_to_bank')\n ->where('bank_id', request()->bank_id)\n ->where('date', $date)->sum('value');\n $checks = DB::table('account_checks')\n ->where('bank_id', request()->bank_id)\n ->where('is_paid', '1')\n ->where('date', $date)->sum('value'); \n $balance += $deposites - $checks;\n \n $item = [\n \"date\" => $date,\n \"deposites\" => $deposites,\n \"checks\" => $checks,\n \"balance\" => $balance,\n ];\n $data[] = $item;\n }\n \n \n return $data;\n }", "title": "" }, { "docid": "47f92c1915d9275c1947ab089734ba7e", "score": "0.58290756", "text": "function cur_balance_dr($daterange2,$account_id){\n\t\n\t\n $daterange2=date(\"Y-m-d\", strtotime($daterange2));\n\t\n\t$query = $this->db->query(\"\n\t\t\t\n\t\t\tSELECT SUM(amount) AS AMOUNT FROM cane_entries\n\t\t\tLEFT JOIN cane_voucher ON cane_voucher.voucher_id=cane_entries.parent_voucher\n\t\t\tWHERE dr_side='$account_id' AND trans_date <= '$daterange2' \n\t\t\t\t\t\t\t\n\t\t\t\");\t\t\n\t\t\n\t\tforeach ($query->result() as $row) {\n\t\t\t\t\t\t\t\t\t \n\t\t $dr_amount= $row->AMOUNT;\n\t\t\t\t\t\t\t\t\t \n\t\t}\t\n\t\treturn $dr_amount;\t\t\t\t\t\t \n}", "title": "" }, { "docid": "ea0896ec0a9c0183cfb022fc4d33ee44", "score": "0.5822554", "text": "public function testWalletAmount(): void\n {\n $investor1 = new Investor(\"Investor 1\");\n $investor1->deductAmount(77000);\n $this->assertEquals(23000, $investor1->getWalletAmount());\n }", "title": "" }, { "docid": "7318a6b2814a63244cff50576c4341ed", "score": "0.581835", "text": "function funct_Billing_GetBTCPrice_Gox() {\n\t//$strCurrency = 'USD';//set currency\n\t$return = file_get_contents('http://data.anxbtc.com/api/1/BTCUSD/ticker_fast');//get json response\n\t$info = json_decode($return, true);//decode it (into an array rather than object [using 'true' parameter])\n\t$intValueOne = $info['return']['last_local']['value'];//access the dollar value\n\t\n\t$strCurrency=\"USD\"; $intBTCvalue=1;\n\t\n\tif($strCurrency==\"USD\"){$intTotal = $intValueOne * $intBTCvalue ; } //BTC 2 USD total is the value of 1 BTC so multiply that times the value we were passed\n\t//if($strCurrency==\"BTC\"){$intTotal = $intBTCvalue / $intValueOne ; } //USD 2 BTC value total is the value of 1 BTC so divide that times the value we were passed\n\t\t\n\treturn round($intTotal, 7) ; //round out to 3 decimal places\n\t//echo \"[ <strong>$intTotal</strong>] <br>\";\n}", "title": "" }, { "docid": "27289e478fd26aa2e6600e79f89a4482", "score": "0.58151543", "text": "public function oldupdatePromoHistory($booking_id,$customer_id,$total_fare){\n $promo = $this->AuthModel->getSingleRecord('promocode_history',array('booking_id'=>$booking_id,'user_id'=>$customer_id));\n if(!empty($promo)){\n $history_id = $promo->history_id;\n $rate_type = $promo->rate_type;\n $rate = $promo->rate;\n if($rate_type=='Percentage'){\n $user_earn = ($total_fare*$rate)/100;\n }else{\n $user_earn = $rate;\n }\n if($this->AuthModel->updateRecord(array('history_id'=>$history_id),'promocode_history',array('promo_earn'=>$user_earn,'status'=>1))){\n $this->AuthModel->updateRecord(array('booking_id'=>$booking_id),'booking',array('promo_earn'=>$user_earn));\n //Update promo bonus amount in CitiPay wallet\n $receiver_wallet = $this->AuthModel->getSingleRecord('wallet_balance',array('user_id'=>$customer_id));\n if(!empty($receiver_wallet)){\n $receiver_prebalance = $receiver_wallet->balance;\n $receiver_newBalance = $receiver_prebalance+$user_earn; \n\n if($transaction_id = $this->AuthModel->singleInsert('wallet_transaction',array('receiver_id'=>$customer_id,'sender_id'=>'','type'=>'cr','amount'=>$user_earn,'description'=>'Promo Code Bonus of Trip id '.$booking_id,'transaction_status'=>'Success','reciver_balance'=>$receiver_newBalance,'sender_balance'=>'','transaction_at'=>date('Y-m-d H:i:s')))) //store transaction record\n {\n $this->AuthModel->updateRecord(array('user_id'=>$customer_id),'wallet_balance',array('balance'=>$receiver_newBalance,'update_at'=>date('Y-m-d H:i:s')));//update receiver balance \n $message = \"Promotional bonus \".$user_earn.\" MMK of booking_id \".$booking_id.\" has been credited to your CitiPay Wallet\"; //for customer notification.\n $this->AuthModel->singleInsert('notifications',array('user_id'=>$customer_id,'subject'=>\"Promotional Bonus\",\"message\"=>$message,'notification_at'=>date('d-m-Y h:i A')));\n } \n else{\n $transaction_id = $this->AuthModel->singleInsert('wallet_transaction',array('receiver_id'=>$customer_id,'amount'=>$user_earn,'description'=>'Promo Code Bonus for Trip id '.$booking_id,'transaction_status'=>'Failure','reciver_balance'=>$receiver_prebalance,'transaction_at'=>date('Y-m-d H:i:s')));\n $message = \"Sorry! Promotional bonus \".$user_earn.\" MMK of booking_id \".$booking_id.\" has been failed. Please contact with support\"; \n }\n }\n }\n }\n }", "title": "" }, { "docid": "e22e391a8d2f31ee5c2d98c373c9844b", "score": "0.5806069", "text": "public function redeemCoins(Request $request){\n // 1) Get User details 2) find him in orders table 3) update his balance of coins :)\n $user_id = Auth::user()->id;\n $orderId = $request->input('order_id');\n //get pending order\n $pendingOrder = DB::select('SELECT (\"id\",\"priceInDollars\") FROM orders WHERE \"orderId\" = ? AND user_id = 1; ',[$orderId]);\n //get amount in dolllars\n $amountPaidByUser = $pendingOrder[1];\n //update pending order by changing user_id to current user\n DB::update('UPDATE orders SET user_id=? WHERE id= ?', [$user_id,$pendingOrder[0]]);\n //lets now update user balance\n updateUserAccountBalance($user_id,$amountPaidByUser);\n\n\n }", "title": "" }, { "docid": "bb9a65900a32abd84bbe4d2e50ec0946", "score": "0.58027315", "text": "public function getNetAmountForOrder($first_val,$second_val){\n /*[*/ $this->NetAmount=($this->GrossAmount-5);//]-->this will not work\n $this->NetAmount=($first_val-$second_val);//will work something like that\n }", "title": "" }, { "docid": "28c1283f0ef2dd6b6d9ef5fd169c95d4", "score": "0.5795661", "text": "public function getBalance()\n {\n $response = $this\n ->getHttpClient()\n ->request('GET', \"/res.php?key={$this->apiKey}&action=getbalance\");\n\n return $response->getBody()->__toString();\n }", "title": "" } ]
80dd8132288f81567642f4d63fe28f4b
Channels in the guild
[ { "docid": "b3b2f536074b45a8a972d7ebb822a2ed", "score": "0.6695655", "text": "public function getChannels() : Collection{\n return $this->channels;\n }", "title": "" } ]
[ { "docid": "4809f7d51d9dfb977e8ccf709ccdaa70", "score": "0.7397939", "text": "public function getChannels();", "title": "" }, { "docid": "1fab7a5018dc22cbdd3973542e7417c7", "score": "0.7204521", "text": "public function getChannels(){\n return self::getManager()->getChannels($this->level);\n }", "title": "" }, { "docid": "cb1c79beb0299ce623894d6f3580b5d8", "score": "0.7077559", "text": "public function getChannels()\n {\n return $this->channels;\n\n }", "title": "" }, { "docid": "47f9559f3ea0c54ad033bc298d2d7992", "score": "0.70725065", "text": "public function channels();", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.6945855", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.6945855", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.6945855", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "f0260fd1c1366b3a30f7ade8f1aba2f9", "score": "0.68963075", "text": "public function getChannels()\n\t{\n\t\treturn $this->channels;\n\t}", "title": "" }, { "docid": "7b2ce833a5d895acd44842d462380cfa", "score": "0.68727833", "text": "public function getChannels()\n {\n return Channels::getChannels();\n }", "title": "" }, { "docid": "1c640e4605215ea2bd26838557eeae10", "score": "0.6872677", "text": "public function getRegisteredChannels();", "title": "" }, { "docid": "144afaa40f9da38fe6acef3bb3178cf3", "score": "0.6795385", "text": "public function getClientChannels()\n {\n return $this->client_channels;\n }", "title": "" }, { "docid": "40831dd359b3db7405f8a4dcda534805", "score": "0.67851144", "text": "protected function query_channels(){\n\t\tif (!($this->connected and $this->noError)) {return;}\n\t\t$cmd = \"channellist -topic -flags -voice -limits\\n\";\n\t\tif(!($clist_t = $this->sendCmd($cmd))){\n\t\t\t$this->error[] = 'No Channellist';\n\t\t}else{\n\t\t\t$clist_t = $this->splitInfo2($clist_t);\n\t\t\tforeach ($clist_t as $var) {\n\t\t\t\t$this->clist[] = $this->splitInfo($var);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0f8668994274d4dd5f72906ce57de4b2", "score": "0.668105", "text": "public function getChannels($nick)\n {\n return $this->storage->getChannels($nick);\n }", "title": "" }, { "docid": "9d6e367416920eb7eb28fc184de984a1", "score": "0.6659914", "text": "public function getter_channels()\n\t{\n\t\treturn $this->getChannels();\n\t}", "title": "" }, { "docid": "43863545a2848c42768a83ced5ecbbb7", "score": "0.6643502", "text": "public function getChannels(): array\n {\n return $this->_getRecords(\"channel\");\n }", "title": "" }, { "docid": "23bdd3fc80e39ef337ebe482479c6bbd", "score": "0.6617492", "text": "public function getChannels() {\n return $this->hasMany(Channel::className(), ['id' => 'channel_id'])\n ->viaTable('channel_user', ['user_id' => 'id']);\n }", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.65983087", "text": "public function getChannel();", "title": "" }, { "docid": "ee649ee402c9875ee62ad4099ae6f024", "score": "0.65983087", "text": "public function getChannel();", "title": "" }, { "docid": "1112180a59213d00162df345d41730d7", "score": "0.65739816", "text": "static function get_irc_channels_list(){\n if (function_exists(\"morgue_get_irc_channels_list\")) {\n return morgue_get_irc_channels_list();\n } else {\n $irc_config = Configuration::get_configuration(\"irc\");\n $channels = isset($irc_config[\"channels\"]) ? $irc_config[\"channels\"] : array();\n return $channels;\n }\n }", "title": "" }, { "docid": "347eee797caf32eb915501377bf0abed", "score": "0.6513001", "text": "public function channels()\n {\n $endpoint = 'https://api.hubapi.com/broadcast/v1/channels/setting/publish/current';\n\n return $this->client->request('get', $endpoint);\n }", "title": "" }, { "docid": "49d05670b85c214e6168784b5d42e123", "score": "0.64103895", "text": "public function channels()\n {\n return $this->belongsToMany(Channel::class);\n }", "title": "" }, { "docid": "efe768254be4d69a10c1be66adc2cfb1", "score": "0.6404945", "text": "public function getWelcomeChannels(): array\n {\n return $this->welcome_channels;\n }", "title": "" }, { "docid": "6182390551700d76d02a66dee38b7fab", "score": "0.640191", "text": "public function broadcastOn() {\n return ['chat_channel'];\n }", "title": "" }, { "docid": "8b20f493aa6511a46d47d65a0c58411e", "score": "0.63944244", "text": "function getChannel();", "title": "" }, { "docid": "2d513a4d4ca3c1b8c1be8bad504271a0", "score": "0.63887095", "text": "public function broadcastOn()\n {\n return ['admin-channel'];\n }", "title": "" }, { "docid": "413e5079ac9aa960ec3c14ebefcbd525", "score": "0.6388648", "text": "public function broadcastOn()\n {\n // return new PrivateChannel('channel-name');\n return [];\n }", "title": "" }, { "docid": "7670e2e14baa705d85330a4c448077fc", "score": "0.6385218", "text": "public function channels()\n {\n if (!array_key_exists('', $this->getHandlers())) {\n $this->setHandler('channels', new Handler($this->wrapper));\n }\n\n return $this->getHandlers()['channels'];\n }", "title": "" }, { "docid": "59ea798f2f666430662227bd1eff90a7", "score": "0.63598675", "text": "public function getChannels()\n\t{\n\t\t$structure = new Structure();\n\t\t\n\t\tforeach($this->instance->channels as $channel)\n\t\t{\n\t\t\tif($channel->isUserInChannel($this))\n\t\t\t\t$structure->push($channel);\n\t\t}\n\t\t\n\t\treturn $structure;\n\t}", "title": "" }, { "docid": "ef79a42ec82d96c70dd4657131668c49", "score": "0.6316626", "text": "public function get_channels() {\n\t\t$nonce = wp_create_nonce( 'landings_get_channels' );\n\t\tif ( Utils::check_nonce( 'landings_get_channels', $nonce ) ) {\n\t\t\t$channels = $this->get( 'channels' );\n\t\t\twp_send_json( $channels );\n\t\t}\n\t\twp_send_json( false );\n\t}", "title": "" }, { "docid": "6b57da454c661bd9f538513fa9158bc9", "score": "0.6261803", "text": "public function broadcastOn()\n {\n $channels = [];\n foreach($this->conversation->group->users()->where('users.id','<>',Auth::user()->id)->get() as $user){\n array_push($channels,new PrivateChannel('messagesforgroup.'.$user->id));\n }\n return $channels;\n }", "title": "" }, { "docid": "d56f2e1ed555920795f8b29c0a41b254", "score": "0.62577647", "text": "public function getEnabledChannels()\n {\n return $this->registry->getRepository('OroIntegrationBundle:Channel')\n ->getConfiguredChannelsForSync(ChannelType::TYPE);\n }", "title": "" }, { "docid": "ac65db4a089267d6bafeff395df303c9", "score": "0.62511367", "text": "public function get_channels($params = array())\n {\n return $this->_pusher->get_channels($params);\n }", "title": "" }, { "docid": "e70817d86191a83138f38762e38c8923", "score": "0.6249758", "text": "public function broadcastOn()\n {\n $channels = [\n new PrivateChannel(\"Process.{$this->instance_id}\"),\n new PrivateChannel(\"User.{$this->user_id}\"),\n ];\n return $channels;\n }", "title": "" }, { "docid": "5d56f9625456b5031bc3279f3f145d93", "score": "0.6248311", "text": "function channels_list() {\n global $conf;\n\n $path = 'channels';\n $params = array();\n\n return curl_open($path, $params);\n}", "title": "" }, { "docid": "09b5a4afd23bd9af10c8dcf481e48c1f", "score": "0.6240043", "text": "public function broadcastOn()\n {\n $channels = [];\n foreach ($this->user->followers as $follower) {\n array_push($channels, new PrivateChannel('actuality.user.' . $follower->sender_id));\n }\n return $channels;\n }", "title": "" }, { "docid": "e684213470eb9ce6bc8c5fdcb4bba014", "score": "0.6214645", "text": "public function broadcastOn(): array\n {\n return $this->channels;\n }", "title": "" }, { "docid": "850fabaf01437da5bdc1b1e2c74347fd", "score": "0.61427516", "text": "public function broadcastOn()\n {\n return ['channel-name'];\n }", "title": "" }, { "docid": "86dee1412a8c7ca221e788506621f043", "score": "0.6091809", "text": "public static function getAllChannel() {\n\t\treturn array(self::_getDao()->count(), self::_getDao()->getAll());\n\t}", "title": "" }, { "docid": "6b42e533171204830cdf0b112d588be1", "score": "0.60879594", "text": "public function getChannel()\n {\n \treturn $this->_channel;\n }", "title": "" }, { "docid": "2406caec7516b195ae0c86222ab76d70", "score": "0.60647774", "text": "public function getAllowedChannels()\n {\n return $this->_allowedChannels;\n }", "title": "" }, { "docid": "5ca67392cc4ad5e19128ada34322593b", "score": "0.6062368", "text": "public function getChannels()\n {\n return $this->channels->map(function (AMQPChannel $channel) {\n return $channel->getChannelId();\n });\n }", "title": "" }, { "docid": "ef9147d0e02ea03993e698c9f95c6efe", "score": "0.6060303", "text": "public function broadcastOn()\n {\n return new Channel('forum');\n }", "title": "" }, { "docid": "21581a51f4e99c56ab8560e5b6c1f850", "score": "0.6034499", "text": "public function channel(): array\n {\n return $this->httpClient->get('/v3/mailings/channel.json');\n }", "title": "" }, { "docid": "59ac8f6d57a252d8c23f4cf864e4d018", "score": "0.60313046", "text": "public function indexChannels()\n {\n return ChannelResource::collection(\n Channel::orderBy('id', 'desc')->simplePaginate(30)\n );\n }", "title": "" }, { "docid": "b79d5bf778888f4be9b737bc78e83c2c", "score": "0.6003377", "text": "public function getChannel()\n {\n return $this->getKey('Channel');\n }", "title": "" }, { "docid": "8cffac1a13e4920ceea198722e17405c", "score": "0.5997957", "text": "public function broadcastOn()\n {\n $channels = [];\n $receivers = []; // Array of users\n\n $post = $this->getPost();\n $author = $this->getAuthor();\n\n if ($post->isPublic()) {\n $receivers = User::where('id', '!=', $author->id)->get();\n } else {\n $receivers = $author->friends; // Getting collection of all friends\n }\n\n foreach ($receivers as $user) {\n $channels[] = new PrivateChannel('App.User.' . $user->id);\n }\n\n return $channels;\n }", "title": "" }, { "docid": "4d26190d63a40a01dd4227d27c87e994", "score": "0.59601694", "text": "public function getChannel()\n {\n return $this->_channel;\n }", "title": "" }, { "docid": "d593b5e37388aedfae26597033e21b9a", "score": "0.5929896", "text": "public function api_get($params)\n {\n $this->youtube = new \\Google_Service_YouTube($this->client);\n\n $channel = $this->youtube->channels->listChannels('snippet', $params);\n\n return $channel;\n }", "title": "" }, { "docid": "dfc603480118b2bd6ba57e47432029c8", "score": "0.59269243", "text": "public function getChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "dfc603480118b2bd6ba57e47432029c8", "score": "0.59269243", "text": "public function getChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "dfc603480118b2bd6ba57e47432029c8", "score": "0.59269243", "text": "public function getChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "dfc603480118b2bd6ba57e47432029c8", "score": "0.59269243", "text": "public function getChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "03f2eb1666dab57f4947fa93c3d4635a", "score": "0.5921752", "text": "public function register_channels()\n\t{\n\t\t$MiniComponents =jomres_getSingleton('mcHandler');\n\t\t// Channels build reports of their existence\n\t\t$MiniComponents->triggerEvent('21001');\n\n\t\t$available_thin_channels = get_showtime(\"thin_channels\");\n\n\t\tif (!empty($available_thin_channels)) {\n\t\t\tforeach ($available_thin_channels as $channel ) {\n\t\t\t\ttry {\n\t\t\t\t\t$headers = array ( \"X-JOMRES-proxy-id: \".(int)$this->manager_id );\n\n\t\t\t\t\t$method = 'GET';\n\t\t\t\t\t$endpoint = 'cmf/channel/announce/'.$channel['channel_name']; // Endpoint that confirms the channel's existence\n\t\t\t\t\t$result = $this->call_api->send_request( $method , $endpoint , array() , $headers);\n\n\t\t\t\t\tif ( isset($result->data->response) && $result->data->response == 0 ) { // The channel does not exist in the CMS\n\t\t\t\t\t\t$method = 'POST';\n\t\t\t\t\t\t$endpoint = 'cmf/channel/announce/'.$channel['channel_name'].'/'.urlencode($channel['channel_friendly_name']);\n\n\t\t\t\t\t\t$result = $this->call_api->send_request( $method , $endpoint , [\n\t\t\t\t\t\t\t\t'params' => json_encode($channel['features'])\n\t\t\t\t\t\t\t] ,\n\t\t\t\t\t\t\t$headers\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$channel[\"channel_id\"] = $result->data->response ;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$channel[\"channel_id\"] = $result->data->response ;\n\t\t\t\t\t}\n\t\t\t\t\t$this->current_channels[ $result->data->response ] = $channel ;\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\tlogging::log_message(\"Tried to add \".$channel['channel_name'].\"to database but failed \", 'CMF', 'WARNING');\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "32875b350198d02aa943cf187b054d3b", "score": "0.59063673", "text": "public function getChannel(): string;", "title": "" }, { "docid": "a970df8348e2734806a0efffcdb4141a", "score": "0.5897053", "text": "public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}", "title": "" }, { "docid": "e90e4a248447cb731c77204fb6d0cec5", "score": "0.5873599", "text": "public function GetChannel()\n {\n return $this->channel;\n }", "title": "" }, { "docid": "d282dd4f99c1f4f26eb840d0ab2c04e2", "score": "0.58713454", "text": "protected function getChannelAttribute()\n {\n if ($guild = $this->guild) {\n return $guild->channels->get('id', $this->channel_id);\n }\n }", "title": "" }, { "docid": "aacbede3a2e9cac621819cbdb66792f1", "score": "0.5824287", "text": "public function broadcastOn()\n {\n return [$this->channel];\n }", "title": "" }, { "docid": "abd99fb1ae739533fd57c6f6baa489a7", "score": "0.58039856", "text": "public function getChannel() {\n return $this->channel;\n }", "title": "" }, { "docid": "3ff8540f6ee9df16d3c441287268f469", "score": "0.5784005", "text": "public function broadcastOn()\r\n {\r\n return new PrivateChannel('channel-name');\r\n }", "title": "" }, { "docid": "45aa17261daad52bb56735b81e09f353", "score": "0.5783726", "text": "public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }", "title": "" }, { "docid": "64a18e5d6102182f087f5e427352f7c2", "score": "0.57815784", "text": "public function broadcastOn()\n {\n// return new PrivateChannel('my-channel'.$this->volunteerId);\n return ['my-channel'.$this->volunteerId];\n }", "title": "" }, { "docid": "963d5ee09c86e197dd7cb071d1a35fad", "score": "0.57618314", "text": "public function broadcastOn()\n {\n return new Channel('channel-name');\n }", "title": "" }, { "docid": "925b4dd15203d234715c927592b6644f", "score": "0.5755877", "text": "public function broadcastOn() {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" }, { "docid": "22038489056ba50178d66035b14e4250", "score": "0.57511306", "text": "public function broadcastOn()\n {\n return new PrivateChannel('channel-name');\n }", "title": "" } ]
85e2db34c0e5fae2fc8ef5b4d82f5633
Fetches whether the user has configured phpLDAPadmin to obfuscate passwords with "" when displaying them. This is configured in config.php thus: $obfuscate_password_display = true;
[ { "docid": "ed2e0b1cb1acf0f1332a665d35a33915", "score": "0.8389693", "text": "function obfuscate_password_display()\n{\n\tglobal $obfuscate_password_display;\n\tif( isset( $obfuscate_password_display ) && true == $obfuscate_password_display )\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" } ]
[ { "docid": "11f336744a70c8ecdc3b6550550075ac", "score": "0.69023615", "text": "function show_password_fields($show_password_fields)\n{\n return false;\n}", "title": "" }, { "docid": "6284b976e54aac93c4523822519fa19e", "score": "0.6135272", "text": "protected static function addPasswordIfNeeded()\n {\n if (_DB_PASSWD_) {\n return \" --password=\" . _DB_PASSWD_;\n }\n\n return '';\n }", "title": "" }, { "docid": "20e446500e62ad96ccf46aa5cf87743a", "score": "0.6114185", "text": "protected function isUnicodePwdHackNeeded()\n {\n if (!(isset($this->connection) && $this->connection->getConfig()->getLdapType() == LdapConnection::TYPE_AD && isset($this->schema))) {\n return false;\n }\n\n return $this->schema->hasNamesMappedToAttribute('unicodePwd');\n }", "title": "" }, { "docid": "af4b13065c7eb00650f9d412958eba7d", "score": "0.6090596", "text": "function password_short($credential) {\n$rtn_value = false;\nif (get_magic_quotes_gpc()) {\n$credential = stripslashes($credential); }\nif ((strlen($credential) >= 4)) {\n$rtn_value=true; } return $rtn_value; }", "title": "" }, { "docid": "e907b20769e0ebecd2a5d84963b94c4e", "score": "0.60345644", "text": "public function isPasswordAutocompleteOff()\n {\n return $this->_rootElement->find($this->passwordFieldWithAutocompleteOff)->isVisible();\n }", "title": "" }, { "docid": "a8e95622087aeee4d5994ff4e6b3f30a", "score": "0.6015919", "text": "public function getEnforceSpecialCharacters(): bool {\n\t\t$enforceSpecialCharacters = $this->config->getAppValue(\n\t\t\t'password_policy',\n\t\t\t'enforceSpecialCharacters',\n\t\t\t'0'\n\t\t);\n\n\t\treturn $enforceSpecialCharacters === '1';\n\t}", "title": "" }, { "docid": "d352637d52ee505cc95cea566b5a0ca1", "score": "0.5924369", "text": "public function sanitizePassword()\n {\n }", "title": "" }, { "docid": "9f915bf6cbd7095dcdc46f03280a0157", "score": "0.58615035", "text": "function wpwebapp_get_disable_pw_confirm_field() {\n\t$options = wpwebapp_get_plugin_options_pw_change();\n\treturn $options['disable_pw_confirm_field'];\n}", "title": "" }, { "docid": "3ff581263851a79af3c6dd3464f4b62e", "score": "0.58597565", "text": "public function showPwd()\n\t{\n\t\t/*$this->view->showPwd(\"\") a que pagina retorno */\n\t}", "title": "" }, { "docid": "38832a104a4abb716384dfb25464dea2", "score": "0.5752869", "text": "public static function azerazerPassword(): string\n {\n return static::$password;\n }", "title": "" }, { "docid": "b56c08324b3f8529a2860736eb8a35b3", "score": "0.5749727", "text": "function password_long($credential) {\n$rtn_value = false;\nif (get_magic_quotes_gpc()) {\n$credential = stripslashes($credential); }\nif((strlen($credential) <= 12)) {\n$rtn_value=true; } return $rtn_value; }", "title": "" }, { "docid": "81de93f345eebc261718a21b26f943e6", "score": "0.5732312", "text": "public function isPasswordVisible()\n {\n $mapping = $this->dataMapping();\n return $this->_rootElement->find(\n $mapping['customer']['value']['password']['selector']\n )->isVisible();\n }", "title": "" }, { "docid": "e2412de650b496bebe27c42d9a77e50f", "score": "0.570684", "text": "public function getIsRequireAdminUserToChangeUserPassword()\n {\n return Mage::getStoreConfigFlag(self::XML_PATH_CUSTOMER_REQUIRE_ADMIN_USER_TO_CHANGE_USER_PASSWORD);\n }", "title": "" }, { "docid": "5acbea4726ec22d5b9efa2c2dfc7d234", "score": "0.5696526", "text": "private function __render_password(){\n\t\t// Render the password field\n\t\tif(!isset($this->renderOptions['placeholder'])) $this->renderOptions['placeholder'] = 'Password';\n\t\t$output = $this->__render_input();\n\n\t\t// Render the password confirmation field\n\t\t$this->renderOptions['name'] = $this->getFieldOption('name').'_confirm';\n\t\t$this->renderOptions['fieldID'] = $this->getFieldOption('fieldID').'_confirm';\n\t\t$this->renderOptions['placeholder'] = $this->getFieldOption('placeholder').' Confirmation';\n\t\t$output .= $this->__render_input();\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "a68e523cab2376b7ca1efddd90337ad5", "score": "0.5682439", "text": "public static function get_displayusernames() {\n return false;\n }", "title": "" }, { "docid": "bf28e78acd9d94a719553f3c4da91891", "score": "0.5672303", "text": "function getUserPwdModUi() {\n\n require_once(_base_ . '/lib/lib.form.php');\n\n $html = '<div class=\"up_user_info\">'\n . '<div class=\"up_name\">' . $this->resolveUsername(false, getLogUserId()) . '</div>';\n // user standard info -----------------------------------------------------------------\n $html .= Form::openForm('mod_pwd', $this->_url_man->getUrl($this->_varname_action . '=savepwd'));\n\n if (!$this->_user_profile->godMode()) {\n\n $html .= Form::getPassword($this->_lang->def('_OLD_PWD'), 'up_old_pwd', 'up_old_pwd', '255');\n }\n $html .= Form::getPassword(Lang::t('_NEW_PASSWORD', 'register'), 'up_new_pwd', 'up_new_pwd', '255')\n . Form::getPassword(Lang::t('_RETYPE_PASSWORD', 'register'), 'up_repeat_pwd', 'up_repeat_pwd', '255');\n\n $html .= Form::openButtonSpace()\n . Form::getButton('save', 'save', $this->_lang->def('_SAVE'));\n if (Get::sett('profile_only_pwd') == 'off') {\n $html .= Form::getButton('undo', 'undo', $this->_lang->def('_UNDO'));\n }\n $html .= Form::closeButtonSpace();\n\n $html .= Form::closeForm()\n . '</div>';\n\n return $html;\n }", "title": "" }, { "docid": "7edd2c9468ddd4124a0ffe7b1493f076", "score": "0.5651056", "text": "public function isPasswordChangeForced(): bool;", "title": "" }, { "docid": "1f3acc13e7cc4129a8a915f24d426638", "score": "0.5650425", "text": "public function matchPwd(){\n\tif ($this->data['User']['passwd']!=$this->data['User']['passwd_confirm'] ) {\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "bf9c558ee4f74ea2a80566cac6673cf0", "score": "0.5645331", "text": "public function getPassword() {\n $encrypted_pass = Mage::getStoreConfig('storesms/main_conf/apipassword');\n return Mage::helper('core')->decrypt($encrypted_pass);\n }", "title": "" }, { "docid": "e60a1b970278f2a6236e0c0c866f4935", "score": "0.5614491", "text": "public function getPlainPassword();", "title": "" }, { "docid": "e60a1b970278f2a6236e0c0c866f4935", "score": "0.5614491", "text": "public function getPlainPassword();", "title": "" }, { "docid": "437ce238b2b09faaac30acbd9d383700", "score": "0.56134105", "text": "public function getAdminPassword()\n {\n $settings = $this->getSettings();\n return $settings['admin_password'];\n }", "title": "" }, { "docid": "dca8572da2efc24a9c35ec9571b3c8a5", "score": "0.560268", "text": "public function getAdminPassword()\n {\n return $this->getParameter('adminPassword');\n }", "title": "" }, { "docid": "d38c8b3552fd27d61136eea144727cc8", "score": "0.5598189", "text": "public function displayInAdmin()\n {\n return false;\n }", "title": "" }, { "docid": "d38c8b3552fd27d61136eea144727cc8", "score": "0.5598189", "text": "public function displayInAdmin()\n {\n return false;\n }", "title": "" }, { "docid": "b5a078c18d583ea3aeb204d31a652f59", "score": "0.5598011", "text": "protected function generateAdminPassword()\n {\n return\n Util::getRandomString(1, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') .\n Util::getRandomString(1, '0123456789') .\n Util::getRandomString(1, '@*^%#()<>') .\n Util::getRandomString();\n }", "title": "" }, { "docid": "d1f5300b3b2724aba96bb05528b3f95e", "score": "0.5587635", "text": "public static function PasswordIncludesSpecial($pwd)\n {\n //code\n }", "title": "" }, { "docid": "b9ee0e9a640776842edcbced08aa2c83", "score": "0.5581805", "text": "function payzen_api_password($config){\n\tif ($config['mode_test']){\n\t\treturn (empty($config['API_PASSWORD_test']) ? '' : $config['API_PASSWORD_test']);\n\t}\n\n\treturn (empty($config['API_PASSWORD']) ? '' : $config['API_PASSWORD']);\n}", "title": "" }, { "docid": "02ecb567ce8ff07d42f84b335a05fd61", "score": "0.5529339", "text": "public function hasPassword()\n {\n if($this->logPassword === false){\n return false;\n } else {\n return true;\n }\n\n }", "title": "" }, { "docid": "6db7901aa956e7e1b7703d3c8b1de9ab", "score": "0.55192274", "text": "public function allowEncryptedTextPassword()\n {\n return $this->add(static::ENCRYPTED_TEXT_PWD_ALLOWED);\n }", "title": "" }, { "docid": "b7a34b832a7ee4ee773cd150be697645", "score": "0.54945296", "text": "function prevent_local_passwords() {\n return true;\n }", "title": "" }, { "docid": "11c0b8fc04493765f9fb115dc48f37ed", "score": "0.5492927", "text": "public function asPassword(): string;", "title": "" }, { "docid": "505eec501b372d75d0c09914f2b71b46", "score": "0.5491446", "text": "function can_change_password() {\n return false;\n }", "title": "" }, { "docid": "b8020e270dcad2c9e6e08e9e3a8bae6b", "score": "0.5484378", "text": "public function netxPassword() {\n\t\t$options = get_option('netx_options');\n\t\techo '<input type=\"password\" name=\"netx_options[netx_password]\" value=\"' . $options['netx_password'] . '\" />';\n\t}", "title": "" }, { "docid": "31aa77f65d784a89caa7c82f7abba155", "score": "0.5474693", "text": "function antiinjekpas($password)\n{\n\t$p_aman=mysql_escape_string(stripcslashes(strip_tags(htmlspecialchars($password,ENT_QUOTES))));\n\treturn $p_aman;\n}", "title": "" }, { "docid": "1178789e0245fbccf1388c7af35a45d5", "score": "0.5472907", "text": "function getPassword();", "title": "" }, { "docid": "c1fac6e3f66b7f52e70e61dd0f003d22", "score": "0.547163", "text": "public function setAllowEncryptedTextPassword(): static\n {\n return $this->setFlag(static::ENCRYPTED_TEXT_PWD_ALLOWED);\n }", "title": "" }, { "docid": "17116190f85d53eacaa31a6edd0b4215", "score": "0.54390925", "text": "public function getEnforceNonCommonPassword(): bool {\n\t\t$enforceNonCommonPasswords = $this->config->getAppValue(\n\t\t\t'password_policy',\n\t\t\t'enforceNonCommonPassword',\n\t\t\t'1'\n\t\t);\n\t\treturn $enforceNonCommonPasswords === '1';\n\t}", "title": "" }, { "docid": "b4828923d77384d599f1ddbe446fa629", "score": "0.542919", "text": "protected function hasValidChars()\n\t{\n\t\t$res = filter_var($this->password, FILTER_UNSAFE_RAW, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH);\n\t\tif($res == $this->password) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "90e2b05c76e17f57ec38950a6574a131", "score": "0.54175735", "text": "protected function checkSecretWord()\n\t{\n\t\t$password = $this->cparams->getValue('adminpw', '');\n\n\t\t$myURI = JUri::getInstance();\n\n\t\t// If the \"password\" query param is not defined, the default value\n\t\t// \"thisisnotgood\" is returned. If it is defined, it will return null or\n\t\t// the value after the equal sign.\n\t\t$check = $myURI->getVar($password, 'thisisnotgood');\n\n\t\tif ($check == 'thisisnotgood')\n\t\t{\n\t\t\t// Uh oh... Unauthorized access! Let's redirect the intruder back to the site's home page.\n\t\t\tif (!$this->exceptionsHandler->logAndAutoban('adminpw'))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->redirectAdminToHome();\n\t\t}\n\t}", "title": "" }, { "docid": "3f87bc9b17dfba6d4f545d1ee9b21c63", "score": "0.5411779", "text": "protected function getApiPassword()\n {\n return (bool) $this->config->getValue('sandbox_flag')\n ? $this->config->getValue('sandbox_api_password')\n : $this->config->getValue('live_api_password');\n }", "title": "" }, { "docid": "18eb235016f420f4b7f666247a6ff1fa", "score": "0.54055715", "text": "private function hidePasswords($vars)\n {\n if (is_array($vars)) {\n foreach ($vars as $key => $item) {\n if (!is_array($item)) {\n if (strpos($key, 'password') !== false || strpos($key, '_pass') !== false || strpos($key, '_secret') !== false) {\n $vars[$key] = '******';\n }\n } else {\n $vars[$key] = $this->hidePasswords($item);\n }\n }\n }\n\n return $vars;\n }", "title": "" }, { "docid": "7f7e5909f1896d65ca7ef7965d8825ab", "score": "0.54024106", "text": "function has_password() {\n return !is_null($this->password);\n }", "title": "" }, { "docid": "5e97c3ae7e654f85c5760645dda7e7f2", "score": "0.5378442", "text": "public static function getPassword();", "title": "" }, { "docid": "2375dbc16c7226d50182060259463071", "score": "0.53735024", "text": "public function isEnabled()\n\t{\n\t\tif (!$this->container->platform->isBackend())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$password = $this->cparams->getValue('adminpw', '');\n\n\t\treturn !empty($password);\n\t}", "title": "" }, { "docid": "e673191ea7917889a2e1a1b70c3464d0", "score": "0.5366766", "text": "function display_options()\n\t{\n\t\treturn array(\n\t\t\t'title'\t=> 'CHANGE_PASSWORD',\n\t\t\t'vars'\t=> array(\n\t\t\t\t'legend1'\t\t\t\t=> 'CHANGE_PASSWORD',\n\t\t\t\t'user_req'\t\t\t\t=> array('lang' => 'USERNAMEID', 'type' => 'text:40:255', 'explain' => true, 'select_user' => true),\n\t\t\t\t'new_password'\t\t\t=> array('lang' => 'PASSWORD', 'type' => 'password:40:255', 'explain' => false),\n\t\t\t\t'password_confirm'\t\t=> array('lang' => 'PASSWORD_CONFIRM', 'type' => 'password:40:255', 'explain' => false),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "b5e0c0a23c1b521310e5cac70fc2bad7", "score": "0.53572714", "text": "public function getAdminPwd()\n {\n return $this->getNodeValue('admin/passwd');\n }", "title": "" }, { "docid": "ac3e792ce1761537f2f0859a57dffbaf", "score": "0.5353842", "text": "public function isAdmin()\n {\n if ($this->attributes['idpapel'] === 1) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "20d58a70fd315bafc1c64a18204f123f", "score": "0.5351214", "text": "function checkPassword($adminpassword){\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])[[:print:]]{8,}$/';\n return preg_match($pattern, $adminpassword);\n}", "title": "" }, { "docid": "6fb689bf2d75dc67eadd4f95abaea91c", "score": "0.53435487", "text": "function field__password() {\n\n\t\t$output = \"<input type=\\\"password\\\" name=\\\"$this->name\\\" value=\\\"$this->val\\\" id=\\\"$this->id\\\" class=\\\"large-text $this->class\\\">\";\n\t\t$output .= $this->get__description_text();\n\n\t\t$this->set( 'output', $output );\n\n\t\treturn $this->output;\n\n\t}", "title": "" }, { "docid": "94ae246fae7f916f14a98fe989415e17", "score": "0.53432816", "text": "public function isAdmin(){\n\n $variable = $this->getValue(\"type\", \"officer\", \"username\", $this->user);\n if($variable == \"a\")\n return true;\n\n return false;\n }", "title": "" }, { "docid": "2ce65241f10bceb800e721cc0421f295", "score": "0.53379655", "text": "public function getEnabledProperty()\n {\n return ! empty($this->user->two_factor_secret);\n }", "title": "" }, { "docid": "dd47120bb89189845ead8a19bda3dd4a", "score": "0.53275114", "text": "public function getPassword()\n {\n return base64_decode($this->usuapass);\n }", "title": "" }, { "docid": "95936ff553b30e0dd3e51853ef111d3e", "score": "0.5327286", "text": "public function validate_passwords() {\n return $this->data[$this->alias]['secret'] === $this->data[$this->alias]['secretrep'];\n }", "title": "" }, { "docid": "1e127cbd6e0cc9fc69d9afaf8c99e908", "score": "0.5314469", "text": "function password_valid($credential) {\n$rtn_value = false;\nif (get_magic_quotes_gpc()) {\n$credential = stripslashes($credential); }\nif (!(preg_match(\"/[^a-z0-9_]/i\", $credential))) {\n$rtn_value=true; } return $rtn_value; }", "title": "" }, { "docid": "b1928f9fcd5d2f872d40f2e1a204e2ff", "score": "0.5313454", "text": "public function passwordProtected()\n {\n return (bool) $this->feed->protected;\n }", "title": "" }, { "docid": "d08b9412e21312ea3a36ddc093450218", "score": "0.5311538", "text": "function pkwl_show_options( $user ){\n\n // get users meta keys\n $meta_public_key = get_user_meta( $user->ID, 'pkwl_public_key' );\n $meta_disable_password = get_user_meta( $user->ID, 'pkwl_disable_password' );\n\n // if meta data does not exist, create it\n if( !isset($meta_public_key[0]) ){\n $meta_public_key[0] = \"\";\n }\n\n // check the input box\n if( isset($meta_disable_password[0]) && $meta_disable_password[0] == 1 ){\n $meta_disable_password[0] = ' checked=\"\"';\n } else {\n $meta_disable_password[0] = '';\n }\n\n // print options\n echo '<h3>Public-Key-Web-Login (PKWL)</h3>'\n .'<table class=\"form-table\">'\n .'<tr>'\n .'<th><label for=\"pkwl_public_key\">Public-Key</label></th>'\n .'<td>'\n .'<input id=\"pkwl_public_key\" type=\"text\" name=\"pkwl_public_key\" value=\"'.$meta_public_key[0].'\"/> <span class=\"description\"> Paste your public key here. </span>'\n .'</td>'\n .'</tr>'\n\n .'<tr>'\n .'<th><label for=\"pkwl_disable_password\">Disable Password-Login?</label></th>'\n .'<td>'\n .'<input id=\"pkwl_disable_password\" type=\"checkbox\" name=\"pkwl_disable_password\" value=\"1\"'.$meta_disable_password[0].'/> <span class=\"description\"> This option removes your password from the database. You will only be able to log in with PKWL from then on. If you disable this option afterwards, you will have to set a new password.</span>'\n .'</td>'\n .'</tr>'\n\n .'</table>';\n}", "title": "" }, { "docid": "86261bd51bf35e1a5a03ab3da759e0f2", "score": "0.5311425", "text": "public function getPassword()\n {\n return oxRegistry::getConfig()->getShopConfVar('tc_cleverreach_password');\n }", "title": "" }, { "docid": "c0a7c4764e7ed9a954461a2cf70eda07", "score": "0.53082573", "text": "public function getPassword()\n\t{\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "aac2c2aa913b364940aa126158905935", "score": "0.5293118", "text": "public function getPassword ( ) {\n\n return !empty($this->password) ? $this->password : false;\n }", "title": "" }, { "docid": "9728388ebb18a90bfd2c1e4d50b60559", "score": "0.52900434", "text": "public function getEnabledProperty(): bool\n {\n return ! empty($this->user->two_factor_secret);\n }", "title": "" }, { "docid": "9f79ebaacceb107feacde73ab1c1dab5", "score": "0.5274783", "text": "public function checkPwd(){\n\t$this->id = AuthComponent::user('id');\n\t$password = $this->field('password');\n\treturn(AuthComponent::password($this->data['User']['passwd_old']) == $password);\n}", "title": "" }, { "docid": "96fcfd638daa4d73f808336feedab5f0", "score": "0.52724165", "text": "function pkwl_update_options( $user_id ){\n\n if( current_user_can( 'edit_user', $user_id ) ){\n\n // get data via post\n $public_key = $_POST[\"pkwl_public_key\"];\n $disable_password = $_POST[\"pkwl_disable_password\"];\n\n // add leading 0x to string if it's missing\n $public_key = hexFix($public_key);\n\n /**\n * if a public key is set and if the user wants to disable password-login,\n * then overwrite his password hash in the db\n * the user will be logged out\n */\n if($disable_password == NULL || !isset($public_key) || $public_key == \"\"){\n\n $disable_password = 0;\n\n } else {\n\n $disable_password = 1;\n\n /**\n * set the password to a value that is not possible by the hash\n * function (= that is not in the set of plaintext values) to\n * disable the login via password\n */\n global $wpdb;\n $wpdb->update($wpdb->users, array('user_pass' => 'PKWL', 'user_activation_key' => ''), array('ID' => $user_id) );\n\n // apply the change by deleting the cache\n wp_cache_delete($user_id, 'users');\n }\n\n // input is escaped by wordpress\n update_user_meta( $user_id, 'pkwl_public_key', $public_key);\n update_user_meta( $user_id, 'pkwl_disable_password', $disable_password);\n\n }\n}", "title": "" }, { "docid": "fc5be43b505a168cb9b6d788fc1cda8c", "score": "0.5266106", "text": "function _force_new_password_is_admin() {\n global $user;\n\n if ($user->uid == 1) {\n return TRUE;\n }\n\n return FALSE;\n}", "title": "" }, { "docid": "879303a90a68b30662c94437a4ab961c", "score": "0.52635485", "text": "public function isSafePassword()\n {\n return ($this->email != $this->password) && ($this->username != $this->password);\n }", "title": "" }, { "docid": "8fc68098df8382c83d4533a876d58c56", "score": "0.5259996", "text": "function modifyPassword(){}", "title": "" }, { "docid": "a00edf0928f590e63cf625851903db73", "score": "0.5258501", "text": "public function api_pwd_callback(){\n\t\t$val1 = $val2 = '';\n\t\tif( !isset( $this->options['use_apikey'] ) ) {\n\t\t\tif( isset( $this->options['api_pwd'] ) ) {\n\t\t\t\t$val1 = esc_attr( $this->options['api_pwd'] );\n\t\t\t\t$val2 = '';\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tif( isset( $this->options['api_pwd'] ) ) {\n\t\t\t\t$val1 = esc_attr( $this->options['api_pwd'] );\n\t\t\t}\n\t\t\t$val2 = 'readonly=\"readonly\"';\n\t\t}\n\t\tif( empty( $this->options ) ) {\n\t\t\t$val1 = '';\n\t\t\t$val2 = 'readonly=\"readonly\"';\n\t\t}\n printf(\n '<input type=\"password\" autocomplete=\"off\" placeholder=\"Password\" id=\"api_pwd\" name=\"fd_apikey[api_pwd]\" class=\"regular-text\" value=\"%s\" %s>', $val1, $val2\n );\n }", "title": "" }, { "docid": "0a465ef58d7ba88461ce017f13d13d71", "score": "0.5247798", "text": "function print_lost_password_link() {\r\n\t\t# lost password feature disabled or reset password via email disabled -> stop here!\r\n\t\tif( ( ON == config_get( 'lost_password_feature' ) ) &&\r\n\t\t\t( ON == config_get( 'send_reset_password' ) ) &&\r\n\t\t\t( ON == config_get( 'enable_email_notification' ) ) ) {\r\n\t\t\tprint_bracket_link( 'lost_pwd_page.php', lang_get( 'lost_password_link' ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "38d14bf217f342e1150ecbc50c698974", "score": "0.52458715", "text": "public function getPassword(): string;", "title": "" }, { "docid": "533df280b87456ccafa707cbaa7b1874", "score": "0.5242549", "text": "protected function getUserPassword()\n {\n return Load::Password(Yii::app()->user->id);\n }", "title": "" }, { "docid": "48e1d9fef286f45d1f1a2734bb0394b0", "score": "0.5240172", "text": "public function hasPassword(): bool {\n return $this->pass !== null;\n }", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "a23e5f91b8a2c69cf2ce80ea20e1fe86", "score": "0.5227861", "text": "public function getPassword();", "title": "" }, { "docid": "b279a3844d7bec1e0f6f135706ec7a2f", "score": "0.52271", "text": "public function showUserInfo(){\n if($this->isPasswordKeptAsHash)\n {\n $isPassword=\"yes\";\n }\n else{\n $isPassword=\"no\";\n }\n echo \"Id: \".$this->id.\"<br>\".\"Login: \".$this->login.\"<br>\".\"Password_Hash: \".$this->password_hash.\"<br>\".\"Salt: \".$this->salt.\"<br>\".\"isPasswordKeptAsHash: \".$isPassword.\"<br>\";\n }", "title": "" }, { "docid": "7d5c9d734494c2e211fc8eb5c03902ae", "score": "0.5226563", "text": "public function getPassword() : string;", "title": "" }, { "docid": "b7b7d5f199209189f9cc64598117d900", "score": "0.52233976", "text": "function is_ur_lost_password_page() {\n\t\tglobal $wp;\n\n\t\treturn ( is_ur_account_page() && isset( $wp->query_vars['ur-lost-password'] ) );\n\t}", "title": "" }, { "docid": "239c971b178fdb1d46b37dcd6a3d8b4e", "score": "0.52230626", "text": "function username_long($credential) {\n$rtn_value = false;\nif (get_magic_quotes_gpc()) {\n$credential = stripslashes($credential); }\nif((strlen($credential) <= 12)) {\n$rtn_value=true; } return $rtn_value; }", "title": "" }, { "docid": "4077ff1cd0b9bfbecd4c57bd88f76c9d", "score": "0.5213326", "text": "function shibboleth_profile_personal_options() {\n\t$user = wp_get_current_user();\n\tif (get_user_meta($user->ID, 'shibboleth_account')) {\n\t\tadd_filter('show_password_fields', function($v) {\n\t\t\treturn false;\n\t\t});\n\n\t\tadd_action('admin_footer-profile.php', 'shibboleth_admin_footer_profile');\n\t}\n}", "title": "" }, { "docid": "4da0423e8f401583b60bae81053eef80", "score": "0.52097785", "text": "function checkUserPwd() {\n\n $acl_man = & Docebo::user()->getAclManager();\n\n $this->loadUserData(getLogUserId());\n if (!$this->_user_profile->godMode()) {\n\n if ($this->user_info[ACL_INFO_PASS] != $acl_man->encrypt($_POST['up_old_pwd'])) {\n\n return $this->_lang->def('_OLDPASSWRONG');\n }\n // control password\n if (strlen($_POST['up_new_pwd']) < Get::sett('pass_min_char')) {\n\n return $lang->def('_PASSWORD_TOO_SHORT');\n }\n if (Get::sett('pass_alfanumeric') == 'on') {\n if (!preg_match('/[a-z]/i', $_POST['up_new_pwd']) || !preg_match('/[0-9]/', $_POST['up_new_pwd'])) {\n\n return $lang->def('_ERR_PASSWORD_MUSTBE_ALPHA');\n }\n }\n //check password history\n\n if (Get::sett('user_pwd_history_length', '0') != 0) {\n\n $new_pwd = $acl_man->encrypt($_POST['up_new_pwd']);\n if ($user_info[ACL_INFO_PASS] == $new_pwd) {\n\n return str_replace('[diff_pwd]', Get::sett('user_pwd_history_length'), Lang::t('_REG_PASS_MUST_DIFF', 'profile'));\n }\n $re_pwd = sql_query(\"SELECT passw \"\n . \" FROM \" . $GLOBALS['prefix_fw'] . \"_password_history\"\n . \" WHERE idst_user = \" . getLogUserId() . \"\"\n . \" ORDER BY pwd_date DESC\");\n\n list($pwd_history) = sql_fetch_row($re_pwd);\n for ($i = 0; $pwd_history && $i < Get::sett('user_pwd_history_length'); $i++) {\n\n if ($pwd_history == $new_pwd) {\n\n return str_replace('[diff_pwd]', Get::sett('user_pwd_history_length'), Lang::t('_REG_PASS_MUST_DIFF', 'profile'));\n }\n list($pwd_history) = sql_fetch_row($re_pwd);\n }\n }\n }\n if ($_POST['up_new_pwd'] != $_POST['up_repeat_pwd']) {\n\n return Lang::t('_ERR_PASSWORD_NO_MATCH', 'register');\n }\n return true;\n }", "title": "" }, { "docid": "92fefcc267cb050dd3298e58daeba7d0", "score": "0.52043295", "text": "function getFilledPwd() {\n\n return Get::req('up_new_pwd', DOTY_MIXED, '');\n }", "title": "" }, { "docid": "1e5f3c873b026973ef35c41dae019b65", "score": "0.5198586", "text": "protected function getPasswordField(): string\n {\n return 'password';\n }", "title": "" }, { "docid": "561f011ddc68f14bbd1c6e2cf47ddb06", "score": "0.5196675", "text": "function adPWCrypt($user_password) {\r\n $CI = & get_instance();\r\n $pwsalt = $CI->config->item('pwsalt');\r\n return crypt($user_password, $pwsalt);\r\n}", "title": "" }, { "docid": "5f40388326213df012574f6983d776d6", "score": "0.51935536", "text": "public function getPassword(bool $encode = false): string {\n if ($encode && $this->pass !== null) {\n return rawurlencode($this->pass);\n }\n return (string) $this->pass;\n }", "title": "" }, { "docid": "5348d3beb2e6fd944da8b6af73cfcf0f", "score": "0.5182104", "text": "public function getPasswordRules() : string;", "title": "" }, { "docid": "928dfbd603759dacd571532b55120890", "score": "0.51709586", "text": "function form_backend_validation()\r\n {\r\n return ($this->get_element_value('Password') == FT_PASSWORD) ;\r\n }", "title": "" }, { "docid": "7a750c34e313b3674bd36c934137111f", "score": "0.51651806", "text": "function better_password_activate(){\n\tglobal $wpdb;\n\n\t//\tPHP >= 5.3.7\n\tif (version_compare(PHP_VERSION, '5.3.7') < 0) {\n\t\tdie('Sorry, I need at least PHP 5.3.7.');\n\t}\n\n\t$wpdb->query(\"ALTER TABLE `{$wpdb->users}` CHANGE COLUMN `user_pass` `user_pass` VARCHAR(255) NOT NULL DEFAULT ''\");\n}", "title": "" }, { "docid": "29166958dcf51ed5d6f6dd40e4ee41b4", "score": "0.5160972", "text": "public function displayInAdmin()\n {\n //TODO: implement...\n return true;\n }", "title": "" }, { "docid": "0d4a2731db5b4e2d0a0d45b11cfd5bb7", "score": "0.51542574", "text": "function get_password() {\n return $this->password;\n }", "title": "" }, { "docid": "12443dd6f0a36d51e55760be3e6a30ef", "score": "0.51525223", "text": "public function canDisplayAdminInfo()\n {\n return $this->_adminInfoHelper->isEnabled();\n }", "title": "" }, { "docid": "124f7819bf663ba9e949f386384e28df", "score": "0.5151743", "text": "function ctr_pasword($username, $pasword){\n\n\t\t// Nivel usuario segun user y pasword. \n\t\t// Cogemos los datos de la sesion que estan dentro de la array\n\t\t// '===' :compara contenido y tipo contenido\n\t\tif (\t$username\t \t== $_SESSION['cfg']['saved_user'] && \n\t\t\t\tmd5($pasword) \t=== $_SESSION['cfg']['saved_hash']) { \n\t\t\t// Nivel Admin\n\t\t\treturn 'admin';\n\t\t};\n\t\treturn false;\n\t}", "title": "" }, { "docid": "97cef11db31eee1c80898325dc1679a3", "score": "0.5148353", "text": "function disablePasswordRecovery()\n\t{\n\t\tif ($this->isActive() && $this->locationIs('bb-reset-password.php')) {\n\t\t\t$user_login = user_sanitize($_POST['user_login']);\n\t\t\tif (!empty($user_login)) {\n\t\t\t\t$user = bb_get_user_by_name($user_login);\n\t\t\t\tbb_die(__('Password recovery is not possible for this account because it uses an LDAP username and password to login. To change your LDAP password, please contact your system administrator.'));\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
28c5f789f9676748d43dd2cacbff5084
Sets the application entity
[ { "docid": "7f91a8903d51760500c0affb4cc6e61c", "score": "0.6962709", "text": "public function setApplicationEntity(Application $application)\n {\n $this->application = $application;\n return $this;\n }", "title": "" } ]
[ { "docid": "470d7bb5c518ae469a181307acc89500", "score": "0.6573211", "text": "public function setEntity( $entity )\n {\n \n $this->entity = $entity;\n \n }", "title": "" }, { "docid": "d434be93c001cfa96805121f1e47cf8c", "score": "0.65018505", "text": "public function setApplication(Application $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "bf17f1aec427a7c6020cfb9ebe0216c2", "score": "0.647195", "text": "public function setEntity($val) {\n $this->_entity = $val;\n }", "title": "" }, { "docid": "bf17f1aec427a7c6020cfb9ebe0216c2", "score": "0.647195", "text": "public function setEntity($val) {\n $this->_entity = $val;\n }", "title": "" }, { "docid": "8370a54bec9c3a1fc0cfe071412f30df", "score": "0.6463818", "text": "public function setApp($app);", "title": "" }, { "docid": "58175b62605e3d10e7a18c8e4a9a340a", "score": "0.64481735", "text": "final public function setEntity($entity) {\n $this->entity = $entity;\n }", "title": "" }, { "docid": "d78f1bd3e3d83a3ceed32733647dc82d", "score": "0.63826746", "text": "public function getApplicationEntity()\n {\n return $this->application;\n }", "title": "" }, { "docid": "09dd4e1720c6a97df0dec52f4cc747ad", "score": "0.6377499", "text": "public static function setApplicationObject(SApplication &$app) {\n\t\tself::$app = &$app;\n\t}", "title": "" }, { "docid": "b8d64bcf195bfb5568686c48c84aafcb", "score": "0.63703007", "text": "public function setApplication($value);", "title": "" }, { "docid": "bceb3913a11b67976ed68cac8a8294b4", "score": "0.622311", "text": "public function set(StorageEntityInterface $appStore) {\n $this->session->{$this->member}=$appStore;\n }", "title": "" }, { "docid": "9434ce06959ab6ee3911c3231ca8c679", "score": "0.6222072", "text": "public function setApplication(Application $application)\n {\n $this->application = $application;\n }", "title": "" }, { "docid": "9434ce06959ab6ee3911c3231ca8c679", "score": "0.6222072", "text": "public function setApplication(Application $application)\n {\n $this->application = $application;\n }", "title": "" }, { "docid": "e06583b2b98d8b3c30985cfab394838f", "score": "0.62091494", "text": "public function setApplication(Application $application)\n {\n if ($this->application == null) {\n $this->application = $application;\n }\n }", "title": "" }, { "docid": "87b87bbe926987b6ed5ff554bbb6deaa", "score": "0.6185943", "text": "function set_application($application)\r\n {\r\n $this->set_default_property(self :: PROPERTY_APPLICATION, $application);\r\n }", "title": "" }, { "docid": "87b87bbe926987b6ed5ff554bbb6deaa", "score": "0.6185943", "text": "function set_application($application)\r\n {\r\n $this->set_default_property(self :: PROPERTY_APPLICATION, $application);\r\n }", "title": "" }, { "docid": "6e178f1106140afc7a8d3dd922e02629", "score": "0.6178439", "text": "public function setApplication($application) {\n\t\t$this->application = $application;\n\t}", "title": "" }, { "docid": "2abe027c99e4b0938af4d4502f632518", "score": "0.60838217", "text": "public function setEntity( $entity )\n {\n\n $this->setEntityHostingSubdomain( $entity );\n\n }", "title": "" }, { "docid": "e10c1fcd739a3c4347e9738744ecca8d", "score": "0.60587096", "text": "public function setEntity ($entity)\n {\n if ($entity instanceof Mage_Eav_Model_Entity_Abstract) {\n $this->_entity = $entity;\n } elseif (is_string($entity) ||\n $entity instanceof Mage_Core_Model_Config_Element) {\n $this->_entity = Mage::getModel('eav/entity')->setType($entity);\n } else {\n Mage::throwException(\n Mage::helper('eav')->__('Invalid entity supplied: %s', \n print_r($entity, 1)));\n }\n return $this;\n }", "title": "" }, { "docid": "8d0ccb9e66143bee193e64949557a77b", "score": "0.60522985", "text": "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "title": "" }, { "docid": "8d0ccb9e66143bee193e64949557a77b", "score": "0.60522985", "text": "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "title": "" }, { "docid": "0abaf1efe7dac0a774120c2ad13a5ca4", "score": "0.60395247", "text": "public static function setApplication($app)\n\t{\n\t\tstatic::$app = $app;\n\t}", "title": "" }, { "docid": "8d624444aef5056e79baf79075032d51", "score": "0.59727854", "text": "private function setAppOnContext()\n {\n if ($this->context instanceof ApplicationAwareContext) {\n $this->context->setApp($this->app);\n }\n }", "title": "" }, { "docid": "7a338cce87746ea89713bdf82630b77e", "score": "0.59354466", "text": "public function setApp($app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "7a338cce87746ea89713bdf82630b77e", "score": "0.59354466", "text": "public function setApp($app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "7a338cce87746ea89713bdf82630b77e", "score": "0.59354466", "text": "public function setApp($app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "e930d245ea65adfa8de5cffac7b2e244", "score": "0.58524144", "text": "public function setCurrentApplication($application);", "title": "" }, { "docid": "2e582a1f88ede468b0962f084ba91f3d", "score": "0.58334213", "text": "public function _set_app(Application\\Base $app)\n\t{\n\t\t$this->_app = $app;\n\t}", "title": "" }, { "docid": "9eb8a99ece8f13e25506a4464b6b678b", "score": "0.5820823", "text": "public function setEntity(\\Entity $value=null)\n {\n return $this->set(self::ENTITY, $value);\n }", "title": "" }, { "docid": "0e4eeda8a177b142f77d3ee80ec2f2a5", "score": "0.5789684", "text": "public static function applicationSet(Application $app) {\r\n //creates database connection if one doesn't already exist\r\n self::setInstance();\r\n \r\n //determine if application already exists in database\r\n $exists = self::$instance->select(\"applications\", [\"id\"], [\"id\"=>$app->getID()]);\r\n \r\n //check to see if application already exists in database\r\n if (sizeof($exists) === 0) {\r\n //create new application if one doesn't exist\r\n $id = self::$instance->insert(\"applications\", self::makeSQLArray($app));\r\n } \r\n else {\r\n //update application if it already exists\r\n self::$instance->update(\"applications\", self::makeSQLArray($app), [\"id\" => $app->getID()]);\r\n $id = $app->getID();\r\n }\r\n \r\n //remove all existing keywords\r\n self::$instance->delete(\"keywords\", [\"id\" => $id]);\r\n \r\n //create an array of the keywords to be inserted\r\n $keyword_array = array();\r\n foreach($app->getKeywords() as $word) {\r\n $keyword_array[] = array(\"id\" => $id, \"word\" => $word);\r\n }\r\n \r\n //insert keywords into keyword table\r\n self::$instance->insert(\"keywords\", $keyword_array);\r\n \r\n return $id;\r\n }", "title": "" }, { "docid": "21aa00dc4b427857481fc2ed1efaf44e", "score": "0.575747", "text": "public function setApp(ApplicationInterface $app): void;", "title": "" }, { "docid": "6dcb085742676cd09af11f6d62623ff3", "score": "0.5757329", "text": "public function setEntity($entity)\r\n {\r\n $this->entity = $entity;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "86a538dc46b65d97c0e54feb780152bc", "score": "0.57505107", "text": "public function setEntity( $entity )\n {\n\n $this->setEntityWbfsysEntityRoleActions( $entity );\n\n }", "title": "" }, { "docid": "8e7995e150bcf338382493a917f50d8c", "score": "0.5743483", "text": "public function setEntity($entity)\n {\n $this->_entity = $entity;\n return $this;\n }", "title": "" }, { "docid": "25273fcdf013e7ed476650c5621e06d6", "score": "0.5731472", "text": "public function setEntity($entity)\n {\n $this->entity = $entity;\n return $this;\n }", "title": "" }, { "docid": "eea626c6c8d7798f6fb023ff30f3fa61", "score": "0.5706818", "text": "public function getAppEntity()\n {\n return Mage::getModel('gene_bluefoot/entity')->load($this->getEntity()->getData($this->getAttribute()->getData('attribute_code')));\n }", "title": "" }, { "docid": "15e6df5ed6b3804c72c08092dc4a6741", "score": "0.5676175", "text": "public function setEntity( $entity )\n {\n\n $this->setEntityWbfsysCalendarHoliday( $entity );\n\n }", "title": "" }, { "docid": "029fdb3501308419ae078c338c8eef00", "score": "0.56706035", "text": "public function setApplication(\\Smally\\Application $application){\n\t\t$this->_application = $application;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d9f997f9937ad1c4e11e994d7635654c", "score": "0.5632579", "text": "public function setEntity($entity = array())\n {\n // check if only one entry is given\n if (count($entity) <> 1) {\n throw new Zend_Service_Itunes_Exception('Must be set with\n one key/value-pair!');\n }\n\n // fetch key from parameter\n $_tmp = array_keys($entity);\n $key = array_pop($_tmp);\n\n // check if the key of the given array exists\n if (array_key_exists($key, $this->_entityList)) {\n // check if value exists for key\n if (in_array($entity[$key], $this->_entityList[$key]))\n $this->_options['entity'] = $entity;\n }\n\n return $this;\n }", "title": "" }, { "docid": "f281c5239ac44efe5ca30d1b0abf8afe", "score": "0.56154555", "text": "public function setEntity($entity)\n {\n $this->entity = $entity;\n\n return $this;\n }", "title": "" }, { "docid": "68165ebe342f7bfa0d1d518edc44ead4", "score": "0.56037796", "text": "public function setApplication($app)\n {\n $this->app = $app;\n\n return $this;\n }", "title": "" }, { "docid": "99b1cc99764460b48affabbb74e78dbe", "score": "0.5578723", "text": "public function __construct(Application $Application, string $entity)\n {\n $this->Application = $Application;\n $this->entity = $entity;\n $this->loadMapping();\n $this->setTable();\n $this->setIdColumn();\n }", "title": "" }, { "docid": "d74f2add814ccb09eb3e5585abeb3360", "score": "0.5522523", "text": "protected function setInstance($application)\n {\n $application->instance('app', $application);\n if ($this->isFramework('lumen')) {\n $application->instance(LumenApplication::class, $application);\n } else {\n $application->instance(Container::class, $application);\n }\n\n Container::setInstance($application);\n Facade::clearResolvedInstances();\n Facade::setFacadeApplication($application);\n }", "title": "" }, { "docid": "95bcba338b409fbed9a5ed62b60ef150", "score": "0.5480749", "text": "public function setDefaultEntity() {\n /** @var Ultimate_ModuleCreator_Model_Entity $entity */\n $entity = Mage::getModel('modulecreator/entity');\n $settings = Mage::getStoreConfig(Ultimate_ModuleCreator_Helper_Data::XML_ENTITY_CONFIG_PATH);\n $entity->addData($settings);\n $this->setEntity($entity);\n return $this;\n }", "title": "" }, { "docid": "bab0d519198f895f57c5afb1bf411fde", "score": "0.5471954", "text": "public function setEntity(EntityInterface $entity) {\n $this->entity = $entity;\n }", "title": "" }, { "docid": "5188f4c90e89bf3ffa678d0070eaf952", "score": "0.54691154", "text": "protected function setEntity(EntityInterface $entity) {\n $this->entity = $entity;\n }", "title": "" }, { "docid": "d4a1cc41fa1b6a2116cce3ba9d344299", "score": "0.54357207", "text": "public function setValue_entity($value_entity)\n {\n $this->value_entity = $value_entity;\n\n return $this;\n }", "title": "" }, { "docid": "d84e7581d6ee266521def6535f1e78b6", "score": "0.54193497", "text": "public static function setFacadeApplication($app)\n {\n }", "title": "" }, { "docid": "64e26a649f9fa7cfcd4a615bcd36dec0", "score": "0.54073274", "text": "public function setData(BeforeEntityPersistedEvent $event)\n {\n $entity = $event->getEntityInstance();\n\n // Verify if the entity is a Question Image\n if ($entity instanceof QuestionImage) {\n // Set the value of the Question selected to correctAnswer\n $value = $entity->getCorrectAnswerObject()->getValue();\n $entity->setCorrectAnswer($value);\n\n // Set automatically the environment Kid to the Question\n $environment = $this->environmentRepository->find(2);\n $entity->setEnvironment($environment);\n }\n }", "title": "" }, { "docid": "9371e413da90aef0ee3e98471d132232", "score": "0.54013234", "text": "public function setEntity(string $entity)\n {\n $this->entity = $entity;\n\n return $this;\n }", "title": "" }, { "docid": "1eb33d41bd4b7135b1d091e068f1b486", "score": "0.53731537", "text": "public function entity($entity)\n {\n if ( is_null($entity))\n {\n $this->entity = false;\n\n return $this;\n }\n\n $this->entity = $entity;\n\n return $this;\n }", "title": "" }, { "docid": "7ceb0a4795ab1d0078689efdfa757ebc", "score": "0.5356316", "text": "protected function setModel(): void\n {\n $this->model = Appointment::class;\n $this->activityInstanceService = new ActivityInstanceService();\n }", "title": "" }, { "docid": "0838e96edee746d963d959dea32657c4", "score": "0.53469694", "text": "public function setEntity($entity)\n {\n parent::setEntity($entity);\n $this->getHistory()->addAdditionalData(['email' => $this->getEntity()->getEmail()]);\n return $this;\n }", "title": "" }, { "docid": "a9a8b353d83eafb5b5be49c7b1504d9d", "score": "0.5319032", "text": "public static function setFacadeApplication($app)\n {\n static::$app = $app;\n }", "title": "" }, { "docid": "f73ff33e599ef299294b52adc1e44d59", "score": "0.5304067", "text": "public function application()\n {\n return $this->hasOne('App\\Models\\Users\\ApplicationForm');\n }", "title": "" }, { "docid": "10222607be75b390d89c605af201a780", "score": "0.52891207", "text": "public function setApplication($val)\n {\n $this->_propDict[\"application\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "10222607be75b390d89c605af201a780", "score": "0.52891207", "text": "public function setApplication($val)\n {\n $this->_propDict[\"application\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "266d75782d81a127a55022d20c788ddb", "score": "0.52853763", "text": "public function setApplication($application) {\n\n\t\t$this -> application = $application;\n\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "6791c12d5f9dec0c081b0e046b11e597", "score": "0.5284935", "text": "public function setIdentity(UserEntity $user)\n {\n $this->session->set('user.id', $user->id);\n }", "title": "" }, { "docid": "53ed239d72478867fd90d21500e46904", "score": "0.52715963", "text": "public function getAndSetApplicationUser();", "title": "" }, { "docid": "b07e545a83d8e8f8b9554488fdb32ac9", "score": "0.52553624", "text": "public function setAppName(string $appName);", "title": "" }, { "docid": "e6687e63e46e8fcd145d6cf7d4da9c89", "score": "0.52205783", "text": "public function set($model);", "title": "" }, { "docid": "7e9b2013a5a60f7b603b439b5d8f9770", "score": "0.52051914", "text": "private function setOptionsApp()\n {\n foreach ($this->options as $option => $value) {\n $option = HelperString::camelCase($option);\n if ($this->isApp)\n $this->data[self::$app][$option] = $value;\n else\n $this->data[$option] = $value;\n }\n }", "title": "" }, { "docid": "19f9b6aa405446434415c7bc712c53eb", "score": "0.5202925", "text": "public function setEntity(EntityInterface $entity)\n {\n $this->entity = $entity;\n }", "title": "" }, { "docid": "df47c088b08889abe4486d4627b9c692", "score": "0.51860154", "text": "public function setCurrentUser(UserInterface $user): Application\n {\n\t\t$this->currentUser = $user;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ef9a4a9fa546efc0b17b95868d299b5a", "score": "0.5175975", "text": "public function __construct() {\r\n $this->setEntity('mst_approval');\r\n }", "title": "" }, { "docid": "0684f08d821b742a560677139c4c3b98", "score": "0.5171974", "text": "public function edit(Application $application)\n {\n //\n }", "title": "" }, { "docid": "9e4767ad4e186d2269d3131d4f724956", "score": "0.5159203", "text": "public function setResource(?Entity $value): void {\n $this->getBackingStore()->set('resource', $value);\n }", "title": "" }, { "docid": "aa35e419e269e296ee73bc7feb756d47", "score": "0.5122251", "text": "public function setEntityManager(EntityManager $em)\n\t{\n\t\t$this->em = $em;\n\t}", "title": "" }, { "docid": "2af6aaac55eebdff8611848975b76c2c", "score": "0.51085067", "text": "public function setApplicationId($appId)\n {\n $this->appId = $appId;\n }", "title": "" }, { "docid": "a047c4713b289c8ffdb8229e5c0c9d1d", "score": "0.5102226", "text": "public static function setInstance(Application $instance) {\n\t\tstatic::$instance = $instance;\n\t}", "title": "" }, { "docid": "31bca0248849d91133b949353fca62d9", "score": "0.50964165", "text": "public function setEntityClass(string $entityClass): void {\n if ($this->entityClass) {\n throw new BadMethodCallException(sprintf('You can\\'t modify manager\\'s (%s) entity class (%s) to %s once set (manually or automatically)', static::class, $this->entityClass, $entityClass));\n }\n $this->entityClass = $entityClass;\n }", "title": "" }, { "docid": "ee356b5329bb25053367632de079b19b", "score": "0.50930315", "text": "public function updateEntityManager() {\n\t\t$this->_em = $this->_determineEntityManager();\n\t}", "title": "" }, { "docid": "60e86892d19e68fb149a4a48d4da6fb5", "score": "0.5090708", "text": "public function setEntityManager(EntityManager $em)\n {\n $this->entityManager = $em;\n }", "title": "" }, { "docid": "f4d9bcb9b35d2b23e0d0c2ffee71f178", "score": "0.50897026", "text": "protected function setUp()\r\n\t{\r\n\t\t$this->_entity = new $this->_model_name();\r\n\t\tparent::setUp();\r\n\t}", "title": "" }, { "docid": "4498ac34077fca0b82f8e641ddba1dba", "score": "0.508368", "text": "protected function setModel()\n {\n $model = app($this->model());\n\n if (! $model instanceof Model) {\n throw new \\Exception(\n \"Class {$this->model()} must be an instance of Illuminate\\\\Database\\\\Eloquent\\\\Model\"\n );\n }\n\n $this->model = app($this->model());\n }", "title": "" }, { "docid": "44a6ef0dbe700fa1932f11cb012cfd11", "score": "0.50824124", "text": "public function setModelName( $entity ) {\n\n $this->modelName = Str::studly( snake_case( $entity ) );\n $this->modelWNameSpace = $this->namespace .\"\\Models\\\\\" . $this->modelName;\n }", "title": "" }, { "docid": "e2c1c0fe52b7cbb056727c5a9a37ae6c", "score": "0.5074249", "text": "protected function getEnvironmentSetUp($app)\n {\n $app['config']->set('auth.providers.users.model', User::class);\n }", "title": "" }, { "docid": "f7b8f13de37ef402366107aaa46cae75", "score": "0.50720775", "text": "protected function setUpDatabase($app)\n {\n parent::setUpDatabase($app);\n\n $app[Tenant::class]->create(['tenant_name' => 'testTenant', 'app_code' => 'FOOBAR']);\n $app[Tenant::class]->create(['tenant_name' => 'testTenant2', 'app_code' => 'BARFOO']);\n }", "title": "" }, { "docid": "ddc29a3b4a46828c0b0bfbca8142bed8", "score": "0.5063389", "text": "public function setEntityManager(EntityManager $em)\n {\n $this->em = $em;\n }", "title": "" }, { "docid": "8779dec6b2bc39a3d52da72d863ddb91", "score": "0.505252", "text": "public function setUp()\n\t{\n\t\t$this->entity = new \\KGMBundle\\Entity\\Adminuser();\n\t}", "title": "" }, { "docid": "e65ebbcca40d5d5a749796ed6b152b72", "score": "0.50408924", "text": "public function setNewEntity($val) {\n $this->_new_entity = $val;\n }", "title": "" }, { "docid": "04816454c54fc87b6c541f2bfc603708", "score": "0.50200164", "text": "public function setEntityClass($entityClass) {\n $this->entityClass = $entityClass;\n }", "title": "" }, { "docid": "7167532f23a5360d0d9825d5c6bd9484", "score": "0.50099957", "text": "public function setEntityName($entityName);", "title": "" }, { "docid": "168a90803ee0a34c2632ad0e1082b29c", "score": "0.50047636", "text": "abstract public function setFromArray(array $data): AbstractEntity ;", "title": "" }, { "docid": "2cd491a44e38c236b94368dbc4097362", "score": "0.50034547", "text": "public function setUp()\n {\n parent::setUp();\n $this->_em = $this->application->getBootstrap()->getResource('Entitymanagerfactory');\n\n }", "title": "" }, { "docid": "2ed1c26911a6f4c58e18f515cfd74f0f", "score": "0.49837312", "text": "public function setMetadata(EntityMetadata $metadata): void;", "title": "" }, { "docid": "a9202691c96cb75fcbd285b9ea47c4d8", "score": "0.4975979", "text": "public function setForeignEntity($entity)\n {\n $this->foreignEntity = $entity;\n }", "title": "" }, { "docid": "86e885220c02bce75f279d083450d3e4", "score": "0.49685663", "text": "public function setApplicationKey($key){\n\t\t$this->applicationKey = $key;\n\t}", "title": "" }, { "docid": "78f8123b8923b642f3dfa9a02c09413b", "score": "0.49455106", "text": "final public function setContainer(ServiceContainer $app)\n {\n $this->app = $app;\n }", "title": "" }, { "docid": "1b8feed1857524a0a836cd6393412f4f", "score": "0.49353155", "text": "function init($entity, $em) {\n $this->entity = $entity;\n $this->em = $em;\n }", "title": "" }, { "docid": "0c95000c5b55a9921a23cec711dbbffb", "score": "0.49325287", "text": "public function __construct($app){\n\t\t$this->App = $app;\n\t}", "title": "" }, { "docid": "510f5bb41845f6ad4fd87c8e9d2fced2", "score": "0.49322692", "text": "public function entity($entity)\n {\n $this->entity = (string) $entity;\n\n $this->repository->entity($entity);\n\n return $this;\n }", "title": "" }, { "docid": "d32087374164dbd45c9644dc3e0ed80d", "score": "0.492803", "text": "public function setEntity(ContentEntityInterface $entity);", "title": "" }, { "docid": "c62c2214852331cadcbf3a1cc0b6da43", "score": "0.4921639", "text": "public function setManagedApps($val)\n {\n $this->_propDict[\"managedApps\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "616b103ecc5c998191ad6036932cb22e", "score": "0.4918058", "text": "public function setLocalEntity(EntityMap $entity)\n {\n $this->localEntity = $entity;\n }", "title": "" }, { "docid": "b236b396ffe6193cd7015a0f8a373921", "score": "0.4917559", "text": "public function application()\n\t{\n\t\treturn $this->hasOne(Application::class);\n\t}", "title": "" }, { "docid": "2f7e3ecebdaf64f65f1186795960a7d9", "score": "0.49118647", "text": "public function __construct(Application $app){\n $this->app = $app;\n }", "title": "" }, { "docid": "3c69cfeefbfc44c64fd0acefe511f335", "score": "0.4908638", "text": "public function setData(BaseEntity $baseEntity)\n {\n }", "title": "" }, { "docid": "2187df7708c91de237bb6db46803675c", "score": "0.4881614", "text": "public function __construct($entity)\n {\n $this->entity = $entity;\n }", "title": "" }, { "docid": "45fd96347abeadd2a30844fe8ac6003a", "score": "0.48815605", "text": "public function restart_entityManager() {\n $this->set_database();\n $this->set_global_application();\n }", "title": "" } ]
79fe6696dceea02e93867558c066957f
Lists the statuses of the products in your Merchant Center account. (productstatuses.listProductstatuses)
[ { "docid": "935c208239457c4de2780c41b7a86a2c", "score": "0.81553715", "text": "public function listProductstatuses($merchantId, $optParams = array())\n {\n $params = array('merchantId' => $merchantId);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"GoogleGAL_Service_ShoppingContent_ProductstatusesListResponse\");\n }", "title": "" } ]
[ { "docid": "32001828b3142fa2362b2edad29bacaa", "score": "0.796383", "text": "public function listProductStatuses(){\n // Set method and action\n $method = 'orders';\n $action = 'ListProductStatuses';\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, array('dummy' => 1));\n\n return $result;\n }", "title": "" }, { "docid": "12043dbaf42fee35056a911450391f94", "score": "0.65340513", "text": "public static function productStatuses(): array\n\t{\n\t\treturn [\n\t\t\t'new' \t=> __('New Product'),\n\t\t\t'old' \t=> __('Old Product'),\n\t\t\t'repaired' => __('Repaired Product'), \n\t\t];\n\t}", "title": "" }, { "docid": "63f1a0488f7a632bbe9c056c5028ffed", "score": "0.63189256", "text": "public function custombatch(GoogleGAL_Service_ShoppingContent_ProductstatusesCustomBatchRequest $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('custombatch', array($params), \"GoogleGAL_Service_ShoppingContent_ProductstatusesCustomBatchResponse\");\n }", "title": "" }, { "docid": "3391e545393c3f9aabc84f9a782c38b4", "score": "0.61917627", "text": "public function getProductsStatus(array $products = [])\n {\n $skus = $this->getProductsIds($products);\n\n return $this->getStatusForSkus($skus);\n }", "title": "" }, { "docid": "f5dc70f3fa144bf540856f94a2bf956a", "score": "0.6176107", "text": "public function listStatuses(){\n // Set method and action\n $method = 'orders';\n $action = 'ListStatuses';\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, array('dummy' => 1));\n\n return $result;\n }", "title": "" }, { "docid": "2c66eba871c63c6431f92c48fa6938dd", "score": "0.5859794", "text": "public function get($merchantId, $productId, $optParams = array())\n {\n $params = array('merchantId' => $merchantId, 'productId' => $productId);\n $params = array_merge($params, $optParams);\n return $this->call('get', array($params), \"GoogleGAL_Service_ShoppingContent_ProductStatus\");\n }", "title": "" }, { "docid": "5a47bef361d748bca2956cd315d074e4", "score": "0.5714193", "text": "public function getProductStatus($productIds, $storeId = null)\n {\n return $this->getResource()->getProductStatus($productIds, $storeId);\n }", "title": "" }, { "docid": "8c11414671b0e3903a75dd2b465a8b96", "score": "0.56986386", "text": "public function get_statuses() {\n\n\t\t/**\n\t\t * Filter the available webhook statuses.\n\t\t *\n\t\t * @since 1.0.0-beta.1\n\t\t *\n\t\t * @param array $statuses Array of statuses.\n\t\t */\n\t\treturn apply_filters(\n\t\t\t'llms_rest_webhook_statuses',\n\t\t\tarray(\n\t\t\t\t'active' => __( 'Active', 'lifterlms' ),\n\t\t\t\t'paused' => __( 'Paused', 'lifterlms' ),\n\t\t\t\t'disabled' => __( 'Disabled', 'lifterlms' ),\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "843b20c187399388be614e95c99aa222", "score": "0.5687541", "text": "public function getAllStatuses();", "title": "" }, { "docid": "843b20c187399388be614e95c99aa222", "score": "0.5687541", "text": "public function getAllStatuses();", "title": "" }, { "docid": "bba17c33d8cfc4e22bc42305a77c4ca8", "score": "0.5674545", "text": "private function xtc_get_products_status($products_id)\n {\n $products_id = xtc_get_prid($products_id);\n $stock_query = xtc_db_query(\n \"SELECT products_status FROM \" . TABLE_PRODUCTS\n . \" WHERE products_id = '\" . $products_id . \"'\"\n );\n $stock_values = xtc_db_fetch_array($stock_query);\n\n return $stock_values['products_status'];\n }", "title": "" }, { "docid": "3bbee8a6eeb1d7ecc8093691c9f12486", "score": "0.5568099", "text": "public function getStatuses()\n {\n $this->sandbox ? $this->api_url = self::API_ENDPOINT_SANDOX : $this->api_url = self:: API_ENDPOINT;\n return $this->request('statuses?lang=pl_PL', 'GET');\n }", "title": "" }, { "docid": "39987ae17017a1e659c927be7531a4eb", "score": "0.5493713", "text": "public static function get_bookings_for_product( $product_id, $status = array( 'confirmed', 'paid' ) ) {\n\t\t$booking_ids = self::get_booking_ids_by( array(\n\t\t\t'object_id' => $product_id,\n\t\t\t'object_type' => 'product',\n\t\t\t'status' => $status,\n\t\t) );\n\t\treturn array_map( 'get_wc_booking', $booking_ids );\n\t}", "title": "" }, { "docid": "d6d09ab54075a86fe1603795edd72d5f", "score": "0.5479944", "text": "public function getStatuses()\n {\n return $this->statuses;\n }", "title": "" }, { "docid": "4974907f46f7b91bb9c4a4f5dfd55a6c", "score": "0.54757375", "text": "public function listCancellingStatuses(){\n // Set method and action\n $method = 'orders';\n $action = 'listCancellingStatuses';\n\n // Set data\n $data = array('dummy' => true);\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "title": "" }, { "docid": "718236aa76735044a211b45ba24b91ab", "score": "0.54049647", "text": "public function getStatuses()\n\t{\n\t\treturn $this->statuses;\n\t}", "title": "" }, { "docid": "aae143fcac21b28817a7aa54013d52de", "score": "0.53911316", "text": "public function listAccountstatuses($merchantId, $optParams = array())\n {\n $params = array('merchantId' => $merchantId);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"GoogleGAL_Service_ShoppingContent_AccountstatusesListResponse\");\n }", "title": "" }, { "docid": "4d06d5a7e45aca5c4e24687932045fac", "score": "0.535927", "text": "public function listStatuses(): ?array\n {\n $body = '<Pull_ListStatuses_RQ>';\n $body .= $this->getAuthenticationXml();\n $body .= '</Pull_ListStatuses_RQ>';\n\n $response = $this->sendRequest($body);\n $result = array();\n if ($response->successful() && $this->isRuSuccessful()) {\n $XMLObject = new \\SimpleXMLElement($response->body());\n $statuses = $XMLObject->Statuses->StatusInfo;\n foreach ($statuses as $item) {\n $result[] = $this->xmlLeafToArray($item);\n }\n }\n\n $this->result = $result;\n return $result;\n }", "title": "" }, { "docid": "d024fd24731d9914132b412cc2d33c20", "score": "0.5344311", "text": "public function getStatuses( $projectName )\n {\n $result = self::request('project/' . $projectName . \"/statuses\");\n return json_decode($result);\n }", "title": "" }, { "docid": "56f6b7d8f25c04d9fe844c8eb990c076", "score": "0.533034", "text": "public static function getStatusesList()\n {\n return [\n self::STATUS_ACTIVE => self::STATUS_ACTIVE,\n self::STATUS_INACTIVE => self::STATUS_INACTIVE\n ];\n }", "title": "" }, { "docid": "776677a9216f648995847060190e8b42", "score": "0.52927047", "text": "public function massStatusAction()\n {\n $productIds = (array)$this->getRequest()->getParam('product');\n $storeId = (int)$this->getRequest()->getParam('store', 0);\n $status = (int)$this->getRequest()->getParam('status');\n\n try {\n $this->_validateMassStatus($productIds, $status);\n Mage::getSingleton('catalog/product_action')\n ->updateAttributes($productIds, array('status' => $status), $storeId);\n Mage::dispatchEvent('catalog_controller_product_mass_status', array('product_ids' => $productIds));\n\n $this->_getSession()->addSuccess(\n $this->__('Total of %d record(s) have been updated.', count($productIds))\n );\n }\n catch (Mage_Core_Model_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()\n ->addException($e, $this->__('An error occurred while updating the product(s) status.'));\n }\n\n $this->_redirect('*/*/', array('store'=> $storeId));\n }", "title": "" }, { "docid": "08d1e67bcbe4c7a569eac46b10474d43", "score": "0.52922624", "text": "public function statuses() {\n\t\t$statuses = array();\n\t\tforeach (get_class_vars('ShopOrderStatus') as $name => $var) {\n\t\t\tif (strstr($name, 'status') !== false) {\n\t\t\t\t$statuses[ShopOrderStatus::$$name] = __d('shop', substr_replace($name, '', 0, strlen('status')));\n\t\t\t}\n\t\t}\n\n\t\treturn $statuses;\n\t}", "title": "" }, { "docid": "d187a83b5654daaeaaa91a36d4778e71", "score": "0.5266073", "text": "public static function getStatuses()\n {\n return self::$statuses;\n }", "title": "" }, { "docid": "8d737f9da22944ea6b98490add85ec9e", "score": "0.52510935", "text": "public function getOrderStatusList(){\n // Set method and action\n $method = 'orders';\n $action = 'getOrderStatusList';\n\n // Set data\n $data = array();\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "title": "" }, { "docid": "1db16dd31d909b314cbe52ff2264b05b", "score": "0.51754415", "text": "public function getStatuses()\n\t{\n\t\treturn $this->db->setQuery(\n\t\t\t$this->db->getQuery(true)\n\t\t\t\t->from($this->db->quoteName('#__status'))\n\t\t\t\t->select('*')\n\t\t)->loadObjectList();\n\t}", "title": "" }, { "docid": "0f0abaa57fed7ba50e04ccbde371bdb4", "score": "0.5165235", "text": "function statuses() {\n return parent::statusesWithCount( self::tableName(), self::arrayStatuses() );\n }", "title": "" }, { "docid": "cc06b88ffa92a756907aa449dfa2482f", "score": "0.51592356", "text": "public function getStockStatus(int $productId)\n {\n return $this->stock->getStockItem($productId);\n }", "title": "" }, { "docid": "06985019095f628cce964e67289a5b95", "score": "0.5110961", "text": "public static function get_todo_item_statuses() {\n return self::send_request(array('action' => 'gettodoitemstatuses'));\n }", "title": "" }, { "docid": "5d56ee7a831f5beb5f2f98840a6272fc", "score": "0.511037", "text": "static function getStatusList()\n {\n return array(\n self::STATUS_NORMAL,\n self::STATUS_DRAFT,\n self::STATUS_HIDDEN,\n self::STATUS_DISABLED\n );\n }", "title": "" }, { "docid": "edc17dc294fc09bd9e434a5988d2e19f", "score": "0.5099504", "text": "public function getStatusesByClient(){\n if (ClientDetectorComponent::getInstance()->isNetflix())\n return $this->netflixStatusList;\n\n return $this->extendedStatusList;\n }", "title": "" }, { "docid": "20830be3db5fb3c2c2f3f5aa364ff206", "score": "0.50973946", "text": "public static function get_statuses() {\n return array(\n self::UNVERIFIED,\n self::VERIFIED\n );\n }", "title": "" }, { "docid": "fc3b443accce83f5755fd14aed00f9db", "score": "0.5082579", "text": "public function getOrderStatuses() {\n error_reporting(0);\n if ($_SERVER['PHP_AUTH_USER'] === \"Token\" && $_SERVER['PHP_AUTH_PW'] === $this->config->get('module_pushketing_token')) {\n if($this->config->get('module_pushketing_status')) {\n $this->load->model('extension/module/pushketing');\n $response = $this->model_extension_module_pushketing->getOrderStatuses();\n\n header('Content-Type: application/json');\n header('HTTP/1.1 200 OK');\n exit(json_encode($response));\n } else {\n $this->forbiddenRequest();\n }\n } else {\n $this->unauthorizedRequest();\n }\n }", "title": "" }, { "docid": "f3d411bc074358b02463f7227dae6bfa", "score": "0.50769126", "text": "public function getSponsoredDisplayProductReadinessStatus($data = null): array\n {\n return $this->operation(\"/sd/suggestedProducts/productReadinessStatus\", $data, \"POST\");\n }", "title": "" }, { "docid": "1c6833536b668fc7cf1b557e518a6219", "score": "0.5065689", "text": "public function getStatuses()\n {\n if (array_key_exists(\"statuses\", $this->_propDict)) {\n return $this->_propDict[\"statuses\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "c12f42554cb520393f61761b5b08e209", "score": "0.50283927", "text": "public function listStatus() {\n \n return array('inactive' => 'Inactive',\n 'active' => 'Active',\n // 'deleted' => 'Deleted', Don't show this to the user\n 'banned' => 'Banned');\n }", "title": "" }, { "docid": "7891d84d25e255b5d04cd7005e8f17dc", "score": "0.5025885", "text": "public static function getStatusList()\n {\n return [\n self::STATUS_ACTIVE => 'Active',\n self::STATUS_INACTIVE => 'Inactive'\n ];\n }", "title": "" }, { "docid": "9f6579234926ec80aadc2c96047b0d88", "score": "0.5002242", "text": "public static function getStatusList() \n {\n return [\n self::STATUS_ACTIVE => 'Active',\n self::STATUS_INACTIVE => 'Inactive'\n ];\n }", "title": "" }, { "docid": "00ad2e7f3c23d17ce14572891c4b6214", "score": "0.49873385", "text": "public static function getStatuses()\n {\n return array_keys(static::STATUSES);\n }", "title": "" }, { "docid": "ac51fc037f49ebf1863085045794f822", "score": "0.4967024", "text": "public function list(ProductDataTable $datatable){\n\n return $datatable->ajax();\n }", "title": "" }, { "docid": "d560dcfa396c41f804534b5293b1c4fc", "score": "0.49655786", "text": "public function index(Product $product): JsonResponse\n {\n $categories = $product->categories;\n return $this->showAll($categories);\n }", "title": "" }, { "docid": "8496018a95eda4e75fd99c5327c45c70", "score": "0.4941275", "text": "public function listDatafeedstatuses($merchantId, $optParams = array())\n {\n $params = array('merchantId' => $merchantId);\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), \"GoogleGAL_Service_ShoppingContent_DatafeedstatusesListResponse\");\n }", "title": "" }, { "docid": "549c4ed77d80214072b469d4444484dc", "score": "0.49399012", "text": "public function index(Product $product)\n {\n $transactions = $product->transactions;\n return $this->showAll($transactions);\n }", "title": "" }, { "docid": "9d9554978d773615afb79e832a6927d9", "score": "0.49304044", "text": "public function index(Product $product)\n {\n $categories = $product->categories;\n\n return $this->showAll($categories);\n }", "title": "" }, { "docid": "ceae765f25f00195821d64dc96fc4690", "score": "0.49295816", "text": "public static function getAvailableStatuses()\n {\n return [\n self::STATUS_NOT_VERIFIED => Yii::t('app', 'Not Verified'),\n self::STATUS_ACTIVE => Yii::t('app', 'Active'),\n self::STATUS_DELETED => Yii::t('app', 'Deleted'),\n ];\n }", "title": "" }, { "docid": "583f969854521a37bb04f0f184866155", "score": "0.49265248", "text": "public function getProductStockStatus()\n {\n try {\n $store = $this->storeManager->getStore($this->storeId);\n $websiteId = $store->getWebsiteId();\n return $this->stockRegistryInterface->getProductStockStatus(\n $this->product->getId(),\n $websiteId\n );\n } catch (\\Exception $e) {\n return;\n }\n }", "title": "" }, { "docid": "7c8b1e2e1b9a15c93b7e38ef14806e2b", "score": "0.48941657", "text": "public function list() {\n\n $sql = $this->db->prepare('SELECT * FROM `product` WHERE 1');\n $sql->execute();\n $products = $sql->fetchAll();\n\n return array('status' => 200, 'response' => $products);\n }", "title": "" }, { "docid": "2f40bb804a779e012f985793b9e911da", "score": "0.48869246", "text": "public function all_products()\n\t{\n\t\t$this->db->where('product_status = 1');\n\t\t$query = $this->db->get('product');\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "e0438ee88dc15911c8dc94dd9c5a83fc", "score": "0.4863022", "text": "public function index()\n {\n \n $statuses = Status::all();\n \n return $this->sendResponse(StatusResource::collection($statuses), 'Statuses retrieved successfully.');\n }", "title": "" }, { "docid": "ee3a95b43b185835bff85fba916ca174", "score": "0.4859536", "text": "public static function getStatusList($entityId = 'INVOICE_STATUS')\n\t{\n\t\tif (!CModule::IncludeModule('sale'))\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tif($entityId != 'INVOICE_STATUS')\n\t\t\treturn array();\n\n\t\t$arStatus = array();\n\n\t\tself::ensureLanguageDefined();\n\n\t\t$res = CSaleStatus::GetList(\n\t\t\t\tarray('SORT' => 'ASC'),\n\t\t\t\tarray('LID' => self::$languageID), false, false, array('ID', 'SORT', 'NAME')\n\t\t);\n\n\t\twhile ($row = $res->Fetch())\n\t\t{\n\t\t\tif ($row['ID'] === 'F') continue;\n\n\t\t\t$arStatus[$row['ID']] = array(\n\t\t\t\t'ID' => ord($row['ID']),\n\t\t\t\t'ENTITY_ID' => 'INVOICE_STATUS',\n\t\t\t\t'STATUS_ID' => $row['ID'],\n\t\t\t\t'NAME' => $row['NAME'],\n\t\t\t\t'NAME_INIT' => '',\n\t\t\t\t'SORT' => $row['SORT'],\n\t\t\t\t'SYSTEM' => 'N'\n\t\t\t);\n\n\t\t\tif (in_array($row['ID'], array('N', 'P', 'F', 'D')))\n\t\t\t{\n\t\t\t\tif ($row['ID'] === 'F')\n\t\t\t\t\t$arStatus[$row['ID']]['NAME_INIT'] = GetMessage('CRM_INVOICE_STATUS_F');\n\t\t\t\telseif ($row['ID'] === 'D')\n\t\t\t\t\t$arStatus[$row['ID']]['NAME_INIT'] = GetMessage('CRM_INVOICE_STATUS_D');\n\t\t\t\telseif ($row['ID'] === 'N')\n\t\t\t\t\t$arStatus[$row['ID']]['NAME_INIT'] = GetMessage('CRM_INVOICE_STATUS_N');\n\t\t\t\telseif ($row['ID'] === 'P')\n\t\t\t\t\t$arStatus[$row['ID']]['NAME_INIT'] = GetMessage('CRM_INVOICE_STATUS_P');\n\n\t\t\t\t$arStatus[$row['ID']]['SYSTEM'] = 'Y';\n\t\t\t}\n\t\t}\n\n\t\treturn $arStatus;\n\t}", "title": "" }, { "docid": "93f227b82a86cca7326c389ea2e2b81d", "score": "0.48580283", "text": "public function index(Product $product)\n {\n $categories=$product->categories;\n return $this->showAll($categories);\n }", "title": "" }, { "docid": "37b21be8bb2390a1efd8218d54d53c3d", "score": "0.4842669", "text": "public function availableStatuses(): array\n {\n return $this->allowedStatuses;\n }", "title": "" }, { "docid": "d3f2dd02820149416af119771c352655", "score": "0.48368093", "text": "public function testGetByStatus()\n {\n $this->client->request(\n 'GET',\n '/api/products?status=' . $this->productStatusInactive->getId(),\n ['ids' => '']\n );\n $response = json_decode($this->client->getResponse()->getContent());\n\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertEquals(1, count($response->_embedded->products));\n $this->assertEquals($this->product1->getManufacturer(), $response->_embedded->products[0]->manufacturer);\n $this->assertEquals(\n $this->productStatusTranslationInactive->getName(),\n $response->_embedded->products[0]->status->name\n );\n }", "title": "" }, { "docid": "44dd5b75f74671825f424a872d94d668", "score": "0.483222", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_NOTSTART => __('Not Start'),\n self::STATUS_START => __('Start'),\n self::STATUS_INPROGRESS => __('In Progress'),\n self::STATUS_END => __('End')];\n }", "title": "" }, { "docid": "3a1da910892a8e30c88ff89c93f3044a", "score": "0.48194176", "text": "public static function getNpe5__Status__cList(): array\n {\n return static::getClassConstantsFromPrefix('STATUS');\n }", "title": "" }, { "docid": "c2eb064741006481ba92bcf0cacb5f67", "score": "0.4805144", "text": "public function getStatuses(){ \r\n return Mage::getModel('CrmTicket/Ticket')->getStatuses();\r\n }", "title": "" }, { "docid": "f15529541d684ca43792da9dedf01ed3", "score": "0.4799992", "text": "static public function getStatuses() {\n $result = [];\n foreach(self::$statuses as $key => $status) {\n $result[] = [\n 'id' => $key,\n 'name' => $status['label'],\n 'to_status' => isset($status['to_status'])\n ? $status['to_status']\n : null\n ];\n }\n return $result;\n }", "title": "" }, { "docid": "f69eb20af37332405c0d066c9f6e16bb", "score": "0.47831687", "text": "function warranty_get_statuses() {\n\t$defaults = WooCommerce_Warranty::$default_statuses;\n\t$statuses = get_terms( 'shop_warranty_status', array('hide_empty' => false) );\n\t$orders = get_option( 'wc_warranty_status_order', array() );\n\t$orig_orders= $orders;\n\t$terms = array();\n\n\t// make sure all statuses are inside $order\n\tforeach ( $statuses as $status ) {\n\t\tif (! in_array($status->slug, $orders) ) {\n\t\t\t$orders[] = $status->slug;\n\t\t}\n\t}\n\n\tif ( $orig_orders != $orders ) {\n\t\tupdate_option( 'wc_warranty_status_order', $orders );\n\t}\n\n\tforeach ( $orders as $slug ) {\n\t\t$term = get_term_by( 'slug', $slug, 'shop_warranty_status' );\n\n\t\tif (! $term ) continue;\n\n\t\t$terms[] = $term;\n\t}\n\n\treturn apply_filters( 'warranty_statuses', $terms );\n}", "title": "" }, { "docid": "7da96e52d7d11c3c403feba1d588b062", "score": "0.47581476", "text": "function get_items_status_list(){\r\n\t\tif($this->debug>0){error_log('New LP - In learnpath::get_items_status_list()',0);}\r\n \t$list = array();\r\n \tforeach($this->ordered_items as $item_id)\r\n \t{\r\n \t\t$list[]= array($item_id => $this->items[$item_id]->get_status());\r\n \t}\r\n \treturn $list;\r\n }", "title": "" }, { "docid": "f43f02e01a27a9be72fa6c10d2156535", "score": "0.47568583", "text": "public function getOrderStatusList(){\n\n \t\t\t$sql = \"SELECT * FROM order_status\";\n\n \t\t\t$order_status = Connection()->fetchAll($sql);\n \t\t\treturn $order_status;\n \t\t}", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "5baa3aa9a532d27a02ff3d733562b05f", "score": "0.47529733", "text": "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "title": "" }, { "docid": "6021365855f04a9c22a2b8bf9470dc72", "score": "0.47450548", "text": "public function index()\n {\n $statusModules = json_decode(file_get_contents(base_path('modules_statuses.json')), true);\n $modules = [];\n foreach (Module::getCached() as $module) {\n $modules[] = [\n 'name' => $module['name'],\n 'active' => array_key_exists($module['name'], $statusModules) && $statusModules[$module['name']] ? 1 : 0,\n 'permissions' => [\n 'destroy' => checkModulePermission('module', 'destroy')\n ]\n ];\n }\n\n return response($modules);\n }", "title": "" }, { "docid": "2688e03ee2e9a38fd05b25f532bc4ab1", "score": "0.4740645", "text": "public function getStatuses()\n {\n return $this->hasMany(Status::className(), ['id_status' => 'id_status'])->viaTable('status_role', ['id_role' => 'id_role']);\n }", "title": "" }, { "docid": "edf9ed85d4774ba094b715dacab6dde2", "score": "0.47374097", "text": "protected function get_detected_products () {\n\t\t$response = array();\n\t\t$products = get_plugins();\n\n\t\tif ( is_array( $products ) && ( 0 < count( $products ) ) ) {\n\t\t\t$reference_list = $this->get_product_reference_list();\n\t\t\t$activated_products = $this->get_activated_products();\n\t\t\tif ( is_array( $reference_list ) && ( 0 < count( $reference_list ) ) ) {\n\t\t\t\tforeach ( $products as $k => $v ) {\n\t\t\t\t\tif ( in_array( $k, array_keys( $reference_list ) ) ) {\n\t\t\t\t\t\t$status = 'inactive';\n\t\t\t\t\t\tif ( in_array( $k, array_keys( $activated_products ) ) ) { $status = 'active'; }\n\t\t\t\t\t\t$response[$k] = array( 'product_name' => $v['Name'], 'product_version' => $v['Version'], 'file_id' => $reference_list[$k]['file_id'], 'product_id' => $reference_list[$k]['product_id'], 'product_status' => $status, 'product_file_path' => $k );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "a4e4620b2df1236801f5e1008d7ac8f4", "score": "0.47255713", "text": "public function getUserStatuses()\n {\n return $this->userStatuses;\n }", "title": "" }, { "docid": "eb9a843bfe3e417b1cc124e7a11cebb1", "score": "0.47146344", "text": "public function product_status_update($product_page_url) {\n\t\t$product_id = $_REQUEST['cid'];\n\t\tif ($_REQUEST['current_status'] == 'Inactive') {\n\t\t\t$product_status = 'Active';\n\t\t} else {\n\t\t\t$product_status = 'Inactive';\n\t\t}\n\t\t$this->db->update('product_tbl', array('product_status' => ($product_status)), \"product_id='\" . $product_id . \"'\");\n\t\t$_SESSION['product_msg'] = messagedisplay('product\\'s Status is updated successfully', 1);\n\t\theader('location: ' . $product_page_url);\n\t\texit();\n\t}", "title": "" }, { "docid": "ba76397df84786c76b2e586e5e29d87f", "score": "0.47089097", "text": "public function getProductList();", "title": "" }, { "docid": "3a6df5ef599a94f65cbe8e8959d59d2c", "score": "0.47000536", "text": "public static function getStatuses()\n {\n return [self::STATUS_NEW, self::STATUS_READ, self::STATUS_DELETED];\n }", "title": "" }, { "docid": "06a1b06e772e6793d21e88da21a3a5a7", "score": "0.46953315", "text": "private function renderShoppingCartList($products)\n {\n $items_in_stock = true;\n $column_name_array = [\"Product name\", \"Price each\", \"Amount\", \"Delete\"];\n\n include_once \"partials/list/listStart.php\";\n foreach ($products as $product) {\n $qty = $_SESSION[\"shopping_cart\"][$product[\"id\"]];\n $out_of_stock = $qty > $product['stock'];\n if ($out_of_stock) {\n $items_in_stock = false;\n }\n \n include \"partials/list/shoppingCartItem.php\";\n }\n include_once \"partials/list/listEnd.php\";\n return $items_in_stock;\n }", "title": "" }, { "docid": "06f998002ec5cd5eb3037078f61972ca", "score": "0.46895906", "text": "public function parcel_product_list_by_branch()\n\t{\n\t\t$result = $this->product_model->parcel_product_list_by_branch();\n\n\t\t$response = array();\n\n\t\tif($result!='')\n\t\t{\n\t\t\t$response['status'] = \"1\";\n\t\t\t$response['data'] = $result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response['status'] = \"0\";\n\t\t\t$response['data'] = array();\n\t\t}\n\t\t\n\t\techo json_encode($response);die;\n\t}", "title": "" }, { "docid": "3a280f23782129624fa5ab8754fec450", "score": "0.46887285", "text": "public function getAllStatus()\n {\n $sql = \"SELECT s.id, s.status_name , s.color FROM status AS s ORDER BY s.id ASC\";\n\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n return $query->fetchAll();\n }", "title": "" }, { "docid": "6aef2e4072e0c26ef9e667a8c05b253a", "score": "0.46862456", "text": "public function newAction()\n {\n $entity = new ProductOrderStatus();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "b8dbc2a356eea7ae5be2f0090f131d11", "score": "0.46844977", "text": "public static function getStatusList() {\n return self::$orderStateList;\n }", "title": "" }, { "docid": "b2c7ad6149a660528cefe9f76016f512", "score": "0.46817225", "text": "public function testListProducts()\n {\n $response = $this->post('/api/product/list');\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "17cda30f35366120c0c34d3837a3f94f", "score": "0.46802804", "text": "public static function getStatusListData()\n {\n return array(\n Notification::STATUS_SENT => UsniAdaptor::t('application', 'Sent'),\n Notification::STATUS_PENDING => UsniAdaptor::t('application', 'Pending')\n );\n }", "title": "" }, { "docid": "34646129c4f418741c8cf07d95c484a0", "score": "0.46789134", "text": "public function fetchFilterBrandRelatedProduct($productIds = [])\n {\n return $this->product\n ->whereIn('id', $productIds)\n ->activeProductAndCheckOutOfStock()\n ->selectBrandCount()\n ->groupBy('products.brands__id')\n ->get();\n }", "title": "" }, { "docid": "b93141961e1618f88d473701acd68cfb", "score": "0.46700892", "text": "function get_statuses(){\n return array(\n 'n' => 'New',\n 'c' => 'Research',\n 'd' => 'Do it',\n 's' => 'HELP!',\n 'A' => 'Accepted',\n 'I' => 'In progress',\n 'r' => 'Road Trip',\n 'P' => 'Completed',\n 'Z' => 'In box',\n 'u' => 'Uploaded',\n\t\t\t\t 'x' => 'Impossible',\n );\n }", "title": "" }, { "docid": "df81d0c22508eb76a5cdf2ae2c0e9722", "score": "0.4667667", "text": "public function getStateApiStatuses($state) {\n return Mage::getSingleton(\"sales/order_config\")->getStateStatuses($state);\n }", "title": "" }, { "docid": "67ddc384484662920696734d57a94c64", "score": "0.46592265", "text": "static function arrayStatuses() {\n\n $status = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_COUPON_STATUS_AVAILABLE => array(\n 'label' => __( 'Available', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_COUPON_STATUS_PENDING => array(\n 'label' => __( 'Pending', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_COUPON_STATUS_CONFIRMED => array(\n 'label' => __( 'Confirmed', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'trash' => array(\n 'label' => __( 'Trash', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n )\n );\n return $status;\n }", "title": "" }, { "docid": "cc4e1c6518a8655493cf39c5d09cb09b", "score": "0.46578726", "text": "public function index()\n {\n\n return $this->connector->getAllProducts();\n }", "title": "" }, { "docid": "ee570e314b6544ddcc21702ba1a05608", "score": "0.46528038", "text": "public static function getAllResourceStatus() {\n $status = array();\n\n $status[] = self::PENDING;\n $status[] = self::VERIFIED;\n $status[] = self::REFUTED;\n $status[] = self::SPAM;\n $status[] = self::INADEQUATE;\n // $status[] = self::RETWEET;\n // $status[] = self::SCREENED;\n\n foreach($status as $status) {\n\n }\n return $status;\n }", "title": "" }, { "docid": "003a677d7fa3bf738929b53a99dc8a25", "score": "0.46452036", "text": "protected function get_pending_products () {\n\t\t$response = array();\n\n\t\t$products = $this->installed_products;\n\n\t\tif ( is_array( $products ) && ( 0 < count( $products ) ) ) {\n\t\t\t$activated_products = $this->get_activated_products();\n\n\t\t\tif ( is_array( $activated_products ) && ( 0 <= count( $activated_products ) ) ) {\n\t\t\t\tforeach ( $products as $k => $v ) {\n\t\t\t\t\tif ( isset( $v['product_key']) && ! in_array( $v['product_key'], $activated_products ) ) {\n\t\t\t\t\t\t$response[$k] = array( 'product_name' => $v['product_name'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "9312cce2771ebef4065f7b6151d90d82", "score": "0.46423507", "text": "public function index()\n {\n\n $products = Product::where('status',1)->get();\n\n return View('admin.product.adminProductList')->with('products', $products);\n }", "title": "" }, { "docid": "db3bb486eda803f0113c3d56d1b63e22", "score": "0.4640095", "text": "public function index()\n {\n return $this->showAll(BrokerStatus::all(),BrokerStatus::class);\n }", "title": "" }, { "docid": "997d9b09f63931c9aac8069b1dcf8fc4", "score": "0.46260586", "text": "public function list($products = NULL);", "title": "" }, { "docid": "0dc13df02a4a1f456048377b9257221c", "score": "0.46239287", "text": "public static function statuses()\n {\n return [\n self::STATUS_ACTIVE => Yii::t('common', 'Active'),\n self::STATUS_DELETED => Yii::t('common', 'Deleted')\n ];\n }", "title": "" }, { "docid": "c4258731e506b646c8a625fc0e3c299b", "score": "0.46186855", "text": "public function listAllProducts(Request $req) {\n // $status = $req->input('status');\n // $ob = Product::where('status', $status)->get();\n $ob = Product::orderBy('created_at','DESC')->all();\n return json_encode($ob);\n }", "title": "" }, { "docid": "d3cce7bd9ca8b15cb80bd794f4af3399", "score": "0.46176252", "text": "public function get_count_of_user_statuses() {\n $user_statuses = get_transient( 'new_user_approve_user_statuses_count' );\n\n if ( false === $user_statuses ) {\n $user_statuses = $this->_get_user_statuses();\n set_transient( 'new_user_approve_user_statuses_count', $user_statuses );\n }\n\n return $user_statuses;\n }", "title": "" }, { "docid": "db80d9ecde2188333d0b58f8d35d58c2", "score": "0.46074742", "text": "function product_list()\n\t{\n\t\t$product =& model::create('product');\n\t\t$this->template_data['products'] = $product->find_all(array('where' => 'is_active = 1','order' => 'created_at DESC','limit' => 100));\n\t}", "title": "" }, { "docid": "1f2742d2af5569412f9369991a5ff048", "score": "0.45999017", "text": "public function actionProducts() {\n $model = new Api();\n $error = $model->getStatusCodeMessage();\n $message = '';\n $status = '0';\n\n if (isset($_REQUEST['user_id']) && $_REQUEST['user_id'] != '' && isset($_REQUEST['access_token']) && $_REQUEST['access_token'] != '') {\n try {\n if ($model->validateUser($_REQUEST['user_id'], $_REQUEST['access_token'])) {\n $model->products($_REQUEST['user_id']);\n } else {\n $message = $error[40];\n $model->getJson(array('status' => '40', 'message' => $message));\n }\n } catch (yii\\db\\Exception $e) {\n $message = $error[20];\n $model->getJson(array('status' => '20', 'message' => $message));\n } catch (yii\\base\\UnknownMethodException $e) {\n $message = $error[30];\n $model->getJson(array('status' => '30', 'message' => $message));\n }\n } else {\n $message = $error[10];\n $model->getJson(array('status' => '10', 'message' => $message));\n }\n }", "title": "" }, { "docid": "a66ca871e76f23c53ac5c79d0b79179c", "score": "0.45869938", "text": "public function all()\n {\n return $this->responseOk([\n 'statuses' => config('status')\n ]);\n }", "title": "" }, { "docid": "2d7b9788113e1c5d9561fd492c115569", "score": "0.45823753", "text": "public static function wc_epo_get_product_categories() {\n\n\t\tcheck_ajax_referer( 'get-product-categories', 'security' );\n\n\t\tif ( empty( $_POST['product_id'] ) ) {\n\t\t\tdie();\n\t\t}\n\n\t\t$product = wc_get_product( absint( $_POST['product_id'] ) );\n\n\t\tif ( ! $product ) {\n\t\t\tdie();\n\t\t}\n\n\t\twp_send_json( array(\n\t\t\t'result' => 'success',\n\t\t\t'category_ids' => $product->get_category_ids()\n\t\t) );\n\t}", "title": "" }, { "docid": "f2058082ae7cc118662670fa1a7cc580", "score": "0.45803425", "text": "public static function listkey($status,$product)\n {\n //$key = DB::table('tblkeys')->get();\n foreach($product as $item){\n $product_type = $item->product_type;\n }\n \n $key = Keys::where('status',$status)->where('product_type',$product_type)->get(); \n\n return $key;\n }", "title": "" }, { "docid": "1437c614ead0140c160952da4275ad9d", "score": "0.4579849", "text": "public function getProductsAction() {\n $data = $this->getDoctrine()->getManager()->getRepository(Product::class)->findAll();\n\n\n\n $view = View::create()\n ->setStatusCode(200)\n ->setData($data);\n\n\n return $this->get('fos_rest.view_handler')->handle($view);\n }", "title": "" } ]
d6aab3bfe2b98a1cb621498ade836c19
fever supports xml wrapped in tags
[ { "docid": "52a8883db97c3b1425178a76ac7e115f", "score": "0.0", "text": "private function array_to_xml($array, $container = 'response', $is_root = true)\n\t{\n\t\tif (!is_array($array)) return array_to_xml(array($array));\n\n\t\t$xml = '';\n\n\t\tif ($is_root)\n\t\t{\n\t\t\t$xml .= '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\n\t\t\t$xml .= \"<{$container}>\";\n\t\t}\n\n\t\tforeach($array as $key => $value)\n\t\t{\n\t\t\t// make sure key is a string\n\t\t\t$elem = $key;\n\n\t\t\tif (!is_string($key) && !empty($container))\n\t\t\t{\n\t\t\t\t$elem = $container;\n\t\t\t}\n\n\t\t\t$xml .= \"<{$elem}>\";\n\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\tif (array_keys($value) !== array_keys(array_keys($value)))\n\t\t\t\t{\n\t\t\t\t\t$xml .= array_to_xml($value, '', false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$xml .= array_to_xml($value, r('/s$/', '', $elem), false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$xml .= (htmlspecialchars($value, ENT_COMPAT, 'ISO-8859-1') != $value) ? \"<![CDATA[{$value}]]>\" : $value;\n\t\t\t}\n\n\t\t\t$xml .= \"</{$elem}>\";\n\t\t}\n\n\t\tif ($is_root)\n\t\t{\n\t\t\t$xml .= \"</{$container}>\";\n\t\t}\n\n\t\treturn preg_replace('/[\\x00-\\x1F\\x7F]/', '', $xml);\n\t}", "title": "" } ]
[ { "docid": "1803c33c825318d610559bb7fcca1492", "score": "0.6873443", "text": "abstract public function xml();", "title": "" }, { "docid": "a1e92fe954e483f5b4a376142778f17a", "score": "0.67240566", "text": "function wrap_xml($xml, $tag='wrapped')\n{\n return preg_replace( '/^(<\\?xml[^>]*>)/', '$1'\n .\"\\n<\".$tag.\">\", // start tag\n $xml)\n .\"\\n</\".$tag.\">\"; // end tag\n}", "title": "" }, { "docid": "a6b85d45f2e3f674eae50193388f134f", "score": "0.64136046", "text": "function unwrap_xml($filename, $wrap_tag='wrapped')\n{\n $xmlstr = file_get_contents($filename);\n // remove start/end tags\n $xmlstr = preg_replace(\"|</*$wrap_tag>|\",'',$xmlstr);\n // remove blank lines\n $xmlstr = preg_replace(\"/(^[\\r\\n]*|[\\r\\n]+)[\\s\\t]*[\\r\\n]+/\", \"\\n\", $xmlstr);\n //save\n file_put_contents($filename,$xmlstr);\n}", "title": "" }, { "docid": "2f7492497bb22a04cd2f45a0aeeac86b", "score": "0.60041636", "text": "function xmltext() {\n\n\t\t$ret = $this->innertext();\n\t\t$ret = str_ireplace('<![CDATA[', '', $ret);\n\t\t$ret = str_replace(']]>', '', $ret);\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "c62a8fa8929fca9a7a3991470a51ac69", "score": "0.59108937", "text": "public function to_xml() {\n $this->mime_type = 'application/xml';\n $xml = \"<doc>\";\n foreach ($this->fields as $f=>$v) {\n $f_safe = htmlspecialchars($f, ENT_QUOTES, 'UTF-8');\n if (is_array($v)) {\n foreach ($v as $value) {\n $xml .= sprintf(\"<%s>%s</%s>\", $f_safe, htmlspecialchars($value, ENT_QUOTES, 'UTF-8'), $f_safe);\n }\n }\n else {\n $xml .= sprintf(\"<%s>%s</%s>\", $f_safe, htmlspecialchars($v, ENT_QUOTES, 'UTF-8'), $f_safe);\n }\n }\n $xml .= \"</doc>\";\n\n //error_log($xml);\n\n return $xml;\n\n }", "title": "" }, { "docid": "be8d57ebb466a61055310df0a4c34acb", "score": "0.58938247", "text": "public function xml() {\n return $this->html();\n }", "title": "" }, { "docid": "5a0ed0dd3efb83559484b2487e550bb3", "score": "0.58747804", "text": "static public function asXml () {\n\n }", "title": "" }, { "docid": "02d401f8adefdce5001c9b79395cd1a7", "score": "0.58697957", "text": "public static function xml(){\n static::type(static::TYPE_XML);\n static::$payload[] = implode('',func_get_args());\n }", "title": "" }, { "docid": "8131a079c437e3f4bdb3077d74de07aa", "score": "0.5814341", "text": "function f_XmlConv($x) {\n// Convertion of data items\n\t return htmlspecialchars(utf8_encode($x));\n}", "title": "" }, { "docid": "6637d8310b92f71269bc2921f2ec8c54", "score": "0.5806491", "text": "function xmlResponse($tags) {\n header('Content-Type: text/xml');\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>';\n echo '<response>'.$tags.'</response>';\n}", "title": "" }, { "docid": "5013daa108e2ff8568a4a70050c0b65d", "score": "0.5731906", "text": "public function readInnerXml () {}", "title": "" }, { "docid": "d77051b9b3838760220a7040102c2263", "score": "0.5727975", "text": "function toStringOpenTag(&$element,&$ret)\n\t{\n\t\t// START ADDITION...\n\t\tif ((empty($element->tag)) || (empty($element->oTag))) {\n\t\t\treturn;\n\t\t}\n\t\t// ...END ADDITION\n\n\n\t\t// spit ou the tag and attributes.\n \n if ($element->oTag{0} == '?') {\n $ret .= '<?php echo \"<\"; ?>';\n } else { \n $ret .= \"<\";\n }\n $ret .= $element->oTag;\n //echo '<PRE>'.print_r($element->attributes,true);\n foreach ($element->attributes as $k=>$v) {\n // if it's a flexy tag ignore it.\n \n \n if (strtoupper($k) == 'FLEXY:RAW') {\n if (!is_array($v) || !isset($v[1]) || !is_object($v[1])) {\n return $this->_raiseErrorWithPositionAndTag(\n 'flexy:raw only accepts a variable or method call as an argument, eg.'.\n ' flexy:raw=\"{somevalue}\" you provided something else.' .\n \n null, HTML_TEMPLATE_FLEXY_ERROR_DIE);\n }\n $add = $v[1]->compile($this->compiler);\n if (is_object($add) && is_a($add,'PEAR_Error')) {\n return $add;\n }\n $ret .= ' ' . $add;\n continue;\n \n }\n \n if (strtoupper(substr($k,0,6)) == 'FLEXY:') {\n continue;\n }\n // true == an attribute without a =\"xxx\"\n if ($v === true) {\n $ret .= \" $k\";\n continue;\n }\n \n // if it's a string just dump it.\n if (is_string($v)) {\n $v = str_replace(array('{_(',')_}'),array('',''),$v);\n $ret .= \" {$k}={$v}\";\n continue;\n }\n \n // normally the value is an array of string, however\n // if it is an object - then it's a conditional key.\n // eg. if (something) echo ' SELECTED';\n // the object is responsible for adding it's space..\n \n if (is_object($v)) {\n $add = $v->compile($this->compiler);\n if (is_object($add) && is_a($add,'PEAR_Error')) {\n return $add;\n }\n \n $ret .= $add;\n continue;\n }\n \n // otherwise its a key=\"sometext{andsomevars}\"\n \n $ret .= \" {$k}=\";\n \n foreach($v as $item) {\n \n if (is_string($item)) {\n // skip translation strings in tags.\n $item = str_replace(array('{_(',')_}'),array('',''),$item);\n $ret .= $item;\n continue;\n }\n $add = $item->compile($this->compiler);\n if (is_object($add) && is_a($add,'PEAR_Error')) {\n return $add;\n }\n $ret .= $add;\n }\n }\n $ret .= \">\";\n\t}", "title": "" }, { "docid": "ea7160c8b9c4fd56f887ce5f0ef5a0d9", "score": "0.5702412", "text": "public function handleTagStart() {}", "title": "" }, { "docid": "1a1ffa1efbc2a1d7e3ff8b4fb5db1949", "score": "0.5625127", "text": "public function getXmlString();", "title": "" }, { "docid": "9dcf9acb4916af38ae0e74d40f1f4f59", "score": "0.56136656", "text": "public function getOpenTagWrapper();", "title": "" }, { "docid": "7269a1a36c3d1ac85ecd745d101815d8", "score": "0.5605394", "text": "function xml_generate ($body_xml) {\r\n\t$xml=<<<eot\r\n<methodResponse>\r\n\t<params>\r\n\t\t<param>\r\n\t\t\t<value>\r\n\t\t\t\t{$body_xml}\r\n\t\t\t</value>\r\n\t\t</param>\r\n\t</params>\r\n</methodResponse>\r\neot;\r\n\treturn $xml;\r\n}", "title": "" }, { "docid": "e5055a84bb984de7a25cc881d02e912f", "score": "0.55723315", "text": "function print_xml_node(){\n $node=''; \n if (preg_match('/</',$this->value) or preg_match('/>/',$this->value)) $this->value=\"<![CDATA[\".$this->value.\"]]>\"; \n if ($this->type=='open'){\n $node.= \"<\".$this->tag.\"\";\n if ( $this->attributes) $node.=$this->print_attr();\n $node.= \">\".$this->value; \n }\n if ($this->type=='complete'){\n $node.= \"<\".$this->tag.\"\";\n if ( $this->attributes) $node.=$this->print_attr();\n $node.= \">\".$this->value.\"</\".$this->tag.\">\";\n }\n if ($this->type=='close'){\n $node.= \"</\".$this->tag.\"> \";\n }\n return $node;\n }", "title": "" }, { "docid": "a6831efe5c95635df925f00a9e0bbc56", "score": "0.55439836", "text": "function print_xml(){\n $this_node=new xml_node(); \n $file=\"<\\?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\"; \n for ($i=0;$i<count($this->vals);$i++){ \n $this_node->xml_node_by_array($this->vals[$i]);\n if ($this_node->type!='cdata'){\n if ($this_node['level']==2) $file.=\" \";\n if ($this_node['level']==3) $file.=\" \"; \n $file.=$this_node->print_xml_node().\"\\n\";\n } \n }\n return $file;\n }", "title": "" }, { "docid": "67475c9be17c723d9796a594a9c983b7", "score": "0.5536113", "text": "public function documentLingotekXML() {\n $translatable = array();\n\n // for now, assume all strings in locales_source table for the given set are translatable\n if (TRUE) {\n $translatable = array_keys($this->source_data);\n }\n\n $content = '';\n foreach ($translatable as $field) {\n $field_data = $this->source_data[$field];\n if (variable_get('lingotek_config_encode_ampersand', FALSE)) {\n $field_data = str_replace(\"&\", \"&amp;\", $field_data);\n }\n $text = lingotek_filter_placeholders($field_data, TRUE);\n\n if ($text) {\n $current_field = '<' . self::TAG_PREFIX . $field . '>';\n $current_field .= '<element><![CDATA[' . $text . ']]></element>' . \"\\n\";\n $current_field .= '</' . self::TAG_PREFIX . $field . '>';\n $content .= $current_field . \"\\n\";\n }\n }\n\n return \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><contents>$content</contents>\";\n }", "title": "" }, { "docid": "c819267bdf2cb203caf8d037d980b183", "score": "0.5521801", "text": "public static function xml(...$args){\n static::type(static::TYPE_XML);\n static::$payload[] = implode('', $args);\n }", "title": "" }, { "docid": "598e82f96f2fc2c37d1ea13193e26c79", "score": "0.5521447", "text": "function text2xml ($xml) {\n $search = array('<', '>', '\"');\n $replace = array('&lt;', '&gt;', '&quot;');\n $str = str_replace($search, $replace, (string)$xml);\n return $str;\n}", "title": "" }, { "docid": "cbed6ae2f23c5e86e12576fa1d7713ee", "score": "0.55166864", "text": "function\nvar_xml ($v)\n{\n ob_start ();\n\n print_r ($v);\n// var_dump ($v);\n\n $p = ob_get_contents ();\n\n ob_end_clean ();\n\n $p = str_replace (array (' => ', 'SimpleXMLElement', 'Object'), '', $p);\n $p = str_replace (array (']Array'), ']', $p);\n// $p = str_replace (array ('('.\"\\n\"), '', $p);\n// $p = str_replace ('[', '<', $p);\n// $p = str_replace (']', '>', $p);\n $p = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.$p;\n\n return $p;\n}", "title": "" }, { "docid": "1353a5c2f8aeab10f6dc4fb93a98bfb2", "score": "0.55157906", "text": "function rss_start_tag($tag,$level=0,$endline=false) {\n if ($endline) {\n $endchar = \"\\n\";\n } else {\n $endchar = \"\";\n }\n return str_repeat(\" \",$level*2).\"<\".$tag.\">\".$endchar;\n}", "title": "" }, { "docid": "afa8e700f061415e545be9dae1ca26d2", "score": "0.5513649", "text": "public function getXmlString() {\n\t}", "title": "" }, { "docid": "a9c504070f0ec58442f0e1dab2ce21eb", "score": "0.5511176", "text": "public function asXML() {\n\t\treturn $this->generate_markup( 'xml' );\n\t}", "title": "" }, { "docid": "0c141f93e0572a705a8fcee502772ff2", "score": "0.5499426", "text": "function feed_ending_tags($feed_type) {\n $tags = \"\";\n switch ($feed_type) {\n case 'xml':\n $tags = \"</root>\";\n break;\n }\n return $tags;\n}", "title": "" }, { "docid": "18b82deabf0d04e24f3984efdb6fb39c", "score": "0.5489132", "text": "function zTag(&$arquivo, $ponteiro = -1, $tag = 'z:'){ \n $inicio = strpos($arquivo, '<'.$tag, $ponteiro + 1);\n if($inicio !== false){ \n //get the type (<z:tipo ... )\n $x = substr($arquivo, $inicio, 25);\n preg_match('/(?<tag>\\w+):(?<type>\\w+|[\\:]\\w+)/', $x, $m);\n if(!isset($m[0])) return false; \n \n $ntag = $m[0];\n //the final ...\n $ftag = strpos($arquivo, '</' . $ntag . '>', $inicio);\n $fnTag = strpos($arquivo, '/>', $inicio);\n $fn = strpos($arquivo, '>', $inicio); \n \n //not /> or </z:xxx> = error\n if($fnTag === false && $ftag === false) return false;\n \n if($ftag !== false ) {\n if($fn !== false && $fn < $ftag){\n $a['-content-'] = substr($arquivo, $fn+1, ($ftag - $fn)-1);\n $finTag = $fn;\n $a['-final-'] = $ftag + strlen('</'.$ntag.'>');\n } else return false; \n } elseif($fnTag !== false) {\n $a['-content-'] = '';\n $finTag = $fnTag;\n $a['-final-'] = $fnTag + 2; \n } else return false; \n \n //catching attributes\n preg_match_all('/(?<att>\\w+)=\"(?<val>.*?)\"/', substr($arquivo, $inicio, $finTag - $inicio), $atb);\n \n if(isset($atb['att'])){\n foreach ($atb['att'] as $k=>$v){\n $a[$v] = $atb['val'][$k];\n }\n } \n \n //block data\n $a['-inicio-'] = $inicio;\n $a['-tamanho-'] = ($a['-final-'] - $inicio);\n $a['-tipo-'] = 'var';\n \n if(strpos($m['type'], ':') !== false) $a['-tipo-'] = str_replace (':', '', $m['type']);\n else $a['var'] = $m['type'];\n \n return $a;\n }\n return false;\n }", "title": "" }, { "docid": "4ffa13bf3b0f62d0b63471e8f07e7e70", "score": "0.5488691", "text": "public function getInnerXML() { \n\t\t$innerHTML = ''; \n\t\t$children = $this->obj->childNodes;\n\t\tforeach ($children as $child) { \n\t\t\t$innerHTML .= $child->ownerDocument->saveXML($child); \n\t\t} \n\t\treturn preg_replace('~<(/)?([^<> ]*?:)([^<>]*?)>~', '<$1$3>', $innerHTML);\n\t}", "title": "" }, { "docid": "b09773d5c98e5ad259cf93285201b32f", "score": "0.5485589", "text": "function __xml($data) {\n\t\t$result = \"\";\n\n\t\tforeach($data as $k => $v) {\n\t\t\t$value = is_array($v) ? \"\\n\".$this->__xml($v) : $this->_change_encoding($v, \"HTML-ENTITIES\", true);\n\t\t\t$result .= \"<$k>$value</$k>\\n\";\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "fa6f3e983dfd5ec81b91a325f8e10c99", "score": "0.54833937", "text": "function asXML() {\n\t\t$title\t= str_replace('&','&amp;',trim($this->postdata['title']));\n\t\t$feed\t= str_replace('&','&amp;',trim($this->postdata['feed']));\n\t\t$format\t= str_replace('&','&amp;',trim($this->postdata['format']));\n\n\t\t// format data for xml output\n\t\t$xml .= '<documentFeed>';\n\t\t$xml .= '<Feed rdf:about=\"'.$feed.'\" cmx:feedFormat=\"'.$format.'\" dc:title=\"'.$title.'\"/>';\n\n\t\t// close the node\n\t\t$xml .= '</documentFeed>';\n\n\t\t// return the XML\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "fb03a76ab1ddf95ef4122bc60cc1c0ad", "score": "0.54731554", "text": "function yy_r11(){ $this->compiler->tag_nocache = true; $this->is_xml = true; $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode(\"<?php echo '<?xml';?>\", $this->compiler, true)); }", "title": "" }, { "docid": "d7c33b92e6efd274e929cd3b935fb175", "score": "0.5469222", "text": "public function readOuterXml () {}", "title": "" }, { "docid": "c994199bc6590557279951390bb50b77", "score": "0.54629403", "text": "abstract public function markup();", "title": "" }, { "docid": "d6bd67bebc1cbf5b585843d700528cfd", "score": "0.54576975", "text": "function _createXMLTag($tag, $replaceEntities = true)\n {\n if ($this->options['indentAttributes'] !== false) {\n $multiline = true;\n $indent = str_repeat($this->options['indent'], $this->_tagDepth);\n\n if ($this->options['indentAttributes'] == '_auto') {\n $indent .= str_repeat(' ', (strlen($tag['qname'])+2));\n\n } else {\n $indent .= $this->options['indentAttributes'];\n }\n } else {\n $indent = $multiline = false;\n }\n\n if (is_array($tag['content'])) {\n if (empty($tag['content'])) {\n $tag['content'] = '';\n }\n } elseif(is_scalar($tag['content']) && (string)$tag['content'] == '') {\n $tag['content'] = '';\n }\n\n if (is_scalar($tag['content']) || is_null($tag['content'])) {\n if ($replaceEntities === true) {\n $replaceEntities = XML_UTIL_ENTITIES_XML;\n }\n\n $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak']);\n } elseif (is_array($tag['content'])) {\n $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']);\n } elseif (is_object($tag['content'])) {\n $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']);\n } elseif (is_resource($tag['content'])) {\n settype($tag['content'], 'string');\n $tag = XML_Util::createTagFromArray($tag, $replaceEntities);\n }\n return $tag;\n }", "title": "" }, { "docid": "d6bd67bebc1cbf5b585843d700528cfd", "score": "0.54576975", "text": "function _createXMLTag($tag, $replaceEntities = true)\n {\n if ($this->options['indentAttributes'] !== false) {\n $multiline = true;\n $indent = str_repeat($this->options['indent'], $this->_tagDepth);\n\n if ($this->options['indentAttributes'] == '_auto') {\n $indent .= str_repeat(' ', (strlen($tag['qname'])+2));\n\n } else {\n $indent .= $this->options['indentAttributes'];\n }\n } else {\n $indent = $multiline = false;\n }\n\n if (is_array($tag['content'])) {\n if (empty($tag['content'])) {\n $tag['content'] = '';\n }\n } elseif(is_scalar($tag['content']) && (string)$tag['content'] == '') {\n $tag['content'] = '';\n }\n\n if (is_scalar($tag['content']) || is_null($tag['content'])) {\n if ($replaceEntities === true) {\n $replaceEntities = XML_UTIL_ENTITIES_XML;\n }\n\n $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options['linebreak']);\n } elseif (is_array($tag['content'])) {\n $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']);\n } elseif (is_object($tag['content'])) {\n $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']);\n } elseif (is_resource($tag['content'])) {\n settype($tag['content'], 'string');\n $tag = XML_Util::createTagFromArray($tag, $replaceEntities);\n }\n return $tag;\n }", "title": "" }, { "docid": "ddf25a2a410e5e3aac8e32a8a3ef817c", "score": "0.5453574", "text": "function odt2html($odt_file, $xml_string=NULL) {\r\n global $_ophir_odt_import_conf;\r\n \r\n $xml = new XMLReader();\r\n\r\n if ($xml_string===NULL){\r\n if (@$xml->open('zip://'.$odt_file.'#content.xml') === FALSE) {\r\n ophir_error(\"Unable to read file contents.\");\r\n return false;\r\n }\r\n }else{\r\n if(@$xml->xml($xml_string)===FALSE) {\r\n ophir_error(\"Invalid file contents.\");\r\n return false;\r\n }\r\n }\r\n\r\n //Now, convert the xml from a string to an \r\n $html = \"\";\r\n\r\n $elements_tree = array();\r\n\r\n static $styles = array(\"Quotations\" => array(\"tags\" => array(\"blockquote\")));\r\n\r\n $footnotes = \"\";\r\n\r\n $translation_table = array ();\r\n $translation_table['draw:frame'] = 'div class=\"odt-frame\"';\r\n if ($_ophir_odt_import_conf[\"features\"][\"list\"]===0) $translation_table[\"text:list\"] = FALSE;\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"list\"]===2) {\r\n $translation_table[\"text:list\"] = \"ul\";\r\n $translation_table[\"text:list-item\"] = \"li\";\r\n }\r\n if ($_ophir_odt_import_conf[\"features\"][\"table\"]===0) $translation_table[\"table:table\"] = FALSE;\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"table\"]===2) {\r\n $translation_table[\"table:table\"] = \"table cellspacing=0 cellpadding=0 border=1\";\r\n $translation_table[\"table:table-row\"] = \"tr\";\r\n $translation_table[\"table:table-cell\"] = \"td\";\r\n }\r\n if ($_ophir_odt_import_conf[\"features\"][\"table of contents\"]===0) $translation_table['text:table-of-content'] = FALSE;\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"table of contents\"]===2) {\r\n $translation_table['text:table-of-content'] = 'div class=\"odt-table-of-contents\"';\r\n }\r\n\r\n //$xml->read(); echo \"\\n<br><code>\\n\" .str_replace(\"&lt\", \"\\n<br><br>&lt\", htmlspecialchars($xml->readInnerXML())). \"\\n</code><br>\\n\\n\";\r\n while ($xml->read()) {\r\n //var_dump($xml->name, $xml->nodeType, $xml->isEmptyElement, ($xml->hasValue)?$xml->value:FALSE); echo \"\\n<br>\\n\";\r\n $opened_tags = array();//This array will contain the HTML tags opened in every iteration\r\n\r\n if ($xml->nodeType === XMLReader::END_ELEMENT) {//Handle a closing tag\r\n if (empty($elements_tree)) continue;\r\n do {\r\n $element = array_pop($elements_tree);\r\n if ($element && $element[\"tags\"]) {\r\n //Close opened tags\r\n $element[\"tags\"] = array_reverse($element[\"tags\"]);\r\n foreach ($element[\"tags\"] as $HTML_tag) {\r\n //$html.= \"<font style='color:red' title='Closing $HTML_tag, from $element[name]. Current element is \" .($xml->name). \"'>©</font>\";\r\n $HTML_tag = current(explode(\" \", $HTML_tag));\r\n $html .= \"</\" . $HTML_tag . \">\";\r\n }\r\n }\r\n } while ($xml->name !== $element[\"name\"] && $element); //Close every opened tags. This should also handle malformed XML files\r\n continue;\r\n }\r\n elseif (in_array($xml->nodeType,\r\n array(XMLReader::ELEMENT,\r\n XMLReader::TEXT,\r\n XMLReader::SIGNIFICANT_WHITESPACE))\r\n ) {//Handle tags\r\n switch ($xml->name) {\r\n case \"#text\"://Text\r\n //$html .= str_replace(array(\"<\",\">\"),array(\"&lt;\",\"&gt;\"), $xml->value);\r\n $html .= htmlspecialchars($xml->value);\r\n break;\r\n case \"text:h\"://Title\r\n if ($_ophir_odt_import_conf[\"features\"][\"header\"]===0) {\r\n $xml->next();\r\n break;\r\n }\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"header\"]===1) break;\r\n $n = $xml->getAttribute(\"text:outline-level\");\r\n if ($n>6) $n=6;\r\n $opened_tags[] = \"h$n\";\r\n $html .= \"\\n\\n<h$n>\";\r\n break;\r\n\r\n case \"text:p\"://Paragraph\r\n //Just convert odf <text:p> to html <p>\r\n $tags = @$styles[$xml->getAttribute(\"text:style-name\")][\"tags\"];\r\n if (!($tags && !in_array(\"blockquote\", $tags))) {\r\n // Do not print a <p> immediatly after or before a <blockquote>\r\n $opened_tags[] = \"p\";\r\n $html .= \"\\n<p>\";\r\n }\r\n break;\r\n\r\n case \"text:a\":\r\n if ($_ophir_odt_import_conf[\"features\"][\"link\"]===0) {\r\n $xml->next();\r\n break;\r\n }\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"link\"]===1) break;\r\n $href = $xml->getAttribute(\"xlink:href\");\r\n $opened_tags[] = 'a';\r\n $html .= '<a href=\"' . $href . '\">';\r\n break;\r\n\r\n case \"draw:image\":\r\n if ($_ophir_odt_import_conf[\"features\"][\"image\"]===0) {\r\n $xml->next();\r\n break;\r\n }\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"image\"]===1) break;\r\n \r\n $image_file = 'zip://' . $odt_file . '#' . $xml->getAttribute(\"xlink:href\");\r\n if (isset($_ophir_odt_import_conf[\"images_folder\"]) &&\r\n is_dir($_ophir_odt_import_conf[\"images_folder\"]) ) {\r\n if (ophir_is_image($image_file)) {\r\n $image_to_save = $_ophir_odt_import_conf[\"images_folder\"] . '/' . basename($image_file);\r\n if ( !($src = ophir_copy_file ($image_file, $image_to_save))) {\r\n ophir_error(\"Unable to move image file\");\r\n break;\r\n } \r\n } else {\r\n ophir_error(\"Found invalid image file.\");\r\n break;\r\n } \r\n }\r\n else {\r\n ophir_error('Unable to save the image. Creating a data URL. Image saved directly in the body.F');\r\n $src = 'data:image;base64,' . base64_encode(file_get_contents($image_file));\r\n }\r\n $html .= \"\\n<img src=\\\"$src\\\" />\";\r\n break;\r\n\r\n case \"style:style\":\r\n $name = $xml->getAttribute(\"style:name\");\r\n $parent = $xml->getAttribute(\"style:parent-style-name\");\r\n if (array_key_exists($parent, $styles)) $styles[$name] = $styles[$parent]; //Not optimal\r\n\r\n if ($xml->isEmptyElement) break; //We can't handle that at the moment\r\n while ( $xml->read() && //Read one tag\r\n ($xml->name != \"style:style\" || $xml->nodeType != XMLReader::END_ELEMENT) //Stop on </style:style>\r\n ) {\r\n if ($xml->name == \"style:text-properties\") {\r\n if ($xml->getAttribute(\"fo:font-style\") == \"italic\")\r\n $styles[$name][\"tags\"][] = \"i\"; //Creates the style and add <i> to its tags\r\n\r\n if ($xml->getAttribute(\"fo:font-weight\") == \"bold\")\r\n $styles[$name][\"tags\"][] = \"b\"; //Creates the style and add <b> to its tags\r\n\r\n if ($xml->getAttribute(\"style:text-underline-style\") == \"solid\")\r\n $styles[$name][\"tags\"][] = \"u\"; //Creates the style and add <b> to its tags\r\n\r\n }\r\n }\r\n break;\r\n case \"text:note\":\r\n if ($_ophir_odt_import_conf[\"features\"][\"note\"]===0) {\r\n $xml->next();\r\n break;\r\n }\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"note\"]===1) break;\r\n $note_id = $xml->getAttribute(\"text:id\");\r\n $note_name = \"Note\";\r\n while ( $xml->read() && //Read one tag\r\n ($xml->name != \"text:note\" || $xml->nodeType != XMLReader::END_ELEMENT) //Stop on </style:style>\r\n ) {\r\n if ($xml->name==\"text:note-citation\" &&\r\n $xml->nodeType == XMLReader::ELEMENT)\r\n $note_name = $xml->readString();\r\n elseif ($xml->name==\"text:note-body\" &&\r\n $xml->nodeType == XMLReader::ELEMENT) {\r\n $note_content = odt2html($odt_file, $xml->readOuterXML());\r\n }\r\n }\r\n\r\n $html .= \"<sup><a href=\\\"#odt-footnote-$note_id\\\" class=\\\"odt-footnote-anchor\\\" name=\\\"anchor-odt-$note_id\\\">$note_name</a></sup>\";\r\n\r\n $footnotes .= \"\\n\" . '<div class=\"odt-footnote\" id=\"odt-footnote-' . $note_id . '\" >';\r\n $footnotes .= '<a class=\"footnote-name\" href=\"#anchor-odt-' . $note_id . '\">' . $note_name . ' .</a> ';\r\n $footnotes .= $note_content;\r\n $footnotes .= '</div>' . \"\\n\";\r\n break;\r\n\r\n case \"office:annotation\":\r\n if ($_ophir_odt_import_conf[\"features\"][\"annotation\"]===0) {\r\n $xml->next();\r\n break;\r\n }\r\n elseif ($_ophir_odt_import_conf[\"features\"][\"annotation\"]===1) break;\r\n $annotation_id = (isset($annotation_id))?$annotation_id+1:1;\r\n $annotation_content = \"\";\r\n $annotation_creator = \"Anonymous\";\r\n $annotation_date = \"\";\r\n do{\r\n $xml->read();\r\n if ($xml->name==\"dc:creator\" &&\r\n $xml->nodeType == XMLReader::ELEMENT)\r\n $annotation_creator = $xml->readString();\r\n elseif ($xml->name==\"dc:date\" &&\r\n $xml->nodeType == XMLReader::ELEMENT) {\r\n $annotation_date = date(\"jS \\of F Y, H\\h i\\m\", strtotime($xml->readString()));\r\n }\r\n elseif ($xml->nodeType == XMLReader::ELEMENT) {\r\n //echo \"<h1>Contenu!!\" . $xml->readString(). \"</h1>\";\r\n $annotation_content .= $xml->readString();\r\n $xml->next();\r\n }\r\n }while (!($xml->name === \"office:annotation\" &&\r\n $xml->nodeType === XMLReader::END_ELEMENT));//End of the note\r\n\r\n $html .= '<sup><a href=\"#odt-annotation-' . $annotation_id . '\" name=\"anchor-odt-annotation-' . $annotation_id . '\" title=\"Annotation (' . $annotation_creator . ')\">(' . $annotation_id . ')</a></sup>';\r\n $footnotes .= \"\\n\" . '<div class=\"odt-annotation\" id=\"odt-annotation-' . $annotation_id . '\" >';\r\n $footnotes .= '<a class=\"annotation-name\" href=\"#anchor-odt-annotation-' . $annotation_id . '\"> (' . $annotation_id . ')&nbsp;</a>';\r\n $footnotes .= \"\\n\" . '<b>' . $annotation_creator . ' (<i>' . $annotation_date . '</i>)</b> :';\r\n $footnotes .= \"\\n\" . '<div class=\"odt-annotation-content\">' . $annotation_content . '</div>';\r\n $footnotes .= '</div>' . \"\\n\";\r\n break;\r\n\r\n default:\r\n if (array_key_exists($xml->name, $translation_table)) {\r\n if ($translation_table[$xml->name]===FALSE) {\r\n $xml->next();\r\n break;\r\n }\r\n $tag = explode(\" \", $translation_table[$xml->name], 1);\r\n //$tag[0] is the tag name, other indexes are attributes\r\n $opened_tags[] = $tag[0];\r\n $html .= \"\\n<\" . $translation_table[$xml->name] . \">\";\r\n }\r\n }\r\n }\r\n\r\n if ($xml->nodeType === XMLReader::ELEMENT &&\r\n !($xml->isEmptyElement) ) { //Opening tag\r\n $current_element_style = $xml->getAttribute(\"text:style-name\");\r\n if ($current_element_style &&\r\n isset($styles[$current_element_style])) {\r\n //Styling tags management\r\n foreach ($styles[$current_element_style][\"tags\"] as $HTML_tag) {\r\n $html .= \"<\" . $HTML_tag . \">\";\r\n $opened_tags[] = $HTML_tag;\r\n }\r\n }\r\n $elements_tree[] = array(\"name\" => $xml->name,\r\n \"tags\" => $opened_tags);\r\n }\r\n\r\n }\r\n return $html . $footnotes;\r\n}", "title": "" }, { "docid": "08bd07b0b833e3be6dedc6d52f4281f3", "score": "0.54520273", "text": "public function testWrapsMultipleXmlNodesCorrectly() {\n $wrapped = $this->wrapper->wrap(\n Validator::PARSER_XML,\n '<item>Foo</item><item>Bar</item>'\n );\n\n $document = new DOMDocument();\n $document->loadXML($wrapped);\n\n // \"<root>\"-tag should automatically inserted\n $this->assertEquals('root', $document->firstChild->nodeName);\n\n // It shouldn't insert more than the two nodes we gave it\n $this->assertEquals(2, $document->firstChild->childNodes->length);\n\n // The \"<item>\" nodes should exist and have the correct values\n $this->assertEquals('item', $document->firstChild->firstChild->nodeName);\n $this->assertEquals('Foo', $document->firstChild->firstChild->nodeValue);\n\n $this->assertEquals('item', $document->firstChild->lastChild->nodeName);\n $this->assertEquals('Bar', $document->firstChild->lastChild->nodeValue);\n }", "title": "" }, { "docid": "2a9174362febc06f26553f1eadc4dbf9", "score": "0.5430329", "text": "function xmlFormat(){\n $parser = xml_parser_create();\n xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);\n xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);\n xml_parse_into_struct($parser,$this->xml,$values,$tags);\n xml_parser_free($parser);\n $this->total = intval(count($values)/7);\n //echo $this->total;\n //print_r($values);\n }", "title": "" }, { "docid": "154c8436a49391b0d0f931d2a41f9ee8", "score": "0.5422261", "text": "function &renderCustomTag(&$tpl, &$tag, &$currentSectionLevel, &$tdSectionLevel, &$childTagText, $standalone = false )\r\n {\r\n $name = $tag->attributeValue( 'name' );\r\n $isInline = false;\r\n include_once( \"lib/ezutils/classes/ezini.php\" );\r\n $ini =& eZINI::instance( 'content.ini' );\r\n\r\n $isInlineTagList =& $ini->variable( 'CustomTagSettings', 'IsInline' );\r\n foreach ( array_keys ( $isInlineTagList ) as $key )\r\n {\r\n $isInlineTagValue =& $isInlineTagList[$key];\r\n if ( $isInlineTagValue )\r\n {\r\n if ( $name == $key )\r\n $isInline = true;\r\n }\r\n }\r\n\r\n if ( $isInline || $standalone )\r\n {\r\n $childContent = $childTagText;\r\n }\r\n else\r\n {\r\n $childContent = $this->renderXHTMLSection( $tpl, $tag, $currentSectionLevel, $tdSectionLevel );\r\n $isBlockTag = true;\r\n }\r\n \r\n $attstr = '';\r\n $customAttributes =& $tag->attributesNS( \"http://ez.no/namespaces/ezpublish3/custom/\" );\r\n foreach ( $customAttributes as $attribute )\r\n {\r\n //eZDebug::writeNotice( $attribute->Name.'='.$attribute->Content );\r\n if ( $attribute->Name == 'class' )\r\n $tpl->setVariable( 'classification', $attribute->Content, 'xmltagns' );\r\n $attstr .= $attribute->Name . '|' . $attribute->Content . '|';\r\n $tpl->setVariable( $attribute->Name, $attribute->Content, 'xmltagns' );\r\n }\r\n $tpl->setVariable( 'attstr', $attstr, 'xmltagns' );\r\n\r\n //$tpl->setVariable( 'content', '<!-- content ' . $name . ' -->'.$childContent.'<!-- /content ' . $name . ' -->', 'xmltagns' );\r\n $tpl->setVariable( 'content', $childContent, 'xmltagns' );\r\n $uri = \"design:xmlarea/ezxmltags/$name.tpl\";\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n //$tagname = ($isBlockTag) ? 'div' : 'span';\r\n \r\n //return \"<span id='custom' class='$name'><!-- custom class=\\\"$name\\\" $attstr -->\" . implode( '', $textElements ) . \"<!-- /custom class=\\\"$name\\\" $attstr --></span>&nbsp;\";\r\n return implode( '', $textElements );\r\n \r\n }", "title": "" }, { "docid": "720c4b6a448319bdac176eafd9167b5a", "score": "0.5421977", "text": "function addSimpleXML($xml){\r\n\t}", "title": "" }, { "docid": "d7eec7b32ee382f292f4be1832d29ddc", "score": "0.541982", "text": "function xmlencode($value) {\n# return preg_replace( array(\"@<@\", \"@>@\", \"@'@\", '@\"@', \"@&@\", \"@\" . PHPDOC_LINEBREAK .\"@\", \"@\\n@\", \"@\\r@\"), array(\"&lt;\", \"&gt;\", \"&apos;\", \"&quot;\", \"&amp;\", '&#x0a;', '&#x0a;', '&#x0a;'), $value);\n return utf8_encode(preg_replace( array(\"@<@\", \"@>@\", \"@'@\", '@\"@', \"@&@\", \"@\" . PHPDOC_LINEBREAK . \"@\", \"@\\n@\", \"@\\r@\"), array(\"&lt;\", \"&gt;\", \"&apos;\", \"&quot;\", \"&amp;\", '&#x0a;', '&#x0a;', '&#x0a;'), $value));\n }", "title": "" }, { "docid": "53217adb3f39601c6b8d0a6798b5bf7d", "score": "0.54140645", "text": "function xml_set($main_tag=''){\r\n\t\tif ($this->data) {\r\n\t\t\t$this->xml = '';\r\n\t\t\tif ($main_tag=='') $main_tag = get_class($this);\r\n\t\t\tforeach ($this->data as $k => $v) {\r\n\t\t\t\t$this->xml .= \"<\" . $main_tag . \">\\n\";\r\n\t\t\t\t\tforeach ($v as $k1 => $v1) {\r\n \t\t\t\t\tif (strpos($k1,'datum')!==false){\t\r\n\t\t\t\t\t\t\t$v1 = preg_replace (\"/(19|20)(\\d{2})-(\\d{1,2})-(\\d{1,2})/\", \"\\\\4/\\\\3/\\\\1\\\\2\", $v1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (is_array($v1)){\r\n \t\t\t\t\t\tforeach ($v1 as $v2) $this->xml .= (\"\\t<$k1>$v2</$k1>\\n\");\r\n \t\t\t\t\t}elseif (is_a($v1,\"sql_get\")) {\r\n \t\t\t\t\t\t\r\n \t\t\t\t\t\t$this->xml .= $v1->xml;\r\n \t\t\t\t\t}else{\r\n \t\t\t\t\t\t$this->xml .= \"\\t<$k1>$v1</$k1>\\n\";\r\n \t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$this->xml .= \"</\" . $main_tag . \">\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8d03c51c6892801e34dadd89451acd57", "score": "0.5410472", "text": "public function fullEndElement () {}", "title": "" }, { "docid": "d3176fcb281c01f2e771c81eff177df4", "score": "0.54032695", "text": "abstract public function getMarkup();", "title": "" }, { "docid": "11e482952785522bab72847664d2d065", "score": "0.54020786", "text": "protected function processTag($template){\n /*\n searchTag search if template contain an <x-tag>\n return $tagName: string \"<x-tag>\"\n Else return false\n */\n $tagName = $this->searchTag($template);\n\n if($tagName !== false){\n\n /*\n put HTML attributes in $attributes\n */\n $attributes = $this->getAttributes($tagName);\n\n /*\n Delete all HTML attributes in return <x-tag>\n */\n $tagName = $this->stripAttributesFromTag($tagName);\n\n /*\n Search Enclosing Tag in $template, if not found, the tag will be process as an self enclosing tag\n */\n $searchEncTag = $this->searchEncloseTag($template,$tagName);\n\n\n /*\n Process tag in format <x-tag></x-tag>\n */\n if ($searchEncTag !== false){\n\n //delete HTML attribute from Tag in $template\n $template = $this->stripAttributes($template, $tagName);\n\n //Get content between Tag and store it in $content, for the next processing iteration\n $content = $this->getTagContent($template, $tagName);\n\n //Remove All between <x-tag> and </x-tag>\n $template = $this->cleanBetweenTag($template, $tagName);\n\n //Set content of tag.php file between <x-tags>\n $template = $this->insertComponent($template, $tagName);\n\n //Replace <x-slot></x-slot> by $content\n $template = $this->insertSlot($template, $content);\n\n //neutralizeTag transform <x-tag> in <ski-tag>, for the next iteration, it will be ignored\n $template = $this->neutralizeTag($template, $tagName);\n\n // Insert HTML attributes store in $attributes in tag\n $template = $this->insertAttributes($template, $tagName,$attributes);\n\n return $template;\n\n }else{\n /*\n Process tag in format <x-tag>\n */\n $template = $this->stripAttributes($template, $tagName);\n $template = $this->processOnce($template,$tagName);\n $template = $this->insertSlot($template);\n $template = $this->neutralizeTag($template,$tagName);\n $template = $this->insertAttributes($template, $tagName,$attributes);\n\n return $template;\n }\n\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "51a23b6ab8af20c77a378483de2a5d01", "score": "0.539649", "text": "public function testBasicTags()\n {\n $this->assertEquals('<strong>foo</strong>bar', $this->_markup->render('[b]foo[/b]bar'));\n $this->assertEquals(\n '<strong>foo<em>bar</em>foo</strong>ba[r',\n $this->_markup->render('[b=test file=\"test\"]foo[i hell=nice]bar[/i]foo[/b]ba[r')\n );\n }", "title": "" }, { "docid": "8e04a87e9b43313efeeb28fbc9cfab95", "score": "0.53961194", "text": "public function xml()\r\r\n {\r\r\n $errorMessage = null;\r\r\n $internalErrors = libxml_use_internal_errors(true);\r\r\n $disableEntities = libxml_disable_entity_loader(true);\r\r\n libxml_clear_errors();\r\r\n\r\r\n try {\r\r\n $xml = new \\SimpleXMLElement((string) $this->body ?: '<root />', LIBXML_NONET);\r\r\n if ($error = libxml_get_last_error()) {\r\r\n $errorMessage = $error->message;\r\r\n }\r\r\n } catch (\\Exception $e) {\r\r\n $errorMessage = $e->getMessage();\r\r\n }\r\r\n\r\r\n libxml_clear_errors();\r\r\n libxml_use_internal_errors($internalErrors);\r\r\n libxml_disable_entity_loader($disableEntities);\r\r\n\r\r\n if ($errorMessage) {\r\r\n throw new RuntimeException('Unable to parse response body into XML: ' . $errorMessage);\r\r\n }\r\r\n\r\r\n return $xml;\r\r\n }", "title": "" }, { "docid": "b741f40f33bec9eedaa01934391b4d7f", "score": "0.53932166", "text": "function rss_full_tag($tag,$level=0,$endline=true,$content,$to_utf=true) {\n //Here we encode absolute links\n $st = rss_start_tag($tag,$level,$endline);\n $co=\"\";\n if ($to_utf) {\n $co = preg_replace(\"/\\r\\n|\\r/\", \"\\n\", utf8_encode(htmlspecialchars($content)));\n } else {\n $co = preg_replace(\"/\\r\\n|\\r/\", \"\\n\", htmlspecialchars($content));\n }\n $et = rss_end_tag($tag,0,true);\n return $st.$co.$et;\n}", "title": "" }, { "docid": "141beef3eb9f8ec7cd1d621c56aca8c1", "score": "0.53723544", "text": "function to_xml($result)\n{\n $lmao = explode('<TargetType>Classes</TargetType>', $result);\n $lmao = explode('</BakalariDataInterface>', $lmao[1]);\n $result = \"<?xml version='1.0' encoding='UTF-8'?>\" . $lmao[0];\n return $result;\n}", "title": "" }, { "docid": "381dcf524ca1d949e22f703d5571fa79", "score": "0.53713757", "text": "public function getOpenTagWrapper(): string;", "title": "" }, { "docid": "1746f035066f0eccce4d76f3bfc5ff18", "score": "0.5368121", "text": "public function xml(){\n\t\t$this->contentType = 'xml';\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "53733ae405be38e841936d35dd9d4cf9", "score": "0.5354916", "text": "public function XML ($source, $encoding = null, $options = 0) {}", "title": "" }, { "docid": "0c3188490ffa5760220931ef0f8cc18e", "score": "0.532311", "text": "private function getWrapTextXMLContent()\n {\n return ' fo:wrap-option=\"wrap\" style:vertical-align=\"automatic\" ';\n }", "title": "" }, { "docid": "93ba04ce61bcde423b7a443f03038728", "score": "0.5310113", "text": "function xhtmlise_html($html, $definitely_want = false, $snippet = false)\n{\n // Tests...\n // echo xhtmlise_html('test<a></a><br /><po></p><p></po>'); // expect: test<a></a><br /><po><p></p></po>\n\n if (!$definitely_want) {\n return $html; // One day, this will get removed and we'll ensure all our output is always XHTML. But so far there's no point as IE doesn't support true XHTML\n }\n\n $is_escaped = (($GLOBALS['XSS_DETECT']) && (ocp_is_escaped($html)));\n\n $html = preg_replace('#<\\!--.*($|-->)#Us', '', $html); // Strip comments\n\n require_code('obfuscate');\n require_code('webstandards');\n\n global $XML_CONSTRAIN, $LAST_TAG_ATTRIBUTES, $POS, $OUT, $TAG_STACK, $INBETWEEN_TEXT, $LEN, $WELL_FORMED_ONLY, $MUST_SELFCLOSE_TAGS, $LINENO, $LINESTART;\n $POS = 0;\n $OUT = $html;\n $LEN = strlen($html);\n $TAG_STACK = array();\n $WELL_FORMED_ONLY = true;\n $LINENO = 0;\n $LINESTART = 0;\n $XML_CONSTRAIN = true;\n\n $new = '';\n\n $token = _get_next_tag();\n\n // If we actually have a partial tag right at the start (ie. we're breaking into some HTML at a bad point)\n $ang_pos = strpos($INBETWEEN_TEXT, '>');\n if ($ang_pos !== false) {\n $INBETWEEN_TEXT = substr($INBETWEEN_TEXT, $ang_pos + 1);\n }\n\n $new .= fix_entities($INBETWEEN_TEXT);\n while ($token !== null) {\n while (is_array($token)) { // Some kind of error in our token\n if ($token[0] !== null) {\n $token = $token[0]; // We can at least discern something\n } else {\n $token = _get_next_tag(); // No, we need to just move on\n }\n }\n\n if ($token === null) {\n break;\n }\n\n $basis_token = _get_tag_basis($token);\n\n if ($basis_token != '') {\n // Open, close, or monitonic?\n $term = strpos($token, '/');\n\n if ($term !== 1) {\n if (($term === false) && (!isset($MUST_SELFCLOSE_TAGS[$basis_token]))) { // Opening a tag\n // Fix nesting\n if (!$snippet) {\n if (($basis_token == 'li') && (!in_array('ul', $TAG_STACK)) && (!in_array('ol', $TAG_STACK)) && (!in_array('dl', $TAG_STACK)) && (!in_array('dd', $TAG_STACK)) && (!in_array('dt', $TAG_STACK)) && (!in_array('dir', $TAG_STACK)) && (!in_array('menu', $TAG_STACK))) {\n array_push($TAG_STACK, 'ul');\n $new .= '<ul>';\n }\n if ((($basis_token == 'tr') || ($basis_token == 'colgroup') || ($basis_token == 'col') || ($basis_token == 'tbody') || ($basis_token == 'tfoot') || ($basis_token == 'thead') || ($basis_token == 'caption')) && (!in_array('table', $TAG_STACK))) {\n array_push($TAG_STACK, 'table');\n $new .= '<table>';\n }\n if ((($basis_token == 'td') || ($basis_token == 'th')) && (!in_array('table', $TAG_STACK))) {\n array_push($TAG_STACK, 'table');\n $new .= '<table>';\n array_push($TAG_STACK, 'tr');\n $new .= '<tr>';\n }\n if (($basis_token == 'param') && (!in_array('object', $TAG_STACK))) {\n array_push($TAG_STACK, 'object');\n $new .= '<object>';\n }\n if (($basis_token == 'option') && (!in_array('select', $TAG_STACK))) {\n array_push($TAG_STACK, 'select');\n $new .= '<select>';\n }\n if (($basis_token == 'noembed') && (!in_array('map', $TAG_STACK))) {\n array_push($TAG_STACK, 'map');\n $new .= '<map>';\n }\n }\n\n array_push($TAG_STACK, $basis_token);\n $new .= '<' . $basis_token;\n foreach ($LAST_TAG_ATTRIBUTES as $key => $val) {\n if (strpos($val, '&') !== false) {\n $val = fix_entities($val);\n }\n $new .= ' ' . $key . '=\"' . $val . '\"';\n }\n $new .= '>';\n } else { // Self-closing tag\n $new .= '<' . $basis_token;\n foreach ($LAST_TAG_ATTRIBUTES as $key => $val) {\n if (strpos($val, '&') !== false) {\n $val = fix_entities($val);\n }\n $new .= ' ' . $key . '=\"' . $val . '\"';\n }\n $new .= ' />';\n }\n } else { // Closing a tag\n // For case 3\n if (!in_array($basis_token, $TAG_STACK)) {\n // Do nothing, we can't handle it because we're closing something that was never opened\n } else {\n $previous = '';\n do {\n $previous = array_pop($TAG_STACK);\n if ($basis_token != $previous) {\n $new .= '</' . $previous . '>'; // We'll have to assume it should be implicitly closed\n }\n } while ($basis_token != $previous);\n $new .= '</' . $basis_token . '>'; // Ok so we finally got an opener match and managed to put out our closer\n }\n }\n }\n\n if ((in_array('style', $TAG_STACK)) || (in_array('script', $TAG_STACK))) { // Fix that script/style tags MUST be quoted explicitly as CDATA to be both XML and HTML compatible. HTML assumes CDATA, XML assumes not-CDATA unless specified\n $treat_as_cdata = in_array('style', $TAG_STACK) ? 'style' : 'script';\n $temp = '';\n while (true) {\n $token = _get_next_tag();\n $temp .= $INBETWEEN_TEXT;\n if (is_null($token)) {\n break;\n }\n if ($token[0] != '</' . $treat_as_cdata . '>') {\n if (!is_null($token[0])) {\n $temp .= $token[0];\n }\n } else {\n break;\n }\n }\n if ($temp != '') {\n if (strpos($temp, '<![CDATA[') === false) {\n $new .= '// <![CDATA[' . \"\\n\";\n }\n $temp = str_replace('</', '<\\/', $temp);\n if (strpos($temp, '<![CDATA[') === false) {\n $temp = str_replace(']]>', ']]\\'+\\'>', $temp);\n }\n $new .= $temp;\n if (strpos($temp, '<![CDATA[') === false) {\n $new .= '//]]>';\n }\n }\n } else {\n $token = _get_next_tag();\n if ($token === null) {\n // If we actually have a partial tag right at the end (ie. we're breaking out of some HTML at a bad point)\n $ang_pos = strpos($INBETWEEN_TEXT, '<');\n if ($ang_pos !== false) {\n $INBETWEEN_TEXT = substr($INBETWEEN_TEXT, 0, $ang_pos);\n }\n }\n $new .= fix_entities($INBETWEEN_TEXT);\n }\n }\n\n // Check we have everything closed\n while (isset($TAG_STACK[0])) {\n $previous = array_pop($TAG_STACK);\n $new .= '</' . $previous . '>';\n }\n\n // Remove some empty tags that shouldn't be empty (e.g. table)\n $may_not_be_empty = array(\n /*'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'blockquote', 'pre',*/\n 'br', 'hr',/*'fieldset', 'address', 'noscript',*/\n 'table', 'tbody',\n 'tfoot', 'thead', 'tr', 'dd', 'dt', 'dl', 'li', 'ol', 'ul', 'rbc', 'rtc', 'rb', 'rt', 'rp',/*'span',*/\n 'abbr',\n 'acronym', 'cite',/* 'code',*/\n 'dfn',/* 'em', 'strong', 'kbd', 'q', 'samp', 'var', 'sub', 'sup', 'tt', 'del',*/\n 'ruby', 'bdo',\n 'img',/*'ins',*/\n 'param', 'input', 'select', 'object', 'caption', 'label',/* 'b', 'i', 'small', 'big',*/\n 'base', 'body', 'col', 'colgroup', 'map',\n 'optgroup', 'legend', 'area', 'form',\n );\n foreach ($may_not_be_empty as $t) {\n if (stripos($new, '<' . $t) !== false) {\n $new = preg_replace('#<' . $t . '(\\s[^>]*)?' . '>\\s*</' . $t . '>#', '', $new);\n }\n }\n\n unset($OUT);\n unset($TAG_STACK);\n\n if ($is_escaped) {\n ocp_mark_as_escaped($new);\n }\n\n return $new;\n}", "title": "" }, { "docid": "8183d7cbaf3233dc54f07f7977f4bedd", "score": "0.5299816", "text": "public function serialize($data) {\n header('Content-type: text/xml');\n\n $res = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n $res.= '<tags>'.\"\\n\";\n\n if (!is_array($data)) {\n $data = array($data);\n }\n\n foreach ($data as $tag) {\n if (is_string($tag)) {\n $res.= \"<tag>$tag</tag>\\n\";\n }\n }\n $res.= '</tags>';\n return $res;\n }", "title": "" }, { "docid": "873b8116a2044411dc6f717bc17233a0", "score": "0.5290574", "text": "function filter_tag($opening, $name, $attr, $closing) {\n\n\t$allow_tags = array('se-attachment','seattachment','se:attachment','attachment','a','blockquote','h1','h2','h3','h4','h5',\n\t\t\t\t\t\t'p','br','b','strong','em','i','a','ul','li','ol');\n\tif(!in_array($name, $allow_tags)) {\n\t\treturn '';\n\t}\n\n\t$filtered_attr = '';\n\n\tif (strcmp($name,'attachment') == 0) {\n\t\t$filtered_attr = $attr;\n\t} else if (strcmp($name,'se-attachment') == 0 || strcmp($name,'seattachment') == 0) {\n\t\t$filtered_attr = $attr;\n\t} else if (strcmp($name,'img') == 0) {\n\t\t$filtered_attr = get_sanitized_attr('src',$attr);\n\t} else if (strcmp($name,'a') == 0) {\n\t\t$filtered_attr = get_sanitized_attr('href',$attr);\n\t} else if (strcmp($name,'p') == 0) {\n\t\t$filtered_attr = get_sanitized_attr('class',$attr);\n\t} else if (strcmp($name,'twitterdiv') == 0) {\n\t\t$filtered_attr = get_sanitized_attr('class',$attr);\n\t}\n\n\t$tag = '<'.$opening.$name.$filtered_attr.$closing.'>';\n\t$tag = str_replace(\"\\\\\\\"\", \"\\\"\", $tag);\n\treturn $tag;\n}", "title": "" }, { "docid": "8293a2188ba1d51c9cab2ab56ef2c9e1", "score": "0.5289723", "text": "function tagins($stuffing) {\n return \"<\".$stuffing.\">\";\n }", "title": "" }, { "docid": "5a3c5df82ac4704346ca438038076532", "score": "0.52867913", "text": "abstract protected function renderTag(): string;", "title": "" }, { "docid": "4861f1cd7d8fcd93be1b1ff76dd36b5c", "score": "0.5285926", "text": "protected function xmlStart()\r\n {\r\n return \"<?xml version=\\\"1.0\\\" encoding=\\\"$this->encoding\\\" ?>\";\r\n }", "title": "" }, { "docid": "3d39ae8008600f00421265d831698b0c", "score": "0.52792585", "text": "function uolXMLifyContent($content)\n{\n $feed_only=get_option('uolxmlify_feeds');\n\t// only affects feeds\n\tif ( ! is_feed() && $feed_only ) return $content;\n\t\n\t$ads_at_bottom = get_option('uolxmlify_at_bottom');\n\n\t$new_content=\"\";\n\tif ($ads_at_bottom) {\n\t\t$new_content=$content;\n\t}\n $xml_url=build_xml_url();\n $style=get_option('uolxmlify_style');\n $numads=get_option('uolxmlify_numads');\n\n\t// loads xml\n\tglobal $uolxmlify_offers;\n\tif ($uolxmlify_offers == null) {\n\t\t$xml = @simplexml_load_file($xml_url);\n\t\t// DEBUG\n\t\t//echo '<pre>'.htmlentities($xml->asXML()).'</pre>';\n\t\tif ($xml) {\n\t\t\t$uolxmlify_offers = $xml->xpath('//prd');\n\t\t} else {\n\t\t\treturn $content;\n\t\t}\n\t}\n\tshuffle($uolxmlify_offers);\n\n $new_content .= \"\\n<br clear=\\\"all\\\" />\\n\";\n\t$new_content .= \"<div style=\\\"width:100%; text-align: center;\\\">\\n\";\n $new_content .= \"<div style=\\\"$style; overflow: hidden;\\\">\\n\";\n\t$table_style = 'width:100%; height:100%; border: none; padding: 0; margin: 0;';\n\t$new_content .= \"<table style=\\\"$table_style\\\">\\n\";\n\t$new_content .= \"<tr style=\\\"vertical-align: middle; text-align: left;\\\">\\n\";\n\t$width = 100/$numads;\n\tfor ($i = 0; $i < $numads; $i++) {\n\t\t$offer = $uolxmlify_offers[$i];\n\t\t$img = $offer->img->src[url];\n\t\t$url = $offer->lnk[url];\n\t\t$name = (string) $offer->n;\n\t\t// cuts name in 50 chars, so it fits:\n\t\tif (strlen($name) > 50) {\n\t\t\t$name = substr($name, 0, 50).\"...\";\n\t\t}\n\t\t$new_content .= \"<td style=\\\"width: $width%;\\\">\\n\";\n\t\t$new_content .= \"<table><tr><td style=\\\"width: 45px;\\\">\\n\";\n\t\t$new_content .= \"<a target=\\\"_blank\\\" href=\\\"$url\\\">\\n\";\n\t\t$new_content .= \"<img height=\\\"40px\\\" src=\\\"$img\\\">\";\n\t\t$new_content .= \"</a>\\n\";\n\t\t$new_content .= \"</td><td>\\n\";\n\t\t$new_content .= \"<a target=\\\"_blank\\\" href=\\\"$url\\\">\\n\";\n\t\t$new_content .= $name;\n\t\t$new_content .= \"</a>\\n\";\n\t\t$new_content .= \"</td></tr></table>\\n\";\n\t\t$new_content .= \"</td>\\n\";\n\t}\n\t$new_content .= \"</tr>\\n\";\n\t$new_content .= \"</table>\\n\";\n $new_content .= \"</div>\\n\";\n $new_content .= \"</div>\\n\";\n $new_content .= \"\\n<br clear=\\\"all\\\" />\\n\";\n\t\n\tif (!$ads_at_bottom) {\n\t\t$new_content.=$content;\n\t}\n\t\n\treturn $new_content;\n}", "title": "" }, { "docid": "1963396a4af7b2fbacc3bcf40e59abce", "score": "0.52748245", "text": "function tag($type,$content,$args=Array()) {\n\t$out=\"<\".$type;\n\tforeach($args as $param =>$value) {$out.=\" \".$param.'=\"'.$value.'\"';}\n\t$out.=\">\".$content.\"</\".$type.\">\";\n\treturn $out;\n}", "title": "" }, { "docid": "297a3dfd94bd1e1cfb6031a97cab7f27", "score": "0.5272112", "text": "private function fix_string_for_xml($string) {\n if (is_string($string)) {\n return preg_replace_callback('#&[^\\;]+;#', array($this, 'fix_xml_tags_callback'), $string);\n }\n return $string;\n }", "title": "" }, { "docid": "66842b5a90b09807560da4fd942bd3b1", "score": "0.5272101", "text": "public function testWrapsXmlNodesInGivenCharset() {\n $document = new DOMDocument();\n $document->loadXML($this->wrapper->wrap(\n Validator::PARSER_XML,\n '<item>Moo</item>',\n 'iso-8859-1'\n ));\n\n $this->assertEquals('ISO-8859-1', $document->encoding);\n }", "title": "" }, { "docid": "f793d8ac412f6f28cc35d861c803bd34", "score": "0.5271341", "text": "function parseXulTag() \n {\n \n // does it contain any flexy tags??\n if ($this->elementUsesDynamic($this->element)) {\n return false;\n } \n \n return $this->compiler->appendPhp(\n $this->getElementPhp( $this->element->getAttribute('ID')));\n }", "title": "" }, { "docid": "8b1c348a7c033edd66f20b438b589e8f", "score": "0.52670515", "text": "public function asXML()\r\n{\r\n return $this->_sxe->asXML();\r\n}", "title": "" }, { "docid": "9f62a2f9948ab29a2c58bf2832d4eada", "score": "0.5260306", "text": "public function testWrapsSingleXmlNodeCorrectly() {\n $wrapped = $this->wrapper->wrap(\n Validator::PARSER_XML,\n '<item>Moo</item>'\n );\n\n $document = new DOMDocument();\n $document->loadXML($wrapped);\n\n // \"<root>\"-tag should automatically inserted\n $this->assertEquals('root', $document->firstChild->nodeName);\n\n // It shouldn't insert more than the node we gave it\n $this->assertEquals(1, $document->firstChild->childNodes->length);\n\n // The \"<item>\" node should exist and have the correct value\n $this->assertEquals('item', $document->firstChild->firstChild->nodeName);\n $this->assertEquals('Moo', $document->firstChild->firstChild->nodeValue);\n }", "title": "" }, { "docid": "ac094fba3d78a827b8951c27832081d8", "score": "0.5259444", "text": "function xml_pp($xml, $html_output=false) {\n set_error_handler('handle_xml_error');\n\n // check for xdebug-error output\n if (strpos($xml, 'xdebug-error') !== false) {\n $pos = strpos($xml, '<br />') + 6;\n $xml = substr($xml, $pos);\n }\n\n // for html, fix hr/br\n $xml = str_replace(array('<hr>', '<br>'), array('<hr />', '<br />'), $xml);\n\n $xml_obj = new SimpleXMLElement($xml);\n\n $level = 2;\n $indent = 0;\n $pretty = array();\n\n // get an array containing each XML element\n $xml = trim($xml_obj->asXML());\n $xml = preg_replace(\"/>\\s*</U\", \">\\n<\", $xml);\n $xml = explode(\"\\n\", $xml);\n\n // shift off opening XML tag if present\n if (count($xml) && preg_match('/^<\\?\\s*xml/', $xml[0])) {\n $pretty[] = array_shift($xml);\n }\n\n foreach ($xml as $el) {\n if (preg_match('/^<(\\w+).*\\>$/', $el)) {\n // opening tag, increase indent\n $pretty[] = str_repeat(' ', $indent) . $el;\n if (!preg_match(\"/.*\\/>$/\", $el) && !preg_match('/<\\/.+>/', $el)) $indent += $level;\n } else {\n if (preg_match('/<\\/.+>$/', $el)) {\n $indent -= $level; // closing tag, decrease indent\n }\n if ($indent < 0) {\n $indent += $level;\n }\n $pretty[] = str_repeat(' ', $indent) . $el;\n }\n }\n // omit first xml line\n array_shift($pretty);\n $xml = implode(\"\\n\", $pretty);\n return ($html_output) ? htmlentities($xml) : $xml;\n}", "title": "" }, { "docid": "5af3e17e63726a5fd41b26c4fd7840b5", "score": "0.525583", "text": "public function test_response_charset_in_xml() {\n\n\t\t// Generate an ajax response\n\t\tob_start();\n\t\t$ajax_response = new WP_Ajax_Response();\n\t\t$ajax_response->send();\n\n\t\t// Check the XML tag\n\t\t$contents = ob_get_clean();\n\t\t$this->assertMatchesRegularExpression( '/<\\?xml\\s+version=\\'1.0\\'\\s+encoding=\\'' . preg_quote( get_option( 'blog_charset' ) ) . '\\'\\s+standalone=\\'yes\\'\\?>/', $contents );\n\t}", "title": "" }, { "docid": "39acf0fa4f77b9d07ae8391e8e799266", "score": "0.5232775", "text": "public function render()\n {\n\t \t header('Content-Type: application/xml');\n\t \t try \n\t\t{\n\t\t\t$xml = new ArrayToXML(self::$root_tag, self::$node_name);\n\t\t\t$xml->createNode( $this->data );\n\t\t\treturn $xml;\n } \n catch (Exception $e)\n {\n\t\t \techo $e->getMessage();\n\t\t}\n }", "title": "" }, { "docid": "d3c655575308b415f4bd033cdea70efb", "score": "0.5232342", "text": "function _xml($data, $name = \"w3s.request\") {\n\t\treturn $this->__xml(array($name => $data));\n\t}", "title": "" }, { "docid": "ee230f295fe871c0a32a203379500dda", "score": "0.52261627", "text": "function &renderXHTMLTag( &$tpl, &$tag, $currentSectionLevel, &$isBlockTag, $tdSectionLevel = null )\r\n {\r\n $tagText = \"\";\r\n $childTagText = \"\";\r\n $tagName = $tag->name();\r\n // render children tags\r\n $tagChildren = $tag->children();\r\n foreach ( $tagChildren as $childTag )\r\n {\r\n if ( $tag->name() == \"literal\" )\r\n $childTagText .= trim( $childTag->content() );\r\n else\r\n $childTagText .= $this->renderXHTMLTag( $tpl, $childTag, $currentSectionLevel, $isBlockTag, $tdSectionLevel );\r\n }\r\n\r\n\r\n switch ( $tagName )\r\n {\r\n case '#text' :\r\n {\r\n $tagText .= htmlspecialchars( $tag->content() );\r\n // Get rid of linebreak and spaces stored in xml file\r\n $tagText = preg_replace( \"#[\\n]+#\", \"\", $tagText );\r\n $tagText = preg_replace( \"# #\", \"\", $tagText );\r\n }break;\r\n\r\n case 'object' :\r\n {\r\n $tagText = $this->renderObjectTag($tpl, $tag, $isBlockTag );\r\n }break;\r\n\r\n case 'table' :\r\n {\r\n $tableRows = \"\";\r\n $border = $tag->attributeValue( 'border' );\r\n if ( $border === null )\r\n $border = 1;\r\n\r\n $width = $tag->attributeValue( 'width' );\r\n if ( $width === null )\r\n $width = \"100%\";\r\n\r\n $rowCount = 0;\r\n // find all table rows\r\n foreach ( $tag->children() as $tableRow )\r\n {\r\n $tableData = \"\";\r\n foreach ( $tableRow->children() as $tableCell )\r\n {\r\n $cellContent = \"\";\r\n $tdSctionLevel = $currentSectionLevel;\r\n $cellContent .= $this->renderXHTMLSection( $tpl, $tableCell, $currentSectionLevel, $tdSctionLevel );\r\n\r\n $tpl->setVariable( 'content', $cellContent, 'xmltagns' );\r\n $cellWidth = $tableCell->attributeValueNS( 'width', \"http://ez.no/namespaces/ezpublish3/xhtml/\" );\r\n $colspan = $tableCell->attributeValueNS( 'colspan', \"http://ez.no/namespaces/ezpublish3/xhtml/\" );\r\n $rowspan = $tableCell->attributeValueNS( 'rowspan', \"http://ez.no/namespaces/ezpublish3/xhtml/\" );\r\n\r\n $class = $tableCell->attributeValue( 'class' );\r\n\r\n $res =& eZTemplateDesignResource::instance();\r\n $res->setKeys( array( array( 'classification', $class ) ) );\r\n\r\n if ( $tableCell->Name == \"th\" )\r\n $uri = \"design:xmlarea/ezxmltags/th.tpl\";\r\n else\r\n $uri = \"design:xmlarea/ezxmltags/td.tpl\";\r\n $textElements = array();\r\n $tpl->setVariable( 'classification', $class, 'xmltagns' );\r\n $tpl->setVariable( 'colspan', $colspan, 'xmltagns' );\r\n $tpl->setVariable( 'rowspan', $rowspan, 'xmltagns' );\r\n $tpl->setVariable( 'width', $cellWidth, 'xmltagns' );\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, \"foo\", \"xmltagns\" );\r\n $tableData .= implode( '', $textElements );\r\n\r\n // Remove the design key, so it will not override other tags\r\n $res->removeKey( 'classification' );\r\n }\r\n $tpl->setVariable( 'content', $tableData, 'xmltagns' );\r\n $tpl->setVariable( 'row_count', $rowCount, 'xmltagns' );\r\n $uri = \"design:xmlarea/ezxmltags/tr.tpl\";\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, \"foo\", \"xmltagns\" );\r\n $tableRows .= implode( '', $textElements );\r\n $rowCount++;\r\n }\r\n $class = $tag->attributeValue( 'class' );\r\n\r\n $res =& eZTemplateDesignResource::instance();\r\n $res->setKeys( array( array( 'classification', $class ) ) );\r\n\r\n $tpl->setVariable( 'classification', $class, 'xmltagns' );\r\n $tpl->setVariable( 'rows', $tableRows, 'xmltagns' );\r\n $tpl->setVariable( 'border', $border, 'xmltagns' );\r\n $tpl->setVariable( 'width', $width, 'xmltagns' );\r\n $uri = \"design:xmlarea/ezxmltags/table.tpl\";\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, \"foo\", \"xmltagns\" );\r\n $tagText .= implode( '', $textElements );\r\n $isBlockTag = true;\r\n\r\n // Remove the design key, so it will not override other tags\r\n $res->removeKey( 'classification' );\r\n }break;\r\n\r\n case 'ul' :\r\n case 'ol' :\r\n {\r\n $class = $tag->attributeValue( 'class' );\r\n\r\n $res =& eZTemplateDesignResource::instance();\r\n $res->setKeys( array( array( 'classification', $class ) ) );\r\n\r\n $isBlockTag = true;\r\n\r\n $listContent = \"\";\r\n // find all list elements\r\n foreach ( $tag->children() as $listItemNode )\r\n {\r\n $listItemContent = \"\";\r\n\r\n $listSctionLevel = $currentSectionLevel;\r\n $j=0;\r\n foreach ( $listItemNode->children() as $itemChildNode )\r\n {\r\n $listSectionLevel = $currentSectionLevel;\r\n if ( $itemChildNode->name() == \"section\" or $itemChildNode->name() == \"paragraph\" )\r\n {\r\n if ( $j == 0 || count($itemChildNode->children()) == 1 )\r\n {\r\n $itemChildNode->setName('normal');\r\n $listItemContent .= $this->renderXHTMLTag( $tpl, $itemChildNode, 0, $isBlockTag );\r\n }\r\n else\r\n {\r\n $listItemContent .= $this->renderList( $tpl, $itemChildNode, $currentSectionLevel, $listSectionLevel );\r\n }\r\n }\r\n else\r\n {\r\n $listItemContent .= $this->renderXHTMLTag( $tpl, $itemChildNode, 0, $isBlockTag );\r\n }\r\n $j++;\r\n }\r\n\r\n $liClass = $listItemNode->attributeValue( 'class' );\r\n $tpl->setVariable( 'classification', $liClass, 'xmltagns' );\r\n $tpl->setVariable( 'content', $listItemContent, 'xmltagns' );\r\n $uri = \"design:xmlarea/ezxmltags/li.tpl\";\r\n\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n $listContent .= implode( '', $textElements );\r\n }\r\n\r\n $className = $tag->attributeValue( 'class' );\r\n $tpl->setVariable( 'classification', $class, 'xmltagns' );\r\n $tpl->setVariable( 'content', $listContent, 'xmltagns' );\r\n $uri = \"design:xmlarea/ezxmltags/$tagName.tpl\";\r\n\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n $tagText .= implode( '', $textElements );\r\n // Remove the design key, so it will not override other tags\r\n $res->removeKey( 'classification' );\r\n $tpl->unsetVariable( 'classification', 'xmltagns' );\r\n }break;\r\n\r\n // Literal text which allows xml specific caracters < >\r\n case 'literal' :\r\n {\r\n $isBlockTag = true;\r\n\r\n $class = $tag->attributeValue( 'class' );\r\n\r\n $res =& eZTemplateDesignResource::instance();\r\n $res->setKeys( array( array( 'classification', $class ) ) );\r\n\r\n $uri = \"design:xmlarea/ezxmltags/$tagName.tpl\";\r\n\r\n $tpl->setVariable( 'classification', $class, 'xmltagns' );\r\n $tpl->setVariable( 'content', $childTagText, 'xmltagns' );\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n $tagText .= implode( '', $textElements );\r\n // Remove the design key, so it will not override other tags\r\n $res->removeKey( 'classification' );\r\n $tpl->unsetVariable( 'classification', 'xmltagns' );\r\n }break;\r\n\r\n // normal content tags\r\n case 'normal' :\r\n case 'emphasize' :\r\n case 'strong' :\r\n case 'line' :\r\n {\r\n $class = $tag->attributeValue( 'class' );\r\n\r\n $res =& eZTemplateDesignResource::instance();\r\n $res->setKeys( array( array( 'classification', $class ) ) );\r\n\r\n $tpl->setVariable( 'classification', $class, 'xmltagns' );\r\n\r\n $tpl->setVariable( 'content', $childTagText, 'xmltagns' );\r\n $uri = \"design:xmlarea/ezxmltags/$tagName.tpl\";\r\n\r\n $textElements = array();\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n $tagText .= implode( '', $textElements );\r\n $tagText = trim( $tagText );\r\n\r\n // Remove the design key, so it will not override other tags\r\n $res->removeKey( 'classification' );\r\n }break;\r\n\r\n // custom tags which could added for special custom needs.\r\n case 'custom' :\r\n {\r\n $tagText = $this->renderCustomTag($tpl, $tag, $currentSectionLevel, $tdSectionLevel, $childTagText );\r\n }break;\r\n case 'link' :\r\n {\r\n $class = $tag->attributeValue( 'class' );\r\n\r\n $res =& eZTemplateDesignResource::instance();\r\n $res->setKeys( array( array( 'classification', $class ) ) );\r\n\r\n include_once( 'lib/ezutils/classes/ezmail.php' );\r\n $linkID = $tag->attributeValue( 'id' );\r\n $target = $tag->attributeValue( 'target' );\r\n if ( $target == '_self' )\r\n $target = false;\r\n if ( $linkID != null )\r\n {\r\n $href = $this->LinkArray[$linkID];\r\n }\r\n else\r\n $href = $tag->attributeValue( 'href' );\r\n $tpl->setVariable( 'content', $childTagText, 'xmltagns' );\r\n\r\n if ( eZMail::validate( $href ) )\r\n $href = \"mailto:\" . $href;\r\n\r\n $tpl->setVariable( 'href', $href, 'xmltagns' );\r\n $tpl->setVariable( 'target', $target, 'xmltagns' );\r\n $tpl->setVariable( 'classification', $class, 'xmltagns' );\r\n\r\n $uri = \"design:xmlarea/ezxmltags/$tagName.tpl\";\r\n\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n $tagText .= implode( '', $textElements );\r\n\r\n // Remove the design key, so it will not override other tags\r\n $res->removeKey( 'classification' );\r\n }break;\r\n\r\n case 'anchor' :\r\n {\r\n $name = $tag->attributeValue( 'name' );\r\n\r\n $tpl->setVariable( 'name', $name, 'xmltagns' );\r\n\r\n $uri = \"design:xmlarea/ezxmltags/$tagName.tpl\";\r\n\r\n eZTemplateIncludeFunction::handleInclude( $textElements, $uri, $tpl, 'foo', 'xmltagns' );\r\n $tagText .= implode( '', $textElements );\r\n }break;\r\n\r\n default :\r\n {\r\n // unsupported tag\r\n }break;\r\n }\r\n return $tagText;\r\n }", "title": "" }, { "docid": "cafb2e34d74ade52d148dc36d0ff5a69", "score": "0.52236533", "text": "function xml_element($xml, $value, $arguments)\n{\n if (is_object($value)) {\n xml_object($xml, $value, $arguments);\n } elseif (is_array($value)) {\n xml_array($xml, $value, $arguments);\n } elseif ((is_int($value) or is_float($value))) {\n xml_number($xml, $value, $arguments);\n } elseif (is_string($value)) {\n xml_string($xml, $value, $arguments);\n } elseif ((is_bool($value) or $value === null)) {\n xml_literal($xml, $value, $arguments);\n } elseif (!empty($arguments[\"c\"])) { // Handle -c\n $xml->text($value);\n } else {\n $xml->writeRaw($value);\n }\n}", "title": "" }, { "docid": "49f23e727ac38477673aacc9f7ec797b", "score": "0.52233696", "text": "public function testDontEscapeContentTag()\n {\n $this->assertEquals('<p><&</p>', $this->generator->contentTag('p', '<&'));\n }", "title": "" }, { "docid": "c33d6f2c2f3351a4e5849b0b837b22d9", "score": "0.52170885", "text": "function writeXMLFile ($content) {\n $filename = 'guestBook.xml';\n $content->asXML($filename);\n echo \"Wrote file: \" . $filename . \"<br>\";\n echo \"Thank You for your feedback <br>\";\n echo '<hr>';\n}", "title": "" }, { "docid": "fa34417b89d2dde4a8056ea6764e6235", "score": "0.5203321", "text": "function rss_end_tag($tag,$level=0,$endline=true) {\n if ($endline) {\n $endchar = \"\\n\";\n } else {\n $endchar = \"\";\n }\n return str_repeat(\" \",$level*2).\"</\".$tag.\">\".$endchar;\n}", "title": "" }, { "docid": "618cae5909aefc8de4b87b2426034da0", "score": "0.5201266", "text": "function tag($sTag, $aAttr = [], $sContent = null, $bTrustContent = false)\n{\n // 0. sanitise tag: can have any letter or numbers 1–6\n $sTag = preg_replace('/[^a-z1-6]/', '', $sTag);\n\n // 2. construct the tag\n $sReturn = \"<{$sTag}\";\n\n // 3. attributes\n foreach ($aAttr as $sName => $sValue) {\n // a. if it’s an empty, non-true value\n if (trim($sValue) === '') {\n continue;\n }\n\n // b. sanitise\n $sName = preg_replace('/[^a-z1-6\\-]/', '', str_replace('_', '-', $sName));\n\n // c. output\n if ($sValue === true) {\n $sReturn .= \" {$sName}\";\n } else {\n $sReturn .= \" {$sName}=\\\"\".esc_attr($sValue).'\"';\n }\n }\n\n // 3. finish opening element\n $sReturn .= '>';\n\n // 4. if there’s content\n if ($sContent !== null) {\n // make the content safe, if not trusted\n if (!$bTrustContent) {\n $sContent = esc_html($sContent);\n }\n\n $sReturn .= \"{$sContent}</{$sTag}>\";\n }\n\n return $sReturn;\n}", "title": "" }, { "docid": "e33ebc3662b6d983da0bf809d1d384f2", "score": "0.51968986", "text": "function parse_xml($input)\n {\n return preg_replace_callback('/<roundcube:([-_a-z]+)\\s+([^>]+)>/Ui', array($this, 'xml_command_callback'), $input);\n }", "title": "" }, { "docid": "a3ffa0899a6d2d3e2b9ba94f07d83c85", "score": "0.5186237", "text": "function yy_r12 ()\r\n {\r\n $this->compiler->tag_nocache = true;\r\n $this->is_xml = true;\r\n $this->_retvalue = new _smarty_text($this, \r\n $this->compiler->processNocacheCode(\"<?php echo '<?xml';?>\", \r\n $this->compiler, true));\r\n }", "title": "" }, { "docid": "24beb2bfc305f485eecf90266c7567c1", "score": "0.5181559", "text": "function getXMLText(){\n \n $XMLText = $this->getXMLHeader();\n $XMLText .= \"\\r\\n\";\n $XMLText .= $this->getXMLGroupHeader();\n $XMLText .= \"\\r\\n\";\n $XMLText .= $this->getXMLPaymentInformation();\n $XMLText .= \"\\r\\n\";\n $XMLText .= $this->getXMLFooter();\n \n // Only below characters can be used within the XML tags according the guideline. \n // 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\n // 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\n // 0 1 2 3 4 5 6 7 8 9\n // / - ? : ( ) . , ‘ +\n // Space\n //\n // Create a normalized array and cleanup the string $XMLText for unexpected characters in names\n $normalizeChars = array(\n 'Á'=>'A', 'À'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Å'=>'A', 'Ä'=>'A', 'Æ'=>'AE', 'Ç'=>'C',\n 'É'=>'E', 'È'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Í'=>'I', 'Ì'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ð'=>'Eth',\n 'Ñ'=>'N', 'Ó'=>'O', 'Ò'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O',\n 'Ú'=>'U', 'Ù'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y',\n \n 'á'=>'a', 'à'=>'a', 'â'=>'a', 'ã'=>'a', 'å'=>'a', 'ä'=>'a', 'æ'=>'ae', 'ç'=>'c',\n 'é'=>'e', 'è'=>'e', 'ê'=>'e', 'ë'=>'e', 'í'=>'i', 'ì'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'eth',\n 'ñ'=>'n', 'ó'=>'o', 'ò'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o',\n 'ú'=>'u', 'ù'=>'u', 'û'=>'u', 'ü'=>'u', 'ý'=>'y',\n \n 'ß'=>'sz', 'þ'=>'thorn', 'ÿ'=>'y',\n\n '&'=>'en', '@'=>'at', '#'=>'h', '$'=>'s', '%'=>'perc', '^'=>'-','*'=>'-'\n ); \n \n $XMLText = strtr($XMLText, $normalizeChars);\n \n return $XMLText;\n }", "title": "" }, { "docid": "1e157f4aec5f3fbc93e4f8bbd570621b", "score": "0.51802355", "text": "function get_xml_tag($tag, $xml)\n\t{\n\t\n\t\t// se l'elemento non esiste, restituisce una stringa vuota\n\t\tif (!preg_match(\"#<$tag>|<$tag [^>]+>.*</$tag>#i\", \"\", $xml)) {\n\t\t\treturn \"\";\n\t\t}\n\t\n\t\t\n\t\t// in buff vengono tolti i tag di apertura e chiusura\n\t\t$buff = preg_replace(\"#.*(<$tag>|<$tag [^>]+>)#\", \"\", $xml);\n\t\t$buff = preg_replace(\"#</\".$tag.\">.*#\", \"\", $buff);\n\t\t\n\t\t// restituisce la stringa\n\t\treturn $buff;\n\t}", "title": "" }, { "docid": "bba64180ac8beefc74c420a0c0217cdf", "score": "0.5175722", "text": "function parseToXML($htmlStr)\n\t\t\t {\n\t\t\t\t $xmlStr=str_replace('<','<',$htmlStr);\n\t\t\t\t $xmlStr=str_replace('>','>',$xmlStr);\n\t\t\t\t $xmlStr=str_replace('\"','\"',$xmlStr);\n\t\t\t\t $xmlStr=str_replace(\"'\",\"'\",$xmlStr);\n\t\t\t\t $xmlStr=str_replace(\"&\",'&',$xmlStr);\n\t\t\t\t return $xmlStr;\n\t\t\t }", "title": "" }, { "docid": "a43680ab8d160a61bf8f2a684fcbda68", "score": "0.51699966", "text": "function ru_x_open(& $parser, & $attrs, $tagname ) {/*{{{*/\n $this->push_container_def($tagname, $attrs);\n return TRUE;\n }", "title": "" }, { "docid": "914773c64a7cf08d3e36440669dab210", "score": "0.5153086", "text": "function feed_starting_tags($feed_type) {\n $tags = \"\";\n switch ($feed_type) {\n case 'xml':\n $tags = \"<root>\";\n break;\n }\n return $tags;\n}", "title": "" }, { "docid": "c500541ad0c209947b5d34b8752ea3d4", "score": "0.5146346", "text": "function XmlEncode($val)\n{\n return htmlspecialchars(strval($val));\n}", "title": "" }, { "docid": "9bf8f325bde9c80c28b1555d0a7e6463", "score": "0.5142208", "text": "function saveXML($tagName) {\n if (!empty($this->href)) {\n $result = '<'.$tagName.' href=\"'.htmlspecialchars($this->href).'\"';\n if (!empty($this->rel)) {\n $result .= ' rel=\"'.htmlspecialchars($this->rel).'\"';\n }\n if (!empty($this->type)) {\n $result .= ' type=\"'.htmlspecialchars($this->type).'\"';\n }\n if (!empty($this->hreflang)) {\n $result .= ' hreflang=\"'.htmlspecialchars($this->hreflang).'\"';\n }\n if (!empty($this->title)) {\n $result .= ' title=\"'.htmlspecialchars($this->title).'\"';\n }\n if (!empty($this->length) && $this->length > 0) {\n $result .= ' length=\"'.(int)$this->length.'\"';\n }\n $result .= '/>'.\"\\n\";\n return $result;\n }\n return '';\n }", "title": "" }, { "docid": "6914edbc7ef5e438d870b8ac117d3bdc", "score": "0.51416165", "text": "function _parseTags() \n {\n global $_HTML_TEMPLATE_FLEXY_TOKEN;\n // doesnt really need strtolower etc. as php functions are not case sensitive!\n \n \n /* always render script correctly */\n if (0 == strcasecmp($this->element->tag,\"script\")) {\n return $this->parseTagScript();\n }\n \n if ($this->element->getAttribute('FLEXY:DYNAMIC')) {\n return $this->compiler->appendPhp(\n $this->getElementPhp( $this->element->getAttribute('ID') )\n );\n \n }\n \n if ($this->element->getAttribute('FLEXY:IGNOREONLY') !== false) {\n return false;\n }\n if ($_HTML_TEMPLATE_FLEXY_TOKEN['flexyIgnore']) {\n return false;\n }\n $tag = $this->element->tag;\n if (strpos($tag,':') !== false) {\n $bits = explode(':',$tag);\n $tag = $bits[1];\n }\n \n if (in_array(strtolower($tag), array('menulist','textbox','checkbox'))) {\n $method = 'parseXulTag';\n } else {\n $method = 'parseTag'.$tag;\n if (!method_exists($this,$method)) {\n return false;\n }\n }\n \n if (($this->element->getAttribute('NAME') === false) &&\n ($this->element->getAttribute('ID') === false) ) {\n return false;\n }\n // do any of the attributes use flexy data...\n //foreach ($this->element->attributes as $k=>$v) {\n // if (is_array($v)) {\n // return false;\n // }\n //}\n \n //echo \"call $method\" . serialize($this->element->attributes). \"\\n\";\n \n return $this->$method();\n // allow the parse methods to return output.\n \n }", "title": "" }, { "docid": "7173c93ec93db1a4d723ce641fc34f63", "score": "0.51239645", "text": "public function providerXmlRender()\n {\n return [\n // Each array consists of data to render, expected XML and assert message\n [\n ['value1', 'value2'],\n '<?xml version=\"1.0\"?><response><item>value1</item><item>value2</item></response>',\n 'Invalid XML render of unassociated array data.'\n ],\n [\n ['key1' => 'value1', 'key2' => 'value2'],\n '<?xml version=\"1.0\"?><response><key1>value1</key1><key2>value2</key2></response>',\n 'Invalid XML render of associated array data.'\n ],\n [\n (object)['key' => 'value'],\n '<?xml version=\"1.0\"?><response><key>value</key></response>',\n 'Invalid XML render of object data.'\n ],\n [\n ['7key' => 'value'],\n '<?xml version=\"1.0\"?><response><item_7key>value</item_7key></response>',\n 'Invalid XML render with numeric symbol in data index.'\n ],\n [\n ['key' => 'test & foo'],\n '<?xml version=\"1.0\"?><response><key>test &amp; foo</key></response>',\n 'Invalid XML render with ampersand symbol in data index.'\n ],\n [\n ['.key' => 'value'],\n '<?xml version=\"1.0\"?><response><item_key>value</item_key></response>',\n 'Invalid XML render with \".\" symbol in data index.'\n ],\n [\n ['-key' => 'value'],\n '<?xml version=\"1.0\"?><response><item_-key>value</item_-key></response>',\n 'Invalid XML render with \"-\" symbol in data index.'\n ],\n [\n [' prefix key:' => 'value'],\n '<?xml version=\"1.0\"?><response><prefix_key>value</prefix_key></response>',\n 'Invalid XML render with data key trimming.'\n ],\n [\n 'data',\n '<?xml version=\"1.0\"?><response>data</response>',\n 'Invalid XML render with simple data.'\n ],\n [\n new \\Magento\\Framework\\DataObject(['key' => 'value']),\n '<?xml version=\"1.0\"?><response><key>value</key></response>',\n 'Invalid XML render with \\Magento\\Framework\\DataObject data.'\n ]\n ];\n }", "title": "" }, { "docid": "35225573267333eef66d669bc37a182a", "score": "0.5109292", "text": "function parseToXML($htmlStr){\n $xmlStr=str_replace('<','&lt;',$htmlStr);\n $xmlStr=str_replace('>','&gt;',$xmlStr);\n $xmlStr=str_replace('\"','&quot;',$xmlStr);\n $xmlStr=str_replace(\"'\",'&apos;',$xmlStr);\n $xmlStr=str_replace(\"&\",'&amp;',$xmlStr);\n return $xmlStr;\n }", "title": "" }, { "docid": "eeaefb3bfd74544fabe39a660654d775", "score": "0.51085836", "text": "function getXML($resource=null) {\n\t$path=\"examples\"; // /path/to/directory\n\t$xml_files=array();\n\t$xmlHead='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>';\n\t$xml=\"\";\n\tforeach (glob(\"$path/[0-9]*-[a-zA-z]*.xml\") as $filepath) {\n\t\t$file=file_get_contents($filepath);\n\t\t//Tidying up the xml\n\t\t$pattern=array(\"/<\\?xml.*?>/\",'/href=\"file:\\/\\/\\/.[^>]*\\.[a-zA-z]{3,4}\"/', \"/href_fmt/\", '/\\x{2029}/u', \"/Text>/\", \"/Headline>/\", \"/Subheadline>/\", \"/Author>/\", \"/Image>/\", \"/<Image/\" );\n\t\t$replace=array(\"\", \"\",\"href\", \"\\n\\n\", \"content>\", \"title>\", \"teaser>\", \"authors>\", \"images>\", \"<images\");\n\t\t$xml.=preg_replace($pattern, $replace, $file);\n\t\t\n\t}\n\treturn $xmlHead.$xml;\n}", "title": "" }, { "docid": "bd4a666622951a37300823ef2a453b0a", "score": "0.5105934", "text": "public function formatXml($data) {\n return $data;\n }", "title": "" }, { "docid": "f884ac9f5d6478ea207897e0d7ff6bde", "score": "0.51004714", "text": "function xml_rename_tag($string,$new){\n\tglobal $xml_rename_tag;\n\t$string=trim($string);\n\tif(!preg_match('/<[a-z_0-9]+[^>]*\\/*>/i',$string,$a)){\n\t\t$xml_rename_tag[err]='Tag not found';\n\t\treturn false;\n\t}\n\t$initialString=$a[0];\n\t$initialString=preg_replace('/^<[a-z0-9_]+/i','<'.$new,$initialString);\n\t$remainder=substr($string,strlen($initialString),strlen($string)-strlen($initialString));\n\tif(substr($initialString,-2)!=='/>'){\n\t\t$buffer=$remainder;\n\t\t$remainder = preg_replace('/<\\/[a-z0-9_]+>$/i','</'.$new.'>',$remainder);\n\t\tif($buffer!=$remainder){$xml_rename_tag['notice']='No nesting tag name present';}\n\t}\t\n\treturn $initialString.$remainder;\n}", "title": "" }, { "docid": "3cf7509fb9b5b4aa1cda9e9c530e9090", "score": "0.5099482", "text": "public function testXMLmergereverse()\n\t {\n\t\t$originalxml = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?><listofitems><item id=\\\"1\\\" index=\\\"1\\\">First</item><item id=\\\"2\\\">Second</item></listofitems>\";\n\t\t$newxml = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?><listofitems><item id=\\\"2\\\">second</item><item id=\\\"3\\\">Third</item></listofitems>\";\n\t\t$diff = $this->object->diff($originalxml, $newxml);\n\t\t$originalxml = $this->object->mergereverse($newxml, $diff);\n\t\t$this->assertXmlStringEqualsXmlString(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?><listofitems><item id=\\\"1\\\" index=\\\"1\\\">First</item>\" .\n\t\t\"<item id=\\\"2\\\">Second</item></listofitems>\",\n\t\t $originalxml);\n\t }", "title": "" }, { "docid": "2521a96f61fe957254997228ecc69daa", "score": "0.50832784", "text": "function escapeXML($strItem, $forDataURL) {\n\tif ($forDataURL) {\n\t\t$strItem = str_replace(\"'\",\"&apos;\", $strItem); \n\t} else {\n\t\t$findStr = array(\"%\", \"'\", \"&\", \"<\", \">\");\n\t\t$repStr = array(\"%25\", \"%26apos;\", \"%26\", \"&lt;\", \"&gt;\");\n\t\t$strItem = str_replace($findStr, $repStr, $strItem); \n\t}\n $findStr = array(\"<\", \">\");\n $repStr = array(\"&lt;\", \"&gt;\");\n $strItem = str_replace($findStr, $repStr, $strItem); \n\treturn $strItem;\n}", "title": "" }, { "docid": "d723d97f4281c4f11483bf04c7867673", "score": "0.5080705", "text": "function xml_literal($xml, $literal, $arguments)\n{\n if (!empty($arguments[\"l\"])) { // Handling -l\n if ($literal === true) {\n $xml->writeElement(\"true\");\n } elseif ($literal === false) {\n $xml->writeElement(\"false\");\n } elseif ($literal === null) {\n $xml->writeElement(\"null\");\n }\n } else {\n if ($literal === true) {\n $xml->writeAttribute(\"value\", \"true\");\n } elseif ($literal === false) {\n $xml->writeAttribute(\"value\", \"false\");\n } elseif ($literal === null) {\n $xml->writeAttribute(\"value\", \"null\");\n }\n if (!empty($arguments[\"types\"])) {\n $xml->writeAttribute(\"type\", \"literal\");\n }\n\n }\n}", "title": "" }, { "docid": "06995145b4e4fbd474d3a923b2d149b2", "score": "0.507414", "text": "function saveXMLFile($ref,$file)\n {\n\n //content file\n $content = trim($ref->saveXML());\n\n /*\n //fit entities\n $XmlEntities = array(\n '&apos;' => '\\'',\n );\n\n foreach ($XmlEntities AS $key=>$val)\n {\n $content = str_replace($val,$key,$content);\n } \n */\n file_put_contents($this->tmpDir.\"/\".$file,$content);\n \n }", "title": "" }, { "docid": "d0426b1ffcdca61872e3f8d108b64a4f", "score": "0.5073796", "text": "function could_not_load_xml()\n{\n return array(\"<p>There was a problem loading this Blog Feed.</p>\");\n}", "title": "" }, { "docid": "ca8824cfac412b7bb896e3ef96d62506", "score": "0.50683993", "text": "function usage()\n{\nob_start(); \n?>\nStrip out all HTML from a piece of text\n\n{exp:html_strip}\n\ntext <strong>you</strong> want processed\n\n{/exp:html_strip}\n\n// Returns 'text you want processed'\n\n----------------------------------------------\n\nThe \"convert\" parameter lets you specify whether to convert &lt; and &gt; back to the < and > characters before stripping out the HTML.\n\nThe \"convert_back\" parameter lets you specify whether to convert < and > back to the entities.\n - convert_back=\"all\" will convert all < and > characters to entities.\n - convert_back=\"original\" will convert the < and >'s that were originally &lt; and &gt; back to entities\n - convert_back=\"none\" will convert none of the < and >'s back to entities\n\nThe \"keep\" parameter lets you specify what HTML tags to keep.\n\n{exp:html_strip convert=\"y\" convert_back=\"all\" keep=\"strong,em\"}\n\n&lt;p&gt;text &lt;strong&gt;you&lt;/strong&gt; want processed&lt;/p&gt;\n\n{/exp:html_strip}\n\n// Returns 'text &lt;strong&gt;you&lt;/strong&gt; want processed'\n\n\n<?php\n$buffer = ob_get_contents();\n\t\nob_end_clean(); \n\nreturn $buffer;\n}", "title": "" }, { "docid": "40456c3f3c1377c89817f7684551a11e", "score": "0.5063291", "text": "function simplexml_import_xml($parent, $xml, $before = false)\n{\n\t$xml = (string)$xml;\n\n\t// check if there is something to add\n\tif ($nodata = !strlen($xml) or $parent[0] == NULL) {\n\t\treturn $nodata;\n\t}\n\n\t// add the XML\n\t$node = dom_import_simplexml($parent);\n\t$fragment = $node->ownerDocument->createDocumentFragment();\n\t$fragment->appendXML($xml);\n\n\tif ($before) {\n\t\treturn (bool)$node->parentNode->insertBefore($fragment, $node);\n\t}\n\n\treturn (bool)$node->appendChild($fragment);\n}", "title": "" }, { "docid": "d91fee3f1e207a75f45dbcbe58551e64", "score": "0.5058272", "text": "public function __toXml()\n {\n $xml = new SimpleXMLElement('<file path=\"'.ltrim($this->filename, './').'\" hash=\"'.$this->hash.'\"></file>');\n $this->addDocblockToSimpleXmlElement($xml);\n\n // add markers\n foreach($this->markers as $marker)\n {\n if (!isset($xml->markers))\n {\n $xml->addChild('markers');\n }\n\n $marker_obj = $xml->markers->addChild(strtolower($marker[0]), trim($marker[1]));\n $marker_obj->addAttribute('line', $marker[2]);\n }\n\n // add namespace aliases\n foreach($this->namespace_aliases as $alias => $namespace)\n {\n $alias_obj = $xml->addChild('namespace-alias', $namespace);\n $alias_obj->addAttribute('name', $alias);\n }\n\n $dom = new DOMDocument('1.0', 'utf-8');\n $dom->loadXML(trim($xml->asXML()));\n\n foreach($this->includes as $include)\n {\n $this->mergeXmlToDomDocument($dom, trim($include->__toXml()));\n }\n foreach($this->constants as $constant)\n {\n $this->mergeXmlToDomDocument($dom, trim($constant->__toXml()));\n }\n foreach($this->functions as $function)\n {\n $this->mergeXmlToDomDocument($dom, trim($function->__toXml()));\n }\n foreach($this->interfaces as $interface)\n {\n $this->mergeXmlToDomDocument($dom, trim($interface->__toXml()));\n }\n foreach($this->classes as $class)\n {\n $this->mergeXmlToDomDocument($dom, trim($class->__toXml()));\n }\n\n return trim($dom->saveXml());\n }", "title": "" }, { "docid": "fd6d76836b7a14b8fc338209265fe81a", "score": "0.5057769", "text": "public function sanitize_for_xml($str){\n\t \t\n\t \t$str = str_replace(\"&\", \"&amp;\", $str);\n\t \t$str = str_replace(\"<\", \"&lt;\", $str);\n\t \t$str = str_replace(\">\", \"&gt;\", $str);\n\t \t$str = str_replace(\"“\", \"&quot;\", $str);\n\t \t$str = str_replace(\"‘\", \"&apos;\", $str);\n\n\t \treturn $str;\n\t }", "title": "" }, { "docid": "9403bd190880e6b5f91abd43e9d1530c", "score": "0.5054388", "text": "public function xml($xml = NULL) {\n return $this->content(\n $xml,\n function ($node) {\n return $this->build()->getInnerXml($node);\n },\n function ($node) {\n return $this->build()->getFragment($node);\n },\n function ($node, $fragment) {\n $this->modify($node)->replaceChildren($fragment);\n }\n );\n }", "title": "" } ]
b1014fe32ae40a53a69e8330ec4fb89d
///////////////////////////////////////////// PROTECTED UPDATE METHODS for ManyToManyReferences (if any) ///////////////////////////////////////////// ///////////////////////////////////////////// PUBLIC LISTAPRODUCTO OBJECT MANIPULATORS ///////////////////////////////////////////// This will save this object's ListaProducto instance, updating only the fields which have had a control created for it.
[ { "docid": "67ef7f7118f478b268af7a0dd46d2aee", "score": "0.7893955", "text": "public function SaveListaProducto() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstLICENCIAIdLICENCIAObject) $this->objListaProducto->LICENCIAIdLICENCIA = $this->lstLICENCIAIdLICENCIAObject->SelectedValue;\n\t\t\t\tif ($this->lstPRODUCTOIdPRODUCTOObject) $this->objListaProducto->PRODUCTOIdPRODUCTO = $this->lstPRODUCTOIdPRODUCTOObject->SelectedValue;\n\t\t\t\tif ($this->txtPRODUCTOCantidad) $this->objListaProducto->PRODUCTOCantidad = $this->txtPRODUCTOCantidad->Text;\n\t\t\t\tif ($this->txtPRODUCTOVolumen) $this->objListaProducto->PRODUCTOVolumen = $this->txtPRODUCTOVolumen->Text;\n\t\t\t\tif ($this->txtPRODUCTOUnidad) $this->objListaProducto->PRODUCTOUnidad = $this->txtPRODUCTOUnidad->Text;\n\t\t\t\tif ($this->txtPRODUCTOCostoUnitario) $this->objListaProducto->PRODUCTOCostoUnitario = $this->txtPRODUCTOCostoUnitario->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the ListaProducto object\n\t\t\t\t$this->objListaProducto->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "e487887bbf435280a93829da3a75c43c", "score": "0.5882467", "text": "public function saveAction() {\n $request = $this->getRequest();\n\n // URL parameter\n $productId = $request->getParam('id');\n // Useful stuff\n $storeId = Mage::app()->getStore()->getId();\n $helper = Mage::helper('productivity/attribute');\n\n if ($helper->isReviewerLogged())\n {\n //Check if save scope is set and we need to load product\n //with dara from current store\n $saveScope = (int) Mage::getStoreConfig(\n MVentory_Productivity_Model_Config::_PRODUCT_SAVE_SCOPE\n );\n\n if ($saveScope\n != MVentory_Productivity_Model_Config::PRODUCT_SCOPE_CURRENT)\n $storeId = false;\n\n unset($saveScope);\n\n //Product loads and saves must be made from admin store\n //- Magento doesn't fill origData array when product is loaded from\n // non admin scope, so some core comparing function (for comparing\n // original and current product data) won't work as expected\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\n\n $product = Mage::getModel('catalog/product');\n\n //Set current store ID before loading product if save scope is set,\n //e.g. user selected Current scope optin in admin interface\n if ($storeId !== false)\n $product->setStoreId($storeId);\n\n $isConfigurable = $product\n ->load($productId)\n ->isConfigurable();\n\n // Only allow certain attributes to be set, if missing product will not be changed.\n $data = array_intersect_key(\n $request->getPost(),\n $helper->getEditables($product)\n );\n\n if (isset($data['qty'])) {\n if (!$isConfigurable)\n $qty = $data['qty'];\n\n unset($data['qty']);\n }\n\n //Find all attributes which value was changed in the editor by comparing\n //data from request with product's data\n //\n //In admin interface it uses special Use default flag for every field\n //which user removes before setting different value in selected scope.\n //Productivity interface doesn't provide such flags, so it simply\n //compares current product values with values entered in the form to\n //find changed fields.\n $changeAttrs = array();\n foreach ($data as $code => $value)\n if ($product->getData($code) != $value)\n $changeAttrs[$code] = true;\n\n if (isset($qty)) {\n $qty = (float) $qty;\n\n $data['stock_data'] = array(\n 'qty'\n => $qty < Mage_Adminhtml_Catalog_ProductController::MAX_QTY_VALUE\n ? $qty\n : Mage_Adminhtml_Catalog_ProductController::MAX_QTY_VALUE,\n 'is_in_stock'\n => $qty > 0\n ? Mage_CatalogInventory_Model_Stock_Status::STATUS_IN_STOCK\n : Mage_CatalogInventory_Model_Stock_Status::STATUS_OUT_OF_STOCK\n );\n }\n\n if ($changeAttrs || isset($qty)) {\n $product->addData($data);\n\n if ($storeId !== false)\n $this->_unsetValues($product, $changeAttrs);\n\n $product->save();\n\n if ($isConfigurable)\n $this->_copyDataToSimpleProducts($product, $changeAttrs, $storeId);\n\n //Reset store to be neat\n Mage::app()->setCurrentStore($storeId);\n }\n }\n\n //Always show same page, even if nothing has changed\n $this->_redirectUrl($product->setData('url', null)->getProductUrl());\n }", "title": "" }, { "docid": "29d70111052e94522902818628441481", "score": "0.57514787", "text": "protected function _createProduct($prod) {\r\n \r\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\r\n \r\n //Leggo i prodotti per store\r\n $myProduct = $this->_hlp->getProduct4Store($prod->Sku); \r\n \r\n $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku . \" - Type: \" . $prod->Type);\r\n \r\n $myProduct[0]->setTypeId($prod->Type);\r\n\t$myProduct[0]->setProductTypeId($prod->Type);\r\n if ($prod->Type == 'simple' && !is_null($prod->SkuConfigurable) && $prod->SkuConfigurable != \"\")\r\n $myProduct[0]->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE);\r\n else \r\n $myProduct[0]->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH); \r\n\r\n $myProduct[0]->setSku($prod->Sku); \r\n $myProduct[0]->setAttributeSetId($prod->AttributeSetId);\r\n \r\n foreach ($prod->Attribute as $attribute) {\r\n \r\n// $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". Aggiorno Attributo \" . $attribute->AttributeCode );\r\n if ($myProduct[-1] == \"insert\" || $prod->ForceUpdateAll == 2 ||\r\n ($prod->ForceUpdateAll == 1 && array_search($attribute->AttributeCode, $this->_forceUpdate) === false) ||\r\n (array_search($attribute->AttributeCode, $this->_allUpdate)) !== false){\r\n \r\n $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". Aggiorno Attributo \" . $attribute->AttributeCode );\r\n $attrValue = null;\r\n \r\n $actRow = $this->_getAttributeRow($attribute->AttributeCode);\r\n if ($actRow->getIsUserDefined() && \r\n ($actRow->getFrontendInput() == \"select\" || $actRow->getFrontendInput() == \"multiselect\" )) {\r\n //Cerco il valore tra le opzione \r\n foreach (explode(\",\", $attribute->AttributeValue) as $_attVal) {\r\n $_attrValue = Mage::getResourceModel('eav/entity_attribute_option_collection')\r\n ->setStoreFilter($attribute->StoreId)\r\n ->setAttributeFilter($actRow->getId())\r\n ->addFieldToFilter(' tdv.value ', $_attVal) \r\n ->getFIrstItem()->getId();\r\n if (is_null($_attrValue) || $_attrValue == 0) {\r\n //Creo l'attributo per lo store\r\n }\r\n if (!is_null($attrValue))\r\n $attrValue.=\",\";\r\n $attrValue.=$_attrValue;\r\n }\r\n } else {\r\n $attrValue = $attribute->AttributeValue;\r\n } \r\n\r\n//$this->_hlp->debug(($attribute->StoreId == 0) ? \"vero\" : \"Falso\");\r\n//$this->_hlp->debug((!$myProduct[0]->hasData($attribute->AttributeCode)) ? 'Vero' : 'Falso');\r\n//$this->_hlp->debug((($myProduct[0]->getData($attribute->AttributeCode) .'') == \"\") ? \"Vero\" : \"Falso\");\r\n \r\n $myProduct[$attribute->StoreId]->setData($attribute->AttributeCode,$attrValue);\r\n if ($attribute->StoreId == 0 || !$myProduct[0]->hasData($attribute->AttributeCode) || ($myProduct[0]->getData($attribute->AttributeCode) .'') == '') {\r\n //Lo store di default non ha impostato l'attributo o\r\n //l'attributo è per lo store di default o \r\n // lo store di default ha impostato l'attributo vuoto\r\n $myProduct[0]->setData($attribute->AttributeCode,$attrValue);\r\n//$this->_hlp->debug('Imposto store 0 - ' . $attrValue);\r\n }\r\n }\r\n }\r\n\r\n $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". Aggiorno WebSite \"); \r\n if ($myProduct[-1] == \"insert\" || $prod->ForceUpdateAll >= 1 || $prod->ForceWebSites) {\r\n $myProduct[0]->setWebsiteIDs($this->_hlp->getWebSite($prod->WebSite));\r\n }\r\n\t//Le categorie le aggiorno solo se il prodotto non è semplice o non ha il riferimento\r\n\tif ($prod->Type != 'simple' || $prod->SkuConfigurable == \"\") {\r\n\t $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". Aggiorno Category \");\r\n \t//$this->_catHlp = Mage::Helper(\"autelcatalog/product_category\");\r\n\t foreach ($this->_catHlp->getCategory($prod->Category) as $k=>$v) { \r\n \t $myProduct[$k]->setCategoryIds($v);\r\n\t }\r\n\t}\r\n\r\n $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". Aggiorno Stock \");\r\n //Aggiorno a priori la quantità\r\n foreach ($prod->Stock as $stock) {\r\n\r\n if ($prod->Type == 'simple') {\r\n /**\r\n * @todo c'è cmq da verificare correttamente la gestione dell'out of stock\r\n */\r\n $myProduct[$stock->StoreId]->setStockData(array(\r\n 'is_in_stock' => is_null($stock->OutOfStock || $stock->OutOfStock == 1)?0:1,\r\n 'qty' => is_null($stock->Qty)?0:$stock->Qty,\r\n 'manage_stock' => 0,\r\n// '' => is_null($stock->QtyMin)?0:$stock->QtyMin,\r\n// '' => is_null($stock->QtyMinSales)?0:$stock->QtyMinSales,\r\n// '' => is_null($stock->QtyMaxSales)?0:$stock->QtyMaxSales,\r\n ));\r\n\r\n } else {\r\n $myProduct[$stock->StoreId]->setStockData(array(\r\n 'is_in_stock' => is_null($stock->OutOfStock || $stock->OutOfStock == 1)?0:1,\r\n 'manage_stock' => 0));\r\n }\r\n }\r\n try { \r\n $myProduct[0]->setTaxClassId($this->_getTax($myProduct[0]->getTaxClassId())); \r\n\r\n $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". tentativo di Salvataggio Store 0 \");\r\n $myProduct[0]->Save(); \r\n\r\n//$this->_hlp->debug(MAge::GetModel('catalog/product')->Load( $myProduct[0]->getId())->getData('c_weight_gr'));\r\n //Salvo solo per gli store previsti dai Web Site \r\n foreach ($this->_hlp->getStoreByWebSite($prod->WebSite) as $store) {\r\n\r\n $this->_hlp->debug(\"Aggiornamento Prodotto \" .$prod->Sku. \". tentativo di Salvataggio Store \" . $store->getId());\r\n \r\n\t\t//Sistemo gli attributi imporatnti per evitare casini\r\n\t\t$myProduct[$store->getId()]->setTypeId($myProduct[0]->getTypeId());\r\n\t\t$myProduct[$store->getId()]->setWeight($myProduct[0]->getWeigth());\r\n\r\n\t\tforeach ($prod->Attribute as $attr) {\r\n if ($attr->StoreId == 0) {\r\n \t\t$attrRow = $this->_getAttributeRow($attr->AttributeCode);\r\n//$this->_hlp->debug($attrRow->getData());\r\n \t\tif ($attrRow->getIsGlobal() == Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL) {\r\n \t\t\t$myProduct[$store->getId()]->setData($attr->AttributeCode, $myProduct[0]->getData($attr->AttributeCode));\r\n \t\t} else {\r\n \t\t\t$myProduct[$store->getId()]->setData($attr->AttributeCode, false); \r\n \t\t} \r\n }\r\n } \r\n \r\n //$myProduct[$store->getId()]->setTaxClassId($this->_getTax($myProduct[$store->getId()]->getTaxClassId()));\r\n $myProduct[$store->getId()]->Save();\r\n\r\n//$this->_hlp->debug(MAge::GetModel('catalog/product')->Load( $myProduct[0]->getId())->getData('c_weight_gr'));\r\n //Aggiorno l'associazione con il website\r\n //$this->_action->updateWebsites($myProduct[$store->getId()]->getId(), $store->getWebsiteId(), 'add');\r\n } \r\n } catch (Exception $e) {\r\n $error = \"Creazione Prodotto: Errore in salvataggio Sku: \" . $prod->Sku . \"\\n\" . $e->getMessage() . \"\\n\" . $e->getTrace();\r\n $this->_hlp->debug(\"Errore - $error\");\r\n return $error;\r\n }\r\n \r\n return $myProduct[0]->getId();\r\n }", "title": "" }, { "docid": "13b05d30604980e659fb51d85a3367a1", "score": "0.5732518", "text": "public function modifyProduct($product,$array)\r\n {\r\n \r\n try{\r\n $_product = Mage::getModel('catalog/product')->load(Mage::getModel('catalog/product')->getResource()->getIdBySku((string)$product->Pip_code));\r\n if($_product->getId()) {\r\n $this->modifyCount++;\r\n $this->totalCount++;\r\n if ((string)$product->Adjustment_type == 'a') {\r\n $this->_emptyGroupPrices($_product);\r\n $_product->setPrice((string)$product->Retail_price);\r\n }\r\n if ((string)$product->Adjustment_type == 'r') {\r\n $this->_emptyGroupPrices($_product);\r\n $_product->setPrice((string)$product->Retail_price);\r\n }\r\n if ((string)$product->Adjustment_type == 'c') {\r\n $this->_emptyGroupPrices($_product);\r\n $_product = $this->setDataProduct($product, $array, $_product);\r\n }\r\n if ((string)$product->Adjustment_type == 'i') {\r\n $this->_emptyGroupPrices($_product);\r\n $_product->setPrice((string)$product->Retail_price);\r\n }\r\n try {\r\n $_product->getResource()->save($_product);\r\n $_product->save($_product);\r\n // $_product->save();\r\n } catch (Exception $e) {\r\n $this->logMessage(\"Modifying product\");\r\n $this->logMessage($e->getMessage());\r\n var_dump($e->getMessage());\r\n }\r\n }else{\r\n $this->saveNewProduct($product, $array);\r\n }\r\n }catch (Exception $e){\r\n $this->logMessage(\"Modifying product\");\r\n $this->logMessage($e->getMessage());\r\n var_dump($e->getMessage());\r\n Mage::log($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "81c5745f9077fa405be58488fc471e92", "score": "0.5725894", "text": "function m_updateProduct()\n\t{\n\t\t$timestamp=time();\t\t\t\n\t\n\t\t$backorder=$this->libFunc->ifSet($this->request,\"backorder\",\"\");\n\t\t$use_inventory=$this->libFunc->ifSet($this->request,\"use_inventory\",0);\n\t\t$taxable=$this->libFunc->ifSet($this->request,\"taxable\",0);\n\t\t$vdiscount=$this->libFunc->ifSet($this->request,\"vdiscount\",0);\n\t\t$sale=$this->libFunc->ifSet($this->request,\"sale\",0);\n\t\t$free_postage=$this->libFunc->ifSet($this->request,\"free_postage\",0);\n\t\t$state=$this->libFunc->ifSet($this->request,\"state\",0);\n\t\t$cart_button=$this->libFunc->ifSet($this->request,\"cart_button\",0);\n\t\t$enquirebutton = $this->libFunc->ifSet($this->request,\"enquirebutt\",0);\n\t\t$inventory=$this->libFunc->checkWrongValue($this->libFunc->ifSet($this->request,\"inventory\"));\n\t\t$mininventory=$this->libFunc->checkWrongValue($this->libFunc->ifSet($this->request,\"min_inventory\"));\n\t\n\t\tif(isset($this->request['due_date']) && !empty($this->request['due_date']))\n\t\t{\n\t\t\t$arrStartDate=explode(\"/\",$this->request['due_date']);\n\t\t\t$this->request['due_date']=mktime(0,0,0,$arrStartDate[1],$arrStartDate[0],$arrStartDate[2]);\n\t\t}\n\t\t\n\t\t$this->obDb->query = \"SELECT * FROM \".PRODUCTATTRIBUTES. \" WHERE iProductid_FK = '\".$this->request['prodId'].\"'\";\n\t\t$existingAttribute = $this->obDb->fetchQuery();\n\t\tforeach($existingAttribute as $k => $v)\n\t\t{\n\t\t\t$this->obDb->query = \"DELETE FROM \".ATTRIBUTEVALUES.\" WHERE iValueId_PK = '\".$existingAttribute[$k]->iValueid_FK.\"'\";\n\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\t$this->obDb->query = \"DELETE FROM \".PRODUCTATTRIBUTES.\" WHERE iProductid_FK = '\".$this->request['prodId'].\"'\";\n\t\t$this->obDb->updateQuery();\n\t\t\n\t\t\n\t\t#INSERT ATTRIBUTE FOR PRODUCT\n\t\t$i=0;\n\t\t$string = \"\";\t\t\n\t\t\n\t\tforeach($this->request['attributevalue'] as $k => $v)\t \n\t\t{\n\t\t \t//$string.=$this->request['attributevalue'][$i].\"<!>\";\n\t\t\t//$i++;\n\t\n\t\t\t$this->obDb->query = \"INSERT INTO \".ATTRIBUTEVALUES.\" (`iAttributesid_FK`,`tValues`) VALUES (\n\t\t\t'\".$this->libFunc->m_addToDB($this->request['attributeid']).\"',\n\t\t\t'\".$this->libFunc->m_addToDB($this->request['attributevalue'][$k]).\"')\";\n\t\t\t$this->obDb->updateQuery();\n\t\t\t$valueid=$this->obDb->last_insert_id;\n\t\t\t \n\t\t\t$this->obDb->query = \"INSERT INTO \".PRODUCTATTRIBUTES.\" (`iAttributeid_FK`,`iProductid_FK`,`iValueid_FK`) VALUES (\n\t\t\t'\".$this->libFunc->m_addToDB($this->request['attributeid']).\"',\n\t\t\t'\".$this->libFunc->m_addToDB($this->request['prodId']).\"',\n\t\t\t'\".$this->libFunc->m_addToDB($valueid).\"')\";\n\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\t\n\t\t$this->obDb->query = \"SELECT iProdid_PK,vTitle,vImage1,vImage2,vImage3,tImages FROM \".PRODUCTS.\" WHERE iProdid_PK = '\".$this->request['prodId'].\"'\";\n\t\t$row_code = $this->obDb->fetchQuery();\n\t\tif($this->obDb->record_count == 0)\n\t\t{\n\t\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"ecom/adminindex.php?action=ec_show.dspMsg&type=\".$this->request['type'].\"&msg=5&owner=\".$this->request['owner']);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(!isset($this->request['retailprice'])){\n\t\t\t\t$this->request['retailprice'] = \"\";\n\t\t\t}\n \n\n\t\t\t$onOrder=$this->libFunc->ifSet($this->request,\"on_order\");\n\t\t\t$this->obDb->query=\"UPDATE \".PRODUCTS.\" SET \n\t\t\tvTitle\t\t\t\t\t\t\t='\".$this->libFunc->m_addToDB($this->request['title']).\"',\n\t\t\tvSeoTitle\t\t\t\t\t='\".$this->libFunc->seoText($this->request['seo_title']).\"',\n\t\t\ttShortDescription\t\t\t='\".$this->libFunc->m_addToDB($this->request['short_description']).\"', \n\t\t\tvMetaTitle\t\t\t\t\t='\".$this->libFunc->m_addToDB($this->request['meta_title']).\"', \n\t\t\ttMetaDescription\t\t\t='\".$this->libFunc->m_addToDB($this->request['meta_description']).\"',\n\t\t\ttKeywords\t\t\t\t\t='\".$this->libFunc->m_addToDB($this->request['keywords']).\"',\n\t\t\ttContent\t\t\t\t\t='\".$this->libFunc->m_addToDB($this->request['content']).\"',\t\t\t \n\t\t\tvTemplate\t\t\t\t\t='\".$this->request['template'].\"',\n\t\t\tvLayout\t\t\t\t\t\t='\".$this->request['layout'].\"',\n\t\t\tvSku\t\t\t\t\t\t='\".$this->request['sku'].\"',\n\t\t\tfListPrice\t\t\t\t\t='\".$this->libFunc->checkFloatValue($this->request['list_price']).\"',\n\t\t\tfPrice\t\t\t\t\t\t='\".$this->libFunc->checkFloatValue($this->request['price']).\"',\n\t\t\tfRetailPrice \t\t\t\t='\".$this->libFunc->checkFloatValue($this->request['retailprice']).\"',\n\t\t\tfItemWeight\t\t\t\t\t='\".$this->libFunc->checkFloatValue($this->request['item_weight']).\"',\t\n\t\t\tiInventory\t\t\t\t\t='\".$this->libFunc->checkWrongValue($inventory).\"',\t\n\t\t\tiInventoryMinimum\t\t\t='\".$this->libFunc->checkWrongValue($mininventory).\"',\t\n\t\t\tiBackorder\t\t\t\t\t='$backorder',\n\t\t\tiUseinventory\t\t\t\t='\".$use_inventory.\"',\n\t\t\tiOnorder\t\t\t\t\t='\".$this->libFunc->checkWrongValue($onOrder).\"',\n\t\t\ttmDuedate\t\t\t\t\t='\".$this->libFunc->ifSet($this->request,\"due_date\").\"',\n\t\t\tvShipCode\t\t\t\t\t='\".$this->request['ship_code'].\"',\n\t\t\tvShipNotes\t\t\t\t\t='\".$this->request['ship_notes'].\"',\t\n\t\t\tiFreeShip\t\t\t\t\t='$free_postage',\n\t\t\tiTaxable\t\t\t\t\t='$taxable',\n\t\t\tiVendorid_FK\t\t\t\t='\".$this->libFunc->ifSet($this->request,\"vendorid\",0).\"',\n\t\t\tiAttrValueId_FK \t\t\t='\".$this->request['attributeid'].\"',\t\t\n\t\t\tiDiscount\t\t\t\t\t='$vdiscount',\n\t\t\tiSale\t\t\t\t\t\t='$sale',\n\t\t\tiCartButton\t\t\t\t\t='\".$cart_button.\"',\n\t\t\tiEnquiryButton \t\t\t ='\".$enquirebutton.\"', \n\t\t\ttmEditDate\t\t\t\t\t='\".$timestamp.\"',\n\t\t\tfItemWidth\t\t\t\t\t='\".$this->request['width'].\"',\n\t\t\tfItemHeight\t\t\t\t\t='\".$this->request['height'].\"',\n\t\t\tfItemDepth\t\t\t\t\t='\".$this->request['depth'].\"',\n\t\t\tvASIN\t\t\t\t \t='\".$this->request['asin'].\"',\n\t\t\tvISBN\t\t\t\t \t='\".$this->request['isbn'].\"',\n\t\t\tvMPN\t\t\t\t\t ='\".$this->request['mpn'].\"',\n\t\t\tvUPC\t\t\t\t \t='\".$this->request['upc'].\"',\n\t\t\tiAdminUser\t\t\t\t\t='\".$_SESSION['uid'].\"'\n\t\t\tWHERE iProdid_PK=\".$this->request['prodId'];\t\t\t\n\t\t\t$this->obDb->execQry($this->obDb->query);\n\t\t\n\t\t\n\t\t\n\t\t\t$passcode = \"\";\n\t\t\tif (isset($_REQUEST['passcode']) && ($_REQUEST['passcode'] != \"\")){\t\t\t\n\t\t\t\t$passcode = $_REQUEST['passcode'];\n\t\t\t}\n\t\t\t\n\t\t\t#CHECK IF THERE IS IMAGE FOR IMAGE GALLERY\n\t\t\t$this->obDb->query = \" SELECT iImagesPK , vImages, tmTimeInserted FROM \". TEMPIMAGES. \" WHERE tmTimeInserted ='\". $passcode .\"'\" ;\n\t\t\t$rowTempImages = $this->obDb->fetchQuery();\n\t\t\t\n\t\t\t\t$stringImages = \"\";\t\n\t\t\t\tif ($this->obDb->record_count>0){\n\t\t\t\t\tfor ($i=0; $i<$this->obDb->record_count; $i++){\t\t\t\t\n\t\t\t\t\t\t$stringImages .= $rowTempImages[$i]->vImages. \",\";\n\t\t\t\t\t}\n\t\t\t\t\t#Remove the last comma from the temp images string\n\t\t\t\t\t$stringImages = substr($stringImages, 0 , -1);\n\t\t\t\t\t\n\t\t\t\t\tif ($stringImages != \"\"){\t\t\t\t\t\t\n\t\t\t\t\t\tif( $row_code[0]->tImages!=\"\"){\n\t\t\t\t\t\t\t$stringImages = $row_code[0]->tImages.\",\".$stringImages;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->obDb->query = \"UPDATE \" . PRODUCTS . \" SET tImages = '\". $stringImages . \"' WHERE iProdid_PK = '\". $this->request['prodId']. \"'\";\n\t\t\t\t\t\t$this->obDb->updateQuery();\n\t\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t# CLEAR THE IMAGE TEMP\n\t\t\t$this->obDb->query = \" DELETE FROM \". TEMPIMAGES. \" WHERE tmTimeInserted ='\". $passcode .\"'\" ;\n\t\t\t$this->obDb->updateQuery();\n\t\t\t\n\t\t\n\t\t\t$obFile=new FileUpload();\n\t\t\t$this->imagePath=$this->imagePath.\"product/\";\n\t\t\n\t\t\t$this->obDb->query = \"SELECT count(*) as Cnt FROM \".FUSIONS.\" where iSubId_FK = '\".$this->request['prodId'].\"' AND vType='product'\";\n\t\t\t$rs = $this->obDb->fetchQuery();\n\t\t\t$this->m_RSSProductFeed();\n\t\t\tif(isset($this->request['fusionall']) && $this->request['fusionall'] == 1)\n\t\t\t{\n\t\t\t\t$this->ToggleProductAllDepartments($state,$this->request['prodId']);\n\t\t\t}\n\t\t\tif($rs[0]->Cnt> 0)\n\t\t\t{\n\t\t\t\t$this->obDb->query=\"UPDATE \".FUSIONS.\" SET\n\t\t\t\t`iState`='$state' where vtype='product' AND iSubId_FK='\".$this->request['prodId'].\"' AND iOwner_FK='\".$this->request['owner'].\"' AND vOwnerType='\".$this->request['type'].\"'\";\n\t\t\t\t$this->obDb->updateQuery();\n\t\t\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"ecom/adminindex.php?action=ec_show.dspMsg&type=\".$this->request['type'].\"&msg=7&owner=\".$this->request['owner'].\"&id=\".$this->request['prodId']);\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"adminindex.php?action=home.preport\");\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "061f8f8e21e1932eafa7241d7cfd14f6", "score": "0.5639463", "text": "public function setDataProduct($product, $array,$_product, $new = false)\r\n {\r\n try {\r\n // get value for file multi select Other_Code\r\n $array['other_code_description'] = array();\r\n\r\n foreach ($product->Other_Codes->Other_Code as $otherCode) {\r\n array_push($array['other_code_description'], (int)$this->setOtherCodeDescriptionValue($otherCode->Code_Description));\r\n }\r\n\r\n // get value for file multi select Monograph\r\n $array['monograph_description'] = array();\r\n foreach ($product->Monographs->Monograph as $monograph) {\r\n array_push($array['monograph_description'], (int)$this->setMonographDescriptionValue($monograph->Monograph_Description));\r\n }\r\n\r\n $_product\r\n ->setName((string)$product->Till_roll_extended) //product name\r\n ->setManufacturer(28) //manufacturer id\r\n ->setSpecialFromDate((string)$product->Promotion_Start)//special price from (MM-DD-YYYY)\r\n ->setSpecialToDate((string)$product->Promotion_End)//special price to (MM-DD-YYYY)\r\n ->setMsrpDisplayActualPriceType(1) //display actual price (1 - on gesture, 2 - in cart, 3 - before order confirmation, 4 - use config)\r\n ->setTaxClassId($this->setDefaultTaxId((string)$product->Vat_code))// Tax Class $product->Vat_code\r\n ->setShortDescription('Comming soon...')\r\n ->setStockData(array(\r\n 'use_config_manage_stock' => 0, //'Use config settings' checkbox\r\n 'manage_stock'=>1, //manage stock\r\n 'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart\r\n 'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart\r\n 'is_in_stock' => 1, //Stock Availability\r\n 'qty' => intval($product->Quantity)?:0,\r\n )\r\n )\r\n ->setCategoryIds(array($this->setCatagoryId((string)$product->Main_Product_Classification))); //assign product to categories\r\n if ($product->Retail_price){\r\n // can be null\r\n $_product->setPrice((string)$product->Retail_price);//price in form 11.22\r\n }\r\n $_product->setdata('description', $product->Description);\r\n // Set data for textfileds New attribute\r\n $_product\r\n ->setCompanyCode((string)$array['company_code'])\r\n ->setCompanyName((string)$array['Company_Name'])\r\n ->setBrandCode((string)$array['Brand_Code'])\r\n ->setBrandName((string)$array['Brand_Name'])\r\n ->setSubbrandName((string)$array['Subbrand'])\r\n ->setGroupCode((string)$array['Group_Code'])\r\n ->setParentGroupCode((string)$array['Parent_Code'])\r\n ->setPipCode((string)$product->Pip_code)\r\n ->setSizePrescriptionProduct((string)$product->Size)\r\n ->setFormulationIngredient((string)$product->Formulations->Formulation->Formulation_Ingredient)\r\n ->setFormulationStrength((string)$product->Formulations->Formulation->Formulation_Strength)\r\n ->setProductDimensionsWidth($product->Product_Dimensions->Width)\r\n ->setProductDimensionsWeight('1')//tim\r\n ->setProductDimensionsHeight($product->Product_Dimensions->Height)\r\n ->setProductDimensionsDepth($product->Product_Dimensions->Depth)\r\n ->setOuterDimensionsWidth($product->Outer_Dimensions->Width)\r\n ->setOuterDimensionsWeight($product->Outer_Dimensions->Weight)\r\n ->setOuterDimensionsHeight($product->Outer_Dimensions->Height)\r\n ->setOuterDimensionsDepth($product->Outer_Dimensions->Depth)\r\n ->setShipperDimensionsWidth($product->Shipper_Dimensions->Width)\r\n ->setShipperDimensionsWeight($product->Shipper_Dimensions->Weight)\r\n ->setShipperDimensionsHeight($product->Shipper_Dimensions->Height)\r\n ->setShipperDimensionsDepth($product->Shipper_Dimensions->Depth);\r\n\r\n // Set data for select option and multiselect fields New attribute\r\n\r\n $_product->setData('drug_codes_legal', (string)$product->Drug_Codes->Legal);\r\n // Checking Prescription product\r\n if(substr((string)$product->Drug_Codes->Legal,0,3) == 'POM'){\r\n $_product->setIsPrescriptionProduct(1);\r\n $_product->setProductDimensionsWeight('0');\r\n }\r\n // Set group price\r\n if (isset($product->Trade_price)) {\r\n // check for a product ID\r\n // if ($_product->getId() > 0){\r\n $productID = $_product->getId();\r\n $transaction = Mage::getSingleton('core/resource')->getConnection('core_write');\r\n try {\r\n $transaction->beginTransaction();\r\n\r\n $transaction->query('DELETE FROM catalog_product_entity_group_price WHERE entity_id = \"'.$productID . '\"');\r\n\r\n $transaction->commit();\r\n } catch (Exception $e) {\r\n $this->logMessage(\"FAILED TO REMOVE GROUP PRICE: \" . $e->getMessage());\r\n $transaction->rollBack(); // if anything goes wrong, this will undo all changes you made to your database\r\n }\r\n // $sql = Mage::getSingleton('core/resource')->getConnection('core_write');\r\n // $sql->query('delete from `catalog_product_entity_group_price` where `entity_id` = '.$_product->getId());\r\n // }\r\n $group_prices = array();\r\n $new_price = array(array ('website_id'=>0,\r\n 'cust_group'=>2,\r\n 'price'=>$product->Trade_price));\r\n $group_prices = array_merge($group_prices, $new_price);\r\n $_product->setData('group_price', $group_prices);\r\n }\r\n $_product->setData('options_container', '1');\r\n $_product->setData('drug_codes_tariff', $this->setDrugCodesTariffValue((string)$product->Drug_Codes->Tariffs->Tariff));\r\n $_product->setData('other_code_description', $array['other_code_description']);\r\n $_product->setData('monograph_description', $array['monograph_description']);\r\n\r\n // $this->logMessage(print_r($product->Other_Codes));\r\n // die();\r\n foreach($product->Other_Codes->Other_Code as $oc => $data){\r\n $description = $data->Code_Description->__toString();\r\n $value = $data->Code_Value->__toString();\r\n if ($description == \"EAN\"){\r\n // we have an image reference.\r\n if($this->saveImageToProduct($value, $_product)){\r\n// $this->logMessage(\"Added image\");\r\n } else {\r\n $this->logMessage(\"Can't find image file for \" . $value);\r\n }\r\n }\r\n }\r\n return $_product;\r\n\r\n } catch (Exception $e) {\r\n Mage::log($e->getMessage());\r\n var_dump($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "de24e70511d8e12b1ed1e57a1af619a7", "score": "0.5587708", "text": "public function wc_add_custom_fields_to_product(){\n\n add_action( 'woocommerce_process_product_meta', array( $this, 'wc_custom_save_is_rozetka_add' ) );\n add_action( 'woocommerce_product_options_general_product_data', array( $this, 'wc_custom_add_custom_fields_is_rozetka_add' ) );\n add_action( 'woocommerce_product_options_inventory_product_data', array( $this, 'wc_custom_add_custom_fields_is_rozetka_add' ) );\n\n add_action( 'woocommerce_process_product_meta', array( $this, 'wc_custom_save_rozetka_variable_price' ) );\n add_action( 'woocommerce_product_options_general_product_data', array( $this, 'wc_custom_add_custom_fields_rozetka_variable_price' ) );\n add_action( 'woocommerce_product_options_inventory_product_data', array( $this, 'wc_custom_add_custom_fields_rozetka_variable_price' ) );\n\n }", "title": "" }, { "docid": "d55da43d34ae5c36648064bb3892c338", "score": "0.55613077", "text": "public function actionSaveCompositeProducts()\n {\n\n Yii::$app->session->setFlash('alert' ,[\n 'typeAlert'=>'danger',\n 'message'=>'Сохранения не применились, что то пошло не так!!!'\n ]\n );\n\n $request = Yii::$app->request->post();\n\n $model = new PartsAccessories();\n\n if(!empty($request['id'])){\n $model = $model::findOne(['_id'=>new ObjectID($request['id'])]);\n\n $arrayComposite = [];\n if(!empty($request['composite'])){\n\n foreach ($request['composite']['name'] as $k=>$item){\n $arrayComposite[] = [\n '_id' => new ObjectID($item),\n 'number' => $request['composite']['number'][$k],\n 'unit' => $request['composite']['unit'][$k],\n ];\n }\n }\n\n $model->composite = $arrayComposite;\n\n if($model->save()){\n Yii::$app->session->setFlash('alert' ,[\n 'typeAlert'=>'success',\n 'message'=>'Сохранения применились.'\n ]\n );\n }\n \n }\n\n return $this->redirect('/' . Yii::$app->language .'/business/manufacturing-suppliers/composite-products');\n\n }", "title": "" }, { "docid": "829ef042a1ee2ea61238f6631f5952de", "score": "0.5520623", "text": "function edit()\r\n\t{\r\n\t\t$product =& model::create('product',$this->params['url_params']);\r\n\t\t\r\n\t\tif(isset($this->params['save']))\r\n\t\t{\r\n\t\t\t$product->set_field_values_from_array($this->params['product']);\r\n\t\t\t\r\n\t\t\t//Upload a new product image if one given\r\n\t\t\tif(!empty($_FILES['image_id']) && $_FILES['image_id']['error'] != UPLOAD_ERR_NO_FILE)\r\n\t\t\t{\r\n\t\t\t\t$image =& model::create('image');\r\n\t\t\t\tif($uploaded_image_id = $image->upload_image('image_id',IMAGE_UPLOADS_DIR,str_replace('-','_',$product->url_name)))\r\n\t\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\t\t//Delete old product images\r\n\t\t\t\t\tif($product->has_image_been_uploaded())\r\n\t\t\t\t\t\t$image->delete($product->image_id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t$product->image_id = $uploaded_image_id;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$this->flash['error'] = $image->_errors;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(empty($this->flash['error']) && $product->save())\r\n\t\t\t{\r\n\t\t\t\t//Save the product variants\r\n\t\t\t\t$product->set_variants(isset($this->params['product']['variant']) ? $this->params['product']['variant'] : array());\r\n\t\t\t\t\r\n\t\t\t\t$this->flash['notice'][] = 'Product updated successfully';\r\n\t\t\t\t$this->redirect_to('admin/products','index','https');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(isset($this->params['delete']))\r\n\t\t{\r\n\t\t\t$product->delete($product->id);\r\n\t\t\t$this->flash['notice'][] = 'Product deleted successfully';\r\n\t\t\t$this->redirect_to('admin/products','index','https');\r\n\t\t}\r\n\t\telse if(isset($this->params['cancel']))\r\n\t\t\t$this->redirect_to('admin/products','index','https');\r\n\t\t\r\n\t\t$this->template_data['product_form'] = $product->get_fields_for_form();\r\n\t\r\n\t\t//If no orders have linked to this product, it is considered deletable\r\n\t\t$order_product =& model::create('order_product');\r\n\t\tif($order_product->count(array('where' => 'product_id = '.$product->id)) <= 0)\r\n\t\t\t$this->template_data['allow_delete'] = true;\r\n\t\telse\r\n\t\t\t$this->template_data['allow_delete'] = false;\r\n\t\r\n\t\t$this->breadcrumb[] = array('admin/products/edit/'.$product->id => 'Modify '.$product->name);\t\r\n\t}", "title": "" }, { "docid": "aa65e4b43604fade65caaa1ce288aa5c", "score": "0.5483612", "text": "function admin_control($product_id) {\n\n\t\t$subproduct_conditions = array('Subproduct.product_id' => $product_id);\n\n\t\t$attribute_id_conditions = array();\n\n\t\t// pokud jsou nastavena spravna data (s ['Option'])\n\n\t\tif (isset($this->data['Option'])) {\n\n\t\t\t// vytahnu si z nich ty atributy, podle kterych chci filtrovat\n\n\t\t\t$attribute_ids = array();\n\n\t\t\tforeach ($this->data['Option'] as $attribute) {\n\n\t\t\t\tif (!empty($attribute['id'])) {\n\n\t\t\t\t\t$attribute_ids[] = $attribute['id'];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// pokud jsou obe pole prazda (v zadnem selectu nemam nic vybraneho), tak vybiram vsechny subprodukty, jinak jen podle zvolenych\n\n\t\t\t// atributu\n\n\t\t\tif (!empty($attribute_ids)) {\n\n\t\t\t\t$attribute_id_conditions = array('AttributesSubproduct.attribute_id' => $attribute_ids);\n\n\t\t\t} else {\n\n\t\t\t\t$this->redirect(array('controller' => 'products', 'action' => 'attributes_list', $product_id));\n\n\t\t\t}\n\n\t\t}\t\n\n\t\t\n\n\t\t// nactu produkt, jeho subprodukty a attributes_subproducts podle nastavenych podminek\n\n\t\t$subproducts = $this->Subproduct->find('all', array(\n\n\t\t\t'conditions' => $subproduct_conditions,\n\n\t\t\t'contain' => array(\n\n\t\t\t\t'AttributesSubproduct' => array(\n\n\t\t\t\t\t'conditions' => $attribute_id_conditions,\n\n\t\t\t\t)\n\n\t\t\t)\n\n\t\t));\n\n\t\t\n\n\t\tif (isset($attribute_ids)) {\n\n\t\t\t// vyberu jen ty subprodukty, ktere splnuji vsechny podminky z filtru\n\n\t\t\t$res = array();\n\n\t\t\tforeach ($subproducts as $index => $subproduct) {\n\n\t\t\t\t// vyberu jen ty, ktere splnuji vsechny podminky (maji vsechny atributy zvolene ve filtru)\n\n\t\t\t\tif (sizeof($subproduct['AttributesSubproduct']) == sizeof($attribute_ids)) {\n\n\t\t\t\t\t$res[$index] = $subproduct;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$subproducts = $res;\n\n\t\t}\n\n\t\t\n\n\t\t// donactu data o vybranych subproduktech\n\n\t\tif (sizeof($subproducts) == 1) {\n\n\t\t\t$subproduct = current($subproducts);\n\n\t\t\t$subproduct_ids = array($subproduct['Subproduct']['id']);\n\n\t\t} else {\n\n\t\t\t// preindexuju pole, aby zacinalo od 1\n\n\t\t\t$tmp = $subproducts;\n\n\t\t\t$subproducts = array();\n\n\t\t\tforeach ($tmp as $t) {\n\n\t\t\t\t$subproducts[] = $t;\n\n\t\t\t}\n\n\t\t\t$subproduct_ids = Set::extract('/Subproduct/id', $subproducts);\n\n\t\t}\n\n\t\t$subproducts = $this->Subproduct->find('all', array(\n\n\t\t\t'conditions' => array('Subproduct.id' => $subproduct_ids),\n\n\t\t\t'contain' => array(\n\n\t\t\t\t'AttributesSubproduct' => array(\n\n\t\t\t\t\t'Attribute' => array(\n\n\t\t\t\t\t\t'Option'\n\n\t\t\t\t\t)\n\n\t\t\t\t)\n\n\t\t\t)\n\n\t\t));\n\n\t\t\n\n\t\t\n\n\t\t// nastavim pole s atributy subproduktu\n\n\t\tforeach ($subproducts as $subproduct) {\n\n\t\t\t$data['Product'][$subproduct['Subproduct']['id']]['availability_id'] = $subproduct['Subproduct']['availability_id'];\n\n\t\t\t$data['Product'][$subproduct['Subproduct']['id']]['pieces'] = $subproduct['Subproduct']['pieces'];\n\n\t\t\t$data['Product'][$subproduct['Subproduct']['id']]['price_with_dph'] = $subproduct['Subproduct']['price_with_dph'];\n\n\t\t\t$data['Product'][$subproduct['Subproduct']['id']]['price_wout_dph'] = $subproduct['Subproduct']['price_wout_dph'];\n\n\t\t\t$data['Product'][$subproduct['Subproduct']['id']]['active'] = $subproduct['Subproduct']['active'];\n\n\t\t}\n\n\t\t\n\n\t\t// pro ucely filtru suproduktu podle atributu si musim vytahnout atributy, ktere se vztahuji k danemu produktu\n\n\t\t// takze najdu subprodukty produktu\n\n\t\t$filter_subproducts = $this->Subproduct->find('all', array(\n\n\t\t\t'conditions' => array('Subproduct.product_id' => $product_id),\n\n\t\t\t'contain' => array()\n\n\t\t));\n\n\t\t\n\n\t\t// najdu vztahy mezi subprodukty a atributy\n\n\t\t$filter_attributes_subproducts = $this->Subproduct->AttributesSubproduct->find('all', array(\n\n\t\t\t'conditions' => array('AttributesSubproduct.subproduct_id' => Set::extract('/Subproduct/id', $filter_subproducts)),\n\n\t\t\t'contain' => array(),\n\n\t\t\t'fields' => array('DISTINCT AttributesSubproduct.attribute_id')\n\n\t\t));\n\n\n\n\t\t// vytahnu si options a atributy se vztahem k danemu produktu\n\n\t\t$filter_options = $this->Subproduct->AttributesSubproduct->Attribute->Option->find('all', array(\n\n\t\t\t'contain' => array(\n\n\t\t\t\t'Attribute' => array(\n\n\t\t\t\t\t'conditions' => array(\n\n\t\t\t\t\t\t'Attribute.id' => Set::extract('/AttributesSubproduct/attribute_id', $filter_attributes_subproducts)\n\n\t\t\t\t\t),\n\n\t\t\t\t\t'order' => array('Attribute.sort_order' => 'ASC')\t\n\n\t\t\t\t)\n\n\t\t\t)\n\n\t\t));\n\n\n\n\t\t// preusporadam pole options, abych mohl snadno udelat selecty\n\n\t\tforeach ($filter_options as $index => $option) {\n\n\t\t\t$filter_options[$index]['Attribute'] = Set::combine($option['Attribute'], '{n}.id', '{n}.value');\n\n\t\t}\n\n\n\n\t\t// hodnoty z tabulky availabilities pro select\n\n\t\t$availabilities = $this->Subproduct->Availability->find('list');\n\n\n\n\t\treturn compact('filter_options', 'data', 'availabilities', 'subproducts');\n\n\t}", "title": "" }, { "docid": "30703a46930c6c112a47aeaec460b93d", "score": "0.5475308", "text": "function actualizar_productos_m() {\n\tglobal $wpdb;\n\n\t$productos = $_POST['productos'];\n\n\t//PRIMERO \n\t$todos_productos = [];\n\n\t//CONSULTAREMOS TODOS LOS PRODUCTOS\n\t$total_pro = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}posts WHERE post_type = 'product' AND post_parent = '0' \");\n\tforeach ($total_pro as $key) {\n\t\t$no_guardar = 0;\n\t\t//REVISAMOS LA CATEGORIA DE ESTE PRODUCTO\n\t\t$categorias = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}term_relationships WHERE object_id = {$key->ID} \");\n\t\tforeach($categorias as $catt){\n\t\t\t//CONSULTAMOS SI ESTA ES UNA CATEGORIA PROIBIDA\n\t\t\t$relacion = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}no_editar WHERE wp = {$catt->term_taxonomy_id} \");\n\t\t\tforeach ($relacion as $rela) {\n\t\t\t\t//echo \"----------------> {$key->ID} <---------------\";\n\t\t\t\t$no_guardar++;\n\t\t\t}\n\t\t}\n\n\t\tif($no_guardar == 0){\n\t\t\t//SI LLEGAMOS HASTA AQUI DEBEMOS CONSULTAR EL ID DE INVU DE ESTE PRODUCTO\n\t\t\t//array_push($todos_productos, array(\"id\" => $key->ID));\n\n\t\t\tarray_push($todos_productos, $key->ID);\n\t\t}\n\t}\n\n\t$total_invu = [];\n\t//AHORA CONSULTAMOS TODOS LOS PRODUCTOS DE LA TABLA DE INVU\n\t$productos_invu = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}mis_productos \");\n\tforeach ($productos_invu as $key) {\n\t\tarray_push($total_invu, $key->wp);\n\t}\n\n\n\n\t$productos = array_diff($todos_productos, $total_invu);\n\n\t$mi_resultado = json_encode($productos);\n\t//echo \"<h1> ----> ELIMINAMOS: $mi_resultado </h1>\";\n\t//for ($i=0; $i < count($productos); $i++) { \n\tforeach ($productos as $key => $value) {\n\t\t\n\t\t//$wpdb->delete( \"{$wpdb->prefix}posts\", array( 'ID' => $productos[$i] ) );\n\t\t//$wpdb->delete( \"{$wpdb->prefix}mis_productos\", array( 'wp' => $productos[$i] ) );\n\t\t\n\t\t$wpdb->update( \n\t\t\t\t\"{$wpdb->prefix}posts\",\n\t\t\t\tarray( \n\t\t\t\t\t'post_status' \t=> 'trash' \n\t\t\t\t), \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t=> $value\n\t\t\t\t)\n\t\t\t);\n\n\t\techo \"Eliminado el producto {$value} \";\n\t}\n\n\t//LUEGO DE BORRAR TODOS LOS PRODUCTOS QUE NO PERTENECEN A INVU DEBEMOS BORRAR TODOS LOS PRODUCTOS QUE \n\n\twp_die();\n}", "title": "" }, { "docid": "f2a588db5c516d714106844bc597f06e", "score": "0.54714996", "text": "public function manageProducts() {\n \t/** Get Customer Id */\n $sellerId = Mage::getSingleton ( 'customer/session' )->getCustomer ()->getId ();\n /**\n * get Product Id\n */\n $productId = $this->getRequest ()->getParam ( 'id' );\n /**\n * load product id\n */\n $product = Mage::getModel ( 'catalog/product' )->load ( $productId );\n $attributes = $product->getTypeInstance ()->getConfigurableAttributesAsArray ();\n /**\n * Get Product Collection\n */\n $associatedProducts = Mage::getModel ( 'catalog/product' )->getCollection ()->addFieldToFilter ( 'seller_id', $sellerId );\n if ($this->getRequest ()->getParam ( 'set' )) {\n $associatedProducts->addFieldToFilter ( 'attribute_set_id', $this->getRequest ()->getParam ( 'set' ) );\n }\n \n $attributeFilters = $this->getRequest ()->getParam ( 'attribute_filter' );\n /**\n * Checking atribute filters are not empty\n */\n if (! empty ( $attributeFilters )) {\n foreach ( $attributeFilters as $key => $attributeFilter ) {\n if (! empty ( $attributeFilter )) {\n $associatedProducts->addFieldToFilter ( $key, array (\n 'in' => $attributeFilter \n ) );\n }\n }\n }\n /**\n * Getting Associated Products\n */\n $associatedProducts = $this->configurableProductFilter ( $productId, $product, $associatedProducts );\n \n if ($this->getRequest ()->getParam ( 'reset' ) == '') {\n if ($this->getRequest ()->getParam ( 'filter_id' ) != '') {\n $fitlerId = $this->getRequest ()->getParam ( 'filter_id' );\n $associatedProducts->addFieldToFilter ( 'entity_id', array (\n 'eq' => $fitlerId \n ) );\n }\n $filterName = $this->getRequest ()->getParam ( 'filter_name' );\n /**\n * Checking filtername is not empty\n */\n if (! empty ( $filterName )) {\n $associatedProducts->addFieldToFilter ( 'name', array (\n 'like' => '%' . $filterName . '%' \n ) );\n }\n }\n \n foreach ( $attributes as $attribute ) {\n if (isset ( $attribute ['attribute_code'] )) {\n $associatedProducts->addFieldToFilter ( $attribute ['attribute_code'], array (\n 'neq' => '' \n ) );\n }\n }\n /** Filter By Type\n * \n */\n $associatedProducts->addFieldToFilter ( 'type_id', 'simple' );\n /** Filter by All\n */\n $associatedProducts->addAttributeToSelect ( '*' );\n /**\n * Sort Order By Desc\n */\n $associatedProducts->addAttributeToSort ( 'entity_id', 'DESC' );\n \n return $associatedProducts;\n \n }", "title": "" }, { "docid": "819f22343351be2b2b4d2293329225ce", "score": "0.54612726", "text": "public function saveProductsAction()\n {\n $this->saveAttributes('catalog/product_attribute_collection');\n }", "title": "" }, { "docid": "3bfa53397252e139b217136adaf29054", "score": "0.54570055", "text": "public function save() {\n $this->product->save();\n wc_delete_product_transients($this->product->get_id());\n }", "title": "" }, { "docid": "82031eeac4266e32a07627e0af932787", "score": "0.5448541", "text": "public function update(Request $request, Product $product, ProductProperty $productProperty)\n {\n $this->authorize('productProperties');\n $validator = $this->validateStore($request);\n if ($validator->fails()) {\n return redirect(route('admin.productProperties.edit', [$product, $productProperty]))->withErrors($validator, 'failed')->withInput();\n }\n if ($productProperty->type == 'selectable') {\n $flagIsNull = false;\n $productValues = $productProperty->ProductValues()->get();\n foreach ($productValues as $productValue) {\n if ($request->input('answer_' . $productValue->id) == null) {\n $flagIsNull = true;\n break;\n }\n }\n if ($request->answer)\n foreach ($request->answer as $key => $value) {\n if ($value == null) {\n $flagIsNull = true;\n break;\n }\n }\n if ($flagIsNull == true) {\n return redirect(route('admin.productProperties.edit', [$product, $productProperty]))->withErrors(['پر کردن تمامی فیلد ها برای پاسخ های مشخصه الزامی است '], 'failed')->withInput();\n } else {\n $productProperty->name = $request->name;\n $productProperty->description = $request->description;\n if ($request->dependency != 0) {\n if (ProductValue::find($request->dependency)->property_id == $productProperty->id)\n return redirect(route('admin.productProperties.edit', [$product, $productProperty]))->withErrors(['وابسته سازی به پاسخ های مشخصه این مشخصه امکان پذیر نیست'], 'failed')->withInput();\n $productProperty->value_id = $request->dependency;\n }\n $productProperty->update();\n if ($request->answer)\n foreach ($request->answer as $value) {\n $productValue = new ProductValue();\n $productValue->name = $value;\n $productValue->property_id = $productProperty->id;\n $productValue->save();\n }\n foreach ($productValues as $item) {\n $item->name = $request->input('answer_' . $item->id);\n $item->update();\n }\n $productAnswers = $productProperty->ProductValues()->get();\n if ($request->picture)\n foreach ($request->picture as $key => $picture) {\n if ($picture) {\n $productAnswers[$key]->picture = $this->uploadFile($picture, $this->productPropertiesPicturePath());\n $productAnswers[$key]->update();\n }\n }\n return redirect(route('admin.productProperties.index', [$product]))->withErrors(['عملیات با موفقیت انجام شد'], 'success');\n }\n }\n $productProperty->name = $request->name;\n $productProperty->description = $request->description;\n $productProperty->update();\n return redirect(route('admin.productProperties.index', [$product]))->withErrors(['عملیات با موفقیت انجام شد'], 'success');\n }", "title": "" }, { "docid": "90d206672f387e91f00e3bf3442ba11d", "score": "0.54372233", "text": "public function saveNewProduct($product, $array)\r\n {\r\n// $this->logMessage(\"New\");\r\n $_product = Mage::getModel('catalog/product')->load(Mage::getModel('catalog/product')->getResource()->getIdBySku((string)$product->Pip_code));\r\n if($_product->getId()) {\r\n $this->modifyProduct($product,$array);\r\n } else {\r\n try {\r\n $this->newCount++;\r\n $this->totalCount++;\r\n $attributeSetName = \"Prescription Product\"; // get attribute set by name, not ID.\r\n $entityTypeId = Mage::getModel('eav/entity')\r\n ->setType('catalog_product')\r\n ->getTypeId();\r\n $attributeSetId = Mage::getModel('eav/entity_attribute_set')\r\n ->getCollection()\r\n ->setEntityTypeFilter($entityTypeId)\r\n ->addFieldToFilter('attribute_set_name', $attributeSetName)\r\n ->getFirstItem()\r\n ->getAttributeSetId();\r\n // create the product\r\n $_product = Mage::getModel('catalog/product');\r\n $_product->setWeight(1.0000)\r\n ->setStatus(1)//product status (1 - enabled, 2 - disabled)\r\n ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)//catalog and search visibility\r\n ->setWebsiteIds(array(1))//website ID the product is assigned to, as an array\r\n ->setStoreId(1)\r\n ->setAttributeSetId($attributeSetId)//ID of a attribute set named 'Prescription Product'\r\n ->setTypeId('simple')//product type\r\n ->setCreatedAt(strtotime('now'))//product creation time\r\n ->setSku((string)$product->Pip_code); //SKU\r\n // $this->logMessage(print_r('hi', true));\r\n $_product = $this->setDataProduct($product, $array,$_product, true);\r\n // $this->logMessage(print_r('ho', true));\r\n try {\r\n $_product->getResource()->save($_product);\r\n $_product->save($_product);\r\n // $_product->save();\r\n // $this->logMessage(print_r('away', true));\r\n } catch (Exception $e) {\r\n// $this->logMessage(\"Saving New product 1\");\r\n $this->logMessage($e->getMessage());\r\n var_dump($e->getMessage());\r\n }\r\n } catch (Exception $e) {\r\n// $this->logMessage(\"Saving New product 2\");\r\n $this->logMessage($e->getMessage());\r\n Mage::log($e->getMessage());\r\n var_dump($e->getMessage());\r\n }\r\n }\r\n }", "title": "" }, { "docid": "9fd405d6771d9e44e6bea958c12033c7", "score": "0.54320985", "text": "function editProduct($ord_prod_id){\r\n \t$orderp=new Order_product($ord_prod_id);\r\n \t$order=new Order($orderp->order_id);\r\n \t\r\n \t$order->product->include_join_fields()->get();\r\n \tforeach($order->product as $p){\r\n \t\t$size = new Size($p->join_size_id);\r\n \t\t$p->size_name=$size->name;\r\n \t}\r\n \t$this->load->vars(array('order'=>$order,'orderp'=>$orderp));\r\n \t$this->load->view('admin/edit_products');\r\n \t\r\n }", "title": "" }, { "docid": "4c68da90958074330b13dbbeb4b47b73", "score": "0.5426742", "text": "public function actionUpdate($id)\n {\n if(Yii::$app->user->can('r-proveedor')){ \n $model = $this->findModel($id);\n\n if($model->estado_producto_id == '4' or $model->estado_producto_id == '5'){\n return $this->render('//site/error', [\n 'name' => 'Permiso Denegado',\n 'message' => 'Este producto se encuentra inactivado. Por favor, solicite su activación.',\n ]);\n }\n if(self::validateProvProducto($id)){\n return $this->render('//site/error', [\n 'name' => 'Permiso Denegado',\n 'message' => 'Acceso denegado. No puede modificar este producto.',\n ]);\n }\n\n\n $imagenPrincipal = $model->imagenPrincipalProductos;\n $imagenesSegundarias = $model->imagenProductoSecundarias;\n if ($model->load(Yii::$app->request->post())) {\n\n if (!$model->save()) {\n print_r($model->getErrors());\n die();\n }\n $model->asociarTallas(Yii::$app->request->post()['Producto']['producto_tallas']);\n if ($model->cantidad_stock > 0 && $model->estado_producto_id != 3) {\n $model->estado_producto_id = 1;\n } elseif ($model->estado_producto_id != 3) {\n $model->estado_producto_id = 2;\n }\n $model->save();\n /**\n * Asocia los tags o palabras claves\n */\n $model->asociarTags(Yii::$app->request->post()['Producto']['tags']);\n /**\n * Asocia las categorias\n */\n $model->asociarSubcategorias(Yii::$app->request->post()['Producto']['subcategorias']);\n\n if (!empty($_FILES)) {\n /**\n * Almaceno la imagen principal\n */\n $archivo = UploadedFile::getInstance($model, 'imagen_principal');\n if (!empty($archivo)) {\n $imagenPrincipalActual = ImagenPrincipalProducto::find()->where(['producto_id' => $model->id])->one();\n unlink($imagenPrincipalActual->ruta_archivo);\n $imagenPrincipalActual->delete();\n $model->almacenarImagenPrincipal();\n }\n /**\n * Se realiza primero la carga de los archivos hacia el atributo\n * del modelo y luego en el modelo se realiza el guardado y la\n * creación de los objetos que tienen la información de cada \n * imagen\n */\n $model->imagenes_segundarias = UploadedFile::getInstances($model, 'imagenes_segundarias');\n $model->almacenarImagenesSegundarias();\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n 'imagenPrincipal' => $imagenPrincipal,\n 'imagenesSegundarias' => $imagenesSegundarias,\n ]);\n }else{\n return $this->render('//site/error', [\n 'name' => 'Permiso Denegado',\n 'message' => 'No tiene los permisos suficientes para ingresar a esta página',\n ]);\n }\n }", "title": "" }, { "docid": "7a820e57f7bd9728c7e78d01efa00635", "score": "0.5417457", "text": "protected function doSave(PropelPDO $con)\n {\n $affectedRows = 0; // initialize var to track total num of affected rows\n if (!$this->alreadyInSave) {\n $this->alreadyInSave = true;\n\n // We call the save method on the following object(s) if they\n // were passed to this object by their corresponding set\n // method. This object relates to these object(s) by a\n // foreign key reference.\n\n if ($this->aProducto !== null) {\n if ($this->aProducto->isModified() || $this->aProducto->isNew()) {\n $affectedRows += $this->aProducto->save($con);\n }\n $this->setProducto($this->aProducto);\n }\n\n if ($this->aProductocolor !== null) {\n if ($this->aProductocolor->isModified() || $this->aProductocolor->isNew()) {\n $affectedRows += $this->aProductocolor->save($con);\n }\n $this->setProductocolor($this->aProductocolor);\n }\n\n if ($this->aProductomaterial !== null) {\n if ($this->aProductomaterial->isModified() || $this->aProductomaterial->isNew()) {\n $affectedRows += $this->aProductomaterial->save($con);\n }\n $this->setProductomaterial($this->aProductomaterial);\n }\n\n if ($this->isNew() || $this->isModified()) {\n // persist changes\n if ($this->isNew()) {\n $this->doInsert($con);\n } else {\n $this->doUpdate($con);\n }\n $affectedRows += 1;\n $this->resetModified();\n }\n\n if ($this->compradetallesScheduledForDeletion !== null) {\n if (!$this->compradetallesScheduledForDeletion->isEmpty()) {\n CompradetalleQuery::create()\n ->filterByPrimaryKeys($this->compradetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->compradetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collCompradetalles !== null) {\n foreach ($this->collCompradetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->descuentodetallesScheduledForDeletion !== null) {\n if (!$this->descuentodetallesScheduledForDeletion->isEmpty()) {\n DescuentodetalleQuery::create()\n ->filterByPrimaryKeys($this->descuentodetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->descuentodetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collDescuentodetalles !== null) {\n foreach ($this->collDescuentodetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->devoluciondetallesScheduledForDeletion !== null) {\n if (!$this->devoluciondetallesScheduledForDeletion->isEmpty()) {\n DevoluciondetalleQuery::create()\n ->filterByPrimaryKeys($this->devoluciondetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->devoluciondetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collDevoluciondetalles !== null) {\n foreach ($this->collDevoluciondetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->pedidosScheduledForDeletion !== null) {\n if (!$this->pedidosScheduledForDeletion->isEmpty()) {\n PedidoQuery::create()\n ->filterByPrimaryKeys($this->pedidosScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->pedidosScheduledForDeletion = null;\n }\n }\n\n if ($this->collPedidos !== null) {\n foreach ($this->collPedidos as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->pedidomayoristadetallesScheduledForDeletion !== null) {\n if (!$this->pedidomayoristadetallesScheduledForDeletion->isEmpty()) {\n PedidomayoristadetalleQuery::create()\n ->filterByPrimaryKeys($this->pedidomayoristadetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->pedidomayoristadetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collPedidomayoristadetalles !== null) {\n foreach ($this->collPedidomayoristadetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->productosucursalsScheduledForDeletion !== null) {\n if (!$this->productosucursalsScheduledForDeletion->isEmpty()) {\n ProductosucursalQuery::create()\n ->filterByPrimaryKeys($this->productosucursalsScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->productosucursalsScheduledForDeletion = null;\n }\n }\n\n if ($this->collProductosucursals !== null) {\n foreach ($this->collProductosucursals as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->promociondetallesScheduledForDeletion !== null) {\n if (!$this->promociondetallesScheduledForDeletion->isEmpty()) {\n PromociondetalleQuery::create()\n ->filterByPrimaryKeys($this->promociondetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->promociondetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collPromociondetalles !== null) {\n foreach ($this->collPromociondetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->transferenciadetallesScheduledForDeletion !== null) {\n if (!$this->transferenciadetallesScheduledForDeletion->isEmpty()) {\n TransferenciadetalleQuery::create()\n ->filterByPrimaryKeys($this->transferenciadetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->transferenciadetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collTransferenciadetalles !== null) {\n foreach ($this->collTransferenciadetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n if ($this->ventadetallesScheduledForDeletion !== null) {\n if (!$this->ventadetallesScheduledForDeletion->isEmpty()) {\n VentadetalleQuery::create()\n ->filterByPrimaryKeys($this->ventadetallesScheduledForDeletion->getPrimaryKeys(false))\n ->delete($con);\n $this->ventadetallesScheduledForDeletion = null;\n }\n }\n\n if ($this->collVentadetalles !== null) {\n foreach ($this->collVentadetalles as $referrerFK) {\n if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {\n $affectedRows += $referrerFK->save($con);\n }\n }\n }\n\n $this->alreadyInSave = false;\n\n }\n\n return $affectedRows;\n }", "title": "" }, { "docid": "11779636d0ec5aa5e43f4c6a3a84f58e", "score": "0.5400845", "text": "protected function updateSummaryProductInformation($product){\n\t\t//Get product object\n\t\t$currProd = new Product($product['id_product'], true, $this->context->language->id, $this->context->shop->id);\n\t\t$currProdFeatures = $currProd->getFrontFeatures($this->context->language->id);\n\t\tforeach ($currProdFeatures as $key => $features) {\n\t\t\tif ($features['id_feature'] == 3) { // if feature = label (3 = id feature label)\n\t\t\t\t$product['label'] = $features['value'];\n\t\t\t}\n\t\t}\n\n\t\t//get current combination infos\n\t\t$found = false;\n\t\tforeach($currProd->combinations as $comb){\n\t\t\t//find current combination\n\t\t\tif ($comb['id_product_attribute'] == $product['id_product_attribute']){\n\t\t\t\t$found = true;\n\t\t\t\t//Setting isPromo\n\t\t\t\t$product['isPro'] = $comb['isPro'];\n\t\t\t\t//Setting isPro\n\t\t\t\t$product['isPromo'] = $comb['isPromo'];\n\t\t\t\t//Setting label\n\t\t\t\t$product['label_name'] = $comb['label_name'];\n\t\t\t\t//Setting colis name (used for colis)\n\t\t\t\t$product['colis_name'] = $comb['colis_name'];\n\t\t\t\t//Setting available quantity\n\t\t\t\t$product['available_quantity'] = StockAvailable::getQuantityAvailableByProduct((int)$product['id_product'], $comb['id_product_attribute']);\n\t\t\t\tif ($product['available_quantity'] < 0)\n\t\t\t\t\t$product['available_quantity'] = 10000;//valeur arbritraire pour le front end. quantity < 0 => infinite\n\t\t\t}\n\t\t}\n\t\t//set default display value, so that the customer will now that the product is not from his cart version\n\t\tif ($found == false){\n\t\t\t$product['isPro'] = false;\n\t\t\t$product['isPromo'] = false;\n\t\t\t$product['label_name'] = \"selection\";\n\t\t\t$product['colis_name'] = \"\";\n\t\t\t$product['available_quantity'] = 10000;\n\t\t\t$product['description_short'] = \"Attention ce produit ne fait partie de votre version de carte. Veuillez nous contactez.\";\n\t\t}\n\t\treturn $product;\n\t}", "title": "" }, { "docid": "9e4751692b674f274ff07399d8652735", "score": "0.5399933", "text": "static public function ctrEditarProducto()\n\t{\n\t\t// $usu = $_POST['nuevaDescripcion'];\n\t\t// echo \"<script>console.log( 'Debug Objects: \" . $usu . \"' );</script>\";\n\n\n\t\t// hacemos el filtro cuando llegan por post\n\n\t\t// Devuelve true si la variable existe y tiene un valor distinto de null, false de lo contrario.\n\t\t// if(isset($_POST['nuevoCodigo']) && !empty($_POST['nuevoCodigo']))\n\t\tif(isset($_POST['editarDescripcion']))\n\t\t{\n\n\t\t\t// $descrip = $_POST['editarDescripcion'];\n\t\t\t// echo \"<script>console.log( 'Debug Objects: \" . $descrip . \"' );</script>\";\n\t\t\t// echo \"<script>alert( 'Debug Objects: \" . $descrip . \"' );</script>\";\n\t\t\t\n\t\t\t//vamos a permitir caracteres especiales con tilde,espacio en blanco y numericos con expresion regular\n\t\t\tif(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓü ]+$/', $_POST['editarDescripcion']) &&\n\t\t\tpreg_match('/^[a-zA-Z0-9]+$/', $_POST['editarStock']) &&\n\t\t\tpreg_match('/^[a-zA-Z0-9.]+$/', $_POST['editarPrecioCompra']) &&\n\t\t\tpreg_match('/^[a-zA-Z0-9.]+$/', $_POST['editarPrecioVenta']))\n\t\t\t{\n\t\t\t\t\n\t\t\t\n\t\t\t\t// $usu = $_POST['editarDescripcion'];\n\t\t\t\t// echo \"<script>alert( 'Debug Objects: \" . $usu . \"' );</script>\";\n\t\t\t\t// echo \"<script>console.log( 'Debug Objects: \" . $usu . \"' );</script>\";\n\n\n\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tVALIDAR IMAGEN\n\t\t\t\t=============================================*/\n\n\n\t\t\t\t$ruta = \"vistas/img/productos/default/anonymous.png\";\n\n\t\t\t\t// si existe el archivo temporal del archivo file y es diferente a vacio\n\t\t\t\tif(isset($_FILES['editarImagen']['tmp_name']) && !empty($_FILES['editarImagen']['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\t// vamos a recortar la imagen 500 x 500 px\n\n\t\t\t\t\t// list — Asignar variables como si fueran un array\n\t\t\t\t\t// getimagesize — Obtener el tamaño de una imagen\n\t\t\t\t\t//en list() toma el indice 0 de [nuevaFoto][tmp_name](los indice del archivo temporal son medidas de la imagen) y asigna a $ancho y el indice 1 asigna a $alto \n\t\t\t\t\tlist($ancho, $alto) = getimagesize($_FILES['editarImagen']['tmp_name']);\n\n\t\t\t\t\t// redimensionamos\n\t\t\t\t\t$nuevoAncho = 500;\n\t\t\t\t\t$nuevoAlto = 500;\n\n\t\t\t\t\t// creamos la ruta donde se va a guardar la imagen\n\t\t\t\t\t$directorio = 'vistas/img/productos/'.$_POST['editarImagen'];\n\n\n\t\t\t\t\t/*======================================================================================\n\t\t\t\t\t\tPRIMERO PREGUNTAMOS SI EXISTE LA IMAGEN EN LA BD DIFERENTE A LA IMAGEN POR DEFECTO\n\t\t\t\t\t========================================================================================*/\n\n\t\t\t\t\t// hacemos esta condicion para que no nos borre la imagen por defecto \n\t\t\t\t\t// si contiene ruta de foto y es diferente a la imagen por defecto\n\t\t\t\t\tif(isset($_POST['imagenActual']) && $_POST[\"imagenActual\"] != \"vistas/img/productos/default/anonymous.png\")\n\t\t\t\t\t{\n\t\t\t\t\t\tunlink($_POST['imagenActual']);\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// vamos a crear el directorio\n\t\t\t\t\t\tmkdir($directorio, 0755);\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t/*====================================================================\n\t\t\t\t\tDEACUERDO AL TIPO DE IMAGEN APLICAMOS LAS FUNCIONES POR DEFECTO DE PHP \n\t\t\t\t\t======================================================================*/\n\n\t\t\t\t\tif($_FILES['editarImagen']['type'] == \"image/jpeg\")\n\t\t\t\t\t{\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tGUARDAR LA IMAGEN EN EL DIRECTORIO\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t// le damos nombre a la imagen , y puede ser un nro aleaterio del 100 al 999\n\t\t\t\t\t\t$ruta = \"vistas/img/productos/\".$_POST['editarCodigo'].\"/\".$aleatorio.\".jpg\";\n\n\t\t\t\t\t\t// imagecreatefromjpeg — Crea una nueva imagen a partir de un fichero o de una URL\n\t\t\t\t\t\t// imagecreatefromjpeg() devuelve un identificador de imagen que representa la imagen obtenida desde el nombre de fichero dado.\n\t\t\t\t\t\t$origen = imagecreatefromjpeg($_FILES['editarImagen']['tmp_name']);\n\n\t\t\t\t\t\t// imagecreatetruecolor — Crear una nueva imagen de color verdadero\n\t\t\t\t\t\t// imagecreatetruecolor() devuelve un identificador de imagen que representa una imagen en negro del tamaño especificado.\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\n\t\t\t\t\t\t// imagecopyresized — Copia y cambia el tamaño de parte de una imagen\n\t\t\t\t\t\t// imagecopyresized() copia una porción de una imagen a otra imagen. dst_image es la imagen de destino, src_image es el identificador de la imagen de origen.\n\t\t\t\t\t\t// imagecopyresized(resource $dst_image(destino) , resource $src_image(origen) , int $dst_x(eje x izq) , int $dst_y(eje y up) , int $src_x(desde donde el corte) , int $src_y(dese el eje y) , int $dst_w(ancho de corte) , int $dst_h(alto de corte) , int $src_w(ancho de original) , int $src_h(alto original) )\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\t\t\t\t// imagejpeg — Exportar la imagen al navegador o a un fichero\n\t\t\t\t\t\t// imagejpeg() crea un archivo JPEG desde image.\n\t\t\t\t\t\t// $destino es donde quedo la foto recortada\n\t\t\t\t\t\t//$ruta donde vmos a guardar la foto \n\t\t\t\t\t\timagejpeg($destino, $ruta);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($_FILES['editarImagen']['type'] == \"image/png\")\n\t\t\t\t\t{\n\t\t\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tGUARDAR LA IMAGEN EN EL DIRECTORIO\n\t\t\t\t\t\t=============================================*/\n\n\t\t\t\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t\t\t\t// le damos nombre a la imagen , y puede ser un nro aleaterio del 100 al 999\n\t\t\t\t\t\t$ruta = \"vistas/img/productos/\".$_POST['editarCodigo'].\"/\".$aleatorio.\".png\";\n\n\t\t\t\t\t\t// imagecreatefromjpeg — Crea una nueva imagen a partir de un fichero o de una URL\n\t\t\t\t\t\t// imagecreatefromjpeg() devuelve un identificador de imagen que representa la imagen obtenida desde el nombre de fichero dado.\n\t\t\t\t\t\t$origen = imagecreatefrompng($_FILES['editarImagen']['tmp_name']);\n\n\t\t\t\t\t\t// imagecreatetruecolor — Crear una nueva imagen de color verdadero\n\t\t\t\t\t\t// imagecreatetruecolor() devuelve un identificador de imagen que representa una imagen en negro del tamaño especificado.\n\t\t\t\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\n\t\t\t\t\t\t// imagecopyresized — Copia y cambia el tamaño de parte de una imagen\n\t\t\t\t\t\t// imagecopyresized() copia una porción de una imagen a otra imagen. dst_image es la imagen de destino, src_image es el identificador de la imagen de origen.\n\t\t\t\t\t\t// imagecopyresized(resource $dst_image(destino) , resource $src_image(origen) , int $dst_x(eje x izq) , int $dst_y(eje y up) , int $src_x(desde donde el corte) , int $src_y(dese el eje y) , int $dst_w(ancho de corte) , int $dst_h(alto de corte) , int $src_w(ancho de original) , int $src_h(alto original) )\n\t\t\t\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\t\t\t\t// imagejpeg — Exportar la imagen al navegador o a un fichero\n\t\t\t\t\t\t// imagejpeg() crea un archivo JPEG desde image.\n\t\t\t\t\t\t// $destino es donde quedo la foto recortada\n\t\t\t\t\t\t//$ruta donde vmos a guardar la foto \n\t\t\t\t\t\timagepng($destino, $ruta);\n\t\t\t\t\t}\n\n\t\t\t\t\t// var_dump($_FILES['nuevaFoto']['tmp_name']);\n\t\t\t\t\t// var_dump(getimagesize($_FILES['nuevaFoto']['tmp_name']));\n\n\t\t\t\t}\n\n\t\t\t\t$tabla = \"productos\";\n\n\t\t\t\t$datos = array\n\t\t\t\t(\n\t\t\t\t\t\"id_categoria\"=> $_POST['editarCategoria'],\n\t\t\t\t\t\"codigo\"=> $_POST['editarCodigo'],\n\t\t\t\t\t\"descripcion\"=> $_POST['editarDescripcion'],\t\n\t\t\t\t\t\"stock\"=> $_POST['editarStock'],\t\n\t\t\t\t\t\"precio_compra\"=> $_POST['editarPrecioCompra'],\n\t\t\t\t\t\"precio_venta\"=> $_POST['editarPrecioVenta'],\n\t\t\t\t\t\"imagen\"=> $ruta\t\n\t\t\t\t);\n\n\t\t\t\t\n\t\t\t\t$usu = \"categoria: \".$_POST['editarCategoria'];\n\t\t\t\t$usu .=\", codigo: \". $_POST['editarCodigo'];\n\t\t\t\t$usu .=\", descripcion: \". $_POST['editarDescripcion'];\n\t\t\t\t$usu .=\", stock: \". $_POST['editarStock'];\n\t\t\t\t$usu .=\", compra: \". $_POST['editarPrecioCompra'];\n\t\t\t\t$usu .= \", venta: \".$_POST['editarPrecioVenta'];\n\t\t\t\t$usu .= \", imagen: \".$datos['imagen'];\n\n\n\t\t\t\techo \"<script>alert( 'Debug Objects: \" . $usu . \"' );</script>\";\n\n\t\t\t\t$respuesta = ModeloProductos::mdlEditarProducto($tabla, $datos);\n\n\n\t\t\t\t// var_dump($respuesta);\n\t\t\t\t// die();\n\n\t\t\t\techo \"<script>console.log( 'Debug Objects: \" . $respuesta . \"' );</script>\";\n\t\t\t\techo \"<script>console.log( typeof \" . $respuesta . \" );</script>\";\n\t\t\t\techo \"<script>alert( '\" . $respuesta . \"');</script>\";\n\n\t\t\t\tif($respuesta == \"ok\")\n\t\t\t\t{\n\t\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"El producto se edito correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twindow.location = \"productos\";\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</script>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"Ocurrio un error al editar\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t }).then((result)=>{\n\t\t\t\t\t\t if(result.value)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t window.location = \"productos\";\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</script>';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\tSwal.fire({\n\t\t\t\t\ttype: \"error\",\n\t\t\t\t\ttitle: \"El producto no puede ir vacio o lleva caracteres especiales\",\n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t }).then((result)=>{\n\t\t\t\t\t if(result.value)\n\t\t\t\t\t {\n\t\t\t\t\t\t window.location = \"productos\";\n\t\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c5ae10b5bdc90f4c19d11c690d353a8b", "score": "0.53946406", "text": "public function edit(){\n $sql = \"UPDATE productos SET categoria_id={$this->getCategoria_id()}, nombre='{$this->getNombre()}', descripcion='{$this->getDescripcion()}', precio={$this->getPrecio()}, stock={$this->getStock()}\";\n \n if ($this->getImagen() != null){\n $sql .= \", imagen='{$this->getImagen()}'\"; \n }\n \n $sql .= \" WHERE id_producto = {$this->id_producto} ;\";\n \n $save = $this->db->query($sql);\n \n $result = false;\n if ($save) {\n $result = true;\n }\n\n return $result;\n }", "title": "" }, { "docid": "b9b2175ecb497878968190adbaf6b3f6", "score": "0.5388764", "text": "public function setProduct() {\n $this->authentication();\n\n $this->loadXML(JFactory::getApplication()->input->get('xml', null, 'raw'));\n\n $this->schemaValidation($this->xsdLocalSetProductParameters, 1);\n\n // Open an SQL Transaction\n //$this->db->transactionStart();\n try {\n $this->db->transactionStart();\n } catch (Exception $exc) {\n $this->db->connect();\n $driver_begin_transaction = $this->db->name . '_begin_transaction';\n $driver_begin_transaction($this->db->getConnection());\n }\n $this->transaction = true;\n\n $this->product = $this->request->getElementsByTagNameNS(self::nsSdi, 'product')->item(0);\n\n // get the diffusion object\n $diffusion = $this->getDiffusionByGuid($this->product->getAttribute('guid'));\n\n // get the order object\n $order = $this->getOrderByGuid($this->product->getElementsByTagNameNS(self::nsSdi, 'order')->item(0)->nodeValue);\n\n // get the order_diffusion object\n $orderDiffusion = $this->getOrderDiffusion($order->id, $diffusion->id);\n\n // check if the current organism own the given product, if an organism account is used\n if ($this->userType == 'organism') {\n $this->checkOwnership($orderDiffusion->diffusion_id);\n }\n\n // check the state of the order_diffusion (should be equals to AWAIT to be updatable)\n if ($orderDiffusion->productstate_id != Easysdi_shopHelper::PRODUCTSTATE_AWAIT) {\n //throw a resource conflict exception\n $this->getException(409, 'The product you are trying to update has already been updated');\n }\n\n // try to get pricing data\n $po = Easysdi_shopHelper::getPricingOrder($order->id);\n // init other pricing var\n $pos = null;\n $posp = null;\n if ($po !== null) { // pricing order is defined, then load pricing order supplier and pricing order supplier product data\n $posp = Easysdi_shopHelper::getPricingOrderSupplierProduct($diffusion->id, $po->id);\n if ($posp == null) {\n $this->getException(500, 'Cannot load the requested pricing product');\n }\n $pos = Easysdi_shopHelper::getPricingOrderSupplier($posp->pricing_order_supplier_id);\n if ($pos == null) {\n $this->getException(500, 'Cannot load the requested pricing supplier');\n }\n }\n\n //all is fine\n $this->updateOrderDiffusion($orderDiffusion, $order, $po, $pos, $posp);\n\n //notify user if needed\n Easysdi_shopHelper::notifyCustomerOnOrderUpdate($order->id, true);\n\n // prepare response\n $this->setProductSucceeded($order, $diffusion);\n\n // schema validation\n $this->schemaValidation($this->xsdLocalSetProduct, 0);\n\n // Commit the SQL Transaction\n $this->db->transactionCommit();\n\n $this->sendResponse();\n }", "title": "" }, { "docid": "f73b8bf3cf3563b48c0356cf864e3407", "score": "0.53722894", "text": "public function updateProducto(){\n try{\n if($this->input->post('submit')){\n $producto = array();\n $producto['id'] = $this->input->post('id_pro');\n $producto['nombre'] = $this->input->post('producto');\n $producto['nombre_en'] = $this->input->post('producto_en');\n $producto['nombre_de'] = $this->input->post('producto_de');\n $producto['descripcion'] = $this->input->post('descripcion');\n $producto['descripcion_en'] = $this->input->post('descripcion_en');\n $producto['descripcion_de'] = $this->input->post('descripcion_de');\n $producto['precio'] = (float)$this->input->post('precio');\n $producto['fk_categorias'] = $this->input->post('categoria');\n $colores = array();\n $colores = $this->input->post('colores');\n $this->productos->updateProducto($producto, $colores);\n $this->session->set_flashdata('update_ok','Producto actualizado correctamente.');\n $this->load->view('productos/listar');\n redirect('productos/listar', 'refresh');\n }\n } catch (Exception $e){\n show_error('Se ha producido un error con la base de datos, disculpe las molestias');\n }\n }", "title": "" }, { "docid": "17dd499db03e6c67928a7e10ec9df90f", "score": "0.5362227", "text": "private function updateProduct()\n {\n $productData = $this->getRequest()->request->get('product');\n\n if (!is_array($productData)) {\n return false;\n }\n\n if (!array_key_exists('id', $productData) || !array_key_exists('amount', $productData)) {\n return false;\n }\n\n // Update or overwrite product\n $overwrite = false;\n if (array_key_exists('overwrite', $productData)) {\n $overwrite = $productData['overwrite'];\n }\n\n // Retrieve our product\n try {\n $product = $this->getProductRepository()->findOneByIdAndLocale($productData['id'], Locale::frontendLanguage());\n } catch (ProductNotFound $e) {\n return false;\n }\n\n // Get the form on which we are going to validate our stuff\n $this->form = $this->getForm($product);\n $this->form->handleRequest($this->getRequest());\n\n if (!$this->form->isSubmitted() || !$this->form->isValid()) {\n $fields = [];\n foreach ($this->form->getErrors(true) as $error) {\n $fields[$error->getOrigin()->getName()] = $error->getMessage();\n }\n\n $this->errors = [\n 'fields' => $fields,\n 'url' => $product->getUrl(),\n ];\n\n return false;\n }\n\n /**\n * @var AddToCartDataTransferObject $formData\n */\n $formData = $this->form->getData();\n\n $amount = (int)$formData->amount;\n\n // Disable amount below the minimal order quantity\n if ($amount <= $product->getOrderQuantity()) {\n $amount = $product->getOrderQuantity();\n }\n\n // Validate request\n if (!array_key_exists('quote', $productData) && $product->isFromStock() && $amount > $product->getStock()) {\n $this->errors = [\n 'fields' => [\n 'amount' => Language::err('GivenAmountNotInStock'),\n ],\n ];\n return false;\n }\n\n // Get the cart value if exists or create a new one\n $cartValueRepository = $this->getCartValueRepository();\n $cartValue = $cartValueRepository->getByCartAndProduct($this->cart, $product);\n\n // Set the values\n if ($overwrite) {\n $cartValue->setQuantity($amount);\n } else {\n $cartValue->setQuantity($cartValue->getQuantity() + $amount);\n }\n\n $cartValue->setTotal($cartValue->getQuantity() * $product->getActivePrice(false));\n\n // Add our product to the cart\n $this->cart->addValue($cartValue);\n\n // Add the product options to the cart\n $this->addProductOptionsToCart($product, $cartValue);\n\n // Handle the product upsell\n if (array_key_exists('up_sell', $productData)) {\n $this->upSellProducts($productData['up_sell']);\n }\n\n return $cartValue;\n }", "title": "" }, { "docid": "13b24b72f31be1caee94d9acb43fdb5a", "score": "0.53570396", "text": "public function editar_productos($id=NULL)\n {\n //Obtenemos el producto a editar\n if( !$data['productos'] = $this->{$this->model}->obtener_producto($id) )\n $this->alertas->info('producto/productos');\n\n //Obtenemos el proveedor\n if( !$data['proveedores'] = $this->{$this->model}->obtener_proveedores() )\n $this->alertas->info('producto/productos');\n\n //$data['productos']->ordencompra = $this->{$this->model}->obtener_ordencompra_productos($id);\n\n // Validaciones de Formulario\n $this->form_validation->set_rules(\n array(\n array(\n 'field' => 'input_descriprod',\n 'label' => 'Descripcion del producto',\n 'rules' => 'required',\n ),\n array(\n 'field' => 'input_precio',\n 'label' => 'Precio',\n 'rules' => 'required|numeric'\n ),\n array(\n 'field' => 'proveedores',\n 'label' => 'Proveedores',\n 'rules' => 'required|numeric'\n ),\n )\n );\n\n if( $this->form_validation->run() && $this->input->post() ){\n \n $data_update = array(\n 'descripcionproducto' \t=> $this->input->post('input_descriprod',TRUE),\n 'preciounitario' \t=> $this->input->post('input_precio',TRUE),\n 'idproveedor' => $this->input->post('proveedores',TRUE),\n );\n\n //$ordencompra = $this->input->post('input_ordencompra',TRUE);\n //$this->alertas->db($this->{$this->model}->actualizar_productosordencompra($productos->idproducto,$data_update, $ordencompra),'producto/productos');\n\n $this->alertas->db($this->{$this->model}->actualizar_producto($id,$data_update),'producto/productos');\n\n }\n\n //$data['ordencompra'] = $this->{$this->model}->listar_ordenescompras();\n\n $this->load->view($this->views.'editar_productos',$data);\n\n }", "title": "" }, { "docid": "8c6af2f6f3adcdaf926f184a63a74d7c", "score": "0.53411305", "text": "public function product_duplicate( $duplicate, $product ) { \r\n $product_fields = WPF_Field_Product_DS::instance()\r\n ->get_by_product_id( $product->get_id() );\r\n foreach ( $product_fields as $fp_item ) {\r\n $duplicated_fp = new WPF_Field_Product();\r\n $duplicated_fp->set_field_id( $fp_item['field_id'] );\r\n $duplicated_fp->set_product_id( $duplicate->get_id() );\r\n $duplicated_fp->set_variation_id( $fp_item['variation_id'] );\r\n $duplicated_fp->set_weight( $fp_item['weight'] );\r\n $duplicated_fp->set_is_active( $fp_item['is_active'] );\r\n $duplicated_fp->set_is_overridden_value( $fp_item['is_overridden_value'] );\r\n $duplicated_fp->set_value( $fp_item['value'] );\r\n $duplicated_fp->save();\r\n $duplicated_fp_id = $duplicated_fp->get_id();\r\n $pf_options = WPF_Field_Product_Option_DS::instance()\r\n ->get_by_field_product_id( $fp_item['id'] );\r\n foreach ( $pf_options as $fpo_item ) {\r\n $duplicated_fpo = new WPF_Field_Product_Option();\r\n $duplicated_fpo->set_field_product_id( $duplicated_fp_id );\r\n $duplicated_fpo->set_option_id( $fpo_item['option_id'] );\r\n $duplicated_fpo->set_is_active( $fpo_item['is_active'] );\r\n $duplicated_fpo->set_is_overridden_price( $fpo_item['is_overridden_price'] );\r\n $duplicated_fpo->set_price( $fpo_item['price'] );\r\n $duplicated_fpo->set_is_overridden_title( $fpo_item['is_overridden_title'] );\r\n $duplicated_fpo->set_title( $fpo_item['title'] ); \r\n $duplicated_fpo->save();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "502e258b4b4638a219a22d8f995a1a0a", "score": "0.53271824", "text": "public function update(Request $peticion, $cod_producto){\n $producto = Producto::Find($cod_producto);\n\n # Establecer propiedades leídas del formulario\n $producto->descripcion = $peticion->get('descripcion');\n $producto->stock = $peticion->get('stock');\n $producto->proveedor = $peticion->get('proveedor');\n $producto->fecha_ingreso = $peticion->get('fecha_ingreso');\n\n # Y guardar modelo ;)\n $producto->save();\n\n }", "title": "" }, { "docid": "197d9d9de3e459c9673a1060afe696e3", "score": "0.53069156", "text": "public function setProducto($oProductoAPI = null) {\n\t\ttry\n\t\t{\n\t\t\t$oProducto = new Producto();\n\t\t\t// PRIMERO revisamos que haya stock, si no, no hace falta seguir seteando el objecto\n\t\t\tif (isset($oProductoAPI->stock1)) {\n\t\t\t\t$oProducto->stocks[0] = $oProductoAPI->stock1;\n\t\t\t} elseif (isset($oProductoAPI->stock2)) {\n\t\t\t\t$oProducto->stocks[1] = $oProductoAPI->stock2;\n\t\t\t}\n\t\t\tif ($oProducto->stocks[0] < $oProducto->volumen) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$arrProductosFavoritos = [];\n\t\t\tisset($oProductoAPI->idProducto) AND !empty($oProductoAPI->idProducto) ? $oProducto->idProducto = $oProductoAPI->idProducto : null;\n\t\t\tisset($oProductoAPI->titulo) AND !empty($oProductoAPI->titulo) ? $oProducto->titulo = $oProductoAPI->titulo : null;\n\t\t\tisset($oProductoAPI->descripcion) AND !empty($oProductoAPI->descripcion) ? $oProducto->descripcion = $oProductoAPI->descripcion : null;\n\t\t\tisset($oProductoAPI->habilitado) AND !empty($oProductoAPI->habilitado) ? $oProducto->habilitado = $oProductoAPI->habilitado : null;\n\t\t\tisset($oProductoAPI->ranking) AND !empty($oProductoAPI->ranking) ? $oProducto->ranking = $oProductoAPI->ranking : null;\n\t\t\tisset($oProductoAPI->destacado) AND !empty($oProductoAPI->destacado) ? $oProducto->destacado = $oProductoAPI->destacado : null;\n\t\t\tisset($oProductoAPI->descuento) AND !empty($oProductoAPI->descuento) ? $oProducto->descuento = $oProductoAPI->descuento : null;\n\t\t\tisset($oProductoAPI->orden) AND !empty($oProductoAPI->orden) ? $oProducto->orden = $oProductoAPI->orden : null;\n\t\t\tisset($oProductoAPI->etiquetas) AND !empty($oProductoAPI->etiquetas) ? $oProducto->etiquetas = $oProductoAPI->etiquetas : null;\n\t\t\tisset($oProductoAPI->especificacion) AND !empty($oProductoAPI->especificacion) ? $oProducto->especificacion = $oProductoAPI->especificacion : null;\n\t\t\tisset($oProductoAPI->detalle) AND !empty($oProductoAPI->detalle) ? $oProducto->detalle = $oProductoAPI->detalle : null;\n\t\t\tisset($oProductoAPI->direccion) AND !empty($oProductoAPI->direccion) ? $oProducto->direccion = $oProductoAPI->direccion : null;\n\t\t\tisset($oProductoAPI->localidad) AND !empty($oProductoAPI->localidad) ? $oProducto->localidad = $oProductoAPI->localidad : null;\n\t\t\tisset($oProductoAPI->telefono) AND !empty($oProductoAPI->telefono) ? $oProducto->telefono = $oProductoAPI->telefono : null;\n\t\t\tisset($oProductoAPI->email) AND !empty($oProductoAPI->email) ? $oProducto->email = $oProductoAPI->email : null;\n\t\t\tisset($oProductoAPI->peso) AND !empty($oProductoAPI->peso) ? $oProducto->peso = $oProductoAPI->peso : null;\n\t\t\tisset($oProductoAPI->codigoInterno) AND !empty($oProductoAPI->codigoInterno) ? $oProducto->codigoInterno = $oProductoAPI->codigoInterno : null;\n\t\t\tisset($oProductoAPI->distincion) AND !empty($oProductoAPI->distincion) ? $oProducto->distincion = $oProductoAPI->distincion : null;\n\t\t\tisset($oProductoAPI->fechaAlta) AND !empty($oProductoAPI->fechaAlta) ? $oProducto->fechaAlta = new Carbon($oProductoAPI->fechaAlta) : new Carbon();\n\t\t\tisset($oProductoAPI->puntos) AND !empty($oProductoAPI->puntos) ? $oProducto->puntos = $oProductoAPI->puntos : null;\n\t\t\tisset($oProductoAPI->combo) AND !empty($oProductoAPI->combo) ? $oProducto->combo = $oProductoAPI->combo : null;\n\t\t\tisset($oProductoAPI->marca) AND !empty($oProductoAPI->marca) ? $oProducto->marca = $oProductoAPI->marca : null;\n\t\t\tisset($oProductoAPI->datosInternos) AND !empty($oProductoAPI->datosInternos) ? $oProducto->datosInternos = $oProductoAPI->datosInternos : null;\n\t\t\tisset($oProductoAPI->servicio) AND !empty($oProductoAPI->servicio) ? $oProducto->servicio = $oProductoAPI->servicio : null;\n\t\t\tisset($oProductoAPI->estadoProducto) AND !empty($oProductoAPI->estadoProducto) ? $oProducto->estadoProducto = $oProductoAPI->estadoProducto : null;\n\t\t\tisset($oProductoAPI->volumen) AND !empty($oProductoAPI->volumen) ? $oProducto->volumen = $oProductoAPI->volumen : 0;\n\n\t\t\t// Video\n\t\t\tif (isset($oProductoAPI->video)) {\n\t\t\t\t$vVideosAPI = explode(',', $oProductoAPI->video);\n\t\t\t\tforeach ($vVideosAPI as $oVideoAPI) {\n\t\t\t\t\t$oProducto->videos[] = new Video(trim($oVideoAPI));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Precios\n\t\t\tisset($oProductoAPI->precio) ? $oProducto->precios[] = $oProductoAPI->precio : null;\n\t\t\tisset($oProductoAPI->precio2) ? $oProducto->precios[] = $oProductoAPI->precio2 : null;\n\t\t\tisset($oProductoAPI->precio3) ? $oProducto->precios[] = $oProductoAPI->precio3 : null;\n\t\t\t$oProducto->precioDeLista = $oProducto->precios[0] ?: $oProducto->precios[1] ?: $oProducto->precios[2] ?: NULL;\n\t\t\t// Dropbox\n\t\t\tisset($oProductoAPI->dropBox1) AND !empty($oProductoAPI->dropBox1) ? $oProducto->dropbox[] = $oProductoAPI->dropBox1 : null;\n\t\t\tisset($oProductoAPI->dropBox2) AND !empty($oProductoAPI->dropBox2) ? $oProducto->dropbox[] = $oProductoAPI->dropBox2 : null;\n\t\t\tisset($oProductoAPI->dropBox3) AND !empty($oProductoAPI->dropBox3) ? $oProducto->dropbox[] = $oProductoAPI->dropBox3 : null;\n\t\t\t// Categorias\n\t\t\tif (!isset($oProductoAPI->categoria)) {\n\t\t\t\t$oProducto->categoria = NULL;\n\t\t\t\t$oProducto->jerarquiaCategorias = [0, 0, 0];\n\t\t\t} else {\n\t\t\t\t$oProducto->categoria = new Categoria($oProductoAPI->categoria);\n\t\t\t\t$cat = &$oProducto->categoria;\n\t\t\t\t$oProducto->jerarquiaCategorias =\n\t\t\t\t\t[\n\t\t\t\t\tisset($cat->idCategoria) ? $cat->idCategoria : 0,\n\t\t\t\t\tisset($cat->madre->idCategoria) ? $cat->madre->idCategoria : 0,\n\t\t\t\t\tisset($cat->madre->madre->idCategoria) ? $cat->madre->madre->idCategoria : 0,\n\t\t\t\t];\n\t\t\t\tunset($cat);\n\t\t\t}\n\t\t\t// Imagenes\n\t\t\tif (isset($oProductoAPI->imagenesProducto)) {\n\t\t\t\tforeach ($oProductoAPI->imagenesProducto as $oImagenAPI) {\n\t\t\t\t\t$oProducto->imagenes[] =\n\t\t\t\t\tnew Imagen($oImagenAPI->imagen->idImagen, $oImagenAPI->imagen->pieImagen, $oImagenAPI->path\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$IMG_idImagen = 0;\n\t\t\t\t$IMG_nombre = 'producto';\n\t\t\t\t$IMG_path = '/images/default/producto.jpg';\n\t\t\t\t$IMG_orden = 0;\n\t\t\t\t$IMG_default = true;\n\t\t\t\t$oProducto->imagenes[] =\n\t\t\t\tnew Imagen($IMG_idImagen, $IMG_nombre, $IMG_path, $IMG_orden, $IMG_default\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Archivos\n\t\t\tif (isset($oProductoAPI->archivosProducto)) {\n\t\t\t\tforeach ($oProductoAPI->archivosProducto as $oArchivoAPI) {\n\t\t\t\t\t$oProducto->archivos[] = new Archivo($oArchivoAPI);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Etiquetas por producto\n\t\t\tif (isset($oProductoAPI->etiquetasxProducto)) {\n\t\t\t\tforeach ($oProductoAPI->etiquetasxProducto as $index => $oEtiquetaxProductoAPI) {\n\t\t\t\t\t$oProducto->etiquetasxProducto[] = $oEtiquetaxProductoAPI;\n\t\t\t\t}\n\t\t\t\t// if ($oEtiquetaxProductoAPI->id == $idCategoriaEtiquetasPromocion) {\n\t\t\t\t// \t$oProducto->indexEtiquetasPromocion = $index;\n\t\t\t\t// }\n\n\t\t\t}\n\t\t\t// Favorito\n\t\t\t// $favoritosArr = is_null(session('productosFavoritos')) OR empty(session('productosFavoritos')) ? [] : session('productosFavoritos');\n\t\t\t// if (in_array($oProducto->idProducto, $favoritosArr)) {\n\t\t\t// \t$oProducto->esFavorito = true;\n\t\t\t// }\n\n\t\t\tunset($oProductoAPI);\n\n\t\t\treturn $oProducto;\n\t\t} catch (Exception $e) {\n\t\t\t//Sawubona::writeLog($e);\n\t\t}\n\t}", "title": "" }, { "docid": "e3cbf476695ecff0ca34d3d6075de3af", "score": "0.5295658", "text": "public function save()\n {\n // datos obligatorios para la insercion/modificacion\n $data = [\"idProducto\" => $this->idProduct];\n\n // datos opcionales, que pueden no estar establecidos para la \n // insercion/modificacion\n if (isset($this->minBid)) $data[\"pujaMinima\"] = $this->minBid;\n if (isset($this->limitDate)) $data[\"fechaLimite\"] = $this->limitDate;\n\n // si idBidding no es null, entonces es un update\n // TODO: no se dara el caso, las subastas no son modificables una vez \n // creadas, eliminar esta parte\n if (isset($this->idBidding))\n return $this->dao->update($data, [\"idSubasta\" => $this->idBidding]);\n\n // sino, es un insert\n return $this->dao->insert($data);\n }", "title": "" }, { "docid": "d529361e6f22184c6b91eed0f4273804", "score": "0.5292824", "text": "public function store(Request $request, Product $product)\n {\n $this->authorize('productProperties');\n $validator = $this->validateStore($request);\n if ($validator->fails()) {\n return redirect(route('admin.productProperties.create', [$product]))->withErrors($validator, 'failed')->withInput();\n }\n if ($request->type == 2) {\n $flagIsNull = false;\n if ($request->answer) {\n foreach ($request->answer as $key => $value) {\n if ($value == null) {\n $flagIsNull = true;\n break;\n }\n }\n if ($flagIsNull == true) {\n return redirect(route('admin.productProperties.create', [$product]))->withErrors('پر کردن تمامی فیلد ها برای پاسخ های مشخصه الزامی است ', 'failed')->withInput();\n } else {\n $productProperties = new ProductProperty();\n $productProperties->name = $request->name;\n $productProperties->type = 'selectable';\n $productProperties->description = $request->description;\n $productProperties->product_id = $product->id;\n if ($request->dependency != 0)\n $productProperties->value_id = $request->dependency;\n $productProperties->save();\n foreach ($request->answer as $key => $value) {\n $productValues = new ProductValue();\n $productValues->name = $value;\n $productValues->property_id = $productProperties->id;\n $productValues->save();\n }\n $productAnswers = $productProperties->ProductValues()->get();\n if ($request->picture)\n foreach ($request->picture as $key => $picture) {\n if ($picture) {\n $productAnswers[$key]->picture = $this->uploadFile($picture, $this->productPropertiesPicturePath());\n $productAnswers[$key]->update();\n }\n }\n return redirect(route('admin.productProperties.index', [$product]))->withErrors('عملیات با موفقیت انجام شد', 'success');\n }\n } else {\n return redirect(route('admin.productProperties.create', [$product]))->withErrors(['پاسخ های مشخصه الزامی است'], 'failed')->withInput();\n }\n }\n $productProperty = new ProductProperty();\n $productProperty->name = $request->name;\n $productProperty->type = 'input';\n $productProperty->description = $request->description;\n $productProperty->product_id = $product->id;\n $productProperty->save();\n return redirect(route('admin.productProperties.index', [$product]))->withErrors(['عملیات با موفقیت انجام شد'], 'success');\n }", "title": "" }, { "docid": "f431ae914b42890b528abc80db1d4005", "score": "0.5287242", "text": "public function update(ProductsRequest $request, $id)\n {\n $buscar=Products::where('name',$request->name)->where('unity',$request->unity)->where('user_id',\\Auth::getUser()->id)->where('id','<>',$id)->first();\n if ($buscar !== null && count($buscar) > 0) {\n flash('<i class=\"icon-circle-check\"></i> Ya tiene un producto registrado con este nombre y unidad de medida!')->warning()->important();\n } else {\n $cont=0;\n $product= Products::find($id);\n\n if (count($request->provider_id) > 0) \n {\n foreach ($product->providers as $key => $provider) {\n for ($i=0; $i < count($request->provider_id); $i++) { \n if ($provider->pivot->provider_id==$request->provider_id[$i]) {\n $cont++;\n }\n }\n }\n\n if ($cont>0) {\n flash('<i class=\"icon-circle-check\"></i> Ha seleccionado uno o varios proveedores ya registrados!')->warning()->important();\n return redirect()->back();\n } else {\n $product= Products::find($id);\n \n $product->fill($request->except('user_id'))->save();\n\n foreach ($request->provider_id as $key => $provider) \n {\n $product->providers()->attach($provider, ['cost' => $request->cost[$key]]);\n }\n \n\n flash('<i class=\"icon-circle-check\"></i> Producto Actualizado con satisfactoriamente!')->success()->important();\n return redirect()->to('products');\n }\n \n }else{\n flash('<i class=\"icon-circle-check\"></i> No ha seleccionado ningún proveedor!')->warning()->important();\n return redirect()->back();\n }\n //dd($cont);\n /*$product->name=$request->name;\n $product->characteriscs=$request->characteriscs;\n $product->existence=$request->existence;\n $product->unity=$request->unity;\n $product->price=$request->price;\n $product->stock_min=$request->stock_min;\n $product->stock_max=$request->stock_max;\n $product->save();\n*/\n \n }\n }", "title": "" }, { "docid": "7677779ee9c742a54f65dea00e0d5867", "score": "0.52809846", "text": "public function update(Request $request, $id)\n {\n //dd($request->all());\n\n foreach ($request->productos as $idx=> $producto){\n $prod = Producto::find($producto);\n $stock=Stock::find($prod->stock_id);\n if($request->cantidad[$idx]<=$stock->cantidad){\n $user = Auth::user();\n $v = venta::find($id);\n foreach($v->lineaVentas as $lv){\n $prod=Producto::find($lv->producto_id);\n $stock =Stock::find($prod->stock_id);\n $stock->cantidad = $stock->cantidad+$lv->cantidad;\n $stock->save();\n $lv->save();\n }\n $v->forceDelete();\n $venta = new Venta($request->all());\n $venta->fecha = \\Carbon\\Carbon::parse($request->fecha)->format('Y-m-d');\n $venta->monto = 0 ;\n $venta->user_id = $user->id;\n $cliente=Cliente::find(15);\n $venta->cliente_id = $cliente->id;//se le asigna el cliente generico\n $cliente->ventas()->save($venta);\n foreach ($request->productos as $idx=> $producto){\n $prod = Producto::find($producto);\n $lv = new Linea_venta(); \n $lv->cantidad = $request->cantidad[$idx];\n $lv->subTotal = $prod->precio_venta*$request->cantidad[$idx];\n $lv->producto_id = $prod->id;\n $lv->venta_id = $venta->id;\n $stock=Stock::find($prod->stock_id);\n $stock->cantidad = $stock->cantidad-$request->cantidad[$idx];\n $stock->save();\n $lv->save();\n }\n foreach($venta->lineaVentas as $lv){\n $venta->monto = $venta->monto + $lv->subTotal; \n $venta->lineaVentas()->save($lv);\n }\n $venta->save();\n flash(\"Se edito la Venta del Empleado: \" . $venta->user->name. \" y se actualizo el stock correctamente!\")->success();\n return redirect(route('ventaContado.index'));\n }\n else {\n flash(\"Error: la cantidad del producto \" . $prod->descripcion. \" es superior a su stock existente, STOCK:\".$stock->cantidad)->error();\n return redirect(route('ventaContado.index'));\n }\n }\n;\n }", "title": "" }, { "docid": "3315752b1ad2ea11ec3e526d9bf39470", "score": "0.5264797", "text": "public function postEdit()\n\t{\n\t\tDB::beginTransaction();\t\n\t\ttry {\n\t\t\t\t$producto = Producto::find(Input::get('id'));\n\t\t\t\t$producto->update(Input::all());\n\t\t\t\t$producto->save();\n\t\t\t\t$insertedId = $producto->id;\n\n\t\t\t\t$oComb = Combinacion::where('nombre','=','Normal')->first();\n\n\t\t\t\tif (!empty(Input::get('precio'))) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t \t$prod_comb_normal = $producto->precios()->where('combinacion_id', '=', $oComb->id)->first();\n\t\t\t\t\t\t \tif(!empty($prod_comb_normal)){\n\t\t\t\t\t\t \t//var_dump($prod_comb_normal->precio);\n\t\t\t\t\t\t \t//die();\n\t\t\t\t\t\t \t$prod_comb_normal->precio = Input::get('precio');\n\t\t\t\t\t\t \t$prod_comb_normal->save();\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t\t\t$precio = new Precio;\n\t\t\t\t\t\t\t\t\t $precio->producto_id = $insertedId;\n\t\t\t\t\t\t\t\t\t $precio->combinacion_id = $oComb->id;\n\t\t\t\t\t\t\t\t\t $precio->precio=Input::get('precio');\n\t\t\t\t\t\t\t\t\t $precio->save();\n\t\t\t\t\t\t }\n\t\t\t\t }else{\n\t\t\t\t \t$prod_comb_normal = $producto->precios()->where('combinacion_id', '=', $oComb->id)->first();\n //print_r($prod_comb_normal->toJson()); die();\n\t\t\t\t \tif(!empty($prod_comb_normal)){\n\t\t\t\t \t$prod_comb_normal->delete();\n\t\t\t\t \t}\n\t\t\t\t }\n\n if (Input::get('receta') == 1){\n $stockProd = $producto->almacenes()->detach();\n //print_r($stockProd->toJson()); die();\n //if(!empty($stockProd)){\n // $stockProd->detach();\n //}\n }\n\n if(Input::hasFile('imagen') and substr(Input::file('imagen')->getMimeType(), 0, 5) == 'image'){\n $file = Input::file('imagen');\n $extension = Input::file('imagen')->getClientOriginalExtension();\n //print_r($file);\n //print_r('mime: '.$extension);\n Image::make($file)->resize(200, 200)->save(public_path().'/images/productos/'.$producto->id.'.'.$extension);\n //echo public_path();\n $producto->imagen = '/images/productos/'.$producto->id.'.'.$extension;\n $producto->save();\n }\n\n if(Input::get('prodAttrSend') == 'sabores'){\n $producto->cantidadsabores = Input::get('cantdef');\n $producto->save();\n }else{\n $producto->cantidadsabores = null;\n $producto->save();\n }\n\n\t\t} catch (Exception $e) {\n\t\t\tDB::rollback();\n\t\t\t//return Response::json(array('estado' => $e->getMessage()));\n $msg = array('status' => false,'msg1' => 'Error!','msg2' => 'Producto no modificado');\n return Response::view('productos.index',compact('msg'));\n\n\t\t}\n\t\tDB::commit();\n\t\t//return Response::json(array('estado' => true, 'route' => '/productos'));\n $msg = array('status' => true,'msg1' => 'Hecho!','msg2' => 'Producto modificado con éxito');\n return Response::view('productos.index',compact('msg'));\n\t}", "title": "" }, { "docid": "3b7ad684263b9c5bb2540d81cae98f07", "score": "0.5261642", "text": "function update_price_and_categories($product_data, $product) {\n\n // the store function uses an mprices array to get the prices\n // product->mprices->product_price->product_price\n if (isset($product_data['product_price'])) {\n $product->mprices = [];\n $product->mprices['product_price'] = [\n product_price => $product_data['product_price']\n ];\n }\n\n // categories\n if (isset($product_data['categories']) &&\n is_array($product_data['categories'])) {\n $product->categories = $product_data['categories'];\n }\n return $product;\n}", "title": "" }, { "docid": "19a8e21036102ec423c0963769b1586a", "score": "0.52523434", "text": "public function create()\n\t{\n\t\trole_or_die('nitrocart', 'admin_r_catalogue_edit');\n\n\t\t// Save:\n\t\tif($input = $this->input->post())\n\t\t{\n\n\t\t\t// Setup extra validation rules not applied to the main set\n\t\t\t$this->form_validation->set_rules($this->products_admin_m->_create_validation_rules);\n\n\t\t\t// If postback validate the form\n\t\t\tif ($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$input['price'] = (is_numeric($input['price']))?$input['price']:0;\n\n\t\t\t\tif ($product_id = $this->products_admin_m->create($input))\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata(JSONStatus::Success, lang('success'));\n\t\t\t\t\tredirect(NC_ADMIN_ROUTE.'/product/edit/'.$product_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t//initialize fields\n\t\tforeach ($this->products_admin_m->_create_validation_rules AS $rule)\n\t\t\t$this->data->{$rule['field']} = $this->input->post($rule['field']);\n\n\n\t\t//we need to get a list of packages\n\t\t$this->load->model('nitrocart/admin/packages_admin_m');\n\t\t$this->load->model('nitrocart/admin/packages_groups_admin_m');\n\t\t$this->load->model('nitrocart/admin/products_types_admin_m');\n\t\t$this->load->model('nitrocart/zones_m');\t\t\n\t\t$this->data->available_packages = $this->packages_admin_m->get_for_admin();\n\t\t$this->data->available_groups = $this->packages_groups_admin_m->get_for_admin();\n\t\t$this->data->available_taxes = $this->tax_m->get_admin_select();\n\t\t$this->data->available_types = $this->products_types_admin_m->get_for_admin();\n\t\t$this->data->available_zones = $this->zones_m->get_for_admin();\n\n\t\t$this->data->default_taxID = $this->tax_admin_m->getDefaultID();\n\t\t$this->data->default_typeID = $this->products_types_admin_m->getDefaultID(); \n\t\t$this->data->default_groupID = $this->packages_groups_admin_m->getDefaultID();\n\t\t$this->data->default_zone_ID = $this->zones_m->getDefaultID();\n\t\t\n\n\t\tif(count($this->data->available_groups)<= 0)\n\t\t{\n\t\t\t$this->session->set_flashdata(JSONStatus::Error, \"You must first <a class='create' href='\".NC_ADMIN_ROUTE.\"/packages_groups/create'>create</a> a package group.\");\n\t\t\tredirect(NC_ADMIN_ROUTE.'/products');\n\t\t}\n\t\tif(count($this->data->available_packages)<= 0)\n\t\t{\n\t\t\t$this->session->set_flashdata(JSONStatus::Error, \"You must first <a class='create' href='\".NC_ADMIN_ROUTE.\"/packages'>create</a> a package.\");\n\t\t\tredirect(NC_ADMIN_ROUTE.'/products');\n\t\t}\n\t\tif(count($this->data->available_types)<= 0)\n\t\t{\n\t\t\t$this->session->set_flashdata(JSONStatus::Error, \"You must first <a class='create' href='\".NC_ADMIN_ROUTE.\"/products_types/create'>create</a> a product type.\");\n\t\t\tredirect(NC_ADMIN_ROUTE . '/products');\n\t\t}\n\n\t\t// Build the Template\n\t\t$this->template\n\t\t\t\t->title($this->module_details['name'], lang('nitrocart:products:create'))\n\t\t\t\t->append_metadata($this->load->view('fragments/wysiwyg', $this->data, true))\n\t\t\t\t->append_js('nitrocart::admin/products.js')\n\t\t\t\t->append_js('nitrocart::admin/common.js')\n\t\t\t\t->build('admin/features/semantics3/create', $this->data);\n\t}", "title": "" }, { "docid": "ba3575a737f4c8b95002f95ebb1da65d", "score": "0.52503055", "text": "public function save_edit_product()\n {\n if($this->isLoggedIn())\n {\n if ($_POST) {\n $config = array(\n array(\n 'field' => 'name',\n 'label' => 'Name',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'part_no',\n 'label' => 'Product Code',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'cat_id',\n 'label' => 'Category',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'sub_cat_id',\n 'label' => 'Sub Category',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'brand_id',\n 'label' => 'Brand',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'purchase_price',\n 'label' => 'Purchase Price',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'sale_price',\n 'label' => 'Selling Price',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'tags',\n 'label' => 'Tags',\n 'rules' => 'trim|required'\n ),\n array(\n 'field' => 'details',\n 'label' => 'Details',\n 'rules' => 'trim|required'\n ),\n );\n $this->form_validation->set_rules($config);\n if ($this->form_validation->run() == false) {\n echo json_encode(([\"msg_type\" => \"error\", \"message\" => validation_errors() ]));\n } else {\n $id = $this->input->post('id');\n $this->Admin_model->update_product($_POST, $id);\n echo json_encode(([\"msg_type\" => \"success\", \"message\" => \"Product Updated Successfully\" ]));\n }\n }\n }\n else\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "5fec6b4ce1a4a72b80cc07a61ac22a01", "score": "0.52502525", "text": "public function updateProductToDb() {\r\n // redirect to Login if not login\r\n $this->redirectToLogin();\r\n\r\n $this->load->library( 'session' );\r\n $this->load->helper( 'url' );\r\n $this->load->model( 'productmodel' );\r\n\r\n $product_desc = $_POST['product-no'].','.$_POST['product-price'].','.$_POST['min-book'].','.$_POST['product-on-sale'];\r\n\r\n $index = 0;\r\n $product_spec = '';\r\n\r\n while( isset( $_POST['spec-no-'.strval( $index )] ) ) {\r\n if( $index != 0 ) {\r\n $product_spec .= ',';\r\n }\r\n $product_spec .= $_POST['spec-no-'.strval( $index )].','.$_POST['spec-size-'.strval( $index )].','.$_POST['spec-min-'.strval( $index )];\r\n\r\n $index++;\r\n }\r\n\r\n $product = array(\r\n 'product_name' => $_POST['product-name'],\r\n 'product_category' => $_POST['product-category'],\r\n 'product_img_huge' => $_POST['product-huge-image'],\r\n 'product_img_large' => $_POST['product-large-image'],\r\n 'product_img_small' => $_POST['product-small-image'],\r\n 'product_desc' => $product_desc,\r\n 'product_spec' => $product_spec,\r\n 'product_lang' => $_POST['product-lang']\r\n );\r\n\r\n $this->productmodel->updateProduct( $_POST['product-id'], $product );\r\n\r\n redirect( base_url().'admin/manageproduct' );\r\n\r\n }", "title": "" }, { "docid": "2e124379e6e77d253ba3dcf321a31b65", "score": "0.5247252", "text": "public function updatePrices(Product $product)\n {\n }", "title": "" }, { "docid": "823b8ddd03059482715d4813f725577d", "score": "0.52464426", "text": "public static function add_product() {\n //check_ajax_referer( 'save-advanced-attributes', 'security' );\n ob_start();\n //check_ajax_referer( 'add-advanced-attribute', 'security' );\n if (!current_user_can('edit_products')) {\n wp_die(-1);\n }\n $post_id = $_POST['post_id'];\n $product_id = $_POST['product_id'];\n $data = get_post_meta($post_id, 'product_ids', true);\n if(!is_array($data))\n $data = array();\n $data[] = $product_id;\n $data = array_unique ( $data );\n update_post_meta($post_id, 'product_ids', $data); \n self::output(get_post($post_id)); \n wp_die();\n }", "title": "" }, { "docid": "ee48427e20880406cd3c1e5419e60432", "score": "0.5242678", "text": "public function actionCreate()\n {\n if(Yii::$app->user->can('r-proveedor')){\n $model = new Producto();\n if (!empty(Yii::$app->request->post())) {\n if ($model->load(Yii::$app->request->post())) {\n $proveedor = \\frontend\\models\\Proveedor::find()->where(['usuario_id' => Yii::$app->user->id])->one();\n $model->proveedor_id = $proveedor->id;\n if (!$model->save()) {\n print_r($model->getErrors());\n die();\n }\n $model->asociarTallas(Yii::$app->request->post()['Producto']['producto_tallas']);\n if ($model->cantidad_stock > 0) {\n $model->estado_producto_id = 1;\n } else {\n $model->estado_producto_id = 2;\n }\n \n $model->save();\n /**\n * Asocia los tags o palabras claves\n */\n $model->asociarTags(Yii::$app->request->post()['Producto']['tags']);\n /**\n * Asocia las categorias\n */\n // $model->asociarCategorias(Yii::$app->request->post()['Producto']['categorias']);\n $model->asociarSubcategorias(Yii::$app->request->post()['Producto']['subcategorias']);\n \n /**\n * Almaceno la imagen principal\n */\n $model->almacenarImagenPrincipal();\n /**\n * Se realiza primero la carga de los archivos hacia el atributo\n * del modelo y luego en el modelo se realiza el guardado y la\n * creación de los objetos que tienen la información de cada \n * imagen\n */\n $model->imagenes_segundarias = UploadedFile::getInstances($model, 'imagenes_segundarias');\n $model->almacenarImagenesSegundarias();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n \n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "83c6ec0250bfa22fcf334e6c30d40ef9", "score": "0.522133", "text": "public function testUpdateProductData()\n {\n }", "title": "" }, { "docid": "201da4cd93561c159505644d65bdc9ad", "score": "0.5217403", "text": "public function Refresh($blnReload = false) {\n\t\t\tif ($blnReload)\n\t\t\t\t$this->objListaProducto->Reload();\n\n\t\t\tif ($this->lstLICENCIAIdLICENCIAObject) {\n\t\t\t\t\t$this->lstLICENCIAIdLICENCIAObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstLICENCIAIdLICENCIAObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objLICENCIAIdLICENCIAObjectArray = Licencia::LoadAll();\n\t\t\t\tif ($objLICENCIAIdLICENCIAObjectArray) foreach ($objLICENCIAIdLICENCIAObjectArray as $objLICENCIAIdLICENCIAObject) {\n\t\t\t\t\t$objListItem = new QListItem($objLICENCIAIdLICENCIAObject->__toString(), $objLICENCIAIdLICENCIAObject->IdLICENCIA);\n\t\t\t\t\tif (($this->objListaProducto->LICENCIAIdLICENCIAObject) && ($this->objListaProducto->LICENCIAIdLICENCIAObject->IdLICENCIA == $objLICENCIAIdLICENCIAObject->IdLICENCIA))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstLICENCIAIdLICENCIAObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblLICENCIAIdLICENCIA) $this->lblLICENCIAIdLICENCIA->Text = ($this->objListaProducto->LICENCIAIdLICENCIAObject) ? $this->objListaProducto->LICENCIAIdLICENCIAObject->__toString() : null;\n\n\t\t\tif ($this->lstPRODUCTOIdPRODUCTOObject) {\n\t\t\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objPRODUCTOIdPRODUCTOObjectArray = Producto::LoadAll();\n\t\t\t\tif ($objPRODUCTOIdPRODUCTOObjectArray) foreach ($objPRODUCTOIdPRODUCTOObjectArray as $objPRODUCTOIdPRODUCTOObject) {\n\t\t\t\t\t$objListItem = new QListItem($objPRODUCTOIdPRODUCTOObject->__toString(), $objPRODUCTOIdPRODUCTOObject->IdPRODUCTO);\n\t\t\t\t\tif (($this->objListaProducto->PRODUCTOIdPRODUCTOObject) && ($this->objListaProducto->PRODUCTOIdPRODUCTOObject->IdPRODUCTO == $objPRODUCTOIdPRODUCTOObject->IdPRODUCTO))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblPRODUCTOIdPRODUCTO) $this->lblPRODUCTOIdPRODUCTO->Text = ($this->objListaProducto->PRODUCTOIdPRODUCTOObject) ? $this->objListaProducto->PRODUCTOIdPRODUCTOObject->__toString() : null;\n\n\t\t\tif ($this->txtPRODUCTOCantidad) $this->txtPRODUCTOCantidad->Text = $this->objListaProducto->PRODUCTOCantidad;\n\t\t\tif ($this->lblPRODUCTOCantidad) $this->lblPRODUCTOCantidad->Text = $this->objListaProducto->PRODUCTOCantidad;\n\n\t\t\tif ($this->txtPRODUCTOVolumen) $this->txtPRODUCTOVolumen->Text = $this->objListaProducto->PRODUCTOVolumen;\n\t\t\tif ($this->lblPRODUCTOVolumen) $this->lblPRODUCTOVolumen->Text = $this->objListaProducto->PRODUCTOVolumen;\n\n\t\t\tif ($this->txtPRODUCTOUnidad) $this->txtPRODUCTOUnidad->Text = $this->objListaProducto->PRODUCTOUnidad;\n\t\t\tif ($this->lblPRODUCTOUnidad) $this->lblPRODUCTOUnidad->Text = $this->objListaProducto->PRODUCTOUnidad;\n\n\t\t\tif ($this->txtPRODUCTOCostoUnitario) $this->txtPRODUCTOCostoUnitario->Text = $this->objListaProducto->PRODUCTOCostoUnitario;\n\t\t\tif ($this->lblPRODUCTOCostoUnitario) $this->lblPRODUCTOCostoUnitario->Text = $this->objListaProducto->PRODUCTOCostoUnitario;\n\n\t\t}", "title": "" }, { "docid": "f42077dbd1c025932e305665418e395b", "score": "0.52040255", "text": "function RecordUpdateProduct($id, $nombre, $descripcion, $precio, $oferta, $categoria, $imagen = null){\n \n if($imagen){\n $query = $this->db->prepare('UPDATE producto SET nombre=?, descripcion=?, precio=?,oferta=?,id_categoria=?, imagen=? WHERE id='.$id.' ');\n return $query->execute([$nombre, $descripcion, $precio, $oferta, $categoria, $imagen]);\n }else{\n $query = $this->db->prepare('UPDATE producto SET nombre=?, descripcion=?, precio=?,oferta=?,id_categoria=? WHERE id='.$id.' ');\n return $query->execute([$nombre, $descripcion, $precio, $oferta, $categoria]);\n }\n }", "title": "" }, { "docid": "88b2bd091f020b41d08b7184875f276e", "score": "0.5203028", "text": "public function update_product(){\n\n if (!($this->session->has_userdata('login'))) {\n header('location: ' . site_url('Account/connexion_page'));\n }else{\n if($this->session->privilege == 1){\n // accueil a mettre par la suite\n header('location: ' . site_url('Accueil/home'));\n }else{\n\n $code = htmlspecialchars($_POST['CodeProduit']);\n $idBoutique = $this->session->idBoutique;\n\n $dataProduct = array(\n \"CodeProduit\" => $code,\n \"LibelleProduit\" => htmlspecialchars($_POST['libelle']),\n \"PrixProd\" => htmlspecialchars($_POST['prix']),\n \"stockDispo\" => htmlspecialchars($_POST['stockDispo']),\n \"stockReel\" => htmlspecialchars($_POST['stockReel']),\n \"DureeReservation\" => htmlspecialchars($_POST['duree']),\n \"DescriptionProd\" => htmlspecialchars($_POST['description']),\n \"NumCategorieP\" => htmlspecialchars($_POST['categorie']),\n //TODO : à supprimer Idboutique\n \"IdBoutique\" => $idBoutique\n );\n\n $this->product_model->updateProduct($dataProduct);\n header('location: ' . site_url(\"Product/product_page/$code\"));\n }\n }\n }", "title": "" }, { "docid": "83095003735df36b8a98b36f51d0bced", "score": "0.520281", "text": "public function save($id = null) {\n if(empty($id)){\n if ($this->request->is('post')) {\n $this->SemiProduct->create();\n if ($this->SemiProduct->saveAssociated($this->request->data)) { //Magic saveAssociated funtion\n $this->Flash->success(__('Product has been saved.'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Flash->error(__('The product could not be saved. Please, try again.'));\n }\n }else{\n $this->request->data['Article']['unit_id'] = 12;\n $this->request->data['Article']['type_id'] = 7;\n }\n }\n if(!empty($id)){\n if (!$this->SemiProduct->exists($id)) {\n throw new NotFoundException(__('Invalid product'));\n }\n $this->SemiProduct->id = $id; //key for updating refers to id !\n if ($this->request->is(array('post', 'put'))) {\n if ($this->SemiProduct->Article->save($this->request->data) && $this->SemiProduct->save($this->request->data)) {\n $this->Flash->success(__('The product has been edited.'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Flash->error(__('The product could not be edited. Please, try again.'));\n }\n } else {\n $options = array('conditions' => array('SemiProduct.' . $this->SemiProduct->primaryKey => $id));\n $this->request->data = $this->SemiProduct->find('first', $options);\n }\n $users = $this->SemiProduct->find('list');\n }\n \n\n // Set product status and rating\n $this->set('status', $this->SemiProduct->status);\n $this->set('rating', $this->SemiProduct->rating);\n \n //Set Article type and Unit\n $listTypes = $this->SemiProduct->Article->Type->find('list');\n $this->set('listTypes',$listTypes);\n $listUnits = $this->SemiProduct->Article->Unit->find('list');\n $this->set('listUnits',$listUnits);\n }", "title": "" }, { "docid": "c46c8159637f8ba6270528966170fef7", "score": "0.5194843", "text": "public function actualizar_producto_controlador(){\n\n /*-- Comprobando privilegios - Checking privileges --*/\n\t\t\tif($_SESSION['cargo_sto']!=\"Administrador\"){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Acceso no permitido\",\n \"Texto\"=>\"No tienes los permisos necesarios para realizar esta operación en el sistema\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n /*-- Recuperando id del producto - Retrieving product id - --*/\n\t\t\t$id=mainModel::decryption($_POST['producto_id_up']);\n\t\t\t$id=mainModel::limpiar_cadena($id);\n\n /*-- Comprobando producto en la BD - Checking producto in DB --*/\n\t\t\t$check_producto=mainModel::ejecutar_consulta_simple(\"SELECT * FROM producto WHERE producto_id='$id'\");\n\t\t\tif($check_producto->rowCount()<=0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Producto no encontrado\",\n\t\t\t\t\t\"Texto\"=>\"El producto que intenta actualizar no existe en el sistema\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}else{\n \t$campos=$check_producto->fetch();\n\t\t\t}\n\t\t\t$check_producto->closeCursor();\n\t\t\t$check_producto=mainModel::desconectar($check_producto);\n\n /*-- Recibiendo datos del formulario - Receiving form data --*/\n $codigo=mainModel::limpiar_cadena($_POST['producto_codigo_up']);\n $sku=mainModel::limpiar_cadena($_POST['producto_sku_up']);\n\n $nombre=mainModel::limpiar_cadena($_POST['producto_nombre_up']);\n $precio_compra=mainModel::limpiar_cadena($_POST['producto_precio_compra_up']);\n $precio_venta=mainModel::limpiar_cadena($_POST['producto_precio_venta_up']);\n $stock_total=mainModel::limpiar_cadena($_POST['producto_stock_up']);\n $stock_minimo=mainModel::limpiar_cadena($_POST['producto_stock_minimo_up']);\n $descuento=mainModel::limpiar_cadena($_POST['producto_descuento_up']);\n $marca=mainModel::limpiar_cadena($_POST['producto_marca_up']);\n $modelo=mainModel::limpiar_cadena($_POST['producto_modelo_up']);\n\n $tipo=mainModel::limpiar_cadena($_POST['producto_tipo_up']);\n $presentacion=mainModel::limpiar_cadena($_POST['producto_presentacion_up']);\n $categoria=mainModel::limpiar_cadena($_POST['producto_categoria_up']);\n $estado=mainModel::limpiar_cadena($_POST['producto_estado_up']);\n\n $descripcion=mainModel::limpiar_cadena($_POST['producto_descripcion_up']);\n\n /*-- Comprobando campos vacios - Checking empty fields --*/\n if($codigo==\"\" || $nombre==\"\" || $precio_compra==\"\" || $precio_venta==\"\" || $stock_total==\"\" || $stock_minimo==\"\" || $descuento==\"\"){\n $alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No has llenado todos los campos que son obligatorios\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Verificando integridad de los datos - Checking data integrity --*/\n if(mainModel::verificar_datos(\"[a-zA-Z0-9- ]{1,49}\",$codigo)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El CÓDIGO DE BARRAS no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if($sku!=\"\"){\n if(mainModel::verificar_datos(\"[a-zA-Z0-9- ]{1,49}\",$sku)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"El CÓDIGO SKU no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n if(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,$#\\- ]{1,97}\",$nombre)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[0-9.]{1,25}\",$precio_compra)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El PRECIO DE COMPRA no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[0-9.]{1,25}\",$precio_venta)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El PRECIO DE VENTA no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[0-9]{1,9}\",$stock_total)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El STOCK no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[0-9]{1,9}\",$stock_minimo)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El STOCK MÍNIMO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if(mainModel::verificar_datos(\"[0-9]{1,2}\",$descuento)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El DESCUENTO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if($marca!=\"\"){\n if(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\- ]{1,30}\",$marca)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"La MARCA no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n if($modelo!=\"\"){\n if(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\- ]{1,40}\",$modelo)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"El MODELO no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n if($descripcion!=\"\"){\n if(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\s ]{4,520}\",$descripcion)){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Formato no valido\",\n \"Texto\"=>\"La DESCRIPCIÓN no coincide con el formato solicitado\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n }\n\n /*-- Comprobando tipo - Checking type --*/\n\t\t\tif($tipo!=\"Fisico\" && $tipo!=\"Digital\"){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Opción no valida\",\n\t\t\t\t\t\"Texto\"=>\"Ha seleccionado un TIPO de producto no valido\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*== Comprobando presentacion - Checking presentation ==*/\n\t\t\tif(!in_array($presentacion, PRODUTS_UNITS)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Opción no valida\",\n\t\t\t\t\t\"Texto\"=>\"Ha seleccionado una PRESENTACIÓN de producto no valida\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Comprobando estado - Checking status --*/\n\t\t\tif($estado!=\"Habilitado\" && $estado!=\"Deshabilitado\"){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Opción no valida\",\n\t\t\t\t\t\"Texto\"=>\"Ha seleccionado un ESTADO de producto no valido\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Verificando stock total y minimo - Checking total and minimum stock --*/\n if($stock_total<$stock_minimo){\n $alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Formato no valido\",\n\t\t\t\t\t\"Texto\"=>\"El STOCK MÍNIMO no puede ser mayor al STOCK O EXISTENCIAS totales.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Comprobando y formateando precios de producto - Checking and formatting product prices --*/\n $precio_compra=number_format($precio_compra,COIN_DECIMALS,'.','');\n $precio_venta=number_format($precio_venta,COIN_DECIMALS,'.','');\n\n if($precio_compra<=0){\n $alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El PRECIO DE COMPRA no puede ser menor o igual a 0.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if($precio_venta<=0){\n $alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El PRECIO DE VENTA no puede ser menor o igual a 0.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n if($precio_compra>$precio_venta){\n $alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El PRECIO DE COMPRA del producto no puede ser mayor al PRECIO DE VENTA.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n }\n\n /*-- Comprobando categoria - Checking category --*/\n $check_categoria=mainModel::ejecutar_consulta_simple(\"SELECT categoria_id FROM categoria WHERE categoria_id='$categoria' AND categoria_estado='Habilitada'\");\n if($check_categoria->rowCount()<=0){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrió un error inesperado\",\n \"Texto\"=>\"La CATEGORÍA que ha seleccionado no existe o se encuentra deshabilitada.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n $check_categoria->closeCursor();\n $check_categoria=mainModel::desconectar($check_categoria);\n\n /*-- Comprobando codigo de barras - Checking barcode --*/\n if($campos['producto_codigo']!=$codigo){\n $check_codigo=mainModel::ejecutar_consulta_simple(\"SELECT producto_codigo FROM producto WHERE producto_codigo='$codigo'\");\n if($check_codigo->rowCount()>0){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrió un error inesperado\",\n \"Texto\"=>\"El CÓDIGO DE BARRAS de producto que ha ingresado ya se encuentra registrado en el sistema.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n $check_codigo->closeCursor();\n $check_codigo=mainModel::desconectar($check_codigo);\n }\n\n /*-- Comprobando codigo SKU - Checking SKU --*/\n if($sku!=\"\" && $campos['producto_sku']!=$sku){\n $check_sku=mainModel::ejecutar_consulta_simple(\"SELECT producto_sku FROM producto WHERE producto_sku='$sku'\");\n if($check_sku->rowCount()>0){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrió un error inesperado\",\n \"Texto\"=>\"El CÓDIGO SKU de producto que ha ingresado ya se encuentra registrado en el sistema.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n $check_sku->closeCursor();\n $check_sku=mainModel::desconectar($check_sku);\n }\n\n /*-- Comprobando nombre - Checking name --*/\n if($campos['producto_nombre']!=$nombre){\n $check_nombre=mainModel::ejecutar_consulta_simple(\"SELECT producto_nombre FROM producto WHERE producto_codigo='$codigo' AND producto_nombre='$nombre'\");\n if($check_nombre->rowCount()>0){\n $alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrió un error inesperado\",\n \"Texto\"=>\"Ya existe un producto registrado con el mismo NOMBRE y CÓDIGO DE BARRAS.\",\n \"Icon\"=>\"error\",\n \"TxtBtn\"=>\"Aceptar\"\n ];\n echo json_encode($alerta);\n exit();\n }\n $check_nombre->closeCursor();\n $check_nombre=mainModel::desconectar($check_nombre);\n }\n\n /*-- Preparando datos para enviarlos al modelo - Preparing data to send to the model --*/\n $datos_producto_up=[\n \"producto_codigo\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Codigo\",\n\t\t\t\t\t\"campo_valor\"=>$codigo\n\t\t\t\t],\n \"producto_sku\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Sku\",\n\t\t\t\t\t\"campo_valor\"=>$sku\n\t\t\t\t],\n \"producto_nombre\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Nombre\",\n\t\t\t\t\t\"campo_valor\"=>$nombre\n\t\t\t\t],\n \"producto_descripcion\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Descripcion\",\n\t\t\t\t\t\"campo_valor\"=>$descripcion\n\t\t\t\t],\n \"producto_stock\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":StockT\",\n\t\t\t\t\t\"campo_valor\"=>$stock_total\n\t\t\t\t],\n \"producto_stock_minimo\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":StockM\",\n\t\t\t\t\t\"campo_valor\"=>$stock_minimo\n\t\t\t\t],\n \"producto_precio_compra\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":PrecioC\",\n\t\t\t\t\t\"campo_valor\"=>$precio_compra\n\t\t\t\t],\n \"producto_precio_venta\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":PrecioV\",\n\t\t\t\t\t\"campo_valor\"=>$precio_venta\n\t\t\t\t],\n \"producto_descuento\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Descuento\",\n\t\t\t\t\t\"campo_valor\"=>$descuento\n\t\t\t\t],\n \"producto_tipo\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Tipo\",\n\t\t\t\t\t\"campo_valor\"=>$tipo\n\t\t\t\t],\n \"producto_presentacion\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Presentacion\",\n\t\t\t\t\t\"campo_valor\"=>$presentacion\n\t\t\t\t],\n \"producto_marca\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Marca\",\n\t\t\t\t\t\"campo_valor\"=>$marca\n\t\t\t\t],\n \"producto_modelo\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Modelo\",\n\t\t\t\t\t\"campo_valor\"=>$modelo\n\t\t\t\t],\n \"producto_estado\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Estado\",\n\t\t\t\t\t\"campo_valor\"=>$estado\n\t\t\t\t],\n \"categoria_id\"=>[\n\t\t\t\t\t\"campo_marcador\"=>\":Categoria\",\n\t\t\t\t\t\"campo_valor\"=>$categoria\n\t\t\t\t]\n ];\n\n $condicion=[\n\t\t\t\t\"condicion_campo\"=>\"producto_id\",\n\t\t\t\t\"condicion_marcador\"=>\":ID\",\n\t\t\t\t\"condicion_valor\"=>$id\n\t\t\t];\n\n if(mainModel::actualizar_datos(\"producto\",$datos_producto_up,$condicion)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"recargar\",\n\t\t\t\t\t\"Titulo\"=>\"¡Producto actualizado!\",\n\t\t\t\t\t\"Texto\"=>\"Los datos del producto se actualizaron con éxito en el sistema\",\n\t\t\t\t\t\"Icon\"=>\"success\",\n\t\t\t\t\t\"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No hemos podido actualizar los datos del producto, por favor intente nuevamente\",\n\t\t\t\t\t\"Icon\"=>\"error\",\n\t\t\t\t\t\"TxtBtn\"=>\"Aceptar\"\n\t\t\t\t];\n\t\t\t}\n\t\t\techo json_encode($alerta);\n }", "title": "" }, { "docid": "c5c1a688f164bb75ce2483da4676916a", "score": "0.5191129", "text": "protected static function update_product_model($data){\n $sql = mainModel::connect()->prepare(\"UPDATE item SET item_codigo=:Code, item_nombre=:Name, item_stock=:Stock, item_estado=:Status, item_detalle=:Detail WHERE item_id=:ID\");\n\n $sql->bindParam(\":Code\", $data['Code']);\n $sql->bindParam(\":Name\", $data['Name']);\n $sql->bindParam(\":Stock\", $data['Stock']);\n $sql->bindParam(\":Status\", $data['Status']);\n $sql->bindParam(\":Detail\", $data['Detail']);\n $sql->bindParam(\":ID\", $data['ID']);\n\n $sql->execute();\n return $sql;\n }", "title": "" }, { "docid": "5f25b26d61de2c62db4d074dc206769e", "score": "0.51865596", "text": "public function edit_product($productID)\n {\n if (!in_array('shop_edit', $this->permission->permissions)) {\n redirect('/admin/dashboard/permissions');\n }\n\n // required\n $this->core->required = array(\n 'productName' => 'Product name',\n 'catalogueID' => array('label' => 'Catalogue ID', 'rules' => 'required|unique[shop_products.catalogueID]|trim')\n );\n\n // where\n $objectID = array('productID' => $productID);\n\n // get values\n $output['data'] = $this->core->get_values('shop_products', $objectID);\n\n if ($this->input->post('cancel')) {\n redirect($this->redirect);\n } else {\n // upload image\n if (@$_FILES['image']['name'] != '') {\n if ($imageData = $this->uploads->upload_image()) {\n $this->core->set['imageName'] = $imageData['file_name'];\n }\n }\n\n // get image errors if there are any\n if ($this->shop->errors) {\n $output['errors'] = $this->shop->errors;\n } else {\n // set stock\n if ($this->input->post('status') == 'O' || ($this->site->config['shopStockControl'] && !$this->input->post('stock'))) {\n $this->core->set['stock'] = 0;\n $this->core->set['status'] = 'O';\n }\n\n // tidy tags\n $tags = [];\n if ($this->input->post('tags')) {\n foreach (explode(',', $this->input->post('tags')) as $tag) {\n $tags[] = ucwords(trim(strtolower(str_replace('-', ' ', $tag))));\n }\n $tags = implode(', ', $tags);\n }\n\n // set tags\n $this->core->set['tags'] = $tags;\n\n // update\n if ($this->core->update('shop_products', $objectID) && count($_POST)) {\n // clear variations\n $this->shop->clear_variations($productID);\n\n // add variation 1\n for ($x=1; $x<6; $x++) {\n if ($this->input->post('variation1-'.$x)) {\n $varID = $this->shop->add_variation($productID, 1, $this->input->post('variation1-'.$x), $this->input->post('variation1_price-'.$x));\n }\n }\n\n // add variation 2\n for ($x=1; $x<6; $x++) {\n if ($this->input->post('variation2-'.$x)) {\n $varID = $this->shop->add_variation($productID, 2, $this->input->post('variation2-'.$x), $this->input->post('variation2_price-'.$x));\n }\n }\n\n // add variation 3\n for ($x=1; $x<6; $x++) {\n if ($this->input->post('variation3-'.$x)) {\n $varID = $this->shop->add_variation($productID, 3, $this->input->post('variation3-'.$x), $this->input->post('variation3_price-'.$x));\n }\n }\n\n // update categories\n $this->shop->update_cats($productID, $this->input->post('catsArray'));\n\n // update tags\n $this->tags->update_tags('shop_products', $productID, $tags);\n\n // set success message\n $this->session->set_flashdata('success', 'Your changes were saved.');\n\n // view page\n if ($this->input->post('view')) {\n redirect('/shop/'.$productID.'/'.strtolower(url_title($this->input->post('productName'))));\n } else {\n // where to redirect to\n redirect('/admin/shop/edit_product/'.$productID);\n }\n }\n }\n\n // set message\n if ($message = $this->session->flashdata('success')) {\n $output['message'] = '<p>'.$message.'</p>';\n }\n\n // set image path!\n $image = $this->uploads->load_image($productID, true, true);\n $output['imagePath'] = $image['src'];\n $image = $this->uploads->load_image($productID, false, true);\n $output['imageThumbPath'] = $image['src'];\n\n // get categories\n $output['categories'] = $this->shop->get_categories();\n\n // get categories for this product\n $output['data']['categories'] = $this->shop->get_cats_for_product($productID);\n\n // get variations\n $output['variation1'] = $this->shop->get_variations($productID, 1);\n $output['variation2'] = $this->shop->get_variations($productID, 2);\n $output['variation3'] = $this->shop->get_variations($productID, 3);\n\n // get bands\n $output['bands'] = $this->shop->get_bands();\n\n // get products\n $output['files'] = $this->shop->get_files();\n\n // templates\n $this->load->view($this->includes_path.'/header');\n $this->load->view('admin/edit_product', $output);\n $this->load->view($this->includes_path.'/footer');\n }\n }", "title": "" }, { "docid": "5f17ebf520b77c619fd1e3de5637e1fa", "score": "0.5184414", "text": "function save_product_id ($id_pro =null,$id_cate =null){\r\n\t\t//if (!$id){\r\n\t\t//$this->Session->setFlash(__('Không có sản phẩm trong thư mục này.', true));\r\n\t\t//}\r\n\t\t/*$get_product = $this->Product->find('first',array('conditions' => array('CategoriesProduct.product_id' => $id)));\r\n\t\tif ($get_product!=null){\r\n\t\t\t$soluong = $get_product['Product']['quantity'];\r\n\t\t\t$sl_update = $soluong - $num;\r\n\t\t\r\n\t\t}*/\r\n\t\t\r\n\t\t$this->data['CategoriesProduct']['product_id'] = $id_pro;\r\n\t\t$this->data['CategoriesProduct']['category_id'] =$id_cate;\r\n\t\t$this->CategoriesProduct->save($this->data);\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "73ca1aa08fc2b967f0b8a50342dbbc00", "score": "0.5172533", "text": "public function saveProductRelation($product, $data)\n {\n if (!is_array($data)) {\n $data = array();\n }\n $deleteCondition = $this->_getWriteAdapter()->quoteInto('product_id=?', $product->getId());\n $this->_getWriteAdapter()->delete($this->getMainTable(), $deleteCondition);\n\n foreach ($data as $catalogrestrictiongroupId => $info) {\n $this->_getWriteAdapter()->insert(\n $this->getMainTable(),\n array(\n 'catalogrestrictiongroup_id' => $catalogrestrictiongroupId,\n 'product_id' => $product->getId(),\n 'position' => @$info['position']\n )\n );\n }\n return $this;\n }", "title": "" }, { "docid": "3bbb91551d7192ece318a3bb4d659ac0", "score": "0.5161512", "text": "public function editProduct($product_id, $data)\n {\n $data_lp=json_encode($data['lp'],JSON_UNESCAPED_UNICODE);\n $this->db->query(\"UPDATE \" . DB_PREFIX . \"product SET accompany_id='\".$this->db->escape($data['accompany_select']).\"', landing_id='\".$this->db->escape($data['landing_id']).\"', model = '\" . $this->db->escape($data['model']) . \"', sku = '\" . $this->db->escape($data['sku']) . \"', upc = '\" . $this->db->escape($data['upc']) . \"', ean = '\" . $this->db->escape($data['ean']) . \"', jan = '\" . $this->db->escape($data['jan']) . \"', isbn = '\" . $this->db->escape($data['isbn']) . \"', mpn = '\" . $this->db->escape($data['mpn']) . \"', quantity = '\" . (int) $data['quantity'] . \"', minimum = '\" . (int) $data['minimum'] . \"', subtract = '\" . (int) $data['subtract'] . \"', stock_status_id = '\" . (int) $data['stock_status_id'] . \"', date_available = '\" . $this->db->escape($data['date_available']) . \"', manufacturer_id = '\" . (int) $data['manufacturer_id'] . \"', shipping = '\" . (int) $data['shipping'] . \"', price = '\" . (float) $data['price'] . \"', points = '\" . (int) $data['points'] . \"', weight = '\" . (float) $data['weight'] . \"', weight_class_id = '\" . (int) $data['weight_class_id'] . \"', length = '\" . (float) $data['length'] . \"', width = '\" . (float) $data['width'] . \"', height = '\" . (float) $data['height'] . \"', length_class_id = '\" . (int) $data['length_class_id'] . \"', status = '\" . (int) $data['status'] . \"', tax_class_id = '\" . (int) $data['tax_class_id'] . \"', sort_order = '\" . (int) $data['sort_order'] . \"', mincount='\".(int) $data['mincount'].\"',calc='\".(int) $data['calc'].\"', data_lp='\".$data_lp.\"', date_modified = NOW() WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['image'])) {\n $this->db->query(\"UPDATE \" . DB_PREFIX . \"product SET image = '\" . $this->db->escape($data['image']) . \"' WHERE product_id = '\" . (int) $product_id . \"'\");\n }\n\n foreach ($data['product_description'] as $language_id => $value) {\n echo \"UPDATE \". DB_PREFIX . \"product_description SET name = '\" . $this->db->escape($value['name']) . \"', description = '\" . $this->db->escape($value['description']) . \"', tag = '\" . $this->db->escape($value['tag']) . \"', video_caption = '\" . $this->db->escape($value['video_caption']) . \"',video = '\" . $this->db->escape($value['video']) . \"', video_preview = '\" . $this->db->escape($value['video_preview']) . \"', meta_title = '\" . $this->db->escape($value['meta_title']) . \"', meta_h1 = '\" . $this->db->escape($value['meta_h1']) . \"', meta_description = '\" . $this->db->escape($value['meta_description']) . \"', meta_keyword = '\" . $this->db->escape($value['meta_keyword']) . \"'\n WHERE product_id = '\" . (int) $product_id . \"' and language_id = '\" . (int) $language_id.\"'\";\n $this->db->query(\"UPDATE \". DB_PREFIX . \"product_description SET name = '\" . $this->db->escape($value['name']) . \"', description = '\" . $this->db->escape($value['description']) . \"', tag = '\" . $this->db->escape($value['tag']) . \"', video_caption = '\" . $this->db->escape($value['video_caption']) . \"',video = '\" . $this->db->escape($value['video']) . \"', video_preview = '\" . $this->db->escape($value['video_preview']) . \"', meta_title = '\" . $this->db->escape($value['meta_title']) . \"', meta_h1 = '\" . $this->db->escape($value['meta_h1']) . \"', meta_description = '\" . $this->db->escape($value['meta_description']) . \"', meta_keyword = '\" . $this->db->escape($value['meta_keyword']) . \"'\n WHERE product_id = '\" . (int) $product_id . \"' and language_id = '\" . (int) $language_id.\"'\");\n \n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_to_store WHERE product_id = '\" . (int) $product_id . \"'\");\n /*\n if (isset($data['product_store'])) {\n foreach ($data['product_store'] as $store_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_to_store SET product_id = '\" . (int) $product_id . \"', store_id = '\" . (int) $store_id . \"'\");\n }\n }\n */\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_to_store SET product_id = '\" . (int) $product_id . \"', store_id = '0'\");\n\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (!empty($data['product_attribute'])) {\n foreach ($data['product_attribute'] as $product_attribute) {\n if ($product_attribute['attribute_id']) {\n // Removes duplicates\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_attribute WHERE product_id = '\" . (int) $product_id . \"' AND attribute_id = '\" . (int) $product_attribute['attribute_id'] . \"'\");\n\n foreach ($product_attribute['product_attribute_description'] as $language_id => $product_attribute_description) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_attribute SET product_id = '\" . (int) $product_id . \"', attribute_id = '\" . (int) $product_attribute['attribute_id'] . \"', language_id = '\" . (int) $language_id . \"', text = '\" . $this->db->escape($product_attribute_description['text']) . \"'\");\n }\n }\n }\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_option WHERE product_id = '\" . (int) $product_id . \"'\");\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_option_value WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_option'])) {\n foreach ($data['product_option'] as $product_option) {\n if ($product_option['type'] == 'select' || $product_option['type'] == 'radio' || $product_option['type'] == 'checkbox' || $product_option['type'] == 'image') {\n if (isset($product_option['product_option_value'])) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_option SET product_option_id = '\" . (int) $product_option['product_option_id'] . \"', product_id = '\" . (int) $product_id . \"', option_id = '\" . (int) $product_option['option_id'] . \"', required = '\" . (int) $product_option['required'] . \"'\");\n\n $product_option_id = $this->db->getLastId();\n\n foreach ($product_option['product_option_value'] as $product_option_value) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_option_value SET product_option_value_id = '\" . (int) $product_option_value['product_option_value_id'] . \"', product_option_id = '\" . (int) $product_option_id . \"', product_id = '\" . (int) $product_id . \"', option_id = '\" . (int) $product_option['option_id'] . \"', option_value_id = '\" . (int) $product_option_value['option_value_id'] . \"', quantity = '\" . (int) $product_option_value['quantity'] . \"', subtract = '\" . (int) $product_option_value['subtract'] . \"', price = '\" . (float) $product_option_value['price'] . \"', price_prefix = '\" . $this->db->escape($product_option_value['price_prefix']) . \"', points = '\" . (int) $product_option_value['points'] . \"', points_prefix = '\" . $this->db->escape($product_option_value['points_prefix']) . \"', weight = '\" . (float) $product_option_value['weight'] . \"', weight_prefix = '\" . $this->db->escape($product_option_value['weight_prefix']) . \"'\");\n }\n }\n } else {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_option SET product_option_id = '\" . (int) $product_option['product_option_id'] . \"', product_id = '\" . (int) $product_id . \"', option_id = '\" . (int) $product_option['option_id'] . \"', value = '\" . $this->db->escape($product_option['value']) . \"', required = '\" . (int) $product_option['required'] . \"'\");\n }\n }\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_discount WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_discount'])) {\n foreach ($data['product_discount'] as $product_discount) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_discount SET product_id = '\" . (int) $product_id . \"', customer_group_id = '\" . (int) $product_discount['customer_group_id'] . \"', quantity = '\" . (int) $product_discount['quantity'] . \"', priority = '\" . (int) $product_discount['priority'] . \"', price = '\" . (float) $product_discount['price'] . \"', date_start = '\" . $this->db->escape($product_discount['date_start']) . \"', date_end = '\" . $this->db->escape($product_discount['date_end']) . \"'\");\n }\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_special WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_special'])) {\n foreach ($data['product_special'] as $product_special) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_special SET product_id = '\" . (int) $product_id . \"', customer_group_id = '\" . (int) $product_special['customer_group_id'] . \"', priority = '\" . (int) $product_special['priority'] . \"', price = '\" . (float) $product_special['price'] . \"', date_start = '\" . $this->db->escape($product_special['date_start']) . \"', date_end = '\" . $this->db->escape($product_special['date_end']) . \"'\");\n }\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_image WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_image'])) {\n foreach ($data['product_image'] as $product_image) {\n //@task move to override\n $alt = isset($product_image['alt']) ? $product_image['alt'] : '';\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_image SET product_id = '\" . (int) $product_id . \"', image = '\" . $this->db->escape($product_image['image']) . \"', sort_order = '\" . (int) $product_image['sort_order'] . \"', alt='\" . $this->db->escape($alt) . \"'\");\n\n /* $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_image SET product_id = '\" . (int) $product_id . \"', image = '\" . $this->db->escape($product_image['image']) . \"', sort_order = '\" . (int) $product_image['sort_order'] . \"'\"); */\n }\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_to_download WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_download'])) {\n foreach ($data['product_download'] as $download_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_to_download SET product_id = '\" . (int) $product_id . \"', download_id = '\" . (int) $download_id . \"'\");\n }\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_to_category WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_category'])) {\n foreach ($data['product_category'] as $category_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_to_category SET product_id = '\" . (int) $product_id . \"', category_id = '\" . (int) $category_id . \"'\");\n }\n }\n\n if (isset($data['main_category_id']) && $data['main_category_id'] > 0) {\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_to_category WHERE product_id = '\" . (int) $product_id . \"' AND category_id = '\" . (int) $data['main_category_id'] . \"'\");\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_to_category SET product_id = '\" . (int) $product_id . \"', category_id = '\" . (int) $data['main_category_id'] . \"', main_category = 1\");\n } elseif (isset($data['product_category'][0])) {\n $this->db->query(\"UPDATE \" . DB_PREFIX . \"product_to_category SET main_category = 1 WHERE product_id = '\" . (int) $product_id . \"' AND category_id = '\" . (int) $data['product_category'][0] . \"'\");\n }\n\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_filter WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_filter'])) {\n foreach ($data['product_filter'] as $filter_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_filter SET product_id = '\" . (int) $product_id . \"', filter_id = '\" . (int) $filter_id . \"'\");\n }\n }\n \n /**Преимущества */\n $this->db->query(\"DELETE FROM dopinfo_benefits_to_product WHERE product_id = '\" . (int) $product_id . \"'\");\n //print_r($data);\n if (isset($data['product_benefit'])) {\n foreach ($data['product_benefit'] as $benefit_id) {\n $this->db->query(\"INSERT INTO dopinfo_benefits_to_product SET product_id = '\" . (int) $product_id . \"', benefit_id = '\" . (int) $benefit_id . \"'\");\n }\n }\n\n \n /**Аналоги товаров \n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_analogs WHERE product_id = '\" . (int) $product_id . \"'\");\n //$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_analogs WHERE related_id = '\" . (int) $product_id . \"'\");\n //@task move to override\n if (isset($data['product_analog'])) {\n foreach ($data['product_analog'] as $related_id) {\n //$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_analogs WHERE product_id = '\" . (int) $product_id . \"' AND related_id = '\" . (int) $related_id . \"'\");\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_analogs SET product_id = '\" . (int) $product_id . \"', related_id = '\" . (int) $related_id . \"'\");\n //$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_related WHERE product_id = '\" . (int) $related_id . \"' AND related_id = '\" . (int) $product_id . \"'\");\n //$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_related SET product_id = '\" . (int) $related_id . \"', related_id = '\" . (int) $product_id . \"'\"); \n }\n }\n */\n\n /**Аналоги товаров */\n if($data['products_change_analog']){\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_analogs WHERE product_id = '\" . (int) $product_id . \"'\");\n\n $product_relateds_str=$data['products_analog'];\n $product_relateds=explode(\",\",$product_relateds_str);\n foreach ($product_relateds as $related_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_analogs SET product_id = '\" . (int) $product_id . \"', related_id = '\" . (int) $related_id . \"'\"); \n } \n }\n\n /**Сопутствующие товары */\n if($data['products_change']){\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_related WHERE product_id = '\" . (int) $product_id . \"'\");\n //$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_related WHERE related_id = '\" . (int) $product_id . \"'\");\n $product_relateds_str=$data['products'];\n $product_relateds=explode(\",\",$product_relateds_str);\n foreach ($product_relateds as $related_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_related SET product_id = '\" . (int) $product_id . \"', related_id = '\" . (int) $related_id . \"'\"); \n } \n }\n\n /**Идентичные товары */\n if($data['iden_change1']){\n $sql=\"select * from analog_products where type=1 and (product_id='\".$product_id.\"' OR link_product_id='\".$product_id.\"')\";\n $query=$this->db->query($sql);\n if($row=$query->row){\n $f_product_id=$row['product_id'];\n }else{\n $f_product_id=$product_id;\n }\n \n $this->db->query(\"DELETE FROM analog_products WHERE type=1 and product_id = '\" .$f_product_id . \"'\");\n foreach($data[\"iden\"] as $key=>$iden){\n if($iden[1]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n VALUES (\"'.$f_product_id.'\",'.$key.',\"1\",\"'.$iden[1]['name'].'\",\"'.$iden[1]['code'].'\")');\n }\n }\n }\n if($data['iden_change2']){\n //print_r($data[\"iden\"]);\n $sql=\"select * from analog_products where type=2 and (product_id='\".$product_id.\"' OR link_product_id='\".$product_id.\"')\";\n $query=$this->db->query($sql);\n if($row=$query->row){\n $f_product_id=$row['product_id'];\n }else{\n $f_product_id=$product_id;\n }\n $this->db->query(\"DELETE FROM analog_products WHERE type=2 and product_id = '\" . (int) $f_product_id . \"'\");\n //print_r($data[\"iden\"]);\n foreach($data[\"iden\"] as $key=>$iden){\n if($iden[2]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n VALUES (\"'.$f_product_id.'\",'.$key.',\"2\",\"'.$iden[2]['name'].'\",\"\")');\n /*echo 'INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n VALUES (\"'.$f_product_id.'\",\"'.$key.'\",\"2\",\"'.$iden[2]['name'].'\",\"\")';\n */\n }\n }\n }\n if($data['iden_change3']){\n $sql=\"select * from analog_products where type=3 and (product_id='\".$product_id.\"' OR link_product_id='\".$product_id.\"')\";\n $query=$this->db->query($sql);\n if($row=$query->row){\n $f_product_id=$row['product_id'];\n }else{\n $f_product_id=$product_id;\n }\n $this->db->query(\"DELETE FROM analog_products WHERE type=3 and product_id = '\" . (int) $f_product_id . \"'\");\n\n foreach($data[\"iden\"] as $key=>$iden){\n if($iden[3]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n VALUES (\"'.$f_product_id.'\",'.$key.',\"3\",\"'.$iden[3]['name'].'\",\"\")');\n }\n }\n }\n if($data['iden_change4']){\n $sql=\"select * from analog_products where type=4 and (product_id='\".$product_id.\"' OR link_product_id='\".$product_id.\"')\";\n $query=$this->db->query($sql);\n if($row=$query->row){\n $f_product_id=$row['product_id'];\n }else{\n $f_product_id=$product_id;\n }\n $this->db->query(\"DELETE FROM analog_products WHERE type=4 and product_id = '\" . (int) $f_product_id . \"'\");\n\n foreach($data[\"iden\"] as $key=>$iden){\n if($iden[4]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n VALUES (\"'.$f_product_id.'\",'.$key.',\"4\",\"'.$iden[4]['name'].'\",\"\")');\n }\n }\n }\n \n /*\n foreach($data[\"iden\"] as $key=>$iden){\n if(isset($iden[1]['name'])){\n $sql=\"select * from analog_products where type=1 and (product_id='\".$product_id.\"' OR link_product_id='\".$product_id.\"')\";\n $query=$this->db->query($sql);\n if($row=$query->row){\n $f_product_id=$row['product_id'];\n }else{\n $f_product_id=$product_id;\n }\n \n $this->db->query(\"DELETE FROM analog_products WHERE type=1 and product_id = '\" . (int) $f_product_id . \"'\");\n if($iden[1]['code'] or $iden[1]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n VALUES (\"'.$f_product_id.'\",\"'.$key.'\",\"1\",\"'.$iden[1]['name'].'\",\"'.$iden[1]['code'].'\")');\n //echo 'INSERT INTO analog_products (product_id,link_product_id,type,name,code) \n //VALUES (\"'.$product_id.'\",\"'.$key.'\",\"1\",\"'.$iden[1]['name'].'\",\"'.$iden[1]['code'].'\")';\n }\n }\n if(isset($iden[2]['name'])){\n $sql=\"select * from analog_products where type=2 and (product_id='\".$product_id.\"' OR link_product_id='\".$product_id.\"')\";\n $query=$this->db->query($sql);\n if($row=$query->row){\n $f_product_id=$row['product_id'];\n }else{\n $f_product_id=$product_id;\n }\n $this->db->query(\"DELETE FROM analog_products WHERE type=1 and product_id = '\" . (int) $f_product_id . \"'\");\n if($iden[2]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name) \n VALUES (\"'.$f_product_id.'\",\"'.$key.'\",\"2\",\"'.$iden[2]['name'].'\")');\n //echo 'INSERT INTO analog_products (product_id,link_product_id,type,name) \n //VALUES (\"'.$product_id.'\",\"'.$key.'\",\"2\",\"'.$iden[2]['name'].'\")';\n }\n }\n if(isset($iden[3]['name'])){\n if($iden[3]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name) \n VALUES (\"'.$f_product_id.'\",\"'.$key.'\",\"3\",\"'.$iden[3]['name'].'\")');\n //echo 'INSERT INTO analog_products (product_id,link_product_id,type,name) \n //VALUES (\"'.$product_id.'\",\"'.$key.'\",\"3\",\"'.$iden[3]['name'].'\")';\n }\n }\n if(isset($iden[4]['name'])){\n if($iden[4]['name']){\n $this->db->query('INSERT INTO analog_products (product_id,link_product_id,type,name) \n VALUES (\"'.$f_product_id.'\",\"'.$key.'\",\"4\",\"'.$iden[4]['name'].'\")');\n //echo 'INSERT INTO analog_products (product_id,link_product_id,type,name) \n //VALUES (\"'.$product_id.'\",\"'.$key.'\",\"4\",\"'.$iden[4]['name'].'\")';\n }\n }\n //echo $iden[1]['code'].\"<br/>\";\n }\n \n\n //$this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_related WHERE product_id = '\" . (int) $product_id . \"'\");\n //$this->db->query(\"DELETE FROM analog_products where\");\n //foreach(){\n\n //}\n }\n */\n /*\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_reward WHERE product_id = '\" . (int) $product_id . \"'\");\n if (isset($data['product_reward'])) {\n foreach ($data['product_reward'] as $customer_group_id => $value) {\n if ((int) $value['points'] > 0) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_reward SET product_id = '\" . (int) $product_id . \"', customer_group_id = '\" . (int) $customer_group_id . \"', points = '\" . (int) $value['points'] . \"'\");\n }\n }\n }\n */\n /*\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"product_to_layout WHERE product_id = '\" . (int) $product_id . \"'\");\n\n if (isset($data['product_layout'])) {\n foreach ($data['product_layout'] as $store_id => $layout_id) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"product_to_layout SET product_id = '\" . (int) $product_id . \"', store_id = '\" . (int) $store_id . \"', layout_id = '\" . (int) $layout_id . \"'\");\n }\n }\n */\n $this->db->query(\"DELETE FROM \" . DB_PREFIX . \"url_alias WHERE query = 'product_id=\" . (int) $product_id . \"'\");\n\n if ($data['keyword']) {\n $this->db->query(\"INSERT INTO \" . DB_PREFIX . \"url_alias SET query = 'product_id=\" . (int) $product_id . \"', keyword = '\" . $this->db->escape($data['keyword']) . \"'\");\n }\n\n $this->db->query(\"DELETE FROM `\" . DB_PREFIX . \"product_recurring` WHERE product_id = \" . (int) $product_id);\n\n if (isset($data['product_recurring'])) {\n foreach ($data['product_recurring'] as $product_recurring) {\n $this->db->query(\"INSERT INTO `\" . DB_PREFIX . \"product_recurring` SET `product_id` = \" . (int) $product_id . \", customer_group_id = \" . (int) $product_recurring['customer_group_id'] . \", `recurring_id` = \" . (int) $product_recurring['recurring_id']);\n }\n }\n $this->setParamValues($product_id, $data);\n $this->cache->delete('product');\n }", "title": "" }, { "docid": "c40a337fbf6d1a9c0060195ded4a9eef", "score": "0.51571727", "text": "public function saveAction(): void\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => 'products',\n 'action' => 'index',\n ]);\n\n return;\n }\n\n $id = $this->request->getPost('id', 'int');\n $product = Products::findFirstById($id);\n if (!$product) {\n $this->flash->error('Product does not exist');\n\n $this->dispatcher->forward([\n 'controller' => 'products',\n 'action' => 'index',\n ]);\n\n return;\n }\n\n $form = new ProductsForm();\n $this->view->form = $form;\n $data = $this->request->getPost();\n\n if (!$form->isValid($data, $product)) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => 'products',\n 'action' => 'edit',\n 'params' => [$id],\n ]);\n\n return;\n }\n\n if (!$product->save()) {\n foreach ($product->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => 'products',\n 'action' => 'edit',\n 'params' => [$id],\n ]);\n\n return;\n }\n\n $form->clear();\n $this->flash->success('Product was updated successfully');\n\n $this->dispatcher->forward([\n 'controller' => 'products',\n 'action' => 'index',\n ]);\n }", "title": "" }, { "docid": "5e0b855f1330aea1c53585b0af403723", "score": "0.5143699", "text": "public function actionEditPrecioUnitario()\r\n {\r\n Yii::import('booster.components.TbEditableSaver');\r\n $es = new TbEditableSaver('DetalleCompra');\r\n //actualizando los calculos de precio unitario, subtotal y \r\n //total\r\n $es->onBeforeUpdate= function($event) {\r\n\r\n $model=$this->loadModel(yii::app()->request->getParam('pk')); //obteniendo el Model de detalleCompra\r\n $_precioUnitario= yii::app()->request->getParam('value');\r\n \r\n $_total= round($model->cantidad*$_precioUnitario,2);//calculando el subtotal\r\n $_subtotal= round($_total/((int)Yii::app()->params['impuesto']*0.01 + 1),2); //calculando impuesto\r\n $_impuesto= round($_total-$_subtotal,2); //calculando total\r\n \r\n $event->sender->setAttribute('subtotal', $_subtotal);//Actualizando Cantidad\r\n $event->sender->setAttribute('impuesto', $_impuesto);//Actualizando impuesto\r\n $event->sender->setAttribute('total', $_total); //actualizando total\r\n \r\n };\r\n \r\n //actualiza el estado del item de detalle de compra\r\n $es->onAfterUpdate= function($event) {\r\n\r\n $model=$this->loadModel(yii::app()->request->getParam('pk')); //obteniendo el Model de detalleCompra\r\n $model->actualizarEstado(); \r\n }; \r\n \r\n \r\n $es->update();\r\n // DetalleCompra::model()->actualizarEstado(yii::app()->request->getParam('pk'));\r\n }", "title": "" }, { "docid": "b4df2c87de5b108938bff1b29c189b20", "score": "0.5140309", "text": "public function updateProduct(){\n $data = $this->validate($this->rules);\n\n if($data['image']){\n //mandamos un messaje al usuario de que la imagen se esta procesando\n $this->processing = true;\n $image = $this->image;\n $name = substr( uniqid(rand(), true), 8,8 ).'.'.$image->getClientOriginalExtension();\n $img = Image::make($image->getRealPath())->encode('jpg', 65)->resize(600, null, function($c){\n $c->aspectRatio();\n $c->upsize();\n });\n $img->stream();\n Storage::disk('local')->put('public/images/'.$name, $img, 'public');\n $data['image'] = $name;\n $this->product->image = $data['image'];\n }\n\n // Actualizamos solo los campos rellenados por el admin\n $updateFields = array_filter($data, null);\n\n foreach( $updateFields as $key => $value){\n $this->product->$key = $value;\n $this->product->save();\n }\n\n $this->processing = false;\n\n return redirect()->route('admin-productos');\n }", "title": "" }, { "docid": "8c3fbfde633f076534d5ebc34a91e446", "score": "0.513747", "text": "protected function doSave(PropelPDO $con)\n\t{\n\t\t$affectedRows = 0; // initialize var to track total num of affected rows\n\t\tif (!$this->alreadyInSave) {\n\t\t\t$this->alreadyInSave = true;\n\n\t\t\tif ($this->isNew() ) {\n\t\t\t\t$this->modifiedColumns[] = ProductoPeer::ID_PRODUCTO;\n\t\t\t}\n\n\t\t\t// If this object has been modified, then save it to the database.\n\t\t\tif ($this->isModified()) {\n\t\t\t\tif ($this->isNew()) {\n\t\t\t\t\t$criteria = $this->buildCriteria();\n\t\t\t\t\tif ($criteria->keyContainsValue(ProductoPeer::ID_PRODUCTO) ) {\n\t\t\t\t\t\tthrow new PropelException('Cannot insert a value for auto-increment primary key ('.ProductoPeer::ID_PRODUCTO.')');\n\t\t\t\t\t}\n\n\t\t\t\t\t$pk = BasePeer::doInsert($criteria, $con);\n\t\t\t\t\t$affectedRows = 1;\n\t\t\t\t\t$this->setIdProducto($pk); //[IMV] update autoincrement primary key\n\t\t\t\t\t$this->setNew(false);\n\t\t\t\t} else {\n\t\t\t\t\t$affectedRows = ProductoPeer::doUpdate($this, $con);\n\t\t\t\t}\n\n\t\t\t\t$this->resetModified(); // [HL] After being saved an object is no longer 'modified'\n\t\t\t}\n\n\t\t\tif ($this->collDetalleFacturas !== null) {\n\t\t\t\tforeach ($this->collDetalleFacturas as $referrerFK) {\n\t\t\t\t\tif (!$referrerFK->isDeleted()) {\n\t\t\t\t\t\t$affectedRows += $referrerFK->save($con);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->collDetallePedidos !== null) {\n\t\t\t\tforeach ($this->collDetallePedidos as $referrerFK) {\n\t\t\t\t\tif (!$referrerFK->isDeleted()) {\n\t\t\t\t\t\t$affectedRows += $referrerFK->save($con);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->alreadyInSave = false;\n\n\t\t}\n\t\treturn $affectedRows;\n\t}", "title": "" }, { "docid": "7c2288b4564918f0fa2c55f7c9c84d41", "score": "0.5135838", "text": "public function actionCreate()\n {\n $model = new Products();\n $productsImage = new ProductsImage();\n $productAttributes = new ProductsAttributes();\n $modelProductsAttributesMultiple = new ProductsAttributesMultiple();\n\n if ($model->load(Yii::$app->request->post())) {\n if (Yii::$app->request->post('Products')['subcategory_id'] == 'prompt') $model->subcategory_id = null;\n if (!empty(Yii::$app->request->post('Products')['dollar_price'])) {\n $dollarsInDollars = Yii::$app->request->post('Products')['dollar_price'];\n $courseModel = new CourseDollar();\n $course = $courseModel->getCourse();\n if (is_null($course)) {\n Yii::$app->getSession()->setFlash('error', 'Вы пытаетесь добавить продукт по курсу доллара. Пожалуйста, выставите курс доллара и сделайте попытку сново.');\n return $this->redirect(['create']);\n }\n\n $uaPrice = $dollarsInDollars * $course;\n $model->price = $uaPrice;\n }\n\n $model->date = date(\"Y-m-d H:i:s\");\n $model->user_added = Yii::$app->user->id;\n $model->image = UploadedFile::getInstances($model, 'image');\n\n if ($model->save()) {\n if (!is_null($model->image)) {\n $model->uploadImages();\n $productId = $model->getPrimaryKey();\n\n //save colors to table\n $choosedColors = Yii::$app->request->post('Products')['colors'];\n if (!empty($choosedColors)) {\n $colors = array();\n foreach ($choosedColors as $color) {\n $colors[] = array(\n 'color_id' => $color,\n 'product_id' => (int)$productId\n );\n }\n Yii::$app->db->createCommand()->batchInsert(\n ProductColorsRelations::tableName(),\n ['color_id', 'product_id'],\n $colors\n )->execute();\n }\n\n //save product attributes\n $productAttributes->load(Yii::$app->request->post());\n $productAttributes->product_id = $productId;\n $productAttributes->save();\n\n if (!empty(Yii::$app->request->post('ProductsAttributesMultiple'))) {\n $postMultipleAttributesData = Yii::$app->request->post('ProductsAttributesMultiple');\n $multipleAttributes = array();\n $i = 0;\n foreach ($postMultipleAttributesData as $key => $attributesData) {\n foreach ($attributesData as $data) {\n if ($key == 'frame_number') {\n $multipleAttributes[] = array(\n 'product_id' => $productId,\n 'frame_number' => $data,\n );\n }\n if ($key == 'engine_number') {\n $multipleAttributes[$i]['engine_number'] = $data;\n $i++;\n }\n }\n }\n\n Yii::$app->db->createCommand()->batchInsert(\n ProductsAttributesMultiple::tableName(),\n ['product_id', 'frame_number', 'engine_number'],\n $multipleAttributes\n )->execute();\n }\n }\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n Yii::$app->getSession()->setFlash('error', 'Произошла ошибка при добавление товара, пожалуйста повторите сново.');\n }\n }\n\n $modelCategories = new Categories();\n $modelMarks = new Marks();\n $modelColors = new ProductColors();\n\n $allCategories = $modelCategories->getArrayDropDownCategories();\n $allMarks = $modelMarks->getArrayDropDownMarks();\n $productStatus = $model->getStatusToDropDownList();\n $productColors = $modelColors->getArrayDropDownColors();\n\n //подключаем JS\n \\Yii::$app->getView()->registerJsFile('@web/js/products/subcategoriesDropDown.js', ['depends' => [\\yii\\web\\JqueryAsset::className()]]);\n\n return $this->render('create', [\n 'productsImage' => $productsImage,\n 'productStatus' => $productStatus,\n 'allMarks' => $allMarks,\n 'allCategories' => $allCategories,\n 'productColors' => $productColors,\n 'productAttributes' => $productAttributes,\n 'modelProductsAttributesMultiple' => $modelProductsAttributesMultiple,\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "a2c00726b380fb8da6ed75922094468f", "score": "0.51355237", "text": "public function actionCreate()\n {\n \t\n $model = new Product();\n $media = new Media([\n 'scenario' => 'add'\n ]);\n \n $list = [];\n $productPrice = new ProductPrice();\n $db = \\yii::$app->db;\n $post = Yii::$app->request->post();\n $transaction = $db->beginTransaction();\n try {\n if ($model->load(Yii::$app->request->post())) {\n if (! empty($_POST['Product']['package']) && ! empty($_POST['Product']['package_quantity'])) {\n foreach ($_POST['Product']['package'] as $key => $package) {\n $data['package'] = $package;\n $data['quantity'] = $_POST['Product']['package'][$key];\n $list[] = $data;\n }\n \n if (! empty($list)) {\n $model->package_detail = json_encode($list);\n }\n }\n \n $subCategory = SubCategory::find()->where([\n 'id' => $model->sub_category_id\n ])->one();\n // if (! empty($subCategory)) {\n // $model->category_id = $subCategory->category_id;\n // }\n \n if (! empty($model->product_ids) && (is_array($model->product_ids))) {\n $model->product_ids = implode(',', $model->product_ids);\n }\n \n if ($model->save()) {\n \n if ($media->saveMultipleFile($media, $model, 'file_name')) {\n if (! empty($post['ProductPrice']['min_quantity']) && ! empty($post['ProductPrice']['max_quantity']) && ! empty($post['ProductPrice']['price'])) {\n foreach ($post['ProductPrice']['min_quantity'] as $key => $minQuantity) {\n if (! empty($minQuantity) && ! empty($post['ProductPrice']['max_quantity'][$key]) && ! empty($post['ProductPrice']['price'][$key])) {\n $price = new ProductPrice();\n $price->product_id = $model->id;\n $price->min_quantity = $minQuantity;\n $price->title = $model->title;\n $price->max_quantity = $post['ProductPrice']['max_quantity'][$key];\n $price->price = $post['ProductPrice']['price'][$key];\n \n if (! empty($model->keywords)) {\n foreach ($model->keywords as $keyword) {\n $keyModel = new Keyword();\n $keyModel->title = $keyword;\n $keyModel->model_id = $model->id;\n $keyModel->model_type = get_class($model);\n $keyModel->save();\n }\n }\n \n if (! $price->save()) {\n \\yii::$app->session->setFlash('danger', \\yii::t('app', $price->errorString()));\n return $this->render('create', [\n 'model' => $model,\n 'media' => $media,\n 'productPrice' => $productPrice\n ]);\n }\n }\n }\n }\n $transaction->commit();\n return $this->redirect([\n 'view',\n 'id' => $model->id\n ]);\n } else {\n \\yii::$app->session->setFlash('danger', \\yii::t('app', \"File Not Uploaded\"));\n }\n } else {\n \\yii::$app->session->setFlash('danger', $model->errorString());\n }\n }\n } catch (\\Exception $e) {\n $transaction->rollback();\n \\yii::$app->session->setFlash('danger', $e->getMessage());\n }\n \n return $this->render('create', [\n 'model' => $model,\n 'media' => $media,\n 'productPrice' => $productPrice\n ]);\n }", "title": "" }, { "docid": "5dcb8cb56f47364be988d129633ff3cb", "score": "0.5133547", "text": "private function saveProduct($request, $product = null)\n {\n if(is_null($product))\n $product = Auth::user()->products()->create($request->all());\n else\n $product->update($request->all());\n\n // Options & Variations\n if($request->has('has_variations')){\n\n // Options\n $options_ids = [];\n\n foreach ($request->input('options') as $option) {\n\n $existing_option = Option::where('title', $option['title'])->get();\n\n if($existing_option->isEmpty()){\n\n $newOption = Option::create(['title' => $option['title']]);\n\n $options_ids[] = $newOption->id;\n\n }else{\n\n $options_ids[] = $existing_option->first()->id;\n\n $newOption = $existing_option->first();\n\n foreach ($newOption->values as $value) {\n\n $value->delete();\n\n }\n\n }\n\n foreach ($option['values'] as $value) {\n\n $newValue = $newOption->values()->create(['title' => $value]);\n\n }\n\n }\n\n $product->options()->sync($options_ids);\n\n // Variations\n if($product->variations->count() > 0){\n\n $product->variations()->detach();\n\n foreach ($product->variations as $variation) {\n $variation->delete();\n }\n\n }\n\n $variations_ids = [];\n foreach ($request->input('variations_list') as $variation) {\n\n $sale_price = ($variation['sale_price'] != '') ? $variation['sale_price'] : null;\n $code = ($variation['code'] != '') ? $variation['code'] : null;\n\n $newVariation = Variation::create([\n 'code' => $code,\n 'title' => $variation['title'],\n 'regular_price' => $variation['regular_price'],\n 'sale_price' => $sale_price,\n 'stock' => $variation['stock'],\n 'length' => $request->input('length'),\n 'height' => $request->input('height'),\n 'width' => $request->input('width'),\n 'weight' => $request->input('weight')\n ]);\n\n $variations_ids[] = $newVariation->id;\n\n }\n\n }else{\n\n $sale_price = ($request->input('sale_price') != '') ? $request->input('sale_price') : null;\n $code = ($request->input('code') != '') ? $request->input('code') : null;\n\n $newVariation = Variation::create([\n 'code' => $code,\n 'title' => $request->input('title'),\n 'regular_price' => $request->input('regular_price'),\n 'sale_price' => $sale_price,\n 'stock' => $request->input('stock'),\n 'length' => $request->input('length'),\n 'height' => $request->input('height'),\n 'width' => $request->input('width'),\n 'weight' => $request->input('weight')\n ]);\n\n $variations_ids[] = $newVariation->id;\n\n }\n\n $product->variations()->sync($variations_ids);\n\n // Photos\n if($request->hasFile('photos')){\n\n $medias_ids = [];\n\n foreach ($request->file('photos') as $photo) {\n\n $url = $photo->store('public/products/'.Auth::user()->username);\n\n $media = Media::create([\n 'title' => $photo->getClientOriginalName(),\n 'original_name' => $photo->getClientOriginalName(),\n 'url' => str_replace('public/', '', $url),\n 'type' => 'image'\n ]);\n\n $medias_ids[] = $media->id;\n\n }\n\n }\n\n // Video\n if($request->has('video')){\n\n $existing_media = Media::where('url', $request->input('video'))->get();\n\n if($existing_media->isEmpty()){\n\n $media = Media::create([\n 'title' => $product->title,\n 'original_name' => $product->title,\n 'url' => $request->input('video'),\n 'type' => 'youtube'\n ]);\n\n $medias_ids[] = $media->id;\n\n }else{\n\n $medias_ids[] = $existing_media->first()->id;\n\n }\n\n }\n\n // Existing Photos\n if($request->has('existing_photos')){\n\n foreach($request->input('existing_photos') as $existing_photo_id){\n $medias_ids[] = $existing_photo_id;\n }\n\n }\n\n $product->medias()->sync($medias_ids);\n\n // Categories\n $product->categories()->sync($request->input('category_list'));\n\n // Characteristics\n $product->characteristics()->sync($request->input('characteristic_list'));\n\n return $product;\n }", "title": "" }, { "docid": "4a59754833ba58383a603457393d6fe0", "score": "0.5133387", "text": "static public function mdlEditarProducto($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET id_categoria = :id_categoria, id_subcategoria = :id_subcategoria, tipo = :tipo, ruta = :ruta, estado = :estado, titulo = :titulo, titular = :titular, descripcion = :descripcion, multimedia = :multimedia, detalles = :detalles, precio = :precio, portada = :portada, oferta = :oferta, precioOferta = :precioOferta, descuentoOferta = :descuentoOferta, imgOferta = :imgOferta, finOferta = :finOferta, peso = :peso, entrega = :entrega WHERE id = :id\");\n\n\t\t$stmt->bindParam(\":id_categoria\", $datos[\"idCategoria\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_subcategoria\", $datos[\"idSubCategoria\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":tipo\", $datos[\"tipo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":ruta\", $datos[\"ruta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":titulo\", $datos[\"titulo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":titular\", $datos[\"titular\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":multimedia\", $datos[\"multimedia\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":detalles\", $datos[\"detalles\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":precio\", $datos[\"precio\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":portada\", $datos[\"imgFotoPrincipal\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":oferta\", $datos[\"oferta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":precioOferta\", $datos[\"precioOferta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":descuentoOferta\", $datos[\"descuentoOferta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":imgOferta\", $datos[\"imgOferta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":finOferta\", $datos[\"finOferta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":peso\", $datos[\"peso\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":entrega\", $datos[\"entrega\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "7e60fbee1762f395d546d4773fed19da", "score": "0.5133314", "text": "function editar(){\n $categorias = $this->CategoriasModel->getCategorias();\n\n $this->set(\"categorias\", $categorias);\n //Carrega informações do produto desejado de acordo com seu id\n $produto = $this->ProdutosModel->getProdutoById($_GET['id']);\n\n $this->set(\"produto\", $produto);\n\n if(isset($_POST['editarProduto'])):\n try{\n if(empty($_POST['nome']) || empty($_POST['descricao']) || empty($_POST['valor']) || empty($_POST['quantidade']))\n throw new Exception(\"Não deixe nenhum campo vazio\");\n\n if(!empty($_FILES['imagem']['name'])):\n\n $thumb = $this->checkImage($_FILES['imagem']['type'], $_FILES['imagem']['name'], $_FILES['imagem']['tmp_name']);\n\n if(!$thumb)\n throw new Exception(\"Imagem invalida!\");\n\n $dados = [\"nome_produto\" => $_POST['nome'], \"valor\" => $_POST['valor'], \"descricao\" => $_POST['descricao'], \"id_categoria\" => $_POST['categoria'], \"thumb\" => $thumb, \"estoque\" => $_POST['quantidade'], \"promo\" => $_POST['promo']];\n\n $this->ProdutosModel->updateProduto($dados, $_GET['id']);\n\n header(\"Location: index.php?page=produtos\");\n else:\n $dados = [\"nome_produto\" => $_POST['nome'], \"valor\" => $_POST['valor'], \"descricao\" => $_POST['descricao'], \"id_categoria\" => $_POST['categoria'], \"estoque\" => $_POST['quantidade'], \"promo\" => $_POST['promo']];\n\n $this->ProdutosModel->updateProduto($dados, $_GET['id']);\n\n header(\"Location: index.php?page=produtos\");\n endif;\n }catch(Exception $e){\n MsgHandler::setError($e->getMessage());\n }\n endif;\n\n }", "title": "" }, { "docid": "5a30e786f19c2ba9731442b354f51a34", "score": "0.51264143", "text": "protected function _afterSave(\\Magento\\Framework\\Model\\AbstractModel $object)\n {\n\n $productsData = [];\n if ($object->getIsDirectRestock() != 3) :\n $productIds = $this->productIds;\n $requestProductData = $this->requestProductData;\n $connection = $this->getConnection();\n $requisitionItemsTable = $this->getTable(self::TBL_REQUISITION_ITEMS);\n $connection->delete($requisitionItemsTable, [$requisitionItemsTable . '.requisition_id = ?' => (int)$object->getId(), $requisitionItemsTable . '.item_id IN (?)' => $productIds]);\n if ($object->getRequisitionType() == 3)\n return parent::_afterSave($object);\n $collection = $this->productCollectionFactory->create();\n $collection->addAttributeToSelect(['name', 'sku'])->addAttributeToFilter('entity_id', array('in' => $productIds));\n if ($object->getCompanyId() != null) {\n $collection->getSelect()->joinLeft(\n ['companies_items' => $this->getTable('safetyhubapp_companies_partnumbers')],\n 'companies_items.default_sku = e.sku AND companies_items.row_id =' . (int) $object->getCompanyId(),\n ['companies_items.company_sku', 'companies_items.title']\n );\n }\n if ($collection->getSize() > 0) {\n foreach ($collection as $product) {\n if (isset($requestProductData[$product['entity_id']]))\n $productRequestData = $requestProductData[$product['entity_id']];\n $productsData[] = [\n 'requisition_id' => (int) $object->getId(),\n 'safetyitem_id' => (int) $object->getSafetyItemId(),\n 'item_id' => (int) $productRequestData['product_id'],\n 'sku' => $product->getSku(),\n 'company_sku' => $product->getCompanySku(),\n 'name' => $product->getName(),\n 'company_name' => $product->getTitle(),\n 'qty' => (int) $productRequestData['qty'],\n 'restock_qty' => $productRequestData['restock_qty'] ?? 0,\n 'price' => $productRequestData['unit_price']\n ];\n }\n }\n if (count($productsData) > 0) {\n $connection->insertMultiple($requisitionItemsTable, $productsData);\n }\n return parent::_afterSave($object);\n endif;\n }", "title": "" }, { "docid": "4442211ef621bea7b5de33cd5b170fd7", "score": "0.51263", "text": "public function saveActionLineItems () {\n if ($this->type === 'products') {\n $dummyQuote = $this->getActionsDummyQuote ();\n if (!$dummyQuote->hasLineItemErrors && \n $dummyQuote->save ()) {\n\n $dummyQuote->disableBehavior ('changelog');\n $dummyQuote->saveLineItems ();\n // use updateByPk to prevent infinite looping (this method is called from\n // afterSave, which is itself called by update and save)\n $this->updateByPk ($this->id, array (\n 'quoteId' => $dummyQuote->id,\n ));\n }\n }\n }", "title": "" }, { "docid": "d83159d1ed0bb7c6ed1ef3df59d7c980", "score": "0.5124092", "text": "public function addOrEditProduct(productoModel $Product)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif($Product->ID > 0)\n\t\t\t\t{\n\t\t\t\t\t$query = \"UPDATE PRODUCTOS SET SECCION = :seccion, NOMBRE = :nombre,\n\t\t\t\t\t\t\t FOTO = :foto WHERE ID = :id\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$query = \"INSERT INTO PRODUCTOS(SECCION, NOMBRE, FOTO) \n\t\t\t\t\t\t\t VALUES(:seccion, :nombre, :foto)\";\n\t\t\t\t}\n\n\t\t\t\t$consulta = $this->db->prepare($query);\n\t\t\t\t($Product->ID > 0) ? $consulta->bindValue(':id', $Product->ID):'';\n\t\t\t\t$consulta->bindValue(':seccion', $Product->SECCION);\n\t\t\t\t$consulta->bindValue(':nombre', $Product->NOMBRE);\n\t\t\t\t$consulta->bindValue(':foto', $Product->FOTO);\n\n\t\t\t\tif($consulta->execute())\n\t\t\t\t{\n\t\t\t\t\tif($consulta->rowCount() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\tdie(\"Error: {$e->getMessage()}\");\n\t\t\t}\t\t\t\n\t\t}", "title": "" }, { "docid": "c6718fc0dc8fc87d258caee90b659554", "score": "0.5108253", "text": "public function store(Request $request)\n {\n $venta = new Venta($request->all());\n $venta->fecha = \\Carbon\\Carbon::parse($venta->fecha)->format('Y-m-d');\n $venta->monto = 0;\n $venta->cliente_id= 10;\n $venta->user_id = $request->idu;\n $cliente = Cliente::find(10);\n $cliente->ventas()->save($venta);\n $user = User::find($request->idu);\n $user->ventas()->save($venta);\n foreach ($request->productos as $idx=> $producto){\n $prod = Producto::find($producto);\n $stock=Stock::find($prod->stock_id);\n if($request->cantidad[$idx]<=$stock->cantidad){\n foreach ($request->productos as $idx=> $producto){\n $lv = new Linea_venta();\n $prod = Producto::find($producto);\n $lv->cantidad = $request->cantidad[$idx];\n $lv->subTotal = $prod->precio_venta*$request->cantidad[$idx];\n $lv->producto_id = $prod->id;\n $lv->venta_id = $venta->id;\n $stock=Stock::find($prod->stock_id);\n $stock->cantidad = $stock->cantidad-$request->cantidad[$idx];\n $stock->save();\n $lv->save();\n }\n foreach($venta->lineaVentas as $l){\n $venta->monto = $venta->monto + $l->subTotal; \n $venta->lineaventas()->save($l);\n }\n $venta->save();\n // dd($venta);\n flash(\"Se creo la Venta del Empleado: \" . $venta->user->name. \" correctamente y se actualizao la base de datos del producto!\")->success();\n return redirect(route('ventaContado.index'));\n }\n else {\n $venta->forceDelete();\n flash(\"Error: la cantidad del producto \" . $prod->descripcion. \" es superior a su stock existente, STOCK:\".$stock->cantidad)->error();\n return redirect(route('ventaContado.index'));\n }\n\n }\n\n \n }", "title": "" }, { "docid": "2220b3fa946fa4ef2c7fdea2e4f78b9e", "score": "0.5102504", "text": "public function edit(Producto $producto)\n {\n \n }", "title": "" }, { "docid": "d7c0194dc49997eb045a015f0da17f29", "score": "0.51022834", "text": "protected function doSave(PropelPDO $con)\n\t{\n\t\t$affectedRows = 0; // initialize var to track total num of affected rows\n\t\tif (!$this->alreadyInSave) {\n\t\t\t$this->alreadyInSave = true;\n\n\t\t\t// We call the save method on the following object(s) if they\n\t\t\t// were passed to this object by their coresponding set\n\t\t\t// method. This object relates to these object(s) by a\n\t\t\t// foreign key reference.\n\n\t\t\tif ($this->aUsuario !== null) {\n\t\t\t\tif ($this->aUsuario->isModified() || $this->aUsuario->isNew()) {\n\t\t\t\t\t$affectedRows += $this->aUsuario->save($con);\n\t\t\t\t}\n\t\t\t\t$this->setUsuario($this->aUsuario);\n\t\t\t}\n\n\t\t\tif ($this->aProspectTipo !== null) {\n\t\t\t\tif ($this->aProspectTipo->isModified() || $this->aProspectTipo->isNew()) {\n\t\t\t\t\t$affectedRows += $this->aProspectTipo->save($con);\n\t\t\t\t}\n\t\t\t\t$this->setProspectTipo($this->aProspectTipo);\n\t\t\t}\n\n\t\t\tif ($this->isNew() ) {\n\t\t\t\t$this->modifiedColumns[] = ProspectContatoPeer::ID;\n\t\t\t}\n\n\t\t\t// If this object has been modified, then save it to the database.\n\t\t\tif ($this->isModified()) {\n\t\t\t\tif ($this->isNew()) {\n\t\t\t\t\t$pk = ProspectContatoPeer::doInsert($this, $con);\n\t\t\t\t\t$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which\n\t\t\t\t\t\t\t\t\t\t // should always be true here (even though technically\n\t\t\t\t\t\t\t\t\t\t // BasePeer::doInsert() can insert multiple rows).\n\n\t\t\t\t\t$this->setId($pk); //[IMV] update autoincrement primary key\n\n\t\t\t\t\t$this->setNew(false);\n\t\t\t\t} else {\n\t\t\t\t\t$affectedRows += ProspectContatoPeer::doUpdate($this, $con);\n\t\t\t\t}\n\n\t\t\t\t$this->resetModified(); // [HL] After being saved an object is no longer 'modified'\n\t\t\t}\n\n\t\t\tif ($this->collProspects !== null) {\n\t\t\t\tforeach ($this->collProspects as $referrerFK) {\n\t\t\t\t\tif (!$referrerFK->isDeleted()) {\n\t\t\t\t\t\t$affectedRows += $referrerFK->save($con);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->collProspectContatoDetalhes !== null) {\n\t\t\t\tforeach ($this->collProspectContatoDetalhes as $referrerFK) {\n\t\t\t\t\tif (!$referrerFK->isDeleted()) {\n\t\t\t\t\t\t$affectedRows += $referrerFK->save($con);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->alreadyInSave = false;\n\n\t\t}\n\t\treturn $affectedRows;\n\t}", "title": "" }, { "docid": "cfdf00dfd135dd39406f9c6cb47d2a4a", "score": "0.5090379", "text": "public function formEditar($codigoproducto=''){\n\t\t$objModel = $this->loadModel('producto');\n\t\t$this->_view->dataProducto = $objModel->obtenerProducto($codigoproducto);\n\t\t$this->_view->renderizar('saedit',true);\n\t}", "title": "" }, { "docid": "0d4f91efa8b1c74e5f50b703b1f8e2d8", "score": "0.5085699", "text": "public function SaveBalancoAcoes() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstOrdemProducaoGrade) $this->objBalancoAcoes->OrdemProducaoGradeId = $this->lstOrdemProducaoGrade->SelectedValue;\n\t\t\t\tif ($this->lstFluxogramaItemReal) $this->objBalancoAcoes->FluxogramaItemRealId = $this->lstFluxogramaItemReal->SelectedValue;\n\t\t\t\tif ($this->txtQuantidadeDisponivel) $this->objBalancoAcoes->QuantidadeDisponivel = $this->txtQuantidadeDisponivel->Text;\n\t\t\t\tif ($this->txtQuantidadeRemetida) $this->objBalancoAcoes->QuantidadeRemetida = $this->txtQuantidadeRemetida->Text;\n\t\t\t\tif ($this->txtQuantidadeProduzida) $this->objBalancoAcoes->QuantidadeProduzida = $this->txtQuantidadeProduzida->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the BalancoAcoes object\n\t\t\t\t$this->objBalancoAcoes->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5c786db6cfc6841f5823c1e56837007a", "score": "0.50825095", "text": "public function save(){\n Utils::isAdmin();\n\n if (isset($_POST)) {\n $nombre = isset($_POST['nombre']) ? $_POST['nombre']:false;\n $descripcion = isset($_POST['descripcion']) ? $_POST['descripcion']:false;\n $precio = isset($_POST['precio']) ? $_POST['precio']:false;\n $stock = isset($_POST['stock']) ? $_POST['stock']:false;\n $categoria = isset($_POST['categoria']) ? $_POST['categoria']:false;\n //$imagen = isset($_POST['imagen']) ? $_POST['imagen']:false;\n if ($nombre && $descripcion && $precio && $stock && $categoria) {\n $producto = new Producto();\n $producto->setNombre($nombre);\n $producto->setDescripcion($descripcion);\n $producto->setPrecio($precio);\n $producto->setStock($stock);\n $producto->setCategoria_id($categoria);\n \n //para guardar la imagen\n if (isset($_FILES['imagen'])) {\n $file = $_FILES['imagen'];\n $filename = $file['name'];\n $mimetype = $file['type'];\n if ($mimetype=='image/jpg' || $mimetype=='image/jpeg' || $mimetype=='image/png' || $mimetype=='image/gif') {\n if (!is_dir('upload/images')) {\n mkdir('upload/images',0777,true);\n }\n move_uploaded_file($file['tmp_name'],'upload/images/'.$filename);\n $producto->setImagen($filename);\n }\n }\n //comprobar si viene con id\n if (isset($_GET['id'])) {\n $id= $_GET['id'];\n $producto->setId($id);\n $save = $producto->edit();\n }else{\n $save = $producto->save();\n }\n\n\n if ($save) {\n $_SESSION['producto'] = \"complete\";\n }else{\n $_SESSION['producto'] = \"failed\";\n }\n }else{\n $_SESSION['producto'] = \"failed\";\n }\n }else{\n $_SESSION['producto'] = \"failed\";\n }\n header('location:'.base_url.'producto/gestion');\n }", "title": "" }, { "docid": "cd1acdaf5874c5c0639e158691b69b63", "score": "0.5081193", "text": "public function assignProductList()\n {\n $hookExecuted = false;\n Hook::exec('actionProductListOverride', array(\n 'nbProducts' => &$this->nbProducts,\n 'catProducts' => &$this->cat_products,\n 'hookExecuted' => &$hookExecuted,\n ));\n\n // The hook was not executed, standard working\n if (!$hookExecuted || is_null($this->nbProducts))\n {\n $this->context->smarty->assign('categoryNameComplement', '');\n $this->nbProducts = $this->category->getProducts(null, null, null, $this->orderBy, $this->orderWay, true);\n $this->pagination((int)$this->nbProducts); // Pagination must be call after \"getProducts\"\n $this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay);\n }\n // Hook executed, use the override\n else\n // Pagination must be call after \"getProducts\"\n $this->pagination($this->nbProducts);\n\n Hook::exec('actionProductListModifier', array(\n 'nb_products' => &$this->nbProducts,\n 'cat_products' => &$this->cat_products,\n ));\n\n foreach ($this->cat_products as &$product)\n if ($product['id_product_attribute'] && isset($product['product_attribute_minimal_quantity']))\n $product['minimal_quantity'] = $product['product_attribute_minimal_quantity'];\n\n $this->addColorsToProductList($this->cat_products);\n\n $this->context->smarty->assign('nb_products', $this->nbProducts);\n }", "title": "" }, { "docid": "d022de10443a53d3499d9dbbcb99842c", "score": "0.5073247", "text": "function plgVmCloneProduct($product)\n\t{\n\t die(__FILE__ .' '. __LINE__ );\n\n $product_id=$product->originId;\n\n\t\tif(empty($product->customfields)){\n\t\t\tif(!empty($product_id))$customfields=$this->getProductCustomFields($product_id);\n\t\t}\n\t\telse $customfields=$product->customfields;\n\n\t\t//get the next customfield_id - autoincrement\n\t\t$db=JFactory::getDbo();\n\t\t$query=\"SHOW TABLE STATUS LIKE '\".$db->getPrefix().\"virtuemart_product_customfields'\";\n\t\t$db->setQuery($query);\n\t\ttry {\n\t\t\t$db->execute();\n\t\t\t$tableStatus=$db->loadObject();\n\t\t\t$last_virtuemart_customfield_id=$tableStatus->Auto_increment;\n\t\t\tif(empty($last_virtuemart_customfield_id))return;\n\t\t}\n\t\tcatch(RuntimeException $e) {\n\t\t\tJLog::add(sprintf('CF4All Error cloning Product : ERROR: %s',$e->getMessage()));\n\t\t\tvmdebug('CF4All Error cloning Product : ERROR: %s',$e->getMessage());\n\t\t}\n\n $new_entry=(int)$last_virtuemart_customfield_id-count($customfields);\n $new_product_id_entry=$product->virtuemart_product_id;\n\n\t\tfor($i=0; $i<count($customfields); $i++){\n\t\t\t$cf=$customfields[$i];\n\n\t\t\tif($cf->custom_element=='customfieldsforall'){\n\t\t\t\t//insert it to the our tables\n\t\t\t\t$custom_id=$cf->virtuemart_custom_id;\n\t\t\t\t$customfield=Customfield::getInstance($custom_id);\n\t\t\t\t//if we could not get the original product id\n\t\t\t\tif(empty($product_id))$product_id=$customfield->getProductFromCustomfield_id($cf->virtuemart_customfield_id);\n\t\t\t\t$product_assigned_id=$customfield->getProductCustomValues($product_id,'p_cf.customsforall_value_id',$customfield_id=$cf->virtuemart_customfield_id);\n\t\t\t\t$customfield->storeProductValues($product_assigned_id, $new_product_id_entry,$new_entry);\n\t\t\t}\n\t\t\t$new_entry++;\n\t\t}\n\t}", "title": "" }, { "docid": "e22e3163892a58e988efdcbd7b67781a", "score": "0.5072957", "text": "public function updatep1(Request $request, $id)\n {\n $devolucion=Devolucion::find($id);\n $devolucion->fill([\n 'estado_devolucion' => 2,\n ]);\n $devolucion->save();\n $desucursal=$devolucion->desde_sucursal;\n $bodega=$devolucion->hacia;\n \n //Buscando productos en devolucion agregados\n $productodevolucion=ProductoDevolucion::with(\"NombreProducto\")->where('id_devolucion',$id)->get();\n\n foreach ($productodevolucion as $productodevo) {\n //Reduciendo stock desde los productos vendidos\n if($bodega==105){\n\n //Sumar a bodega\n $stockdefectuoso=StockDefectuoso::where('id_producto',$productodevo->id_producto)->first();\n\n if(!is_null($stockdefectuoso) ){\n $stockactual=$stockdefectuoso->stock;\n $sumastock=$stockactual+$productodevo->cantidad;\n $stockdefectuoso->fill([\n 'stock' => $sumastock,\n 'fecha_entrega' => Carbon::now(),\n ]);\n $stockdefectuoso->save();\n\n } else{\n StockDefectuoso::create([\n 'id_producto' => $productodevo->id_producto,\n 'stock' => $productodevo->cantidad,\n 'fecha_entrega' => Carbon::now(),\n 'estado_producto' => 1,\n ]);\n }\n \n\n //Restar de bodega\n $stockproducto=StockProducto::where('id_producto',$productodevo->id_producto)->first();\n\n if(!is_null($stockproducto) ){\n $stockactual=$stockproducto->stock;\n $restartock=$stockactual-$productodevo->cantidad;\n $stockproducto->fill([\n 'stock' => $restartock,\n ]);\n $stockproducto->save();\n\n }\n \n\n\n }\n \n\n }\n\n\n }", "title": "" }, { "docid": "58dc7ad4e93eea8391d6046bd94ae3be", "score": "0.5071185", "text": "public function createEditProduct(){\n\t\t\n\t\t$isValid = true;\n\t\t$errors = 'Los siguientes campos presentan errores: <ul>';\n\t\t$product = new \\Models\\Product();\n\t\t\n\t\tif (isset($_POST['id']) && strcmp(\"\", trim($_POST['id'])) != 0 ){\n\t\t\t$product = \\Models\\Product::findById($_POST['id']);\n\t\t}\t\t\n\t\t\n\t\tif (!isset($product)){\n\t\t\t$product = new \\Models\\Product();\n\t\t}\n\t\t\n\t\tif (isset($_POST['name']) && strcmp(\"\", trim($_POST['name'])) != 0){\n\t\t\t$product->setName($_POST['name']);\n\t\t\t\n\t\t}else{\n\t\t\t$errors.= \"<li> nombre producto </li>\";\n\t\t\t$isValid = false;\n\t\t}\n\t\t\n\t\tif (isset($_POST['keyProduct']) && strcmp(\"\", trim($_POST['keyProduct'])) != 0){\n\t\t\t$product->setKeyProduct($_POST['keyProduct']);\n\t\t\t\n\t\t}else{\n\t\t\t$errors.= \"<li> clave producto </li>\";\n\t\t\t$isValid = false;\n\t\t}\n\t\t\n\t\tif ($isValid){\n\t\t\t\t\n\t\t\t$response = $product->saveOrUpdate();\n\t\t\t\t\n\t\t\tif ( $response === true || $response == 1){\n\t\t\t\t$keyU = $product->getKeyProduct();\n\t\t\t\t$uriCancel = \\App\\Route::getForNameRoute(\\App\\Route::GET, 'products');\n\t\t\n\t\t\t\t$msg = \"¡Producto $keyU creado/actualizado correctamente! <br><br/>\n\t\t\t\t<a class='btn btn-danger' href='$uriCancel' >Regresar a búsqueda</a> \";\n\t\t\t\treturn json_encode(array('msgDefault'=> $msg));\n\t\t\t}else{\n\t\t\n\t\t\t\treturn json_encode(array('msgError'=>$response));\n\t\t\t}\n\t\t}else{\n\t\t\t$errors.= '</ul>';\n\t\t\treturn json_encode(array('msgError'=>$errors));\n\t\t}\n\t}", "title": "" }, { "docid": "24000289a7af482343f79e54390dca55", "score": "0.50690514", "text": "public function DeleteListaProducto() {\n\t\t\t$this->objListaProducto->Delete();\n\t\t}", "title": "" }, { "docid": "83a79f6db5fd4125aa52e7dfddeeefe7", "score": "0.50630486", "text": "public function update($producto)\n {\n\t\t // mapear la tabla intermedia.\n \t\t \n \t\t $em = $this->getEntityManager();\t \n\t\t $em->persist($em->merge($producto));\n $em->flush();\n }", "title": "" }, { "docid": "c26d11b61d633a23d3b9325f6e2dd7ed", "score": "0.50513875", "text": "public function update_combinations() {\r\n\t\t$data = array();\r\n\t\t$lang = $this->language->load(StockModuleConstants::$STOCK_LANGUAGE_FILE);\r\n\t\t$model = $this->loadStockModel();\r\n\t\t\r\n\t\t$product_id = $this->request->post['product_id'];\r\n\t\t\r\n\t\t// check if user has permission to access this page\r\n\t\tif (!$this->user->hasPermission('modify', StockModuleConstants::$STOCK_MODULE_PERMISSION)) {\r\n\t\t\t$this->error['warning'] = $lang['sm_error_permission'];\r\n\t\t}\r\n\t\t\t\r\n\t\t// check that the quantity values are valid numbers\r\n\t\tif (!$this->error && isset($this->request->post['product_combinations'])) {\r\n\t\t\t$combinations = $this->request->post['product_combinations'];\r\n\t\t\t\r\n\t\t\t$row = 0;\r\n\t\t\tforeach ($combinations as $combination) {\r\n\t\t\t\t$quantity = $combination['quantity'];\r\n\t\t\t\tif (!is_numeric($quantity)) {\r\n\t\t\t\t\t$this->error['quantity'][$row] = true; \r\n\t\t\t\t}\telse if ($quantity < 0) {\r\n\t\t\t\t\t$this->error['quantity'][$row] = true; \r\n\t\t\t\t}\r\n\t\t\t\t$row++;\r\n\t\t\t}\r\n\t\t\tif (isset($this->error['quantity'])) {\r\n\t\t\t\t$this->error['warning'] = $lang['sm_error_quantity'];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!$this->error && !$model->isProductStockEnabled($product_id)) {\r\n\t\t\t$this->error['warning'] = $lang['sm_error_stale_data'];\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($this->error['warning'])) {\r\n\t\t\t$data['error'] = $this->error['warning'];\r\n\t\t\tif (isset($this->error['quantity'])) {\r\n\t\t\t\t$data['error_quantity'] = array();\r\n\t\t\t\tforeach($this->error['quantity'] as $key => $value) {\r\n\t\t\t\t\t$data['error_quantity'][] = $key;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (isset($this->request->post['product_combinations']) && isset($this->request->post['product_id']) && count($this->request->post['product_combinations']) > 0) { \r\n\t\t\t\t$combinations = $this->request->post['product_combinations'];\r\n\t\t\t\t$total_quantity = $model->editStockCombinations($product_id, $combinations);\r\n\t\t\t\t\r\n\t\t\t\tif ($total_quantity == -1) {\r\n\t\t\t\t\t$data['error'] = $lang['sm_error_stale_data'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$data['product_quantity'] = $total_quantity;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t$this->response->addHeader('Content-Type: application/json');\r\n\t\t$this->response->setOutput( json_encode($data) );\r\n\t}", "title": "" }, { "docid": "96b945e667bc66d2c84e5bb1b2ea3518", "score": "0.5050803", "text": "public function onBeforeWrite()\n {\n parent::onBeforeWrite();\n $includedProducts = $this->IncludedProducts();\n if ($includedProducts) {\n foreach ($includedProducts as $includedProduct) {\n if (!$includedProduct instanceof Product) {\n $includedProducts->remove($includedProduct);\n }\n }\n }\n $this->Price = $this->NewPrice;\n }", "title": "" }, { "docid": "e85f860260f51f4a97ea7d1aac029009", "score": "0.5044322", "text": "public function update(Request $request,Propo $A_propo)\n {\n // // dd($A_propo);\n // // $propo = Propo::find($id);\n // // dd($id);\n // $A_propo -> update($request->all()); // ça mets à jour l'enregistrement \n // // $propo->description = $request->description;\n // // $propo->save();\n // if($request->has('imag_photographe')){\n \n // $A_propo->image1 =request('image1')->store('uploads');\n \n // $A_propo->image2 =request('image2')->store('uploads');\n \n // $A_propo->image_photographe =request('image_photographe')->store('uploads');\n // $A_propo->save();\n // }\n \n // return redirect('admin/propos/aboutus_admin')->with('updat', 'A propos de nous updated!');\n }", "title": "" }, { "docid": "2066fe3544122a90e59c015fa1fc4ac7", "score": "0.5043907", "text": "public function saveNewProduct()\n\t{\t\n\t\t$pro_dtl = new Products;\n\t\t$pro_dtl->Product_Name = Input::json('product');\n\t\t$pro_dtl->Product_Description = Input::json('product_des');\n\t\t$pro_dtl->Price = Input::json('price');\n\t\t$pro_dtl->Image_URL = \"1\";\n\t\t$pro_dtl->Catelog_Id = \"1\";\n\t\t$pro_dtl->Channel_Id = Input::json('channel');\n\t\t$pro_dtl->RefItemId = Input::json('ref_item_no');\n\t\t$pro_dtl->SKU = Input::json('sku');\t\n\t\t$pro_dtl->UnitWeight =Input::json('unit_weight');\t\t\t\n\t\t$pro_dtl->Active = 1;\n\t\t$pro_dtl->CREATE_TS = date(\"Y-m-d H:i:s\");\n\t\t$pro_dtl->MODIFY_TS = date(\"Y-m-d H:i:s\");\n\t\t$pro_dtl->save();\t\t\t\n\t}", "title": "" }, { "docid": "f2e03d3a88a127a5263e3dcb6c067a9b", "score": "0.50424314", "text": "public function beforeSave()\n {\n $product = Products::findFirstByid($this->product_id);\n\n // apply promo\n if ($product->getName() === 'Pepsi Cola' && $this->quantity >= 3) {\n $product->setPrice(0.8 * $product->price);\n }\n\n // set order total\n $this->total = $this->quantity * $product->getPrice();\n\n // place timestamp\n $this->date = date('Y-m-d h:i:s');\n }", "title": "" }, { "docid": "3d3cf6d8c9f8d6c879e30a2a1b865e28", "score": "0.504234", "text": "public function getUpdateProductCollection(){\r\n if( !$this->getEnable() )\r\n return \"Please Enable Extension.\";\r\n\r\n ini_set('memory_limit', '-1');\r\n $isDryRun = $this->getStatusIsDryrun();\r\n $amount = $this->getAmountToUpdate();\r\n $collection = $this->getCollection();\r\n $decreasePriceStatus = $this->decreasePrice();\r\n $date = date('d-m-Y h:i:s a');\r\n Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);\r\n if( $amount != \"\" || $amount != 0 ){\r\n foreach( $collection as $product ){\r\n $param = array('special_price'=>\"\",\"price\" => \"\");\r\n try{\r\n $changePrice = $changePriceUp = $changeSpecialPrice = $changeSpecialPriceUp = \"\";\r\n if( $decreasePriceStatus ){\r\n $changePrice = $product->getPrice() / $amount;\r\n $changePriceUp = round($changePrice);\r\n }else{\r\n $changePrice = $product->getPrice() * $amount;\r\n $changePriceUp = ceil($changePrice);\r\n }\r\n\r\n /*If Special Price not Set then no need to calcalute */\r\n if( $product->getSpecialPrice() ){\r\n if( $decreasePriceStatus ){\r\n $changeSpecialPrice = $product->getSpecialPrice() / $amount;\r\n $changeSpecialPriceUp = round($changeSpecialPrice);\r\n }else{\r\n $changeSpecialPrice = $product->getSpecialPrice() * $amount;\r\n $changeSpecialPriceUp = ceil($changeSpecialPrice);\r\n }\r\n $param['special_price'] = $changeSpecialPriceUp;\r\n }\r\n\r\n $param['price'] = $changePriceUp;\r\n if( $decreasePriceStatus ){\r\n $log = \"productId =>\".$product->getId().\" , sku => \".$product->getSku().\" , Price => \".$product->getPrice();\r\n $log .= \" , update Price => \".$changePrice.\" , update Price ro => \".$changePriceUp;\r\n $log .=\" , Special Price => \".$product->getSpecialPrice().\" , Update Sp => \".$changeSpecialPrice.\" , Update Sp ro => \".$changeSpecialPriceUp;\r\n\r\n $row = $date.\",\".$product->getId().\",\".$product->getSku().\",\".$product->getPrice().\",\".$changePrice.\",\".$changePriceUp.\",\";\r\n $row .= $product->getSpecialPrice().\",\".$changeSpecialPrice.\",\".$changeSpecialPriceUp.\" \\n\";\r\n }else{\r\n $log = \"productId =>\".$product->getId().\" , sku => \".$product->getSku().\" , Price => \".$product->getPrice();\r\n $log .= \" , update Price => \".$changePrice.\" , update Price up => \".$changePriceUp;\r\n $log .=\" , Special Price => \".$product->getSpecialPrice().\" , Update Sp => \".$changeSpecialPrice.\" , Update Sp up => \".$changeSpecialPriceUp;\r\n $row = $date.\",\".$product->getId().\",\".$product->getSku().\",\".$product->getPrice().\",\".$changePrice.\",\".$changePriceUp.\",\";\r\n $row .= $product->getSpecialPrice().\",\".$changeSpecialPrice.\",\".$changeSpecialPriceUp.\" \\n\";\r\n }\r\n\r\n $this->updateProductPrice( $product , $param , $log , $isDryRun , $row );\r\n }catch( Exception $col ){\r\n Mage::log( $log.\" -->productCollectionIssues\" , null, 'change_product_price_failure.log' );\r\n $this->createLog($row , 'failure');\r\n continue;\r\n }\r\n }\r\n }else{\r\n return \"Please Add Amount To Update.\";\r\n }\r\n return \"Script Successfully Executed.\";\r\n }", "title": "" }, { "docid": "04d906e77d31ad3ad1bcb4da6cc26d6d", "score": "0.5042087", "text": "function edit($idP)\n { \n if($this->session->userdata('nomeusuario') == '') \n { \n redirect(site_url('login')); \n }\n // check if the produto exists before trying to edit it\n $data['produto'] = $this->Produto_model->get_produto($idP);\n \n if(isset($data['produto']['idP']))\n {\n $this->load->library('form_validation');\n\n\t\t\t$this->form_validation->set_rules('modeloID','ModeloID','required');\n\t\t\t$this->form_validation->set_rules('categoriaID','CategoriaID','required');\n\t\t\t$this->form_validation->set_rules('nome','Nome','required');\n\t\t\n\t\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t\t'modeloID' => $this->input->post('modeloID'),\n\t\t\t\t\t'categoriaID' => $this->input->post('categoriaID'),\n\t\t\t\t\t'nome' => $this->input->post('nome'),\n\t\t\t\t\t'descricao' => $this->input->post('descricao'),\n );\n\n $this->Produto_model->update_produto($idP,$params); \n redirect('produto/index');\n }\n else\n {\n \n $this->load->model('Tamanhos_produto_model');\n $data['tamanhos_produtos'] = $this->Tamanhos_produto_model->lista_tamanhos_produto($idP);\n \n \n #$config['total_rows'] = $this->Tamanhos_produto_model->get_all_tamanhos_produtos_count();\n #$this->pagination->initialize($config);\n \n\n\t\t\t\t$this->load->model('Modelo_model');\n\t\t\t\t$data['all_modelos'] = $this->Modelo_model->get_all_modelos();\n\n\t\t\t\t$this->load->model('Categoria_model');\n $data['all_categorias'] = $this->Categoria_model->get_all_categorias();\n\n $this->load->model('Tamanho_model');\n $data['all_tamanhos'] = $this->Tamanho_model->get_all_tamanhos();\n\n $this->load->model('Cores_model');\n $data['all_cores'] = $this->Cores_model->get_all_cores();\n\n $this->load->model('Produto_model');\n $data['all_produtos'] = $this->Produto_model->get_all_produtos();\n\n $data['_view'] = 'produto/edit';\n $this->load->view('common/header');\n $this->load->view('common/menu');\n $this->load->view('layouts/main',$data);\n $this->load->view('common/footer');\n }\n }\n else\n show_error('The produto you are trying to edit does not exist.');\n }", "title": "" }, { "docid": "d83c72e28950e751e47ba8ce6b1827e7", "score": "0.5041486", "text": "public function msproduct($prid)\n\t {\n\t $all=SalePr::model()->findAll('p_id=:p_id AND st_id=:st_id',array(':p_id'=>$prid,'st_id'=>1));\n\t $totalq=0;\n\t\t $totalc=0;\n\t for($i=0;$i<count($all);$i++)\n\t {\n\t\t \n\t\t $totalq=$totalq+$all[$i]->sp_quantity;\n\t\t \n\t\t $totalc=$totalc+$all[$i]->sp_totalsale;\n\t\t \n\t }\n\t\t $check=Msproduct::model()->find('product_id=:product_id',array(':product_id'=>$prid));\n $myid='';\n for($p=0;$p<count($check);$p++)\n {\n\t\t $myid=$check[$p]->id;\n }\n\t\tif(count($check)>0)\n\t\t {\n\t\t //\n\t\t $msproduct=new Msproduct;\n\t\t $msproduct=$msproduct->loadModel($myid);\n\t\t $msproduct->product_id=$prid;\n\t\t $pr=Product::model()->find('p_id=:p_id',array(':p_id'=>$all[0]->p_id));\n\t\t $msproduct->product_name=$pr->p_name;\n\t\t $msproduct->total_quantity=$totalq;\n\t\t $msproduct->total_cost=$totalc;\n\t\t //$msproduct->ms_id=$check->ms_id;\n\t\t if($msproduct->save())\n\t\t {\n\t\t\t echo \"row updated\";\n\t\t\t }\n\t\t else {\n\t\t print_r($msproduct->getErrors());\n\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t $msproduct=new Msproduct;\n\t\t $msproduct->product_id=$prid;\n\t\t $pr=Product::model()->find('p_id=:p_id',array(':p_id'=>$all[0]->p_id));\n\t\t $msproduct->product_name=$pr->p_name;\n\t\t $msproduct->total_quantity=$totalq;\n\t\t $msproduct->total_cost=$totalc;\n\t\t //$msproduct->ms_id=$check->ms_id;\n\t\t if($msproduct->save())\n\t\t {\n\t\t\t echo \"new row Added\";\n\t\t\t }\n\t\t else {\n\t\t print_r($msproduct->getErrors());\n\t\t }\n\t\t }\n\t }", "title": "" }, { "docid": "f4e16d15a2820bcc498cbd231fa5df48", "score": "0.50372154", "text": "public function edit(productlist $productlist)\n {\n //\n }", "title": "" }, { "docid": "3a2b2efe7756f9340981308030b09b2e", "score": "0.50334173", "text": "public function editarProductsModel($datosModel, $tabla){\n $stmt = Conexion::conectar()->prepare(\"SELECT id_product AS 'id', code_product AS 'codigo',\n name_product AS 'nombre', price_product AS 'precio', stock FROM $tabla WHERE id_product = :id\");\n $stmt->bindParam(\":id\",$datosModel,PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetch();\n $stmt->close();\n }", "title": "" }, { "docid": "da0a28b7804771599c8a865bed0b8442", "score": "0.5028021", "text": "public static function Create($objParentObject, $intLICENCIAIdLICENCIA = null, $intPRODUCTOIdPRODUCTO = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t// Attempt to Load from PK Arguments\n\t\t\tif (strlen($intLICENCIAIdLICENCIA) && strlen($intPRODUCTOIdPRODUCTO)) {\n\t\t\t\t$objListaProducto = ListaProducto::Load($intLICENCIAIdLICENCIA, $intPRODUCTOIdPRODUCTO);\n\n\t\t\t\t// ListaProducto was found -- return it!\n\t\t\t\tif ($objListaProducto)\n\t\t\t\t\treturn new ListaProductoMetaControl($objParentObject, $objListaProducto);\n\n\t\t\t\t// If CreateOnRecordNotFound not specified, throw an exception\n\t\t\t\telse if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)\n\t\t\t\t\tthrow new QCallerException('Could not find a ListaProducto object with PK arguments: ' . $intLICENCIAIdLICENCIA . ', ' . $intPRODUCTOIdPRODUCTO);\n\n\t\t\t// If EditOnly is specified, throw an exception\n\t\t\t} else if ($intCreateType == QMetaControlCreateType::EditOnly)\n\t\t\t\tthrow new QCallerException('No PK arguments specified');\n\n\t\t\t// If we are here, then we need to create a new record\n\t\t\treturn new ListaProductoMetaControl($objParentObject, new ListaProducto());\n\t\t}", "title": "" }, { "docid": "0b026b129900ad7a008818adc6126da7", "score": "0.50254196", "text": "public function update(Request $request, $slug)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'unit' => 'required',\n 'category_id' => 'required',\n ]);\n $product = Product::where('slug', $slug)->first();\n $product->name = $request->name;\n if($request->file('image')){\n if($product->image){\n $files = Storage::delete($product->image);\n }\n $path = $request->file('image')->store('public/products');\n $product->image = $path;\n }\n $product->prices()->delete();\n\n $product->price = $request->price[0];\n $product->amount = $request->amount[0];\n $vaiations = [];\n for ($i=0; $i < count($request->price); $i++) {\n array_push($vaiations, [\n 'price' => $request->price[$i],\n 'amount' => $request->amount[$i],\n ]);\n }\n foreach($vaiations as $vaiation){\n $var = new Variaton;\n $var->product_id = $product->id;\n $var->price =$vaiation['price'];\n $var->amount = $vaiation['amount'];\n $var->save();\n }\n $product->amount = $request->amount[0];\n $product->slug = $product->generateSlug($request->name);\n $product->description = $request->description;\n $product->price = $request->price[0];\n $product->category_id = $request->category_id;\n $product->save();\n $request->session()->flash('status', 'Product edited successfuly!');\n // $vaiations = [];\n // for ($i=0; $i < count($request->price); $i++) {\n // array_push($vaiations, [\n // 'price' => $request->price[$i],\n // 'amount' => $request->amount[$i],\n // ]);\n // }\n // foreach($vaiations as $vaiation){\n // // $var = $product->prices()->where('price', $vaiation['price']);\n // $var->product_id = $product->id;\n // $var->price =$vaiation['price'];\n // $var->amount = $vaiation['amount'];\n // $var->save();\n // }\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "34ddd6184bc7b19b40fdc76ae05c8ae8", "score": "0.5024943", "text": "public function lstPRODUCTOIdPRODUCTOObject_Create($strControlId = null) {\n\t\t\t$this->lstPRODUCTOIdPRODUCTOObject = new QListBox($this->objParentObject, $strControlId);\n\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->Name = QApplication::Translate('P R O D U C T O Id P R O D U C T O Object');\n\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->Required = true;\n\t\t\tif (!$this->blnEditMode)\n\t\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t$objPRODUCTOIdPRODUCTOObjectArray = Producto::LoadAll();\n\t\t\tif ($objPRODUCTOIdPRODUCTOObjectArray) foreach ($objPRODUCTOIdPRODUCTOObjectArray as $objPRODUCTOIdPRODUCTOObject) {\n\t\t\t\t$objListItem = new QListItem($objPRODUCTOIdPRODUCTOObject->__toString(), $objPRODUCTOIdPRODUCTOObject->IdPRODUCTO);\n\t\t\t\tif (($this->objListaProducto->PRODUCTOIdPRODUCTOObject) && ($this->objListaProducto->PRODUCTOIdPRODUCTOObject->IdPRODUCTO == $objPRODUCTOIdPRODUCTOObject->IdPRODUCTO))\n\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t$this->lstPRODUCTOIdPRODUCTOObject->AddItem($objListItem);\n\t\t\t}\n\t\t\treturn $this->lstPRODUCTOIdPRODUCTOObject;\n\t\t}", "title": "" }, { "docid": "e3c6807ba794c1c66db52b695951ea93", "score": "0.50224435", "text": "function saveProduct() {\n\t\t$product = new product;\n\t\t$product->set('name', getPost('name'));\n\t\t$product->set('sku', '');\n\t\t$sku = getPost('sku', 'alphanum');\n\t\tif ($sku) {\n\t\t\tif (!productsController::isDuplicateSKU($sku)) {\n\t\t\t\t$product->set('sku', $sku);\n\t\t\t} else {\n\t\t\t\taddError('The SKU number already exists');\n\t\t\t}\n\t\t}\n\t\t$product->set('brand', getPost('brand'));\n\t\t$product->set('availability', getPost('availability'));\n\t\t$product->set('cost', getPost('cost'));\n\t\t$product->set('weight', getPost('weight'));\n\t\t$product->set('length', getPost('length'));\n\t\t$product->set('width', getPost('width'));\n\t\t$product->set('height', getPost('height'));\n\t\t$product->set('sortWeight', getPost('sortWeight'));\n\t\t$product->set('description', getPost('description'));\n\t\t$product->set('shortDescription', getPost('shortDescription'));\t\t\n\t\tif ($memberID = getPost('memberID', 'integer')) {\n\t\t\t$member = new member($memberID);\n\t\t\tif ($member->exists()) {\n\t\t\t\t$product->set('memberID', $member->get('memberID'));\n\t\t\t} else {\n\t\t\t\taddError('The merchant ID was invalid');\n\t\t\t}\n\t\t} else {\n\t\t\t$product->set('memberID', 0);\n\t\t}\n\t\tif ($product->save()) {\n\t\t\taddSuccess('Product '.$product->get('name').' added successfully');\n\t\t\t$productID = $product->get('productID');\n\t\t\tif (!$product->setInventory(getPost('quantity'))) {\n\t\t\t\taddError('There was an error while setting the product inventory');\n\t\t\t}\n\t\t\t$tags = productsController::retrieveObjectTags('productTags', 'createAndRetrieveExisting', 'productTags');\n\t\t\tif (!empty($tags)) {\n\t\t\t\taddSuccess('Tags: '.implode(', ', $tags));\n\t\t\t\tif (!$product->addTags($tags)) {\n\t\t\t\t\taddError('There was an error while adding tags to the product');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (productsController::processImages($productID) === false) {\n\t\t\t\taddError('There was an error while processing the product images');\n\t\t\t}\n\t\t\t$sites = getPost('sites');\n\t\t\tassertArray($sites);\n\t\t\tforeach ($sites as $key => $val) {\n\t\t\t\tif (!validNumber($val, 'integer')) {\n\t\t\t\t\tunset($sites[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($sites)) {\n\t\t\t\tif (!$product->addSites($sites)) {\n\t\t\t\t\taddError('There was an error while processing the product websites');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddSuccess('There are no sites associated with the product');\n\t\t\t}\n\t\t\t$productBrand = $product->get('brand');\n\t\t\tif ($productBrand) {\n\t\t\t\t$brand = new brand;\n\t\t\t\t$brand->set('brand', $productBrand);\n\t\t\t\tif (!$brand->isDuplicate()) {\n\t\t\t\t\tif (!$brand->save()) {\n\t\t\t\t\t\taddError('There was an error while adding the brand name to the brands list');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (haveErrors() || getRequest('submit') == 'Add and Edit') {\n\t\t\t\teditProduct($productID);\n\t\t\t} else {\n\t\t\t\taddProduct();\n\t\t\t}\n\t\t} else {\n\t\t\taddError('There was an error while saving the product');\n\t\t\taddError('Product images have to be re-uploaded');\n\t\t\t$tags = productsController::retrieveObjectTags('productTags', 'retrieveOnly');\n\t\t\t$sites = getPost('sites');\n\t\t\tassertArray($sites);\n\t\t\tforeach ($sites as $key => $val) {\n\t\t\t\tif (!validNumber($val, 'integer')) {\n\t\t\t\t\tunset($sites[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$controller = new productsController;\n\t\t\t$template = new template;\n\t\t\t$template->assignClean('product', $product->fetchArray());\n\t\t\t$template->assignClean('quantity', getPost('quantity', 'integer'));\n\t\t\t$template->assignClean('tags', $tags);\n\t\t\t$template->assignClean('productTags', productsController::getProductTags());\n\t\t\t$template->assignClean('availabilityOptions', $controller->getOptions('availability'));\n\t\t\t$template->assignClean('sites', $sites);\n\t\t\t$template->assignClean('siteOptions', siteRegistryController::getSites());\n\t\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t\t$template->assignClean('mode', 'add');\n\t\t\t$template->getMessages();\n\t\t\t$template->display('admin/productEdit.htm');\n\t\t}\n\t}", "title": "" }, { "docid": "bd9982e18d2cfdfbdf7a43868f0f3f8c", "score": "0.5020649", "text": "public function modificarproducto() {\n $modificarproducto = new producto($this->adapter);\n $categoria = new Categoria($this->adapter);\n $allcategoria = $categoria->getAll();\n if (isset($_GET[\"id\"])) {\n//variable para guardar vector de getById\n $id = (String) $_GET[\"id\"];\n }\n//Conseguimos el metodo getbyid el cual me envia un vector y debo guardar en una variable\n $valor = $modificarproducto->getById($id, \"prd_codigoProducto\");\n//Cargamos la vista index y le pasamos valores\n $this->view(\"producto/ModificarProducto\", array(\n \"allcategoria\" => $allcategoria,\n \"modificarproducto\" => $valor\n ));\n }", "title": "" }, { "docid": "9616df4095731ddf709470c8cac04a4d", "score": "0.5018916", "text": "public function actionAdd2()\n\t{\n\t\t\n\t\t$idProducto=$_POST['idProducto'];\n\t\t$idSolicitud=$_POST['idSolicitud'];\n\t\t$idCantidad=$_POST['idCantidad'];\n\t\t$idTotal=$_POST['idTotal'];\n\t\t$salida=IngresoExistenciaItem::model()->findByAttributes(array('producto_id'=>$idProducto,'solicitud_id'=>$idSolicitud)); \n\t\t\n\t\tif($salida == null)\n\t\t{\n\t\t\t$ingreso = new IngresoExistenciaItem;\n\t\t\t$ingreso->producto_id=$idProducto;\n\t\t\t$ingreso->solicitud_id=$idSolicitud;\n\t\t\t$ingreso->cantidad=$idCantidad;\n\t\t\t$ingreso->precio_compra=$idTotal;\n\t\t\t$ingreso->estado='Pendiente';\n\t\t\tif($ingreso->save(false))\n\t\t\t\techo \"true\";\n\t\t\telse\n\t\t\t\techo \"false\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//$ingreso->producto_id=$idProducto;\n\t\t\t//$ingreso->solicitud_id=$idSolicitud;\n\t\t\t$ingreso=IngresoExistenciaItem::model()->findByAttributes(array('producto_id'=>$idProducto,'solicitud_id'=>$idSolicitud)); \n\t\t\t$ingreso->cantidad=$idCantidad;\n\t\t\t$ingreso->precio_compra=$idTotal;\n\t\t\t$ingreso->estado='Pendiente';\n\t\t\tif($ingreso->save(false))\n\t\t\t\techo \"true\";\n\t\t\telse\n\t\t\t\techo \"false\";\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7cddd505b99fd79561927cbeaf7b69b3", "score": "0.5013983", "text": "public function update(Request $request, Product $product)\n {\n $this->validate($request, [\n 'title' => 'required|string|max:255',\n 'description' => 'max:5000',\n 'information' => 'max:5000',\n 'price' => 'required_if:sale_type,==,Unidad',\n 'sale_type' => 'required|string|max:5000' ,\n 'stock' => 'required|integer',\n 'rating' => 'integer',\n 'min_stock' => 'required|integer',\n 'categories' => 'required',\n 'discount' => 'sometimes|numeric',\n 'tags' => 'sometimes|max:255',\n 'product_variants' => 'required_if:sale_type,==,Peso'\n ]);\n\n if($request->is_week_combo === 1){\n $weekCombo = Product::where('is_week_combo',1)->first();\n if($weekCombo->count())\n $weekCombo->active = 0;\n $weekCombo->save();\n } \n\n $product->update($request->all());\n\n $product->categories()->detach();\n foreach($request->categories as $category){\n $product->categories()->attach($category['id']);\n }\n \n \n if($product->sale_type === 'Peso'){\n foreach($request->product_variants as $variant){\n logger($variant);\n ProductVariant::updateOrCreate([\n 'id' => $variant['id']\n ],[\n 'product_id' => $product->id,\n 'weight' => $variant['weight'],\n 'price' => $variant['price'],\n 'active' => $variant['active']\n ]);\n }\n } \n\n return response()->json($product, 200);\n }", "title": "" }, { "docid": "88868b9e250cc7025e9d69c458ace27c", "score": "0.5013849", "text": "public function actionUpdate($id,$sku)\n {\n $model = $this->findModel($id);\n $model_desc = ProductDescription::find()->where(['sku'=>$sku])->one();\n if (Yii::$app->request->isPost)\n {\n $transaction=\\Yii::$app->db->beginTransaction();\n try {\n $model->sku = Yii::$app->request->post()['Product']['sku'];\n $model->product_category_id = Yii::$app->request->post()['Product']['product_category_id'];\n $model->product_status = Yii::$app->request->post()['Product']['product_status'];\n $model->product_cost = Yii::$app->request->post()['Product']['product_cost'];\n $model->product_cn_link = Yii::$app->request->post()['Product']['product_cn_link'];\n $model->product_en_link = Yii::$app->request->post()['Product']['product_en_link'];\n $model->create_id = Yii::$app->request->post()['Product']['create_id'];\n $model->create_time = date('Y-m-d H:i:s');\n $model->product_type = Yii::$app->request->post()['Product']['product_type'];\n $model->product_linelist_id = Yii::$app->request->post()['Product']['product_linelist_id'];\n $model->last_price = Yii::$app->request->post()['Product']['last_price'];\n $model->product_is_multi = Yii::$app->request->post()['Product']['product_is_multi'];\n $model->note = Yii::$app->request->post()['Product']['note'];\n $status = $model->save(false);\n\n if($status)\n {\n $model_desc->sku = Yii::$app->request->post()['Product']['sku'];\n $model_desc->title = Yii::$app->request->post()['ProductDescription']['title'];\n $model_desc->language_code = 'Chinese';\n $model_desc->create_user_id = Yii::$app->user->id;\n $model_desc->create_time = date('Y-m-d H:i:s');\n if($model_desc->save(false))\n {\n Yii::$app->getSession()->setFlash('success','更新成功',true);\n }\n\n } else{\n\n Yii::$app->getSession()->setFlash('error','更新失败',true);\n }\n $transaction->commit();\n return $this->redirect(['index']);\n } catch (HttpException $e) {\n $transaction->rollBack();\n Yii::$app->getSession()->setFlash('error',$e->getMessage(),true);\n return $this->redirect(Yii::$app->request->referrer);\n\n }\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'model_desc' =>$model_desc\n\n ]);\n }\n }", "title": "" }, { "docid": "b8fe7f7267fac8e1ca2df1a623c5ea7b", "score": "0.5013743", "text": "public function __construct($objParentObject, ListaProducto $objListaProducto) {\n\t\t\t// Setup Parent Object (e.g. QForm or QPanel which will be using this ListaProductoMetaControl)\n\t\t\t$this->objParentObject = $objParentObject;\n\n\t\t\t// Setup linked ListaProducto object\n\t\t\t$this->objListaProducto = $objListaProducto;\n\n\t\t\t// Figure out if we're Editing or Creating New\n\t\t\tif ($this->objListaProducto->__Restored) {\n\t\t\t\t$this->strTitleVerb = QApplication::Translate('Edit');\n\t\t\t\t$this->blnEditMode = true;\n\t\t\t} else {\n\t\t\t\t$this->strTitleVerb = QApplication::Translate('Create');\n\t\t\t\t$this->blnEditMode = false;\n\t\t\t}\n\t\t }", "title": "" }, { "docid": "b8a4f2d272fe411b6c6174a65a0a6d59", "score": "0.5012918", "text": "function admin_attributes_list($id = null){\n\t\t$this->Product->id = $id;\n\t\t$this->Product->contain(array('CategoriesProduct'));\n\t\t$product = $this->Product->read();\n\t\t\n\t\t$this->set('product', $product);\n\t\t\n\t\t// a mozne options\n\t\t$options = $this->Product->Subproduct->AttributesSubproduct->Attribute->Option->find('all');\n\t\t$this->set('options', $options);\n\n\t\t// formular je vyplnen (ne filtrovani)\n\t\tif (isset($this->data) && !isset($this->data['Option'])) {\n\t\t\t// musim se podivat, jestli uz tam takovy atributy jsou\n\t\t\t$attributes = array();\n\t\t\t// pro ucely nasledneho mazani nadbytecnych subproduktu si zde iniciuju pole pro zapamatovani suproduktu, ktere odpovidaji\n\t\t\t// datum z formulare\n\t\t\t$subproduct_ids = array();\n\t\t\tforeach ($this->data['Attributes'] as $option_id => $attributes_text) {\n\t\t\t\tif ($attributes_text != '') {\n\t\t\t\t\t$attributes_values = explode(\"\\r\\n\", $attributes_text);\n\t\t\t\t\tforeach ($attributes_values as $value) {\n\t\t\t\t\t\t$value = trim($value);\n\t\t\t\t\t\tif ($value == '') {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$attribute = array();\n\t\t\t\t\t\t$attribute['Attribute']['value'] = $value;\n\t\t\t\t\t\t$attribute['Attribute']['option_id'] = $option_id;\n\t\t\t\t\t\t$db_attribute = $this->Product->Subproduct->AttributesSubproduct->Attribute->find('first', array(\n\t\t\t\t\t\t\t'conditions' => $attribute['Attribute'],\n\t\t\t\t\t\t\t'contain' => array()\n\t\t\t\t\t\t));\n\t\t\t\t\t\tif (empty($db_attribute)) {\n\n\t\t\t\t\t\t\t// pokud ne, ulozim a zapamatuju si idcko\n\t\t\t\t\t\t\t// musim zjistit maximalni sort_order pro dane option_id a nastavit sort_order noveho atributu jako max + 1\n\t\t\t\t\t\t\t$max = $this->Product->Subproduct->AttributesSubproduct->Attribute->find('first', array(\n\t\t\t\t\t\t\t\t'fields' => array('MAX(sort_order) AS MAX'),\n\t\t\t\t\t\t\t\t'conditions' => array('option_id' => $attribute['Attribute']['option_id']),\n\t\t\t\t\t\t\t\t'contain' => array()\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t$attribute['Attribute']['sort_order'] = $max[0]['MAX'] + 1;\n\t\t\t\t\t\t\tunset($this->Product->Subproduct->AttributesSubproduct->Attribute->id);\n\t\t\t\t\t\t\t$this->Product->Subproduct->AttributesSubproduct->Attribute->save($attribute);\n\t\t\t\t\t\t\t$attributes[$option_id][] = $this->Product->Subproduct->AttributesSubproduct->Attribute->id;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// pokud jo, najdu jejich idcko\n\t\t\t\t\t\t\t$attributes[$option_id][] = $db_attribute['Attribute']['id'];\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$subproducts = $this->Product->Subproduct->find('all', array(\n\t\t\t\t'conditions' => array('Subproduct.product_id' => $this->data['Product']['id']),\n\t\t\t\t'contain' => array('AttributesSubproduct')\n\t\t\t));\n\t\t\t\n\t\t\t// vygeneruju kombinace atributu\n\t\t\t\n\t\t\t$generated_subproducts = array();\n\t\t\tif (!empty($attributes)) {\n\t\t\t\t$generated_subproducts = $this->Product->combine($attributes);\n\t\t\t}\n\t\t\t// prochazim vygenerovane subprodukty\n\t\t\tforeach ($generated_subproducts as $generated_subproduct) {\n\t\t\t\t// musim projit subprodukty produktu a zjistit, jestli uz v db neni subprodukt, ktery chci vkladat\n\t\t\t\tforeach ($subproducts as $subproduct) {\n\t\t\t\t\t// myslim si, ze subprodukt v db je\n\t\t\t\t\t$found = true;\n\t\t\t\t\t// pokud souhlasi pocet attribute_subproducts u subproduktu z db a vygenerovaneho\n\t\t\t\t\tif (sizeof($subproduct['AttributesSubproduct']) == sizeof($generated_subproduct)) {\n\t\t\t\t\t\t// prochazim vztahy mezi atributy a subproduktem z db\n\t\t\t\t\t\tforeach ($subproduct['AttributesSubproduct'] as $attributes_subproduct) {\n\t\t\t\t\t\t\t// jestlize neni attributes_subproduct soucasti vygenerovaneho subproduktu\n\t\t\t\t\t\t\tif (!in_array($attributes_subproduct['attribute_id'], $generated_subproduct)) {\n\t\t\t\t\t\t\t\t// nastavim, ze jsem subprodukt nenasel\n\t\t\t\t\t\t\t\t$found = false;\n\t\t\t\t\t\t\t\t// a attributes_subprodukty dal neprochazim\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// jestlize jsem subprodukt nasel v db\n\t\t\t\t\t\tif ($found) {\n\t\t\t\t\t\t\t// zapamatuju si jeho idcko v db\n\t\t\t\t\t\t\t$subproduct_ids[] = $subproduct['Subproduct']['id'];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// pokud se velikost lisi\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// nastavim si, ze jsem subprodukt nenasel\n\t\t\t\t\t\t$found = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// jestlize jsem subprodukt nenasel\n\t\t\t\tif (!isset($found) || !$found) {\n\t\t\t\t\t// musim vytvorit takovej subprodukt a k nemu napojeni na atributy\n\t\t\t\t\t$subproduct_save['Subproduct']['product_id'] = $this->data['Product']['id'];\n\t\t\t\t\t$subproduct_save['Subproduct']['active'] = true;\n\t\t\t\t\tunset($this->Product->Subproduct->id);\n\t\t\t\t\t$this->Product->Subproduct->save($subproduct_save);\n\t\t\t\t\t$subproduct_id = $this->Product->Subproduct->id;\n\t\t\t\t\t$subproduct_ids[] = $subproduct_id;\n\t\t\t\t\tforeach ($generated_subproduct as $attribute_id) {\n\t\t\t\t\t\tunset($this->Product->Subproduct->AttributesSubproduct->id);\n\t\t\t\t\t\t$attributes_subproduct_save['AttributesSubproduct']['subproduct_id'] = $subproduct_id;\n\t\t\t\t\t\t$attributes_subproduct_save['AttributesSubproduct']['attribute_id'] = $attribute_id;\n\t\t\t\t\t\t$this->Product->Subproduct->AttributesSubproduct->save($attributes_subproduct_save);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// musim najit vsechny subprodukty tohoto produktu a ty, co nejsou podle zadanych hodnot platne, musim odstranit\n\t\t\t// tzn musim porovnat saves oproti obsahu databaze a co je navic, tak smazat\n\t\t\t$db_subproduct_ids = $this->Product->Subproduct->find('all', array(\n\t\t\t\t'conditions' => array('product_id' => $this->data['Product']['id']),\n\t\t\t\t'contain' => array(),\n\t\t\t\t'fields' => array('id')\n\t\t\t));\n\t\t\tforeach ($db_subproduct_ids as $db_subproduct_id) {\n\t\t\t\tif (!in_array($db_subproduct_id['Subproduct']['id'], $subproduct_ids)) {\n\t\t\t\t\t$this->Product->Subproduct->delete($db_subproduct_id['Subproduct']['id']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->Session->setFlash('Úpravy byly provedeny');\n\t\t\t$this->redirect(array('controller' => 'products', 'action' => 'attributes_list', $this->data['Product']['id']));\n\t\t} else {\n\t\t\t// potrebuju vytvorit vstupni data pro formular\n\t\t\t// tzn pro kazdou option vybrat zvolene values k tomuto produktu - ne jen pro ty options, pro ktere ma produkt atributy, ale\n\t\t\t// uplne pro vsechny\n\t\t\tforeach ($options as $option) {\n\t\t\t\t// vybiram takovy vazby mezi produktem a atributem, ktery patri k zadanymu produktu\n\t\t\t\t$attributes_subproducts = $this->Product->Subproduct->AttributesSubproduct->find('all', array(\n\t\t\t\t\t'conditions' => array_merge(\n\t\t\t\t\t\tarray('Subproduct.product_id' => $id, 'Attribute.option_id' => $option['Option']['id'])\n\t\t\t\t\t),\n\t\t\t\t\t'contain' => array(\n\t\t\t\t\t\t'Subproduct',\n\t\t\t\t\t\t'Attribute' => array(\n\t\t\t\t\t\t\t'Option'\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'order' => array('Attribute.option_id ASC', 'Attribute.sort_order ASC'),\n\t\t\t\t\t// musim se zbavit \"duplicit\" - atributes_subproduktu, ktery ukazuji na stejny atributy\n\t\t\t\t\t'group' => array('Attribute.id')\n\t\t\t\t));\n\t\t\t\t// nadefinuju implicitni hodnoty formularovych poli\n\t\t\t\t$this->data['Attributes'][$option['Option']['id']] = '';\n\t\t\t\tforeach ($attributes_subproducts as $attributes_subproduct) {\n\t\t\t\t\t$this->data['Attributes'][$option['Option']['id']] .= $attributes_subproduct['Attribute']['value'] . '\n';\n\t\t\t\t}\n\n\t\t\t\t$this->data['Attributes'][$option['Option']['id']] = trim($this->data['Attributes'][$option['Option']['id']]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1af6e9003f8924ccc064a1d5034cf69a", "score": "0.5010733", "text": "public function actionSavePartsAccessories()\n {\n\n Yii::$app->session->setFlash('alert' ,[\n 'typeAlert' => 'danger',\n 'message' => 'Сохранения не применились, что то пошло не так!!!'\n ]\n );\n \n $request = Yii::$app->request->post();\n\n $model = new PartsAccessories();\n\n if(!empty($request['PartsAccessories']['_id'])){\n $model = $model::findOne(['_id'=>new ObjectID($request['PartsAccessories']['_id'])]);\n } else {\n if($model::findOne(['title'=>$request['PartsAccessories']['title']])){\n Yii::$app->session->setFlash('alert' ,[\n 'typeAlert' => 'danger',\n 'message' => 'Сохранения не применились. Такой товар уже существует!'\n ]\n );\n return $this->redirect('/' . Yii::$app->language .'/business/manufacturing-suppliers/parts-accessories');\n }\n }\n\n if(!empty($request)){\n $model->title = $request['PartsAccessories']['title'];\n $model->article = $request['PartsAccessories']['article'];\n $model->translations = ['en' => $request['PartsAccessories']['translations']['en']];\n $model->unit = $request['PartsAccessories']['unit'];\n $model->delivery_from_chine = (int)(!empty($request['PartsAccessories']['delivery_from_chine']) ? '1' : '0');\n $model->repair_fund = (int)(!empty($request['PartsAccessories']['repair_fund']) ? '1' : '0');\n $model->exchange_fund = (int)(!empty($request['PartsAccessories']['exchange_fund']) ? '1' : '0');\n $model->arc = (int)(!empty($request['PartsAccessories']['arc']) ? '1' : '0');\n\n if(!empty($request['PartsAccessories']['last_price_eur'])){\n $ActualCurrency = CurrencyRate::getActualCurrency();\n $model->last_price_eur = (float)round($request['PartsAccessories']['last_price_eur'] / $ActualCurrency[$request['PartsAccessories']['currency']],3);\n }\n\n if($model->save()){\n\n Yii::$app->session->setFlash('alert' ,[\n 'typeAlert'=>'success',\n 'message'=>'Сохранения применились.'\n ]\n );\n }\n }\n\n return $this->redirect('/' . Yii::$app->language .'/business/manufacturing-suppliers/parts-accessories?f=1');\n }", "title": "" }, { "docid": "a6952df7530502063aac63935793260b", "score": "0.5010215", "text": "function edit_products()\n {\n // requesting the data from the posted form\n $product_name = $_REQUEST['name'];\n $product_price = $_REQUEST['price'];\n $product_description = $_REQUEST['description'];\n $product_category = $_REQUEST['category'];\n $product_is_active = $_REQUEST['is_active'];\n $product_created_by = $_REQUEST['created_by'];\n $product_id = $_REQUEST['product_id'];\n // Creating the model object to call the model function for the insertion of data\n $product_obj = new Product();\n $response =$product_obj->edit_product($product_name,$product_price,$product_description,$product_created_by,$product_is_active,$product_category,$product_id);\n // check if ther are any associated produts. \n $associated_product_enable = $_REQUEST['associated_product_enable'];\n if($associated_product_enable == 1)\n {\n $associated_product_id = $_REQUEST['associated_product'];\n $associated_product_obj = new Associated_Product();\n $associated_product_obj->create_associated_product($associated_product_id);\n }\n header(\"Location:../../../Controller/products_controller/Products/products\");\n }", "title": "" }, { "docid": "7cb54afcf267c8102be8b6ff3ebd7bf1", "score": "0.5003904", "text": "function edit_product($var){\n\t\tglobal $db;\n\t\tif(!is_array($var) || empty($var)){ \n\t\t\t$this->error = \"Invalid parameter to add the product.\"; \n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$product_groups = implode(',', $var['product_group']);\n\t\t\n\t\t$sQl = \"UPDATE `cms_products` SET \n\t\t\t\t\t`parent_id` = '\".$var['productList'].\"',\n\t\t\t\t\t`name` = '\".mysql_real_escape_string($var['product_name']).\"',\n\t\t\t\t\t`sef_name` = '\".$var['sef_title'].\"',\n\t\t\t\t\t`group` = '\".$product_groups.\"',\n\t\t\t\t\t`formula` = '\".$var['product_formula'].\"',\n\t\t\t\t\t`weight` = '\".$var['product_weight'].\"',\n\t\t\t\t\t`cas_number` = '\".$var['product_cas_no'].\"',\n\t\t\t\t\t`details` = '\".mysql_real_escape_string($var['product_details']).\"',\n\t\t\t\t\t`date_modified`\t= NOW()\n\t\t\t\tWHERE `id` = \".$var['productId'];\n\t\t\t\t\n\t\t$result = $db->query($sQl);\n\t\tif($result){\n\t\t\t$this->message = \"Product \".$var['Product_name'].\" updated successfully\";\n\t\t\treturn $result;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t}\t\n\t}", "title": "" }, { "docid": "22a143b3e032bde2a7e57daa1397fbda", "score": "0.50012296", "text": "public function updateProduct($products);", "title": "" }, { "docid": "22a143b3e032bde2a7e57daa1397fbda", "score": "0.50012296", "text": "public function updateProduct($products);", "title": "" } ]
93d47180b37752702373c1092e8516c0
Checks to see if current environment supports Imagick. We require Imagick 2.2.0 or greater, based on whether the queryFormats() method can be called statically.
[ { "docid": "a2c54260e1d95926e20f04553e3d83cd", "score": "0.0", "text": "public static function test($args = array())\n {\n }", "title": "" } ]
[ { "docid": "581010b9a0ef0ea9c5588fcb5ff8705f", "score": "0.7303185", "text": "private function check_imagick()\n {\n if (!extension_loaded('imagick') || !class_exists('Imagick', false) || !class_exists('ImagickPixel', false))\n return false;\n\n // check version\n if (version_compare(phpversion('imagick'), '2.2.0', '<'))\n return false;\n\n // check for deep requirements within Imagick\n if (!defined('Imagick::COMPRESSION_JPEG') || !defined('Imagick::COMPOSITE_OVERLAY') || !defined('Imagick::INTERLACE_PLANE') || !defined('Imagick::FILTER_CATROM') || !defined('Imagick::CHANNEL_ALL'))\n return false;\n\n // check methods\n if (array_diff(array('clear', 'destroy', 'valid', 'getimage', 'writeimage', 'getimagegeometry', 'getimageformat', 'setimageformat', 'setimagecompression', 'setimagecompressionquality', 'scaleimage'), get_class_methods('Imagick')))\n return false;\n\n return true;\n }", "title": "" }, { "docid": "e4e86ed85b066a7cd29b1427db2ffe64", "score": "0.7170035", "text": "public function checkOperationality()\n {\n if (!extension_loaded('imagick')) {\n throw new SystemRequirementsNotMetException('Required iMagick extension is not available.');\n }\n\n if (!class_exists('\\\\Imagick')) {\n throw new SystemRequirementsNotMetException(\n 'iMagick is installed, but not correctly. The class Imagick is not available'\n );\n }\n\n $im = new \\Imagick();\n if (!in_array('WEBP', $im->queryFormats('WEBP'))) {\n throw new SystemRequirementsNotMetException('iMagick was compiled without WebP support.');\n }\n }", "title": "" }, { "docid": "7f379f60a0c8b715c3fc10eb44a8d0d7", "score": "0.7165378", "text": "protected function isImageMagickEnabledAndConfigured() {}", "title": "" }, { "docid": "6835a235675805e014fa3d168013c61d", "score": "0.69275796", "text": "protected function determineImageMagickVersion() {}", "title": "" }, { "docid": "ad0bdf7e2b890b3dd2ddf5d90b8d2286", "score": "0.6807012", "text": "public function isImageMagickWorking()\n {\n /** @var SettingModel $settingModel */\n $settingModel = MidasLoader::loadModel('Setting');\n $provider = $settingModel->getValueByName(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY, $this->moduleName);\n\n if ($provider === MIDAS_THUMBNAILCREATOR_PROVIDER_GD) {\n if (extension_loaded('gd')) {\n return array(true, 'GD PHP extension is loaded');\n }\n\n return array(false, 'GD PHP extension is not loaded');\n }\n\n if ($provider === MIDAS_THUMBNAILCREATOR_PROVIDER_IMAGICK) {\n if (extension_loaded('imagick')) {\n return array(true, 'ImageMagick PHP extension is loaded');\n }\n\n return array(false, 'ImageMagick PHP extension is not loaded');\n }\n\n if ($provider === MIDAS_THUMBNAILCREATOR_PROVIDER_PHMAGICK) {\n $imageMagickPath = $settingModel->getValueByName(MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_KEY, $this->moduleName);\n\n if (empty($imageMagickPath)) {\n return array(false, 'No ImageMagick path has been set');\n }\n\n if (strpos(strtolower(PHP_OS), 'win') === 0) {\n $ext = '.exe';\n } else {\n $ext = '';\n }\n\n if (file_exists($imageMagickPath.'/convert'.$ext)) {\n $cmd = $imageMagickPath.'/convert'.$ext;\n } elseif (file_exists($imageMagickPath.'/im-convert'.$ext)) {\n $cmd = $imageMagickPath.'/im-convert'.$ext;\n } else {\n return array(false, 'Neither convert nor im-convert found at '.$imageMagickPath);\n }\n\n exec($cmd, $output, $returnValue);\n\n if (count($output) > 0) {\n // version line should look like: \"Version: ImageMagick 6.4.7 2008-12-04 Q16 http://www.imagemagick.org\"\n list($versionLine) = $output;\n\n // split version by spaces\n $versionChunks = explode(' ', $versionLine);\n\n // assume version is the third element\n $version = $versionChunks[2];\n\n // get major, minor and patch number\n list($major) = explode('.', $version);\n\n if ($major < 6) {\n $text = '<b>ImageMagick</b> ('.$version.') is found. A version greater than 6.0 is required.';\n\n return array(false, $text);\n }\n\n return array(true, $cmd.' (version '.$version.')');\n }\n\n return array(false, 'No output from '.$cmd);\n }\n\n return array(false, 'No provider has been selected');\n }", "title": "" }, { "docid": "4059bdbf108b31cb5d394b03e9baae8e", "score": "0.6798353", "text": "function eri_im_php_valid() {\r\n\treturn class_exists('Imagick');\r\n}", "title": "" }, { "docid": "08472dcb9f6f16426ac834288c8405f2", "score": "0.6540764", "text": "function gd_support(){\n\t\treturn in_array($this->getGDType(), we_base_imageEdit::supported_image_types());\n\t}", "title": "" }, { "docid": "e3c75e78bcc60d071bae0192722f0c85", "score": "0.65037316", "text": "function checkImageMagik() {\n\t\tfor ($i=0; $i<count($this->arrCommands) ;$i++) {\n\t\t\t$this->arrCommands[$i] .= 'convert';\n\t\t}\n\t\tif (!isset($GLOBALS[\"tNG\"][\"imagemagick\"])) {\n\t\t\t$shell = new KT_shell();\n\t\t\t$arrCommands = $this->arrCommands;\n\t\t\t$arrArguments = array(\"\");\n\t\t\t$output = $shell->execute($arrCommands, $arrArguments);\n\t\t\t\n\t\t\tif ($shell->hasError()) {\n\t\t\t\t$GLOBALS[\"tNG\"][\"imagemagick\"] = false;\n\t\t\t} else {\n\t\t\t\tif ($output!='') {\n\t\t\t\t\t$GLOBALS[\"tNG\"][\"imagemagick\"] = true;\n\t\t\t\t} else {\n\t\t\t\t\t$GLOBALS[\"tNG\"][\"imagemagick\"] = false;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $GLOBALS[\"tNG\"][\"imagemagick\"];\n\t}", "title": "" }, { "docid": "b6f6b3a2e5b776565b796a95ed9c2bff", "score": "0.6463206", "text": "public function checkOperationality()\n {\n if (!extension_loaded('Gmagick')) {\n throw new SystemRequirementsNotMetException('Required Gmagick extension is not available.');\n }\n\n if (!class_exists('Gmagick')) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick is installed, but not correctly. The class Gmagick is not available'\n );\n }\n\n $im = new \\Gmagick($this->source);\n\n if (!in_array('WEBP', $im->queryformats())) {\n throw new SystemRequirementsNotMetException('Gmagick was compiled without WebP support.');\n }\n }", "title": "" }, { "docid": "cf55f46219cbd4e788e5b2c47accb0c9", "score": "0.64407617", "text": "public function isSupportedImage()\n\t{\n\t\t$mime = $this->getMimeType();\n\t\tif (in_array($mime, array('image/jpeg', 'image/gif', 'image/png')))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c67f2bd4c0f65e33ad28488b5f536df2", "score": "0.63576466", "text": "public static function check()\n\t{\n\t\texec(Image_ImageMagick::get_command('convert'), $response, $status);\n\n\t\tif ($status)\n\t\t{\n\t\t\tthrow new Kohana_Exception('ImageMagick is not installed in :path, check your configuration. status :status', \n\t\t\tarray(':path'=>Image_ImageMagick::$_imagemagick,\n\t\t\t':status'=>$status)\n\t\t\t);\n\t\t}\n\n\t\treturn Image_ImageMagick::$_checked = TRUE;\n\t}", "title": "" }, { "docid": "3659ddb02b238ebbd1ef55734870a9ab", "score": "0.6343694", "text": "public static function isSupported()\n {\n return function_exists('finfo_open');\n }", "title": "" }, { "docid": "6450391b5341d3e76eb7ad7f8a5c71df", "score": "0.6288642", "text": "public static function isSupported();", "title": "" }, { "docid": "6450391b5341d3e76eb7ad7f8a5c71df", "score": "0.6288642", "text": "public static function isSupported();", "title": "" }, { "docid": "c5317165cea7a5d6e7a5fc05312dc13a", "score": "0.6218971", "text": "protected function verifyFormatCompatiblity()\n {\n $gdInfo = gd_info();\n\n switch ($this->format) {\n case 'GIF':\n $isCompatible = $gdInfo['GIF Create Support'];\n break;\n case 'JPG':\n case 'JPEG':\n $isCompatible = (isset($gdInfo['JPG Support']) || isset($gdInfo['JPEG Support'])) ? true : false;\n $this->format = 'JPEG';\n break;\n case 'PNG':\n case 'XBM':\n case 'XPM':\n case 'WBMP':\n $isCompatible = $gdInfo[$this->format . ' Support'];\n break;\n default:\n $isCompatible = false;\n break;\n }\n\n if (!$isCompatible) {\n $isCompatible = $gdInfo['JPEG Support'];\n\n if (!$isCompatible) {\n throw $this->triggerError(sprintf('Your GD installation does not support \"%s\" image types!', $this->format));\n }\n }\n }", "title": "" }, { "docid": "18534fb2ecd59a5d0e71d971378375b7", "score": "0.6180926", "text": "public function test_supports_mime_type() {\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( null );\n\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/jpeg' ), 'Does not support image/jpeg' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/png' ), 'Does not support image/png' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/gif' ), 'Does not support image/gif' );\n\t}", "title": "" }, { "docid": "90240c87f81a2b728419bd0fddbd6ea4", "score": "0.6170804", "text": "public function checkConvertability()\n {\n $im = new \\Imagick();\n $mimeType = $this->getMimeTypeOfSource();\n switch ($mimeType) {\n case 'image/png':\n if (!in_array('PNG', $im->queryFormats('PNG'))) {\n throw new SystemRequirementsNotMetException(\n 'Imagick has been compiled without PNG support and can therefore not convert this PNG image.'\n );\n }\n break;\n case 'image/jpeg':\n if (!in_array('JPEG', $im->queryFormats('JPEG'))) {\n throw new SystemRequirementsNotMetException(\n 'Imagick has been compiled without Jpeg support and can therefore not convert this Jpeg image.'\n );\n }\n break;\n }\n }", "title": "" }, { "docid": "9dc359c6d34f47971470d38767582ac9", "score": "0.61627746", "text": "public function test_supports_mime_type() {\n\n\t\t$imagick_image_editor = new WP_Image_Editor_Imagick( null );\n\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/jpeg' ), 'Does not support image/jpeg' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/png' ), 'Does not support image/png' );\n\t\t$this->assertTrue( $imagick_image_editor->supports_mime_type( 'image/gif' ), 'Does not support image/gif' );\n\t}", "title": "" }, { "docid": "0e12c65a2ca524498d4a7e5cab335ad9", "score": "0.6161445", "text": "public static function hasSupport() {\n\t\tif(!function_exists('exif_read_data')) {\t\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1df3c3e6bc7ed18e34b9989fe94082f2", "score": "0.61611307", "text": "static public function isSupported();", "title": "" }, { "docid": "2e378e941871cdf3ce3f9a826cd87345", "score": "0.6145515", "text": "function checkCaptchaSupport() {\n\t\tif (extension_loaded('imagick')) {\n\t\t\t$imagick = new Imagick();\n\t\t\t$imagickFormats = $imagick->queryFormats('PNG');\n\t\t}\n\t\tif (extension_loaded('gd')) {\n\t\t\t$gdInfo = gd_info();\n\t\t}\n\t\tif (isset($imagickFormats) && in_array('PNG', $imagickFormats)) {\n\t\t\treturn true;\n\t\t} elseif (isset($gdInfo)) {\n\t\t\tif ($gdInfo['FreeType Support']) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// GD installed,<br />FreeType support not installed\n\t\t\treturn false;\n\t\t}\n\t\t// GD or ImageMagick not installed\n\t\treturn false;\n\t}", "title": "" }, { "docid": "18a297516041eaba68f1b9592bf2e06b", "score": "0.6140753", "text": "public function isImage() {\n\t\treturn $this->support == \"img\";\n\t}", "title": "" }, { "docid": "e477996ace0415dfaf88ead50f6cfb55", "score": "0.61061054", "text": "public static function isSupported(): bool;", "title": "" }, { "docid": "853b1d8df987e79de9ffeb75576dce39", "score": "0.6007606", "text": "public function isSupported();", "title": "" }, { "docid": "853b1d8df987e79de9ffeb75576dce39", "score": "0.6007606", "text": "public function isSupported();", "title": "" }, { "docid": "2dbf0122e2a2955ee6a3b27f62dbfb93", "score": "0.5983509", "text": "public static function isSupported()\n {\n return true;\n }", "title": "" }, { "docid": "3bc748c1c5c294ba1b04331554c16ac1", "score": "0.5972048", "text": "public function checkConvertability()\n {\n $im = new \\Gmagick();\n $mimeType = $this->getMimeTypeOfSource();\n switch ($mimeType) {\n case 'image/png':\n if (!in_array('PNG', $im->queryFormats())) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick has been compiled without PNG support and can therefore not convert this PNG image.'\n );\n }\n break;\n case 'image/jpeg':\n if (!in_array('JPEG', $im->queryFormats())) {\n throw new SystemRequirementsNotMetException(\n 'Gmagick has been compiled without Jpeg support and can therefore not convert this Jpeg image.'\n );\n }\n break;\n }\n }", "title": "" }, { "docid": "e693af6d69f83d4e7d14415f42834f92", "score": "0.59650177", "text": "public static function GDSupported() {\n\t\treturn \\function_exists('gd_info');\n\t}", "title": "" }, { "docid": "fba11e26cbcfa9826c69d4f2c369df0f", "score": "0.5945044", "text": "public static function isSupported()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fba11e26cbcfa9826c69d4f2c369df0f", "score": "0.5945044", "text": "public static function isSupported()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5356be416097a8d102690ba55d89434c", "score": "0.58813196", "text": "abstract public function isSupported();", "title": "" }, { "docid": "e7fce50b9dddd9796c15141dc2823b6f", "score": "0.5799943", "text": "public function getSupportedFormat()\n {\n $gdInfo = gd_info();\n $support = array();\n\n foreach ($gdInfo as $key => $info) {\n if (is_bool($info) && $info === true) {\n $tmp = explode(' ', $key);\n $format = $tmp[0];\n if (($format != 'FreeType' || $format != 'T1Lib') && !in_array($format, $support)) {\n $support[] = $format;\n }\n }\n }\n\n return $support;\n }", "title": "" }, { "docid": "0ef04d0b29ca6941438be44ee87b7b56", "score": "0.5798859", "text": "protected function checkGdLibPngSupport() {}", "title": "" }, { "docid": "2baf31b930deb636e83d0c5ab4f5ab1a", "score": "0.57971084", "text": "public static function isSupported()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b524a9a3f5b613a2090d422a4d22be16", "score": "0.5787276", "text": "protected function checkGdLibGifSupport() {}", "title": "" }, { "docid": "8087889f2c18da1d280ae441e548f041", "score": "0.57566303", "text": "public function isSupported()\n {\n if (DIRECTORY_SEPARATOR === '\\\\') {\n return (function_exists('sapi_windows_vt100_support')\n && @sapi_windows_vt100_support(STDOUT))\n || false !== getenv('ANSICON')\n || 'ON' === getenv('ConEmuANSI')\n || 'xterm' === getenv('TERM');\n }\n\n if (function_exists('stream_isatty')) {\n return @stream_isatty(STDOUT);\n }\n\n if (function_exists('posix_isatty')) {\n return @posix_isatty(STDOUT);\n }\n\n $stat = @fstat($this->stream);\n // Check if formatted mode is S_IFCHR\n return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;\n }", "title": "" }, { "docid": "cd9df60070180ced31e2e930024657d3", "score": "0.5751909", "text": "abstract function isSupported(): bool;", "title": "" }, { "docid": "b80d951283f19749d5b89da79b63b365", "score": "0.5729753", "text": "public function isSupported()\n {\n return true;\n }", "title": "" }, { "docid": "b80d951283f19749d5b89da79b63b365", "score": "0.5729753", "text": "public function isSupported()\n {\n return true;\n }", "title": "" }, { "docid": "bdc8d7304bd71b4ee6859354b1d7db8f", "score": "0.5708615", "text": "protected function hasColorSupport()\n {\n if (DIRECTORY_SEPARATOR === '\\\\') {\n return\n '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD\n || false !== getenv('ANSICON')\n || 'ON' === getenv('ConEmuANSI')\n || 'xterm' === getenv('TERM');\n }\n\n return true;//function_exists('posix_isatty');\n }", "title": "" }, { "docid": "45d937c4544acf412430c2dc70cc656a", "score": "0.5689618", "text": "protected function checkGdLibJpgSupport() {}", "title": "" }, { "docid": "d986d1f7f91ea6f437f5127fe9e42998", "score": "0.5686509", "text": "public function isSupported()\n\t{\n\t\treturn $this->isSupported;\n\t}", "title": "" }, { "docid": "b04e67a778bc7c43cf8c286af52e41d8", "score": "0.56781054", "text": "public function isImage()\n\t{\n\t\treturn in_array($this->extension, $this->imgext);\n\t}", "title": "" }, { "docid": "78184e63eb902d25fe1dfb1385426d53", "score": "0.56469554", "text": "public function isSupported()\n {\n return $this->supported;\n }", "title": "" }, { "docid": "05ad6efe38b8725fff3dbf193c950a17", "score": "0.56401026", "text": "public function detectSupport()\n\t{\n\t\t$supported = array(\n\t\t\t'zip'\t=> class_exists('ZipArchive'),\n\t\t\t'php'\t=> version_compare(PHP_VERSION, '5.3.10', '>=')\n\t\t);\n\n\t\treturn $this->supported = $supported;\n\t}", "title": "" }, { "docid": "7dcff2fc0107f8d3ac53edc3f2a1240a", "score": "0.5635273", "text": "protected function detectLib()\n {\n try {\n if (extension_loaded('gd') && function_exists('gd_info')) {\n return 'GD';\n \n } else if(extension_loaded('imagick')) {\n return 'Imagick';\n \n } else if(extension_loaded('gmagick')) {\n return 'Gmagick';\n }\n\n throw new \\Exception(\n \"Try installing one of the following graphic libraries php5-gd, php5-imagick, php5-gmagick.\n \");\n\n } catch(\\Exception $e) {\n echo $e->getMessage() . \"\\n\";\n }\n }", "title": "" }, { "docid": "ad0ba21669e843024ffe2e76053bc55d", "score": "0.5634501", "text": "public static function isSupported()\n\t{\n\t\treturn extension_loaded('bz2');\n\t}", "title": "" }, { "docid": "ce2223b0d8130cd843988a589aa3ba71", "score": "0.5607936", "text": "public function getIsSupported() {\n return $this->get(self::IS_SUPPORTED);\n }", "title": "" }, { "docid": "a12795e84d983157d391f95188685e18", "score": "0.56075746", "text": "public static function is_convertable($mimetype = null)\n {\n $rcube = rcube::get_instance();\n\n // @TODO: check if specified mimetype is really supported\n return class_exists('Imagick', false) || $rcube->config->get('im_convert_path');\n }", "title": "" }, { "docid": "ad211a15bcc12ca46415a09751fa4162", "score": "0.5589064", "text": "function autoDetect() {\n $GDfuncList = get_extension_funcs('gd');\n ob_start();\n @phpinfo(INFO_MODULES);\n $output = ob_get_contents();\n ob_end_clean();\n $matches[1] = '';\n if (preg_match(\"/GD Version[ \\t]*(<[^>]+>[ \\t]*)+([^<>]+)/s\", $output, $matches)) {\n $gdversion = $matches[2];\n }\n $res = false;\n if ($GDfuncList) {\n if (!in_array('imagegd2', $GDfuncList)) {\n zmgToolboxPlugin::registerError('GD 1.x', $gdversion . ' ' . T_('is available.'));\n $res = true;\n }\n }\n if (!$res) {\n zmgToolboxPlugin::registerError('GD 1.x', T_('could not be detected on your system.'));\n }\n }", "title": "" }, { "docid": "1d1c7dd437e56a7d52a9dc9325d5792c", "score": "0.5563048", "text": "public function isSupported() {\nif (extension_loaded('mysqli')) {\n\treturn true;\n}\nelse {\n\t$this->error='The mysqli extension for PHP is not installed.';\n\treturn false;\n};\n}", "title": "" }, { "docid": "013ddc40aeb76f36070b3714400d6e92", "score": "0.5549464", "text": "function is_version_supported() : bool {\n\t$release = get_current_version_info();\n\treturn $release['supported'] ?? true;\n}", "title": "" }, { "docid": "17d8efd15f9a2ff1e5d91e74efbf54cc", "score": "0.5522084", "text": "function find_imagemagick()\n{\n $imagemagick = '/usr/bin/convert';\n if (!@file_exists($imagemagick)) {\n $imagemagick = '/usr/local/bin/convert';\n }\n if (!@file_exists($imagemagick)) {\n $imagemagick = '/opt/local/bin/convert';\n }\n if (!@file_exists($imagemagick)) {\n $imagemagick = '/opt/cloudlinux/bin/convert';\n }\n if (!@file_exists($imagemagick)) {\n return null;\n }\n return $imagemagick;\n}", "title": "" }, { "docid": "c3f475ae8cffc8ca505f2909ffd88cae", "score": "0.5511367", "text": "public function isSupported()\n {\n return function_exists('proc_open');\n }", "title": "" }, { "docid": "f65b0d6d31b69679e872be0c887f1d36", "score": "0.5490437", "text": "function tidypics_get_image_libraries() {\n\t$options = array();\n\tif (extension_loaded('gd')) {\n\t\t$options['GD'] = 'GD';\n\t}\n\n\tif (extension_loaded('imagick')) {\n\t\t$options['ImageMagickPHP'] = 'imagick PHP extension';\n\t}\n\n\t$disablefunc = explode(',', ini_get('disable_functions'));\n\tif (is_callable('exec') && !in_array('exec', $disablefunc)) {\n\t\t$options['ImageMagick'] = 'ImageMagick executable';\n\t}\n\n\treturn $options;\n}", "title": "" }, { "docid": "b34e2777435a63529d9b8dc1ef144ea7", "score": "0.54886764", "text": "function isSupported() {\n\treturn false;\n }", "title": "" }, { "docid": "489186d74f13fa94813ffd057b558384", "score": "0.5476542", "text": "function is_image() {\r\n // jpegs or pngs to the same file type.\r\n\r\n $png_mimes = array('image/x-png');\r\n $jpeg_mimes = array('image/jpg', 'image/jpe', 'image/jpeg', 'image/pjpeg');\r\n\r\n if (in_array($this->file_type, $png_mimes))\r\n {\r\n $this->file_type = 'image/png';\r\n }\r\n\r\n if (in_array($this->file_type, $jpeg_mimes))\r\n {\r\n $this->file_type = 'image/jpeg';\r\n }\r\n\r\n $img_mimes = array(\r\n 'image/gif',\r\n 'image/jpeg',\r\n 'image/png',\r\n );\r\n\r\n return (in_array($this->file_type, $img_mimes, TRUE)) ? TRUE : FALSE;\r\n }", "title": "" }, { "docid": "da6951f9900d3c5368aee8321d72b1ac", "score": "0.54243046", "text": "public function getSupportedFormats() {\n\t\tif(!empty($this->supported)) {\n\t\t\treturn $this->supported;\n\t\t}\n\t\t$this->supported = MM::getSupportedFormats();\n\t\treturn $this->supported;\n\t}", "title": "" }, { "docid": "4e66b1efb6a0d27f0b3e6d22e0abb83d", "score": "0.5415297", "text": "public function isGuesserSupported(): bool;", "title": "" }, { "docid": "241a9a5416c4c94170ab485fc4cbde00", "score": "0.5408633", "text": "public function isSupported()\n {\n return null !== $this->name();\n }", "title": "" }, { "docid": "f31be43c5ad711b25a8dd08c0e22a8fe", "score": "0.5355959", "text": "function isSupported() {\r\n\t\t\treturn extension_loaded( 'mysql' );\r\n\t\t}", "title": "" }, { "docid": "07232496b78d9d59c7055ab094cfb85a", "score": "0.53550637", "text": "function available()\n {\n static $available = null;\n if (is_null($available)) $available = FactoryPattern::available('Image_Filter'\n , dirname(__FILE__));\n return $available;\n }", "title": "" }, { "docid": "06882d373762f8192d1090fbfe2f6ff7", "score": "0.53489304", "text": "public function isImage()\n {\n $mime_type = $this->getMimeType() ?: $this->detectMimeType();\n\n return (strpos($mime_type, 'image') === 0);\n }", "title": "" }, { "docid": "7d1211b296da1cb33fdbcf93f952a012", "score": "0.5341601", "text": "public static function isSupported()\n {\n return \\in_array('mssql', \\PDO::getAvailableDrivers(), true);\n }", "title": "" }, { "docid": "78c9410721072644cf688ed3e57a206f", "score": "0.5327038", "text": "function isSupported() {\r\n\t\t\treturn extension_loaded( 'oci8' );\r\n\t\t}", "title": "" }, { "docid": "dea7382b37b97fad6d5a37dc5718eefa", "score": "0.52930087", "text": "function GDEnabled()\n\t{\n\t\tstatic $gd_enabled = null;\n\n\t\tif (is_null($gd_enabled)) {\n\t\t\t$gd_enabled =\tfunction_exists('imagecreate')\n\t\t\t\t\t\t\t&& (\tfunction_exists('imagegif')\n\t\t\t\t\t\t\t\t\t|| function_exists('imagepng')\n\t\t\t\t\t\t\t\t\t|| function_exists('imagejpeg'));\n\t\t}\n\n\t\treturn $gd_enabled;\n\t}", "title": "" }, { "docid": "ccd601123533a97ce39d1feb792a9fb1", "score": "0.5289954", "text": "public function isInterventionImage($image)\n {\n return is_a($image, \\Intervention\\Image\\Image::class);\n }", "title": "" }, { "docid": "f6cea92f33d5d58a570dc25c1743021d", "score": "0.528203", "text": "protected static function _isSupported($type, $throw = true)\n {\n if( empty(self::getSupport()->$type) )\n {\n if( $throw )\n {\n throw new Engine_Image_Adapter_Exception(sprintf('Image type %s is not supported', $type));\n }\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d0e9fc37eb2d70667c2aa5ecd1c89bc5", "score": "0.5272045", "text": "function gdInstalled() {\r\n return function_exists( 'gd_info' );\r\n}", "title": "" }, { "docid": "6d752bf447828845b6e6710c36791732", "score": "0.5250849", "text": "protected static function getSupport()\n {\n if( null === self::$_support )\n {\n $info = ( function_exists('gd_info') ? gd_info() : array() );\n $support = new stdClass();\n \n $support->freetype = !empty($info[\"FreeType Support\"]);\n $support->t1lib = !empty($info[\"T1Lib Support\"]);\n $support->gif = ( !empty($info[\"GIF Read Support\"]) && !empty($info[\"GIF Create Support\"]) );\n $support->jpg = ( !empty($info[\"JPG Support\"]) || !empty($info[\"JPEG Support\"]) );\n $support->jpeg = $support->jpg;\n $support->png = !empty($info[\"PNG Support\"]);\n $support->wbmp = !empty($info[\"WBMP Support\"]);\n $support->xbm = !empty($info[\"XBM Support\"]);\n\n self::$_support = $support;\n }\n\n return self::$_support;\n }", "title": "" }, { "docid": "7fff0ddbc903000a0938d1d90f6c9fbe", "score": "0.52431715", "text": "protected static function supportedTypes() {\n return [IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF];\n }", "title": "" }, { "docid": "e0cefa6955fb59c9b9ce22ab81514fcb", "score": "0.524073", "text": "function imageSupport() {\n\t$arr = getExternalApps();\n\n\t//ocr support\n\tif (defined(\"OCR_SUPPORT\")) $ocrText = \"OCR \"._SUPPORT_ENABLED;\n\telse $ocrText = \"OCR \"._SUPPORT_DISABLED;\n\n\tif (defined(\"THUMB_SUPPORT\")) $thumbText = \"Thumbnail \"._SUPPORT_ENABLED;\n\telse $thumbText = \"THUMB \"._SUPPORT_DISABLED;\n\n\t$string = \"<div class=\\\"formHeader\\\">\n\t\t Image \"._SUPPORT_DETAILS.\"\n\t\t </div>\n\t\t \";\n\n\tif ($arr[\"imagemagick\"] && defined(\"OCR_SUPPORT\")) \n\t\t$string .= \"Basic Image OCR \"._SUPPORT_ENABLED.\"\\n\";\n\telse \n\t\t$string .= \"Basic Image OCR \"._SUPPORT_DISABLED.\"\\n\";\n\n\t$string .= \"<br>\";\n\n\tif (defined(\"THUMB_SUPPORT\") && $arr[\"imagemagick\"]) $string .= \"Basic Image Thumbnail \"._SUPPORT_ENABLED.\"\\n\";\n\telse $string .= \"Basic Image Thumbnail \"._SUPPORT_DISABLED.\"\\n\";\n\n\t$string .= \"<br><br>\";\n\n\t$string .= \"<div class=\\\"formHeader\\\">\n\t\t TIFF \"._SUPPORT_DETAILS.\"\n\t\t </div>\n\t\t \";\n\n\tif ($arr[\"libtiff\"] && defined(\"OCR_SUPPORT\")) \n\t\t$string .= \"TIFF Image OCR \"._SUPPORT_ENABLED.\"\\n\";\n\telse \n\t\t$string .= \"TIFF Image OCR \"._SUPPORT_DISABLED.\"\\n\";\n\t$string .= \"<br>\";\n\n\tif (defined(\"THUMB_SUPPORT\") && $arr[\"libtiff\"]) $string .= \"TIFF Image Thumbnail \"._SUPPORT_ENABLED.\"\\n\";\n\telse $string .= \"TIFF Image Thumbnail \"._SUPPORT_DISABLED.\"\\n\";\n\t$string .= \"<br><br>\";\n\n\t//otherwise, just show what binaries we found\n\t$string .= \"<div class=\\\"formHeader\\\">Image and TIFF \"._RELATED_BINARIES.\"</div>\";\n\t$string .= genBinaryAvail($arr,\"ocr\");\n\t$string .= genBinaryAvail($arr,\"convert\");\n\t$string .= genBinaryAvail($arr,\"mogrify\");\n\t$string .= genBinaryAvail($arr,\"montage\");\n\t$string .= genBinaryAvail($arr,\"tiffsplit\");\n\t$string .= genBinaryAvail($arr,\"tiffinfo\");\n\n\treturn $string;\n\n}", "title": "" }, { "docid": "2116b18fba4bcd2cad33b9677eacddf0", "score": "0.5235261", "text": "public function checkConvertability()\n {\n $mimeType = $this->getMimeTypeOfSource();\n switch ($mimeType) {\n case 'image/png':\n if (!function_exists('imagecreatefrompng')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without PNG support and can therefore not convert this PNG image.'\n );\n }\n break;\n\n case 'image/jpeg':\n if (!function_exists('imagecreatefromjpeg')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without Jpeg support and can therefore not convert this jpeg image.'\n );\n }\n }\n }", "title": "" }, { "docid": "28b4ee41a5cd5d879c30b1f700a1f0af", "score": "0.52109885", "text": "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException(\n 'imagemagick is not installed (cannot execute: \"' . $this->getPath() . '\")'\n );\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "title": "" }, { "docid": "18752ac19e62cd738109d65dcde88890", "score": "0.520888", "text": "function is_gd_image($image)\n {\n }", "title": "" }, { "docid": "0eb1d1894ef2efef5bc4ae37d037190a", "score": "0.51959753", "text": "function IsImage() {\n\t\t$className = $this->Image()->class;\n\t\treturn $className == \"Image\" || is_subclass_of($className, \"Image\");\n\t}", "title": "" }, { "docid": "41d84d15c8dcde0ce2842f01253c51f5", "score": "0.5181855", "text": "public function getSupported()\n {\n return $this->supported;\n }", "title": "" }, { "docid": "451b2f65b336f9769481b333cb74a83c", "score": "0.51745033", "text": "function equipeer_is_image($image_path) {\n\t $file = array_values(getimagesize($image_path));\n\t //use list on new array\n\t list($width, $height, $type, $attr) = $file;\n\t \n\t if ($width > 0)\n\t\t return true; // Is an image\n\t else\n\t\t return false; // Is not an image\n\t}", "title": "" }, { "docid": "a67fbbf940d859219c6c656be00ec0a0", "score": "0.5172285", "text": "function is_image( string $path ):bool\r\n {\r\n $a = getimagesize($path);\r\n $image_type = $a[2];\r\n\r\n if( in_array( $image_type , array( IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP) ) )\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "b3d6244b1aab2ea6575194599583f553", "score": "0.51633507", "text": "function is_imagify_servers_up() {\n\t_deprecated_function( __FUNCTION__ . '()', '1.7.1', 'Imagify_Requirements::is_api_up()' );\n\n\treturn Imagify_Requirements::is_api_up();\n}", "title": "" }, { "docid": "dd3bd33bc35fce1293ff5fc697e46e3e", "score": "0.5161945", "text": "public function isImage()\n {\n return strtolower(substr($this->getMimeType(), 0, 5)) == 'image';\n }", "title": "" }, { "docid": "003a423c3a3bfdfb194527016af14255", "score": "0.5159171", "text": "public static function test()\n\t{\n\t\treturn self::isSupported();\n\t}", "title": "" }, { "docid": "90e9b18b5fb8c8402f65dad295411aa0", "score": "0.5139121", "text": "function get_imagemagick_version($array=true){\n\t// will return an array of major/minor/version/patch if $array is true, otherwise just the version string\n\n # Locate imagemagick, or return false if it isn't installed\n $convert_fullpath = get_utility_path(\"im-convert\");\n if ($convert_fullpath==false) {return false;}\n\n $versionstring = run_command($convert_fullpath . \" --version\");\n\t// example: \n\t// Version: ImageMagick 6.5.0-0 2011-02-18 Q16 http://www.imagemagick.org\n // Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC\n\n\tif (preg_match(\"/^Version: +ImageMagick (\\d+)\\.(\\d+)\\.(\\d+)-(\\d+) /\",$versionstring,$matches)){\n\t\t$majorver = $matches[1];\n\t\t$minorver = $matches[2];\n\t\t$revision = $matches[3];\n\t\t$patch = $matches[4];\n\t\tif ($array){\n\t\t\treturn array($majorver,$minorver,$revision,$patch);\n\t\t} else {\n\t\t\treturn \"$majorver.$minorver.$revision-$patch\";\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "4cec3c7952c8db0a61efab0d62bd9f9e", "score": "0.5132619", "text": "function _isImage($file)\n {\n if (is_dir($file)) return false;\n\n// TODO: merge this function with isImage of lib/FRAMEWORK/Image.class.php\n if (class_exists('finfo', false)) {\n $finfo = new finfo(FILEINFO_MIME_TYPE);\n $mimeType = $finfo->file($file);\n\n if (strpos($mimeType, 'image') !== 0) {\n return false;\n }\n\n $type = substr($mimeType, strpos($mimeType, '/') + 1);\n switch ($type) {\n case 'gif':\n return 1;\n break;\n\n case 'jpeg':\n return 2;\n break;\n\n case 'png':\n return 3;\n break;\n }\n }\n\n if (function_exists('exif_imagetype')) {\n $type = exif_imagetype($file);\n } elseif (function_exists('getimagesize')) {\n $img = @getimagesize($file);\n if ($img === false) {\n return false;\n }\n $type = $img[2];\n } else {\n return false;\n }\n\n if ($type >= 1 && $type <= 3) {\n // 1 = gif, 2 = jpg, 3 = png\n return $type;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "41fa8ad3265f9ea9be3771577f5e44fd", "score": "0.5128302", "text": "public function hasGd()\n\t{\n\t\tif (extension_loaded('gd')) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->compatible = false;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "55f791b307110c9a93ce4b57aa6ab98e", "score": "0.51156324", "text": "public function has_icon_images()\n {\n // Check to see if the images are there.\n $test_group = 'medicine';\n $test_item = @reset($this->icon_data['icons'][$test_group]);\n $test_img = (\n Settings::get('dir_base').\n $test_group.'/'.\n $test_item['icon']['filename']\n );\n return is_file($test_img);\n }", "title": "" }, { "docid": "efc878ff0171d47d08fab976691e0ce2", "score": "0.5110821", "text": "public function checkImageType()\n {\n if (empty($this->checkImageType)) {\n return true;\n }\n\n if (('image' == substr($this->mediaType, 0, strpos($this->mediaType, '/')))\n || (!empty($this->mediaRealType)\n && 'image' == substr($this->mediaRealType, 0, strpos($this->mediaRealType, '/')))\n ) {\n if (!@getimagesize($this->mediaTmpName)) {\n $this->setErrors(\\XoopsLocale::E_INVALID_IMAGE_FILE);\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "fc75c79636f70340cf5a18f90c0d3368", "score": "0.510417", "text": "public function getSupportedImageExt() {\n return $this->__supportedImageExtension;\n }", "title": "" }, { "docid": "3a0b07a3eacb6f1cfe23398818b7178a", "score": "0.50918156", "text": "public function supports(ToolVersionInterface $version): bool;", "title": "" }, { "docid": "a5450776e24da6fa747ca199dff68eb0", "score": "0.5090547", "text": "private function isSupported(): bool\n {\n exec('zip --version 2>&1', $output, $code);\n\n $result = $output[0] ?? false;\n \n return $result !== false && $code === 0 && preg_match('/Info-ZIP/', $result);\n }", "title": "" }, { "docid": "324bb0b8621c21c63cfc49ff140ec84c", "score": "0.5089086", "text": "public function checkOperationality()\n {\n if (!extension_loaded('gd')) {\n throw new SystemRequirementsNotMetException('Required Gd extension is not available.');\n }\n\n if (!function_exists('imagewebp')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without webp support.'\n );\n }\n }", "title": "" }, { "docid": "be52ea2e7dfcd91be0f62e29203c3223", "score": "0.5077265", "text": "public function testSupports(): void\n {\n $this->assertTrue($this->driver->supports(DriverInterface::FEATURE_SAVEPOINT));\n $this->assertTrue($this->driver->supports(DriverInterface::FEATURE_QUOTE));\n\n $this->assertFalse($this->driver->supports(DriverInterface::FEATURE_CTE));\n $this->assertFalse($this->driver->supports(DriverInterface::FEATURE_JSON));\n $this->assertFalse($this->driver->supports(DriverInterface::FEATURE_WINDOW));\n\n $this->assertFalse($this->driver->supports('this-is-fake'));\n }", "title": "" }, { "docid": "0dad69299ea96c81b50ccf0e0bce9314", "score": "0.5071476", "text": "protected function isAnImage()\n {\n return (preg_match('/^image\\/.*/i', $this->getContentType()) >= 1);\n }", "title": "" }, { "docid": "70b47b47bb11d96982e7f1e4c858cae1", "score": "0.5071266", "text": "public static function available()\n\t{\n\t\treturn function_exists('curl_init');\n\t}", "title": "" }, { "docid": "916d6f12bd015fe6b8fd710e0248c4b6", "score": "0.5063463", "text": "function testCompatible(){\n\t\tif($this->$imageAsset[\"type\"] == \"image/jpeg\" || $_FILES[\"image_upload_box\"][\"type\"] == \"image/pjpeg\"){\t\n\t\t\t$this->imgType = 'jpg';\n\t\t}\t\t\n\t\t// if uploaded image was GIF\n\t\tif($this->$imageAsset[\"type\"] == \"image/gif\"){\t\n\t\t\t$this->imgType = 'gif';\n\t\t}\t\n\t\t// if uploaded image was PNG\n\t\tif($this->$imageAsset[\"type\"] == \"image/x-png\"){\n\t\t\t$this->imgType = 'png';\n\t\t}\n\t\telse {\n\t\t\t$this->imgType = 'invalid';\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "92df694d5deca1d0af6b9f2d3ef58c7b", "score": "0.5062587", "text": "public function isMysqlSupported()\n {\n $exts = get_loaded_extensions();\n $mysqli_support = in_array('mysqli', $exts) ? true : false;\n $pdo_support = in_array('pdo_mysql', $exts) ? true : false;\n\n $checking_result = $mysqli_support || $pdo_support ? true : false;\n\n if (!$checking_result) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_mysql_support_notice'), true, 'validator');\n }\n\n return $checking_result;\n }", "title": "" }, { "docid": "3e59631e9158f8d76216115b4db6445b", "score": "0.504844", "text": "protected function checkLibraryAvailable()\n\t{\n\t\t$check = new LibrariesAvailable('gd');\n\t}", "title": "" }, { "docid": "8d152d064dc53f9b2e25dc139a72ca2f", "score": "0.50362253", "text": "public static function finfo_loaded(): bool\n {\n return \\class_exists('finfo');\n }", "title": "" }, { "docid": "56e07051a9d67abb46528f03c939b92b", "score": "0.5029315", "text": "private function isValidImage() {\r\n\t\t\treturn in_array($this->extension, $this->extAllowed) ? true : false;\r\n\t\t}", "title": "" }, { "docid": "cb8cbc81e86dd786ebda971124265020", "score": "0.5017206", "text": "function checkGdFileType($filename)\n\t{\n\t\t$arr = @getimagesize($filename);\n\t\t$res = false;\n\t\tif (is_array($arr)) {\n\t\t\tswitch ($arr[2]) {\n\t\t\t\tcase 1:\n\t\t\t\t\tif (function_exists('imagecreatefromgif') && function_exists('imagegif')) {\n\t\t\t\t\t\t$this->gdNoSupport = 'GIF';\n\t\t\t\t\t\t$res = true;\n\t\t\t\t\t} \n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif (function_exists('imagecreatefromjpeg') && function_exists('imagejpeg')) {\n\t\t\t\t\t\t$this->gdNoSupport = 'JPG';\n\t\t\t\t\t\t$res = true;\n\t\t\t\t\t} \n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif (function_exists('imagecreatefrompng') && function_exists('imagepng')) {\n\t\t\t\t\t\t$this->gdNoSupport = 'PNG';\n\t\t\t\t\t\t$res = true;\n\t\t\t\t\t} \n\t\t\t\t\tbreak;\n\t\t\t}\t\n\t\t}\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "0d11b3c886eb094fa7077a3be686d0cd", "score": "0.5014522", "text": "function isImageClass($image=NULL) {\n\tglobal $_zp_extra_filetypes;\n\tif (is_null($image)) {\n\t\tif (!in_context(ZP_IMAGE)) return false;\n\t\tglobal $_zp_current_image;\n\t\t$image = $_zp_current_image;\n\t}\n\treturn is_object($image) && ($image->table == 'images');\n}", "title": "" } ]
99ea65370553e2c47634aacdaf940617
Create a new query builder instance.
[ { "docid": "6152ff98d6b4d0dba88a1d74a2ffb429", "score": "0.0", "text": "public function __construct(\n ConnectionInterface $connection,\n Grammar $grammar = null,\n Processor $processor = null,\n Entity $baseEntity = null\n ) {\n $this->baseEntity = $baseEntity;\n parent::__construct($connection, $grammar, $processor);\n }", "title": "" } ]
[ { "docid": "4628794f3de1e71bb0f75269940daf55", "score": "0.804083", "text": "public function createQueryBuilder()\n {\n return new QueryBuilder($this);\n }", "title": "" }, { "docid": "c0fc5989259b8a2468011e6ea9b3b3a6", "score": "0.80135196", "text": "public function createQueryBuilder()\n\t{\n\t\treturn new QueryBuilder($this);\n\t}", "title": "" }, { "docid": "bec5826de5662c3cbab6f6beb5f9e02d", "score": "0.79626334", "text": "public function query()\n {\n return new QueryBuilder($this);\n }", "title": "" }, { "docid": "45ba3afdf02ac3b7ef34d49de0cb563a", "score": "0.78166693", "text": "public function query()\n {\n return new QueryBuilder(\n $this,\n $this->getQueryGrammar(),\n $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "45ba3afdf02ac3b7ef34d49de0cb563a", "score": "0.78166693", "text": "public function query()\n {\n return new QueryBuilder(\n $this,\n $this->getQueryGrammar(),\n $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "45ba3afdf02ac3b7ef34d49de0cb563a", "score": "0.78166693", "text": "public function query()\n {\n return new QueryBuilder(\n $this,\n $this->getQueryGrammar(),\n $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "9db3bcd4306aca8efc84aadb1c1cf04e", "score": "0.7798551", "text": "public function createQuery() : QueryBuilder\n {\n $this->currentQuery = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->tableName);\n\n $this->andWhereDeleted(false);\n\n return $this->currentQuery;\n }", "title": "" }, { "docid": "ad9661b1a23758869f664c298a7bf00b", "score": "0.77677774", "text": "public function query()\n {\n return new QueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "8bd05fa816adba10aabab7b0b799ab8e", "score": "0.77601063", "text": "public function newQueryBuilder();", "title": "" }, { "docid": "a2755b5036b949946cb4f038b1449a20", "score": "0.77098197", "text": "public static function query(): BaseEloquentBuilder\n {\n return parent::query();\n }", "title": "" }, { "docid": "ecf46e0058f5cbef1985a3f7e953c5ef", "score": "0.7701364", "text": "public function newQuery()\n {\n return new static($this->connection, $this->grammar, $this->processor, $this->baseEntity);\n }", "title": "" }, { "docid": "bd4c31e6153bc17f86af4daf902c43d9", "score": "0.7664632", "text": "protected function _buildQuery() {\n\t\treturn new Query($this->connection(), $this);\n\t}", "title": "" }, { "docid": "3b81e7b9a62f49dccf78e756749e8af2", "score": "0.7657376", "text": "public function query() {\n return new QueryBuilder(\n $this, $this->getQueryGrammar()//, $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "56be38bf367067dc2064ed9010bf7d43", "score": "0.76517594", "text": "public function newQuery(): Builder\n {\n return $this->manager->getRepository()->newQuery();\n }", "title": "" }, { "docid": "395b7e82542ee0c01f60d1a9b7c23028", "score": "0.7625838", "text": "public function createQuery() {\n return new Query();\n }", "title": "" }, { "docid": "9eb335107ecc1d44dfe2087536fa88cb", "score": "0.7545898", "text": "public static function query()\n {\n if (empty(self::$query)) {\n self::$query = new QueryBuilder();\n }\n return self::$query;\n }", "title": "" }, { "docid": "fcd03bcdf37e60809a9ebaf843b4b3f0", "score": "0.7504513", "text": "public function newQuery()\n {\n return new Query($this);\n }", "title": "" }, { "docid": "aa87770f491c348ec12648332d7b6f38", "score": "0.7488987", "text": "public function getQueryBuilder()\n {\n return new QueryBuilder($this);\n }", "title": "" }, { "docid": "d3e6ca7c3871716e9918508b3b01a2c9", "score": "0.74697423", "text": "public function newQueryBuilder()\n {\n return new VoucherQuery($this->adapter,$this);\n }", "title": "" }, { "docid": "984bcefa77eb3a5f39632fd839d723b1", "score": "0.7466461", "text": "public static function query(): Query\n {\n // Create a new model instance for the query to ensure\n // that the model's initialize() method gets called.\n // Otherwise, the property definitions will be incomplete.\n return new Query(new static());\n }", "title": "" }, { "docid": "5d96b4f8e050a7011515328508d34026", "score": "0.7465507", "text": "static public function Create(): Query{\n\t\treturn new self();\n\t}", "title": "" }, { "docid": "00293d9b16240755dc0eb406847060b9", "score": "0.74531704", "text": "abstract public function query(): Builder;", "title": "" }, { "docid": "d56e26e180983f9134d3ef6397cc6a6a", "score": "0.7428569", "text": "protected function newBaseQueryBuilder() {\n\t\t$conn = $this->getConnection();\n\n\t\treturn new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($conn);\n\t}", "title": "" }, { "docid": "fb95639294d9a8fbb6802a42757a9ee1", "score": "0.7416715", "text": "public static function query()\n {\n return new QuarkORMQueryBuilder(__CLASS__);\n }", "title": "" }, { "docid": "e706417df9f7611f7dfc7f0db81d33d2", "score": "0.7413544", "text": "public function newQueryBuilder()\n {\n return new AccountQuery($this->adapter,$this);\n }", "title": "" }, { "docid": "8610c30219c4c9c8c4482f9df670217b", "score": "0.7407643", "text": "public static function query()\n {\n return (new static([], true))->newQuery();\n }", "title": "" }, { "docid": "bc0cd9fa577d266f7fde206b2f9022ab", "score": "0.735674", "text": "protected function newBaseQueryBuilder()\n {\n $conn = $this->getConnection();\n\n $grammar = $conn->getQueryGrammar();\n\n return new QueryBuilder($conn, $grammar, $conn->getPostProcessor(), $this);\n }", "title": "" }, { "docid": "44ca367142731b2eedc1e84d373fdf01", "score": "0.7354207", "text": "public static function query(): static\r\n {\r\n return new static(self::$table);\r\n }", "title": "" }, { "docid": "703006a6809c028430bc4bcd20cfc46b", "score": "0.73449945", "text": "public static function getQueryBuilder(): QueryBuilder\n {\n return self::getConnection()->createQueryBuilder();\n }", "title": "" }, { "docid": "f08076555efdc8fc16ea79eb989d6e9a", "score": "0.73345184", "text": "public function newQueryBuilder()\n {\n return new EventStoreQuery($this->adapter,$this);\n }", "title": "" }, { "docid": "cdcdee899d7bc51106799ebf17a52cca", "score": "0.7333726", "text": "public function builder(): Builder\n {\n /**\n * @var mixed\n */\n static $builder = null;\n\n if (! is_null($builder) && ! app()->environment('testing')) {\n return $builder;\n }\n $builder = $this->query()->newQuery();\n\n return $builder;\n }", "title": "" }, { "docid": "8158fe2e337103abb695da6920a95058", "score": "0.7193035", "text": "public function query()\n {\n return new JqlBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "7395a46fc64be6840cd1738e269b69d2", "score": "0.7101984", "text": "public function getQueryAdapter()\n {\n return new Query();\n }", "title": "" }, { "docid": "c166a0f40ff5ee9e1e4e2cb62711172f", "score": "0.7099716", "text": "public function query()\n {\n return new FirebirdQueryBuilder(\n $this, $this->getQueryGrammar(), $this->getPostProcessor()\n );\n }", "title": "" }, { "docid": "618d47a023060a0f0440b3b842221344", "score": "0.7093704", "text": "public function query() {\n\t\treturn Query::create();\n\t}", "title": "" }, { "docid": "ab7a754724eadd6b4d78f6d9a3c679e8", "score": "0.7057799", "text": "public function getQueryBuilder(): QueryBuilder\n {\n return $this->getConnection()->createQueryBuilder()->select('*')->from($this->getTable());\n }", "title": "" }, { "docid": "409b121ef519e6464bfb2f96825cdb50", "score": "0.7052437", "text": "public function newEloquentQuery(): EloquentBuilder\n {\n return $this->newEloquentModel()->newQuery();\n }", "title": "" }, { "docid": "1d5f2a63d7842fddca34b1f278a611c0", "score": "0.70212746", "text": "public function newQuery()\n {\n $builder = parent::newQuery();\n\n if (isset($this->connectionType) and $this->connectionType) {\n $builder->where('p2p_type', $this->connectionType);\n }\n\n return $builder;\n }", "title": "" }, { "docid": "68afff44fdc524d4af603476e2bad4e1", "score": "0.6993112", "text": "public function newQuery()\n {\n return $this->newBuilder();\n }", "title": "" }, { "docid": "8c9c65970492defb54fcafceb6d80b0b", "score": "0.69725704", "text": "public function query(Closure $builder): self ;", "title": "" }, { "docid": "6d2546bbb7423a35e47ab68bda1fa62f", "score": "0.6962078", "text": "public function query(): QueryBuilderInterface;", "title": "" }, { "docid": "32832e8bd8572dcd5344d5147e02648a", "score": "0.693403", "text": "protected function newBaseQueryBuilder()\n {\n $conn = $this->getConnection();\n\n $grammar = $conn->getQueryGrammar();\n\n $builder = new LaravelSubQueryCache($conn, $grammar, $conn->getPostProcessor());\n\n if (isset($this->rememberFor)) {\n $builder->remember($this->rememberFor);\n }\n\n if (isset($this->rememberCacheTag)) {\n $builder->cacheTags($this->rememberCacheTag);\n }\n\n if (isset($this->rememberCachePrefix)) {\n $builder->prefix($this->rememberCachePrefix);\n }\n\n if (isset($this->rememberCacheDriver)) {\n $builder->cacheDriver($this->rememberCacheDriver);\n }\n\n return $builder;\n }", "title": "" }, { "docid": "f260db2e28eecd1b2bcec70e6a026cb6", "score": "0.69306475", "text": "public static function query() {\n return new Query(get_called_class(), true);\n }", "title": "" }, { "docid": "b59b115cc30371789e643560968fef77", "score": "0.6920091", "text": "public function newEloquentBuilder($query)\n {\n\n }", "title": "" }, { "docid": "fda9d33c3c364488c162ddfe2309f0b1", "score": "0.6915597", "text": "public static function setQuery(string $query): self\n {\n self::$query = $query;\n return new QueryBuilder;\n }", "title": "" }, { "docid": "7139a04c66518495759232c702cf3e43", "score": "0.6906768", "text": "function queryBuilder() {\n\t\t// TODO: Build this function if needed, remove otherwise\n\t\treturn $pageQuery;\n\t}", "title": "" }, { "docid": "8098fbc4561a6edf84015d05198744e3", "score": "0.68670535", "text": "public function newEloquentBuilder($query)\n {\n return new Builder($query);\n }", "title": "" }, { "docid": "8098fbc4561a6edf84015d05198744e3", "score": "0.68670535", "text": "public function newEloquentBuilder($query)\n {\n return new Builder($query);\n }", "title": "" }, { "docid": "8098fbc4561a6edf84015d05198744e3", "score": "0.68670535", "text": "public function newEloquentBuilder($query)\n {\n return new Builder($query);\n }", "title": "" }, { "docid": "8098fbc4561a6edf84015d05198744e3", "score": "0.68670535", "text": "public function newEloquentBuilder($query)\n {\n return new Builder($query);\n }", "title": "" }, { "docid": "8098fbc4561a6edf84015d05198744e3", "score": "0.68670535", "text": "public function newEloquentBuilder($query)\n {\n return new Builder($query);\n }", "title": "" }, { "docid": "25a3b9e84e0971bdc4cc0eb9ac968ab9", "score": "0.68647397", "text": "protected function newBaseQueryBuilder()\n {\n return container()->connection->query();\n }", "title": "" }, { "docid": "9617f4b2002520f36fe0bcb7048cb3a4", "score": "0.6853297", "text": "public static function createQuery()\n\t{\n\t\t$query = parent::createQuery();\n\t\t$query->isAdmin();\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "ad5047d7d1bd29024bb39a198b9af0e2", "score": "0.6834038", "text": "protected function createQuery()\n {\n return \\PropelQuery::from($this->modelClass);\n }", "title": "" }, { "docid": "e2c7779477c6255dc133320dd3be25da", "score": "0.6829126", "text": "public function getQueryBuilder();", "title": "" }, { "docid": "04698e167895862dae2b15ea89bbca11", "score": "0.6827825", "text": "public function query(): Builder\n {\n return $this->view_model::query();\n }", "title": "" }, { "docid": "bddb1ba35c703f2ed2c0a0d8b3ad25f8", "score": "0.68028516", "text": "protected function newQuery()\n {\n return $this->getInstance()->newQuery();\n }", "title": "" }, { "docid": "a2d4a55c8d30df214a749a3046fc6837", "score": "0.6764602", "text": "public function newEloquentBuilder($query)\n\t{\n\t\treturn new Builder($query);\n\t}", "title": "" }, { "docid": "f8f33e4349faf52d64868a0511014e09", "score": "0.6751201", "text": "public function query()\n {\n $query = app($this->model)->newQuery();\n\n $this->applyCriteria($query);\n\n return $query;\n }", "title": "" }, { "docid": "0ca7ffbae5c17eb342ca7531941bac38", "score": "0.674996", "text": "public function query(): EloquentBuilder|BaseBuilder;", "title": "" }, { "docid": "ef9ba76ba784389dbbf712785504e98b", "score": "0.6743419", "text": "public static function table(string $table): self\n {\n self::$table = $table;\n return new QueryBuilder;\n }", "title": "" }, { "docid": "429b2adbc176a2d44137e83971465d51", "score": "0.66943973", "text": "public function getQueryBuilder(): QueryBuilderInterface;", "title": "" }, { "docid": "61c7f445a85c09be3c578606ed35b1fc", "score": "0.66940063", "text": "public static function getModelQuery(): Builder\n {\n $class = Config::get('sqms-servers.models.ban', Ban::class);\n\n return call_user_func($class.'::query');\n }", "title": "" }, { "docid": "394b84db231c7835f5abb0e30d449642", "score": "0.6671266", "text": "protected function getQueryBuilder(): QueryBuilder\n {\n return clone $this->qb;\n }", "title": "" }, { "docid": "29f3d708a29dc36092a03940f3cf6223", "score": "0.6664399", "text": "public function getCriteriaBuilder();", "title": "" }, { "docid": "37234d3ca15ac0df4facbe92dbaa0e7a", "score": "0.6663138", "text": "public function newEloquentBuilder($query)\r\n {\r\n if (static::AUTO_CACHE_ENABLED) {\r\n return new AutoCacheBuilder($query);\r\n }\r\n return new IlluminateBuilder($query);\r\n }", "title": "" }, { "docid": "30280db34338ca91f4e57bd466938641", "score": "0.6661703", "text": "protected function getQueryBuilder()\n\t{\n\t\tif (!$this->builder) \n\t\t{\n\t\t\t// Initialise builder and other vars\n\t\t\t$this->joins = array();\n\t\t\t$this->links = array();\n\t\t\t$this->fields = array();\n\t\t\t$this->selects = array();\n\t\t\t$this->output = array();\n\t\t\t$this->builder = \\D::manager()->createQueryBuilder()->from($this->class, 'item', 'item.id');\n\n\t\t\t// Add each part of the query separately\n\t\t\t$this->buildQuerySelect();\n\t\t\t$this->buildQueryWhere();\n\t\t\t$this->buildQuerySort();\n\n\t\t\t// This must be the last one, so we can perform the limit sub query\n\t\t\t$this->buildQueryLimit();\n\t\t}\n\n\t\treturn $this->builder;\n\t}", "title": "" }, { "docid": "ab9bcdae3335ba00552bd6da722048b6", "score": "0.6661026", "text": "public function createDataProviderQueryBuilder()\n {\n return new DataProviderQueryBuilder($this);\n }", "title": "" }, { "docid": "66acd47f655af3b8b226d2c2627d85ed", "score": "0.6654234", "text": "public function setQuery(Builder $query)\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "00dd91008708cc1715dc26fbcc3a6a62", "score": "0.6648758", "text": "public function newEloquentBuilder($query): BaseEloquentBuilder\n {\n return new BaseEloquentBuilder($query);\n }", "title": "" }, { "docid": "2c935d870eb0bc1793a57a8910080060", "score": "0.6645313", "text": "public function query(): EmulatedBuilder\n {\n return (new EmulatedBuilder($this))->setBaseDn(\n $this->configuration->get('base_dn')\n );\n }", "title": "" }, { "docid": "e2f0248316d525fe922fa3090cdb2135", "score": "0.6641442", "text": "public function getEloquentQuery(): EloquentBuilder\n {\n return $this->query;\n }", "title": "" }, { "docid": "d2e2449af08376f05030b33873b2264a", "score": "0.6633606", "text": "public function createQuery(string $sql = ''): QueryBuilder\n {\n $this->checkStatus();\n $className = DbHelper::getQueryClassNameByConnection($this->connection);\n\n return new $className($this->group, $sql, null, $this->connection);\n }", "title": "" }, { "docid": "a945ab005ac3ba97a90b80b3d6690ede", "score": "0.66312224", "text": "public function createPendingPushQueryBuilder(): QueryBuilder;", "title": "" }, { "docid": "61677ba0ee062b5a9d8571b0b8d0172d", "score": "0.66039073", "text": "public function SqlBuilder()\n {\n if (!$this->builder)\n $this->builder = new Sql\\Builder($this->Connection());\n \n return $this->builder;\n }", "title": "" }, { "docid": "2b618b6d0fd01442f78cf15ca3dfd215", "score": "0.66024613", "text": "public function newEloquentBuilder($query)\n {\n // $company = Company::getCurrent();\n\n return new \\Webkul\\SAASCustomizer\\Database\\Eloquent\\Builder($query);\n\n // if ($company != null) {\n // return new \\Illuminate\\Database\\Eloquent\\Builder($query->where('category_translations' . '.company_id', $company->id));\n // } else {\n // return new \\Illuminate\\Database\\Eloquent\\Builder($query->where('category_translations' . '.company_id', null));\n // }\n }", "title": "" }, { "docid": "1220ce2a5581b1f4996a9abf97782a03", "score": "0.6596458", "text": "public function newQueryBuilder()\n {\n $this->head = new PointSystemZoneQuery($this->adapter,$this);\n $this->head->setDefaultAlias($this->getTableQueryAlias());\n \n return $this->head;\n }", "title": "" }, { "docid": "d0f521c73a53371a12e81e3c418c10da", "score": "0.65931696", "text": "protected function newBaseQueryBuilder()\n {\n\n }", "title": "" }, { "docid": "aed013f3337c9242b149f523508b8d08", "score": "0.65731514", "text": "public function makeQuery()\n {\n $query = $this->query()->select($this->makeSelect($this->columns()));\n\n return $query;\n }", "title": "" }, { "docid": "be43bb3e897735c617482154cd32aaf5", "score": "0.65679216", "text": "public function getQueryBuilder()\n {\n return $this->repository->createQueryBuilder(self::ALIAS);\n }", "title": "" }, { "docid": "f7cecdbf003b3aa403f4301d00c81191", "score": "0.65528953", "text": "public function setEloquentQuery(EloquentBuilder $query): static\n {\n $this->query = $query;\n\n return $this;\n }", "title": "" }, { "docid": "ada2853d0e1e2020d5e97c1847c81add", "score": "0.65495", "text": "public function queryBuilder($builder)\n {\n return new Engines\\QueryBuilderEngine($builder, $this->request);\n }", "title": "" }, { "docid": "054175d27334aa10d7d48565b76f870a", "score": "0.65255183", "text": "public function build()\n {\n return new DatabaseBuilder($this);\n }", "title": "" }, { "docid": "9122340a59a4479b84d23c2be4389aea", "score": "0.65233076", "text": "abstract protected function initQuery(Builder $query);", "title": "" }, { "docid": "72470175732978420a9cdec699cb3c13", "score": "0.65068907", "text": "public function newEloquentBuilder($query)\n {\n return new FMEloquentBuilder($query);\n }", "title": "" }, { "docid": "04c564e2263571114685234160598b59", "score": "0.6503808", "text": "public function query()\n {\n return $this->getModel()->newQuery();\n }", "title": "" }, { "docid": "caae2572c1c4282b72bf6e1d654c8548", "score": "0.6501418", "text": "protected static function getInstance()\n\t{\n\t\tif ( ! static::$fixtures) static::setFixtures();\n\t\tif ( ! static::$databaseProvider) static::setDatabaseProvider();\n\n\t\treturn new Builder(static::$databaseProvider, static::$fixtures);\n\t}", "title": "" }, { "docid": "a0ba88b69a0e0a24078c3b1d1da24984", "score": "0.65007216", "text": "public function newQuery()\n\t{\n\t\t$query = parent::newQuery();\n\n\t\t$query->where('modulo_id', '=', 52)->where('grupo', '=', 0);\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "b8aaecd79b17ec91498d374c33f960cf", "score": "0.64744323", "text": "public function query()\n {\n $this->resetCurrentQuery();\n $this->reloadQueryAdapter();\n return $this;\n }", "title": "" }, { "docid": "ba6d3a7602b545fd5c016cb37e0ff2db", "score": "0.64659417", "text": "public function newModelBuilder(): Builder\n {\n return new Builder();\n }", "title": "" }, { "docid": "89344977daf7f3c448770080d71ea88e", "score": "0.64609545", "text": "public function getQueryBuilder()\n\t{\n\t\tif ($this->_builder === null) {\n\t\t\t$this->_builder = $this->createQueryBuilder();\n\t\t}\n\n\t\treturn $this->_builder;\n\t}", "title": "" }, { "docid": "314d5a2c1ca700eed1c9b85a62db0f96", "score": "0.64535016", "text": "public function buildQuery()\n {\n $wrappedQuery = $this->wrapWithRowCounter($this->originalQuery);\n $query = $this->getFakeModelQuery($wrappedQuery);\n\n $query->where($this->idKey, '>', $this->cursorRequest->current)\n ->take($this->cursorRequest->pageSize);\n return $query;\n }", "title": "" }, { "docid": "6b43576359cc63816fd7d4e6a78e6a40", "score": "0.64408624", "text": "public function newStaticDataApiQuery() : StaticDataApiQuery{\n return new StaticDataApiQueryImpl($this->applicationKey, $this->region);\n }", "title": "" }, { "docid": "58c966dc4fa412626d5164436cadc14d", "score": "0.6440471", "text": "protected function _buildQuery()\r\n {\r\n if (!empty($this->_query))\r\n {\r\n return $this->_query;\r\n }\r\n\r\n $query = new ZLQuery();\r\n\r\n $this->_buildQueryFields($query);\r\n $this->_buildQueryFrom($query);\r\n $this->_buildQueryJoins($query);\r\n $this->_buildQueryWhere($query);\r\n $this->_buildQueryGroup($query);\r\n $this->_buildQueryHaving($query);\r\n $this->_buildQueryOrder($query);\r\n\t\t$this->_buildQueryLimit($query);\r\n\r\n return $query;\r\n }", "title": "" }, { "docid": "42c47fbb6f05a2474e33783d91d00f1e", "score": "0.64382905", "text": "public function buildQuery(QueryBuilder $queryBuilder, array $options);", "title": "" }, { "docid": "3113efab1338a5904c9b8cfb26901a46", "score": "0.64322275", "text": "public function getQuery(): OrmQuery\n {\n $from = $this->from;\n if (null === $from) {\n throw new QueryException('Missing FROM clause (model name).');\n }\n\n switch ($this->type) {\n case self::SELECT:\n $method = OrmQuery::SEARCH_READ;\n break;\n case self::SEARCH:\n $method = OrmQuery::SEARCH;\n break;\n case self::INSERT:\n $method = OrmQuery::CREATE;\n break;\n case self::UPDATE:\n $method = OrmQuery::WRITE;\n break;\n case self::DELETE:\n $method = OrmQuery::UNLINK;\n break;\n default:\n throw new InvalidArgumentException(sprintf('The query type \"%s\" is not valid.', $this->type));\n }\n\n $query = new OrmQuery($this->recordManager, $from, $method);\n\n switch ($this->type) {\n case self::SEARCH:\n case self::SELECT:\n $parameters = $this->expr()->normalizeDomains($this->where);\n break;\n case self::DELETE:\n if (!$this->ids) {\n throw new QueryException('You must set indexes for queries of type \"DELETE\".');\n }\n\n $parameters = [$this->ids];\n break;\n default:\n if (!$this->values) {\n throw new QueryException('You must set values for queries of type \"INSERT\" or \"UPDATE\".');\n }\n\n $parameters = $this->expr()->normalizeData($this->values);\n\n if (self::UPDATE === $this->type) {\n if (!$this->ids) {\n throw new QueryException('You must set indexes for queries of type \"UPDATE\".');\n }\n\n $parameters = [$this->ids, $parameters];\n }\n break;\n }\n\n $query->setParameters($parameters);\n\n if (in_array($this->type, [self::SELECT, self::SEARCH])) {\n $options = [];\n\n if (self::SELECT === $this->type && $this->select) {\n $options['fields'] = $this->select;\n }\n\n $orders = $this->orders;\n\n if ($orders) {\n foreach ($orders as $fieldName => $isAsc) {\n $orders[$fieldName] = sprintf('%s %s', $fieldName, $isAsc ? 'asc' : 'desc');\n }\n\n $options['order'] = implode(', ', $orders);\n }\n\n if ($this->firstResult) {\n $options['offset'] = $this->firstResult;\n }\n\n if ($this->maxResults) {\n $options['limit'] = $this->maxResults;\n }\n\n $query->setOptions($options);\n }\n\n return $query;\n }", "title": "" }, { "docid": "c4e2a2977be59917b448e042077277e7", "score": "0.6429488", "text": "protected function getAccessQuery(): Builder\n {\n return AccessModel::query();\n }", "title": "" }, { "docid": "cd1b2c329f90e7974142cb4d1a3ab79d", "score": "0.6425794", "text": "public static function qb()\n {\n/*\n // old code does not allow to use more than one query in parallel\n if(!is_object(self::$qb))\n self::$qb = self::$conn->createQueryBuilder();\n // reset\n self::$qb->resetQueryParts();\n return self::$qb;\n*/\n return self::$conn->createQueryBuilder();\n }", "title": "" }, { "docid": "1bc7f45ea566f8934fc9b890f207e7ce", "score": "0.64172053", "text": "protected static function _queryBuilder($builder = null)\n\t{\n\t\tif($builder == null) {\n\t\t\tif(static::$_queryBuilder == null)\n\t\t\t\tstatic::$_queryBuilder = new QueryBuilder(static::$_table);\n\n\t\t\treturn static::$_queryBuilder;\n\t\t} else {\n\t\t\tstatic::$_queryBuilder = $builder;\n\t\t}\n\t}", "title": "" }, { "docid": "0b7cf7b1b30671dee903672308026cd2", "score": "0.6397846", "text": "public function createQueryBuilder($documentName)\n {\n return new QueryBuilder($this, $documentName);\n }", "title": "" }, { "docid": "1d570b19dcaea00b1218804adf5f8786", "score": "0.6388719", "text": "public function getQueryBuilder()\n {\n return $this->getSchema()->getQueryBuilder();\n }", "title": "" } ]
20bb45bd2343c168496afdd064cc5524
Tests registering a bad start task
[ { "docid": "b0c73f38177d62a995a22190b6629b30", "score": "0.75278455", "text": "public function testBadStartTask()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->assertNull($this->application->start(function () {\n // Throw anything other than a runtime exception\n throw new InvalidArgumentException('foobar');\n }));\n $this->assertFalse($this->application->isRunning());\n }", "title": "" } ]
[ { "docid": "1a091787ce3ce6b6f1c4b0fec41fdb21", "score": "0.75330687", "text": "public function testRegisteringPreStartTask()\n {\n $this->dispatcher->expects($this->exactly(2))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n );\n $this->application->start();\n }", "title": "" }, { "docid": "4b914df68102c66dad93ee291ba7f6df", "score": "0.70898914", "text": "public function testRegisteringStartTask()\n {\n $this->dispatcher->expects($this->exactly(2))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n );\n $startValue = '';\n $this->assertNull($this->application->start(function () use (&$startValue) {\n $startValue = 'baz';\n }));\n $this->assertEquals('baz', $startValue);\n }", "title": "" }, { "docid": "609becc7a1ad6eaaff892a31ce96a7cc", "score": "0.70277804", "text": "public function testRegisteringPreAndPostStartTasks()\n {\n $this->dispatcher->expects($this->exactly(2))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n );\n $this->application->start();\n }", "title": "" }, { "docid": "564df1897fbb31ae710721baaf578987", "score": "0.7007021", "text": "public function testBadPostStartTask()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->dispatcher->expects($this->any())\n ->method('dispatch')\n ->willReturnCallback(function($arg){\n if ($arg === TaskTypes::POST_START) {\n throw new InvalidArgumentException('foo');\n }\n });\n $this->assertNull($this->application->start());\n $this->assertFalse($this->application->isRunning());\n }", "title": "" }, { "docid": "a64fa56669f46a07cc9e2916cbdbe67e", "score": "0.6975212", "text": "public function testRegisteringPreShutdownTask()\n {\n $this->dispatcher->expects($this->exactly(4))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n [TaskTypes::PRE_SHUTDOWN],\n [TaskTypes::POST_SHUTDOWN],\n );\n $this->application->start();\n $this->application->shutDown();\n }", "title": "" }, { "docid": "ef19297259fda0a9022e92c87f545a0c", "score": "0.6892037", "text": "public function testRegisteringPostStartTask()\n {\n $this->dispatcher->expects($this->exactly(2))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n );\n $this->application->start();\n }", "title": "" }, { "docid": "ffae3f4c2e378df0b50552c112f06cf9", "score": "0.6714507", "text": "public function testTasksDefineNew()\n {\n }", "title": "" }, { "docid": "fe5d6701f56663d8bf9aea5c51d312d0", "score": "0.6580181", "text": "public function testStartTaskThatReturnsSomething()\n {\n $this->assertEquals('foo', $this->application->start(function () {\n return 'foo';\n }));\n }", "title": "" }, { "docid": "ce1a30305df0ae292fd66f4545c663a6", "score": "0.6417622", "text": "public function testBadPreShutdownTask()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->dispatcher->expects($this->any())\n ->method('dispatch')\n ->willReturnCallback(function($arg) {\n if ($arg === TaskTypes::PRE_SHUTDOWN) {\n throw new InvalidArgumentException('foo');\n }\n });\n $this->assertNull($this->application->start());\n $this->assertNull($this->application->shutDown());\n $this->assertFalse($this->application->isRunning());\n }", "title": "" }, { "docid": "942056a789ea6de492d4e9009ca7a207", "score": "0.63856435", "text": "public function testApplicationIsNotStartedTwice()\n {\n $this->dispatcher\n ->expects($this->exactly(2))\n ->method('dispatch')\n ->withConsecutive([TaskTypes::PRE_START], [TaskTypes::POST_START]);\n $this->application->start();\n $this->application->start();\n }", "title": "" }, { "docid": "8a16ed37d670a9f2208e351436978ed1", "score": "0.6344634", "text": "public function testFailingSetUpAsync()\n {\n }", "title": "" }, { "docid": "cf8189efab7531365189ad3aa4d29588", "score": "0.63354933", "text": "public function testRegisteringPreAndPostShutdownTasks()\n {\n $this->dispatcher->expects($this->exactly(4))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n [TaskTypes::PRE_SHUTDOWN],\n [TaskTypes::POST_SHUTDOWN],\n );\n $this->application->start();\n $this->application->shutDown();\n }", "title": "" }, { "docid": "f6ec85b74c504975d727fab69117f781", "score": "0.6133255", "text": "public function testShowErrorOnInvalidAction()\n {\n $result = $this->runTask(array('action' => 'coffeetime'));\n $this->assertContains('Error! Specified action is not valid.', $result);\n }", "title": "" }, { "docid": "2a7f14875018cbdad59784cb5f2bfd7b", "score": "0.607009", "text": "public function testStartSendsHeloToInitiate()\n {\n }", "title": "" }, { "docid": "426b3393c750abb9e9e534abfe573f3c", "score": "0.5894594", "text": "public static function runningUnitTests() {\n \n }", "title": "" }, { "docid": "725737d9dca0cf5e11dccfc06cb9709b", "score": "0.5884715", "text": "function startTest($method)\n {\n // extra setup stuff here\n }", "title": "" }, { "docid": "eb4eb5fe541f60b62548c0a55f3100e4", "score": "0.58821404", "text": "public function testBadShutdownTask()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->assertNull($this->application->start());\n $this->assertNull($this->application->shutDown(function () {\n // Throw anything other than a runtime exception\n throw new InvalidArgumentException('foobar');\n }));\n $this->assertFalse($this->application->isRunning());\n }", "title": "" }, { "docid": "6049647860e1836e056b06a02b925104", "score": "0.5873478", "text": "public function testTasksArchive()\n {\n }", "title": "" }, { "docid": "f40fa209fd59aa48f0c1dab47574057f", "score": "0.58532625", "text": "public function ensureStarted();", "title": "" }, { "docid": "766439fd5e527567c0775fdefdca9246", "score": "0.58509636", "text": "public function testTasksRead()\n {\n }", "title": "" }, { "docid": "17bc2dde7d0efaaf90f53912b976fc53", "score": "0.5814185", "text": "public function test_start_first_work_time()\n {\n Artisan::call('seed:settings');\n app('settings')->refreshData();\n Artisan::call('seed:users');\n Artisan::call('seed:projects');\n $project = Project::first();\n //fake login\n $this->loginUser(1);\n\n $test = now()->hour(12);\n Carbon::setTestNow($test);\n\n //make the test request to to start_work\n $response = $this->json('POST', 'start_work', ['task' => ['content' => 'work'] , 'project_id' => $project->id]);\n $content = json_decode($response->content(), true);\n\n //test that response succeeded\n $this->assertEquals(200,$response->status());\n $this->assertCount(3,$content);\n //test the work time sign field\n $workTimeSign = $content['workTimeSign'];\n $task = $workTimeSign['task'];\n $this->assertCount(3,$workTimeSign);\n $this->assertEquals($test->toTimeString(),$workTimeSign['started_at']);\n $this->assertEquals(null,$workTimeSign['stopped_at']);\n $this->assertEquals('work',$task['content']);\n\n //test the today time field\n $todayTime = $content['today_time'];\n $this->assertCount(2,$todayTime);\n $this->assertEquals(0,$todayTime['seconds']);\n }", "title": "" }, { "docid": "4e08a8f557b7f1ca09f0ab053735e6c3", "score": "0.5805716", "text": "public function __construct()\n {\n parent::__construct();\n// $this->test_add_tasks();\n//var_dump(\"#test-complete\");\n }", "title": "" }, { "docid": "52c26c874152adeae628b9d93f8ae610", "score": "0.57943934", "text": "public function testCheckStartedBuildNotStarted()\n {\n $this->setContainerObjects();\n MockCodeCommitClient::clearGlobals();\n $cronController = new MockCronController();\n $buildsAction = new ManageBuildsAction($cronController);\n $build = Build::findOne(['id' => 22]);\n $method = $this->getPrivateMethod('console\\components\\ManageBuildsAction', 'tryStartBuild');\n $method->invokeArgs($buildsAction, array($build));\n $build = Build::findOne(['id' => 22]);\n $this->assertEquals('7049fc2a-db58-4c33-8d4e-c0c568b25c7b', $build->build_guid, \" *** Guid was not changed correctly\");\n $this->assertEquals(Build::STATUS_ACTIVE, $build->status, \" *** Status incorrect\");\n $this->assertEquals(1, count(MockCodeCommitClient::$getRepo), \" *** Wrong count for number of GetRepository\");\n }", "title": "" }, { "docid": "951ee4f372193b855e9e09b0cd66381a", "score": "0.575091", "text": "public function testSetName () {\n $this -> task -> task = \"#1\";\n $this->assertNotEquals(\"#1\", $this -> task -> task);\n }", "title": "" }, { "docid": "7a81b8883655c8fcf31b4c343723dc23", "score": "0.5722872", "text": "public function testRegisteringPostShutdownTask()\n {\n $this->dispatcher->expects($this->exactly(4))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n [TaskTypes::PRE_SHUTDOWN],\n [TaskTypes::POST_SHUTDOWN],\n );\n $this->application->start();\n $this->application->shutDown();\n }", "title": "" }, { "docid": "8d2bfa9c04a6e8411d62c7dc3891ba85", "score": "0.5706288", "text": "public function testRunCommandHittingTask() {\n\t\t$Shell = $this->getMock('Shell', array('hasTask', 'startup'), array(), '', false);\n\t\t$task = $this->getMock('Shell', array('execute', 'runCommand'), array(), '', false);\n\t\t$task->expects($this->any())\n\t\t\t->method('runCommand')\n\t\t\t->with('execute', array('one', 'value'));\n\n\t\t$Shell->expects($this->once())->method('startup');\n\t\t$Shell->expects($this->any())\n\t\t\t->method('hasTask')\n\t\t\t->will($this->returnValue(true));\n\n\t\t$Shell->RunCommand = $task;\n\n\t\t$Shell->runCommand('run_command', array('run_command', 'one', 'value'));\n\t}", "title": "" }, { "docid": "b745248d6bf6a2639ee6eb60dabda99a", "score": "0.5695532", "text": "public function runStarted() {\n }", "title": "" }, { "docid": "72f7c6c448e33da8f6057f03f95a49ad", "score": "0.56895787", "text": "public function testStart()\n {\n $this->assertNull($this->receiver->start());\n }", "title": "" }, { "docid": "dea7ad7c71892d38f15690f0f1b3e345", "score": "0.5688362", "text": "public function before($name, $task, $nameOfTaskToAdd = self::UNNAMEDTASK);", "title": "" }, { "docid": "9493d4ae889216eb2152e047f317884c", "score": "0.56519514", "text": "abstract public function whenNoTaskToDo();", "title": "" }, { "docid": "bf2651297aa35d7999d550aa77dacd09", "score": "0.56402296", "text": "public function testTasksUpdateStatus()\n {\n }", "title": "" }, { "docid": "6b75007bdad11589db3374bbeb5c619a", "score": "0.5631758", "text": "public function testRegisteringShutdownTask()\n {\n $this->dispatcher->expects($this->exactly(4))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n [TaskTypes::PRE_SHUTDOWN],\n [TaskTypes::POST_SHUTDOWN],\n );\n $this->application->start();\n $shutdownValue = null;\n $this->assertNull($this->application->shutDown(function () use (&$shutdownValue) {\n $shutdownValue = 'baz';\n }));\n $this->assertEquals('baz', $shutdownValue);\n }", "title": "" }, { "docid": "35f8c5681d4cef7de8781e2e224f84fc", "score": "0.5629594", "text": "function test_base_step_wrong() {\n\n // Try to pass one wrong task\n try {\n $bt = new mock_base_step('teststep', new stdclass());\n $this->assertTrue(false, 'base_step_exception expected');\n } catch (exception $e) {\n $this->assertTrue($e instanceof base_step_exception);\n $this->assertEquals($e->errorcode, 'wrong_base_task_specified');\n }\n }", "title": "" }, { "docid": "774b9a87467d5360c1157d5617fc05a9", "score": "0.5600672", "text": "public function setUp() {\n $this->CI = &get_instance();\n\n // make a dummy task\n // new task\n $this -> task = new Task;\n $this -> task -> task = \"abc\";\n }", "title": "" }, { "docid": "ef2fefe6de3386bcda04c9d3dde48070", "score": "0.5600095", "text": "protected function beginTask()\n\t{\n\t\tthrow new \\LogicException(\n\t\t\tstatic::class . ' must re-implements ' . __METHOD__);\n\t}", "title": "" }, { "docid": "de9273daf498499116d9acbff9a99454", "score": "0.55978197", "text": "public function testStartBackup()\n {\n }", "title": "" }, { "docid": "29af7780b4bcc3d7c0a9e32b2876afa9", "score": "0.55966544", "text": "public function testFailCreateTaskWhenMissingName()\n {\n $user = User::factory()->create();\n $createData = [\n \"description\" => \"desc test\",\n \"status\" => \"created\",\n \"user_id\" => $user->id,\n ];\n $response = $this->post(self::BASE_ROUTE, $createData);\n\n $this->assertTaskUpdate(\n $response,\n 400,\n \"invalid_data\",\n [],\n $createData\n );\n }", "title": "" }, { "docid": "b67ab749264fdd7fe8e0c0f708d8da58", "score": "0.55947", "text": "public function testScheduleWithNoTasksReturnsException()\n {\n $server = $this->createServerModel();\n $schedule = factory(Schedule::class)->create(['server_id' => $server->id]);\n\n $this->expectException(DisplayException::class);\n $this->expectExceptionMessage('Cannot process schedule for task execution: no tasks are registered.');\n\n $this->getService()->handle($schedule);\n }", "title": "" }, { "docid": "67b06fa1f5e53bce43fac86ca67d780e", "score": "0.5575014", "text": "public function testCheckingIfAStartedApplicationIsRunning()\n {\n $this->application->start();\n $this->assertTrue($this->application->isRunning());\n }", "title": "" }, { "docid": "9b1e9c7307fd256b5e9f42f4e179090f", "score": "0.5570521", "text": "public function testTasksSearch()\n {\n }", "title": "" }, { "docid": "483bb2d0aecf3586c05e01500c36d8d6", "score": "0.5567401", "text": "public function testStartPasswordReset()\n {\n }", "title": "" }, { "docid": "690b0ff6f0798e3fda753fdf5cb862c1", "score": "0.5551449", "text": "public function test_cannot_uncomplete_a_unexisting_task()\n {\n $user = factory(User::class)->create();\n $this->actingAs($user);\n //2\n $response = $this->delete('completed_task/1');\n //3 Assert\n\n $response->assertStatus(404);\n }", "title": "" }, { "docid": "5020a2bcccdb758913abd62ea08b2546", "score": "0.55264044", "text": "public function testCheckingIfUnstartedApplicationIsRunning()\n {\n $this->assertFalse($this->application->isRunning());\n }", "title": "" }, { "docid": "f28a41f2d864fef4d85df3482f3cd27e", "score": "0.5525617", "text": "public function setUp() {\n\t\t// to this job as a whole (including any subprocesses such as spawned by Symfony).\n\t\tposix_setsid();\n\n\t\tif(function_exists('pcntl_alarm') && function_exists('pcntl_signal')) {\n\t\t\tif (!empty($this->args['sigFile'])) {\n\t\t\t\techo sprintf('[-] Signal file requested, polling \"%s\".' . PHP_EOL, $this->args['sigFile']);\n\t\t\t\tdeclare(ticks = 1);\n\t\t\t\tpcntl_signal(SIGALRM, [$this, 'alarmHandler']);\n\t\t\t\tpcntl_alarm(1);\n\t\t\t}\n\t\t}\n\n\t\t$this->updateStatus(DNDeployment::TR_DEPLOY);\n\t\tchdir(BASE_PATH);\n\t}", "title": "" }, { "docid": "ebb84eccde41d8031d48906a9137e03b", "score": "0.5489532", "text": "public function beforeStartModule()\n {\n }", "title": "" }, { "docid": "fae2b5115873166fd0faa6bd6db4798e", "score": "0.5475393", "text": "public function testTasksUnarchive()\n {\n }", "title": "" }, { "docid": "25303b3ce8e78108e5bb24a3aa453ac9", "score": "0.5452037", "text": "public function testHelo()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "ec67a6ad29ddccd3d1381d819081ef2a", "score": "0.5450097", "text": "function fake_cron_register_task($params) \n{\n if( ! isset($params['name']) ) {\n \tthrow new Exception('Task Name must be provided for fake cron tasks');\n }\n \n if( ! isset($params['plugin_class']) ) {\n throw new Exception('plugin_class must be provided for fake cron tasks');\n }\n \n if( ! class_exists($params['plugin_class']) ) {\n $class = $params['plugin_class'];\n \tthrow new Exception(\"Class $class for FakeCron does not exist.\");\n }\n\n if( ! isset($params['interval']) ) {\n throw new Exception('Interval for FakeCron Task must be set.');\n }\n \n if( ! isset($params['plugin_name']) ) {\n throw new Exception('Plugin Name for FakeCron Task must be set.');\n }\n \n\t$newTask = new FakeCron_Task();\n $newTask->name = $params['name'];\n if(isset($params['description'])) {\n $newTask->description = $params['description'];\t\n }\n \n if(isset($params['plugin_name'])) {\n \t$newTask->plugin_name = $params['plugin_name'];\n }\n $newTask->plugin_name = $params['plugin_name'];\n $newTask->plugin_class = $params['plugin_class'];\n $newTask->interval = $params['interval']; \n $newTask->save();\n \n}", "title": "" }, { "docid": "79287c0384a2cf7395aafc14bbbb0877", "score": "0.5446298", "text": "function startTest() {\n $this->ZFondoWork =& ClassRegistry::init('ZFondoWork');\n\n }", "title": "" }, { "docid": "ab37a59ffb2572826a01df6ad856b159", "score": "0.5444019", "text": "function testInitialize() {\n\t\t$this->assertTrue ( empty ( $this->Task->path ) );\n\t\t$this->Task->initialize ();\n\t\t$this->assertFalse ( empty ( $this->Task->path ) );\n\t\t$this->assertEqual ( $this->Task->path, APP . 'config' . DS );\n\t}", "title": "" }, { "docid": "a4fc9f8d5c1a3d0b63e9666e860067b3", "score": "0.5440332", "text": "public function testBadPostShutdownTask()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->dispatcher->expects($this->any())\n ->method('dispatch')\n ->willReturnCallback(function($arg){\n if ($arg === TaskTypes::POST_SHUTDOWN) {\n throw new InvalidArgumentException('foo');\n }\n });\n $this->assertNull($this->application->start());\n $this->assertNull($this->application->shutDown());\n $this->assertFalse($this->application->isRunning());\n }", "title": "" }, { "docid": "4b709173485a03ce91dfe65021713e97", "score": "0.54143786", "text": "public function testGetSeederTasks()\n {\n // 全件取得\n $tasks = Task::all();\n // 2件取得できるはず\n $this->assertEquals(2, count($tasks));\n\n // 実行完了していないものを取得\n $taskNotFinished = Task::where('executed', false)->get();\n // 1件取得できるはず\n $this->assertEquals(1, count($taskNotFinished));\n\n // 実行完了しているものを取得\n $taskFinished = Task::where('executed', true)->get();\n // 1件取得できるはず\n $this->assertEquals(1, count($taskFinished));\n\n // 「テストタスク」というタイトルのレコードを取得\n $task1 = Task::where('title', \"テストタスク\")->first();\n // 実行完了していないはず\n $this->assertFalse(boolval($task1->executed));\n\n // 「終了タスク」というタイトルのレコードを取得\n $task1 = Task::where('title', \"終了タスク\")->first();\n // 実行完了しているはず\n $this->assertTrue(boolval($task1->executed));\n }", "title": "" }, { "docid": "d427aacf854d35183bf6816e98bb62e2", "score": "0.541264", "text": "public function testIsCompleteNotStarted() {\n $profiler = new \\Maleficarum\\Profiler\\Time\\Generic();\n\n $this->assertFalse($profiler->isComplete());\n }", "title": "" }, { "docid": "90059eecfd7a319b6313516d5444e00d", "score": "0.5411445", "text": "public function testExec()\n {\n self::assertTrue(true);\n }", "title": "" }, { "docid": "9a32a7de32ece215755007017e9dbfec", "score": "0.5404789", "text": "public function testCreateTask()\n {\n $task = Task::factory()->make();\n $this->browse(function ($first) use ($task) {\n $first->loginAs($task->user_id)\n ->visit('/task/create')\n ->assertTitle('Laravel')\n ->type('#name', $task->name)\n ->select('#category_id', $task->category_id)\n ->press('Add')\n ->assertDontSee('The name field is required')\n ->assertDontSee('The category id field is required')\n ->assertDontSee('Whoops! Something went wrong!')\n ->assertPathIs('/task')\n ->waitForText('Task added successfully')\n ->assertSee('Task added successfully')\n ->assertSee($task->name);\n });\n }", "title": "" }, { "docid": "d8ea2f7ffa24326332cbc38da2ed2f44", "score": "0.540427", "text": "public function testTasksSave()\n {\n }", "title": "" }, { "docid": "5f81275ceb02915e88a768ecafc7eed3", "score": "0.5390537", "text": "public function testTasksDelete()\n {\n }", "title": "" }, { "docid": "2e792a9aa42e1f896799bd096931b6c9", "score": "0.53886116", "text": "public function createTask()\n {\n }", "title": "" }, { "docid": "237d7e96fce10581791a8f9767271c68", "score": "0.53814477", "text": "public function before_run(){}", "title": "" }, { "docid": "af9954b9ea300f39bcbd98b8b2582387", "score": "0.5377841", "text": "public function startUp(): void\n {\n }", "title": "" }, { "docid": "04381b60cdf1f316ba125a558d962f20", "score": "0.53654444", "text": "public function testApplicationIsNotShutdownTwice()\n {\n $this->dispatcher\n ->expects($this->exactly(4))\n ->method('dispatch')\n ->withConsecutive(\n [TaskTypes::PRE_START],\n [TaskTypes::POST_START],\n [TaskTypes::PRE_SHUTDOWN],\n [TaskTypes::POST_SHUTDOWN],\n );\n $this->application->start();\n $this->application->shutDown();\n $this->application->shutDown();\n }", "title": "" }, { "docid": "d31d92855cd7d1cd929c7058f12ad3d6", "score": "0.5365152", "text": "public function testRegisterUploadTaskException()\n {\n $this->expectException(FilestackException::class);\n $this->expectExceptionCode(400);\n\n $mock_response = new MockHttpResponse(\n 400,\n 'bad data format'\n );\n\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $stub_http_client->method('request')\n ->willReturn($mock_response);\n\n $upload_processor = new MockUploadProcessor(\n $this->test_api_key,\n $this->test_security,\n $stub_http_client\n );\n\n $upload_processor->registerUploadTask($this->test_api_key,\n $this->file_metadata);\n }", "title": "" }, { "docid": "c36a962bb27b7612d968b86d479d1e72", "score": "0.5353149", "text": "public function setUp()\n {\n usleep(300000);\n }", "title": "" }, { "docid": "d25861485ee81c685abc7e5d6e47b92a", "score": "0.5343637", "text": "public function testFailCreateTaskWhenMissingStatus()\n {\n $user = User::factory()->create();\n $createData = [\n \"name\" => \"name test\",\n \"description\" => \"desc test\",\n \"user_id\" => $user->id,\n ];\n $response = $this->post(self::BASE_ROUTE, $createData);\n\n $this->assertTaskUpdate(\n $response,\n 400,\n \"invalid_data\",\n [],\n $createData\n );\n }", "title": "" }, { "docid": "63ef4379913ac4a4e28642900b9d8a52", "score": "0.53374153", "text": "public function testNoAutoload()\n {\n list($exitCode, $results) = $this->execCommand('.', 'run');\n $this->assertEquals(1, $exitCode);\n $this->assertContains('does not exist', $results);\n }", "title": "" }, { "docid": "8c4125b0b028951076c88d4413ba125a", "score": "0.53339297", "text": "protected function setUp()\n {\n parent::setUp();\n $this->tasks = factory(Task::class, 10)->create();\n }", "title": "" }, { "docid": "a58c772ed1694a74982189771f1374ac", "score": "0.53310525", "text": "public function testStaticFunctionPoint()\n {\n Config::set(Config::ENABLE_TOOL, false);\n\n $this->taskA();\n $this->taskB();\n\n // Finish all tasks and show test results\n Performance::results();\n }", "title": "" }, { "docid": "f0aa2e015faafb81e7b478fb70abf523", "score": "0.5328636", "text": "public function test_on_launch_with_invalid_secret_and_no_proxy() {\n $tp = $this->build_dummy_tp('badsecret');\n\n // Suppress session header errors.\n @$tp->onLaunch();\n $this->assertFalse($tp->ok);\n $this->assertEquals(get_string('invalidrequest', 'enrol_lti'), $tp->message);\n }", "title": "" }, { "docid": "9f6f28b41fee2bbbe61a4f028a874be9", "score": "0.53212094", "text": "public function testHandle(): void\n {\n Bus::fake(\n [\n ImportStarmap::class,\n ]\n );\n\n $this->artisan('starmap:import')\n ->expectsOutput('Importing starmap')\n ->assertExitCode(0);\n\n Bus::assertDispatched(ImportStarmap::class);\n }", "title": "" }, { "docid": "2c916dcb5f29b90a255b73af2f7b1c3f", "score": "0.5316382", "text": "public function testSystemQueue() {\n $this->markTestSkipped();\n }", "title": "" }, { "docid": "c83695723c005b7453ad22a595d1926e", "score": "0.53157425", "text": "public function testQuit()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "b0213bbf6a35aa2991ca1c83e554b2e9", "score": "0.53145534", "text": "public function testContactsTasksImportPost()\n {\n }", "title": "" }, { "docid": "55ef78fb39119b167a35caa485936ed4", "score": "0.53133935", "text": "public function testAddMilestoneNotRunning() {\n $profiler = new \\Maleficarum\\Profiler\\Time\\Generic();\n $profiler->addMilestone(uniqid());\n }", "title": "" }, { "docid": "bb612055d4ba2b1c9fbf6f33baeaab5d", "score": "0.5312786", "text": "public function ensureTaskExists () {\n if (!$this->doesTaskExist()) {\n throw new \\InvalidArgumentException(\"Task doesn't exist: $this->task\");\n }\n }", "title": "" }, { "docid": "ab5d8c1270350f023d497e7abeb659cd", "score": "0.53096986", "text": "public function testFailCreateTaskWhenMissingUserId()\n {\n $createData = [\n \"name\" => \"name test\",\n \"description\" => \"desc test\",\n \"status\" => \"created\",\n ];\n $response = $this->post(self::BASE_ROUTE, $createData);\n\n $this->assertTaskUpdate(\n $response,\n 400,\n \"invalid_data\",\n [],\n $createData\n );\n }", "title": "" }, { "docid": "394753b3e7c1173af86a9aed544065de", "score": "0.5308173", "text": "public function testSetupPost()\n {\n }", "title": "" }, { "docid": "ecd9cddc63714bece95e9aa0ddfe4390", "score": "0.53078985", "text": "function testAlwaysFail() {\r\n }", "title": "" }, { "docid": "5a21704ec0844d1cfb39867e82340b2b", "score": "0.5306881", "text": "public function testTasksUndelete()\n {\n }", "title": "" }, { "docid": "527e306199a429aee31947dfb9c3c861", "score": "0.5305901", "text": "public function testMainLoop() {\n \\Maleficarum\\Ioc\\Container::get('Maleficarum\\Worker\\Process\\Master')->execute();\n }", "title": "" }, { "docid": "a10d63c3074bb4dfe7599ab3a231d115", "score": "0.5300962", "text": "public function runFake() {\n\n }", "title": "" }, { "docid": "eba8a71ade887991bffc9b3f3563b4a4", "score": "0.529179", "text": "abstract function start();", "title": "" }, { "docid": "8aa62035665ae340965549bb75e74cdf", "score": "0.5287951", "text": "public function test_on_launch_no_consumer() {\n global $DB;\n\n $tool = $this->tool;\n\n $tp = new dummy_tool_provider($tool->id);\n $tp->onLaunch();\n $this->assertFalse($tp->ok);\n $this->assertEquals(get_string('invalidtoolconsumer', 'enrol_lti'), $tp->message);\n\n // Check published tool and tool consumer has not yet been mapped due to failure.\n $mappingparams = [\n 'toolid' => $tool->id\n ];\n $this->assertFalse($DB->record_exists('enrol_lti_tool_consumer_map', $mappingparams));\n }", "title": "" }, { "docid": "f73c585820cdcbd1c400c73f69332d73", "score": "0.52817696", "text": "private function markStarted()\n {\n }", "title": "" }, { "docid": "b7030be3b9e8816e619ceacbec609634", "score": "0.52793986", "text": "public function testShutdownTaskThatReturnsSomething()\n {\n $this->application->start();\n $this->assertEquals('foo', $this->application->shutDown(function () {\n return 'foo';\n }));\n }", "title": "" }, { "docid": "3c01e94c14302ccf23bbd0037dcc4d88", "score": "0.5275251", "text": "public function testQueryTask()\n {\n }", "title": "" }, { "docid": "3d973f121b69a156493bbc640f1b500e", "score": "0.5271593", "text": "public function test_stop_work_while_using_time_flag_and_passing_the_time_limit()\n {\n //create initial settings and dummy testing users data\n Artisan::call('seed:settings');\n app('settings')->refreshData();\n Artisan::call('seed:users');\n Artisan::call('seed:projects');\n $project = Project::first();\n\n //fake login\n $this->loginUser(1);\n\n //set start time\n $startWork = (new Carbon())->hour(12);\n Carbon::setTestNow($startWork);\n\n //make the test request to to start_work\n $response = $this->json('POST', 'start_work', ['task' => ['content' => 'work'] , 'project_id' => $project->id]);\n $content = json_decode($response->content(), true);\n\n //test that response succeeded\n $this->assertEquals(200,$response->status());\n $this->assertCount(3,$content);\n\n //test the work time sign field\n $workTimeSign = $content['workTimeSign'];\n $task = $workTimeSign['task'];\n $this->assertCount(3,$workTimeSign);\n $this->assertEquals($startWork->toTimeString(),$workTimeSign['started_at']);\n $this->assertEquals(null,$workTimeSign['stopped_at']);\n $this->assertEquals('work',$task['content']);\n\n //test the today time field\n $todayTime = $content['today_time'];\n $this->assertCount(2,$todayTime);\n $this->assertEquals(0,$todayTime['seconds']);\n\n //set start lost time flag\n $startFlag = $startWork->copy()->addHours(2);\n Carbon::setTestNow($startFlag);\n\n //make the test request to start flag\n $response = $this->json('POST','/flag/start',['type' => 'lost_time']);\n $content = json_decode($response->content(),true);\n\n //test that response succeeded\n $this->assertEquals(200,$response->status());\n $this->assertCount(2,$content);\n\n //test the returned message\n $this->assertEquals('user started using lost_time flag',$content['message']);\n\n //test the started flag\n $this->assertEquals('on',User::find(1)->flag);\n $this->assertCount(1,Flag::all());\n $this->assertEquals($startFlag,Flag::first()->started_at);\n $this->assertEquals(null,Flag::first()->stopped_at);\n $this->assertEquals(0,Flag::first()->seconds);\n $this->assertEquals(1,Flag::first()->user_id);\n $this->assertEquals(1,Flag::first()->work_time_id);\n $this->assertEquals($startFlag->toDateString(),Flag::first()->day);\n\n //set stop work time\n $stopWork = $startWork->copy()->addHours(4);\n Carbon::setTestNow($stopWork);\n\n //make the stop_work request\n $response = $this->json('POST','stop_work');\n $content = json_decode($response->content(),true);\n\n //test the response was succeeded\n $this->assertEquals(200,$response->status());\n $this->assertCount(2,$content);\n\n //test the work time sign field\n $workTimeSign = $content['workTimeSign'];\n $this->assertCount(3,$workTimeSign);\n $this->assertEquals($startWork->toTimeString(),$workTimeSign['started_at']);\n $this->assertEquals($stopWork->toTimeString(),$workTimeSign['stopped_at']);\n $this->assertEquals('work',$workTimeSign['task']['content']);\n\n //test the today time field\n $todayTime = $content['today_time'];\n $this->assertCount(2,$todayTime);\n $this->assertEquals(2.5 * 60 * 60,$todayTime['seconds']);\n\n\n //make init state test request to check the final states\n $response = $this->json('GET', 'init_state');\n $content = json_decode($response->content(), true);\n\n //test that response succeeded\n $this->assertEquals(200, $response->status());\n $this->assertCount(6, $content);\n\n //test the flags field\n $flag = $content['flags'][0];\n $lostTime = app('settings')->getFlags()['lost_time'];\n $this->assertEquals($lostTime, $flag['limitSeconds']);\n $this->assertEquals(0, $flag['remainingSeconds']);\n $this->assertTrue(!$flag['inUse']);\n\n //test the work time signs field\n $workTimeSigns = $content['workTimeSigns'];\n $this->assertCount(1, $workTimeSigns);\n $this->assertEquals($startWork->toTimeString(),$workTimeSigns[0]['started_at']);\n $this->assertEquals($stopWork->toTimeString(),$workTimeSigns[0]['stopped_at']);\n $this->assertEquals('work',$workTimeSigns[0]['task']['content']);\n\n //test the status field\n $this->assertEquals('off', $content['status']);\n\n //test the today time field\n $todayTime = $content['today_time'];\n $todaySeconds = $startFlag->diffInSeconds($startWork) + app('settings')->getFlags()['lost_time'];\n $this->assertEquals($todaySeconds, $todayTime['seconds']);\n $this->assertEquals('work', $todayTime['task']['content']);\n\n //test the month report\n $monthReport = $content['month_report'];\n $this->assertEquals($todaySeconds, $monthReport['actual']['seconds']);\n $this->assertEquals($monthReport['ideal']['seconds'] - $todaySeconds, $monthReport['diff']['seconds']);\n $this->assertEquals('less', $monthReport['diff']['type']);\n }", "title": "" }, { "docid": "03aa0cea5f2b989641d66d84601ba635", "score": "0.52666175", "text": "public function testInvalidBeforeMethod()\n {\n $this->collectionBuilder->buildCollection()->willReturn($this->collection);\n $this->collection->getBenchmarks()->willReturn(array(\n $this->case,\n ));\n $this->subjectBuilder->buildSubjects($this->case)->willReturn(array(\n $this->subject->reveal(),\n ));\n $this->subject->getNbIterations()->willReturn(1);\n $this->subject->getParameterProviders()->willReturn(array());\n $this->subject->getBeforeMethods()->willReturn(array('beforeFooNotExisting'));\n $this->subject->getProcessIsolation()->willReturn(false);\n $this->subject->getRevs()->willReturn(array(1));\n\n $this->runner->runAll();\n }", "title": "" }, { "docid": "44fe280965e86f6eeea4d0ecd47f5228", "score": "0.5246924", "text": "public function test_addJobTimeActivity() {\n\n }", "title": "" }, { "docid": "16f997213610a7b74bc1aeece8a6b337", "score": "0.5239754", "text": "public function test_start_work_in_day_stop_in_the_day_after()\n {\n //create initial settings and dummy testing users data\n Artisan::call('seed:settings');\n app('settings')->refreshData();\n Artisan::call('seed:users');\n Artisan::call('seed:projects');\n $project = Project::first();\n\n //fake login\n $this->loginUser(1);\n\n //set start time\n $startWork = (new Carbon())->hour(12);\n Carbon::setTestNow($startWork);\n\n //make the test request to to start_work\n $response = $this->json('POST', 'start_work', ['task' => ['content' => 'work'] , 'project_id' => $project->id]);\n $content = json_decode($response->content(), true);\n\n //test that response succeeded\n $this->assertEquals(200,$response->status());\n $this->assertCount(3,$content);\n\n //test the work time sign field\n $workTimeSign = $content['workTimeSign'];\n $task = $workTimeSign['task'];\n $this->assertCount(3,$workTimeSign);\n $this->assertEquals($startWork->toTimeString(),$workTimeSign['started_at']);\n $this->assertEquals(null,$workTimeSign['stopped_at']);\n $this->assertEquals('work',$task['content']);\n\n //test the today time field\n $todayTime = $content['today_time'];\n $this->assertCount(2,$todayTime);\n $this->assertEquals(0,$todayTime['seconds']);\n\n //set stop work time after 6 hours\n $stopWork = $startWork->copy()->addHours(6);\n Carbon::setTestNow($stopWork);\n\n //make the stop work request\n $response = $this->json('POST','/stop_work');\n $content = json_decode($response->content(),true);\n }", "title": "" }, { "docid": "679e68a5f841f941b70fe0e54b27f9f3", "score": "0.5236664", "text": "protected function setUp()\n {\n $this->configure(new PendingLoad(),'Pending Load',false,true);\n }", "title": "" }, { "docid": "409049de19d4e22e060d5bc3b30f1fdf", "score": "0.5231276", "text": "function beforeRun(){\n\n\t}", "title": "" }, { "docid": "5ca6ca1b2640c6d8f8818219c5e8802a", "score": "0.523106", "text": "public function testFailingTearDownAsync()\n {\n }", "title": "" }, { "docid": "f6f288f40545284643c2eb1b46646325", "score": "0.52248794", "text": "public function autoStart(): void\n {\n }", "title": "" }, { "docid": "522c535ceeab80a0353a1ac41c38173d", "score": "0.52163947", "text": "protected function _start() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "037d32b80bd8c6045ef18513786e92aa", "score": "0.521369", "text": "public function test_on_register_no_consumer() {\n $tool = $this->tool;\n\n $tp = new dummy_tool_provider($tool->id);\n $tp->onRegister();\n\n $this->assertFalse($tp->ok);\n $this->assertEquals(get_string('invalidtoolconsumer', 'enrol_lti'), $tp->message);\n }", "title": "" }, { "docid": "b757240cb6fc826c302a186313337e9d", "score": "0.521254", "text": "public function test_task_init()\n {\n $task = \\TPTaskRunner\\Models\\Task::createTaskWithData('Class', ['string' => 'data']);\n $task->save();\n\n /** @var \\TPTaskRunner\\Models\\Task $task_load */\n $task_load = \\TPTaskRunner\\Models\\Task::findOrFail($task->id);\n $this->assertNotNull($task_load);\n\n $o = $task_load->getJSONData();\n $this->assertNotNull($o);\n $this->assertEquals('data', $o->string);\n }", "title": "" }, { "docid": "b46427b1bf36b2d21a4daf5f03c1ce03", "score": "0.5211359", "text": "public function testStartGame()\n {\n $game = $this->getNewGameInProgress();\n $this->assertSame(2, $game->getState());\n $this->assertSame(\"Game in progress\", $game->getState(true));\n }", "title": "" }, { "docid": "a24b1c763ce33fbe63d1b77cc3a517a2", "score": "0.52093863", "text": "public function test(): void\n {\n $this->makeCommand();\n $this->getLogFileName();\n }", "title": "" }, { "docid": "84c95f17de28b1131cc8cafbf1bdad6c", "score": "0.5208937", "text": "public function testProcessNotCommand()\n {\n $definition = new Definition('DateTime');\n $definition->addTag('box.console.helper');\n\n $this->container->setDefinition('test', $definition);\n\n $this->setExpectedException(\n 'LogicException',\n 'The service \"test\" is not a subclass of \"Symfony\\Component\\Console\\Helper\\Helper\", so it cannot be used as a helper.'\n );\n\n $this->container->compile();\n }", "title": "" }, { "docid": "9a0dde186278a6b1d405da9907f4a40e", "score": "0.52070665", "text": "public function setUp()\n {\n parent::setUp();\n\n // Compute ls results\n $files = preg_grep('/^([^.0])/', scandir(__DIR__.'/../..'));\n sort($files);\n\n static::$currentFiles = array_values($files);\n\n // Bind dummy AbstractTask\n $this->task = $this->task('Cleanup');\n\n $this->recreateVirtualServer();\n\n // Bind new Storage instance\n $this->app->singleton('rocketeer.storage.local', function ($app) {\n $folder = dirname($this->deploymentsFile);\n\n return new Storage($app, 'local', $folder, 'deployments');\n });\n\n // Mock OS\n $this->usesLaravel(true);\n $this->mockOperatingSystem('Linux');\n\n // Cache paths\n $this->binaries = $this->binaries ?: [\n 'php' => exec('which php') ?: 'php',\n 'bundle' => exec('which bundle') ?: 'bundle',\n 'phpunit' => exec('which phpunit') ?: 'phpunit',\n 'composer' => exec('which composer') ?: 'composer',\n ];\n }", "title": "" } ]
4ce90d619dad44acdc884198a4bde8b9
Get the member avatar
[ { "docid": "1500a5241bbbf5e3318de5968ec2b223", "score": "0.0", "text": "public static function getMember($intId, $intWidth = null, $intHeight = null)\n {\n $objMember = \\MemberModel::findByPk($intId);\n\n // Use the default size\n if (!$intWidth || !$intHeight) {\n list($intWidth, $intHeight) = static::getMemberSize();\n }\n\n // Use the Gravatar\n if ($objMember->avatar_gravatar) {\n return static::getGravatar($objMember->email, $intWidth);\n }\n\n $strFile = static::find($intId, static::getMemberPath($intId));\n\n // Use placeholder member has no avatar\n if ($strFile == '') {\n if (\\Config::get('avatar_member_placeholder') == '') {\n return '';\n }\n\n $objFile = \\FilesModel::findByUuid(\\Config::get('avatar_member_placeholder'));\n\n if ($objFile === null || !is_file(TL_ROOT . '/' . $objFile->path)) {\n return '';\n }\n\n $strFile = $objFile->path;\n }\n\n return \\Image::get($strFile, $intWidth, $intHeight);\n }", "title": "" } ]
[ { "docid": "673589547255d06ef38ff9323de1f541", "score": "0.8536598", "text": "public function avatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "b472974e0f93a819e51a7c6fe2f83072", "score": "0.85171306", "text": "public function get_avatar()\n\t{\n\t\treturn $this->user_loader->get_avatar($this->get_data('images_user'), true, true);\n\t}", "title": "" }, { "docid": "42e441cccdc2cda49c642ec4bc8737d1", "score": "0.8438759", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "42e441cccdc2cda49c642ec4bc8737d1", "score": "0.8438759", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "42e441cccdc2cda49c642ec4bc8737d1", "score": "0.8438759", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "2c8728799534770e45540cae6fb9805b", "score": "0.842702", "text": "public function get_avatar(){\n\t\treturn $this->avatar;\n\t}", "title": "" }, { "docid": "856d3127d1be0cb2b7ec23a6030efeaa", "score": "0.8399935", "text": "public function get_avatar()\n {\n return $this->user_loader->get_avatar($this->get_data('user_id'));\n }", "title": "" }, { "docid": "cff4ba4fd348b9f9dbe902eb54310993", "score": "0.8383841", "text": "public function getAvatar()\n {\n $avatarColumn = config('bumble.avatar');\n\n return app(Gravatar::class)->get($this->user->$avatarColumn);\n }", "title": "" }, { "docid": "20d69dc99813d88dc7f71a88dc739a35", "score": "0.8367887", "text": "public function getAvatar()\n {\n return $this->Avatar;\n }", "title": "" }, { "docid": "33e0ca7a74693646ca7e4deb88349e9e", "score": "0.8311953", "text": "public function avatar()\n {\n return self::buildAvatar($this->discord_id, $this->discord_avatar);\n }", "title": "" }, { "docid": "a1de1979dafd5725fa673fe1b9b7e11e", "score": "0.8309464", "text": "public function getAvatar()\n {\n return $this->avatar;\n }", "title": "" }, { "docid": "f60fc7ddaba90a312dc137f25dad48c4", "score": "0.8232289", "text": "function getAvatar() {\n return $this->avatar;\n }", "title": "" }, { "docid": "19536354e388ab74ced6c3c57e4dacd9", "score": "0.8207136", "text": "public function getAvatar()\n {\n $result = null;\n if (isset($this->userInfo['id'])) {\n $result = 'http://graph.facebook.com/' . $this->userInfo['id'] . '/picture?type=large';\n }\n return $result;\n }", "title": "" }, { "docid": "bb0fec93bef0ef1cd1f90cca72d7bd00", "score": "0.8183245", "text": "public function get_avatar()\n\t{\n\t\treturn $this->user_loader->get_avatar($this->get_data('closer_id'), false, true);\n\t}", "title": "" }, { "docid": "d3c56e23b57349a47393649de659a58e", "score": "0.81753343", "text": "public function getAvatar()\n {\n return $this->getMetadataFile($this->avatar);\n }", "title": "" }, { "docid": "68bc1858bd4a9603a42a5a406d3eb381", "score": "0.812208", "text": "public function getAvatar()\n {\n $result = null;\n\n if (isset($this->userInfo['profile_image_url'])) {\n $result = str_replace('_normal.', '.', $this->userInfo['profile_image_url']);\n }\n\n return $result;\n }", "title": "" }, { "docid": "b6016669e4b6fdf89d1ef55e2f97332b", "score": "0.8089017", "text": "public function get_avatar()\n\t{\n\t\treturn $this->user_loader->get_avatar($this->get_data('reporter_id'));\n\t}", "title": "" }, { "docid": "952b74ec81cb24b6801a2599e58e0a42", "score": "0.78264296", "text": "public function getAvatar() {\n static $avatar = array();\n \n $key = $this->su_id;\n\n if ( ! isset($avatar[$key])) {\n $avatar[$key] = isset($this->su_avatar) ? $this->su_avatar : self::AVATAR_DEFAULT;\n $exists = FALSE;\n\n if ( ! empty($avatar[$key])) {\n $exists = file_exists(PUBPATH.'resources/avatars/'.$avatar[$key]);\n }\n\n if ( ! $exists) {\n $avatar[$key] = self::AVATAR_DEFAULT;\n }\n }\n\n return $avatar[$key];\n }", "title": "" }, { "docid": "95977b2fc46f14d635a043d6156433ec", "score": "0.7814565", "text": "function get_member_avatar_url($member)\n\t{\n\t\tif ((!addon_installed('ocf_member_avatars')) && (!addon_installed('ocf_member_photos'))) return '';\n\n\t\t/*if (!addon_installed('ocf_member_avatars'))\tActually when photo is chosen, avatar is set - and will have been resized right\n\t\t{\n\t\t\tif (!addon_installed('ocf_member_photos')) return '';\n\t\t\treturn $this->get_member_photo_url($member);\n\t\t}*/\n\n\t\t$avatar=$this->get_member_row_field($member,'m_avatar_url');\n\t\tif (is_null($avatar))\n\t\t{\n\t\t\t$avatar='';\n\t\t} else\n\t\t{\n\t\t\t$base_url=get_base_url();\n\t\t\tif (($GLOBALS['SITE_DB']->connection_write==$GLOBALS['FORUM_DB']->connection_write) && (substr($avatar,0,strlen($base_url)+1)==$base_url.'/')) // So we can do an is_file check\n\t\t\t{\n\t\t\t\t$avatar=substr($avatar,strlen($base_url)+1);\n\t\t\t}\n\n\t\t\tif ((url_is_local($avatar)) && ($avatar!=''))\n\t\t\t{\n\t\t\t\tif (($GLOBALS['SITE_DB']->connection_write!=$GLOBALS['FORUM_DB']->connection_write) || (is_file(get_file_base().'/'.rawurldecode($avatar))) || (is_file(get_custom_file_base().'/'.rawurldecode($avatar))))\n\t\t\t\t{\n\t\t\t\t\t$avatar=get_complex_base_url($avatar).'/'.$avatar;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$avatar='';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cdn_filter($avatar);\n\t}", "title": "" }, { "docid": "511e1c29368c3c48659ae60a71f0a256", "score": "0.77935195", "text": "public function getAvatar() : ?string{\n return $this->avatar;\n }", "title": "" }, { "docid": "4271491f62b8928faf83ea70cef65b75", "score": "0.77454895", "text": "public function actionGetUserAvatar() {\n\n $user_id = $this->_user_info['id'];\n /* if exists user id in URL, then change user id */\n if (isset($this->_parsed_attributes['user_id']))\n $user_id = $this->_parsed_attributes['user_id'];\n /*\n * Check is user with given id exists\n */\n if (!$user = Users::model()->findByPk($user_id))\n $this->_apiHelper->sendResponse(400, array('errors' => sprintf(Constants::NO_USER_WAS_FOUND, $user_id)));\n\n $avatar_thumbnails = UsersManager::getAvatarThumbnails($user->avatar);\n if (($user->avatar === '') || empty($avatar_thumbnails))\n $this->_apiHelper->sendResponse(404, array('errors' => 'Current user have no avatar'));\n\n $this->_apiHelper->sendResponse(200, array('results' => array('avatar_thumbnails' => $avatar_thumbnails)));\n }", "title": "" }, { "docid": "76199d1695402cc2a951a7fa39726fcb", "score": "0.7736648", "text": "public function getAvatar()\n {\n return $this->getFirstMediaUrl('avatars');\n }", "title": "" }, { "docid": "c2433c3503cc7a6618916e0b540c9641", "score": "0.77106345", "text": "public function avatar(){\n\t\tif(self::read('avatar') != '')\n\t\t\treturn p::Url(self::read('avatar'));\n\t\telseif(self::read('id') == 0)\n\t\t\treturn p::Url(\"pol://library/staticimages/guest.png\");\n\t\telse\n\t\t\treturn p::Url(\"pol://library/staticimages/default_avatar.png\");\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f357ba14ce7d987af9e50a310b71e633", "score": "0.76987463", "text": "function getAvatarFilename();", "title": "" }, { "docid": "9a17de6ff86d5ad537250adbdb376ccc", "score": "0.7686726", "text": "function userAvatar($id){\n\t\tglobal $conn;\n\n\t\t$sql = \"SELECT avatar\n\t\t\t\tFROM z_users\n\t\t\t\tWHERE id = $id\";\n\t\t$result = $conn->query($sql)->fetch_assoc();\n\n\t\treturn $result['avatar'];\n\t}", "title": "" }, { "docid": "4f77ef2daef4f688ba2d1f95cb039757", "score": "0.7663972", "text": "public function getAvatar(): ?string\n {\n return $this->getResponseValue('picture');\n }", "title": "" }, { "docid": "04c720e31e8f6e8ae2982c40b4faaab9", "score": "0.76445913", "text": "public function getAvatarUrl()\n {\n return $this->userAvatarUrl;\n }", "title": "" }, { "docid": "98fa0f1ecc01a1711567a16cf7f34237", "score": "0.7562424", "text": "public function avatarUrl() : string\n {\n return $this->info()->avatarUrl;\n }", "title": "" }, { "docid": "eb981b45709a0abcea8d0e22466459ef", "score": "0.7492841", "text": "public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }", "title": "" }, { "docid": "9d635ea50f3c703f37e9bc85c879aace", "score": "0.7491643", "text": "public function getAvatarAttribute()\n {\n return url($this->attributes['avatar']);\n }", "title": "" }, { "docid": "0f112e7261d2cd925ba38f75778ded34", "score": "0.7486035", "text": "public function getProfileAvatarUrl() : string {\n\t\treturn ($this->profileAvatarUrl);\n\t}", "title": "" }, { "docid": "1fef0dd84fb7e18a027e759c910a3e32", "score": "0.7460388", "text": "public function getAvatarAttribute()\n {\n if (Storage::exists('avatars/' . $this->id)) {\n return Storage::url('avatars/' . $this->id);\n }\n return Storage::url('default/default_avatar.jpg');\n }", "title": "" }, { "docid": "92ab7395cbda715330b48fe22b69a002", "score": "0.7425131", "text": "public function getAvatarAttribute() : string|null\n {\n if (is_null($this->{$this->getAvatarField()})) {\n return $this->getGravatar();\n }\n return $this->getAvatarUrl($this->{$this->getAvatarField()});\n }", "title": "" }, { "docid": "7d32b92af1547acbd68478b43b3d4191", "score": "0.7413994", "text": "function avatar($member = array(), $className = \"\")\n\t\t{\n\t\t\t$default = C(\"plugin.Gravatar.default\") ? C(\"plugin.Gravatar.default\") : \"mm\";\n\t\t\t$forceGravatar = C(\"plugin.Gravatar.forceGravatar\") ? C(\"plugin.Gravatar.forceGravatar\") : 0;\n\t\t\t$useGravatar = isset($member[\"preferences\"][\"gravatar.useGravatar\"]) ? $member[\"preferences\"][\"gravatar.useGravatar\"] : 0;\n\t\t\t$protocol = C(\"esoTalk.https\") ? \"https\" : \"http\";\n\t\t\t\n\t\t\tif ($useGravatar || $forceGravatar || empty($member[\"avatarFormat\"])) {\n\t\t\t\t$url = \"$protocol://www.gravatar.com/avatar/\".md5(strtolower(trim($member[\"email\"]))).\"?d=\".urlencode($default).\"&s=64\";\n\t\t\t\treturn \"<img src='$url' alt='' class='avatar $className'/>\";\n\t\t\t} else {\n\t\t\t\t// Construct the avatar path from the provided information.\n\t\t\t\tif (!empty($member[\"memberId\"]) and !empty($member[\"avatarFormat\"])) {\n\t\t\t\t\t$url = ETPlugin_Gravatar::getUploadedAvatarSrc($member[\"memberId\"], $member[\"avatarFormat\"]);\n\t\t\t\t\treturn \"<img src='$url' alt='' class='avatar $className'/>\";\n\t\t\t\t}\n\t\t\t\t// Default to an avatar with the first letter of the member's name.\n\t\t\t\treturn \"<span class='avatar $className'>\".(!empty($member[\"username\"]) ? mb_strtoupper(mb_substr($member[\"username\"], 0, 1, \"UTF-8\"), \"UTF-8\") : \"&nbsp;\").\"</span>\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d452c09e7bc91204cde65eb5f287ed78", "score": "0.73750514", "text": "public function getAvatarUrl() : string {\n\t\treturn($this->authorAvatarUrl);\n\t}", "title": "" }, { "docid": "13a846b379ac10699241063950ee8296", "score": "0.73739755", "text": "public function getAvatarAbsolutePath();", "title": "" }, { "docid": "f3a3919f76a25235f1cf95dfc09727b6", "score": "0.73114717", "text": "public function getTribeuserAvatar() {\n\t\tglobal $icmsConfigUser;\n\n\t\t$tribeUserId = $this->getVar('user_id', 'e');\n\t\t$thisUser = icms::handler('icms_member')->getUser($tribeUserId);\n\t\tif (!is_object($thisUser)) return;\n\t\t$avatar = $thisUser->gravatar();\n\t\tif (!$icmsConfigUser['avatar_allow_gravatar'] && strpos($avatar, 'http://www.gravatar.com/avatar/') !== false) return false;\n\t\treturn '<img src=\"'.$thisUser->gravatar().'\" />';\n\t}", "title": "" }, { "docid": "e3f00304360745cf44f05395342e4fdf", "score": "0.7273281", "text": "protected function getAvatarImgUrlAttribute()\n {\n return $this->user->avatar;\n }", "title": "" }, { "docid": "fda3352e572fddef0192f104f2f638a3", "score": "0.7268661", "text": "function vikinger_set_default_member_avatar() {\r\n $members_default_avatar_url = vikinger_get_default_member_avatar_url();\r\n\r\n return $members_default_avatar_url;\r\n}", "title": "" }, { "docid": "c6eac84a70dc07c97eefc47bbc8388e5", "score": "0.72150254", "text": "public function actionAvatar()\n {\n $modelUpload = new FormUpload();\n $modelUpload->file = $_FILES;\n //return error\n if (!$modelUpload->validate()) {\n return [\n 'status' => 400,\n 'messages' => $modelUpload->errors\n ];\n }\n $utility = new Utility();\n $utility->uploadImagesForApi($modelUpload->file, 'member', Yii::$app->user->identity->member_id);\n return [\n 'status' => 200,\n 'data' => [\n 'avatar' => Utility::getImage('member', Yii::$app->user->identity->member_id, null, true)\n ]\n ];\n }", "title": "" }, { "docid": "382d3d7f99ba26997df805344713ebcb", "score": "0.721017", "text": "public function getProfilePicture()\n {\n return $this->getProfilePictureByUsername($this->username);\n }", "title": "" }, { "docid": "1cab1cd3252cef7e075c98b3dfb836b6", "score": "0.720978", "text": "public function getUserAvatarUrl(): string {\n\t\treturn ($this->userAvatarUrl);\n\t}", "title": "" }, { "docid": "ab438fd7159e936d67375af1268658ef", "score": "0.7207543", "text": "function get_author_avatar() {\n\tglobal $default;\n\n\t$avatar = '';\n\tif ( class_exists('author_image') )\n\t\t$avatar = author_image::get();\n\t\n\tif ( $avatar == '' ) {\n\t\tif ( in_the_loop() ) {\n\t\t\t$author_id = get_the_author_ID();\n\t\t} elseif ( is_singular() ) {\n\t\t\tglobal $wp_the_query;\n\t\t\t$author_id = $wp_the_query->posts[0]->post_author;\n\t\t} elseif ( is_author() ) {\n\t\t\tglobal $wp_the_query;\n\t\t\t$author_id = $wp_the_query->get_queried_object_id();\n\t\t}\n\t\t\n\t\t$author = get_userdata($author_id);\n\t\tif ( !empty($author) ) \n\t\t\t$avatar = get_avatar( $author->user_email, 64, $default , $author->display_name );\n\t\telse\n\t\t\t$avatar = '<img src=\"' . esc_url($default) . '\" alt=\"' . $author->display_name .'\" />';\n\t}\n\t\n\treturn $avatar;\n}", "title": "" }, { "docid": "4f8b6baa417ca8f283cffcd4e41549b4", "score": "0.7198979", "text": "public function avatar() {\n return $this->hasOne(\n 'App\\Models\\Upload',\n 'id',\n 'avatar_uid'\n );\n }", "title": "" }, { "docid": "9c7273d0afe3487bc598f3855b24355b", "score": "0.71787214", "text": "function get_avatar( $avatar, $id_or_email ) {\n\t\t$user_id = $this->get_avatar_user_id( $id_or_email );\n\t\t/**\n\t\t * overwrite default gravatar url?\n\t\t */\n\t\tif ( preg_match( '/https?:\\/\\/([^\\.]+\\.)?gravatar\\.com\\/avatar\\//', $avatar ) ) {\n\t\t\treturn apply_filters( Plugin::FILTER_GRAVATAR, $avatar, $user_id, $id_or_email );\n\t\t}\n\t\t\n\t\treturn $avatar;\n\t}", "title": "" }, { "docid": "d52e794c4ceb3e63dcb65cb500767a37", "score": "0.7137486", "text": "function social_auth_wordpress_get_avatar($avatar, $id_or_email, $size, $default, $alt){\n\t$user_id = get_current_user_id();\n\t$provider = get_user_meta( $user_id, 'ha_login_provider', true );\n\t$profilePicSource = get_option('SocialAuth_WP_profile_picture_source');\n\n\tif ($user_id != 0 && !empty($provider) && !empty($profilePicSource) && $profilePicSource == \"authenticatingProvider\")\n\t{\n\t\t$profileImageUrl = get_user_meta( $user_id, 'profile_image_url', true );\n\t\tif(!empty($profileImageUrl))\n\t\t{\n\t\t\t$avatar = \"<img src='\".$profileImageUrl.\"' alt='\".$alt.\"' height='\".$size.\"' width='\".$size.\"' />\";\n\t\t}\n\t}\n\treturn $avatar;\n}", "title": "" }, { "docid": "0a687e2aee17e91c4f314c426359d76c", "score": "0.7129747", "text": "public function getProfileImage();", "title": "" }, { "docid": "41fcd9ec30f273b7c5cb723467aebe6a", "score": "0.708797", "text": "public function getAvatarAttribute()\n {\n return 'https://www.gravatar.com/avatar/' . md5($this->email) . '?d=mp';\n }", "title": "" }, { "docid": "42b46c7e46c373393f676dc5244d2d58", "score": "0.7081411", "text": "public function getPicture(){\n return $this->profile->picture;\n }", "title": "" }, { "docid": "bac1c99d62902edae0dec36baa48e70d", "score": "0.7076466", "text": "function getAvatar($userid)\r\n {\r\n \t$db = JFusionFactory::getDatabase($this->getJname());\r\n\r\n // read unread count\r\n $db->setQuery('SELECT avatar FROM #__users WHERE uid = '.$userid);\r\n $avatar = $db->loadResult();\r\n\r\n $avatar = substr($avatar, 2);\r\n $params = JFusionFactory::getParams($this->getJname());\r\n $url = $params->get('source_url'). $avatar;\r\n return $url;\r\n }", "title": "" }, { "docid": "85c9cdfce0ccaade8a4067b5fc825651", "score": "0.7063536", "text": "public function avatar()\n {\n return $this->morphOne(Media::class, 'mediable');\n }", "title": "" }, { "docid": "0ac0f00e0b8f61777e35eb033804b30a", "score": "0.70389724", "text": "public function getAvatar()\n {\n if ($this->author && $this->author->hasMethod('getAvatar')) {\n return $this->author->getAvatar();\n }\n\n\n if (!$this->is_manager) {\n return '<svg version=\"1.1\"\n\txmlns=\"http://www.w3.org/2000/svg\"\n\txmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\tviewBox=\"0 0 50 50\"\n\tstyle=\"enable-background:new 0 0 50 50;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.comments_icon_user_st0{fill:#1A8ECD;}\n</style>\n<path class=\"comments_icon_user_st0\" d=\"M2.1,26.3c0-0.9,0-1.8,0-2.7c0-0.1,0.1-0.3,0.1-0.4c0.2-2.8,0.9-5.5,2.1-8\n\tC7.7,8.3,13.3,4,21,2.5c0.9-0.2,1.8-0.2,2.6-0.4c0.9,0,1.8,0,2.7,0c0.3,0,0.6,0.1,1,0.1c4.5,0.5,8.5,2.1,12,4.9\n\tc5.3,4.3,8.2,10,8.5,16.8c0.2,4.5-0.8,8.8-3.2,12.7c-3.6,5.9-8.9,9.6-15.7,10.8c-0.9,0.2-1.7,0.2-2.6,0.4c-0.9,0-1.8,0-2.7,0\n\tc-0.3,0-0.6-0.1-1-0.1c-3.8-0.4-7.2-1.6-10.4-3.7C7,40.4,3.6,35.4,2.5,29C2.3,28.1,2.2,27.2,2.1,26.3z M39.4,39.7\n\tc5.1-4.7,8-13.1,5.1-21.5C41.6,9.9,33.5,4,24,4.4C15.3,4.8,7.5,10.8,5.1,19.6c-2.2,8,0.9,15.8,5.5,20.1c0.2-0.2,0.3-0.3,0.5-0.5\n\tc1.6-1.4,3.5-2.2,5.4-3c0.9-0.4,1.9-0.8,2.8-1.3c1.6-0.9,2.2-3.4,1.3-5c-0.1-0.1-0.1-0.2-0.2-0.3c-0.9-0.9-1.4-1.9-1.9-3\n\tc-0.1-0.3-0.4-0.6-0.7-0.9c-0.3-0.3-0.6-0.6-0.8-1c-0.7-1.2-0.4-2.4,0.7-3.2c0.3-0.2,0.4-0.4,0.4-0.8c-0.2-1-0.3-2.1-0.5-3.1\n\tc-0.4-1.8,0.2-3.3,1.6-4.5c0.2-0.2,0.5-0.4,0.7-0.5c1.9-1.1,3.9-1.5,6.1-1.2c1.8,0.2,3.3,1,4.4,2.5c0.1,0.1,0.3,0.1,0.5,0.2\n\tc0.8,0,1.4,0.4,1.5,1.2c0.1,0.8,0,1.5,0,2.3c-0.1,1-0.3,1.9-0.5,2.9c-0.1,0.6,0.1,1,0.6,1.3c0.4,0.3,0.7,0.7,0.8,1.2\n\tc0.1,1.1-0.2,2-1,2.7c-0.3,0.3-0.7,0.8-0.9,1.2c-0.4,0.9-0.8,1.8-1.6,2.5c-0.5,0.5-0.7,1.1-0.7,1.9c0,0.4,0,0.8,0,1.2\n\tc0,1.1,0.5,1.9,1.4,2.4c0.6,0.4,1.3,0.7,1.9,1C34.8,36.8,37.4,37.8,39.4,39.7z\"/>\n</svg>';\n } else {\n return '<svg version=\"1.1\"\n\txmlns=\"http://www.w3.org/2000/svg\"\n\txmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\tviewBox=\"0 0 50 50\"\n\tstyle=\"enable-background:new 0 0 50 50;\" xml:space=\"preserve\">\n<style type=\"text/css\">\n\t.comments_icon_manager_st0{fill:#1A8ECD;}\n</style>\n<g >\n\t<path class=\"comments_icon_manager_st0\" d=\"M25.7,8.6c0.3,0,0.7,0.1,1,0.1c1.4,0.2,2.8,0.6,4,1.5c1.5,1.1,2.4,2.6,2.8,4.4c0.3,1.1,0.3,2.2,0.3,3.3\n\t\tc0,0.1,0,0.2,0.1,0.3c0.1,0.1,0.3,0.3,0.3,0.5c0.2,0.6,0.2,1.2,0.1,1.8c-0.1,0.7-0.2,1.5-0.6,2.1c-0.2,0.4-0.4,0.7-0.8,0.9\n\t\tc-0.1,0-0.1,0.1-0.1,0.2c-0.6,1.4-1.3,2.8-2.2,4c-0.8,1-1.8,1.9-2.9,2.6c-1.9,1.1-3.8,1-5.7-0.1c-1.2-0.7-2.2-1.6-3-2.7\n\t\tc-0.9-1.1-1.5-2.4-2.1-3.7c0-0.1-0.1-0.2-0.2-0.2c-0.3-0.1-0.4-0.3-0.6-0.5c-0.4-0.6-0.6-1.2-0.7-1.8c-0.1-0.7-0.2-1.5,0-2.2\n\t\tc0-0.1,0.1-0.3,0.1-0.4c0.1-0.2,0.2-0.4,0.5-0.5c0-0.4,0.1-0.9,0.1-1.3c0.2-1,0.3-1.9,0.5-2.9c0.6-2.1,2-3.6,4-4.5\n\t\tc1.1-0.5,2.2-0.8,3.4-0.8c0.1,0,0.2,0,0.3,0C24.8,8.6,25.3,8.6,25.7,8.6z M30.5,17C30.4,17,30.4,17,30.5,17\n\t\tc-0.2-0.1-0.4-0.2-0.6-0.3c-0.4-0.2-0.8-0.4-1.3-0.5c-0.5-0.2-1.1-0.2-1.6-0.1c-1.4,0.4-2.8,0.4-4.3,0.1c-0.4-0.1-0.8-0.2-1.2-0.3\n\t\tc-0.9-0.1-1.7,0.1-2.4,0.7c-0.5,0.5-0.9,1-1.1,1.7c-0.1,0.4-0.2,0.7-0.3,1.1c-0.4-0.2-0.7,0-0.7,0.4c0,0,0,0,0,0.1\n\t\tc0,0.4-0.1,0.8,0,1.2c0,0.6,0.2,1.2,0.6,1.7c0.1,0.1,0.2,0.2,0.3,0.2c0.1,0,0.2,0,0.4,0c0,0,0,0,0,0.1c0.4,1,0.8,2,1.4,3\n\t\tc0.8,1.1,1.7,2.1,2.9,2.8c1,0.6,2,0.8,3.2,0.6c0.8-0.2,1.6-0.5,2.2-1c1.3-1,2.3-2.4,3-3.9c0.2-0.5,0.4-1,0.6-1.5\n\t\tc0.3,0.1,0.4,0.1,0.6-0.2c0.3-0.3,0.4-0.7,0.5-1c0.2-0.6,0.3-1.3,0.1-1.9c0-0.2-0.2-0.3-0.3-0.4c-0.1-0.1-0.3,0-0.5,0\n\t\tc-0.1-0.3-0.2-0.6-0.3-0.9c-0.3-0.8-0.6-1.5-1.1-2.1c-0.1-0.1-0.3-0.2-0.4-0.3c0,0,0,0-0.1,0.1C30.2,16.4,30.4,16.7,30.5,17z\"/>\n\t<path class=\"comments_icon_manager_st0\" d=\"M9,42.7c0.2,0.1,0.3,0.2,0.5,0.3c1.1,0.6,2.3,1,3.5,1.3c2.5,0.6,5,0.9,7.5,1h9c0.1,0,0.1,0,0.2,0\n\t\tc2.7-0.2,5.3-0.5,7.9-1.2c1.1-0.3,2.2-0.7,3.2-1.3c0.6-0.4,1.2-0.9,1.5-1.6c0.1-0.3,0.2-0.6,0.3-1c0-0.1,0-0.1,0-0.2\n\t\tc0-0.2,0-0.5,0-0.7c0-0.2-0.1-0.3-0.1-0.5c-0.4-1.4-0.9-2.8-1.7-4c-0.5-0.8-1.2-1.6-2-2.2c-1-0.8-2.3-1.2-3.5-1.3\n\t\tc-1.2-0.2-2.5-0.2-3.8-0.3c-0.2,0.5-0.5,1-0.8,1.5c-1,1.3-2.1,2.6-3.1,3.8c-0.3,0.3-0.6,0.6-0.9,0.9c0,0,0-0.1,0-0.1\n\t\tc-0.3-1-0.5-1.9-0.8-2.9c0-0.1,0-0.1,0.1-0.2c0.5-0.3,0.7-1.3,0.6-1.7c-1,0-2,0-3,0c0,0.1,0,0.1,0,0.2c0,0.6,0.1,1.1,0.7,1.5\n\t\tc0,0,0,0.1,0,0.2c-0.2,0.9-0.4,1.7-0.7,2.6c0,0.1-0.1,0.2-0.1,0.4c-0.1-0.1-0.1-0.1-0.1-0.2c-0.5-0.6-1-1.1-1.5-1.7\n\t\tc-1.2-1.4-2.4-2.7-3.2-4.4c-0.3,0-0.7,0.1-1,0.1c-0.9,0.1-1.8,0.1-2.7,0.2c-0.9,0.1-1.7,0.3-2.5,0.7c-1.1,0.6-2,1.4-2.7,2.4\n\t\tc-0.9,1.4-1.6,2.9-2,4.4C7.3,40.1,7.6,41.7,9,42.7z\"/>\n</g>\n</svg>';\n }\n\n\n }", "title": "" }, { "docid": "7e98377a40d74f2f15654405bc3ac0ca", "score": "0.702377", "text": "function showAvatar()\n {\n $avatar_size = AVATAR_STREAM_SIZE;\n $avatar = $this->profile->getAvatar($avatar_size);\n\n $this->out->element('img', array('src' => ($avatar) ?\n $avatar->displayUrl() :\n Avatar::defaultImage($avatar_size, $this->profile->id, $this->profile->sex),\n 'class' => 'avatar photo',\n 'width' => $avatar_size,\n 'height' => $avatar_size,\n 'alt' =>\n ($this->profile->nickname) ?\n $this->profile->nickname :\n $this->profile->uname));\n }", "title": "" }, { "docid": "33d97f1b8b4a9b590b569b1ad2618ab5", "score": "0.7006872", "text": "public function userImage()\n {\n if (!$this->picture) {\n return 'http://www.gravatar.com/avatar/'.md5($this->email);\n }\n\n return $this->picture;\n }", "title": "" }, { "docid": "a3d6b57cbd9a1ac0443680722d5b4eb4", "score": "0.69696075", "text": "function quiescent_get_user_avatar( $user, $field_name, $request ) {\n\t$args = array(\n\t\t'size'\t=> 207\n\t);\n\n\treturn get_avatar_url( $user['id'], $args );\n}", "title": "" }, { "docid": "e4592b4df3c2f7b5e6b2c50d94a21945", "score": "0.69553584", "text": "public function getProfilePic() {\n\t\t$username = $this->user['username'];\n\t\t// The following enables parameterized sql statements.\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"social\");\n\t\tif($mysqli->connect_error) {\n\t\t exit(\"Our system's experiencing an error. Please try again later.\");\n\t\t}\n\t\tmysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\t\t$mysqli->set_charset(\"utf8mb4\");\n\t\t$stmt = $mysqli->prepare(\"SELECT profile_pic FROM users WHERE username=?\");\n\t\t$stmt->bind_param(\"s\", $username);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\t$row = $result->fetch_assoc();\n\t\t$stmt->close();\n\t\treturn $row['profile_pic'];\n\t}", "title": "" }, { "docid": "7ca68b886bfb46bda35e982d3058da1f", "score": "0.6935518", "text": "public function getProfilePicture()\n {\n return $this->profilePicture;\n }", "title": "" }, { "docid": "f19dcb2daf80c8fa7224b9d2e4a86473", "score": "0.6905841", "text": "public function getUserAvatar($uid, $returnBinary=false){\n \t\n\t\t$userProfile = $this->getUserProfile($uid);\n\t\t\n\t\t$data = $userProfile->userImage->image;\n\t\tif (empty($data)) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif ($returnBinary) {\n\t\t\t$decoded = \"\"; \n \t\t\tfor ($i=0, $j = ceil(strlen($data)/256); $i<$j; $i++) {\n \t\t$decoded = $decoded . base64_decode(substr($data, $i*256, 256));\n \t\t\t}\n \t\t\treturn $decoded;\n\t\t} else {\n\t\t\treturn $data;\n\t\t}\n\t\t\n }", "title": "" }, { "docid": "7775c8b2bd8e5c91164457fdbc5cfb5a", "score": "0.6898485", "text": "public function getAvatarField() : string\n {\n return 'avatar_path';\n }", "title": "" }, { "docid": "239aa1158ed22a99a3065219633f2e0f", "score": "0.6893581", "text": "function getUserPic() {\n return $this->user_pic;\n }", "title": "" }, { "docid": "efeedc347b7409317604f9ae4bed90c0", "score": "0.68776524", "text": "public function getAuthorAvatarUrl(): string {\n\t\treturn $this->authorAvatarUrl;\n\t}", "title": "" }, { "docid": "b27cda166ff100f9ae64e2cec0cb9fe3", "score": "0.6871816", "text": "function user_profile_image($user_id, $size) {\n\n echo get_avatar( $user_id, $size, $default, $alt );\n}", "title": "" }, { "docid": "9bd924bf7373f5c25d84e876a6e6f46c", "score": "0.6849827", "text": "public function getImageAttribute()\n {\n return $this->getMedia('pos_worker.avatar')->last();\n }", "title": "" }, { "docid": "8ba4ea468c1d5b981501ad3defb0fb8e", "score": "0.6836181", "text": "public function getAuthorAvatarUrl() : string {\n\t\treturn($this->authorAvatarUrl);\n\t}", "title": "" }, { "docid": "8ba4ea468c1d5b981501ad3defb0fb8e", "score": "0.6836181", "text": "public function getAuthorAvatarUrl() : string {\n\t\treturn($this->authorAvatarUrl);\n\t}", "title": "" }, { "docid": "16345f5c9128e1ce8bc1b31ecefd85ab", "score": "0.6821064", "text": "function g_uAVATAR(){\r\n\t\treturn (gSESSION(\"wph_uAvatar\"))?gSESSION(\"wph_uAvatar\"):u(s('AVATAR'));\r\n\t}", "title": "" }, { "docid": "77d58a4b3c3ec05ed3b6ed02dc0e89d8", "score": "0.68190384", "text": "public function getAvatar_url_imagen()\n {\n return $this->avatar_url_imagen;\n }", "title": "" }, { "docid": "95deb03d924b234f6168bc7baccbcc33", "score": "0.6793488", "text": "function get_member_photo_url($member)\n\t{\n\t\tif (!addon_installed('ocf_member_photos'))\n\t\t{\n\t\t\tif (!addon_installed('ocf_member_avatars')) return '';\n\t\t\treturn $this->get_member_avatar_url($member);\n\t\t}\n\n\t\t$pic=$this->get_member_row_field($member,'m_photo_thumb_url');\n\n\t\tif ($pic=='')\n\t\t{\n\t\t\t$photo_url=$GLOBALS['FORUM_DRIVER']->get_member_row_field($member,'m_photo_url');\n\t\t\tif ($photo_url!='')\n\t\t\t{\n\t\t\t\trequire_code('images');\n\t\t\t\t$pic=ensure_thumbnail($photo_url,$pic,(strpos($photo_url,'uploads/photos')!==false)?'photos':'ocf_photos','f_members',$member,'m_photo_thumb_url');\n\t\t\t}\n\t\t}\n\n\t\tif (is_null($pic)) $pic='';\n\t\telseif ((url_is_local($pic)) && ($pic!='')) $pic=get_complex_base_url($pic).'/'.$pic;\n\n\t\treturn $pic;\n\t}", "title": "" }, { "docid": "5c342c8a9576e20d099441a1e91ae458", "score": "0.67883414", "text": "public function getAvatarUrlAttribute()\n {\n if($this->avatar) { \n return statelessAssetUrl('/storage/avatar/'.$this->avatar);\n }\n }", "title": "" }, { "docid": "5d06a51aaf809c14bd32666649478184", "score": "0.67817163", "text": "public function getAvatarAttribute()\n {\n return env('APP_URL') . Storage::url($this->attributes['avatar']);\n }", "title": "" }, { "docid": "ff6816232127c461ee0606466d9943be", "score": "0.67805654", "text": "public function getGravatarAttribute()\n {\n if ($this->profile_pic != null) {\n return asset('storage/'.$this->profile_pic);\n }\n\n if ($this->avatar != null) {\n return $this->avatar;\n }\n\n $hash = md5(strtolower(trim($this->attributes['email'])));\n return \"http://www.gravatar.com/avatar/$hash?s=260&d=mp\";\n }", "title": "" }, { "docid": "87ae4be5f6f4caf40f3282ec81fd6bcc", "score": "0.67653453", "text": "public function getAvatar_id()\n {\n //return $this->avatar_id;\n return $this->avatar_id;\n }", "title": "" }, { "docid": "d0a7f1f1f10723e5a5ab9bb44706c6d7", "score": "0.6756383", "text": "public static function getUploadedAvatarSrc($memberId, $avatarFormat) {\n\t\treturn getWebPath(\"uploads/avatars/$memberId.$avatarFormat\");\n\t}", "title": "" }, { "docid": "b387bc9305130667bc237caa5e638159", "score": "0.6754068", "text": "public function avatar()\n {\n return $this->morphOne(FeaturedPhoto::class, 'photoable');\n }", "title": "" }, { "docid": "9f76db7007b1b5f68ce06862747ffa44", "score": "0.6744752", "text": "function profile_photo() {\n return $this->profile_photo;\n }", "title": "" }, { "docid": "6b6b29f459bb7265d09f7b381109adff", "score": "0.67417556", "text": "public function getAvatarImage($size) {\n\t\t// delay the initialization\n\t\tif ($this->avatarManager === null) {\n\t\t\t$this->avatarManager = \\OC::$server->getAvatarManager();\n\t\t}\n\n\t\t$avatar = $this->avatarManager->getAvatar($this->getUID());\n\t\t$image = $avatar->get($size);\n\t\tif ($image) {\n\t\t\treturn $image;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ff9a2a2f228a35ef5a7c44b828e6b57f", "score": "0.6738671", "text": "function GetAvatar($username)\n{\n $mysqli = ConnectDB();\n\n $sql = \"SELECT avatar FROM users WHERE username = '$username'\";\n $result = $mysqli->query($sql);\n while($row = $result->fetch_assoc()){ \n $avatar = $row['avatar'];\n }\n \n return $avatar;\n}", "title": "" }, { "docid": "25319249e216e6aa3c772dc709320e2d", "score": "0.67340595", "text": "public function get_instructor_avatar($request, $response, $args) {\n $img = file_get_contents(\n __DIR__ . '/../uploads/instructorAvatar/' . $args['user_id'] . '.jpg'\n );\n\n $response->write($img);\n return $response->withHeader('Content-Type', FILEINFO_MIME_TYPE);\n }", "title": "" }, { "docid": "2ad5eea514f4bb735603aacde7b21bf2", "score": "0.6730155", "text": "function get_avatar( $avatar, $id_or_email, $size ) {\n\n // it's not a comment\n if ( ! is_object( $id_or_email ) ) {\n return $avatar;\n }\n\n if ( empty( $id_or_email->comment_type ) || $id_or_email->comment_type != 'fb_group_post' ) {\n return $avatar;\n }\n\n $profile_id = get_comment_meta( $id_or_email->comment_ID, '_fb_author_id', true );\n\n if ( ! $profile_id ) {\n return $avatar;\n }\n\n $image = sprintf( 'http://graph.facebook.com/%1$d/picture?type=square&height=%2$s&width=%2$s', $profile_id, $size );\n $avatar = sprintf( '<img src=\"%1$s\" class=\"avatar avatar-44 photo avatar-default\" height=\"%2$s\" width=\"%2$s\" />', $image, $size );\n\n return $avatar;\n }", "title": "" }, { "docid": "628a58494c951832246b1ab27e026627", "score": "0.67196894", "text": "public function get_profile_image(){\n $user = $this->get_username();\n $user_folder = \"users/$user/$user\";\n if(file_exists($user_folder.\".jpg\")){\n $image = $user_folder.\".jpg\";\n }elseif(file_exists($user_folder.\".png\")){\n $image = $user_folder.\".png\";\n }elseif(file_exists($user_folder.\".gif\")){\n $image = $user_folder.\".gif\";\n }else {\n $image = \"\";\n }\n if($image !== \"\"){\n return $image;\n }\n return false;\n }", "title": "" }, { "docid": "3e4ff926a5bc14783d5b4c315f2c316a", "score": "0.67150855", "text": "public function get_html() {\n\t\tif ( ! empty( $this->url ) ) {\n\t\t\t$avatar = \"<img alt='\" . esc_attr( $this->alt ) . \"' src='\" . $this->url . \"' class='{$this->css_class}' height='{$this->img_size}' width='{$this->img_size}' />\";\n\t\t} else {\n\t\t\t$avatar = $this->default;\n\t\t}\n\n\t\treturn $avatar;\n\t}", "title": "" }, { "docid": "842e9a78ea53de0bdfe5a00d4bb1cf5b", "score": "0.67077416", "text": "function show_avatar($user_id){\n\tglobal $db;\n\t$query = \"SELECT profile_pic AS avatar FROM users\n\t\t\t WHERE user_id = $user_id\n\t\t\t LIMIT 1\";\n\t$result= $db->query($query);\n\t//check to make sure one row was found\n\tif ( $result->num_rows == 1 ) {\n\t\t$row = $result->fetch_assoc();\n\t\t//make sure avatar is not blank\n\t\tif($row['avatar'] == ''){\n\t\t\techo 'images/dprofilepic.png';\n\t\t}else{\n\t\t\techo $row['avatar'];\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d05af63fa9a6207440cbe975ceb4f25c", "score": "0.67046636", "text": "public static function getAvatarFromUserData(object $data, bool $allow_gifs = false, int $size = 128, bool $full = false): string {\n // If custom avatars are enabled, first check if they have gravatar enabled, and then fallback to normal image\n if (defined('CUSTOM_AVATARS')) {\n if ($data->gravatar) {\n return 'https://secure.gravatar.com/avatar/' . md5(strtolower(trim($data->email))) . '?s=' . $size;\n }\n\n if ($data->has_avatar) {\n $exts = ['png', 'jpg', 'jpeg'];\n\n if ($allow_gifs) {\n $exts[] = 'gif';\n }\n\n foreach ($exts as $ext) {\n if (file_exists(ROOT_PATH . '/uploads/avatars/' . $data->id . '.' . $ext)) {\n // We don't check the validity here since we know the file exists for sure\n return ($full ? rtrim(URL::getSelfURL(), '/') : '') . ((defined('CONFIG_PATH')) ? CONFIG_PATH . '/' : '/') . 'uploads/avatars/' . $data->id . '.' . $ext . '?v=' . urlencode($data->avatar_updated);\n }\n }\n }\n }\n\n // Fallback to default avatar image if it is set and the avatar type is custom\n if (defined('DEFAULT_AVATAR_TYPE') && DEFAULT_AVATAR_TYPE == 'custom' && DEFAULT_AVATAR_IMAGE !== '') {\n if (file_exists(ROOT_PATH . '/uploads/avatars/defaults/' . DEFAULT_AVATAR_IMAGE)) {\n // We don't check the validity here since we know the file exists for sure\n return ($full ? rtrim(URL::getSelfURL(), '/') : '') . ((defined('CONFIG_PATH')) ? CONFIG_PATH . '/' : '/') . 'uploads/avatars/defaults/' . DEFAULT_AVATAR_IMAGE;\n }\n }\n\n // Attempt to get their MC avatar if Minecraft integration is enabled\n if (Settings::get('mc_integration')) {\n if ($data->uuid != null && $data->uuid != 'none') {\n $uuid = $data->uuid;\n } else {\n $uuid = $data->username;\n // Fallback to steve avatar if they have an invalid username\n if (preg_match('#[^][_A-Za-z0-9]#', $uuid)) {\n $uuid = 'Steve';\n }\n }\n\n $url = self::getAvatarFromUUID($uuid, $size);\n // The avatar might be invalid if they are using\n // an MC avatar service that uses only UUIDs\n // and this user doesn't have one\n if (self::validImageUrl($url)) {\n return $url;\n }\n }\n\n return \"https://api.dicebear.com/5.x/initials/png?seed={$data->username}&size={$size}\";\n }", "title": "" }, { "docid": "450f8ecfe673c3ca93aba1e403d913b4", "score": "0.66977966", "text": "public function getProfileImage() {\n\t\treturn is_null($this->profileImageId)\n\t\t\t? null\n\t\t\t: File::getByKey($this->profileImageId);\n\t}", "title": "" }, { "docid": "b8c40ff6215625d315d7196d17eb4d90", "score": "0.6688322", "text": "public static function getAvatar($key = 'mini_bus')\n {\n return static::getAvatarOptions()->get($key);\n }", "title": "" }, { "docid": "5b90f53326a33650ae4145c050feff4b", "score": "0.6684011", "text": "public function avatar($label = '')\n {\n return $this->image($label)->circle();\n }", "title": "" }, { "docid": "c6a86478ad941abf39d4bf96571b1a62", "score": "0.6650842", "text": "function init()\n\t{\n\n\t\t/**\n\t\t * Return an image tag containing a member's avatar.\n\t\t *\n\t\t * @param array $member An array of the member's details. (email is required in this implementation.)\n\t\t * @param string $avatarFormat The format of the member's avatar (as stored in the database - jpg|gif|png.)\n\t\t * @param string $className CSS class names to apply to the avatar.\n\t\t */\n\t\tfunction avatar($member = array(), $className = \"\")\n\t\t{\n\t\t\t$default = C(\"plugin.Gravatar.default\") ? C(\"plugin.Gravatar.default\") : \"mm\";\n\t\t\t$forceGravatar = C(\"plugin.Gravatar.forceGravatar\") ? C(\"plugin.Gravatar.forceGravatar\") : 0;\n\t\t\t$useGravatar = isset($member[\"preferences\"][\"gravatar.useGravatar\"]) ? $member[\"preferences\"][\"gravatar.useGravatar\"] : 0;\n\t\t\t$protocol = C(\"esoTalk.https\") ? \"https\" : \"http\";\n\t\t\t\n\t\t\tif ($useGravatar || $forceGravatar || empty($member[\"avatarFormat\"])) {\n\t\t\t\t$url = \"$protocol://www.gravatar.com/avatar/\".md5(strtolower(trim($member[\"email\"]))).\"?d=\".urlencode($default).\"&s=64\";\n\t\t\t\treturn \"<img src='$url' alt='' class='avatar $className'/>\";\n\t\t\t} else {\n\t\t\t\t// Construct the avatar path from the provided information.\n\t\t\t\tif (!empty($member[\"memberId\"]) and !empty($member[\"avatarFormat\"])) {\n\t\t\t\t\t$url = ETPlugin_Gravatar::getUploadedAvatarSrc($member[\"memberId\"], $member[\"avatarFormat\"]);\n\t\t\t\t\treturn \"<img src='$url' alt='' class='avatar $className'/>\";\n\t\t\t\t}\n\t\t\t\t// Default to an avatar with the first letter of the member's name.\n\t\t\t\treturn \"<span class='avatar $className'>\".(!empty($member[\"username\"]) ? mb_strtoupper(mb_substr($member[\"username\"], 0, 1, \"UTF-8\"), \"UTF-8\") : \"&nbsp;\").\"</span>\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9f6620f20ce595ec3d0eea7d82c579d9", "score": "0.6641698", "text": "function diso_get_avatar($gravatar, $id_or_email, $size) {\n\tif(is_numeric($id_or_email)) {\n\t\t$user = get_userdata((int)$id_or_email);\n\t\tif($user && $user->photo)\n\t\t\treturn '<img style=\"max-width:'.$size.'px;max-height:'.$size.'px;\" class=\"avatar avatar-'.$size.'\" src=\"'.htmlspecialchars($user->photo).'\" alt=\"\" />';\t\n\t} elseif(is_object($id_or_email)) {\n\t\tif(!empty($id_or_email->user_id)) {\n\t\t\t$user = get_userdata((int)$id_or_email->user_id);\n\t\tif($user && $user->photo)\n\t\t\treturn '<img style=\"max-width:'.$size.'px;max-height:'.$size.'px;\" class=\"avatar avatar-'.$size.'\" src=\"'.htmlspecialchars($user->photo).'\" alt=\"\" />';\t\n\t\t} elseif(!empty($id_or_email->comment_author_url)) {\n\t\t\t// We could do something smart and detect an hCard or the like on thoir homepage\n\t\t\t// This is slow, though, and should only be done once and cached, likely when the comment is posted\n\t\t\t// If the user logged in with OpenID we got their hCard avatar anyway\n\t\t}\n\t}\n\treturn $gravatar;\n}", "title": "" }, { "docid": "7ff8bb1a19b6f77e4e34e11235ec59cb", "score": "0.66395605", "text": "function getAvatarFileExt();", "title": "" }, { "docid": "991258349236e45e93bd3b3f76ace294", "score": "0.6638112", "text": "function get_simple_local_avatar( $id_or_email, $size = 96, $default = '', $alt = '' ) {\n\tglobal $simple_local_avatars;\n\t$avatar = $simple_local_avatars->get_avatar( '', $id_or_email, $size, $default, $alt );\n\t\n\tif ( empty ( $avatar ) ) {\n\t\tremove_action( 'get_avatar', array( $simple_local_avatars, 'get_avatar' ) );\n\t\t$avatar = get_avatar( $id_or_email, $size, $default, $alt );\n\t\tadd_action( 'get_avatar', array( $simple_local_avatars, 'get_avatar' ), 10, 5 );\n\t}\n\t\n\treturn $avatar;\n}", "title": "" }, { "docid": "ac386dd61b852b4c2d5a3f7aa35f5d59", "score": "0.6634462", "text": "public static function get_item_avatar( $post, $avatars ) {\r\n\t\tif ( empty ( $avatars ) ) {\r\n\t\t\treturn '';\r\n\t\t} else {\r\n\t\t\t$username = SB_Instagram_Parse_Pro::get_username( $post );\r\n\t\t\tif ( isset( $avatars[ $username ] ) ) {\r\n\t\t\t\treturn $avatars[ $username ];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn '';\r\n\t}", "title": "" }, { "docid": "52dd005a1153f21f919136f93f1df352", "score": "0.6634278", "text": "public function getAvatarAttribute($value)\n {\n return $this->timeline->avatar ? $this->timeline->avatar->source : null;\n }", "title": "" }, { "docid": "9a2bb58e2e0c361a2cce0da3fee602f5", "score": "0.662636", "text": "public function get_avatar( $avatar, $id_or_email, $size, $default, $alt )\n\t{\t\n\t\tif( $id_or_email ) \n\t\t{\n\t\t\t$avatar = get_user_meta( $id_or_email, $this->meta_key, true );\n\n\t\t\tif( ! empty( $avatar ) )\n\t\t\t{\n\t\t\t\t$avatar_path = $this->avatar_url . $avatar .'?s='. $size .'';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$avatar_path = $default;\n\t\t\t}\n\n\t\t\t$avatar = \"<img alt='{$alt}' src='{$avatar_path}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />\";\n\n\t\t\treturn $avatar;\n\t\t}\n\t\t\n\t\treturn $avatar;\n\t}", "title": "" }, { "docid": "c337772041de81fe7787c3732000ce2d", "score": "0.66244507", "text": "public function get_gravatar()\r\n\t{\r\n\t\t$this->CI->load->model('User_model');\r\n\t\t$id = $this->get_id();\r\n\t\treturn $this->CI->User_model->get_user_gravatar($id);\r\n\t}", "title": "" }, { "docid": "2193bc1848ec132b4d59517d543724cf", "score": "0.66233987", "text": "function defaultminotar_getavatar($user=array('uid' => 0))\n{\n\t//static $cache = array();\n\t\n\t//\tif(!isset($cache[$user['uid']]))\n\t//{\n\tglobal $settings, $templates;\n\t$user['uid'] = (int)$user['uid'];\n\tif(empty($user['username']))\n\t{\n\t\tglobal $lang;\n\t\t$user['username'] = $lang->guest;\n\t}\n\t\n\t$user['username'] = htmlspecialchars_uni($user['username']);\n\t$user['profilelink'] = get_profile_link($user['uid']);\n\t\n\tif(empty($user['avatar']) or ($user['avatar'] == 'images/avatars/invalid_url.gif'))\n\t{\n\t\t$user['avatar'] = 'https://minotar.net/helm/' . $user['username'] . '/100.png';\n\t\t$user['avatardimensions'] = $settings['useravatardims'];\n\t}\n\t\n\t$user['avatar'] = htmlspecialchars_uni($user['avatar']);\n\t$dimensions = explode('|', $user['avatardimensions']);\n\tif(isset($dimensions[0]) && isset($dimensions[1]))\n\t{\n\t\tlist($maxwidth, $maxheight) = explode('x', my_strtolower($settings['ougc_showavatar_maxwh']));\n\t\tif($dimensions[0] > (int)$maxwidth || $dimensions[1] > (int)$maxheight)\n\t\t{\n\t\t\trequire_once MYBB_ROOT.'inc/functions_image.php';\n\t\t\t$scale = scale_image($dimensions[0], $dimensions[1], (int)$maxwidth, (int)$maxheight);\n\t\t}\n\t\t$user['width'] = (int)(isset($scale['width']) ? $scale['width'] : $dimensions[0]);\n\t\t$user['height'] = (int)(isset($scale['height']) ? $scale['height'] : $dimensions[1]);\n\t}\n\t//eval('$cache[$user[\\'uid\\']] = \"'.$templates->get('minotar_avatar_template').'\";');//puts items in cache\n\teval('$user[\\'template\\'] = \"'.$templates->get('minotar_avatar_template').'\";');//puts items in cache\n\n //}\n \n\t//return $cache[$user['uid']];\n return $user;\n}", "title": "" }, { "docid": "9869b9fd58ab707faad8d5fc14772ff6", "score": "0.66194624", "text": "function userUsernameNameAvatar($id){\n\t\tglobal $conn;\n\n\t\t$sql = \"SELECT id, username, name, avatar, official\n\t\t\t\tFROM z_users\n\t\t\t\tWHERE id = $id\";\n\t\t$result = $conn->query($sql)->fetch_assoc();\n\n\t\t$result['name'] = html_entity_decode($result['name'], ENT_QUOTES);\n\t\t$result['avatarUrl'] = $result['avatar'] ? ('https://cdn.beatfeel.com/users/'.$result['id'].'/avatar/'.$result['avatar']) : '';\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "19acb4b2c2108bb19f24f0fdece6e0ad", "score": "0.65809786", "text": "public static function getUserAvatar($username) {\n\t\t$data = phpbbDB::getAvatar($username); // get the data about the user's avatar\n\t\t$avatar = get_user_avatar($data[\"user_avatar\"], $data[\"user_avatar_type\"], $data[\"user_avatar_width\"], $data[\"user_avatar_height\"], \"$username's avatar\"); // get the uesr's avatar URL\n\t\tif ($data[\"user_avatar_type\"] != \"avatar.driver.remote\") { // if the avatar is uploaded to OLF, then its path has to be modified\n\t\t\t$avatar = \"<img src = \\\"http://lyon-forums.com\" . substr($avatar, strpos($avatar, \"/download/file.php?\")); // fix the URL to work with a different subdirectory\n\t\t}\n\t\t$pattern = \"/src\\s*=\\s*\\\"(.+?)\\\"/\"; // the pattern used to match the URL\n\t\tpreg_match($pattern, $avatar, $matches); // extract the URL and store it in an array\n\t\treturn $matches[1]; // return the URL found\n\t}", "title": "" }, { "docid": "904d58a5eb89b03768e7655d9c530e96", "score": "0.65753514", "text": "public function getAvatarUrlAttribute(): String\n {\n if (!empty($this->avatar))\n {\n return asset('storage/' . $this->avatar);\n }\n return asset(DEFAULT_AVATAR);\n }", "title": "" }, { "docid": "cd0effd399af0442dd613eeadb73f5cb", "score": "0.6572085", "text": "function &get($id)\n {\n $avatar = false;\n \t$id = intval($id);\n if ($id > 0) {\n $sql = \"SELECT * FROM \".$this->db->prefix('avatar').\" WHERE avatar_id='\".$id.\"'\";\n if (!$result = $this->db->query($sql)) {\n return false;\n }\n $numrows = $this->db->getRowsNum($result);\n if ($numrows == 1) {\n $avatar = new XoopsAvatar();\n $avatar->assignVars($this->db->fetchArray($result));\n return $avatar;\n }\n }\n return $avatar;\n }", "title": "" }, { "docid": "425e6422cd701d4ac17a1ac531ffcdc4", "score": "0.65640575", "text": "public function get_avatar( $avatar = '', $id_or_email = '', $size = 96, $default = '', $alt = '' ) {\n\t\tif ( is_numeric( $id_or_email ) )\n\t\t\t$user_id = (int) $id_or_email;\n\t\telseif ( is_string( $id_or_email ) && ( $user = get_user_by( 'email', $id_or_email ) ) )\n\t\t\t$user_id = $user->ID;\n\t\telseif ( is_object( $id_or_email ) && ! empty( $id_or_email->user_id ) )\n\t\t\t$user_id = (int) $id_or_email->user_id;\n\t\t\n\t\tif ( empty( $user_id ) )\n\t\t\treturn $avatar;\n\n\t\t// fetch local avatar from meta and make sure it's properly ste\n\t\t$local_avatars = get_user_meta( $user_id, 'simple_local_avatar', true );\n\t\tif ( empty( $local_avatars['full'] ) )\n\t\t\treturn $avatar;\n\n\t\t// check rating\n\t\t$avatar_rating = get_user_meta( $user_id, 'simple_local_avatar_rating', true );\n\t\tif ( ! empty( $avatar_rating ) && 'G' != $avatar_rating && ( $site_rating = get_option( 'avatar_rating' ) ) ) {\n\t\t\t$ratings = array_keys( $this->avatar_ratings );\n\t\t\t$site_rating_weight = array_search( $site_rating, $ratings );\n\t\t\t$avatar_rating_weight = array_search( $avatar_rating, $ratings );\n\t\t\tif ( false !== $avatar_rating_weight && $avatar_rating_weight > $site_rating_weight )\n\t\t\t\treturn $avatar;\n\t\t}\n\n\t\t// handle \"real\" media\n\t\tif ( ! empty( $local_avatars['media_id'] ) ) {\n\t\t\t// has the media been deleted?\n\t\t\tif ( ! $avatar_full_path = get_attached_file( $local_avatars['media_id'] ) ) {\n\t\t\t\treturn $avatar;\n\t\t\t}\n\t\t}\n\n\t\t$size = (int) $size;\n\t\t\t\n\t\tif ( empty( $alt ) )\n\t\t\t$alt = get_the_author_meta( 'display_name', $user_id );\n\t\t\t\n\t\t// generate a new size\n\t\tif ( ! array_key_exists( $size, $local_avatars ) ) {\n\t\t\t$local_avatars[$size] = $local_avatars['full']; // just in case of failure elsewhere\n\n\t\t\t// allow automatic rescaling to be turned off\n\t\t\tif ( $allow_dynamic_resizing = apply_filters( 'simple_local_avatars_dynamic_resize', true ) ) :\n\n\t\t\t\t$upload_path = wp_upload_dir();\n\n\t\t\t\t// get path for image by converting URL, unless its already been set, thanks to using media library approach\n\t\t\t\tif ( ! isset( $avatar_full_path ) )\n\t\t\t\t\t$avatar_full_path = str_replace( $upload_path['baseurl'], $upload_path['basedir'], $local_avatars['full'] );\n\n\t\t\t\t// generate the new size\n\t\t\t\t$editor = wp_get_image_editor( $avatar_full_path );\n\t\t\t\tif ( ! is_wp_error( $editor ) ) {\n\t\t\t\t\t$resized = $editor->resize( $size, $size, true );\n\t\t\t\t\tif ( ! is_wp_error( $resized ) ) {\n\t\t\t\t\t\t$dest_file = $editor->generate_filename();\n\t\t\t\t\t\t$saved = $editor->save( $dest_file );\n\t\t\t\t\t\tif ( ! is_wp_error( $saved ) )\n\t\t\t\t\t\t\t$local_avatars[$size] = str_replace( $upload_path['basedir'], $upload_path['baseurl'], $dest_file );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// save updated avatar sizes\n\t\t\t\tupdate_user_meta( $user_id, 'simple_local_avatar', $local_avatars );\n\n\t\t\tendif;\n\t\t}\n\n\t\tif ( 'http' != substr( $local_avatars[$size], 0, 4 ) )\n\t\t\t$local_avatars[$size] = home_url( $local_avatars[$size] );\n\t\t\n\t\t$author_class = is_author( $user_id ) ? ' current-author' : '' ;\n\t\t$avatar = \"<img alt='\" . esc_attr( $alt ) . \"' src='\" . esc_url( $local_avatars[$size] ) . \"' class='avatar avatar-{$size}{$author_class} photo' height='{$size}' width='{$size}' />\";\n\t\t\n\t\treturn apply_filters( 'simple_local_avatar', $avatar );\n\t}", "title": "" }, { "docid": "ddf07354e6758c8cbe8353502f1ba19d", "score": "0.65541905", "text": "function get_dashboard_profile_pic($uid = NULL) {\r\n $CI=&get_instance();\r\n $CI->load->model('user_model');\r\n \r\n $ret_=\"\";\r\n \r\n /**\r\n * Actual user profile to be returned\r\n */\r\n $user_data_obj=$CI->user_model->user_load(intval($uid));\r\n $ret_=$user_data_obj->s_profile_photo;\r\n \r\n \r\n ////if the user is a company owner\r\n if($user_data_obj->i_is_company_owner){\r\n $CI->load->model('user_company_model');\r\n $company_data_obj=$CI->user_company_model->user_company_load(intval($user_data_obj->comp_id));\r\n \r\n if($company_data_obj->i_active)\r\n $ret_=$company_data_obj->s_logo;\r\n }\r\n \r\n return $ret_; \r\n }", "title": "" } ]
59e692c680aff60c9d0377bf4d16e4f4
Find status follow post of user login
[ { "docid": "d70be37b7de4b49c62d95f3de29d33e3", "score": "0.0", "text": "public function findById($userId, $postId)\n {\n return $this->model->where('user_id', $userId)\n ->where('post_id', $postId)->first();\n }", "title": "" } ]
[ { "docid": "1eaf9850eb90b6d4a54b01ed69e80efd", "score": "0.7002955", "text": "public function followPost()\n {\n ignore_user_abort(true);\n $user = wp_get_current_user();\n\n if (empty($_POST['postId']) || !$user) {\n wp_die();\n }\n\n $postId = (int)$_POST['postId'];\n $followers = get_post_meta($postId, 'post_followers', true);\n\n if (is_array($followers)) {\n if (array_key_exists($user->ID, $followers)) {\n $followers[$user->ID] = $followers[$user->ID] ? 0 : 1;\n } else {\n $followers[$user->ID] = 1;\n }\n } else {\n $followers = array($user->ID => 1);\n }\n\n update_post_meta($postId, 'post_followers', $followers);\n\n echo('Done');\n wp_die();\n }", "title": "" }, { "docid": "2974e70ee89e4fec8762bfa8a392a0cb", "score": "0.67885935", "text": "function checkFollowActive()\n {\n $user = JFactory::getUser();\n $id_user = $user->id;\n $id_follow = $_POST['id_user_guest'];\n $db = JFactory::getDbo();\n $SQL = \"SELECT id_user from #__tz_pinboard_active where id_user=$id_user AND target=$id_follow\";\n $db->setQuery($SQL);\n $row = $db->loadObject();\n return $row;\n }", "title": "" }, { "docid": "ceef49bbbe02848269297262f7ce14ab", "score": "0.63992137", "text": "public function post_follow(){\n\t\t$user_id = $this->param('user_id');\n\t\treturn $this->response(array($user_id),200);\n\t}", "title": "" }, { "docid": "23849d3398f308ca88130a24a8d41b32", "score": "0.63855946", "text": "public function followPostType()\n {\n ignore_user_abort(true);\n $user = wp_get_current_user();\n\n if (empty($_POST['postType']) || !$user) {\n wp_die();\n }\n\n $postType = $_POST['postType'];\n $followers = get_option($postType . '_archive_followers');\n\n if (is_array($followers)) {\n if (array_key_exists($user->ID, $followers)) {\n $followers[$user->ID] = $followers[$user->ID] ? 0 : 1;\n } else {\n $followers[$user->ID] = 1;\n }\n } else {\n $followers = array($user->ID => 1);\n }\n\n update_option($postType . '_archive_followers', $followers);\n\n echo('Done');\n wp_die();\n }", "title": "" }, { "docid": "52c6d514302741f29f974e1d3c3aea8d", "score": "0.6264633", "text": "public function getPostFollowStatus($userId,$nodeId,$place_name='')\r\n\t{\r\n\t\tif($userId!='' && $nodeId!='')\r\n\t\t{\r\n\t\t\t$query = \"SELECT bookmarked FROM teeme_bookmark WHERE node_id ='\".$nodeId.\"' AND user_id ='\".$userId.\"'\";\r\n\t\t\r\n\t\t\tif($place_name!='')\r\n\t\t\t{\r\n\t\t\t\t\t$config = array();\r\n\t\t\t\t\t$placedb = '';\r\n\t\t\t\t\t$config['hostname'] = base64_decode($this->config->item('hostname'));\r\n\t\t\t\t\t$config['username'] = base64_decode($this->config->item('username'));\r\n\t\t\t\t\t$config['password'] = base64_decode($this->config->item('password'));\r\n\t\t\t\t\t$config['database'] = $this->config->item('instanceDb').'_'.$place_name;\r\n\t\t\t\t\t$config['dbdriver'] = $this->db->dbdriver;\r\n\t\t\t\t\t$config['dbprefix'] = $this->db->dbprefix;\r\n\t\t\t\t\t$config['pconnect'] = FALSE;\r\n\t\t\t\t\t$config['db_debug'] = $this->db->db_debug;\r\n\t\t\t\t\t$config['cache_on'] = $this->db->cache_on;\r\n\t\t\t\t\t$config['cachedir'] = $this->db->cachedir;\r\n\t\t\t\t\t$config['char_set'] = $this->db->char_set;\r\n\t\t\t\t\t$config['dbcollat'] = $this->db->dbcollat;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$placedb = $this->load->database($config, TRUE);\r\n\t\t\t\t\t$query = $placedb->query($query);\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$query = $this->db->query($query);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($query->num_rows()==1)\r\n\t\t\t{\r\n\t\t\t\tforeach ($query->result() as $row)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t$bookmarkedPostData = $row->bookmarked;\r\n\t\t\t\t}\r\n\t\t\t\treturn $bookmarkedPostData;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0c8bf14af9e0d0a505ceb54e25bf074f", "score": "0.6230627", "text": "public function scopeGetFollowingStatusByPostId($query,$postId) {\n return $query->where('post_id',$postId)->where('activity','follow')\n ->select('status')->get();\n }", "title": "" }, { "docid": "7a5d7e1e85b1d054be05f1c1d9811afb", "score": "0.6122473", "text": "function getFollowUp();", "title": "" }, { "docid": "de5308b82b71c71fbc1a9408c6b71ca3", "score": "0.6011254", "text": "function bp_follow_inject_group_member_follow_status( $has_members ) {\n\tglobal $members_template;\n\n\tif ( empty( $has_members ) )\n\t\treturn $has_members;\n\n\t$user_ids = array();\n\n\tforeach( (array)$members_template->members as $i => $member ) {\n\t\tif ( $member->user_id != bp_loggedin_user_id() )\n\t\t\t$user_ids[] = $member->user_id;\n\n\t\t$members_template->members[$i]->is_following = false;\n\t}\n\n\tif ( empty( $user_ids ) )\n\t\treturn $has_members;\n\n\t$following = BP_Follow::bulk_check_follow_status( $user_ids );\n\n\tif ( empty( $following ) )\n\t\treturn $has_members;\n\n\tforeach( (array)$following as $is_following ) {\n\t\tforeach( (array)$members_template->members as $i => $member ) {\n\t\t\tif ( $is_following->leader_id == $member->user_id )\n\t\t\t\t$members_template->members[$i]->is_following = true;\n\t\t}\n\t}\n\n\treturn $has_members;\n}", "title": "" }, { "docid": "a141f12ad009ace822430ca222102e81", "score": "0.59379095", "text": "public function postFollowButton($post)\n {\n // Bail if user is not logged in or notifications is not activated\n if (!is_user_logged_in() || !\\NotificationCenter\\App::isActivated(get_post_type($post))) {\n return;\n }\n\n $user = wp_get_current_user();\n $followers = get_post_meta($post->ID, 'post_followers', true);\n $isFollowing = (is_array($followers) && in_array($user->ID, array_keys(array_filter($followers)))) ? 1 : 0;\n echo '<li><a href=\"#\" class=\"follow-button ' . ($isFollowing ? 'follow-button--following' : '') . ' \" data-post-id=\"' . $post->ID . '\"><i class=\"pricon ' . ($isFollowing ? 'pricon-star' : 'pricon-star-o') . '\"></i> <span class=\"follow-button__text\">' . ($isFollowing ? __('Unfollow', 'notification-center') : __('Follow', 'notification-center')) . '</span></a></li>';\n }", "title": "" }, { "docid": "35ef5ff01964976145bcd0defa4954a8", "score": "0.58698297", "text": "public function follow($userName);", "title": "" }, { "docid": "cead8c86e3505880b9e57378b3855a08", "score": "0.5865213", "text": "function pwuf_follow_user( $user_id, $user_to_follow ) {\n $following = pwuf_get_following( $user_id );\n \n if ( $following && is_array( $following ) ) {\n $following[] = $user_to_follow;\n } else {\n $following = array();\n $following[] = $user_to_follow;\n }\n\n // retrieve the IDs of all users who are following $user_to_follow\n $followers = pwuf_get_followers( $user_to_follow );\n \n if ( $followers && is_array( $followers ) ) {\n $followers[] = $user_id;\n } else {\n $followers = array();\n $followers[] = $user_id;\n }\n\n do_action( 'pwuf_pre_follow_user', $user_id, $user_to_follow );\n\n // update the IDs that this user is following\n $followed = update_user_meta( $user_id, '_pwuf_following', $following );\n\n // update the IDs that follow $user_id\n $followers = update_user_meta( $user_to_follow, '_pwuf_followers', $followers );\n\n // increase the followers count\n $followed_count = pwuf_increase_followed_by_count( $user_to_follow ) ;\n\n if ( $followed ) {\n \n do_action( 'pwuf_post_follow_user', $user_id, $user_to_follow );\n\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "b0e8c4deef0d015f6a77ed8170499d87", "score": "0.5841134", "text": "public function follow()\n {\n return $this->load_view('follow', array(\n 'module' => $this->module,\n 'entry_hash' => $this->encode_entry(),\n 'trend' => ci()->session->flashdata('trend'),\n 'is_following' => $this->count(self::TREND_FOLLOW, ci()->current_user->id)\n ));\n }", "title": "" }, { "docid": "b51d0bccdf5f221e3d9012db5a41693d", "score": "0.5806357", "text": "public function testUserFollow()\n {\n $this->becomeUser('User2');\n\n $post1 = new Post;\n $post1->message = \"Private Post\";\n $post1->content->setContainer(Yii::app()->user->getModel());\n $post1->content->visibility = Content::VISIBILITY_PRIVATE;\n $post1->save();\n $w1 = $post1->content->getFirstWallEntryId();\n\n $post2 = new Post;\n $post2->message = \"Public Post\";\n $post2->content->setContainer(Yii::app()->user->getModel());\n $post2->content->visibility = Content::VISIBILITY_PUBLIC;\n $post2->save();\n $w2 = $post2->content->getFirstWallEntryId();\n\n $this->becomeUser('User1');\n $ids = $this->getStreamActionIds(2);\n\n $this->assertFalse(in_array($w1, $ids));\n $this->assertTrue(in_array($w2, $ids));\n }", "title": "" }, { "docid": "4e7cf386c84de071393ae3611c66e634", "score": "0.57791126", "text": "function follow(){\n $uid = $this->input->post('user_id');\n $target_uid = $this->input->post('target_uid');\n $follow = $this->input->post('follow');\n\n $follow_data = array('uid' => $uid, 'target_uid' => $target_uid );\n $follow_count = $this->photo->select_count_where('user_follows', $follow_data);\n if(( $follow == 1) && ( $follow_count == 0 )){\n $follow_data['created'] = time();\n $result = $this->photo->insert('user_follows', $follow_data);\n }else{\n $result = $this->photo->delete('user_follows', $follow_data);\n } \n $follow_count = $this->photo->select_count_where('user_follows', array('target_uid' => $target_uid));\n echo json_encode(array('code'=>0, 'msg'=>'操作成功', 'is_follow' => $follow, 'target_uid' => $target_uid, 'follow_count' => $follow_count ));exit; \n }", "title": "" }, { "docid": "6efe4cc4607de1c018293a62ef0c8f19", "score": "0.5762482", "text": "public function getFollow()\n {\n return $this->follow;\n }", "title": "" }, { "docid": "3c032b1e89b632814d558fef1bd1c5b9", "score": "0.57313025", "text": "function checkFollow($id_guest)\n {\n $user = JFactory::getUser();\n $id_user = $user->id;\n $db = JFactory::getDbo();\n $sql = \"select folowing as f from #__tz_pinboard_follow where id_user=$id_user AND id_guest=$id_guest \";\n $db->setQuery($sql);\n $row = $db->loadAssoc();\n return $row;\n }", "title": "" }, { "docid": "fd4df457f7282094a5ca80d12913102d", "score": "0.57304746", "text": "function ncn_chatter_get_user_follow_fid($uid) {\n $data = array();\n if ($user_feed = ncn_chatter_get_feed_by_entity(FEED_TYPE_USER, $uid)) {\n // Include User Profile Feed\n $data[$user_feed['fid']] = $user_feed['fid'];\n }\n\n // Following Feed\n $result = db_select('chatter_follow_feed', 'ff')\n ->fields('ff')\n ->condition('uid', $uid)\n ->execute();\n while ($record = $result->fetchAssoc()) {\n $data[$record['fid']] = $record['fid'];\n }\n\n return $data;\n}", "title": "" }, { "docid": "675165ac23be2ca9252eb5800118aa59", "score": "0.5692757", "text": "function myfollow($myid)\n\t{\n\t\t$data['nav']= 'works';\n \t$data['feature']= 'following';\n\n\t\t$this->load->model('user_model');\n\t $data['user_list'] = $this->user_model->find_users(array('rand'=>1), 5, 0);\n \n\t \t$user = $this->user_model->load($myid);\n\t \t\n\t \t$data['user']= $user;\n\t \t\n $this->load->model('user_status_model'); \n\t\t$res= $this->user_status_model->find_status_by_myfollow($myid);\n $this->load->library('pagination');//加载分页类\n $config['base_url'] = base_url().'item/myfollow/'.$myid;//设置分页的url路径\n $config['total_rows'] = count($res);//得到数据库中的记录的总条数\n $config['uri_segment'] = 4;\n $config['per_page'] = '20';//每页记录数\n $config['first_link'] = 'First';\n $config['last_link'] = 'Last';\n $config['full_tag_open'] = '<p>';\n \t $config['full_tag_close'] = '</p>'; \n $this->pagination->initialize($config);//分页的初始化\n $data['status_list']= $this->user_status_model->find_status_by_myfollow_offset($myid,$config['per_page'],$this->uri->segment(4));//得到数据库记录\n \n\t\t//$this->load->model('user_status_model');\n\t\t//$data['status_list'] = $this->user_status_model->find_status_by_myfollow($myid);\n\t\t$this->load->view('user/user_status',$data);\n\t}", "title": "" }, { "docid": "3fbbe63757d9f1a61bfabb1b23bba384", "score": "0.5675286", "text": "public function followUser( $user ){\n return $this->oauth->follow( $user->blogUrl );\n }", "title": "" }, { "docid": "44ecc6afbdae9c05a0ddefb360f617a9", "score": "0.56717706", "text": "public function followuser_post()\n {\n //On valide le formaulaire\n $this->form_validation->set_rules('user_token', 'user_token', 'trim|required|min_length[1]');\n $this->form_validation->set_rules('user_id', 'user_id', 'trim|required|min_length[1]');\n $this->form_validation->set_rules('user_followed_id', 'user_followed_id', 'trim|required|min_length[1]');\n\n if ($this->form_validation->run() == FALSE) // S'il y a des choses incorrectes\n {\n $response = [\n 'message' => validation_errors('<span class=\"error\">', '</span>'); //On en prépare le message d'erreur qui stocke tous les champs avec erreurs\n ];\n }\n else{\n\n $user_token = $this->post['user_token'];\n $user_id = $this->post['user_id'];\n $user_followed_id = $this->post['user_followed_id'];\n\n\n if($user_token){\n\n $returned = $this->User->FollowUser($user_token,$user_id,$user_followed_id);\n\n if($returned==true){\n\n $response = [\n 'message' => 'ok';\n ];\n\n }else{\n $response = [\n 'message' => 'fail';\n ];\n }\n\n }\n }\n\n $this->set_response($response, REST_Controller::HTTP_CREATED);\n }", "title": "" }, { "docid": "cc1dfaea7bde14e9cb1304084aceb7c5", "score": "0.5668991", "text": "function pwuf_get_follower_count( $user_id ) {\n if ( empty( $user_id ) ) {\n $user_id = get_current_user_id();\n }\n\n $followed_count = get_user_meta( $user_id, '_pwuf_followed_by_count', true );\n\n $count = 0;\n\n if ( $followed_count ) {\n $count = $followed_count;\n }\n\n return (int) apply_filters( 'pwuf_get_follower_count', $count, $user_id );\n}", "title": "" }, { "docid": "8cad3b04938a112b750de973d715aab2", "score": "0.56570214", "text": "public function loadUserFollowsPosts($base)\n {\n $this->theUserFollows= array();\n $follows_exist=$this->loadUserFollows($base);\n $follows_posts_exist=false;\n if($follows_exist)\n {\n foreach ($this->theUserFollows as $follow)\n {\n $follow_posts_exist=$follow->getFollow_followed()->loadUserPosts($base);\n if($follow_posts_exist)\n {\n foreach ($follow->getFollow_followed()->getUserPosts() as $post)\n { \n $this->theUserFollowsPosts[]=$post;\n }\n }\n }\n if(!empty($this->theUserFollowsPosts))\n {\n $follows_posts_exist=true;\n }\n }\n return($follows_posts_exist);\n }", "title": "" }, { "docid": "d4820b9ff9ad5c38dd3452338fdf50e0", "score": "0.5640095", "text": "function pwuf_is_following( $user_id, $followed_user ) {\n $following = pwuf_get_following( $user_id );\n \n $ret = false; // is not following by default\n\n if ( is_array( $following ) && in_array( $followed_user, $following ) ) {\n $ret = true; // is following\n }\n\n return (bool) apply_filters( 'pwuf_is_following', $user_id, $followed_user );\n}", "title": "" }, { "docid": "1395b5bd38c9b6477c90758df453e4dc", "score": "0.5625128", "text": "public function followUser($data){\n\t \t if(count($this->db->where($data)->get('follow_user')->result())==0){\n\t \t \tif($this->db->insert('follow_user',$data)){\n\t \t \t\treturn 1;\n\t \t \t}else{\n\t \t \t\treturn 0;\n\t \t \t}\n\t \t }else{\n\t \t \treturn 2;\n\t \t }\n\n\t }", "title": "" }, { "docid": "fbbca917dbcbecab8362edca2d913762", "score": "0.56117153", "text": "public function show(postUserFollow $postUserFollow)\n {\n //\n }", "title": "" }, { "docid": "83ea553a44619e3b84d6dd5cd9ed2be2", "score": "0.5583533", "text": "public function posts($id){\n\t\t\tglobal $pdo;\n\t\t\t$query = $pdo->prepare(\"SELECT * FROM `posts`,`users`,`following` WHERE `user_name` = `user_id_p` and `users`.user_id=`following`.`follower_id` And `following`.user_id = $id ORDER BY `status_time` DESC limit 5\");\n\t\t\t$query->execute();\n\t\t\treturn $query->fetchAll();\n\t\t}", "title": "" }, { "docid": "6fada600c9b0d0c65a807c554313f225", "score": "0.5575159", "text": "public function followCheck($id) {\n\n return DB::table('user_friends')\n ->where('friend_user_id', $id)\n ->where('follower_user_id', Auth::user()->id)\n ->first();\n }", "title": "" }, { "docid": "52ff3a9513915b79fefa1f057f62d433", "score": "0.55738384", "text": "public function getFollows()\n\t{\n\t\t$id = $this->f3->get('PARAMS.id');\n\t\t$this->setData($this->User->getFollows($id, false));\n\t}", "title": "" }, { "docid": "16e5db9611e65fa1390f1962cbfa51ba", "score": "0.55700475", "text": "public function checkFollow($user)\n {\n $conn = Db::getInstance();\n $statement2 = $conn->prepare(\"SELECT * FROM follows WHERE follower = :usersession AND user = :user_ID\");\n $statement2->bindValue(\":usersession\", $_SESSION['userid']);\n $statement2->bindValue(\":user_ID\", $user);\n $statement2->execute();\n $res2 = $statement2->fetchAll(\\PDO::FETCH_ASSOC);\n $rows = count($res2);\n if ($rows > 0) {\n $this->Follow = true;\n } else {\n $this->Follow = false;\n }\n }", "title": "" }, { "docid": "1878f1972d0f72eafecef2df4c2b5bc6", "score": "0.55546474", "text": "public function scopeLikeStatusByUserId($query, $post_id,$userId) {\n \t$res = $query\n\t\t\t\t->where('post_id',$post_id)\n\t\t\t\t->where('liked_id',$userId)->where('activity','liked')\n\t\t\t\t->select('status')\n\t\t\t\t->first();\t\t\n\t\treturn $res;\n }", "title": "" }, { "docid": "81f2fb205da4e7d4732623a10ac8b287", "score": "0.55435747", "text": "function mastodon_follow_if_not_already($account, $options = array()) {\n\tstatic $followings = null;\n\n\t// si pas d'api utilisable on sort\n\tif (!$user = mastodon_oauth_user_token(isset($options['mastodon_account']) ? $options['mastodon_account'] : null)\n\t or !$app = mastodon_oauth_load_registered_app(reset($user)))\n\t\treturn false;\n\n\tif (is_null($followings)) {\n\t\t$followings = $app->getFollowing();\n\t}\n\n\t// [email protected] -> //mamot.fr/@truc\n\tlist($username, $instance, $url) = mastodon_account2url($account);\n\n\t// est-ce que le compte est deja dans les followings ?\n\tforeach ($followings as $following) {\n\t\tif ($following['username'] === $username\n\t\t\tand strpos($following['url'], $url) !== false) {\n\t\t\treturn $following;\n\t\t}\n\t}\n\t\n\t// sinon l'ajouter\n\t$params = array('uri' => $account);\n\t$res = $app->callApi('follows', 'post', $params);\n\tspip_log(\"mastodon_follow_if_not_already : follow $account\", 'mastodon');\n\tif ($res['http_code'] !== 200\n\t or !isset($res['content'])\n\t\tor !isset($res['content']['id'])) {\n\t\tspip_log(\"mastodon_follow_if_not_already $account : \".var_export($res, true),'mastodon'._LOG_ERREUR);\n\t\treturn false;\n\t}\n\t$following = $res['content'];\n\t$followings[] = $following;\n\n\treturn $following;\n}", "title": "" }, { "docid": "fcb6addab85f158860d384db727ed796", "score": "0.5521306", "text": "public function loadUserFollows($base)\n {\n $query=\"Select * from follow where follow_following_number=\".$this->user_number;\n $data=$base->fetch_all_array($query);\n $follows_exist=false;\n if(!empty($data))\n {\n $follows_exist=true;\n foreach($data as $row)\n {\n $number=$row['follow_followed_number'];\n $user=new User();\n $user->setUser_number($number);\n $user->loadUser($base);\n $date=$row['follow_date'];\n $follow=new Follow();\n $follow->setAll($this, $user, $date);\n $this->theUserFollows[]=$follow;\n }\n }\n return($follows_exist);\n }", "title": "" }, { "docid": "a6e397ff26a2979013403eb5a0fbe453", "score": "0.551407", "text": "function followAUser()\n\t{\n\t\t$followedByUserId = $this->input->post('userId');\n\t\t$currentLoggedUserId = $this->session->userdata('userId');\n\t\t$followingsUserIdList = $this->friendsManager->getFollowings($currentLoggedUserId);\n\t\t$checkIfAlreadyFollowed = in_array($followedByUserId, $followingsUserIdList);\n\n\t\tif (empty($checkIfAlreadyFollowed)) {\n\t\t\t$this->friendsManager->addConnection($currentLoggedUserId, $followedByUserId);\n\t\t} else {\n\t\t\t$this->friendsManager->unFollowAUser($followedByUserId, $currentLoggedUserId);\n\t\t}\n\t\tredirect('followings');\n\t}", "title": "" }, { "docid": "1022358b13105019f52f5d0004ddf9cf", "score": "0.5499533", "text": "function getStatus(){\r\n $user = $this->loadUser(Yii::app()->user->id);\r\n return $user->status;\r\n }", "title": "" }, { "docid": "935c894cfec8f085e0a6fc28041324a5", "score": "0.5499292", "text": "public function get_following(){\n\t\t$returnData = array(\n\t\t\t\t'following'=>array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'user_id'=>1,\n\t\t\t\t\t\t\t\t'name'=>'thomas',\n\t\t\t\t\t\t\t\t'profile'=>'',\n\t\t\t\t\t\t\t\t'pic'=>''\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'user_id'=>2,\n\t\t\t\t\t\t\t\t'name'=>'master',\n\t\t\t\t\t\t\t\t'profile'=>'',\n\t\t\t\t\t\t\t\t'pic'=>''\n\t\t\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\treturn $this->response($returnData,200);\n\t}", "title": "" }, { "docid": "c73153d5e7fdd8ad57ebf6605004456e", "score": "0.54908216", "text": "function get_user_following($userID){\n\t\t$query = \"SELECT users.id, users.firstname, users.lastname, users.email, users.photo, users.coverphoto, users.facebookid FROM guest LEFT JOIN users ON guest.mainhostid = users.id WHERE guest.guestid = \".$userID.\" GROUP BY users.id\";\n\t\t$result = $this->db->query($query);\n\t\tif($result && $result->num_rows() > 0){\n\t\t\treturn $result->result();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "fa4189624a02c37b3ef87e282baf3aac", "score": "0.5488023", "text": "function GetFollowed()\n{\n\t$id = $_SESSION['k_UserId'];\n\t$j = 0;\n\t$aListppl[]='';\n\t$error = '';\n\t$szFollower = \"SELECT * FROM relations WHERE IdFollower = $id\";\n\t$qFollower =mysql_query($szFollower)or $error=DebugQueries('qFollower',$szFollower,'GetFollowed');\n\tif($error == ''){\n\t\twhile ($User = mysql_fetch_array($qFollower))\n\t\t{\n\t\t\tif(!in_array($User['IdFollowed'],$aListppl)){\n\t\t\t$aListppl[$j] = $User['IdFollowed'];\n\t\t\t$j++;\n\t\t\t}\n\t\t}\n\t}\n\telse{\n\t\techo $error;\n\t}\t\t\n\treturn $j;\n}", "title": "" }, { "docid": "11d5ab809d5f215d4eafa4657b28553b", "score": "0.54787695", "text": "function follow($leader_id, $follower_id = -1)\n{\n\tglobal $userdata;\n\t\n\tif ($follower_id == -1)\n\t{\n\t\t$follower_id = $userdata['id'];\n\t}\n\t\n\tif ($leader_id == $follower_id)\n\t{\n\t\treturn false;\n\t}\n\t\n\t// check if relationship has already been created \n\tif (is_follow_relationship($leader_id, $follower_id))\n\t{\n\t\treturn false;\n\t}\n\t\n\t$sql = \"INSERT INTO pm_users_follow \n\t\t\t\t\t(user_id, follower_id, date) \n\t\t\tVALUES ('\". $leader_id .\"', '\". $follower_id .\"', '\". time() .\"')\";\n\tif ( ! mysql_query($sql))\n\t{\n\t\treturn false;\n\t}\n\t\n\t// update respective counts for leader and follower \n\t$sql = \"UPDATE pm_users \n\t\t\tSET following_count = following_count + 1 \n\t\t\tWHERE id = '\". $follower_id .\"'\";\n\tmysql_query($sql);\n\t\n\t$sql = \"UPDATE pm_users \n\t\t\tSET followers_count = followers_count + 1 \n\t\t\tWHERE id = '\". $leader_id .\"'\";\n\tmysql_query($sql);\n\t\n\t$activity_id = get_activity_id(array('user_id' => $follower_id, \n\t\t\t\t\t\t\t\t\t\t 'activity_type' => ACT_TYPE_FOLLOW, \n\t\t\t\t\t\t\t\t\t\t 'object_id' => $leader_id, \n\t\t\t\t\t\t\t\t\t\t 'object_type' => ACT_OBJ_USER\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t );\n\t\n\t\n\tif ($activity_id)\n\t{\n\t\tdelete_activity($activity_id);\n\t}\n\t\n\t// notify leader one time only\n\tif ( ! $activity_id)\n\t{\n\t\tfollow_notify_user($leader_id, $follower_id);\n\t}\n\t\n\t// log activity\n\tlog_activity(array(\n\t\t\t\t\t'user_id' => $follower_id,\n\t\t\t\t\t'activity_type' => ACT_TYPE_FOLLOW,\n\t\t\t\t\t'object_id' => $leader_id,\n\t\t\t\t\t'object_type' => ACT_OBJ_USER,\n\t\t\t\t\t'object_data' => fetch_user_advanced($leader_id)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\n\treturn true;\n}", "title": "" }, { "docid": "d346cc341bdd1eff0197792af8cc06eb", "score": "0.5458462", "text": "public function follow(Request $request)\n {\n //\n if(empty($request->token)) return response()->json(['status'=>false,'message'=>'Authorization token is required.']);\n if(empty($request->user_id)) return response()->json(['status'=>false,'message'=>'User is required.']);\n\n\n $user = User::where('id',$request->user_id)\n ->where('role',1)\n ->where('status',1)\n ->where('is_deleted',0)\n ->where('auth_token',$request->token)\n ->first();\n \n if(empty($user)) return response()->json(['status'=>false,'message'=>'Unauthorize user.']);\n\n if(empty($request->vendor_id)) return response()->json([\n 'status'=>false,\n 'message'=>'Vendor id is required.'\n ]);\n \n $followcheck =Follow::where('user_id',$request->vendor_id)\n ->where('follower_id',$user->id)\n ->first();\n if(!empty($followcheck)){\n $followcheck->delete();\n\n $data['status'] = true;\n $data['message'] = \"Unfollowed successfully.\";\n\n }else{\n $follow = new Follow;\n $follow->user_id = $request->vendor_id;\n $follow->follower_id = $user->id; \n $follow->save();\n\n $data['status'] = true;\n $data['message'] = \"Followed successfully..\";\n\n }\n\n return response()->json($data);\n \n\n\n\n }", "title": "" }, { "docid": "854e5c132fb03b0232795aef7fb24679", "score": "0.5442012", "text": "public function checkFollowing($following_id){\n if($following_id != null){\n $following = User::find($following_id);\n $user_id = Auth::user()->id;\n if($following->followers->contains($user_id)){\n return 1;\n }\n else{\n return 0;\n }\n } \n }", "title": "" }, { "docid": "2a45ddd10197774f83e28b34cab90cf4", "score": "0.54413384", "text": "public function loadUserFollowers($base)\n {\n $query=\"Select * from follow where follow_followed_number=\".$this->user_number;\n $data=$base->fetch_all_array($query);\n $followers_exist=false;\n if(!empty($data))\n {\n $followers_exist=true;\n foreach($data as $row)\n {\n $number=$row['follow_following_number'];\n $user=new User();\n $user->setUser_number($number);\n $user->loadUser($base);\n $date=$row['follow_date'];\n $follow=new Follow();\n $follow->setAll($user, $this, $date);\n $this->theUserFollowers[]=$follow;\n }\n }\n return($followers_exist);\n }", "title": "" }, { "docid": "408bc8a5c18adeaed9c4866437dde9b3", "score": "0.5416281", "text": "public function isReactedByUser(Post $post)\n {\n return response()\n ->json(['liked' => $post->isReactedByUser(auth()->user())], 200);\n }", "title": "" }, { "docid": "a8b7cac93a116f9dc1f46fb9328e80f8", "score": "0.5412222", "text": "function get_followed_notifications($uid) {\n\t$db = \\Db::dbc();\n\t$sql = \"SELECT IDUSER, IDUSER_1, DATE_SUIVI, DATE_LU FROM SUIVRE WHERE IDUSER_1 = :uid\";\n\t$sth = $db->prepare($sql);\n\t$sth->execute(array(\n\t':uid' => $uid\n\t)\n\t);\n\t$followednotifs = array();\n\t$result = $sth->fetchAll();\n\tforeach($result as $line){\n\t\tif($line[3]==null){\n\t\t\t$followednotifs[] = (object) array(\n\t\t\t\t\t\t\"type\" => \"followed\",\n\t\t\t\t\t\t\"user\" => \\Model\\User\\get($line[0]),\n\t\t\t\t\t\t\"date\" => new \\DateTime($line[2]),\n\t\t\t\t\t\t\"reading_date\" => null\n\t \t\t\t\t);\n\t\t}\n\t\telse{\n\t\t\t$followednotifs[] = (object) array(\n\t\t\t\t\t\t\"type\" => \"followed\",\n\t\t\t\t\t\t\"user\" => \\Model\\User\\get($line[0]),\n\t\t\t\t\t\t\"date\" => new \\DateTime($line[2]),\n\t\t\t\t\t\t\"reading_date\" => new \\DateTime($line[3]),\n\t \t\t\t\t);\n\t\t}\n\t}\n\treturn $followednotifs; \n}", "title": "" }, { "docid": "5bda876f34b70adb44bdd4385e1ecb35", "score": "0.54112756", "text": "function checkfollow($user){\r\n $conexion = Conexion::singleton_conexion();\r\n\r\n\t$SQL = \"SELECT * FROM users WHERE iduser = :iduser\";\r\n\t$sentence = $conexion -> prepare($SQL);\r\n\t$sentence -> bindParam(':iduser',$user);\r\n\t$sentence -> execute();\r\n\t$results = $sentence -> fetchAll();\r\n\tforeach ($results as $key){\r\n\t\t\r\n return $key['name'];\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "ea3d0fa0a8cb89abada0ccbae56070e2", "score": "0.54098004", "text": "public function checkIfFollowed(Request $request)\n {\n $addFollower = DB::table('followers')->where(['who'=> $request->who, 'uid'=>$request->uid])->first();\n }", "title": "" }, { "docid": "49994bed01ee684ed74cc4a9e16823d3", "score": "0.5399269", "text": "public function get_user_followed($id) {\n global $Db;\n\n if (isset($_SESSION['user_id'])) {\n $params = array(\n \":user_id\" => $_SESSION['user_id'],\n \":followed_user_id\" => $id \n );\n $followed = $Db->run(\"SELECT id FROM user_follow WHERE user_id = :user_id AND followed_user_id = :followed_user_id LIMIT 1\", $params)->fetchColumn();\n \n return $followed;\n }\n }", "title": "" }, { "docid": "944c35c2e47fa91c75a4bacce3815243", "score": "0.53881407", "text": "function getFollowers($current){\n $sql = <<<EOD\n select\n users.login as \"userId\", users.pseudo,\n exists(select * from rezozio.subscriptions \n where target = users.login and follower = :current) as mutual\n from rezozio.users\n where \n users.login in \n (select follower from rezozio.subscriptions where target = :current)\nEOD;\n $stmt = $this->connexion->prepare($sql);\n $stmt->bindValue(':current', $current);\n $stmt->execute();\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "07f6281c72b798c42188ee3eb654d433", "score": "0.5371015", "text": "public function follow()\n\t{\n\t\t/* BENCHMARK */ $this->benchmark->mark('func_follow_start');\n\n\t\t// add to follows and followed_by\n\t\t\t$this->connection_save_model->update($this->user,$this->node,'F',2,$this->add);\n\n\t\t// return unfollow button as the opposite of this\n\t\t\t$new_button=$this->connection_button_model->connection_button('unfollow',$this->user,$this->node);\n\n\t\t/* BENCHMARK */ $this->benchmark->mark('func_follow_end');\n\n\t\texit(json_encode($new_button));\n\t}", "title": "" }, { "docid": "815f73bb7280e9105d11dcccd890e24d", "score": "0.5366133", "text": "function pwuf_get_following_count( $user_id ) {\n if ( empty( $user_id ) ) {\n $user_id = get_current_user_id();\n }\n\n $following = pwuf_get_following( $user_id );\n\n $count = 0;\n\n if ( $following ) {\n $count = count( $following ) - 1;\n }\n\n return (int) apply_filters( 'pwuf_get_following_count', $count, $user_id );\n}", "title": "" }, { "docid": "d307c119bb757b6bdf3a5e7b5009c187", "score": "0.5362977", "text": "public function hasFollow(){\n return $this->_has(13);\n }", "title": "" }, { "docid": "675a33843ef3670bf68f4d63e52d0855", "score": "0.53597397", "text": "function getMemberFollowers()\n{\n\t$member_default_cover\t\t='assets/img/members/member-default.jpg';\n $member_default_avatar\t\t='assets/img/members/member-default.jpg';\n\n\t$userName=validate_input($_GET['user']);\n\t$clientid=getUserIdfromUserName($userName);\t\n\t\n\t$session_values=get_user_session();\n\t$my_session_id\t= $session_values['id'];\n\t\n\t$data= array();\t\n\t\n\t$data\t\t\t\t\t\t\t\t\t= fetch_user_information_from_id($clientid);\n\tif($my_session_id)\n\t{\n\t\t$data['followed']\t\t\t\t= doIFollowThisUser($my_session_id,$clientid);\n\t}\n\t\n\t$data['followersObjects']\t\t= getThisUserfollowerObjects($clientid);\n\t\n\treturn $data;\n\n}", "title": "" }, { "docid": "e3fa0dc23e45cd49124344a66523c349", "score": "0.5338016", "text": "public function show($id)\n {\n $user = User::findOrFail($id);\n $follows = (auth()->user()) ? auth()->user()->following->contains($user->profile) : false;\n $tweets = \\App\\Tweet::whereIn('user_id',$user)->latest()->paginate(2);\n\n\n $noti=$user->notify(new NewFollower (Auth::user()));\n // dd($noti);\n\n // if($exist){\n // $delete =$user->notify(new NewFollower (Auth::user()))->delete();\n // }\n // if($delete)\n // return back();\n\n\n return view('profile',[\n 'tweets'=>$tweets,\n 'user'=>$user,\n 'follows' => $follows\n ]);\n\n\n }", "title": "" }, { "docid": "9721094148fe3abd83f5a8985b09941b", "score": "0.53330857", "text": "function getMemberFollowing()\n{\n\t$member_default_cover\t\t='assets/img/members/member-default.jpg';\n $member_default_avatar\t\t='assets/img/members/member-default.jpg';\n\n\t$userName=validate_input($_GET['user']);\n\t$clientid=getUserIdfromUserName($userName);\t\n\t\n\t$session_values=get_user_session();\n\t$my_session_id\t= $session_values['id'];\n\t\n\t$data= array();\t\n\t\n\t$data\t\t\t\t\t\t\t\t\t= fetch_user_information_from_id($clientid);\n\tif($my_session_id)\n\t{\n\t\t$data['followed']\t\t\t\t= doIFollowThisUser($my_session_id,$clientid);\n\t}\n\t\n\t$data['followingObjects']\t\t= getThisUserfollowingObjects($clientid);\n\t\n\treturn $data;\t\t\n\n\t\t/*\n\t\tdata = {\n\t\t\t\"id\": 1,\n\t\t\t\"userName\": \"jordan\",\n\t\t\t\"avatar\": \"member01.jpg\",\n\t\t\t\"coverPhoto\": \"memberCover01.jpg\",\n\t\t\t\"firstName\": \"Jordan\",\n\t\t\t\"lastName\": \"Rains\",\n\t\t\t\"position\": \"Office Assistant\",\n\t\t\t\"company\": [\n\t\t\t\t{\n\t\t\t\t\t\"companyName\": \"Pet Studio.com\",\n\t\t\t\t\t\"companyDesc\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n\t\t\t\t}\n\t\t\t],\n\t\t\t\"followed\": true,\n\t\t\t\"followers\": \"1\",\n\t\t\t\"following\": \"1\",\n\t\t\t\"followingObjects\": [\n\t\t\t\t{\n\t\t\t\t\t\"id\": 1,\n\t\t\t\t\t\"username\": \"jordan\",\n\t\t\t\t\t\"avatar\": \"member01.jpg\",\n\t\t\t\t\t\"coverPhoto\": \"memberCover01.jpg\",\n\t\t\t\t\t\"firstName\": \"Jordan\",\n\t\t\t\t\t\"lastName\": \"Rains\",\n\t\t\t\t\t\"position\": \"Office Assistant\",\n\t\t\t\t\t\"company\": [{\n\t\t\t\t\t\t\"companyName\": \"Pet Studio.com\",\n\t\t\t\t\t\t\"companyDesc\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\"\n\t\t\t\t\t}]\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t */\n\n}", "title": "" }, { "docid": "bbbfe171e9909f372c3c9457118b3dc5", "score": "0.53258663", "text": "function pwuf_increase_followed_by_count( $user_id ) {\n do_action( 'pwuf_pre_increase_followed_count', $user_id );\n\n $followed_count = pwuf_get_follower_count( $user_id );\n \n if ( $followed_count !== false ) {\n \n $new_followed_count = update_user_meta( $user_id, '_pwuf_followed_by_count', $followed_count + 1 );\n \n } else {\n \n $new_followed_count = update_user_meta( $user_id, '_pwuf_followed_by_count', 1 );\n \n }\n\n do_action( 'pwuf_post_increase_followed_count', $user_id );\n\n return $new_followed_count;\n}", "title": "" }, { "docid": "11ccea7887936a7b81808f96d3198ff0", "score": "0.5324908", "text": "public function getFollowerDetails($follow_user_id=null){\n\t\t$this->recursive = -1;\n\t\t$user_details = $this->find('first',array('conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'User.id'=>$follow_user_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('id','username','slug',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'created','status','email',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'totalSources','totalProducts','totalInspirations',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'totalCollections','totalUfos',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'totalPosts','totalTopics','totalProductLikes',\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'totalProductDislikes','totalUsersFollowing'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\treturn $user_details;\n\t}", "title": "" }, { "docid": "d934e386f13bd1354da6a649a666b60c", "score": "0.5314371", "text": "public static function getFollowup($listId){\n\t\t$db = JFactory::getDBO();\n\t\t$query = 'SELECT `follow_up` FROM `#__jnews_lists` WHERE `id`='.$listId.' LIMIT 1';\n\t\t$db->setQuery( $query );\n\t\t$followup = $db->loadResult();\n\t\treturn $followup;\n\t}", "title": "" }, { "docid": "d559217afcea48d3fe66af3f4cd042df", "score": "0.5313817", "text": "function inserFollow()\n {\n JRequest::checkToken() or jexit('Invalid Token');\n if (!isset($_SERVER['HTTP_REFERER'])) return null;\n $refer = $_SERVER['HTTP_REFERER'];\n $url_arr = parse_url($refer);\n if ( isset($url_arr['port']) && $url_arr['port'] != '80') {\n $check = $url_arr['host'] . \":\" . $url_arr['port'];\n } else {\n $check = $url_arr['host'];\n }\n if ($_SERVER['HTTP_HOST'] != $check) return null;\n $user = JFactory::getUser();\n $id_user = $user->id;\n $id_user_guest = $_POST['id_user_guest'];\n $db = JFactory::getDbo();\n\n if (isset($id_user) && !empty($id_user)) {\n $checklik = $this->checkFoolow();\n if (isset($checklik) AND !empty($checklik)) {\n $sql = \"update #__tz_pinboard_follow set folowing ='1' where id_user =$id_user AND id_guest =$id_user_guest\";\n } else if ($checklik == \"\") {\n $sql = \"INSERT INTO #__tz_pinboard_follow VALUES(NULL,'1','\" . $id_user . \"','\" . $id_user_guest . \"') \";\n }\n $this->InsertFollowActive();\n $db->setQuery($sql);\n $db->query();\n } else {\n return 'f';\n }\n }", "title": "" }, { "docid": "c1a84356c909fde7eb0bef6f3c0bbcdd", "score": "0.53092813", "text": "function post_statuses() {\n\t\t\tregister_post_status( 'wanted', array(\n\t\t\t\t'label' => _x( 'Wanted', 'post' ),\n\t\t\t\t'public' => true,\n\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t'show_in_admin_all_list' => true,\n\t\t\t\t'show_in_admin_status_list' => true,\n\t\t\t\t'label_count' => _n_noop( 'Wanted <span class=\"count\">(%s)</span>', 'Wanted <span class=\"count\">(%s)</span>' ),\n\t\t\t) );\n\t\t}", "title": "" }, { "docid": "584d72649f8dd6bac2f4f9ef9d2327a6", "score": "0.5302451", "text": "function pwuf_get_followers( $user_id = 0 ) {\n if ( empty( $user_id ) ) {\n $user_id = get_current_user_id();\n }\n\n $followers = get_user_meta( $user_id, '_pwuf_followers', true );\n \n return (array) apply_filters( 'pwuf_get_followers', $followers, $user_id );\n}", "title": "" }, { "docid": "a8179d0fe3c1c58846f0029376a7f027", "score": "0.52961373", "text": "function isUserFollowed($leader, $follower) {\n\tinclude(\"../include/constant.php\");\n\t$query_user_follow\t= \"SELECT * FROM $TABLE_USER_FOLLOW WHERE leader = '$leader' AND follower = '$follower'\";\n\t$result_user_follow = mysql_query($query_user_follow);\n\n\tif($result_user_follow) {\n\t\tif (mysql_num_rows($result_user_follow) > 0) {\n\t\t\twhile ($row_user_follow = mysql_fetch_array($result_user_follow)) {\n\t\t\t\tif($row_user_follow['status'] == 1) {\n\t\t\t\t\t$user_follow = true;\n\n\t\t\t\t} else {\n\t\t\t\t\t$user_follow = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$user_follow = false;\n\t\t}\n\n\t} else {\n\t\t$user_follow = false;\n\t}\n\n\treturn $user_follow;\n}", "title": "" }, { "docid": "16a1bb0d82dc77217c9a2806a8f2338b", "score": "0.52941805", "text": "function ncn_chatter_follow_feed($uid, $fid) {\n $feed = ncn_chatter_get_feed($fid);\n if ($feed) {\n if (!ncn_chatter_check_user_follow_feed($uid, $fid)) {\n $result = ncn_chatter_insert_follow_feed_record(array(\n 'uid' => $uid,\n 'fid' => $fid\n ));\n }\n } else {\n return \"There isn't feed. Please refresh page.\";\n }\n return true;\n}", "title": "" }, { "docid": "d839d715ccd3ef915eef371b1876a774", "score": "0.5293872", "text": "public function follows(User $user){\n auth()->user()->followings()->attach($user->id);\n return redirect()->back();\n }", "title": "" }, { "docid": "55534a88e5fbe459b7922c15d27d2e9b", "score": "0.5290302", "text": "public function view(User $user, Post $post)\n {\n switch($post->privacy->value) {\n case 'all':\n return true;\n break;\n case 'followers':\n return $user->isFollowingCampaign($post->campaign);\n break;\n case 'supporters':\n return $user->supportAmount($post->campaign) >= $post->pledge->amount;\n break;\n default:\n return false;\n }\n // check for existing of a record in a followings table for value === 'followers'\n }", "title": "" }, { "docid": "f91bb3f26c1113a2dc4455169ef93e26", "score": "0.5287678", "text": "function getFollowingCount($user_id) {\n\tinclude(\"../include/constant.php\");\n\t// Follower count\n\t$query_follow = \"SELECT COUNT(leader) AS follow_count FROM $TABLE_USER_FOLLOW WHERE leader = '$user_id' and status=1\";\n\t$result_follow = mysql_query($query_follow);\n\n\tif($result_follow) {\n\t\tif (mysql_num_rows($result_follow) > 0) {\n\t\t\twhile ($row_follow = mysql_fetch_array($result_follow)) {\n\t\t\t\t$follow\t= $row_follow[\"follow_count\"];\n\t\t\t}\n\n\t\t} else {\n\t\t\t$follow = 0;\n\t\t}\n\n\t} else {\n\t\t$follow = 0;\n\t}\n\n\treturn $follow;\n}", "title": "" }, { "docid": "b4b5d4d0fe8618ced7cbdaab7e49434e", "score": "0.5283687", "text": "public function getFollowers()\n\t{\n\t\t$id = $this->f3->get('PARAMS.id');\n\t\t$this->setData($this->User->getFollows($id));\n\t}", "title": "" }, { "docid": "fd6f437fc97fb00bfccdd30b68f57e6f", "score": "0.52814174", "text": "public function getFollowersByOjectId($object_id=0, $object_instance_id=0,$place_name=''){\r\n\t\tif($object_id>0 && $object_instance_id>0)\r\n\t\t{\r\n\t\t\t$objectFollowDetails\t= array();\t\t\t\r\n\t\t\t$get_object_follow_status = \"SELECT user_id FROM teeme_notification_follow WHERE object_id='\".$object_id.\"' AND object_instance_id='\".$object_instance_id.\"'\";\r\n\t\t\t\r\n\t\t\tif($place_name!='')\r\n\t\t\t{\r\n\t\t\t\t$config = array();\r\n\t\t\t\t$placedb = '';\r\n\t\t\t\t$config['hostname'] = base64_decode($this->config->item('hostname'));\r\n\t\t\t\t$config['username'] = base64_decode($this->config->item('username'));\r\n\t\t\t\t$config['password'] = base64_decode($this->config->item('password'));\r\n\t\t\t\t$config['database'] = $this->config->item('instanceDb').'_'.$place_name;\r\n\t\t\t\t$config['dbdriver'] = $this->db->dbdriver;\r\n\t\t\t\t$config['dbprefix'] = $this->db->dbprefix;\r\n\t\t\t\t$config['pconnect'] = FALSE;\r\n\t\t\t\t$config['db_debug'] = $this->db->db_debug;\r\n\t\t\t\t$config['cache_on'] = $this->db->cache_on;\r\n\t\t\t\t$config['cachedir'] = $this->db->cachedir;\r\n\t\t\t\t$config['char_set'] = $this->db->char_set;\r\n\t\t\t\t$config['dbcollat'] = $this->db->dbcollat;\r\n\t\t\t\t\r\n\t\t\t\t$placedb = $this->load->database($config, TRUE);\r\n\t\t\t\t$get_object_follow_status = $placedb->query($get_object_follow_status);\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$get_object_follow_status = $this->db->query($get_object_follow_status);\r\n\t\t\t}\r\n\t\r\n\t\t\tif($get_object_follow_status->num_rows() > 0)\r\n\t\r\n\t\t\t{\r\n\t\t\t\t$i=0;\r\n\t\r\n\t\t\t\tforeach ($get_object_follow_status->result() as $row)\r\n\t\t\t\t{\r\n\t\r\n\t\t\t\t\t$objectFollowDetails[$i]['userId'] = $row->user_id;\t\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\t\r\n\t\t\t//echo \"<pre>rows\"; print_r($objectFollowDetails);exit;\t\t\t\t\r\n\t\t\treturn $objectFollowDetails;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "206d032f4b93887a5e87825af1d3067b", "score": "0.5275766", "text": "function follow($id, $format = 'xml') {\n\t\t$options = array('id' => $id);\n\t\t$api_call = $this->buildRequest('notifications/follow', $format, $options);\n\t\treturn $this->APICall($api_call, true, true);\n\t}", "title": "" }, { "docid": "344cea916326f3d8cc994ad1554d4dee", "score": "0.5264013", "text": "function get_status($user_id)\n {\n $status =\"\";\n $checkuser = get_user_meta($user_id, 'usersultra_account_status', true);\n\n if ($checkuser == 'pending')\n {\n $status = __(\"Pending\",\"xoousers\");\n\n }elseif($checkuser == 'pending_admin'){\n\n $status =__(\"Pending Admin\",\"xoousers\");\n\n }elseif($checkuser == 'active' || $checkuser == ''){\n\n $status = __(\"Active\",\"xoousers\");\n\n }\n\n\n\n return $status;\n }", "title": "" }, { "docid": "0cef1c506d2721f23f09b971b34b1828", "score": "0.52441835", "text": "public static function getFollowupManager()\n {\n $data = static::find()->where(['role' => UserTypes::FOLLOW_UP_MANAGER, 'status' => User::STATUS_ACTIVE])->all();\n $value = (count($data)==0)? []: \\yii\\helpers\\ArrayHelper::map($data, 'id','followup_head_count'); //id = your ID model, name = your caption\n return $value;\n }", "title": "" }, { "docid": "f2fe89f5a0ae19c4a645a1c0f36905cc", "score": "0.5236156", "text": "public function getFollowing(ConnectableUserInterface $user);", "title": "" }, { "docid": "b206fff304bd4f8c06b0faf3061c60ea", "score": "0.5235126", "text": "public function DoctorFollow(Request $request){\n\n // grab doctor\n $doctor = Doctor::findOrFail($request->doctor_id);\n\n // current user\n $user = Auth::user();\n\n // The current user should be only normal user\n if($user->owner_type != \"App\\NormalUser\"){\n ///// mssage here will add later on some error return\n }\n\n // to check if the user is already following the doctor\n if($user->owner->following()->where(\"doctors.id\",$request->doctor_id)->first()){\n // then remove the doctor from the following list\n $user->owner->following()->detach($doctor);\n // all notifications record for follwing\n $forFollowings = $doctor->account->notifications()->where(\"notifications.type\",'=','App\\Notifications\\followDoctor')->get();\n foreach($forFollowings as $forFollowing){\n if($forFollowing->data['byId'] == $user->id){\n // delete all those notifications related to this unfollowing\n $forFollowing->delete();\n }\n }\n }else{ // if the doctor is not already followed by the normal user\n $user->owner->following()->save($doctor);\n $doctor->account->notify(new followDoctor($user));\n }\n\n $followers = $doctor->followed()->count();\n $doctor->update([\"followers\"=>$followers]);\n\n }", "title": "" }, { "docid": "2e4db77ec036918481d7b3ef8b9b890a", "score": "0.52348256", "text": "public function updateFollowers($args) {\n $user_id = (int)$args['user_id'];\n $user = new User($user_id);\n $access_token_id = $args['id'];\n \n $twitter = $this->inicializeTwitterSocializer($user_id, $args);\n\n $user->twitter_follower\n ->where('still_follow', true)\n ->where('access_token_id', $access_token_id)\n ->update([\n 'still_follow' => false\n ]);\n\n $answer = $twitter->get_followers();\n if ($answer->errors) {\n foreach($answer->errors as $err) {\n log_message('TASK_ERROR', __FUNCTION__ . 'Twitter error: code: '.$err->code.'. Message: ' . $err->message);\n }\n } else {\n $followersIds = $answer->ids;\n Twitter_follower::create()\n ->where_in('follower_id', $followersIds)\n ->where('user_id', $user_id)\n ->where('access_token_id', $access_token_id)\n ->update([\n 'unfollow_time' => null,\n 'still_follow' => true\n ]);\n $exists_followers_ids = Twitter_follower::create()\n ->where_in('follower_id', $followersIds)\n ->where('user_id', $user_id)\n ->where('access_token_id', $access_token_id)\n ->get()->all_to_array('follower_id');\n $new_followers_ids = [];\n foreach($exists_followers_ids as $exists_followers_id) {\n if(!in_array($exists_followers_id['follower_id'], $followersIds)) {\n $new_followers_ids[] = $exists_followers_id['follower_id'];\n }\n }\n foreach ($new_followers_ids as $new_followers_id) {\n $twitterFollower = new Twitter_follower();\n $twitterFollower->setFollowerId($new_followers_id);\n $twitterFollower->setUserId($user_id);\n if ($user->ifUserHasConfigValue('auto_send_welcome_message', $access_token_id)) {\n $twitterFollower->setNeedMessage(true);\n }\n if ($user->ifUserHasConfigValue('auto_follow', $access_token_id)) {\n $twitterFollower->setNeedFollow(true);\n }\n $twitterFollower->setStillFollow(true);\n $twitterFollower->setAccessTokenId($access_token_id);\n $twitterFollower->save();\n }\n\n $unfollowers_query = [\n 'still_follow' => false,\n 'unfollow_time' => null,\n 'start_follow_time' => null,\n 'end_follow_time' => null,\n 'access_token_id' => $access_token_id\n ];\n\n $new_unfollowers_count = $user->twitter_follower\n ->where($unfollowers_query)\n ->count();\n\n $user->twitter_follower\n ->where($unfollowers_query)\n ->update([\n 'unfollow_time' => time()\n ]);\n Social_analytics::updateAnalytics(\n $access_token_id,\n Social_analytics::NEW_UNFOLLOWERS_ANALYTICS_TYPE,\n $new_unfollowers_count\n );\n }\n }", "title": "" }, { "docid": "ad7e524c18baf1013d765ff6c1efc84e", "score": "0.5234155", "text": "public function follow_user(){\n $user = User::find(request('user_id'));\n $follower= Auth::user();\n if(! $user) {\n return redirect()->back()->with('error', 'User does not exist.');\n }\n\n $user->followers()->attach($follower->id);\n $message = \"you are now following \" . $user->name;\n return $message;\n\n }", "title": "" }, { "docid": "2bed2caa41924bc5f7064dca44cac836", "score": "0.52337176", "text": "public function getFollowing(array $params = []) {\n $params['includes'] = ['Shops', 'Profile'];\n return $this->request(\n \"GET\",\n \"/users/{$this->user_id}/connected_users\",\n \"User\",\n $params\n );\n }", "title": "" }, { "docid": "30d5c1aa6ef439a637064efdef986789", "score": "0.5228023", "text": "function mastodon_followback($options = array()) {\n\t// si pas d'api utilisable on sort\n\tif (!$user = mastodon_oauth_user_token(isset($options['mastodon_account']) ? $options['mastodon_account'] : null)\n\t or !$app = mastodon_oauth_load_registered_app(reset($user)))\n\t\treturn false;\n\n\t$params = array(\n\t\t'limit' => 80,\n\t);\n\t$maxiter = 100;\n\n\t$id = $app->getUserID();\n\t$method = 'accounts/' . $id . '/followers';\n\t$res = $app->callApi($method, 'get', $params);\n\t$followers = $res['content'];\n\twhile($params and $followers and $maxiter-->0) {\n\t\t$params = false;\n\t\tforeach ($followers as $follower) {\n\t\t\t$account = mastodon_url2account($follower['url']);\n\t\t\tmastodon_follow_if_not_already($account, $options);\n\t\t}\n\n\t\t// trouver l'url next\n\t\tforeach ($res['headers'] as $header) {\n\t\t\tif (strncmp($header, 'Link:' , 5) == 0) {\n\t\t\t\t$link = trim(substr($header,5));\n\t\t\t\t$link = explode(',', $link);\n\t\t\t\tforeach ($link as $l){\n\t\t\t\t\tif (strpos($l,'rel=\"next\"')!==false) {\n\t\t\t\t\t\t$l = explode(';', $l);\n\t\t\t\t\t\t$l = trim(reset($l));\n\t\t\t\t\t\t$l = trim($l,'<> ');\n\t\t\t\t\t\t$l = explode('?', $l);\n\t\t\t\t\t\tparse_str(end($l), $params);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($params) {\n\t\t\t$res = $app->callApi($method, 'get', $params);\n\t\t\t$followers = $res['content'];\n\t\t}\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "78e14538ba7c4553a4504e69ba050102", "score": "0.52243006", "text": "public function getPostUrl($post)\n\t{\n\t\treturn 'https://twitter.com/' . (string) $post->user->id .'/status/' . (string) $post->id;\n\t}", "title": "" }, { "docid": "e8c26e6bc72a5a87edac779ec2b96b60", "score": "0.52212256", "text": "public function searchUsers($args) {\n $user_id = (int)$args['user_id'];\n $user = new User($user_id);\n $access_token_id = $args['id'];\n if (!$user->ifUserHasConfigValue('auto_follow_users_by_search', $access_token_id)) {\n return;\n }\n\n log_message('TASK_DEBUG', __FUNCTION__ . 'Twitter: start search users to follow.'.$this->getDebugInfo($user, $access_token_id));\n\n $date = new DateTime('UTC 00:00:00');\n $user_timezone = new DateTimeZone(User_timezone::get_user_timezone($user_id));\n $timezone_offset = $user_timezone->getOffset($date) / 3600;\n\n $twitter = $this->inicializeTwitterSocializer($user_id, $args);\n\n $user_search_keywords = $user->getUserSearchKeywords($args['profile_id']);\n $number_of_added_users = $user->getDateToAddUserTwitter($access_token_id);\n $max_daily_auto_follow_users_by_search = (int)$user->ifUserHasConfigValue('max_daily_auto_follow_users_by_search', $access_token_id);\n $old_date = DateTime::createFromFormat('!Y-m-d', $number_of_added_users->date);\n if (!$number_of_added_users->id) {\n $number_of_added_users->date = $date->format('Y-m-d');\n $number_of_added_users->setUserId($user_id);\n $number_of_added_users->token_id = $access_token_id;\n $number_of_added_users->count = 0;\n } elseif ($old_date < $date) {\n $number_of_added_users = new Number_of_added_users_twitter();\n $number_of_added_users->date = $date->format('Y-m-d');\n $number_of_added_users->setUserId($user_id);\n $number_of_added_users->count = 0;\n $number_of_added_users->token_id = $access_token_id;\n $number_of_added_users->save();\n } elseif($old_date > $date) {\\\n log_message('TASK_SUCCESS', __FUNCTION__ . 'Twitter: '\n . 'Twitter followers already added.'.\"\\n\"\n .$this->getDebugInfo($user, $access_token_id)\n );\n return;\n }\n unset($old_date);\n\n $age_of_account = $user->ifUserHasConfigValue('age_of_account', $access_token_id);\n if(!$age_of_account) {\n $age_of_account = 0;\n } else {\n $age_of_account_splited = preg_split('/,/', $age_of_account);\n if(count($age_of_account_splited)) {\n if(count($age_of_account_splited) > 1) {\n $age_of_account = $age_of_account_splited;\n }\n }\n }\n\n $tweets_count = $user->ifUserHasConfigValue('number_of_tweets', $access_token_id);\n if(!$tweets_count) {\n $tweets_count = 0;\n } else {\n $tweets_count_splited = preg_split('/,/', $tweets_count);\n if(count($tweets_count_splited)) {\n if(count($tweets_count_splited) > 1) {\n $tweets_count = $tweets_count_splited;\n }\n }\n }\n\n foreach($user_search_keywords as $user_search_keyword) {\n $other_field = $user_search_keyword->get_other_fields();\n $query = $twitter->create_query(\n $user_search_keyword->keyword,\n $other_field['include'],\n $other_field['exclude'],\n $user_search_keyword->exact\n );\n $queryArgs = [\n 'min_followers' => $user_search_keyword->min_followers,\n 'max_followers' => $user_search_keyword->max_followers,\n 'max_id' => $user_search_keyword->max_id,\n 'age_of_account' => $age_of_account,\n 'tweets_count' => $tweets_count\n ];\n $users = $twitter->search_users($query, $queryArgs);\n foreach($users['users'] as $twitter_user_id) {\n if (!$user->isUserHasTwitterFollower($twitter_user_id, $access_token_id)) {\n if (($max_daily_auto_follow_users_by_search\n && $max_daily_auto_follow_users_by_search > $number_of_added_users->count) ||\n !$max_daily_auto_follow_users_by_search) {\n $date = DateTime::createFromFormat('!Y-m-d', $number_of_added_users->date);\n $number_of_added_users->count += 1;\n $number_of_added_users->save();\n } else {\n $date = DateTime::createFromFormat('!Y-m-d', $number_of_added_users->date);\n $date->modify('+1 days');\n $number_of_added_users = new Number_of_added_users_twitter();\n $number_of_added_users->date = $date->format('Y-m-d');\n $number_of_added_users->setUserId($user_id);\n $number_of_added_users->token_id = $access_token_id;\n $number_of_added_users->count = 1;\n $number_of_added_users->save();\n }\n $twitter_follower = new Twitter_follower();\n $twitter_follower->setFollowerId($twitter_user_id);\n $twitter_follower->setUserId($user_id);\n $twitter_follower->setAccessTokenId($access_token_id);\n\n $start_date = clone $date;\n $start_date->modify(($timezone_offset*-1).' hours');\n\n $end_date = clone $date;\n $end_date->modify(($timezone_offset*-1).' hours');\n\n if ($end_date <= $start_date) {\n $end_date->modify('1 days');\n }\n\n $twitter_follower->setStartFollowTime(\n $user_search_keyword\n ->getStartDateTime($start_date)\n ->getTimestamp()\n );\n $twitter_follower->setEndFollowTime(\n $user_search_keyword\n ->getEndDateTime($end_date)\n ->getTimestamp()\n );\n unset($start_date);\n unset($end_date);\n\n $twitter_follower->setNeedFollow(true);\n $twitter_follower->save();\n }\n }\n log_message('TASK_SUCCESS', __FUNCTION__ . 'Twitter: '\n .'By keywords '.$query.' add '.count($users['users']).' users.'.\"\\n\"\n .$this->getDebugInfo($user, $access_token_id)\n );\n if($user_search_keyword->max_id != $users['max_id']) {\n $user_search_keyword->max_id = $users['max_id'];\n } else {\n $user_search_keyword->max_id = null;\n }\n $user_search_keyword->save();\n }\n }", "title": "" }, { "docid": "886c4f22cd13ebfa4a546ddeedfcfb4d", "score": "0.5211054", "text": "public static function findByUser($id)\n {\n return Post::where('user_id',$id)->where('status','verified')->orderBy('created_at','DESC')->simplePaginate(4);\n }", "title": "" }, { "docid": "01b155649f8b58ae88d682d4d3eb494c", "score": "0.5198798", "text": "function get_status_duel(){\n\t $sql = $this->meme_bl->get_search_sql(\"duel\",\" is_accepted=1\",\"duelled_by,own_meme,duelled_meme,IF(duelled_by=\".$_SESSION['id_user'].\",1,0) as dueler\");\n\t $res = getrows($sql,$err);\n\t return $res[0];\n\t}", "title": "" }, { "docid": "09415467801219ca0b491e9894146f99", "score": "0.5192915", "text": "public function getFollower()\n {\n return $this->follower;\n }", "title": "" }, { "docid": "2aab89338bc2b2511ff14271e14f67be", "score": "0.51898104", "text": "public function follows(User $user): bool\n {\n return $this->following()->where('id', $user->id)->exists();\n }", "title": "" }, { "docid": "b712cde759426a167001e8661ff1fe08", "score": "0.5180177", "text": "function GetFollowers()\n{\n\t$id = $_SESSION['k_UserId'];\n\t$j = 0;\n\t$aListppl[]='';\n\t$error = '';\n\t$szFollowed = \"SELECT * FROM relations WHERE IdFollowed = $id\";\n\t$qFollowed =mysql_query($szFollowed)\n\t\tor $error=DebugQueries('qFollowed',$szFollowed,'GetFollowers');\n\tif($error == ''){\t\n\t\twhile ($User = mysql_fetch_array($qFollowed))\n\t\t{\n\t\t\tif(!in_array($User['IdFollower'],$aListppl)){\n\t\t\t$aListppl[$j] = $User['IdFollower'];\n\t\t\t$j++;\n\t\t\t}\n\t\t}\n\t}\n\telse{\n\t\techo $error;\n\t}\t\n\treturn $j;\n}", "title": "" }, { "docid": "762d889bd64b6afd65b22f7a5192a37d", "score": "0.5174468", "text": "public function countFollow($user)\n {\n $conn = Db::getInstance();\n $statement3 = $conn->prepare(\"SELECT * FROM follows WHERE user = :user_ID\");\n $statement3->bindValue(\":user_ID\", $user);\n $statement3->execute();\n $res3 = $statement3->fetchAll(\\PDO::FETCH_ASSOC);\n $rows2 = count($res3);\n $this->Followers = $rows2;\n }", "title": "" }, { "docid": "f11f3aaa8630b3f283bea00ff16003b2", "score": "0.51733035", "text": "public function follow()\n\t{\n\t\tPhpfox::isUser(true);\n\n\t\t$iCampaignId = (int) $this->get('campaign_id');\n\t\t$sType = $this->get('type');\n\n\t\tif(Phpfox::getService('fundraising.campaign.process')->follow($iCampaignId, Phpfox::getUserId(), $sType))\n\t\t{\n\t\t\t// if we follow successfully, we need changing to un follow\n\t\t\tif ($sType == 1)\n\t\t\t{\n\t\t\t\t$sHtml = '<a href=\"#\" title=\"' . Phpfox::getPhrase('fundraising.un_follow_this_campaign') . '\" onclick=\"$.ajaxCall(\\'fundraising.follow\\', \\'campaign_id=' . $this->get('campaign_id') . '&amp;type=0\\'); return false;\">' . Phpfox::getPhrase('fundraising.un_follow') . '</a>';\n\t\t\t} \n\t\t\telseif ($sType == 0)\n\t\t\t{\n\t\t\t\t$sHtml = '<a href=\"#\" title=\"' . Phpfox::getPhrase('fundraising.follow_this_campaign') . '\" onclick=\"$.ajaxCall(\\'fundraising.follow\\', \\'campaign_id=' . $this->get('campaign_id') . '&amp;type=1\\'); return false;\">' . Phpfox::getPhrase('fundraising.follow') . '</a>';\n\t\t\t}\n\n\n\t\t\t//replace the old html by the new one, and show alert message for user\n\t\t\t$this->html('#ynfr_profile_follow_link', $sHtml)->alert(($sType == '1' ? Phpfox::getPhrase('fundraising.campaign_is_successfully_followed') : Phpfox::getPhrase('fundraising.campaign_is_successfully_un_followed')), null, 300, 150, true);\n\t\t}\n\n\t}", "title": "" }, { "docid": "cb95df19831719b8ce8764aba833c73d", "score": "0.5168194", "text": "public function toggleStatus($post_id, $user_id)\n {\n $this->db->where('id', $post_id);\n $this->db->where('post_author_id', $user_id);\n $post = $this->db->get($this->table_name);\n \n $rows = $post->num_rows();\n if (empty($rows))\n {\n return false;\n }\n \n $post_details = $post->row_array();\n \n // init update data\n $db_data = array();\n \n // get current status\n // NOTE: published and unpublished ONLY\n $db_data['post_status'] = $post_details['post_status'] == 'published' ? 'unpublished' : 'published';\n $db_data['modified'] = date('Y-m-d H:i:s');\n $db_data['modified_gmt'] = gmdate('Y-m-d H:i:s');\n \n if ( $db_data['post_status'] == 'published' )\n {\n $db_data['published'] = date('Y-m-d H:i:s');\n $db_data['published_gmt'] = date('Y-m-d H:i:s');\n }\n \n // update it now\n $this->db->where('id', $post_id);\n $this->db->where('post_author_id', $user_id);\n $updated = $this->db->update($this->table_name, $db_data);\n \n // retrieve back updated status\n $this->db->select('post_status');\n $this->db->where('id', $post_id);\n $this->db->where('post_author_id', $user_id);\n $post = $this->db->get($this->table_name);\n \n // we know that this post exists, so proceed\n return $post->row_array();\n }", "title": "" }, { "docid": "9243a30b0acc773f331772d609f923dd", "score": "0.5160299", "text": "function pwuf_unfollow_user( $user_id, $unfollow_user ) {\n do_action( 'pwuf_pre_unfollow_user', $user_id, $unfollow_user );\n\n // get all IDs that $user_id follows\n $following = pwuf_get_following( $user_id );\n\n if ( is_array( $following ) && in_array( $unfollow_user, $following ) ) {\n\n $modified = false;\n \n foreach ( $following as $key => $follow ) {\n if ( $follow == $unfollow_user ) {\n unset( $following[$key] );\n $modified = true;\n }\n }\n\n if ( $modified ) {\n if ( update_user_meta( $user_id, '_pwuf_following', $following ) ) {\n pwuf_decrease_followed_by_count( $unfollow_user );\n }\n }\n\n }\n\n // get all IDs that follow the user we have just unfollowed so that we can remove $user_id\n $followers = pwuf_get_followers( $unfollow_user );\n \n if ( is_array( $followers ) && in_array( $user_id, $followers ) ) {\n \n $modified = false;\n \n foreach ( $followers as $key => $follower ) {\n if ( $follower == $user_id ) {\n unset( $followers[$key] );\n $modified = true;\n }\n }\n\n if ( $modified ) {\n update_user_meta( $unfollow_user, '_pwuf_followers', $followers );\n }\n\n }\n\n if ( $modified ) {\n do_action( 'pwuf_post_unfollow_user', $user_id, $unfollow_user );\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "8d2c8ed9b2e4fecd31ddfb49881ef8c4", "score": "0.5155187", "text": "public static function find($id)\n {\n //gets url and adds the $id (+skips status)\n $url = 'https://api.twitter.com/1.1/followers/list.json';\n $getfield = '?screen_name='.$id.'&skip_status=true';\n\n\n //uses the j7mbo twitter API to get a json response\n $requestMethod = 'GET';\n $response = $_SESSION['twitter']->setGetfield($getfield)\n ->buildOauth($url, $requestMethod)\n ->performRequest();\n\n\n //decodes json output and puts each status into an array of followers, returning the follower data\n $json_output = json_decode($response, true);\n\n $followers = array();\n\n foreach ($json_output as $follower )\n {\n if (is_array($follower)) {\n foreach ($follower as $unique_follower) {\n $followers[] = $unique_follower;\n }\n }\n }\n return $followers;\n }", "title": "" }, { "docid": "65f0bff14e7bcbc44871f36d37f6bfd1", "score": "0.5154411", "text": "public function get_follower(){\n\t\t$returnData = array(\n\t\t\t\t'followers'=>array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'user_id'=>1,\n\t\t\t\t\t\t\t\t'name'=>'thomas',\n\t\t\t\t\t\t\t\t'profile'=>'',\n\t\t\t\t\t\t\t\t'pic'=>''\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'user_id'=>2,\n\t\t\t\t\t\t\t\t'name'=>'master',\n\t\t\t\t\t\t\t\t'profile'=>'',\n\t\t\t\t\t\t\t\t'pic'=>''\n\t\t\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\treturn $this->response($returnData,200);\n\t}", "title": "" }, { "docid": "226f246921b4a8732f233861e6a8318a", "score": "0.51538265", "text": "public function getFollowReferrals()\n {\n return $this->followReferrals;\n }", "title": "" }, { "docid": "5bd323fac58b49e7461f7bb857851526", "score": "0.5141882", "text": "public function notifisSeen (){\n // Take user id\n $user_id = session()->get('user')->id;\n\n Notification::where('user_id', $user_id)->where('status', '0')->update(['status' => '1']);\n }", "title": "" }, { "docid": "932eab4cafb4dc1ae6532fb9c3c8d040", "score": "0.51417047", "text": "function check_followed_by_fwuid($uid, $fwuid) {\n\tif(! $uid || ! $fwuid) return;\n\t$table = get_user_table($uid);\n\n\t$followees = array();\n\tif(is_array($fwuid)) {\n\t\t$fuid = array_unique($fwuid);//fuid can contain the same values\n\t\t$query = DB::query('SELECT fwuid FROM ' . DB::table($table) . \" WHERE uid='{$uid}' AND fwuid IN (\" . implode(',', $fwuid) . ')');\n\t\twhile($value = DB::fetch($query)) {\n\t\t\t$followees[$value['fwuid']] = 1;\n\t\t}\n\t}\n\telse {\n\t\t$fid = DB::fetch_first('SELECT fwuid FROM ' . DB::table($table) . \" WHERE uid='{$uid}' AND fwuid='{$fwuid}'\");\n\t\tif($fid) $followees[$fid] = 1;\n\t}\n\treturn $followees;\n}", "title": "" }, { "docid": "0c456e6a251ff877aa783a8aa0251e62", "score": "0.51397437", "text": "public function followingAction()\n {\n $errors = $this->view->errors;\n $site = $this->view->site; /* @var BeMaverick_Site $site */\n\n // set the input params\n $requiredParams = array(\n 'userId',\n );\n\n $input = $this->processInput( $requiredParams, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n // get the objects\n $user = $site->getUser( $input->userId );\n\n // show not found\n if ( ! $user ) {\n return $this->_forward( 'notfound', 'errors' );\n }\n\n $successPage = 'user';\n if ( $this->view->ajax && $this->view->ajax == 'dynamicModule' ) {\n $successPage = 'userFollowing';\n } else if ( $this->view->ajax && $this->view->ajax == 'dynamicModule' ) {\n $successPage = $this->view->ajax.'Ajax';\n } else if ( !$this->view->ajax ) {\n $this->view->popupUrl = $user->getUrl( 'userFollowing' );\n }\n\n // set the view vars\n $this->view->user = $user;\n\n return $this->renderPage( $successPage );\n }", "title": "" }, { "docid": "ca2067b5b1abdd87fab634c6d5c792cf", "score": "0.5133926", "text": "function bp_follow_my_following_feed() {\n\t// only available in BP 1.8+.\n\tif ( ! class_exists( 'BP_Activity_Feed' ) ) {\n\t\treturn;\n\t}\n\n\tif ( ! bp_is_user_activity() || ! bp_is_current_action( constant( 'BP_FOLLOWING_SLUG' ) ) || ! bp_is_action_variable( 'feed', 0 ) ) {\n\t\treturn false;\n\t}\n\n\t$bp = $GLOBALS['bp'];\n\n\t// setup the feed.\n\t$bp->activity->feed = new BP_Activity_Feed( array(\n\t\t'id' => 'myfollowing',\n\n\t\t/* translators: User's following activity RSS title - \"[Site Name] | [User Display Name] | Following Activity\" */\n\t\t'title' => sprintf( __( '%1$s | %2$s | Following Activity', 'buddypress-followers' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),\n\n\t\t'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . constant( 'BP_FOLLOWING_SLUG' ) ),\n\t\t'description' => sprintf( __( \"Activity feed for people that %s is following.\", 'buddypress' ), bp_get_displayed_user_fullname() ),\n\t\t'activity_args' => array(\n\t\t\t'user_id' => bp_get_following_ids(),\n\t\t\t'display_comments' => 'threaded'\n\t\t)\n\t) );\n}", "title": "" }, { "docid": "f1d2c0f32a7f1ec9235b88ae97383696", "score": "0.5130292", "text": "function interviewlistbystatus(){\n$collection = $GLOBALS['db']->interviews;\n$query = array('status' => 1);\nreturn $adminuser = $collection->find($query);\n}", "title": "" }, { "docid": "ead0bed038e7da489af981894c523787", "score": "0.5130145", "text": "public function followings(){\n $followings = Tweet::with('user')\n ->whereIn('user_id',auth()->user()->followings->pluck('id')->toArray())\n ->orderBy('created_at','DESC')\n ->get();\n return Inertia::render('Tweets/Followings',[\n 'followings'=>$followings\n ]);\n }", "title": "" }, { "docid": "15685699b210eb25e3d9b5b7dd0288e9", "score": "0.5124703", "text": "public function followUser($target_user_id) {\n return $this->request(\n \"POST\",\n \"/users/{$this->user_id}/connected_users\",\n \"User\",\n ['to_user_id' => $target_user_id, 'includes' => ['Shops', 'Profile']]\n )\n ->first();\n }", "title": "" }, { "docid": "9fae58ea8a688d4f02c0ed75592f01ed", "score": "0.5122889", "text": "public static function getFollowupStaff($head='')\n {\n if($head!='')\n $data = static::find()->where(['role' => UserTypes::FOLLOW_UP_STAFF, 'head' => $head, 'status' => User::STATUS_ACTIVE])->all();\n else\n $data = static::find()->where(['role' => UserTypes::FOLLOW_UP_STAFF, 'status' => User::STATUS_ACTIVE])->all();\n $value = (count($data)==0)? []: \\yii\\helpers\\ArrayHelper::map($data, 'id','followup_staff_count'); //id = your ID model, name = your caption\n return $value;\n }", "title": "" }, { "docid": "f3a5582896301da7528cbd696b97897e", "score": "0.51179296", "text": "function custom_get_user_posts_where() {\n\n global $wpdb;\n\n $user_id = get_current_user_id();\n $sql = '';\n $status = array( \"'publish'\" );\n\n if ( $user_id ) {\n\n $status[] = \"'private'\";\n\n $sql .= \" AND {$wpdb->posts}.post_author = {$user_id}\";\n\n }\n\n $sql .= \" AND {$wpdb->posts}.post_status IN( \" . implode( ',', $status ) . \" ) \";\n\n return $sql;\n\n}", "title": "" }, { "docid": "c120a03483370b11cd7443bb13bd349c", "score": "0.5117877", "text": "function GetFollowers() {\n\t\t\treturn $this->process($this->api['followers']);\n\t\t}", "title": "" }, { "docid": "6d2fb539b723331771849492858f931d", "score": "0.5116687", "text": "public function UserFollowing($id) {\n $user = DB::table('users')\n ->where('username', $id)\n ->remember(1)\n ->first();\n\n $follower = $this->getFollower($user->id);\n $following = $this->getFollowing($user->id);\n $followerCount = $this->getFollowerCount($user->id);\n $followingCount = $this->getFollowingCount($user->id);\n $reviewCount = $this->getReviewCount($user->id);\n\n //gets the favourite\n $fav = $this->getFav($user->id);\n\n // gets the recent acitivities of the user\n $action = $this->getAction($user->id);\n\n // check for the follow button\n if (Auth::check()) {\n\n if (Auth::user()->username == $user->username) {\n $follow = '3';\n } else {\n\n $follow = $this->followCheck($user->id);\n\n if ($follow) {\n $follow = '1';\n } else {\n $follow = '0';\n }\n }\n } else {\n $follow = '2';\n }\n\n\n\n return view('users.following', compact('user', 'fav', 'action', 'follow', 'follower', 'followerCount', 'following', 'followingCount', 'reviewCount'));\n }", "title": "" }, { "docid": "d4a8c096e8f8822e6806bc79a18d89a3", "score": "0.51133", "text": "public function followNewFollowers($args) {\n $user_id = (int)$args['user_id'];\n $user = new User($user_id);\n $access_token_id = $args['id'];\n if (!$user->ifUserHasConfigValue('auto_follow', $access_token_id)) {\n return;\n }\n\n log_message('TASK_DEBUG', __FUNCTION__ . 'Twitter: start follow new followers.'.$this->getDebugInfo($user, $access_token_id));\n $twitter = $this->inicializeTwitterSocializer($user_id, $args);\n \n /* @var Twitter_follower[] $followers */\n $followers = $user\n ->twitter_follower\n ->where('still_follow', true)\n ->where('need_follow', true)\n ->where('start_follow_time', null)\n ->where('end_follow_time', null)\n ->where('access_token_id', $access_token_id)\n ->get();\n $new_followers_count = 0;\n foreach($followers as $follower) {\n $answer = $twitter->follow($follower->follower_id);\n if ($answer->errors) {\n foreach($answer->errors as $err) {\n log_message('TASK_ERROR', __FUNCTION__ . 'Twitter error: code: '.$err->code.'. Message: ' . $err->message);\n }\n } else {\n $new_followers_count++;\n $follower->setNeedFollow(false);\n $follower->save();\n }\n }\n Social_analytics::updateAnalytics(\n $access_token_id,\n Social_analytics::NEW_FOLLOWING_ANALYTICS_TYPE,\n $new_followers_count\n );\n log_message('TASK_SUCCESS', __FUNCTION__ . 'Twitter: finish follow new followers. Added '\n .$new_followers_count.' users.'.\"\\n\"\n .$this->getDebugInfo($user, $access_token_id)\n );\n\n $data = new DateTime('UTC');\n if (!$user->ifUserHasConfigValue('auto_follow_users_by_search', $access_token_id)) {\n $user->twitter_follower\n ->where('need_follow', true)\n ->where('start_follow_time IS NOT NULL')\n ->where('end_follow_time IS NOT NULL')\n ->where('access_token_id', $access_token_id)\n ->delete();\n $user->number_of_added_users_twitter\n ->where('date >= \\''.$data->format('Y-m-d').'\\'')\n ->delete();\n }\n /* @var Twitter_follower[] $followers */\n $time = $data->getTimestamp();\n $query = $user\n ->twitter_follower\n ->where([\n 'need_follow' => true,\n 'access_token_id' => $access_token_id\n ])\n ->where(\"((start_follow_time <= '{$time}' AND end_follow_time >= '{$time}') OR (start_follow_time = end_follow_time AND end_follow_time < '{$time}'))\");\n $followers = $query->get();\n $new_followers_count = 0;\n foreach($followers as $follower) {\n sleep(1);\n $answer = $twitter->follow($follower->follower_id);\n if ($answer->errors) {\n foreach($answer->errors as $err) {\n log_message('TASK_ERROR', __FUNCTION__ . 'Twitter error: code: '.$err->code.'. Message: ' . $err->message);\n }\n } else {\n $follower->setNeedFollow(false);\n $follower->setUnfollowTime($data->getTimestamp());\n $follower->setStillFollow(false);\n $follower->save();\n\n $new_followers_count++;\n }\n }\n Social_analytics::updateAnalytics(\n $access_token_id,\n Social_analytics::NEW_FOLLOWING_BY_SEARCH_ANALYTICS_TYPE,\n $new_followers_count\n );\n log_message('TASK_SUCCESS', __FUNCTION__ . 'Twitter: finish follow new followers by search. Added '\n .$new_followers_count.' users.'.\"\\n\"\n .$this->getDebugInfo($user, $access_token_id)\n );\n }", "title": "" } ]
3cbe4b49120056fdc76b026c06cd0675
Create a new command instance.
[ { "docid": "beeda352e37e57573722143269c99118", "score": "0.0", "text": "public function __construct()\n {\n parent::__construct();\n }", "title": "" } ]
[ { "docid": "c1d3b88bff44f6463cdce8b0b40d58e2", "score": "0.8219918", "text": "public function createCommand();", "title": "" }, { "docid": "1cdd2cb5f202e74decc3117f90393e47", "score": "0.8016003", "text": "public function create(Command $command);", "title": "" }, { "docid": "c6459843cb08dacff9d0a01365da4116", "score": "0.7559584", "text": "public function __construct(CreateCommand $command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "7ccc4aaada08db3d14c5c1a4c9e59d6d", "score": "0.7267292", "text": "public function createCommand($config = [])\n {\n $config['db'] = $this;\n $command = new Command($config);\n\n return $command;\n }", "title": "" }, { "docid": "065466d08ea68f0c216e3d88de618e63", "score": "0.7226671", "text": "static public function create($command)\n {\n $command_name = ($command_name = self::getCommandName($command)) ? $command_name : self::DEFAULT_COMMAND;\n $command_class = self::getCommandClassName($command_name);\n \n if (!class_exists($command_class)) $command_class = self::getCommandClassName(self::DEFAULT_COMMAND);\n \n $command_reflection = new ReflectionClass($command_class);\n $command_instance = $command_reflection->newInstance();\n\n $command_instance->setCommand($command);\n \n return $command_instance;\n }", "title": "" }, { "docid": "970baf5b385c7427caed2d9139d119d6", "score": "0.7171291", "text": "public function __construct(CreateCommand $command) {\n parent::__construct($command, new CLICommandClassWriter());\n $this->cliWriter = $this->getWriter();\n }", "title": "" }, { "docid": "af1247001a001c6d0cd3bfaf031dfb23", "score": "0.7101548", "text": "public function __construct(NewCommand $command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "0b5bc7cecd3c93e413d134c9ec5b0792", "score": "0.6880155", "text": "abstract public function createCommand($commandText, array $arguments=array());", "title": "" }, { "docid": "071d4bccea8db0599b5eadb4205142b9", "score": "0.6861997", "text": "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n //命令名称 一般是子类的【命令类子类】\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n //保存命令的描述\n $this->setDescription($this->description);\n\n $this->setHidden($this->hidden);\n\n if (! isset($this->signature)) {\n //给命令指定参数如输出\n $this->specifyParameters();\n }\n }", "title": "" }, { "docid": "bcda1690d60fa5da3a73577bdf27785b", "score": "0.6835365", "text": "protected function createCommand(): SQLCommand\n {\n $reflector = new \\ReflectionClass($this->entityClass);\n\n $entity = $reflector->newInstanceWithoutConstructor();\n\n $columns = $entity::getColumns();\n\n return new SQLCommand($this->tableName, $columns);\n }", "title": "" }, { "docid": "29dbbfad9675496741963e2fdb4828f6", "score": "0.67353606", "text": "public function __construct()\n {\n $this->constructorCalled = true;\n\n // Define the command\n $this->define();\n\n if (empty($this->name)) {\n throw new InvalidArgumentException('Command name cannot be empty');\n }\n\n // This adds a help option to all commands\n $this->addOption(new Option(\n 'help',\n 'h',\n OptionTypes::NO_VALUE,\n 'Displays info about the command'\n ));\n }", "title": "" }, { "docid": "dc9b75b262623b0130f821cc5ff6603b", "score": "0.6697025", "text": "public function __construct($command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "dc9b75b262623b0130f821cc5ff6603b", "score": "0.6697025", "text": "public function __construct($command)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "066615405ffed1003413a6902a5ef5a2", "score": "0.66518736", "text": "public static function factory($type)\n {\n $className = 'Amasty_Oaction_Model_Command_' . ucfirst($type);\n return new $className($type);\n }", "title": "" }, { "docid": "ef4ff4185962db1dbddecd2045ac8716", "score": "0.66454077", "text": "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "title": "" }, { "docid": "07169a4c2b70b1172ee137151c0779b6", "score": "0.656996", "text": "public function __construct(NewCommand $command, $name)\n {\n $this->name = $name;\n $this->command = $command;\n }", "title": "" }, { "docid": "e207e9deae75d07e8b3c6770112ac9b1", "score": "0.65621066", "text": "public function init(): AbstractCommand;", "title": "" }, { "docid": "a166e35068280f238cebf02dafea8cbd", "score": "0.6552639", "text": "public function newCommand($globals)\n {\n return new Command(\n $this->getCliFactory()->newContext($globals),\n $this->getLogger(),\n $this->newService()\n );\n }", "title": "" }, { "docid": "d0c413d947851d546fc0f8a94d5da740", "score": "0.6542642", "text": "protected function createConsoleCommand() {\n\t\t$consoleCommand = new QsConsoleCommandInitApplication('install', null);\n\t\t$consoleCommand->interactive = false;\n\t\t$consoleCommand->outputlog = false;\n\t\treturn $consoleCommand;\n\t}", "title": "" }, { "docid": "07c76fa3c09bb6553ef6cb288bca324d", "score": "0.65099597", "text": "public function createCommand($sql = null) {\n\t\treturn new Command($this, $sql);\n\t}", "title": "" }, { "docid": "b01b72603b9e4d022a4eeee5abaa1c57", "score": "0.6454301", "text": "public static function create($post, $config) {\n\t\t$cmd = new CmdUnknown ( $post, $config );\n\t\t$log = new Logger ( $config->log_dir, $config->log_level );\n\t\t$log->debug ( \"CommandFactory: post received (json encoded): \" . json_encode ( $post ) );\n\t\t\n\t\t// checking if commands definitions have been loaded\n\t\tif (self::$classes == null || self::$help_data == null) {\n\t\t\t$result = self::reloadDefinitions ();\n\t\t\tif ($result) {\n\t\t\t\t$log->debug ( \"CommandFactory: commands_definition.json loaded\" );\n\t\t\t} else {\n\t\t\t\t$log->error ( \"CommandFactory: Error loading commands_definition.json, check json format or file permissions.\" );\n\t\t\t}\n\t\t}\n\t\t// TODO move strings parameter 'text' to global definition\n\t\tif (isset ( $post ['text'] ) && self::$classes != null) {\n\t\t\t$log->debug ( \"CommandFactory: text received: \" . $post ['text'] );\n\t\t\t// parsing inputs by space\n\t\t\t$input = preg_split ( \"/[\\s]+/\", $post ['text'] );\n\t\t\t// the first word represents the command\n\t\t\tif (in_array ( $input [0], array_keys ( self::$classes ) )) {\n\t\t\t\t$class = self::$classes [$input [0]];\n\t\t\t\tarray_shift ( $input );\n\t\t\t\t$cmd = new $class ( $post, $config, $input );\n\t\t\t}\n\t\t}\n\t\treturn $cmd;\n\t}", "title": "" }, { "docid": "b089b3eea70b11576d6f8938543dcbe0", "score": "0.63773245", "text": "private function __construct($command = null)\n {\n $this->command = $command;\n }", "title": "" }, { "docid": "93ab0c52b7a29dcdbca29c903de9c703", "score": "0.6280719", "text": "public function with(Command $command);", "title": "" }, { "docid": "1152e6a2252e66464c8b2c0e57388ff7", "score": "0.6253863", "text": "protected function registerAbilityCreateCommand()\n {\n $this->app->singleton('command.rinvex.fort.ability.create', function ($app) {\n return new AbilityCreateCommand();\n });\n }", "title": "" }, { "docid": "7cf4f5443759e4b5c1f81c9ae63b33fb", "score": "0.6246161", "text": "public function __construct()\n {\n $command = new PlayCommand();\n $this->_app = new Application(self::NAME_OF_THE_GAME, self::VERSION_NUMBER);\n $this->_app->add($command);\n $this->_app->setDefaultCommand($command->getName());\n }", "title": "" }, { "docid": "0957c6985251febab568010846f505d7", "score": "0.62047005", "text": "public function build(CommandDefenition $defenition)\n {\n $command = new Command($defenition->getName());\n $command->setLogger($this->logger);\n $executes = $defenition->getExecutes();\n\n foreach($executes as $execute) {\n $command->addAction($this->parseExecute($execute));\n }\n return $command;\n }", "title": "" }, { "docid": "16b5da10f7d296df502eb75103ad92cf", "score": "0.6173079", "text": "function __construct(private string $command, private Finder $finder) {}", "title": "" }, { "docid": "22711975ada2432010da83c53b8742e9", "score": "0.6170755", "text": "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::SIGN_IN_COMMAND:\n return $this->makeSignInCommand(...$args);\n\n case self::REGISTER_TASK_COMMAND:\n return $this->makeUserRegisterTaskCommand(...$args);\n\n case self::REGISTER_COMMAND:\n return $this->makeUserRegisterCommand(...$args);\n\n case self::UPDATE_TASK_COMMAND:\n return $this->makeUserUpdateTaskCommand(...$args);\n\n case self::UPDATE_COMMAND:\n return $this->makeUserUpdateCommand(...$args);\n\n case self::DELETE_TASK_COMMAND:\n return $this->makeUserDeleteTaskCommand(...$args);\n\n case self::DELETE_COMMAND:\n return $this->makeUserDeleteCommand(...$args);\n\n case self::ADD_ID_COMMAND:\n return $this->makeUserAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string)$commandType));\n }\n }", "title": "" }, { "docid": "c52907e5c529b020545cb6ef57c6869c", "score": "0.6146814", "text": "public function __construct()\n {\n $this->registerCommands([\n 'model' => MakeModelCommand::class,\n 'request' => MakeRequestCommand::class,\n 'resources' => MakeResourcesCommand::class,\n 'controller' => MakeControllerCommand::class,\n 'alias' => AliasCommand::class,\n 'routes' => RouteCommand::class\n ]);\n\n parent::__construct();\n }", "title": "" }, { "docid": "657c8fdd160c3f0835e8542e8fa9e598", "score": "0.61123586", "text": "protected function command($command)\n {\n // Fetch command from Container if necessary\n if (!$command instanceof AbstractCommand) {\n $command = $command ? $command : null;\n $command = $this->console->get($command);\n } elseif (!$command->getContainer()) {\n $command->setContainer($this->container);\n $command->setHelperSet(new HelperSet(['question' => new QuestionHelper()]));\n }\n\n return $command;\n }", "title": "" }, { "docid": "c8545b96b6a34b340fa8b2271a1a45f2", "score": "0.60902005", "text": "public static function create() {\n $executor = new ProcessExecutor();\n $finder = new ExecutableFinder();\n return new self($executor, $finder);\n }", "title": "" }, { "docid": "61e68a3208e4fb17d7d60de0a7f79811", "score": "0.60820425", "text": "private function createDefaultCommand(): Command\n {\n return new WelcomePageCommand();\n }", "title": "" }, { "docid": "a9b2d0e11c1ccdd9b788af29e0254e54", "score": "0.6081284", "text": "public function getCommand();", "title": "" }, { "docid": "06177af55488e1c2920eefcddc1ba38a", "score": "0.6039252", "text": "public function command()\n {\n return 'account create';\n }", "title": "" }, { "docid": "6efa7e965c35621d2ef7dc221a40347b", "score": "0.6031495", "text": "public abstract function getCommand();", "title": "" }, { "docid": "7b080ce83f1043594cf8f74ca980d05b", "score": "0.59691626", "text": "public function __construct(DepositAdminCommand $command)\n\t{\n\t\t$this->command = $command;\n\t}", "title": "" }, { "docid": "5edaff62ddcb4e40d0b688c1a41e2c33", "score": "0.59576946", "text": "public function __construct($command, $testing)\n {\n $this->command = $command;\n $this->testing = $testing;\n }", "title": "" }, { "docid": "7ae7b42b7d3abae4ba734bc7f2e6362e", "score": "0.5954538", "text": "abstract protected function getCommand();", "title": "" }, { "docid": "7ae7b42b7d3abae4ba734bc7f2e6362e", "score": "0.5954538", "text": "abstract protected function getCommand();", "title": "" }, { "docid": "652edb60da294703a063dd83f1124d95", "score": "0.5954097", "text": "public function create()\n {\n $this->authorize('create_appcommands');\n return view('appcommands.create');\n }", "title": "" }, { "docid": "ae9fc2847e0270035192677d0531dce8", "score": "0.59503824", "text": "abstract public function getCommand();", "title": "" }, { "docid": "794b25e8c2853ee387d1389058f4a09e", "score": "0.59379697", "text": "public static final function create ($messageType)\n {\n $messageClassName = null;\n $commandText = false;\n \n if (ctype_digit ($messageType))\n {\n if (isset (self :: $messageTypeMap [$messageType]))\n {\n $messageClassName = self :: $messageTypeMap [$messageType] [0];\n }\n }\n else if (is_string ($messageType))\n {\n $commandText = $messageType;\n $commandName = strtolower ($messageType);\n \n if (substr ($commandName, 0, 1) == ':')\n {\n $commandName = ltrim (strstr ($commandName, ' '));\n }\n \n if (strpos ($commandName, ' ') !== false)\n {\n $commandName = strstr ($commandName, ' ', true);\n }\n \n foreach (self :: $messageTypeMap as $messageId => $messageInfo)\n {\n if ($messageInfo [1] === $commandName)\n {\n $messageClassName = $messageInfo [0];\n break;\n }\n }\n }\n \n if ($messageClassName === null || !class_exists ($messageClassName, false))\n {\n $messageClassName = self :: $messageTypeMap [self :: MESSAGE_TYPE_UNKNOWN] [0];\n }\n \n $instance = new $messageClassName ();\n if ($commandText !== false)\n {\n $instance -> parse ($commandText);\n }\n \n return $instance;\n }", "title": "" }, { "docid": "c8d39681a6b02b901cfdec68affe0a8d", "score": "0.5920736", "text": "public function command(array $command): Builder\n {\n $this->command = $command;\n return $this;\n }", "title": "" }, { "docid": "40351d5e3a7322fc813731f509ee800d", "score": "0.5902167", "text": "public function __construct()\n {\n parent::__construct('Dumpling', static::VERSION);\n\n $this->add(new Command\\DumplingCommand);\n }", "title": "" }, { "docid": "06896b117acc8b9b8a62e8904ed01a6c", "score": "0.5899602", "text": "private function generateProcess(string $command, string ...$args): Process {\n return new Process(\n array_merge([$command], $args)\n );\n }", "title": "" }, { "docid": "5e1705dbb599e7f18292d91ecc57f696", "score": "0.58981764", "text": "public function setCommand($command);", "title": "" }, { "docid": "d9088da38b454bc488d8a92a18e2721a", "score": "0.5875467", "text": "private function generate()\n {\n $this->result = null;\n $command = $this->getCommand();\n $this->result = exec($command);\n return $this;\n }", "title": "" }, { "docid": "81b69bfd5e3bad1f8fbbfa0ea7da1987", "score": "0.58733964", "text": "public function inputCommand(Input $input): Command;", "title": "" }, { "docid": "336a9b4ac3bd7f97e227e42c6c8345fb", "score": "0.58715224", "text": "public static function create($directives = '')\n {\n $commandPath = CommandPath::command(self::COMMAND);\n\n if ($commandPath === null)\n {\n return null;\n }\n\n $instance = new static($commandPath);\n\n return strlen($directives) > 0\n ? $instance->setDirective($directives)\n : $instance;\n }", "title": "" }, { "docid": "89d925edef45d461446d7de08413bdcc", "score": "0.5852474", "text": "public function create() {}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.58442044", "text": "public function create(){}", "title": "" }, { "docid": "4eae5ec5314226b0a4d84934c4812232", "score": "0.5837246", "text": "public function getFFmpegCommand()\n {\n return new $this->_ffmpegCommand;\n }", "title": "" }, { "docid": "f3135180580b5882d2ba5d28215fa78b", "score": "0.58178467", "text": "public function __construct($commandData)\n {\n $this->commandData = $commandData;\n }", "title": "" }, { "docid": "78c93783152b16898f7d41482fd8e368", "score": "0.5811387", "text": "public function __construct($command, $description)\n\t{\n\t\t$this->_command = $command;\n\t\t$this->_description = $description;\n\t}", "title": "" }, { "docid": "fe6a71e0e69a13cf39d457eb6adcf545", "score": "0.58096904", "text": "public static function create() : self;", "title": "" }, { "docid": "e83f81b6a42a9602ef395651a9e89f12", "score": "0.580711", "text": "public function init(string $name, string $command): string;", "title": "" }, { "docid": "93f11cec28c11bb103ce8a888d1dabfc", "score": "0.5805968", "text": "public function createCommand($type, $options = null): AbstractSchemaModification {\n\t\t$type = strtolower($type);\n\n\t\tif(!isset($this->commandTypes[$type])) {\n\t\t\tthrow new InvalidArgumentException(\"Update commandtype unknown: \" . $type);\n\t\t}\n\n\t\t$class = $this->commandTypes[$type];\n\n\t\treturn new $class($options);\n\t}", "title": "" }, { "docid": "ca3f84d4117be61f639dce5119f1fd18", "score": "0.58038133", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_JSON_API);\n }", "title": "" }, { "docid": "f76e18eaa579c787b1ba261f508b1f99", "score": "0.58031255", "text": "static function create($alias, $parameters = null){\n if(!isset(self::$progs[$alias])) error(\"Cmd Alias '$alias' not available\");\n $obj = new self;\n $obj->params[] = escapeshellcmd(self::$progs[$alias]);\n if(is_array($parameters)) foreach($parameters as $value) $obj->addParameter($value, true);\n return $obj;\n }", "title": "" }, { "docid": "f17b0085faa2bb1ff8f9751fe3ee51a8", "score": "0.5800218", "text": "protected function registerCommand()\n {\n $this->app->singleton('rockid.generate', function (){\n return new RockidGenerateCommand();\n });\n $this->commands('rockid.generate');\n }", "title": "" }, { "docid": "44597ec79e66f36a6a433871e13e905c", "score": "0.57967806", "text": "public function setCommand(string $command) : self\n {\n $this->command = $command;\n\n return $this;\n }", "title": "" }, { "docid": "d78141fa924eee856d5c0fd8546fcab8", "score": "0.5768265", "text": "public function run()\n {\n CommandType::create([\n 'name' => 'MESAS'\n ]);\n CommandType::create([\n 'name' => 'LLEVAR'\n ]);\n CommandType::create([\n 'name' => 'DELIVERY'\n ]);\n }", "title": "" }, { "docid": "5b601c71678a897ab187e1484ae7a06e", "score": "0.5766515", "text": "public function __construct(?Command $command, InputInterface $input, OutputInterface $output)\n {\n $this->command = $command;\n $this->input = $input;\n $this->output = $output;\n }", "title": "" }, { "docid": "e4deef52337a0283641550ed3186cd4e", "score": "0.5742806", "text": "private function generateCommand($name, \\ReflectionMethod $method, $token = null)\n {\n $methodName = $this->transformer->transform($method->getName());\n\n $command = new Command(strtolower($name . ':' . $methodName));\n $docBlock = DocBlockFactory::createInstance()->create($method->getDocComment());\n\n $command->setDefinition($this->buildDefinition($method, $token));\n $command->setDescription($docBlock->getSummary());\n $command->setCode($this->createCode($name, $method));\n\n return $command;\n }", "title": "" }, { "docid": "df6544fbbc3fee1d714941212b4bb90b", "score": "0.5716369", "text": "protected function registerUserCreateCommand()\n {\n $this->app->singleton('command.rinvex.fort.user.create', function ($app) {\n return new UserCreateCommand();\n });\n }", "title": "" }, { "docid": "9047c19ce205b178da8669aede0ab73c", "score": "0.57150346", "text": "public function getCommand(): void {}", "title": "" }, { "docid": "84a3275414b5a85f22c4f28b5a449ca3", "score": "0.57150066", "text": "public function buildCommand()\n {\n if (!isset($this->ansi) && $this->getConfig()->get(\\Robo\\Config\\Config::DECORATED)) {\n $this->ansi();\n }\n if (!isset($this->nointeraction) && !$this->getConfig()->get(\\Robo\\Config\\Config::INTERACTIVE)) {\n $this->noInteraction();\n }\n $this->option($this->prefer)\n ->option($this->dev)\n ->option($this->nointeraction)\n ->option($this->ansi);\n }", "title": "" }, { "docid": "17d66931227fce85f6a3b17ac6d9e361", "score": "0.5710419", "text": "public function testCanBeCreated()\n {\n $subcommand = $this->createInstance();\n $this->assertInstanceOf('Dhii\\Shell\\Command\\SubcommandInterface', $subcommand, 'Must be a valid subcommand');\n }", "title": "" }, { "docid": "72357c6a40a58bee2261b14c0fed16d5", "score": "0.570882", "text": "public function __construct()\n {\n ee()->load->helper('language_helper');\n ee()->lang->loadfile('cli');\n ee()->load->database();\n\n // Is the CLI disabled in the settings?\n $this->cliEnabled = ee()->config->item('cli_enabled') != false ? bool_config_item('cli_enabled') : true;\n\n // Initialize the object\n $factory = new CliFactory();\n $this->filesystem = ee('Filesystem');\n\n $this->command = $factory->newContext($GLOBALS);\n $this->output = $factory->newStdio();\n $this->input = $factory->newStdio();\n $this->argv = $this->command->argv->get();\n\n // If the cli is enabled, we will fail here, before anything has really been done\n if (!$this->cliEnabled) {\n $this->fail('cli_error_cli_disabled');\n }\n\n if (! isset($this->argv[1])) {\n $this->fail('cli_error_no_command_given');\n }\n\n $this->arguments = array_slice($this->command->argv->get(), 2);\n\n // Get command called\n $this->commandCalled = $this->argv[1];\n\n // This will set the desc and summary if theyre set in the lang file\n $this->setDescriptionAndSummaryFromLang();\n }", "title": "" }, { "docid": "59fc2c17523aefeadbb869bfda96ce6f", "score": "0.5700054", "text": "function &newAddCommand($layout, $values = array())\n {\n return $this->_impl->newAddCommand($layout, $values);\n }", "title": "" }, { "docid": "ea4888cce0fb47be706e215db88e8b4a", "score": "0.56996703", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->migrationCommand = $this->pathPhp . $this->laravelConsole . $this->migrationCommand;\n $this->dbSeedCommand = $this->pathPhp . $this->laravelConsole .$this->dbSeedCommand;\n }", "title": "" }, { "docid": "18cdad23e9af54e3cf0a433d210990a7", "score": "0.56983274", "text": "public function __construct()\n {\n parent::__construct();\n $this->commandModel = new CommandConfigOther();\n $this->maidOldModel = new CardMaidOut();\n $this->otherMaidOldModel = new CardMaid();\n $this->managerMaidService = new Maid();\n $this->commandModel->setCommandName($this->signature);\n }", "title": "" }, { "docid": "ac43e73daf9e8662bed7775f43a9d445", "score": "0.5695586", "text": "public function construct()\n\t{\n\t\t$this->addCommandHandler($this->instance->network->delimiter, \"compile\");\n\t}", "title": "" }, { "docid": "71374af283ed59375474bd0f0c4a18cc", "score": "0.56949234", "text": "protected function registerMakeCommand()\n {\n $this->registerCreator();\n\n $this->app->singleton('command.migrate.make', function ($app) {\n // Once we have the migration creator registered, we will create\n // the command and inject the creator. The creator is responsible\n // for the actual file creation of the migrations, and may be\n // extended by these developers.\n $creator = $app['migration.creator'];\n\n $composer = $app['composer'];\n\n return new MigrateMakeCommand($creator, $composer);\n });\n }", "title": "" }, { "docid": "740dd3f786c5906ae27c05995bef2656", "score": "0.5694783", "text": "public function __construct($command, $active, $class, $icon)\n {\n $this->command = $command;\n $this->active = $active;\n $this->class = $class;\n $this->icon = $icon;\n }", "title": "" }, { "docid": "274401b47cd3b4d0b0611217f89533e4", "score": "0.5675234", "text": "public function __construct($command, $parameters = [])\n {\n $this->command = strtoupper($command);\n $this->parameters = $parameters;\n }", "title": "" }, { "docid": "c73586f68fcf876861bd8befcfaae09b", "score": "0.56731313", "text": "function ChatCommand($name, $help, $isadmin) {\n\t\t$this->name = $name;\n\t\t$this->help = $help;\n\t\t$this->isadmin = $isadmin;\n\t}", "title": "" }, { "docid": "216796f6d1f387f04d7b8b05196571e0", "score": "0.56712925", "text": "public static function add($command){\r\n return \\Illuminate\\Console\\Application::add($command);\r\n }", "title": "" }, { "docid": "96aed3ba908ba901f0c6d9c807a2082a", "score": "0.56567776", "text": "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "title": "" }, { "docid": "5934106e5f1ecda3ee2b174b25336c3d", "score": "0.5652508", "text": "public function createCommandInvoker()\n {\n $mock = $this->mock('Dhii\\Invocation\\CommandInvokerInterface')\n ->invoke()\n ->new();\n\n return $mock;\n }", "title": "" }, { "docid": "7998d3f4da6ba0ef7d9e0229367abc4f", "score": "0.5637505", "text": "public function createCommand($sql = null, $params = [])\n {\n /** @var Command $command */\n $command = new $this->commandClass([\n 'adapter' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "title": "" }, { "docid": "8a24c6298e61b3c49ba23150db8c5af4", "score": "0.5631567", "text": "public function addCommand(Command $command): void;", "title": "" }, { "docid": "de32c4f675ff3df717791dc295960cb9", "score": "0.56217533", "text": "function getCommand()\n {\n }", "title": "" }, { "docid": "68c1f5bdca1194e95291f0b34c3c5040", "score": "0.5618603", "text": "public function buildCmd($rawCmd, $terminalId) {\n\t\t$cmd = new Cmd;\n\t\t$cmd->setCmd($rawCmd);\n\t\treturn $cmd;\n\t}", "title": "" }, { "docid": "250c0caa68980fa80eaa301e18422d91", "score": "0.5615263", "text": "public function getCommand( $args );", "title": "" }, { "docid": "f640e6a6a6715e99e03a31c58264111e", "score": "0.56133074", "text": "protected function validate(): Command\n {\n return $this;\n }", "title": "" }, { "docid": "214f208fe685033bb2726b18f25b1d6c", "score": "0.56106615", "text": "public function __construct()\n {\n parent::__construct();\n\n // $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_SCAFFOLD);\n }", "title": "" }, { "docid": "705a7e637ed86d5dfbec2b82d53f40af", "score": "0.5607357", "text": "public function getCommandCreator(Logger $logger = null)\n {\n return new CommandCreator(\n $this->getLogger($logger)\n );\n }", "title": "" }, { "docid": "ccd44d7229847bd580813da88f4172a4", "score": "0.5606029", "text": "public function create()\n {\n // NOT USED\n }", "title": "" }, { "docid": "f95a68c92f8ddf3879a38ab538d169a7", "score": "0.5602428", "text": "public static function create()\n {\n return new static(func_get_args());\n }", "title": "" }, { "docid": "6f6df291ec569b4e7f32d0db87005764", "score": "0.5602211", "text": "public static function fromCallable(Application $app, string $signature, callable $resolver, string $description = \"\"): Command\n {\n return (new Command($app))\n ->signature($signature)\n ->resolver($resolver)\n ->description($description);\n }", "title": "" }, { "docid": "c6f5f076f5e35c05d0ee94df5adf4e5e", "score": "0.5598325", "text": "public function registerArtisanCommand()\n {\n $this->app->bindShared('commander.command.make', function($app)\n {\n return $app->make('Laracasts\\Commander\\Console\\CommanderGenerateCommand');\n });\n\n $this->commands('commander.command.make');\n }", "title": "" }, { "docid": "35c725c3fadbcbc58a9afe65b70a8301", "score": "0.55963576", "text": "protected function createDefinition()\n {\n return new InputDefinition([\n // WTF? The name `command` can't be used here\n new InputArgument('cmd', InputArgument::REQUIRED, 'Command'),\n new InputArgument('option', InputArgument::OPTIONAL, 'Option'),\n new InputArgument('value', InputArgument::OPTIONAL, 'Value'),\n ]);\n }", "title": "" }, { "docid": "c86038fbff52e27c62ab47cbae5cd9e0", "score": "0.55840117", "text": "public function createCmd(\n $eqLogic,\n $cmdLogicalId,\n $cmdName,\n $cmdType,\n $cmdSubType,\n $showOnDashboard,\n $unite = \"W\"\n ) {\n $cmd = $eqLogic->getCmd(null, $cmdLogicalId);\n if (!is_object($cmd)) {\n $cmd = new \\honeywellCmd();\n $cmd->setLogicalId($cmdLogicalId);\n $cmd->setName($cmdName);\n\n if ($cmdType == \"info\") {\n $cmd->setUnite($unite);\n }\n\n $cmd->setType($cmdType);\n $cmd->setSubType($cmdSubType);\n $cmd->setEqLogic_id($eqLogic->getId());\n $cmd->setDisplay(\"showOndashboard\", $showOnDashboard == true ? \"1\" : \"0\");\n $cmd->save();\n }\n }", "title": "" }, { "docid": "e407ab946305f3661fbcfae16ee63a4c", "score": "0.55838406", "text": "public function __construct($command, $args = [])\n {\n $this->command = $command;\n $this->commandArgs = $args;\n \n $this->initialize();\n }", "title": "" }, { "docid": "4310f6310c9cb930a1065248e8c42bec", "score": "0.5567114", "text": "protected function commands()\n {\n $this->add(new MakeCommand());\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" }, { "docid": "a7af95812586e8fe7f606fe4fb7e9d78", "score": "0.55640906", "text": "public function create() {\n }", "title": "" } ]
bddf23fe3835f2737ca4a9d8ee95489b
Static Helper Method to Create using PathInfo arguments
[ { "docid": "4e2dd9ab767f363b8e492b3a50b52a79", "score": "0.48215586", "text": "public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t$intUnidadId = QApplication::PathInfo(0);\n\t\t\treturn UnidadesMetaControl::Create($objParentObject, $intUnidadId, $intCreateType);\n\t\t}", "title": "" } ]
[ { "docid": "59d6e2a369b2c108512d1091ffc64daa", "score": "0.6689932", "text": "private function make()\n\t{\n\t\t$pathParts = func_get_args();\n\n\t\t$ds = DIRECTORY_SEPARATOR;\n\t\t$path = implode($ds, $pathParts);\n\n\t\t// correct separator\n\t\t$path = str_replace('/', $ds, $path);\n\t\t$path = str_replace('\\\\', $ds, $path);\n\n\t\t// replace \"/./\" and \"//\"\n\t\twhile (strpos($path, $ds . '.' . $ds) !== FALSE || strpos($path, $ds . $ds) !== FALSE)\n\t\t{\n\t\t\t$path = str_replace($ds . $ds, $ds, $path);\n\t\t\t$path = str_replace($ds . '.' . $ds, $ds, $path);\n\t\t}\n\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "5ec14d7b7fb7250f597a2001b24bc7cf", "score": "0.64821345", "text": "static public function make()\n\t{\n\t\t$pathParts = func_get_args();\n\n\t\t$ds = DIRECTORY_SEPARATOR;\n\t\t$path = implode($ds, $pathParts);\n\n\t\t// correct separator\n\t\t$path = str_replace('/', $ds, $path);\n\t\t$path = str_replace('\\\\', $ds, $path);\n\n\t\t// replace \"/./\" and \"//\"\n\t\t$path = str_replace($ds . $ds, $ds, $path);\n\t\t$path = str_replace($ds . '.' . $ds, $ds, $path);\n\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "2540227fc6bfbbd7613a96f4aa5a29eb", "score": "0.6358705", "text": "public function createPathTo(string $name): string;", "title": "" }, { "docid": "dc08c9e23ede255dd6ed6c92147bb17e", "score": "0.61406857", "text": "public static function create_files() {}", "title": "" }, { "docid": "e459eb1d2b70607f3f9554b5c1ac86e4", "score": "0.6057544", "text": "abstract function getPathParser();", "title": "" }, { "docid": "566372c9aed74e3874f7feb28a59df06", "score": "0.6020532", "text": "public static function create($path, array $vars=array());", "title": "" }, { "docid": "08bd3763e36e4fb588611a8406a639bc", "score": "0.59744537", "text": "static public function makeAndCheckFile()\n\t{\n\t\t$args = func_get_args();\n\t\t$path = call_user_func_array('self::make', $args);\n\t\tself::checkFile($path);\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "cb35c66d1ffd8855229b8088794e4507", "score": "0.58028907", "text": "public function create(string $path, string $value, array $acls, int $flags = NULL): string {}", "title": "" }, { "docid": "7a7b17bff4e8eb7f4cb5e7d07643e88e", "score": "0.5798936", "text": "public function create()\n {\n $this->createUniqueDirectoryName();\n $this->makeDirectory();\n }", "title": "" }, { "docid": "c70deceb77080d1b85d9945f3cb27fc0", "score": "0.5715711", "text": "public function __construct ($path) {}", "title": "" }, { "docid": "c70deceb77080d1b85d9945f3cb27fc0", "score": "0.5715711", "text": "public function __construct ($path) {}", "title": "" }, { "docid": "82c27c26bf08791e9b82e4699020685c", "score": "0.56686264", "text": "static public function makeAndCheckDirectory()\n\t{\n\t\t$args = func_get_args();\n\t\t$path = call_user_func_array('self::make', $args);\n\t\tself::checkDirectory($path);\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "026974fac4b9cf17449c990a4f4f9e64", "score": "0.5592414", "text": "protected abstract function createTargetDir();", "title": "" }, { "docid": "acb9e8ff5149177190a2c85c78758838", "score": "0.5557116", "text": "protected static function factory()\n {\n return Factory\\PathFactory::instance();\n }", "title": "" }, { "docid": "78f0f4ff014c42f19452a4edbdf198d4", "score": "0.54996127", "text": "abstract protected function create(): string;", "title": "" }, { "docid": "92b6033bda5c102c984934eb83a60509", "score": "0.5486656", "text": "function pathinfo ($path, $options = null) {}", "title": "" }, { "docid": "8139f1884cc4d8337dcbaa09b8aa7bcd", "score": "0.5460005", "text": "public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t$intWikiVersionId = QApplication::PathInfo(0);\n\t\t\treturn WikiFileMetaControl::Create($objParentObject, $intWikiVersionId, $intCreateType);\n\t\t}", "title": "" }, { "docid": "c603a36351da5e54f559f5413d8dd166", "score": "0.5455211", "text": "private function constructPathname($pathname) {\n if ($pathname === null) {\n throw new NullPointerException(\"Argument to function must not be null\");\n }\n\n $this->path = String::asWrapper(self::$fs->normalize($pathname));\n $this->prefixLength = (int) self::$fs->prefixLength($this->path->toNative());\n }", "title": "" }, { "docid": "26b388b1d84cb57ddc62d468e2fcaa5f", "score": "0.5436037", "text": "public function getPathForCreation()\n {\n }", "title": "" }, { "docid": "d789aad09ec2c706062284cc9e795dc6", "score": "0.5432436", "text": "function createpath($path)\n{\n\t\t$exp=explode(\"/\",$path);\n\t\t\t\t$way='';\n\t\t\t\tforeach($exp as $n)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$way.=$n;\n\t\t\t\t\t\t@mkdir($way, 0777);\n\t\t\t\t\t\t@chmod($way, 0777);\n\t\t\t\t\t$way.='/';\n\t\t\t\t\t\t\n\t\t\t\t}\n}", "title": "" }, { "docid": "d789aad09ec2c706062284cc9e795dc6", "score": "0.5432436", "text": "function createpath($path)\n{\n\t\t$exp=explode(\"/\",$path);\n\t\t\t\t$way='';\n\t\t\t\tforeach($exp as $n)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$way.=$n;\n\t\t\t\t\t\t@mkdir($way, 0777);\n\t\t\t\t\t\t@chmod($way, 0777);\n\t\t\t\t\t$way.='/';\n\t\t\t\t\t\t\n\t\t\t\t}\n}", "title": "" }, { "docid": "f2f0946e277cc57410e60109ee9ff5ee", "score": "0.54215634", "text": "public static function pathCreate($options=NULL)\n {\n \tif($options==NULL && !is_string($options) && !strlen(trim($options))){\n \t\tthrow Dadiweb_Throw_ErrorException::showThrow(sprintf('Critical error. Path was not transmitted into \"%s\"', __METHOD__));\n \t}\n \tif(!is_dir($options=self::pathValidator($options)) && !mkdir($options,'755',true)){\n \t\tthrow Dadiweb_Throw_ErrorException::showThrow(sprintf('Critical error. You do not have sufficient rights to create a path \"%s\"', $options));\n \t}\n \treturn $options;\n }", "title": "" }, { "docid": "c68d0769d2c69f7b129e27912cffadfa", "score": "0.5367883", "text": "function createPath ($new_path){\n $arrCarpetas = explode (BARRA_SERVIDOR, $new_path);\n \n //recorro todas las carpetas que hay en la ruta que me pasan\n for( $i=0; $i<(sizeof($arrCarpetas)); $i++ ){\n \n \t$path = \"\";\n \n \t//voy creando el path\n \tfor( $j=0; $j<=$i; $j++ ){\n $path .= $arrCarpetas[$j].BARRA_SERVIDOR;\n }\n \n //si el path no existe, lo creo\n if( !is_dir(UPLOAD_DIR.BARRA_SERVIDOR.$path) ){\n mkdir ( UPLOAD_DIR.BARRA_SERVIDOR.$path, 0755 );\n }\n }\n }", "title": "" }, { "docid": "a7a5802f895f51a95c233cb0c6863d26", "score": "0.53428495", "text": "public function createDir($path) { }", "title": "" }, { "docid": "3f0750d7a187ef73b0140c2d5aa581e7", "score": "0.52850777", "text": "protected static function factory() {}", "title": "" }, { "docid": "1b9ae1727a0d57bdff9485f3371572d1", "score": "0.5284494", "text": "public function create()\n {\n $files = new Filesystem();\n $files->mkdir($this->getDataDirPath());\n }", "title": "" }, { "docid": "239652fb2507998c19d5c4e6e61da50d", "score": "0.52705723", "text": "public function testToPath() {\n\t\t$this->assertEquals('/test/namespace/ClassName.php', $this->object->toPath('\\test\\namespace\\ClassName'));\n\t\t$this->assertEquals('/test/namespace/Class/Name.php', $this->object->toPath('\\test\\namespace\\Class_Name'));\n\n\t\t$this->assertEquals('/Test/NameSpace/ClassName.php', $this->object->toPath('\\Test\\NameSpace\\ClassName'));\n\t\t$this->assertEquals('/Test/NameSpace/Class/Name.php', $this->object->toPath('\\Test\\NameSpace\\Class_Name'));\n\n\t\t$this->assertEquals('/test/namespace/ClassName.PHP', $this->object->toPath('\\test\\namespace\\ClassName', 'PHP'));\n\t\t$this->assertEquals('/test/namespace/Class/Name.PHP', $this->object->toPath('\\test\\namespace\\Class_Name', 'PHP'));\n\n\t\t$this->assertEquals(TITON . '/test/namespace/ClassName.php', $this->object->toPath('\\test\\namespace\\ClassName', 'php', TITON));\n\t\t$this->assertEquals(TITON . '/test/namespace/Class/Name.php', $this->object->toPath('\\test\\namespace\\Class_Name', 'php', TITON));\n\n\t\t$this->assertEquals(TITON_APP . '/test/namespace/ClassName.php', $this->object->toPath('\\test\\namespace\\ClassName', 'php', TITON_APP));\n\t\t$this->assertEquals(TITON_APP . '/test/namespace/Class/Name.php', $this->object->toPath('\\test\\namespace\\Class_Name', 'php', TITON_APP));\n\t}", "title": "" }, { "docid": "998f7766f4a06366bef093321c5b8f23", "score": "0.52590793", "text": "private function getNewPath() {\n\t\t\n\t\t$path = $this->getRealDir() . self::SLASH . $this->default[\"destination_path\"];\n\t\t\n\t\tif(is_dir($path)) {\n\t\t\treturn $path. self::SLASH . $this->createNewName;\n\t\t}else{\n\t\t\t$this->error = true;\n\t\t\t$this->message = \"'{$path}' not such file or directory\";\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "240b11ccc17e0810d4d733f58624f5f7", "score": "0.5232569", "text": "public function __construct($emplacement)\n {\n $this->emplacement = $emplacement;\n \n $defaultInfo = array(\n 'dirname'=>null,\n 'basename'=>null,\n 'extension'=>null,\n 'filename'=>null\n );\n \n if ($this->isDir() || $this->isFile()) {\n $this->info = array_merge($defaultInfo, pathinfo($emplacement));\n } else {\n $this->info = $defaultInfo;\n }\n }", "title": "" }, { "docid": "f47e1defcb79b0d4daa29a6e0f1681e4", "score": "0.5215895", "text": "public function makeInstance($filePath)\n\t{\n\t\treturn new SplFileInfo($filePath);\n\t}", "title": "" }, { "docid": "0399e07e0391d5ade4cc016dd28c0691", "score": "0.5213278", "text": "protected function createPath($name)\n {\n $name = str_replace('\\\\', DIRECTORY_SEPARATOR, $name);\n $path = $this->projectPath . DIRECTORY_SEPARATOR . $name . '.php';\n return $this->createDirectories($path);\n }", "title": "" }, { "docid": "20154e4f4ea9abbd201a695dcd8c0c0e", "score": "0.52112865", "text": "public function __construct ($path, $flags) {}", "title": "" }, { "docid": "20154e4f4ea9abbd201a695dcd8c0c0e", "score": "0.52112865", "text": "public function __construct ($path, $flags) {}", "title": "" }, { "docid": "7043aa46dc288a03f11448138bd29be6", "score": "0.5207983", "text": "public function create()\n {\n $this->exclude_files_by_pattern();\n $this->_obj->create_archive();\n }", "title": "" }, { "docid": "5701ff545b4a4ec95b3739c46731a592", "score": "0.52073175", "text": "public static function createFromFile($filename);", "title": "" }, { "docid": "14f8ee5688b91c19b16b89092b641c60", "score": "0.51791054", "text": "function crear_carpeta($url,$name){\n $micarpeta = $url.DIRECTORY_SEPARATOR.$name;\n if (!file_exists($micarpeta)) {\n mkdir($micarpeta, 0777, true);\n }\n return $micarpeta;\n}", "title": "" }, { "docid": "a275d09b1d90c3e1c64531b111c4679d", "score": "0.5175733", "text": "public function setPathInfo($pathInfo)\r\n {\r\n $this->pathInfo = $pathInfo;\r\n return $this;\r\n }", "title": "" }, { "docid": "a925bab564c9b550ab26033a265eed7d", "score": "0.5172267", "text": "protected abstract function path(): string;", "title": "" }, { "docid": "012a6889d5ca9f5090c45288ab2eb476", "score": "0.51483065", "text": "protected abstract function createDir($dir);", "title": "" }, { "docid": "58baf8f4bb1497a9afe8e3e50aa90c63", "score": "0.51224905", "text": "abstract protected function create();", "title": "" }, { "docid": "8562aaf54158176cdf959fe7a75a473e", "score": "0.5119939", "text": "public function createPathFileIfNotExists() {\n\t\t$pathfile = FLOW3_PATH_PACKAGES.\"Application/Payment.Atos/Resources/Private/PHP/param/pathfile\";\n\t\tif(!file_exists($pathfile)) {\n\t\t\t// Debug\n\t\t\t$content = \"DEBUG!NO!\\n\";\n\t\t\t// Logo relative path\n\t\t\t$content .= \"D_LOGO!/_Resources/Static/Packages/Payment.Atos/logo/!\\n\";\n\t\t\t$content .= \"F_DEFAULT!\".FLOW3_PATH_PACKAGES.\"Application/Payment.Atos/Resources/Private/PHP/param/parmcom.webaffaires!\\n\";\n\t\t\t$content .= \"F_PARAM!\".FLOW3_PATH_PACKAGES.\"Application/Payment.Atos/Resources/Private/PHP/param/parmcom!\\n\";\n\t\t\t$content .= \"F_CERTIFICATE!\".FLOW3_PATH_PACKAGES.\"Application/Payment.Atos/Resources/Private/PHP/param/certif!\\n\";\n\t\t\t$content .= \"F_CTYPE!php!\";\n\t\t\t\n\t\t\t// Save content in pathfile\n\t\t\tfile_put_contents($pathfile, $content);\n\t\t\t\n\t\t\t// chmod\n\t\t\tchmod($pathfile, 0666);\n\t\t}\n\t}", "title": "" }, { "docid": "6e42820fbc741f2e28a6ee7a32a9f752", "score": "0.5119501", "text": "protected function createNewPath($currentPath, array $config) {\n\t\t// Create simple path\n\t\t$fileParts = pathinfo($this->getPathOnly($currentPath));\n\t\tif (strpos($currentPath, 'typo3temp/') !== false &&\n\t\t\t\tpreg_match('/(?:_|-)[a-f01-9]{6,10}$/i', $fileParts['filename'])) {\n\t\t\t// This is a file from typo3temp/ and it has a hash. Get rid of it\n\t\t\t$fileParts['filename'] = preg_replace('/^(.*)_[a-f01-9]+$/i', '\\1', $fileParts['filename']);\n\t\t}\n\t\t$filename = sprintf('%s.%s', $fileParts['filename'], $fileParts['extension']);\n\t\t$this->cObj->setCurrentVal($filename);\n\t\t$newPath = $this->cObj->cObjGetSingle($config['path'], $config['path.']);\n\n\t\t// If this file name was used already, we have to make it unique\n\t\t$num = 1;\n\t\twhile (isset($this->createdPaths[$newPath]) && $this->createdPaths[$newPath] != $currentPath) {\n\t\t\t// Need to hash this one\n\t\t\t$replacementChar = ($this->config['config']['simulateStaticDocuments_replacementChar'] ?\n\t\t\t\t$this->config['config']['simulateStaticDocuments_replacementChar'] : '_');\n\n\t\t\t$this->cObj->setCurrentVal(sprintf('%s%s%x.%s', $fileParts['filename'],\n\t\t\t\t$replacementChar, $num++, $fileParts['extension']));\n\n\t\t\t$newPath = $this->cObj->cObjGetSingle($config['path'], $config['path.']);\n\t\t}\n\t\treturn $newPath;\n\t}", "title": "" }, { "docid": "d68327efbff700cd86461f2fd6298fca", "score": "0.5108292", "text": "public function createLocalPath()\n {\n if (!is_dir($this->getLocalPath())) {\n if (!mkdir($this->getLocalPath(), 0755, true)) {\n throw new Exception(\"Unable to create path: \" . $this->getLocalPath());\n }\n }\n }", "title": "" }, { "docid": "becef41d3c45c1c32ceda5494a5e664a", "score": "0.510586", "text": "public function testItIsPossibleToRetrieveDirectoryPathAndFilename()\n {\n $directoryPath = '/test/path';\n $baseName = 'file';\n $extension = 'csv';\n $datetimeFormat = 'Y-m-d_H:00:00';\n $datetime = new \\DateTime();\n\n $nameGenerator = new FileNameWithDateTimeGenerator($directoryPath, $baseName, $extension, $datetimeFormat);\n\n $this->assertSame($directoryPath, $nameGenerator->getDirectoryPath());\n $this->assertSame($baseName . '-'. $datetime->format($datetimeFormat) . '.' . $extension, $nameGenerator->getFileName());\n }", "title": "" }, { "docid": "2fcd149a950cec5a7e5642b5335787ba", "score": "0.5092702", "text": "public static function create(): File\n {\n return new File();\n }", "title": "" }, { "docid": "9bd87da6909496682cd233597b3c78e1", "score": "0.50869584", "text": "function generatePath($newFileName)\n {\n //mjlog(DEBUG,__METHOD__,\"this->cfg['dir']['tree']: \". print_r($this->cfg,true));\n $path = '';\n $naming = $this->cfg['dir']['tree'];\n //mjlog(DEBUG,__METHOD__,\"naming[$naming] cfg: \". print_r($this->cfg,true),__LINE__);\n\n if (array_key_exists($naming,self::$_pathFuncs))\n {\n $func = self::$_pathFuncs[$naming];\n $path = $this->$func($newFileName);\n mjlog(DEBUG,__METHOD__,\"func[$func] new path[$path]\",__LINE__);\n }\n else if (substr($naming,0,5) == 'func|') // check naming[func|LocationJs::nameTempFile] \n {\n list($cmd,$func) = explode('|',$naming);\n if (strpos($func,'::') > 0)\n {\n list($class,$meth) = explode('::',$func);\n if (!method_exists($class,$meth))\n {\n mjlog(ERROR,__METHOD__,\"Invalid naming function configured: naming[$naming] class[$class] method[$meth]\",__LINE__);\n if ($class_exists($class))\n mjlog(ERROR,__METHOD__,\"Invalid naming function configured: no class defined class[$class]\",__LINE__);\n return false;\n }\n }\n elseif (!function_exists($str))\n {\n mjlog(ERROR,__METHOD__,\"Invalid naming function configured: $naming\",__LINE__);\n return false;\n }\n $path = call_user_func($func,$newFileName,$this);\n }\n else mjlog(ERROR,__METHOD__,\"Invalid naming function configured\",__LINE__);\n\n //$this->checkPath($this->cfg['dir']['basePath'] .'/ht/'. $path);\n return $path . ($path == '' ? '' : '/');\n }", "title": "" }, { "docid": "8d8e8672fe793aa65094bc2464f7b2ce", "score": "0.50830084", "text": "public function make(string $type): FileParser;", "title": "" }, { "docid": "3c8c6dae5f1df070407e39290791921e", "score": "0.5081635", "text": "private function init_file()\n\t{\n\t\tclearstatcache();\n\t\t$this->dirname = $this->base_dirname;\n\t\t$this->filename = $this->base_filename;\n\t\t$this->split['m'] && $this->dirname .= date(\"Y-m\").DIRECTORY_SEPARATOR;\n\t\t$this->split['d'] && $this->filename .= date(\"_Y-m-d\");\n\t\t$this->filename .= '.'.$this->suffix;\n\t\t!is_dir($this->dirname) && mkdir($this->dirname, 0755, true);\n\t\t!file_exists($this->dirname.$this->filename) && touch($this->dirname.$this->filename);\n\t}", "title": "" }, { "docid": "353910f4119ef0f31b3c40efd89ae131", "score": "0.5079403", "text": "public function make($data)\r\n\t{\r\n\t\treturn new File($data[0],$data[1],$data[2]);\r\n\t}", "title": "" }, { "docid": "d3c3424aacd753b66934b21eb0fb2c05", "score": "0.50745225", "text": "final public static function create() {}", "title": "" }, { "docid": "77ed933c299a1ad0e5016a2bfdc59f70", "score": "0.5069842", "text": "protected function createFactory()\n {\n $factory = Str::studly(class_basename($this->argument('name')));\n\n $this->call('package:factory', [\n 'name' => \"{$factory}Factory\",\n '--model' => $this->argument('name'),\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "f5ce056d290e181406633472959ea58a", "score": "0.5067647", "text": "public function setPathInfo(string $pathInfo): static\n {\n $this->path_info = $pathInfo;\n $this->url_elements = explode('/', $pathInfo);\n\n return $this;\n }", "title": "" }, { "docid": "d57e375f3c7411cbc21c80deff2df3e7", "score": "0.50649726", "text": "abstract protected function getPath();", "title": "" }, { "docid": "74482e4d9aaf0724f87eed753ba91634", "score": "0.5060938", "text": "abstract protected function createLocal();", "title": "" }, { "docid": "0f317f192b98dde505b36d0e2f4ab043", "score": "0.5052016", "text": "private function buildFilePath()\n {\n $str = strtolower($this->file_name);\n\n if (strpos($str, '.')) {\n $structure = explode('.', $str);\n $this->class_name = array_pop($structure);\n } else {\n $structure = array();\n $this->class_name = $str;\n }\n\n $this->class_name = ucfirst($this->class_name);\n\n if (substr(CI_VERSION, 0, 1) != '2') {\n $this->class_name = ucfirst($this->class_name);\n }\n\n $directories = implode('/', $structure);\n\n $file_path = ((strlen($directories) > 1) ? $directories . DIRECTORY_SEPARATOR : '') . $this->class_name . '.php';\n\n return $this->lockup = array(\n 'file_path' => $file_path,\n 'class_name' => $this->class_name,\n 'directories' => $directories,\n );\n }", "title": "" }, { "docid": "33e5bfa3b7889e5e6cc7417c60b8257e", "score": "0.5048333", "text": "abstract protected function createResource();", "title": "" }, { "docid": "8109583057f7dfd2ebb1263e15acc4d0", "score": "0.5039848", "text": "private function createFile()\n {\n $this->GetFileTemplate();\n\n return $this->formatTemplateFile();\n }", "title": "" }, { "docid": "0ef0c2f1fb71221f8bce69bda6fee6dc", "score": "0.50364065", "text": "public function generatePaths()\n {\n }", "title": "" }, { "docid": "5c506f8f84614b98bcae37f974b90099", "score": "0.50268865", "text": "public function setPathInfo($pathInfo)\n {\n $this->pathInfo = $pathInfo;\n\n return $this;\n }", "title": "" }, { "docid": "63ffc7d4c5f273ca8943a1c31027a16c", "score": "0.50244176", "text": "function createPath($path) {\n\t$dirs = explode(DIRECTORY_SEPARATOR, $path);\n\t$completeDir = \"\";\n\tif($dirs[0] != \"\"){\n\t\t$i = 0;\n\t}else{\n\t\t$i = 1;\n\t\t$completeDir .= DIRECTORY_SEPARATOR;\n\t}\n\n\tfor($i; $i < count($dirs) -1; $i++){\n\t\t$completeDir .= $dirs[$i] . DIRECTORY_SEPARATOR;\n\t\tif (!file_exists($completeDir)){\n\t\t\tmkdir($completeDir);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "6a3e7e92cfa1a63551422c79f0433e45", "score": "0.50175864", "text": "function path_for($name, $args = array()) {\n global $router, $config;\n\n // discover the path\n if (isset($router->{$name})) {\n\n $path = $router->{$name}->path($args);\n\n } elseif ($name === 'homepage') {\n\n $path = '/';\n\n } else {\n\n $path = $name;\n\n }\n\n // create the link\n if (!$config->front_file) {\n $path = ltrim($path, '/');\n }\n\n if ($config->front_file === 'index.php') {\n\n if ($path === '/') {\n\n return $config->web;\n\n } else {\n return $config->web . $config->front_file . $path;\n\n }\n\n } else {\n\n return $config->web . $config->front_file . $path;\n\n }\n\n}", "title": "" }, { "docid": "087ff7979042ac9d0e68f97b7ec00526", "score": "0.5011175", "text": "abstract protected function createResource( $path, $content = null );", "title": "" }, { "docid": "8f0a1c7d762c69d97649454c180e16e6", "score": "0.50007004", "text": "function __construct( $info ) {\n\t\t// which doesn't exist in Swift.\n\t\tFileRepo::__construct( $info );\n\n\t\t// Required settings\n\t\t$this->url = $info['url'];\n\n\t\t// Optional settings\n\t\t$this->hashLevels = isset( $info['hashLevels'] ) ? $info['hashLevels'] : 2;\n\t\t$this->deletedHashLevels = isset( $info['deletedHashLevels'] ) ?\n\t\t\t$info['deletedHashLevels'] : $this->hashLevels;\n\n\t\t// This relationship is also hard-coded in rewrite.py, another part of this\n\t\t// extension. If you want to change this here, you might have to change it\n\t\t// there, too.\n\t\t$this->thumbUrl = \"{$this->url}/thumb\";\n\n\t\t// we don't have directories\n\t\t$this->deletedDir = false;\n\n\t\t// Required settings\n\t\t$this->swiftuser= $info['user'];\n\t\t$this->swiftkey= $info['key'];\n\t\t$this->authurl= $info['authurl'];\n\t\t$this->container= $info['container'];\n\t}", "title": "" }, { "docid": "e4b9b8faa8ac9d9579590382659dc1b4", "score": "0.49914226", "text": "public static function create();", "title": "" }, { "docid": "b14e80a331d0d5acd56bb4c70608f89f", "score": "0.49904963", "text": "function create_for_path($target_path, $cfg) {\n global $CONFIG, $PLUGINS;\n\n // a function we can pass along to render markdown with our parsedown parser\n $parse_func = function ($markdown) {return MarkdownExtra::defaultTransform($markdown);};\n\n\n // test for illegal paths\n if (preg_match('/\\\\.\\\\./', $target_path)) {\n throw new Error(\"[create_for_path] Path can't contain ..\");\n }\n\n // defaults\n if (!isset($cfg['use'])) $cfg['use'] = $target_path;\n if (!isset($cfg['title'])) $cfg['title'] = $CONFIG['title'];\n $cfg['url'] = $target_path;\n\n custom_log(\"\\n## Rendering contents of `$cfg[use]`\");\n\n // build plugin library\n $plugins = [];\n if (isset($cfg['plugin'])) {\n // if it's not an arrray of objects, but an associative array\n // turn it into an array pf associative arrays\n if (!isset($cfg['plugin'][0])) $cfg['plugin'] = [$cfg['plugin']];\n\n $log_loaded_plugins = [];\n foreach ($cfg['plugin'] as $plugin_cfg) {\n $plugin_cfg['..'] = &$cfg;\n if (isset($PLUGINS[$plugin_cfg['name']])) {\n $plugins[] = [\n \"methods\" => $PLUGINS[$plugin_cfg['name']],\n \"config\" => $plugin_cfg\n ];\n $log_loaded_plugins[] = $plugin_cfg['name'];\n } else {\n custom_log('**Error: Plugin '.$plugin_cfg['name'].' could not be found!**');\n }\n }\n custom_log(\"Using plugns: \" . implode(\", \", $log_loaded_plugins));\n }\n\n // call before_route\n call_plugin_function($plugins, 'before_route', [$target_path]);\n\n // choose a layout\n $layout = $CONFIG['layout'];\n if (isset($cfg['layout'])) $layout = $cfg['layout'];\n\n // get recursive flag (default false)\n $recursive = isset($cfg['recursive']) ? $cfg['recursive'] : false;\n\n // make header list\n // order is global[headers], route[headers], config[css]\n $headers = array_merge([], $CONFIG['headers']);\n\n if (isset($cfg['headers'])) {\n $headers = array_merge($headers, is_array($cfg['headers']) ? $cfg['headers'] : [$cfg['headers']]);\n }\n\n // add css to headers\n $headers = array_merge($headers, [\n '<link rel=\"stylesheet\" href=\"{{root}}/css/base.css\"/>',\n '<link rel=\"stylesheet\" href=\"{{root}}/css/current_theme.php\"/>'\n ]);\n\n if (isset($cfg['css'])) {\n $css = $cfg['css'];\n if (!is_array($css)) $css = [$css];\n foreach($css as $cssurl) {\n $headers[] = \"<link rel=\\\"stylesheet\\\" href=\\\"{{root}}/css/$cssurl\\\"/>\";\n }\n }\n\n // make headers into a string\n $headers = implode(\"\\n\", $headers);\n\n // list of files in Directory\n $folder = in_source_folder($cfg['use'] . \"/\");\n // list of relative paths\n $files = scanndir_recursive($folder, $recursive);\n\n $rendered_pages = [];\n\n // create path to files:\n mkdir(in_project_root($target_path), 0777, true);\n\n foreach ($files as $file) {\n // ignore non markdown files\n if (preg_match('/\\\\.md$/', $file) != 1) continue;\n\n // get file contents (markdown)\n $raw_content = file_get_contents($folder . $file);\n\n custom_log(\"\\n### $file\");\n\n // remove metadata from file and save in array $metadata\n $raw_content = extract_metadata($raw_content, $metadata);\n\n custom_log(\"metadata: `\" . json_encode($metadata) . '`');\n\n // extract title from metadata (or raw content, if no title is set in metadata)\n $title = create_title($cfg['title'], extract_title($metadata, $raw_content));\n\n // apply plugin\n call_plugin_function($plugins, 'before_parse', $raw_content, $file, $metadata);\n\n // parse markdown\n $content_body = MarkdownExtra::defaultTransform($raw_content);\n\n // assemble html file\n $content = complete_doc($content_body, $title, $layout, $headers);\n\n // apply plugin\n call_plugin_function($plugins, 'after_parse', $content, $file, $metadata);\n\n $target_file = in_project_root($target_path . preg_replace('/\\\\.md$/', '.html', $file));\n\n // create path to file (if necessary)\n mkdir(dirname($target_file), 0777, true);\n\n // write generated file\n file_put_contents($target_file, $content);\n\n // save some details about the generated page\n $rendered_pages[] = [\n 'metadata' => $metadata,\n 'title' => $title,\n 'url' => preg_replace('/^\\\\/*/', '/', '/' . $target_path . preg_replace('/\\\\.md$/', '.html', $file)),\n 'file' => $file,\n 'content' => $content_body\n ];\n }\n\n // if the plugin wants to generate an index, let it do it's job\n call_plugin_function($plugins, 'after_route', [\n $rendered_pages,\n function ($file, $content, $title, $appendToOriginalContent = false) use ($target_path, $layout, $headers, $rendered_pages) {\n $url = $target_path . $file;\n if ($appendToOriginalContent) {\n $contentFromPagesWithSameName = implode(\n \"\\n\\n\",\n array_map(\n function ($page) {\n return $page[\"content\"];\n },\n array_filter(\n $rendered_pages,\n function ($page) use ($target_path, $file, $url) {\n return $page[\"url\"] == $url;\n }\n )\n )\n );\n\n $content = $contentFromPagesWithSameName . \"\\n\\n\" . $content;\n }\n\n $rendered_pages[] = [\n 'metadata' => [],\n 'title' => $title,\n 'url' => $url,\n 'file' => null,\n 'content' => $content\n ];\n $filename = in_project_root($target_path . '/' . $file);\n file_put_contents($filename, complete_doc($content, $title, $layout, $headers));\n return $filename;\n },\n $parse_func,\n function ($file, $content) use ($target_path) {\n $filename = in_project_root($target_path . '/' . $file);\n file_put_contents($filename, $content);\n return $filename;\n }\n ]);\n return $rendered_pages;\n}", "title": "" }, { "docid": "9a712838e158e9c3242fe51d7dffa3af", "score": "0.4986748", "text": "protected function createCachePath($path) {\n $path = trim($path,'/');\n $parts = explode('/', $path);\n $filename = str_replace(array(\"\\\\\",'/',':','*','?','\"','<','>','|'),'',array_pop($parts));\n $filePath = $this->cacheFolder . '/';\n while ($thisFolder = array_shift($parts)) {\n $filePath .= str_replace(array(\"\\\\\",'/',':','*','?','\"','<','>','|'),'',$thisFolder) . '/';\n if (!is_dir($filePath)) {\n mkdir($filePath);\n }\n }\n return $filePath . $filename;\n }", "title": "" }, { "docid": "54c5e0a8ee4641cc011ec7668e06bf3f", "score": "0.49861154", "text": "public function createFileInfos($asset);", "title": "" }, { "docid": "d1ac81a5a728e1c7b77a18977f3ef70d", "score": "0.49843308", "text": "public function createDir() {\n \n\t\t$companyName = $this->request->data ['companyName'];\n\t\t\n\t\tmkdir(\"/../../{$companyName}\", 0700);\n\t\t\n }", "title": "" }, { "docid": "e54f36da8f614fde714fd73a43531dae", "score": "0.49797645", "text": "public function newFile(File $file, string $path);", "title": "" }, { "docid": "41b4991ed40d828cd5cc05ef3a6fb67f", "score": "0.4974256", "text": "function createFile(&$folderName, &$separator, &$fileName, &$fileSplit) {\n $f = fopen($folderName.$separator.$fileName.\"_\".$fileSplit.\".json\", \"w+\");\n fwrite($f, \"[\\n\");\n return $f;\n}", "title": "" }, { "docid": "a0595992b35a4a9b7eb894ab81c44dc5", "score": "0.49699116", "text": "function __construct(string $path=\"\") {\n $this->path = $path;\n }", "title": "" }, { "docid": "67bccd959ba74262c82c10be13938dc8", "score": "0.49688432", "text": "public function create(array $data)\n\t{\n if($data['fileType'] == self::TYPE_FILE) {\n return Flysystem::put($data['name'], $data['content']);\n } else {\n return Flysystem::createDir($data['name']);\n }\n\t}", "title": "" }, { "docid": "ca46e91bbbb6991583a3b788efabe2b6", "score": "0.49665928", "text": "protected function createFactory()\n {\n $factory = Str::studly(class_basename($this->argument('name')));\n\n $this->call('make:factory', [\n 'module' => $this->getModule()['key'],\n 'name' => \"{$factory}Factory\",\n '--model' => $this->argument('name'),\n ]);\n }", "title": "" }, { "docid": "32a5d4eeee6c9952ce349fdbde8b3ef5", "score": "0.4961876", "text": "protected function fileCreate()\n {\n $io = new Varien_Io_File();\n $io->setAllowCreateFolders(true);\n $io->open(array('path' => $this->getPath()));\n $io->streamOpen($this->getSitemapFilename());\n\n $io->streamWrite('<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . \"\\n\");\n $io->streamWrite('<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">');\n $this->_io = $io;\n }", "title": "" }, { "docid": "a7676fdc31f16e7babf9f6e1572ea15a", "score": "0.49601826", "text": "public function test_create_contract_file_in_subdirectory()\n {\n $creator = $this->createInstance($this->modelWithSubDirectory);\n\n $result = $creator->create();\n\n $this->assertNotNull($result, 'creation result is NULL');\n $this->assertIsArray($result, 'create() return value is NOT OF TYPE ARRAY');\n $this->assertCount(2, $result);\n }", "title": "" }, { "docid": "c19cdd55be215a6a80ed7d90878e8d99", "score": "0.4939992", "text": "abstract public function generate($name, $params = array(), $absolute = false);", "title": "" }, { "docid": "4875c2585fc4db298435e0c4858dcf03", "score": "0.49246725", "text": "function smarty_core_create_dir_structure( $params, &$smarty )\r\n{\r\n if ( !file_exists( $params['dir'] ) )\r\n {\r\n $_open_basedir_ini = ini_get( \"open_basedir\" );\r\n if ( DIRECTORY_SEPARATOR == \"/\" )\r\n {\r\n $_dir = $params['dir'];\r\n $_dir_parts = preg_split( \"!/+!\", $_dir, 0 - 1, PREG_SPLIT_NO_EMPTY );\r\n $_new_dir = substr( $_dir, 0, 1 ) == \"/\" ? \"/\" : getcwd( ).\"/\";\r\n if ( $_use_open_basedir = !empty( $_open_basedir_ini ) )\r\n {\r\n $_open_basedirs = explode( \":\", $_open_basedir_ini );\r\n }\r\n }\r\n else\r\n {\r\n $_dir = str_replace( \"\\\\\", \"/\", $params['dir'] );\r\n $_dir_parts = preg_split( \"!/+!\", $_dir, 0 - 1, PREG_SPLIT_NO_EMPTY );\r\n if ( preg_match( \"!^((//)|([a-zA-Z]:/))!\", $_dir, $_root_dir ) )\r\n {\r\n $_new_dir = $_root_dir[1];\r\n if ( isset( $_root_dir[3] ) )\r\n {\r\n array_shift( $_dir_parts );\r\n }\r\n }\r\n else\r\n {\r\n $_new_dir = str_replace( \"\\\\\", \"/\", getcwd( ) ).\"/\";\r\n }\r\n if ( $_use_open_basedir = !empty( $_open_basedir_ini ) )\r\n {\r\n $_open_basedirs = explode( \";\", str_replace( \"\\\\\", \"/\", $_open_basedir_ini ) );\r\n }\r\n }\r\n foreach ( $_dir_parts as $_dir_part )\r\n {\r\n $_new_dir .= $_dir_part;\r\n if ( $_use_open_basedir )\r\n {\r\n $_make_new_dir = FALSE;\r\n foreach ( $_open_basedirs as $_open_basedir )\r\n {\r\n if ( substr( $_new_dir, 0, strlen( $_open_basedir ) ) == $_open_basedir )\r\n {\r\n $_make_new_dir = TRUE;\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $_make_new_dir = TRUE;\r\n }\r\n if ( $_make_new_dir && !file_exists( $_new_dir ) && !mkdir( $_new_dir, $smarty->_dir_perms ) && !is_dir( $_new_dir ) )\r\n {\r\n $smarty->trigger_error( \"problem creating directory '\".$_new_dir.\"'\" );\r\n return FALSE;\r\n }\r\n $_new_dir .= \"/\";\r\n }\r\n }\r\n}", "title": "" }, { "docid": "d112d6f937dd8929b98f2915cd45e5b6", "score": "0.4917954", "text": "protected function createResource()\n {\n $resource = Str::studly(class_basename($this->argument('name')));\n\n $this->call('module:resource', [\n 'name' => $resource,\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "d912b6c8a4365101825e1deee9c89de3", "score": "0.489659", "text": "public function create($input);", "title": "" }, { "docid": "d912b6c8a4365101825e1deee9c89de3", "score": "0.489659", "text": "public function create($input);", "title": "" }, { "docid": "6fd747665216dfbb4b0dbd0a2411b05d", "score": "0.48958156", "text": "public function __construct()\n {\n $args = func_get_args();\n\n $this->createResource();\n\n // $image\n if (isset($args[0]) && !is_numeric($args[0]) && file_exists($args[0])) {\n $this->name = $args[0];\n $this->load();\n // $width, $height, $name\n } else if ((count($args) >= 2) && is_numeric($args[0]) && is_numeric($args[1])) {\n $this->width = $args[0];\n $this->height = $args[1];\n if (isset($args[2]) && !is_numeric($args[2])) {\n $this->name = $args[2];\n }\n $this->create();\n }\n }", "title": "" }, { "docid": "9cd8742a64393d64bc38f610de068aa0", "score": "0.48929757", "text": "abstract public function create();", "title": "" }, { "docid": "9cd8742a64393d64bc38f610de068aa0", "score": "0.48929757", "text": "abstract public function create();", "title": "" }, { "docid": "020908a0912cad8ab0ad2a8b1be782dd", "score": "0.48700386", "text": "public function test_create_generic_token_factory_paths()\n {\n\n $payumBuilder = m::mock('Payum\\Core\\PayumBuilder');\n $filesystem = m::mock('Illuminate\\Filesystem\\Filesystem');\n $app = m::mock('Illuminate\\Contracts\\Foundation\\Application');\n $config = [\n 'route.as' => 'payum.',\n ];\n $manager = new PayumBuilderManager($payumBuilder, $filesystem, $app, $config);\n\n /*\n |------------------------------------------------------------\n | Expectation\n |------------------------------------------------------------\n */\n\n /*\n |------------------------------------------------------------\n | Assertion\n |------------------------------------------------------------\n */\n\n $this->assertSame([\n 'authorize' => $config['route.as'].'authorize',\n 'capture' => $config['route.as'].'capture',\n 'notify' => $config['route.as'].'notify',\n 'payout' => $config['route.as'].'payout',\n 'refund' => $config['route.as'].'refund',\n 'cancel' => $config['route.as'].'cancel',\n 'sync' => $config['route.as'].'sync',\n 'done' => $config['route.as'].'done',\n ], $manager->createGenericTokenFactoryPaths());\n }", "title": "" }, { "docid": "31f661c6c6c4f782193e21010e439a5a", "score": "0.48674887", "text": "public function getPathInfo();", "title": "" }, { "docid": "5d45bc05c83d94b34272c735ee3384a7", "score": "0.48575255", "text": "public static function create(string $path, int $mode = -1): string {\n\t\tif ($mode < 0) {\n\t\t\t$mode = self::defaultMode();\n\t\t}\n\t\tif (is_dir($path)) {\n\t\t\treturn $path;\n\t\t}\n\t\tif (!@mkdir($path, $mode, true)) {\n\t\t\tclearstatcache();\n\n\t\t\tthrow new DirectoryCreate($path);\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "3b695e15232d438ba7854258c41ae323", "score": "0.48465052", "text": "public function makePath($path) {\n\t\t// remove any \"/\" at the start of the path\n\t\t$full_path = (substr($path, 0, 1) == '/') ? substr($path, 1) : $path;\n\t\t// get the path parts\n\t\t$path_parts = explode('/', $full_path);\n\t\tif(count($path_parts)) {\n\t\t// sub path structure to create\n\t\t\t// recursively make the path structure\n\t\t\t$this->makePathRecursive($path_parts);\n\t\t} else {\n\t\t// only one folder being created in the current directory\n\t\t\t// call again with the current directory set as the path\n\t\t\t$this->makePath(\"./{$full_path}\");\n\t\t}\n\t}", "title": "" }, { "docid": "daed930637587b027778b6fc8633c987", "score": "0.48390678", "text": "abstract function createFolder($folder);", "title": "" }, { "docid": "3a90bbde374e23c8872de335b8032314", "score": "0.483874", "text": "public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t$intEMPLEADOIdEMPLEADO = QApplication::PathInfo(0);\n\t\t\t$intLICENCIAIdLICENCIA = QApplication::PathInfo(1);\n\t\t\treturn ResponsableMetaControl::Create($objParentObject, $intEMPLEADOIdEMPLEADO, $intLICENCIAIdLICENCIA, $intCreateType);\n\t\t}", "title": "" }, { "docid": "28aab9d197cfead56066e1988e6bd119", "score": "0.4834737", "text": "public function getClassName(){return \"BayrellCommon.FileSystem.FileInfo\";}", "title": "" }, { "docid": "41e9a084f5e82872e26b97958c205992", "score": "0.48338327", "text": "public function generatePattern()\n {\n $patterns = [];\n $vars = [];\n foreach ($this->params as $key => $path)\n {\n $path = ltrim($path, '/');\n $found = false;\n foreach ($this->options as $placeholder => $part)\n {\n // Check if path has prefix\n if (helper::str_starts_with($path, $placeholder))\n {\n $vars[str_replace($placeholder, \"\", $path)] = null;\n $patterns[] = \"\\/{$part}\";\n $found = true;\n break;\n }\n }\n\n // use path name if no prefix\n if (!$found)\n {\n $vars[$path] = null;\n $patterns[] = \"\\/{$path}\";\n }\n }\n\n $this->vars = $vars;\n $this->pattern = implode($patterns);\n }", "title": "" }, { "docid": "8e4441361ed570539222bc3793021289", "score": "0.48331052", "text": "function make_path($path) {\n if (is_dir($path) || file_exists($path)) return $path;\n //No, create it\n if(mkdir($path, 0777, true))\n \treturn $path;\n else\n \treturn false;\n}", "title": "" }, { "docid": "d0f42c057f070566e53eb137cfe4f936", "score": "0.4828859", "text": "abstract public function createResource();", "title": "" }, { "docid": "d5e29f09370ef9a4a11d7a5bc2fa2edc", "score": "0.48278907", "text": "public function createFolder($basename);", "title": "" }, { "docid": "9e09990590110cd879ac1582712e6901", "score": "0.4825243", "text": "public function create(&$config, $args);", "title": "" }, { "docid": "53d84337ce7c1105bcecdec6ad785d4b", "score": "0.48198107", "text": "protected function createTemplatesFiles()\n {\n $paths = array(\n 'base' => $this->getContextPath() . '/BaseContext.php',\n 'feature' => $this->getContextPath() . '/FeatureContext.php'\n );\n\n foreach ($paths as $name => $path) {\n $this->createFile($path, $this->getTemplate($name));\n }\n }", "title": "" }, { "docid": "fcd4f07effc5db6c2515682b31bcbec9", "score": "0.48138496", "text": "protected abstract function createFile($file, $index, Tar $tar);", "title": "" }, { "docid": "cf593a758c3f0f98b7358634708a4fd2", "score": "0.48130196", "text": "public static function file($path) {\n $path= str_replace('\\\\', '/', $path);\n if (0 === strncmp($path, '//', 2)) {\n $p= strcspn($path, '/', 3);\n $authority= substr($path, 2, $p + 1);\n $path= substr($path, $p + 3);\n } else {\n $authority= Authority::$EMPTY;\n }\n\n return (new Creation())->scheme('file')->authority($authority)->path($path)->create();\n }", "title": "" }, { "docid": "50989c78f7b9dc78184b67702bad7627", "score": "0.4811866", "text": "public function __construct (\n private string $path,\n ) {}", "title": "" }, { "docid": "9d95a6e492ef37d8a087794f086a8e9a", "score": "0.48073906", "text": "public static function new(string $path)\n {\n return new self($path);\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "49e3a74132d2263a6b42512a4be3cdc0", "score": "0.0", "text": "public function run()\n {\n DB::table('currencies')->insert([\n 'name' => 'last_currency_update',\n 'value' => time(),\n ]);\n\n DB::table('currencies')->insert([\n 'name' => 'interval_currency_update',\n 'value' => config('constants.time.toSeconds.hour'),\n ]);\n }", "title": "" } ]
[ { "docid": "963776365fb19044e27fa4db733ae2fd", "score": "0.80740553", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // factory(App\\User::class, 1001)->create()->each(function ($user) {\n // $user->roles()->attach([4]);\n // });\n\n // factory(App\\Model\\Listing\\Listing::class, 1000)->create()->each(function ($listing) {\n // for ($i=1; $i < rand(1, 10); $i++) { \n // $listing->categories()->attach([rand(1, 1719)]);\n // } \n // });\n\n //factory(App\\Model\\Category\\Category::class, 1720)->create();\n\n //factory(App\\Model\\Listing\\Ratings::class, 1000)->create();\n factory(App\\Model\\Listing\\Reviews::class, 7500)->create();\n }", "title": "" }, { "docid": "0106cc017f1041544cb660c0b7b15aa4", "score": "0.80636656", "text": "public function run()\n {\n\n // $this->call(UsersTableSeeder::class);\n factory(App\\Party::class, 50)->create();\n factory(App\\Parcel::class, 100)->create();\n factory(App\\Transfer::class, 200)->create();\n\n DB::table('document_type')->insert([\n 'name' => 'Quick Claim Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Warranty Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Other Deed'\n ]);\n\n }", "title": "" }, { "docid": "e58d26f8aeda30b8582ea97455c145f1", "score": "0.79895705", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('categories')->truncate();\n DB::table('tags')->truncate();\n\n factory(App\\User::class,10)->create();\n $users = App\\User::all();\n factory(App\\Post::class,20)->make()->each(function($post)use($users){\n // dd($users->random()->id);\n $post->user_id = $users->random()->id;\n $post->save();\n });\n factory(App\\Tag::class,10)->create();\n $tags = App\\Tag::all();\n App\\Post::all()->each(function($post)use($tags){\n $post->tags()->sync($tags->random(rand(1,3))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "e2ab26233d4e02ab726b5051b8407cc4", "score": "0.7973096", "text": "public function run() {\n\t\t\n\t\t$this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\t\t\n\t\t//factory(User::class,10)->create();\n\t\t$tags = factory('App\\Tag',8)->create();\n\t\t$categories = factory('App\\Category',5)->create();\n\t\t\n\t\tfactory('App\\Post',15)->create()->each(function($post) use ($tags) {\n\t\t\t$post->comments()->save(factory('App\\Comment')->make());\n\t\t\t$post->categories()->attach(mt_rand(1,5));\n\t\t\t$post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n\t\t\t});\n\t\t\n\t\t}", "title": "" }, { "docid": "f9793248863f4c34dbb3819cb4517afd", "score": "0.7960071", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $ath = Athlete::create([\n 'name' => 'Carlos',\n 'surname' => 'Cebrecos',\n 'genre' => Genre::M,\n 'role' => 'Velocista',\n 'habilities' => '100 mll - 200 mll',\n 'license' => 'CT-19433',\n 'date_birth' => '1993-08-23',\n 'active' => True\n ]);\n\n Velocity::create([\n 'athlete_id' => $ath->id,\n 'category' => Category::PR,\n 'track' => '200mll',\n 'result' => '00:00:21.970',\n 'place' => 'San Sebastián',\n 'date' => '2013-02-11',\n 'field' => 'PC'\n ]);\n \n factory(App\\Athlete::class, 12)->create()->each(function ($u){\n $u->velocities()->save(factory(App\\Velocity::class)->make());\n $u->competitions()->save(factory(App\\Competition::class)->make());\n });\n }", "title": "" }, { "docid": "5b7510aab66d08421776839e939b8736", "score": "0.79478914", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n 'name' =>\"locphan\",\n 'email' => '[email protected]',\n 'password' => Hash::make('12344321'),\n ]);\n\n DB::table('tags')->insert([\n 'name' =>\"HL\"\n ]);\n DB::table('tags')->insert([\n 'name' =>\"AI\"\n ]);\n\n DB::table('categories')->insert([\n 'name' =>\"Technology\"\n ]);\n DB::table('categories')->insert([\n 'name' =>\"Science\"\n ]);\n }", "title": "" }, { "docid": "71b82164ac0d4793056f9cd6e930fd2b", "score": "0.79316914", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n $tags = factory('App\\Tag', 8)->create();\n $categories = factory('App\\Category', 5)->create();\n\n factory('App\\Post', 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory('App\\Comment')->make());\n $post->categories()->attach(mt_rand(1,5));\n $post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "9172ae0257f26680f6efc009f6e63b7c", "score": "0.79181814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph \n ]);\n\t}\n \n\n }", "title": "" }, { "docid": "5bfaf90476324edc67c90adf206a9eca", "score": "0.78917843", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(ContactsTableSeeder::class);\n\n\n DB::table('users')->insert([\n 'name' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('posts')->insert([\n 'post_id' => 1,\n 'post_content' => Str::random(10),\n 'post_title' => Str::random(10),\n 'post_status'=> Str::random(10),\n 'post_name'=> Str::random(10),\n 'post_type'=> Str::random(10),\n 'post_category'=> Str::random(10),\n 'post_date'=> '2020-03-13 12:00', \n \n ]);\n }", "title": "" }, { "docid": "9ca436f3408c7ae5cd47415014ebf341", "score": "0.7885604", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Book::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 $quantity= $faker->randomDigit;\n Book::create([\n 'title' => $faker->sentence,\n 'author' => $faker->firstName . \" \" . $faker->lastName,\n 'editor' => $faker->company,\n 'price' => $faker->randomFloat(2,5,50),\n 'quantity' => $quantity,\n 'available' => $quantity != 0\n ]);\n }\n }", "title": "" }, { "docid": "c466d72cc0a5ffc2ce690349590795f2", "score": "0.78851664", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n $programas = Programa::factory(10)->create();\n $canales = Canal::factory(10)->create();\n\n foreach($programas as $programa){\n $programa->canales()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Plan::factory(10)->create();\n\n foreach($canales as $canal){\n $canal->plans()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Cable::factory(10)->create();\n Internet::factory(10)->create(); \n Telefonia::factory(10)->create(); \n Paquete::factory(10)->create();\n Factura::factory(10)->create();\n\n \n }", "title": "" }, { "docid": "6b480d5190ccba10aa7f084898878fda", "score": "0.7878214", "text": "public function run()\n {\n // reset the contents table\n DB::table('contents')->truncate();\n\n // generate 10 dummy contents data\n $contents = [];\n $faker = Factory::create();\n\n for ($i = 1; $i <= 10; $i++)\n {\n $contents[] = [\n 'user_id' => rand(1, 3),\n 'cancertype_id' => rand(1, 4),\n 'treatment_stage_id' => rand(1, 5),\n 'category_id' => rand(1, 4),\n 'title' => $faker->sentence(rand(5, 10)),\n 'body' => $faker->paragraphs(rand(10, 15), true),\n ];\n }\n\n DB::table('contents')->insert($contents);\n }", "title": "" }, { "docid": "b574cee3e999997b96242d9e48e9e538", "score": "0.7860442", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'password' => Hash::make('abc123')\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 1',\n 'descripcion' => 'Lorem ipsum dolor sit amet 1',\n 'imagen' => '1.png',\n 'orden' => 1\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 2',\n 'descripcion' => 'Lorem ipsum dolor sit amet 2',\n 'imagen' => '2.png',\n 'orden' => 2\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 3',\n 'descripcion' => 'Lorem ipsum dolor sit amet 3',\n 'imagen' => '3.png',\n 'orden' => 3\n ]);\n }", "title": "" }, { "docid": "82184a634a30971b8da09162488cf43d", "score": "0.7856666", "text": "public function run()\n {\n // Truncate Employee table truncate before seeding\n Employee::truncate();\n \n $faker = Factory::create();\n \n foreach (range(1,50) as $index) {\n Employee::create([\n 'first_name' => $faker->firstname,\n 'last_name' => $faker->lastname,\n 'email' => $faker->unique()->safeEmail,\n 'company_id' => $faker->numberBetween($min = 1, $max = 10),\n 'phone' => $faker->numerify('##########'),\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "58dde04e1aff533900aaa1de2e3c771b", "score": "0.78543514", "text": "public function run()\n {\n // $this->call(ProfileSeeder::class);\n // $this->call(UserSeeder::class);\n \\DB::table('profiles')->insert(\n ['name' => 'admisnitrador']);\n\n\n \\DB::table('users')->insert(\n ['username' =>\t'Administrador',\n 'email'\t\t =>\t'[email protected]',\n 'password' =>\tbcrypt('1234'),\n 'act' \t\t =>\t'1',\n 'perfil_id' => '1']);\n\n \\DB::table('locations')->insert(\n ['name' =>\t'Avellaneda']);\n\n \\DB::table('streets')->insert(\n ['name' =>\t'Calle Falsa',\n 'num_from' =>\t'0',\n 'num_to' =>\t'2000',\n 'state' =>\t'Buenos Aires',\n 'locations_id' =>\t'1']);\n\n \\DB::table('ranks')->insert(\n ['name' =>\t'Bombero']);\n\n }", "title": "" }, { "docid": "039707eb1db799d2a572e0887a732e6f", "score": "0.7853228", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Country::truncate();\n State::truncate();\n City::truncate();\n $countries = [\n \t['name'=>'India'],\n \t['name'=>'US']\n ];\n $states =[\n \t['country_id'=>1,'name'=>'Gujrat'],\n \t['country_id'=>1,'name'=>'Maharashtra'],\n \t['country_id'=>2,'name'=>'New York'],\n ];\n $cities=[\n \t['state_id'=>1,'name'=>'Rajkot'],\n \t['state_id'=>1,'name'=>'Ahmedabad'],\n \t['state_id'=>2,'name'=>'Mumbai'],\n \t['state_id'=>3,'name'=>'New York'],\n ];\n\n Country::insert($countries);\n State::insert($states);\n City::insert($cities);\n\n }", "title": "" }, { "docid": "a4fd61f33599e71641de766104f5ee0f", "score": "0.7852123", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users = App\\User::pluck('id')->toArray();\n \n for($i = 1; $i <= 100 ; $i++) {\n $title = $faker->sentence(rand(6,10));\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($users),\n ]);\n }\n \n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "9c1ad9c9a665a5e45b19a020f38bf940", "score": "0.7845105", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::table('posts')->insert(['title' => 'First post','Slug' => 'First_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Second post','Slug' => 'Second_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Thirth post','Slug' => 'Thirth_post','user_id' => 1,'text' =>$faker->text]);\n }", "title": "" }, { "docid": "8033d2ffe9933ed1497d756039c9da85", "score": "0.7842638", "text": "public function run()\n {\n $this->call(ArticlesTableSeeder::class);\n $this->call(RecommendsTableSeeder::class);\n $this->call(HotsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CommentsSeeder::class);\n DB::table('categories')->insert([\n 'name' => \"读书\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"编程\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"javascript\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"wiki\",\n ]);\n }", "title": "" }, { "docid": "ed2ed28b5f19c08009fb043458a6ea1d", "score": "0.78390396", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES')->delete();\n foreach (range(1, 100) as $value) {\n DB::table('MST_SALES')->insert([\n 'id' => $value,\n 'sum_price' => rand(2000,40000),\n 'name' => $faker->name(),\n 'sex' => rand(1, 2),\n 'post_num' => $faker->postcode(),\n 'address' => $faker->address(),\n 'email' => $faker->email(),\n 'created_at' => $faker->dateTime(),\n 'user_id' => NULL\n ]);\n }\n }", "title": "" }, { "docid": "7fce381c2d283331a49697d2b2a44912", "score": "0.7830409", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n Photo::create(['route_photo' => 'usuarioAnonimo.jpg']);\n Miniature::create(['route_miniature' => 'maxresdefault.jpg']);\n Video::create(['route_video' => 'https://www.youtube.com/embed/ZCsS1GGPrWU']);\n Post::factory(100)->create();\n Commentary::factory(200)->create();\n }", "title": "" }, { "docid": "6b5f92492d382fd188a9ad7effd7e348", "score": "0.783006", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'id' => 1,\n 'name' => 'Administrator',\n 'description' => 'Full access to create, edit, and update',\n ]);\n Role::create([\n 'id' => 2,\n 'name' => 'Customer',\n 'description' => 'A standard user that can have a licence assigned to them. No administrative features.',\n ]);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'role_id' => 1,\n ]);\n User::create([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => bcrypt('user'),\n 'role_id' => 2,\n ]);\n }", "title": "" }, { "docid": "f40e64bcdfa16f568b70a3375936cf0c", "score": "0.78271097", "text": "public function run()\n {\n $this->seeds([\n KategoriKualifikasi::class => ['kepegawaian/kategori.csv', 13],\n Jabatan::class => ['kepegawaian/jabatans.csv', 9],\n Kualifikasi::class => ['kepegawaian/kualifikasis.csv', 167],\n Pegawai::class => ['kepegawaian/pegawais.csv', 301],\n ]);\n }", "title": "" }, { "docid": "a23bab42fc12cca6d1a9a36e50f365f4", "score": "0.78265446", "text": "public function run()\n {\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('ratings')->truncate();\n \n // Rating::create([\n // 'id' => 1,\n // 'givenBy' => 2,\n // 'givenTo' => 3,\n // 'ratingValue' => 5\n // ]);\n\n Rating::create([\n 'id' => 2,\n 'givenBy' => 2,\n 'givenTo' => 4,\n 'ratingValue' => 3\n ]);\n\n Rating::create([\n 'id' => 3,\n 'givenBy' => 2,\n 'givenTo' => 5,\n 'ratingValue' => 4\n ]);\n\n Rating::create([\n 'id' => 4,\n 'givenBy' => 6,\n 'givenTo' => 5,\n 'ratingValue' => 3\n ]);\n \n Rating::create([\n 'id' => 1,\n 'givenBy' => 6,\n 'givenTo' => 3,\n 'ratingValue' => 5\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "739c29c39e152a09634953cafca33ad9", "score": "0.78206795", "text": "public function run()\n\t{\n\t\t// DB::table('models')->delete();\n\n\t\t$models = array(\n\t\t\tarray('name' =>'Pamela' ,'age' => '20', 'description' =>'El video fue dirigido por Stephen Schuster. Comienza con un avión aterrizando y chicas en bikini, bronceándose y nadando en la playa.' ),\n\t\t\tarray('name' =>'Tania' ,'age' => '24', 'description' =>'l sencillo debutó el 6 de agosto de 2009, en el número ocho en la lista Swedish Singles Chart.' ),\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('models')->insert($models);\n\t}", "title": "" }, { "docid": "e987cd48edea67e81cb2403a2e69c023", "score": "0.7820271", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(EmployeeTableSeeder::class);\n // $this->call(PartnerTableSeeder::class);\n $this->call(OtherTableSeeder::class);\n $this->call(TrafficSignSeeder::class);\n App::truncate();\n App::create([\n 'name' => 'FASKES PROV',\n 'logo' => 'logo.png'\n ]);\n }", "title": "" }, { "docid": "717334b3d328066c91d6d64c0cb10819", "score": "0.7820166", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class,3)->create();\n// $carteiras = factory(App\\Carteira::class,6)->create();\n $ativos = factory(App\\Ativo::class,1)->create();\n// $trades = factory(App\\Trade::class,5)->create();\n// $tradeEntradas = factory(App\\TradeEntrada::class,20)->create();\n// $tradeSaidas = factory(App\\TradeSaida::class,20)->create();\n }", "title": "" }, { "docid": "496536ac82829ff2c3488b1bc428a7f1", "score": "0.7814424", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // factory('App\\StudentUser', 100)->create();\n // factory('App\\Music', 1000)->create();\n // factory('App\\RobotOrder', 100)->create();\n // factory('App\\UserAction', 1000)->create();\n // factory('App\\Practice', 20)->create();\n }", "title": "" }, { "docid": "42081848f882af09bfd4cf0f8efe8eb5", "score": "0.7813038", "text": "public function run()\n {\n // $faker = Faker::create();\n\n // $dataClass = DB::table('users')->pluck('id')->toArray();\n // $dataClass = DB::table('movies')->pluck('id')->toArray();\n\n // foreach(range(1, 100) as $index) {\n // DB::table('movie_user')->insert([\n // 'user_id' => $faker->randomElement($dataClass),\n // 'movie_id' => $faker->randomElement($dataClass)\n // ]);\n // }\n }", "title": "" }, { "docid": "630b1e277c10f7d8cf32cba237b4da38", "score": "0.78121483", "text": "public function run()\n {\n \\DB::table('users')->delete();\n \\DB::table('answers')->delete();\n \\DB::table('questions')->delete();\n\n $user = new \\App\\User();\n $user->name = 'John Doe';\n $user->email = '[email protected]';\n $user->password = Hash::make('password');\n $user->save();\n\n // $this->call(UserSeeder::class);\n factory(App\\User::class, 3)->create()\n ->each(function($u) {\n $u->questions()\n ->saveMany(\n factory(App\\Question::class, rand(1, 5))->make()\n )\n ->each(function($q) {\n $q->answers()\n ->saveMany(\n factory(App\\Answer::class, rand(1, 5))->make()\n );\n });\n });\n }", "title": "" }, { "docid": "e5e2525215ec8bf3881f1c6e341aec83", "score": "0.7806573", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Brand::truncate();\n Product::truncate();\n Address::truncate();\n PaymentMethod::truncate();\n Order::truncate();\n\n $users = 1000;\n $categories = 20;\n $brands = 15;\n $products = 1000;\n $address = 3000;\n $paymentMethod = 100;\n $order = 100;\n $orderDetail = 500;\n\n factory(User::class, $users)->create();\n factory(Category::class, $categories)->create();\n factory(Brand::class, $brands)->create();\n factory(Address::class, $address)->create();\n factory(Product::class, $products)->create();\n factory(PaymentMethod::class,$paymentMethod)->create();\n factory(Order::class,$order)->create();\n factory(OrderDetails::class,$orderDetail)->create();\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": "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": "8a2ce50a7068a74d62b9970c1f9302e3", "score": "0.7790919", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n \\App\\Models\\posts::create([\n 'title' => $faker->text('20'),\n 'content' => $faker->text('500'),\n 'user_id'=> \\App\\Models\\Users::inRandomOrder()->first()->id,\n 'cate_id'=> \\App\\Models\\Catogery::inRandomOrder()->first()->id\n ]);\n\n }\n }", "title": "" }, { "docid": "4c9d16245dfaaf355245ed6f6be2592c", "score": "0.7789509", "text": "public function run()\n {\n\n $this->call(RolSeeder::class);\n\n \\App\\Models\\User::factory(10)->create();\n\n User::create([\n 'name' => 'gabriel',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678')\n ])->assignRole('Administrador');\n\n Categoria::factory(4)->create();\n Almacen::factory(3)->create();\n Kit::factory(5)->create();\n Proveedor::factory(4)->create();\n Producto::factory(40)->create();\n Empleado::factory(5)->create();\n Proyecto::factory(5)->create();\n $this->call(PrestamoSeeder::class);\n\n\n\n // Proveedor::factory(4)->create();\n // $this->call(ProductoSeeder::class);\n }", "title": "" }, { "docid": "6e3d9c728792a048ad7cb291d3db22d9", "score": "0.77889967", "text": "public function run()\n {\n /**\n * This is a dummy data seeder. All the information is here for demonstration purposes.\n */\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::statement('TRUNCATE TABLE assignments');\n \n $data = [\n ['id' => 1, 'name' => 'Biología', 'created_at' => now()],\n ['id' => 2, 'name' => 'Geografía', 'created_at' => now()],\n ['id' => 3, 'name' => 'Historia', 'created_at' => now()],\n ['id' => 4, 'name' => 'Lengua y Literatura', 'created_at' => now()],\n ['id' => 5, 'name' => 'Matemáticas', 'created_at' => now()],\n ['id' => 6, 'name' => 'Educación Física', 'created_at' => now()],\n ['id' => 7, 'name' => 'Música', 'created_at' => now()],\n ['id' => 8, 'name' => 'Educación Plástica', 'created_at' => now()],\n ['id' => 9, 'name' => 'Computación', 'created_at' => now()],\n ['id' => 10, 'name' => 'Idioma', 'created_at' => now()]\n ];\n\n DB::table('assignments')->insert($data);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "88446e1bf24041ad962665525b97b12d", "score": "0.7787001", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'nur',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'monjur',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'farhana',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'towhid',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'majedul',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'mobarok',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahed',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jb',\n 'email' => '[email protected]'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "4b87096935422c5247afb2aaa8f23776", "score": "0.7781426", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $cats = factory(App\\ProductCategory::class, 3)->create()->each(function ($cat) {\n factory(App\\ProductCategory::class, 5)->create([\n 'parent_id' => $cat->id,\n ]);\n });\n factory(App\\User::class, 50)->create()->each(function ($user) use($cats) {\n factory(App\\Product::class, 2)->create([\n 'user_id' => $user->id,\n 'category_id' => $cats->random()->id,\n ]);\n });\n\n }", "title": "" }, { "docid": "f436dada1953139b05cfe23060658c72", "score": "0.7780704", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(0,0) as $index) {\n \t DB::table('users')->insert([\n \t 'name' => 'Vinay Paramanand',\n \t 'email' => '[email protected]',\n 'password' => bcrypt('vinaytest'),\n 'main_image_path'=>'/img/img.jpg',\n 'active'=>1\n ]);\n }\n\n foreach (range(0,0) as $index) {\n\t DB::table('socials')->insert([\n\t 'linkedin_url' => $faker->url,\n 'contact_email' => $faker->url,\n 'rss_feed' => $faker->text,\n\t 'quora_url' => $faker->url,\n 'contact_email' => $faker->url\n ]);\n }\n\n\n\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": "8a56b49c8ccacd412dc12ad6eb4f1c17", "score": "0.7772089", "text": "public function run()\n {\n User::factory(10)->create();\n Category::factory(4)->create();\n SubCategory::factory(4)->create();\n Color::factory(4)->create();\n Size::factory(4)->create();\n Product::factory(4)->create();\n ProductQuantity::factory(4)->create();\n Banner::factory(4)->create();\n Favourite::factory(4)->create();\n Gallery::factory(4)->create();\n City::factory(4)->create();\n Region::factory(4)->create();\n District::factory(4)->create();\n Address::factory(4)->create();\n RateComment::factory(4)->create();\n\n $this->call(PermissionsTableSeeder::class);\n $this->call(UpdatePermissionsTableSeeder::class);\n $this->call(SettingTableSeeder::class);\n $this->call(AddTaxToSettingTableSeeder::class);\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": "88876dd02f4a05f504ca51338370b797", "score": "0.7765722", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class, 2)->create();\n factory(App\\Type::class, 8)->create();\n factory(App\\Room::class, 6)->create();\n \n\n // foreach($rooms as $room){\n // $room->owners()->attach(\n // $owners->random(random_int(1,3))\n // );\n // }\n \n }", "title": "" }, { "docid": "b11c80e4171d8992cf52a3d8c6ff07f3", "score": "0.77626616", "text": "public function run()\n {\n Eloquent::unguard();\n $faker = Faker::create();\n\n foreach(range(1, 3) as $index) {\n\n $title = $faker->sentence(2);\n\n Category::create(array(\n 'title' => $title,\n 'slug' => $this->generateSlug($title),\n 'description' => $faker->paragraph(2)\n ));\n }\n }", "title": "" }, { "docid": "c3a07070351bd000cfaf6a6bb53c9e90", "score": "0.77616376", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n User::truncate();\n Products::truncate();\n \n // $this->call(UserSeeder::class);\n factory(User::class,10)->create();\n factory(Products::class,10)->create();\n \n }", "title": "" }, { "docid": "373927e90cd67705d12a2a2602b9c28a", "score": "0.7761006", "text": "public function run()\n {\n $faker = Factory::create();\n\n Product::truncate();\n Category::truncate();\n\n foreach (range(1, 10) as $key => $value) {\n Category::create([\n 'name' => $faker->word\n ]);\n }\n\n foreach (range(1,10) as $key => $value) {\n Product::create([\n 'name' => $faker->word,\n 'stock' => $faker->randomDigit(3),\n 'description' => $faker->paragraph(1),\n 'category_id' => $faker->randomDigit(2),\n 'user_id' =>$faker->randomDigit(2)\n ]);\n }\n }", "title": "" }, { "docid": "7fd6f0c247e33899edabe04b649cd22c", "score": "0.7756213", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n Model::unguard();\n $this->call(RoleTableSeeder::class);\n $this->call(TagTableSeeder::class);\n // DB::table('users')->delete();\n\n $users = [\n ['name' => 'root', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n ['name' => 'test', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n ['name' => 'vova', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n ['name' => 'bob', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n\n ];\n // Loop through each user above and create the record for them in the database\n foreach ($users as $user) {\n $newUser = User::create($user);\n if ($user['name'] == 'root') {\n $newUser->roles()->attach(1);\n } else {\n $newUser->roles()->attach(2);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "05f5b66919509425a7194863454ee9d7", "score": "0.77492213", "text": "public function run()\n {\n\n $this->seedStudies();\n $this->seedCourses();\n\n }", "title": "" }, { "docid": "6ac18121221894258f25afa3e3a09f99", "score": "0.77469724", "text": "public function run()\n {\n Costumer::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 Costumer::create([\n 'name' => $faker->name,\n 'phone' => $faker->sentence,\n 'Type' => $faker->sentence,\n 'city' => $faker->sentence,\n 'adress' => $faker->sentence,\n 'contact' => $faker->sentence,\n 'contact_phone' => $faker->sentence,\n 'created_by' => 1,\n ]);\n }\n }", "title": "" }, { "docid": "14aa0fd99ba18e6fb7278892a18441fc", "score": "0.7746705", "text": "public function run()\n {\n //delete all records from role table\n Role::truncate();\n\n $faker = Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Role::create([\n 'name' => $faker->name\n ]);\n }\n }", "title": "" }, { "docid": "f5bfd65a0ab76fe80a146147ec5ed014", "score": "0.77440494", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n Model::reguard();\n\n # =========================================================================\n # CATEGORIES SEEDS\n # =========================================================================\n\n DB::table('categories')->delete();\n\n $categories = [\n [ 'name' => 'Wildlife',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ],\n [ 'name' => 'Pollution',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ]\n ];\n\n foreach ($categories as $category) {\n Category::create($category);\n }\n }", "title": "" }, { "docid": "ecb482ed5a02df8c19bf99957a103522", "score": "0.77431524", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n\n // DB::table('users')->delete();\n\n // $users = array(\n // ['name' => 'Tyler Torola', 'email' => '[email protected]', 'password' => Hash::make('password')],\n // ['name' => 'Bobby Anderson', 'email' => '[email protected]', 'password' => Hash::make(\"***REMOVED***\")],\n // ['name' => 'Ike Goss', 'email' => '[email protected]', 'password' => Hash::make('***REMOVED***')],\n // );\n \n // // Loop through each user above and create the record for them in the database\n // foreach ($users as $user)\n // {\n // User::create($user);\n // }\n\n // foreach (range(1,10) as $index) {\n // $invoice = [\n // 'first_name' => $faker->firstName,\n // 'last_name' => $faker->lastName,\n\n // ]\n // }\n\n foreach (range(1,10) as $index) {\n \n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "115c012dd8846c3cb80cbb9f7a8327c6", "score": "0.7742761", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(Category::class)->times(10)->create();\n\n $users = factory(User::class)->times(20)->create();\n\n $products = factory(Product::class)->times(40)->create();\n\n $transactions = factory(Transaction::class)->times(10)->create();\n\n\n }", "title": "" }, { "docid": "0136ec9783e5809a5fe2c594d8780c7e", "score": "0.7741538", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Eloquent::unguard();\n\n $faker = Faker\\Factory::create();\n factory(App\\Answer::class, 100)->create();\n factory(App\\Kerja::class, 100)->create();\n factory(App\\Lulus::class, 100)->create();\n factory(App\\Nikah::class, 100)->create();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\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": "d253031e250b9050d7af431c4c10f0bf", "score": "0.7737546", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->disableForeignKeyCheck();\n User::truncate();\n Tag::truncate();\n Post::truncate();\n\n factory(User::class, 50)->create();\n factory(Tag::class, 20)->create();\n factory(Post::class, 100)->create()->each(function ($post) {\n $tags = Tag::all()->random(mt_rand(1, 5))->pluck('id');\n $post->tags()->attach($tags);\n });\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": "31bba37eb86cd9ac68eaf41572a295dc", "score": "0.7735254", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('roles')->insert([\n [ \n 'name' => 'voter'\n ],\n [ \n 'name' => 'admin'\n ],\n ]);\n\n DB::table('organizers')->insert([\n [\n 'name' => 'BEM UI'\n ],\n [\n 'name' => 'BEM FT UI'\n ]\n ]);\n\n DB::table('elections')->insert([\n [\n 'name' => 'Pemira UI',\n 'unique_code' => 'UI012021',\n 'election_date' => '2021-04-26',\n 'end_date' => '2021-05-28'\n ],\n [\n 'name' => 'Pemira FT UI',\n 'unique_code' => 'FT3012021',\n 'election_date' => '2021-05-03',\n 'end_date' => '2021-05-28'\n ]\n ]);\n\n $this->call([\n CandidateSeeder::class,\n UserSeeder::class,\n VoteSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "de1da3761353d82d818811e2158ffcc6", "score": "0.77292454", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n $types = ['t-shirt', 'mug', 'boots', 'phone-case'];\n $colors = ['whitesilver','grey','black','navy','blue','cerulean','sky blue','turquoise','blue-green','azure','teal','cyan','green','lime','chartreuse','live','yellow','gold','amber','orange','brown','orange-red','red','maroon','rose','red-violet','pink','magenta','purple','blue-violet','indigo','violet','peach','apricot','ochre','plum'];\n $sizes = ['xs','s','m','l','xl'];\n\n // And now, let's create a few prods in our database:\n for ($i = 0; $i < 50; $i++) {\n\n $prod = Product::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'price' => rand(0, 1000)/10,\n 'productType' => $types[array_rand($types)],\n 'color' => $colors[array_rand($colors)],\n 'size' => $sizes[array_rand($sizes)],\n ]);\n }\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "0ae073ea04e3e51b9a5a234a6645d3a1", "score": "0.77288526", "text": "public function run()\n {\n $this->truncateTables([\n //'products',\n //'services',\n //'categories',\n //'subcategories',\n 'products_users',\n //'users',\n 'avatars',\n ]);\n\n // Ejecutar los seeders:\n //$products = factory(Product::class)->times(4)->create();\n //$categories = factory(Category::class)->times(2)->create();\n //$subcategories = factory(SubCategory::class)->times(5)->create();\n //factory(Service::class)->times(4)->create();\n //factory(User::class)->times(10)->create();\n $avatars = factory(Avatar::class)->times(15)->create();\n\n /*foreach ($products as $oneProduct) {\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n $oneProduct->save();\n };*/\n\n // foreach ($products as $oneProduct) {\n // $oneProduct->category()->associate($categories->random(1)->first()->id);\n // $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n // $oneProduct->save();\n // };c9b1c36c8caeabda8347106e58f70033dd0265ca\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": "e424e7ea028abae43ad7eb31b541b451", "score": "0.771601", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // $this->call(ProductsTableSeeder::class);\n // $this->call(ProductImageSeeder::class);\n // $this->call(VariationSeeder::class);\n \\App\\Models\\Product::factory()->count(5)->create();\n \\App\\Models\\ProductImage::factory()->count(10)->create();\n //\\App\\Models\\Variation::factory()->create();\n }", "title": "" }, { "docid": "3d5934c5d799d5a3b3747a0bbd0e3d71", "score": "0.77135783", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::table('tasks')->delete();\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 Task::create([\n 'idCustomer' => $faker->numberBetween($min = 1, $max = 10),\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'price' => $faker->numberBetween($min = 10, $max = 1000),\n 'deadline' => $faker->dateTimeBetween($startDate = 'now', $endDate = '+2 years', $timezone = 'Asia/Bishkek'),\n ]);\n }\n }", "title": "" }, { "docid": "f204d23341cb7fd2b48bb27ffde1b8f2", "score": "0.77124816", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n factory(App\\User::class, 4)->create();\n factory(App\\Group::class, 2)->create()->each(function($u) { $u->users()->save(App\\User::find(1)); });\n factory(App\\Item::class, 10)->create();\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": "72deab4b4ba460677188b9e5ddc3d631", "score": "0.77109", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Article::truncate();\n Store::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Store::create([\n 'name' => $faker->name,\n 'address' => $faker->address,\n ]);\n }\n }", "title": "" }, { "docid": "9877b188f4441322b489cf690def43a1", "score": "0.7704052", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\User::class,10)->create();\n\n $fake = \\Faker\\Factory::create();\n\n $users = \\App\\User::all();\n\n foreach ($users as $user){\n for ($i=0 ; $i<10 ; $i++){\n \\App\\Post::create([\n 'user_id' => $user->id,\n 'title' => $fake->name,\n 'description' => $fake->paragraph(5),\n ]);\n }\n }\n }", "title": "" }, { "docid": "b2a9f176c7df114ff184aa138ee5c05e", "score": "0.77025133", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Players::class, 10000)->create();\n \n factory(App\\GamePlay::class, 3835)->create(); \n\n $this->call(GamesTableSeeder::class);\n \n }", "title": "" }, { "docid": "3b2cd726bae9a08c2dfd89fc525f4d5f", "score": "0.77025044", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(CuentaTableSeeder::class);\n $this->call(MovimientoTableSeeder::class);\n // factory ('App\\Vehiculo',6)->create();\n // factory ('App\\Estacionamiento',6)->create();\n $this->call(VehiculoTableSeeder::class);\n $this->call(OrigenTableSeeder::class);\n $this->call(TarifasTableSeeder::class);\n $this->call(ZonasTableSeeder::class);\n $this->call(EstaciomamientoTableSeeder::class);\n factory ('App\\Inspector',10)->create();\n }", "title": "" }, { "docid": "acf364571e79e5cefded12cff1dc405e", "score": "0.7700658", "text": "public function run()\n\t{\n\t\t$faker = Faker::create();\n\t\tforeach (range(1, 50) as $key) {\n\t\t\tDB::table('books')->insert([\n\t\t\t'title' => $faker->sentence(),\n\t\t\t'description' => $faker->paragraph(),\n\t\t\t'author' => $faker->name(),\n\t\t\t'created_at' => Carbon::now(),\n\t\t\t'updated_at' => Carbon::now(),\n\t\t\t]);\n\t\t}\n}", "title": "" }, { "docid": "443e869bc448f240356820ce99b73eba", "score": "0.76993686", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingSeeder::class);\n\n factory(Category::class, 7)->create();\n\n factory(Product::class,150)->create();\n\n $categories = App\\Category::all();\n\n Product::all()->each(function ($product) use ($categories)\n {\n $product->categories()->attach(\n // $categories->random(rand(3,6))->pluck('id')->toArray()\n $categories->random(rand(1,6))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "8fe4489137a56b956b08ecc256a24aa7", "score": "0.7697992", "text": "public function run()\n {\n //\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n\n\n $cost=$faker->randomFloat(2,0,1000);\n\n Product::create([\n 'category_id' => random_int(1,5),\n 'cost' => $cost,\n 'stock' => random_int(1,20),\n 'priceTotal' => $cost+10,\n 'tax' => random_int(1,10),\n 'description' => 'Descripcion'. $i,\n 'reference' => 'Referencia'. $i,\n 'user_id'=> random_int(1,User::count())\n ]);\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": "02a3de1d1d158c365800c7a0830fe308", "score": "0.7693202", "text": "public function run()\n {\n //\n // DB::table('articles')->delete();\n\n\t // for ($i=0; $i < 10; $i++) {\n\t // \\App\\Article::create([\n\t // 'title' => 'Title '.$i,\n\t // 'body' => 'Body '.$i,\n\t // 'user_id' => 1,\n\t // 'like' => 0,\n\t // 'draft' => true\n\t // ]);\n\t // }\n\n\n\t // DB::table('articles')->insert([\n // 'title' => 'Title '.str_random(10),\n // 'body' => 'Body '.str_random(10),\n // 'user_id' => 1,\n // 'like' => 0,\n // 'draft' => true\n // ]);\n\n \t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t // $u->posts()->save(factory(App\\Article::class)->make());\n\t // });\n\t factory(App\\Article::class, 50)->create();\n\n }", "title": "" }, { "docid": "1c370e9bc1f2d1d56de7442838321847", "score": "0.7689267", "text": "public function run()\n {\n $this->call(CompanySeeder::class);\n $this->call(JobsSeeder::class);\n $this->call(UserSeeder::class);\n\n $categories=[\n 'Government','NGO','Banking','software','Networking','2nd optionb'\n ];\n foreach ($categories as $category){\n \\App\\Models\\Category::create(['name'=>$category]);\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": "3114668392a1c46e1e1ae8969bf609b6", "score": "0.76837957", "text": "public function run()\n {\n $faker = Faker::create();\n\n // seeder for authorised member\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Django\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('1234')\n ]);\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Prism\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('1234')\n ]);\n\n // seeder for 3 second markers\n foreach(range(1, 3) as $index) {\n User::create([\n 'role' => 'second_marker',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 4 supervisors\n foreach(range(1, 4) as $index) {\n User::create([\n 'role' => 'supervisor',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 30 students\n foreach(range(1, 30) as $index) {\n User::create([\n 'role' => 'student',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n }", "title": "" }, { "docid": "8b162d964f15bb87bea6b64c3def25df", "score": "0.7679688", "text": "public function run()\n {\n //TODO Seeder create X Users\n factory(\\App\\User::class, 10)->create();\n //TODO Seeder create X Authors\n factory(\\App\\Author::class, 10)->create();\n //TODO Seeder create X Libraries and looping Libraries\n factory(\\App\\Library::class, 10)->create()->each(function($library){\n //TODO Seeder create X Books and looping Books\n factory(\\App\\Book::class, 10)->make()->each(function($book) use($library){\n //TODO Seeder asign Books to Libraries (relationship)\n $library->books()->save($book);\n });\n });\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": "01775d6adda6df1ce8c05497acdfcd54", "score": "0.76755834", "text": "public function run()\n {\n\n News::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['business', 'popular', 'hotnews', 'lifestyle', 'world', 'world', 'sports'];\n for ($i = 0; $i < count($categories); $i++) {\n for ($j = 0; $j < 5; $j++) {\n News::create([\n 'title' => $categories[$i] . ' title ' . $j,\n 'content' => $faker->paragraph(),\n 'category' => $categories[$i],\n 'image' => $faker->image('public/uploads/news/', 640, 480, null, false),\n ]);\n }\n }\n }", "title": "" }, { "docid": "b186d6546035ec76f8db21fdbd2a0e44", "score": "0.7674704", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('products')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'image' => $faker->imageUrl(600,400),\n 'price' => $faker->numberBetween(0,1000)\n ]);\n }\n $this->call(ProductSeeder::class);\n }", "title": "" }, { "docid": "ae0478774917d2a61935b3bb56a50045", "score": "0.76742005", "text": "public function run()\n {\n State::create(['id' => 1, 'name' => 'not state']);\n State::create(['id' => 2, 'name' => 'to do']);\n State::create(['id' => 3, 'name' => 'doing']);\n State::create(['id' => 4,'name' => 'done']);\n\n Role::create(['name' => 'Scrum Master']);\n Role::create(['name' => 'Product Owner']);\n Role::create(['name' => 'Developer']);\n\n Tag::factory(5)->create();\n Category::factory(5)->create();\n\n User::create([\n // 'id' => 1,\n 'name' => 'Joel',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('1234567')\n ]);\n\n User::factory(10)->create()->each(function ($user) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $user->tasks()->save(Task::factory()->make());\n }\n });\n\n Team::factory(5)->create()->each(function ($team) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $team->tasks()->save(Task::factory()->make());\n }\n\n $team->users()->attach($this->array(rand(2, 11)));\n });\n }", "title": "" }, { "docid": "8ba9e1eb60aa2ce75e4f67b85523a3b3", "score": "0.76738054", "text": "public function run()\n {\n //\n\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n // $name = $faker->unique()->word;\n // $quantity = $faker->numberBetween(1, 50);\n // $price = $faker->randomFloat(2,10,200);\n // $value = $price * $quantity;\n User::create([\n 'name' => $faker->unique()->word,\n 'email' => $faker->unique()->word.'@gmail.com',\n 'password' => bcrypt('123456'),\n 'email_verified_at' => Carbon::now(),\n 'remember_token' => Carbon::now(),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "0a6360cbcc87c10411cfdb8218573c6a", "score": "0.7670969", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n foreach (range(1, 100) as $index) {\n DB::table('products')->insert([\n 'code' => $faker->unique()->randomNumber,\n 'name' => $faker->sentence(4),\n 'stock' => $faker->randomNumber,\n 'varian' => $faker->sentence(1),\n 'description' => $faker->text,\n 'image' => $faker->imageUrl(\n $width = 640,\n $height = 480\n ),\n 'category_id' => rand(1, 5)\n ]);\n }\n }", "title": "" }, { "docid": "e7c35bf1a78291d3c85c164ebd658980", "score": "0.7670915", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //seeding the furnitures\n $this->call(FurnituresTableSeeder::class);\n\n // seeding the tags\n $this->call(TagsTableSeeder::class);\n\n // seeding the users, houses, and rooms table by creating room for each\n // house for each user\n factory(App\\User::class, 3)->create()->each(function ($user) {\n $user->houses()->saveMany(factory(App\\House::class, 2)->create()->each(function ($house) {\n $house->rooms()->saveMany(factory(App\\Room::class, 3)->create());\n }));\n });\n }", "title": "" }, { "docid": "c4192461f63978082f8fcbfb0f3a4b92", "score": "0.7668657", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // User::create([\n\t\t// 'username' => 'admin',\n\t\t// 'password' => Hash::make('admin'),\n\t\t// 'real_password' => 'admin'\n\t\t// ]);\n\n //check and count inventory records\n $inventory = inventory::all();\n if(count($inventory)){\n $item_id = 'inv_'.$this->randomString().'_'.(count($inventory)+1);\n }else{\n $item_id = 'inv_'.$this->randomString().'_'.'1';\n }\n \n inventory::create([\n 'item_id' => $item_id,\n 'username' => 'admin',\n 'item_name' => 'Medicine 3',\n 'item_description' => 'If you take this you will eventually die',\n 'item_quantity' => 20\n ]);\n }", "title": "" }, { "docid": "7b59b344bf9bf9580742222e5ba42ec2", "score": "0.7665538", "text": "public function run()\n {\n \t // DB::table('users')->insert([\n \n // 'username' => \"quy\",\n // 'email' => \"[email protected]\",\n // 'sex' => 0,\n // 'phone_number' => 0,\n // 'password' => Hash::make('123456'),\n // ]);\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 20; $i++) {\n App\\news::create([\n 'tittle' => $faker->text(40),\n 'intro' => $faker->text($minNbChars = 60),\n 'content' => $faker->text($minNbChars = 400),\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'user_id' => 6\n ]);\n }\n\n }", "title": "" }, { "docid": "8c8e23570f05312b54416c1cbcb81e7b", "score": "0.766276", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n // $this->call([\n // UserSeeder::class,\n // PostSeeder::class,\n // CommentSeeder::class,\n // ]);\n\n // User Table Seeding\n User::factory()\n ->count(5)\n ->create();\n\n // Category Table Seeding\n ProductCategory::factory()\n ->count(5)\n ->create();\n\n // Product Table Seeding\n Product::factory()\n ->count(10)\n ->create();\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": "6fdeeeb37f42681366483a8c2c186b05", "score": "0.765777", "text": "public function run()\n {\n Model::unguard();\n $userId = DB::table('users')->pluck('id')->toArray();\n $bookId = DB::table('books')->pluck('id')->toArray();\n $faker = Faker::create();\n for ($i = 0; $i <= 15; $i++) {\n factory(App\\Model\\Post::class, 1)->create([\n 'user_id' => $faker->randomElement($userId),\n 'book_id' => $faker->randomElement($bookId)\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "ade397526ae1d55557124d57dafcccd2", "score": "0.765603", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\empresa::class,10)->create();\n factory(\\App\\tut_lab::class,20)->create();\n factory(\\App\\tut_doc::class,20)->create();\n factory(\\App\\ciclo::class,20)->create();\n factory(\\App\\fecha::class,20)->create();\n factory(\\App\\alumno::class,20)->create();\n \n\n }", "title": "" }, { "docid": "43a50dd07282ff905667d4ed0c2f4a4b", "score": "0.76543665", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create(\n [\n 'email' => '[email protected]',\n 'name' => 'Leszek'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => '[email protected]',\n 'name' => 'Gosia'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => '[email protected]',\n 'name' => 'Agnieszka'\n ]\n );\n }", "title": "" }, { "docid": "f39736a1dd58b24415fb18f580a15480", "score": "0.7653886", "text": "public function run()\n {\n //$faker = Factory::create('uk_UA');\n $faker = Factory::create('ru_RU');\n\n foreach (range(1, 10) as $i) {\n Staff::create([\n 'first_name' => (($i % 2) == 0) ? $faker->firstNameMale : $faker->firstNameFemale,\n 'last_name' => $faker->lastName,\n 'middle_name' => (($i % 2) == 0) ? $faker->middleNameMale() : $faker->middleNameFemale(),\n 'sex' => (($i % 2) == 0) ? 'мужской' : 'женский',\n 'salary' => 600,\n ]);\n }\n\n foreach (Staff::all() as $people) {\n $positions = Position::inRandomOrder()->take(rand(1,3))->pluck('id');\n $people->positions()->attach($positions);\n }\n }", "title": "" }, { "docid": "727a6eb0cfb135db37a834cd42286ad5", "score": "0.7651371", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n //factory(Post::class, 48)->create();\n }", "title": "" }, { "docid": "0aa9e71a7d39d8e1c143c2676348855e", "score": "0.7650461", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // call our class and run our seeds\n\n DB::table('armari_a')->insert([\n\n 'id' => '2',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Bosses puntes pipetes',\n 'stock_inicial' => '4',\n 'stock_actual' => '5',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '11971',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n ]);\n DB::table('armari_a')->insert([\n\n 'id' => '3',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Puntes micropipeta',\n 'stock_inicial' => '17',\n 'stock_actual' => '17',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '0',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n\n ]);\n\n\n }", "title": "" }, { "docid": "3a36602f580a4a0d79e184724854eff2", "score": "0.76479024", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::truncate();\n Admin::truncate();\n factory(User::class, 2)->create();\n factory(Admin::class, 1)->create();\n //factory(Link::class, 10)->create();\n //factory(Category::class, 2)->create();\n }", "title": "" }, { "docid": "8a18fcb1937bb7f261796040e1fcfa6d", "score": "0.76466405", "text": "public function run()\n {\n //$this->call(StudentSeeder::class);\n $this->call(ClassroomSeeder::class);\n $this->call(FacultyMemberSeeder::class);\n $this->call(LectureSeeder::class);\n $this->call(LectureRegisterSeeder::class);\n\n DB::table('users')->insert([\n 'role' => '1',\n 'name' => 'Öğrenci işleri',\n 'email' => '[email protected]',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İlk',\n 'surname' => 'Öğrenci',\n 'code' => '1231231231',\n 'email' => '[email protected]',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İkinci',\n 'surname' => 'Öğrenci',\n 'code' => '1231231232',\n 'email' => '[email protected]',\n 'password' => Hash::make( '123123' )\n ]);\n }", "title": "" }, { "docid": "bcb79b7af39bcb53c4feae04acbb1a67", "score": "0.76453894", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Attribute::create(['title' => 'Expertise and Competence']);\n Attribute::create(['title' => 'Responsiveness']);\n Attribute::create(['title' => 'Communication and Reporting']);\n Attribute::create(['title' => 'Trustworthiness (Confidentiality)']);\n Attribute::create(['title' => 'Quality of Service']);\n }", "title": "" }, { "docid": "41157008c4eff9687b3dcc670f9e4f1e", "score": "0.7644173", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n User::create([\n 'username' => $faker->word,\n 'fullname' => $faker->word,\n 'state' => 0,\n 'tel' => $faker->word,\n 'whatsapp' => $faker->word,\n 'token' => $faker->sentence,\n 'address' => $faker->word,\n 'email' => $faker->email,\n 'password' => $faker->word\n ]);\n }\n }", "title": "" }, { "docid": "9fde55e4c96d4dec4240ddd0ecd757be", "score": "0.7643901", "text": "public function run()\n {\n\t\t$this->call(CategoryTableSeeder::class);\n\t\t$this->call(GenreTableSeeder::class);\n\t\t$this->call(StateTableSeeder::class);\n\t\t$this->call(ImageTableSeeder::class);\n\t\t$this->call(AuthorImageTableSeeder::class);\n\t\t$this->call(CharacterImageTableSeeder::class);\n\n\t factory(User::class, 10)->create();\n\t factory(Customer::class, 10)->create();\n\t factory(Product::class, 20)->create();\n }", "title": "" } ]
eb05d4544dc58320285936418ab65dd0
/Funcion para obtener las ciudades para filtro de App
[ { "docid": "bb1f46bcd06801d58aad50316a5b2364", "score": "0.0", "text": "public static function getAllTblciudadFiltro($idtblpais,$fechapedido){\n\n\t\t$activado=1;\n $tipodepedidoCompleto=3;\n\n $fechahora = $fechapedido;\n\n ///se obtiene la fecha/hora actual\n $horaactual = new DateTime(\"now\", new DateTimeZone('America/Mexico_City'));\t\n\t\t//echo $horaactual->format('H:i').\"\\n\";\n //se convierte la fecha/hora en tipo objeto\n\t\t$horapedido = new DateTime($fechahora, new DateTimeZone('America/Mexico_City'));\n\t\t//echo $horapedido->format('H:i').\"\\n\";\n\t\t//se obtiene las horas por transcurrir\n\t\t$horastrascurrir = $horaactual->diff($horapedido)->format('%H');//horas\n\t\t$diasMinimos= $horaactual->diff($horapedido)->format('%d');//dias\t\t\n\t\t$totalHoras= ($diasMinimos*24)+($horastrascurrir);\n\t\t//echo $totalHoras.\"\\n\";\n\t\t//se obtiene el día de la semana \n\t\t$diasemana= $horapedido->format('l');\n\t\t//echo $diasemana;\n\n\t\t$fchactual = $horaactual->format('Y-m-d');\n\t\t$fchpedido = $horapedido->format('Y-m-d');\n\n\t\tif($fchactual==$fchpedido){\n\t\t\t$tipodepedido=1;\n\t\t}else{\n\t\t\t$tipodepedido=2;\n\t\t}\n\n\t\t//se tomara en cuenta el stock dependiendo de las horas para el pedido\n\t\tif($totalHoras<24){ \t\t\t\n $diasMinimos=0;\n $stock=1;\n }else{ \n $stock=0;\n }\n\n $consulta =\"SELECT TCD.* FROM tblciudad TCD \n \t\tINNER JOIN tblpais TPS ON TCD.tblpais_idtblpais = TPS.idtblpais\n \t\tINNER JOIN tblcolonia TCA ON TCD.idtblciudad = TCA.tblciudad_idtblciudad\n \t\tINNER JOIN tblproveedor TPR ON TCA.idtblcolonia = TPR.tblcolonia_idtblcolonia\n \t\tINNER JOIN tblproducto TPO ON TPR.idtblproveedor = TPO.tblproveedor_idtblproveedor\n \t\tINNER JOIN tblproductdetalle TPOD ON TPO.idtblproducto = TPOD.tblproducto_idtblproducto\n \t\tINNER JOIN tbldiaprovservicio TDPS ON TDPS.tblproveedor_idtblproveedor = TPR.idtblproveedor\n \t\tINNER JOIN tbldiasemana TDS ON TDS.idtbldiasemana = TDPS.tbldiasemana_idtbldiasemana\n\t\tWHERE \n\t\t\t\tTCD.tblciudad_activado = ?\n\t\t AND TPS.tblpais_activado = ?\n\t\t AND TCA.tblcolonia_activado = ?\n\t\t AND TPR.tblproveedor_activado = ?\n\t\t AND TPO.tblproducto_activado = ?\n\t\t AND TPOD.tblproductdetalle_activado = ?\n\t\t AND TPOD.tblproductdetalle_stock >= ?\n\t\t AND TPOD.tblproductdetalle_diaselaboracion <= ?\n\t\t AND (TPR.tbltipopedido_idtbltipopedido = ? OR TPR.tbltipopedido_idtbltipopedido = ?)\n\t\t AND TDS.tbldiasemana_dia =? \n\t\tGROUP BY TCD.idtblciudad\";\n\n try{\n \t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n \t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n \t$resultado->bindParam(2,$activado,PDO::PARAM_INT);\n \t$resultado->bindParam(3,$activado,PDO::PARAM_INT);\n \t$resultado->bindParam(4,$activado,PDO::PARAM_INT);\n \t$resultado->bindParam(5,$activado,PDO::PARAM_INT);\n \t$resultado->bindParam(6,$activado,PDO::PARAM_INT);\n \t$resultado->bindParam(7,$stock,PDO::PARAM_INT);\n \t$resultado->bindParam(8,$diasMinimos,PDO::PARAM_INT);\n \t$resultado->bindParam(9,$tipodepedido,PDO::PARAM_INT);\n \t$resultado->bindParam(10,$tipodepedidoCompleto,PDO::PARAM_INT);\n \t$resultado->bindParam(11,$diasemana,PDO::PARAM_STR);\n \t$resultado->execute();\n return $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro\n } catch(PDOException $e){\n return false; \n }\n\t}", "title": "" } ]
[ { "docid": "a40c757a27b0ef0e69f818750c1485bd", "score": "0.6460759", "text": "public function getFilteredValues($app);", "title": "" }, { "docid": "10a1a99485988f3a48b8c20eb54ce7d5", "score": "0.64038837", "text": "public function getFilters () {\n $filters = array(\n 'appointments' => array(),\n 'dx' => array(),\n 'doctors' => array(),\n\t\t\t'machines' => array(),\n\t\t\t'patients'\t\t => array(),\n 'appointmentStatuses' => array()\n );\n $databaseObj = new Database();\n\n try {\n\n // ***********************************\n // ARIA \n // ***********************************\n $sourceDBSer = 1;\n $source_db_link = $databaseObj->connectToSourceDatabase($sourceDBSer);\n if ($source_db_link) {\n\n $sql = \"\n SELECT DISTINCT\n Doctor.ResourceSer,\n Doctor.LastName\n FROM\n variansystem.dbo.Doctor Doctor,\n variansystem.dbo.PatientDoctor PatientDoctor\n WHERE \n PatientDoctor.PrimaryFlag = 1\n AND PatientDoctor.OncologistFlag = 1\n AND Doctor.OncologistFlag = 1\n AND PatientDoctor.ResourceSer = Doctor.ResourceSer\n\n ORDER BY\n Doctor.LastName\n \";\n $query = $source_db_link->prepare( $sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) );\n $query->execute();\n \n while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n $doctorArray = array(\n 'name' => $data[1],\n 'id' => $data[0],\n 'type' => 'Doctor',\n 'added' => 0\n );\n array_push($filters['doctors'], $doctorArray);\n }\n\n $sql = \"\n SELECT DISTINCT\n vr.ResourceSer,\n vr.ResourceName\n FROM \n variansystem.dbo.vv_ResourceName vr\n WHERE\n vr.ResourceName LIKE 'STX%'\n OR vr.ResourceName LIKE 'TB%'\n\n ORDER BY \n vr.ResourceName\n \";\n $query = $source_db_link->prepare( $sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) );\n $query->execute();\n \n while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n $machineArray = array(\n 'name' => $data[1],\n 'id' => $data[0],\n 'type' => 'Machine',\n 'added' => 0\n );\n array_push($filters['machines'], $machineArray);\n }\n\n }\n\n // ***********************************\n // WaitRoomManagement \n // ***********************************\n $sourceDBSer = 2;\n $source_db_link = $databaseObj->connectToSourceDatabase($sourceDBSer);\n if ($source_db_link) {\n\n $sql = \"SELECT 'DOCTOR_QUERY_HERE'\";\n // $query = $source_db_link->prepare( $sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) );\n // $query->execute();\n // while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n // $doctorArray = array(\n // 'name' => $data[0],\n // 'id' => $data[0],\n // 'type' => 'Doctor',\n // 'added' => 0\n // );\n // array_push($filters['doctors'], $doctorArray);\n // }\n\n $sql = \"SELECT 'MACHINE_QUERY_HERE'\";\n // $query = $source_db_link->prepare( $sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) );\n // $query->execute();\n // while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n // $machineArray = array(\n // 'name' => $data[0],\n // 'id' => $data[0],\n // 'type' => 'Machine',\n // 'added' => 0\n // );\n // array_push($filters['machines'], $machineArray);\n // }\n }\n\n // ***********************************\n // Mosaiq \n // ***********************************\n $sourceDBSer = 3;\n $source_db_link = $databaseObj->connectToSourceDatabase($sourceDBSer);\n if ($source_db_link) {\n\n $sql = \"SELECT 'DOCTOR_QUERY_HERE'\";\n // $query = $source_db_link->prepare( $sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) );\n // $query->execute();\n // while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n // $doctorArray = array(\n // 'name' => $data[1],\n // 'id' => $data[0],\n // 'type' => 'Doctor',\n // 'added' => 0\n // );\n // array_push($filters['doctors'], $doctorArray);\n // }\n\n $sql = \"SELECT 'MACHINE_QUERY_HERE'\";\n // $query = $source_db_link->prepare( $sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL) );\n // $query->execute();\n // while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n // $machineArray = array(\n // 'name' => $data[1],\n // 'id' => $data[0],\n // 'type' => 'Machine',\n // 'added' => 0\n // );\n // array_push($filters['machines'], $machineArray);\n // }\n\t\t\t}\n\t\t\t\n\t\t\t// ***********************************\n // OpalDB \n // ***********************************\n\t\t\t$host_db_link = new PDO( OPAL_DB_DSN, OPAL_DB_USERNAME, OPAL_DB_PASSWORD );\n\t\t\t$host_db_link->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\t\t\tif ($host_db_link) {\n\n\t\t\t\t// Patient Filters\n\t\t\t\t$sql = \"\n\t\t\t\t\tSELECT DISTINCT\n\t\t\t\t\t\tpt.PatientSerNum,\n\t\t\t\t\t\tpt.PatientId,\n\t\t\t\t\t\tpt.FirstName,\n\t\t\t\t\t\tpt.LastName\n\t\t\t\t\tFROM\n\t\t\t\t\t\tPatient pt\n\t\t\t\t\tORDER BY\n\t\t\t\t\t\tpt.PatientSerNum\n\t\t\t\t\";\n\n\t\t\t\t$query = $host_db_link->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t\t$query->execute();\n\t\n\t\t\t\twhile ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n\n\t\t\t\t\t$serial \t= $data[0];\n\t\t\t\t\t$patientId \t= $data[1];\n\t\t\t\t\t$firstName \t= $data[2];\n\t\t\t\t\t$lastName \t= $data[3];\n\t\t\t\t\t$patientName = \"$lastName, $firstName ($patientId)\";\n\t\t\t\t\t$patientArray = array(\n\t\t\t\t\t\t'name'\t=> $patientName,\n\t\t\t\t\t\t'id'\t=> $patientId,\n\t\t\t\t\t\t'type' \t=> 'Patient',\n\t\t\t\t\t\t'added'\t=> 0\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($filters['patients'], $patientArray);\n\t\t\t\t}\n\n\t\t\t\t// Diagnosis Filters\n\t\t\t\t$sql = \"\n\t\t\t\t\tSELECT DISTINCT\n\t\t\t\t\t\tdt.Name_EN,\n dt.DiagnosisTranslationSerNum\n\t\t\t\t\tFROM\n\t\t\t\t\t\tDiagnosisTranslation dt\n WHERE\n dt.Name_EN != ''\n\t\t\t\t\";\n\t\t\t\t$query = $host_db_link->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t\t$query->execute();\n\n\t\t\t\twhile ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n\t\t\t\t\t$dxArray = array(\n\t\t\t\t\t\t'name' => $data[0],\n\t\t\t\t\t\t'id' => $data[1],\n\t\t\t\t\t\t'type' => 'Diagnosis',\n\t\t\t\t\t\t'added' => 0\n\t\t\t\t\t);\n\n\t\t\t\t\tarray_push($filters['dx'], $dxArray);\n\t\t\t\t}\n\t\n\t\t\t\t// Appointment Filters\n $sql = \"\n SELECT DISTINCT\n\t\t\t\t\t\tAlias.AliasName_EN,\n\t\t\t\t\t\tAlias.AliasSerNum\n FROM \n\t\t\t\t\t\tAlias\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tAlias.AliasType = 'Appointment'\n ORDER BY\n Alias.AliasName_EN\n \";\n\n $query = $host_db_link->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t\t$query->execute();\n\n while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n \n $appointmentDetails = array(\n 'name' => $data[0],\n 'id' => $data[1],\n 'type' => 'Appointment',\n 'added' => 0\n );\n\t\t\t\t\tarray_push($filters['appointments'], $appointmentDetails);\n\t\t\t\t}\n\n // Appointment Status Filters\n $sql = \"\n SELECT DISTINCT\n sa.Name \n FROM\n StatusAlias sa\n \";\n $query = $host_db_link->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n $query->execute();\n\n while ($data = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\n\n $statusDetails = array(\n 'name' => $data[0],\n 'id' => $data[0],\n 'type' => 'AppointmentStatus',\n 'added' => 0\n );\n array_push($filters['appointmentStatuses'], $statusDetails);\n }\n\n // Manually add checked in flag\n $statusDetails = array(\n 'name' => 'Checked In',\n 'id' => 1,\n 'type' => 'CheckedInFlag',\n 'added' => 0\n );\n array_push($filters['appointmentStatuses'], $statusDetails);\n\t\t\t}\n\n return $filters;\n\n } catch (PDOException $e) {\n\t\t\techo $e->getMessage();\n\t\t\treturn $filters;\n\t\t}\n }", "title": "" }, { "docid": "2ac0f7830b150206211095b318d6c39a", "score": "0.63362354", "text": "public function filters() {\n\n\t}", "title": "" }, { "docid": "d68e493e98a8c3a8283b51a095ab4abb", "score": "0.63039327", "text": "protected function filters(){\n\n }", "title": "" }, { "docid": "f28242acf39cbabda24c63315cc96063", "score": "0.62520885", "text": "public function filters();", "title": "" }, { "docid": "1ab16a390c527a424e275b4855d72efe", "score": "0.6227907", "text": "public function filters(): array;", "title": "" }, { "docid": "03e286812126999db385e460271644dd", "score": "0.6189467", "text": "public function getFilter(): array;", "title": "" }, { "docid": "67335ee6165542618258fddb41e437b1", "score": "0.61582166", "text": "public function filters(){\r\n return array();\r\n }", "title": "" }, { "docid": "ff1be5e17267dad99da28d8ff5120b2c", "score": "0.61177844", "text": "public function filterAction(Application $app, Request $request){\n $params = json_decode($request->getContent(), true);\n\n //Fields to return\n $map = $this->_fieldsToReturn;\n\n //Work on fields\n array_walk($map, function(&$v, $k){$v = \"$v as $k\";});\n $fields = implode(', ', $map);\n\n //Compute where options\n $where = array(\n 'p.f_pos_apple_id>9999', //limitation requested by Ruchir\n 'p.f_hq_apple_id>9999', //limitation requested by Ruchir\n 'p.f_contract_id>9999', //limitation requested by Ruchir\n );\n $values = array();\n\n //Where RTM & Program\n $checkboxes = array(\n 'rtm' => 'f_rtm_primary',\n 'program' => 'f_program',\n 'region' => 'f_region',\n 'countries' => 'f_country_name',\n 'salesorgs' => 'f_primary_sales_org_name',\n );\n foreach($checkboxes as $key=>$field)\n {\n $keys = array();\n if(isset($params[$key]) && is_array($params[$key]))\n {\n $keys = array_keys(array_filter($params[$key]));\n if(count($keys))\n {\n $where[] = $field . ' IN (' . rtrim(str_repeat('?, ', count($keys)), ', ') . ')';\n }\n }\n else if(isset($params[$key])){\n $where[] = \"$field = ?\";\n $keys = array($params[$key]);\n }\n $values = array_merge($values, $keys);\n }\n\n if(isset($params['spotlight']))\n {\n $where[] = \"(p.f_pos_apple_id LIKE ? OR p.f_legal_name LIKE ? OR p.f_trade_name LIKE ?)\";\n $values = array_merge($values, array_fill(0, 3, '%' . $params['spotlight'] . '%'));\n }\n\n //Compute WHERE\n $where = implode(' AND ', $where);\n\n $sql = \"\n SELECT %s\n FROM cpm_pos p\n LEFT JOIN cpm_sfo s ON s.f_pos_apple_id = p.f_pos_apple_id\n WHERE %s\n # LIMIT 100\n \";\n $sql = sprintf($sql, $fields, $where);\n\n //Launch query\n $statement = $this->_getPDO()->prepare($sql);\n $statement->execute($values);\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $app->json(array(\n 'sql' => $sql,\n 'results' => $result,\n ));\n }", "title": "" }, { "docid": "84c787136db426616a12839dcdedce1c", "score": "0.610712", "text": "abstract public function get_filtering_data();", "title": "" }, { "docid": "ed524339b608ded809dac9530fa88336", "score": "0.61007637", "text": "function obtenerNivelesDeCriticidad(){\n $resultados=$this->as_array()->get_all();\n return $resultados;\n }", "title": "" }, { "docid": "8c063d3a3fd2da71d3b4d0ff2bee5a84", "score": "0.6034166", "text": "private function generaFiltrosAccesos(Request $request){\n\t\t$filtros = array ();\n\t\t$idacceso = (int) $request->get('idacceso') + 0;\n\t\t$idusuario = (int) $request->get('idusuario') + 0;\t\t\n\t\t$status = (int) $request->get('status') + 0;\t\t\n\t\t$fecha = trim($request->get ('fecha'));\n\t\t$ip = trim($request->get ('ip'));\n\t\t$so = trim($request->get ('so'));\n\t\t$explorador= trim($request->get ('explorador'));\n\t\t$fechainiacceso = trim($request->get ('fechainiacceso'));\n\t\t$fechafinacceso = trim($request->get ('fechafinacceso'));\n\n\t\t\n\t\t$filtros[] = ['acceso.idacceso', '>', 0];\t\t\n\t\tif($idacceso > 0){\n\t\t\t$filtros[] = ['acceso.idacceso', '=',$idacceso];\n\t\t}\t\t\n\t\tif($idusuario > 0){\n\t\t\t$filtros[] = ['acceso.idusuario', '=',$idusuario];\n\t\t}\n\t\tif($status > 0){\n\t\t\t$filtros[] = ['acceso.status', '=',$status];\n\t\t}\n\t\tif(trim($fecha) != ''){\n\t\t\t$filtros[] = ['acceso.fecha', 'LIKE', '%' . $fecha . '%'];\n\t\t}\n\t\tif(trim($ip) != ''){\n\t\t\t$filtros[] = ['acceso.ip', 'LIKE', '%' . $ip . '%'];\n\t\t}\n\t\tif(trim($so) != ''){\n\t\t\t$filtros[] = ['acceso.so', 'LIKE', '%' . $so . '%'];\n\t\t}\n\t\tif(trim($explorador) != ''){\n\t\t\t$filtros[] = ['acceso.explorador', 'LIKE', '%' . $explorador . '%'];\n\t\t}\n\t\tif(trim($fechainiacceso) != ''){\n\t\t\t$fecha1= \\Carbon\\Carbon::createFromFormat('d-m-Y', $fechainiacceso)->startOfDay();\n\t\t\t$filtros[] = ['acceso.fecha', '>=', $fecha1];\n\t\t}\n\t\tif(trim($fechafinacceso) != ''){\n\t\t\t$fecha2= \\Carbon\\Carbon::createFromFormat('d-m-Y', $fechafinacceso)->endOfDay();\n\t\t\t$filtros[] = ['acceso.fecha', '<=', $fecha2];\n\t\t}\n\t\treturn $filtros;\n\t}", "title": "" }, { "docid": "0ae71c2d12e488cf834098a1e7f319ea", "score": "0.60339373", "text": "public function getFilters(){ }", "title": "" }, { "docid": "4380ec7ef8b26fa982037d331223ac50", "score": "0.6024761", "text": "function getFilters();", "title": "" }, { "docid": "04e2189f6e44e3780da07574935b0a81", "score": "0.59853303", "text": "public function filters() {\n //mi control de accesso para los usuarios\n return array('accessControl');\n }", "title": "" }, { "docid": "e4e8d5782087d96afa6ff959b884de94", "score": "0.59621835", "text": "public function getCargos()\n {\n $result=$this->adapter->query(\"select * , nombre as nomFiltro \n from t_cargos\n order by nombre\",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "5a85e7332a9b0a0f1fcad182b433a21e", "score": "0.59613174", "text": "function dar_todos_por_filtros($params) {\n $items = array();\n foreach ($params as $key => $value)\n $this->db->where($key, $value);\n $query = $this->db->get('op_item_cotizacion');\n foreach ($query->result() as $row) {\n $item = new item_cotizacion_model();\n foreach ($row as $key => $value) {\n $item->$key = $value;\n }\n $items[] = $item;\n }\n return $items;\n }", "title": "" }, { "docid": "0422e13fff2763d9f677aad87f062d0d", "score": "0.5953716", "text": "public function getAllCriteres(){\n $c = Base::getConnection();\n $query = $c->prepare(\"select * from critere\");\n $query->execute();\n\t\treturn $query->fetchAll();\n }", "title": "" }, { "docid": "5573552623527ef52ce56e070b422152", "score": "0.5934637", "text": "public function filters()\n {\n return [\n 'name' => \"trim\",\n 'product_category_id' => \"trim\",\n 'status' => \"trim\",\n 'price' => \"trim\"\n ];\n }", "title": "" }, { "docid": "fc3ceaf6f6873c6f2083a61d6a7cf8ed", "score": "0.5932442", "text": "protected function checkFilters() {\r\n\t\r\n\t\t$this->log.= '- <b>Inicializando filtros para listado</b> <br/>';\r\n\t\r\n\t\t$sql = array();\r\n\t\t\r\n\t\tif ($this->itemId) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemId, 'Id', 'gal_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemGaleria) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemGaleria, 'Galería', 'gal_galeria')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemSQLExtra != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Parámetros externos de SQL</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemSQLExtra.'<br/>';\r\n\r\n\t\t\t$sql[] = $this->itemSQLExtra;\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemTags != '') {\r\n\t\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por etiqueta</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTags.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTags);\r\n\t\t\t\r\n\t\t\t$this->log.= '- Valor limpio y filtrado a buscar:'.$texto.'<br/>';\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTexto != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>búsqueda por texto</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTexto.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTexto);\r\n\t\t\t\r\n\t\t\t$this->log.= '- Texto limpio y filtrado a buscar:'.$texto.'<br/>';\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\r\n\t\t\t\t$textoTipo = strtolower(trim($this->itemTextoTipo));\r\n\r\n\t\t\t\tswitch($textoTipo) {\r\n\t\t\t\t\tcase 'and':\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$texto = '+'.$texto;\r\n\t\t\t\t\t\t$texto = str_replace(' ', ' +',$texto);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase 'or':\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'all':\r\n\t\t\t\t\t\t$texto = \"\\\"{$texto}\\\"\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->log.= '- Texto a envíar para la búsqueda:'.$texto.'<br/>';\r\n\r\n\t\t\t\t$sql[] = \"MATCH (gal_nombre, gal_descripcion) \r\n\t\t\t\tAGAINST ('{$texto}' IN BOOLEAN MODE)\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemTipo) {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por tipo de contenido</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTitulo.'<br/>';\t\t\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTipo);\r\n\t\t\t$texto = trim(str_replace(' ', '',$texto));\r\n\r\n\t\t\t$this->log.= '- Tipo a consultar (luego de filtrado):'.$texto.'<br/>';\r\n\r\n\t\t\t$iTitulo = explode(',',$texto);\r\n\t\t\t$texto = '';\r\n\t\t\tforeach($iTitulo as $k => $v) {\r\n\t\t\t\t$v = trim($v);\r\n\t\t\t\t$texto.= ($v != '') ? \",'{$v}'\" : '';\r\n\t\t\t}\r\n\t\t\t$texto = substr($texto,1);\r\n\t\t\t\r\n\t\t\tif ($texto != '') {\r\n\t\t\t\t$sql[] = 'gal_tipo IN('.$texto.')';\r\n\t\t\t\t\r\n\t\t\t\t$this->log.= '- Filtro por tipo. Ingresado OK. <br/>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($this->itemTitulo != '') {\r\n\t\t\r\n\t\t\t$this->log.= '- Filtro asignado: <b>Filtro por url friendly del titulo</b>.';\r\n\t\t\t$this->log.= ' Valor ingresado:'.$this->itemTitulo.'<br/>';\r\n\r\n\t\t\t// Limpio texto de Injection\r\n\t\t\t$texto = cleanInjection($this->itemTitulo);\r\n\r\n\t\t\t$this->log.= '- Titulo Url Friendly a buscar:'.$texto.'<br/>';\r\n\r\n\t\t\t$sql[] = \"noticia_page_url = '{$texto}'\";\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->itemUserId) {\r\n\t\t\tif ($oSql = $this->filterNumeric($this->itemUserId, 'user Id', 'gal_user_id')) {\r\n\t\t\t\t$sql[] = $oSql;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->log.= '- Asignación de filtros OK <br/>';\r\n\r\n\t\treturn $sql;\r\n\t}", "title": "" }, { "docid": "703ea23f9815eb18797b48356cfd21f9", "score": "0.59293866", "text": "public function buscarFiltrado(Request $request){\n if($request->carpeta!=2){\n $archivos=archivos_expediente::all()->where('carpeta_id', '=',$request->carpeta)->all();\n return json_encode($archivos); \n }else{\n $archivos=Clausura_notificacion::all();\n return json_encode($archivos);\n }\n }", "title": "" }, { "docid": "a1b3b856ea5b276ae8fd49ddf1973f6c", "score": "0.591324", "text": "public function getCategorias(){\n $sql =\"SELECT id_tipo_patro, tipo_patrocinador FROM tipo_patrocinador\";\n $params = array(null);\n return Database::getRows($sql, $params); \n }", "title": "" }, { "docid": "23492726e50849c3f0c4a7f0010d8b80", "score": "0.5911251", "text": "public function index()\n {\n $contratos=Contrato::with('client')->with('aviso')->get();\n return $contratos;\n }", "title": "" }, { "docid": "b074e2ca98567150c592192bd03ca102", "score": "0.5868924", "text": "public function filters() {\n return [];\n }", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5868868", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5868868", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5868868", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.5868868", "text": "public function getFilters();", "title": "" }, { "docid": "230fb8209e7f72b21ab7491cc7c9e950", "score": "0.58599275", "text": "public function getVocacionFiltro($con)\n {\n $result=$this->adapter->query(\"select * , nombre as nomFiltro \n from t_vocacion \",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "9ec3494cae4a4c09a3b74272927d571d", "score": "0.58455366", "text": "public function buscarcarpeta() {\r\n\t\t\r\n $id2 = Auth::get('id');// este metodo me permite obtener algun dato de la tabla usuario como el nombre o cualquier otro campo\r\n return $this->find_all_by_sql (\"SELECT * FROM `carpeta` WHERE `usuario_id`=\".\"'\".$id2.\"'\");\r\n \r\n\t}", "title": "" }, { "docid": "a5ee7c6125bc7d0cbc657fc4328f9e9f", "score": "0.58420277", "text": "public function getOnlyBeneficio()\r\n {\r\n $db = $this->getAdapter();\r\n $sql = $db->select()\r\n ->from(array('benef' => $this->_name), array(\"*\",\r\n 'cat_nombre' => new Zend_Db_Expr(\r\n \"(SELECT GROUP_CONCAT(c.nombre ORDER BY c.id ASC SEPARATOR ' - ')\r\n FROM categoria c \r\n INNER JOIN categoria_beneficio cb ON cb.categoria_id = c.id\r\n WHERE cb.beneficio_id=benef.id)\"\r\n ),\r\n 'cat_slug' => new Zend_Db_Expr(\r\n \"(SELECT GROUP_CONCAT(c.slug ORDER BY c.id ASC SEPARATOR '--')\r\n FROM categoria c \r\n INNER JOIN categoria_beneficio cb ON cb.categoria_id = c.id\r\n WHERE cb.beneficio_id=benef.id)\"\r\n ),\r\n ))\r\n ->where('benef.activo = ?', 1);\r\n //->where('benef.sin_stock = ?',0); \r\n //se mostrara los beneficios que no tengan stock, indicado con un estado\r\n /*->where(\r\n 'CURRENT_DATE() BETWEEN benefv.fecha_inicio_vigencia AND benefv.fecha_fin_vigencia'\r\n );*/\r\n\r\n $sql->join(\r\n array('benefv' => 'beneficio_version'), 'benef.id = benefv.beneficio_id', \r\n array('fecha_inicio_vigencia', 'fecha_fin_vigencia', 'stock_actual', 'stock')\r\n )->where('benefv.activo = ?', 1);\r\n\r\n $sql->join(\r\n array('tbenef' => 'tipo_beneficio'), 'tbenef.id = benef.tipo_beneficio_id', \r\n array('abreviado',\"tbenef_id\"=>\"id\",\"tbenef_slug\"=>\"slug\")\r\n );\r\n\r\n $sql->join(\r\n array('catbenef' => 'categoria_beneficio'), 'catbenef.beneficio_id = benef.id ', \r\n array()\r\n );\r\n\r\n// $sql->join(\r\n// array('cat' => 'categoria'), 'cat.id = catbenef.categoria_id ', \r\n// array('cat_nombre' => 'nombre','cat_id' => 'id','cat_slug' => 'slug')\r\n// );\r\n\r\n $sql->join(\r\n array('est' => 'establecimiento'), 'est.id = benef.establecimiento_id', \r\n array('est_nombre' => 'nombre')\r\n );\r\n \r\n if(!empty($this->_publicado)):\r\n $sql->where('benef.publicado = ?', $this->getPublicado());\r\n endif;\r\n \r\n if (!empty($this->_fechaPublicacion)) {\r\n $sql->where($this->getFecha_publicacion().\r\n ' BETWEEN benefv.fecha_inicio_publicacion AND benefv.fecha_fin_publicacion');\r\n }\r\n if (!empty($this->_id)) {\r\n $sql->where('benef.id = ?', $this->getId());\r\n //$rs = $db->fetchRow($sql);\r\n } else {\r\n //$rs = $db->fetchAll($sql);\r\n }\r\n $sql->order('benefv.fecha_inicio_publicacion DESC');\r\n //echo $sql->assemble(); exit;\r\n $rs = $db->fetchRow($sql);\r\n return $rs;\r\n }", "title": "" }, { "docid": "7b88ea46701e8d82e03ed7ea3e8b318b", "score": "0.58237875", "text": "public function filters()\n {\n return [\n 'from' => new FromDateSearch ,\n 'to' => new ToDateSearch ,\n 'active' => new StatusFilter ,\n 'category_id' => new CategoryFilter ,\n 'admin_global_search' => new AdminGlobalSearch(['name','description'])\n ];\n }", "title": "" }, { "docid": "f3fa2d77f587b5b36d83cf015bbae7ce", "score": "0.5819668", "text": "public function getStatusContratos($params){\n \n \t\t$_db = $this->__construct();\n \n $_result = $_db->query(\"SELECT id,Descripcion FROM AdmCatStatusContrato ORDER BY Orden \")\n or die('Connect Error (' . $_db->connect_errno . ') ' . $_db->connect_error);\n\n $results = array();\n \n\t\twhile ($row = $_result->fetch_assoc()) {\n array_push($results, $row);\n\t\t}\n \n\t\treturn $results;\t \n }", "title": "" }, { "docid": "40dcc8c523eb82bac3a6df55f15f04a0", "score": "0.5815498", "text": "public function getMain()\n\t{\n\t\t$filter_type = Session::get('filter_type');\n\t\t$filter_item = Session::get('filter_item');\n\t\t$order_type = Session::get('order_type');\n\t\t$order_AorD = Session::get('order_AorD'); \n\t\t$filtered=true;\n \t//FILTERS:\n \t//they picked a filter, value, order, and order value\n \tif(($filter_type != (\"default_filter\")) && ($filter_item != NULL) && ($order_type != (\"default_sort\")) && ($order_AorD != (\"default_AorD\"))\n \t\t&& Session::has('filter_type') && Session::has('filter_item') && Session::has('order_type') && Session::has('order_AorD')) \n\t\t{\n\t\t\t//Filtering by industry\n\t\t\tif($filter_type == \"industry_filter\")\n\t\t\t{\n\t\t\t\t$results = DB::table('ideas')->where('industry', '=', $filter_item)->orderBy($order_type, $order_AorD);\t\n\t\t\t}\n\t\t\t//Filtering by keyword\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Find all the ideaID's of keywords that match from keyword table\n\t\t\t\t$results = DB::table('ideas')\n\t\t\t\t\t->join('keywords', 'ideas.id', '=', 'keywords.ideaID')\n\t\t\t\t\t->where('keywords.keyword', '=', $filter_item)->orderBy($order_type, $order_AorD);\n\t\t\t}\n\t\t}\n\t\t//They picked a filter and value but not order\n\t\telse if(($filter_type != (\"default_filter\")) && ($filter_item != NULL) && Session::has('filter_type') && Session::has('filter_item'))\n\t\t{\n\t\t\t//Filtering by industry\n\t\t\tif($filter_type == \"industry_filter\")\n\t\t\t{\n\t\t\t\t$results = DB::table('ideas')->where('industry', '=', $filter_item);\t\n\t\t\t}\n\t\t\t//Filtering by keyword\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Find all the ideaID's of keywords that match from keyword table\n\t\t\t\t$results = DB::table('ideas')\n\t\t\t\t\t->join('keywords', 'ideas.id', '=', 'keywords.ideaID')\n\t\t\t\t\t->where('keywords.keyword', '=', $filter_item);\n\t\t\t}\n\t\t}\n\t\t//They picked an order and value but no filter\n\t\telse if(($order_type != \"default_sort\") && ($order_AorD != \"default_AorD\") && Session::has('order_type') && Session::has('order_AorD'))\n\t\t{\n\t\t\t$results = DB::table('ideas')->orderBy($order_type, $order_AorD);\n\t\t}\n\t\t//They didn't pick a filter or order, get everything\n\t\telse\n\t\t{\n\t\t\t$filtered=false;\n\t\t\t$results = Idea::orderBy('created_at', 'DESC');\n\t\t}\n\n\t\treturn View::make('main.sparkhub', array('orderedResults'=>$results, 'filtered'=>$filtered));\n\t}", "title": "" }, { "docid": "c7fd72fe29a69f90c3b84273cbb6b946", "score": "0.5808449", "text": "public function filter()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "a523578c3e6ef393323b6e01f2d146bb", "score": "0.57926905", "text": "function getall_convocatoria_abierto()\n {\n $convocatoria = $this->db->query(\"\n SELECT\n c.*, g.gestion_descripcion, e.estado_descripcion, e.estado_color,\n pb.plaza_cantidad, b.beca_nombre\n FROM\n convocatoria as c\n left join gestion as g on c.gestion_id = g.gestion_id\n left join estado as e on c.estado_id = e.estado_id\n left join plazas_becas as pb on c.convocatoria_id = pb.convocatoria_id\n left join beca as b on pb.beca_id = b.beca_id\n where\n c.estado_id = 1\n ORDER BY c.convocatoria_id desc\n limit 4\n \")->result_array();\n return $convocatoria;\n }", "title": "" }, { "docid": "3d0b48b82db4d4d279bdb50d1b842402", "score": "0.5777279", "text": "public function getConcetosFijos($con)\n {\n $result=$this->adapter->query(\"select a.* , a.nombre as nomFiltro \n from n_conceptos a\n inner join n_conceptos_hor b on b.idConc = a.id \n where a.id>0 \".$con ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "cdce99550e79c05434900c038d9cf5fe", "score": "0.5777007", "text": "public function getConsultores() {\n\t $consultores = CaoUsuario::join('permissao_sistema', 'cao_usuario.co_usuario', '=', 'permissao_sistema.co_usuario')\n ->select('cao_usuario.co_usuario', 'cao_usuario.no_usuario', 'cao_usuario.ds_senha',\n 'cao_usuario.co_usuario_autorizacao', 'cao_usuario.nu_matricula',\n 'cao_usuario.dt_nascimento')\n ->where('permissao_sistema.co_sistema', '=', 1)\n ->where('permissao_sistema.in_ativo', '=', 'S')\n ->whereIn('permissao_sistema.co_tipo_usuario', [0,1,2])->get();\n return $consultores;\n }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.5764493", "text": "public function getFilter();", "title": "" }, { "docid": "f2dc61a793bc57ef185b2181a73380d9", "score": "0.57627505", "text": "public function applicantfilter(Request $request)\n\t{\n\t\t\n\t\t$validator = Validator::make($request->all(), [\n\t\t\t'period_start' => 'nullable|date_format:Y-m-d',\n\t\t\t'period_end' => 'nullable|date_format:Y-m-d',\n\t\t]);\n\t\n\t\tif ($validator->fails()) {\n $msg = 'Filter failed.';\n foreach ($validator->errors()->all() as $key => $value) {\n $msg .= '<br>- '.$value;\n }\n return response()->json(['msg' => $msg, 'errors' => $validator->errors()], 412);\n }\n\n\t\t$data = \\App\\Applicant::\n\t\t\tselect(DB::raw('CONCAT(applicants.first_name, \" \", applicants.surname) as name, applicants.*, applications.status_id as status, applications.exemption_type, applicants.immigration_status_id as immigration_status'))->\n\t\t\tleftJoin('applications', 'applications.id', '=', 'applicants.application_id')->\n\t\t\twhere(function ($query) use ($request){\n\t\t\t\tif($request->exemption_types) $query->whereIn('applications.exemption_type', $request->exemption_types);\n\t\t\t\tif($request->countries) $query->whereIn('applications.country_id', $request->countries);\n\t\t\t\tif($request->quarantine_pay) $query->whereIn('applications.quarantine_pay', $request->quarantine_pay);\n\t\t\t\tif($request->period_start) $query->whereDate('applications.created_at', '>=', $request->period_start);\n\t\t\t\tif($request->period_end) $query->whereDate('applications.created_at', '<=', $request->period_end);\n\t\t\t\t\n\t\t\t\tif($request->status) $query->whereIn('applicants.status_id', $request->status);\n\t\t\t\tif($request->immigration_status) $query->whereIn('applicants.immigration_status_id', $request->immigration_status);\n\t\t\t\tif($request->gender) $query->whereIn('applicants.gender', $request->gender);\n\t\t\t\tif($request->medical_issues) $query->whereIn('applicants.medical_issues', $request->medical_issues);\n\t\t\t\tif($request->covid_status) $query->whereIn('applicants.covid_status_id', $request->covid_status);\n\t\t\t})->\n\t\t\tget();\n\t\n\t\treturn response()->json(['data' => $data], 200);\n\t}", "title": "" }, { "docid": "2423e645ebc66f42d27cc6fc7422c730", "score": "0.5752111", "text": "public function getAllFraisApplicables() {\r\n $query = \"SELECT f.CLASSE, SUM(MONTANT) AS MONTANTAPPLICABLE \"\r\n . \"FROM `\" . $this->_table . \"` f \"\r\n . \"INNER JOIN classes cl ON cl.ANNEEACADEMIQUE = :anneeacad AND f.CLASSE = cl.IDCLASSE \"\r\n . \"WHERE ECHEANCES <= CURDATE() \"\r\n . \"GROUP BY f.CLASSE\";\r\n\r\n return $this->query($query, [\"anneeacad\" => $_SESSION['anneeacademique']]);\r\n }", "title": "" }, { "docid": "6a97567fef0fbcfae23038b65ab1b0c6", "score": "0.5745218", "text": "public function getClicsFiltres($lang, $inici, $limit, $nivell, $area, $cerca) {\n\n \t$db = DBhelper::getInstance();\n\t\t\n\t\t//creem el filtre per recuperar les instancies\n\t\t$where_conditions_array_nivel = array();\n\t\t$where_conditions_array_area = array();\n\t\t$where_conditions_array = array();\n\t\t$where_conditions_values = array();\n\n if ( !empty ( $nivell ) ) {\n $nivells = explode( ',', $nivell );\n foreach( $nivells as $niv ){\n $where_conditions_array_nivel[] = 'nivel_' . $niv . ' = :nivell' . $niv;\n $where_conditions_values[':nivell'.$niv] = 1;\n }\n $where_conditions_array[] = '(' . implode( $where_conditions_array_nivel, ' OR ' ) . ')';\n\n }\n\n if ( !empty ( $area ) ) {\n $areas = explode( ',', $area );\n foreach( $areas as $a ){\n $where_conditions_array_area[] = 'area_' . $a . ' = :area' . $a;\n $where_conditions_values[':area'.$a] = 1;\n }\n $where_conditions_array[] = '(' . implode( $where_conditions_array_area, ' OR ' ) . ')';\n }\n\n if ( !empty ( $lang ) ) {\n $langs = explode( ',', $lang );\n $where_conditions_array[] = 'lang in (\\'' . implode( \"','\", $langs ) . '\\')';\n }\n\n if ( !empty ( $cerca ) ) {\n $where_conditions_array[] = '(titol like :cerca or descripcio like :cerca)';\n $where_conditions_values[':cerca'] = '%' . $cerca . '%';\n }\n\n $where = implode( $where_conditions_array, \" AND \" );\n\n\t\t$sql = \"SELECT * FROM \" . ClicCataleg::$TAULA . \" WHERE \" . $where . \" LIMIT \" . intval( $inici ) . \", \" . intval( $limit );\n\t\t$list = $db->fetchAllPreparedStatement( $sql, $where_conditions_values );\n\t\t$res = array();\n\t\tforeach( $list as $row ){\n\t\t\t$clic = new ClicCataleg();\n\t\t\t$clic->rowMapper( $row );\n\t\t\tarray_push( $res, $clic );\n\t\t}\n\n\t\treturn $res;\n }", "title": "" }, { "docid": "a12a4bb4adddd83cb54b67f5e39ec0c3", "score": "0.5729888", "text": "public function filtreBarreRecherche(){\n try {\n $mysqli=$this->connexion();\n $stmt=$mysqli->prepare(\"select * from utilisateurs inner join voyages on utilisateurs.id = voyages.id\");\n $stmt->execute();\n $rs=$stmt->get_result();\n $filtre=$rs->fetch_all(MYSQLI_ASSOC);\n $mysqli->close();\n return $filtre;\n } catch (mysqli_sql_exception $m) {\n throw new DaoException($m->getMessage(), $m->getCode());\n }\n }", "title": "" }, { "docid": "a5f0d1e12701eeea547755a877b1e57b", "score": "0.5726435", "text": "function get_all_convocatoria()\n {\n $convocatoria = $this->db->query(\"\n SELECT\n c.*, g.gestion_descripcion, e.estado_descripcion, e.estado_color,\n pb.plaza_cantidad, b.beca_nombre\n FROM\n convocatoria as c\n left join gestion as g on c.gestion_id = g.gestion_id\n left join estado as e on c.estado_id = e.estado_id\n left join plazas_becas as pb on c.convocatoria_id = pb.convocatoria_id\n left join beca as b on pb.beca_id = b.beca_id\n ORDER BY c.convocatoria_id desc\n \")->result_array();\n return $convocatoria;\n }", "title": "" }, { "docid": "bcfa7e5485e2e1a52736f803f3ab871e", "score": "0.5725695", "text": "public function index()\n {\n $condicion = CondicionPropiedad::all();\n return compact('condicion');\n }", "title": "" }, { "docid": "7c822368a01c3203566d4c50936334f2", "score": "0.5698428", "text": "public function getCategories(Application $app){\n return $app['dao.category']->findAll(); \n }", "title": "" }, { "docid": "e0259a95e99622c1fac9365983ca5c6e", "score": "0.5695799", "text": "public function getRequestFilter() {\n $date = new \\DateTime();\n $Default = [\n 'env' => 'P',\n 'app' => '*',\n 'dayPast' => -30,\n 'jobClass' => '*',\n 'spooler' => '*',\n 'hour' => $date->format('h'),\n 'day' => $date->format('d'),\n 'month' => $date->format('m'),\n 'year' => $date->format('Y'),\n 'hour' => $date->format('H'),\n 'minute' => $date->format('i'),\n 'second' => $date->format('s'),\n 'category' => '*',\n 'monthday' => $date->format('m').$date->format('d'), // code jour\n 'maxResults' => 1000, // limitation \n 'onlyWarning' => 0, // alertes\n 'sort' => 'last', // tri par défaut\n 'retention' => 35, // tri par défaut\n 'outputFormat' => 'dhtmlx',\n 'bundle' => '', // Bundle en cours\n 'repoId' => 'local', // repo en cours\n 'machine' => null, // machine en cours\n 'orderId' => null, // Ordre\n 'jobChain' => null, // Chain\n 'accept' => 'application/json'\n ];\n \n $request = Request::createFromGlobals();\n \n $User = $this->portal->getUserInterface(); \n // le jour est la reference\n $User['dayPast'] = $User['refPast'];\n \n foreach (array_keys($Default) as $f) {\n // cas speciaux\n switch ($f) {\n case 'month':\n if ($request->query->get($f)=='last') {\n $date->modify(\"last month\");\n $User[$f] = $date->format('m');\n }\n break;\n default:\n if ($request->query->get($f)!='') {\n $User[$f] = $request->query->get($f);\n }\n elseif (!isset($User[$f]) or ($User[$f]=='')) {\n $User[$f] = $Default[$f];\n }\n break;\n }\n } \n \n // date par defaut\n // normalement c'est fait a l'initialisation du portail\n // On complete\n if (!isset($User['date']) or ($User['date']==''))\n $User['date'] = new \\DateTime();\n if (!isset($User['year']) or ($User['year']==''))\n $User['year'] = $User['date']->format('Y');\n if (!isset($User['month']) or ($User['month']==''))\n $User['month'] = $User['date']->format('m');\n if (!isset($User['day']) or ($User['day']==''))\n $User['day'] = $User['date']->format('d');\n if (!isset($User['hour']) or ($User['hour']==''))\n $User['hour'] = $User['date']->format('H');\n if (!isset($User['minute']) or ($User['minute']==''))\n $User['minute'] = $User['date']->format('i');\n if (!isset($User['second']) or ($User['second']==''))\n $User['second'] = $User['date']->format('s'); \n \n // Calcul fixe\n $end = new \\DateTime($User['year'].'-'.$User['month'].'-'.$User['day'].' 23:59:59');\n $start = clone $end;\n $start->add(\\DateInterval::createFromDateString(($User['dayPast']*86400+1).' seconds'));\n \n $User['start'] = $start;\n $User['end'] = $end;\n \n // forcer les entiers\n $User['day'] = $User['day']*1;\n $User['month'] = $User['month']*1;\n // \n // Conflit avec app.request de twig\n $User['refPast'] = $User['dayPast'];\n $Filters = $this->portal->setUserInterface($User);\n \n $Filters['appl']=$Filters['app'];\n unset($Filters['app']);\n \n // Contexte\n foreach ([ 'maxResults', 'onlyWarning', 'sort', 'outputFormat', 'bundle', 'repoId', 'machine'] as $f) {\n if ($request->query->get($f)!='')\n $Filters[$f] = $request->query->get($f);\n }\n \n // Complement\n foreach ([ 'id', 'job_id', 'job_name'] as $f) {\n $Filters[$f] = $request->query->get($f);\n }\n\n // passage des infos par header\n $Header = $request->headers->all();\n if (isset($Header['accept'])) {\n // le premier\n list($Filters['accept']) = $Header['accept'];\n // Plus simple\n $Filters['outputFormat'] = substr($Filters['accept'],strpos($Filters['accept'],'/')+1);\n }\n \n return $Filters;\n }", "title": "" }, { "docid": "bdedcadb88dfd35ca5c36e4179891e6a", "score": "0.5694064", "text": "public function filters()\n {\n return array(\n );\n }", "title": "" }, { "docid": "bdedcadb88dfd35ca5c36e4179891e6a", "score": "0.5694064", "text": "public function filters()\n {\n return array(\n );\n }", "title": "" }, { "docid": "bdedcadb88dfd35ca5c36e4179891e6a", "score": "0.5694064", "text": "public function filters()\n {\n return array(\n );\n }", "title": "" }, { "docid": "b7c19ee62b4cb17e73664c5701adbd29", "score": "0.56842583", "text": "static function getAllCategories(){\n $results = \\DB::select(\"SELECT * FROM \" . self::$categoryTableName . \" where name not like '%sincategoria%' order by code\");\n \n return $results;\n }", "title": "" }, { "docid": "96a8ceee7d50625a85fe4cb3ddb87fc3", "score": "0.567954", "text": "public function applicationfilter(Request $request)\n\t{\n // return response()->json(['msg' => \\App\\Application::all()], 200);\n\t\t\n\t\t$validator = Validator::make($request->all(), [\n\t\t\t'period_start' => 'nullable|date_format:Y-m-d',\n\t\t\t'period_end' => 'nullable|date_format:Y-m-d',\n\t\t]);\n\t\n\t\tif ($validator->fails()) {\n $msg = 'Filter failed.';\n foreach ($validator->errors()->all() as $key => $value) {\n $msg .= '<br>- '.$value;\n }\n return response()->json(['msg' => $msg, 'errors' => $validator->errors()], 412);\n }\n\n\t\t$data = \\App\\Application::\n\t\t\tselect('applications.*', 'applicants.*')->\n\t\t\tleftJoin(DB::raw( '(\n\t\t\t\t\tSELECT count(*) as applicants, application_id\n\t\t\t\t\tFROM applicants\n\t\t\t\t\tGROUP BY application_id\n\t\t\t\t) applicants'), function ($join) {\n\t\t\t\t$join->on( 'applications.id', '=', 'applicants.application_id');\n\t\t\t})->\n\t\t\twhere(function ($query) use ($request){\n\t\t\t\tif($request->exemption_types) $query->whereIn('applications.exemption_type', $request->exemption_types);\n\t\t\t\tif($request->countries) $query->whereIn('applications.country_id', $request->countries);\n\t\t\t\tif($request->quarantine_pay) $query->whereIn('applications.quarantine_pay', $request->quarantine_pay);\n\t\t\t\tif($request->period_start) $query->whereDate('applications.created_at', '>=', $request->period_start);\n\t\t\t\tif($request->period_end) $query->whereDate('applications.created_at', '<=', $request->period_end);\n\t\t\t})->\n\t\t\tget();\n\t\n\t\treturn response()->json(['data' => $data], 200);\n\t}", "title": "" }, { "docid": "5a40ade689c9659b28fdb0fb1985bdb0", "score": "0.56781363", "text": "public function selCiudades(){\n //retornamos todos los registros del proveedor\n //return $query->result(); \n }", "title": "" }, { "docid": "cb490ba40a68c46929fe21eef46b9abb", "score": "0.56757295", "text": "public function getActiveFilters();", "title": "" }, { "docid": "601900c31e337a12246f2c95d62e1297", "score": "0.5666782", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\n\t\t\t//所有上传都要登录了才行\n\t\t\tarray(\n\t\t\t\t'application.filters.AccessControlFilter',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e3a57c2a434b660d08e79133cc8c24a9", "score": "0.56665295", "text": "public function getFiltersList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "e3a57c2a434b660d08e79133cc8c24a9", "score": "0.56665295", "text": "public function getFiltersList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "bc742154546d0032c043ab78d15604e4", "score": "0.56572217", "text": "public function search()\n\t{\n\t\t// $filters = Input::get('filters');\n\t\t// $filters = ['first_name'=>'aw', ];\n\t\t// $\n\t\t// isActive = 2\n\t\t// 0 = inactive\n\t\t// 1 = active \n\t\t// 2 = all\n\n\t\t// if(2)\n\t\t//dd($item);\n\n\t\t$countries = Country::leftJoin('states', 'states.country_id', '=', 'countries.id')\n\t\t\t\t\t\t->leftJoin('cities', 'cities.state_id', '=', 'states.id')\n\t\t\t\t\t\t->orWhere(function($query) use ($filters){\n\t\t\t\t\t\t\tforeach ($filters as $key => $value) {\n\t\t\t\t\t\t\t\t$query->where($key, 'LIKE', $value);\n\t\t\t\t\t\t\t}\n \t\t\t\t\t\t})\n\t\t\t\t\t\t ->take(30);\n\n\t}", "title": "" }, { "docid": "aaa34f7ba71988045dfa56794e281e8a", "score": "0.5655103", "text": "public function buildFilters()\n {\n $this->addFilter('code', new ORM\\StringFilterType('code'), 'Code du fichier',array(), true);\n $this->addFilter('filename', new ORM\\StringFilterType('filename'), 'Nom du fichier',array(), true);\n }", "title": "" }, { "docid": "c23c14f61814192ca23bb865fb8704fd", "score": "0.5649765", "text": "public function buildGrideFilters() \r\n {\r\n $request = Request::getRequest();\r\n \r\n $where = array();\r\n if (isset($request['filter']) && count($request['filter']) > 0) {\r\n foreach ($request['filter'] as $key => $value) {\r\n if ($value == '' || $value == 'all') {\r\n continue;\r\n }\r\n\r\n if (is_numeric($value)) {\r\n switch ($key) {\r\n case 'category':\r\n $where[] = 'row.id IN (SELECT product_id FROM modx_mm_p2c_link WHERE modx_id IN ('.intval($value).'))';\r\n break;\r\n default:\r\n $where[] = 'row.'.$key.' = '.$value;\r\n break;\r\n }\r\n } else {\r\n switch ($key) {\r\n case 'category':\r\n $exp = array_filter(explode(',', $value));\r\n $exp = count($exp) > 0 ? implode(',', $exp) : '';\r\n $where[] = 'row.id IN (SELECT product_id FROM modx_mm_p2c_link WHERE modx_id IN ('.$exp.'))';\r\n break;\r\n case 'create_at':\r\n $where[] = 'row.'.$key.' = \"'.$value.'\"';\r\n break;\r\n case 'closed_at':\r\n $where[] = 'row.'.$key.' = \"'.$value.'\"';\r\n break;\r\n case 'payed_at':\r\n $where[] = 'row.'.$key.' = \"'.$value.'\"';\r\n break;\r\n default:\r\n $where[] = 'row.'.$key.' Like \"%'.$value.'%\"';\r\n break;\r\n }\r\n \r\n }\r\n }\r\n }\r\n \r\n return count($where) > 0 ? ' WHERE '.implode(' AND ', $where) : '';\r\n }", "title": "" }, { "docid": "e770df3232675e87861f6338743f6a54", "score": "0.56496656", "text": "public function getAllFilters();", "title": "" }, { "docid": "788af0ddcbab7e6fbd31f604c83e7c14", "score": "0.56476825", "text": "public function afficherClim(){\r\n\t\t$sql=\"SElECT ID,nom,demande,lieu,secteur,details From service where type='climatisation' \";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "title": "" }, { "docid": "312e6d14c7d40205b02976242eedf417", "score": "0.5633223", "text": "public function index()\n {\n // $this->siswa->select('SELECT id as key', FALSE );\n\n $table_filters = (object) [\"nama_siswa\"=>null,\"kota_siswa\"=>null,\"fakultas_siswa\"=>null,\"angkatan_siswa\"=>null];\n\n foreach($table_filters as $field =>& $value){\n $value = refine_var($this->request->getGet($field));\n };\n\n if($table_filters->nama_siswa){\n $this->siswaModel->where('nama_siswa',$table_filters->nama_siswa);\n };\n\n if($table_filters->kota_siswa){\n $this->siswaModel->where('kota_siswa',$table_filters->kota_siswa);\n };\n\n if($table_filters->fakultas_siswa){\n $this->siswaModel->where('fakultas_siswa',$table_filters->fakultas_siswa);\n };\n\n if($table_filters->angkatan_siswa){\n $this->siswaModel->where('angkatan_siswa',$table_filters->angkatan_siswa);\n };\n\n\n $this->siswaModel->orderBy('id desc');\n $rows = $this->siswaModel->paginate(10);\n\n $filter_label = [\"nama_siswa\"=>\"Nama Siswa\",\"kota_siswa\"=>\"Kota Siswa\",\"fakultas_siswa\"=>\"Fakultas Siswa\",\"angkatan_siswa\"=>\"Angkatan Siswa\"];\n $filter_info = [];\n\n \n foreach ($filter_label as $fld => $label) \n {\n if (!$table_filters->$fld) \n continue;\n \n $filter_info[$fld] = '<span class=\"badge badge-primary\">' . $label . ' = ' . $table_filters->$fld . '</span>';\n \n }\n \n \n $data = [\n 'rows' => $rows,\n 'pager' => $this->siswaModel->pager,\n 'breadcrumb' => [\n 'title' => 'List of Siswa',\n ],\n 'per_page' => 10,\n 'filter_info' => implode(\"\\n\", $filter_info ),\n 'table_filter' => $table_filters,\n ];\n\n \t\t// multi option for kota_siswa\n\t\t$options_kota_siswa = [\"*\"=>\"Select Kota Siswa\",\"bdg\"=>\"Bandung\",\"lb\"=>\"Luar Bandung\"];\n\t\t$data['options_kota_siswa'] = $options_kota_siswa;\n\n\n\n echo view('Admin/Siswa/Index', $data);\n\n }", "title": "" }, { "docid": "08b874df03434acef5d746e388a2cf7b", "score": "0.56327766", "text": "public function buscarCategoria()\n\t{\n\t\t$sql = \"SELECT * FROM categoria_precios WHERE idcategoria_precios = '$this->idcategoriaprecios'\";\n\n\t\t$resp = $this->db->consulta($sql);\n\t\treturn $resp;\n\t}", "title": "" }, { "docid": "5f3debd2f1a39c887a958b278898e6e0", "score": "0.56326425", "text": "abstract public function getSearchFilters(Request $request);", "title": "" }, { "docid": "285e243e2bb92fae9bac7810a279285a", "score": "0.563127", "text": "public function filtro(){\n \n $result = array();\n\n $filter = $_GET['filter'];\n $codigo = $_GET['codigo'];\n\n if(!empty($filter)){\n\n $result = $this->productos->get_term_combo($filter,$codigo, $this->session->userdata('user_id'));\n\n if(!empty($result)){\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array('done'=>1,'data'=>$result) )\n );\n }else{\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array('done'=>0) )\n );\n }\n \n\n }\n\n }", "title": "" }, { "docid": "11bcb079a912972befef7e01423a6759", "score": "0.56292665", "text": "public function consultarContratos()\n {\n $resultado = [];\n $sql = \"SELECT `idContrato`,`TipoContrato`,`contratista`,`contratistaRazonSocial`,`objetoContrato`,`rubro`,`fechaSuscripcion`, `fechaInicio`,`fechaFin`,`valor`,`valorAnticipo`,`supervisor`,`supervisorRazonSocial`,`numeroCdp`,`valorCdp`, `fechaCdp` FROM `contrato`\";\n $result = $this->con->query($sql);\n if ($result) {\n while ($row = $result->fetch_array(MYSQL_ASSOC)) {\n $resultado[] = $row;\n }\n }\n $result->close();\n $this->con->close();\n return $resultado;\n }", "title": "" }, { "docid": "95e0d8763e065753b06b546448bcc46f", "score": "0.5626974", "text": "protected function consultarObservaciones()\n\t {\n\t\t\t $modelosObservacion = array();\n\n\t\t\t foreach ($this->categorias as $categoria) {\n\n\t\t\t\t foreach ($categoria->variablesMedicion as $variable){\n\t\t\t\t \t\tif(!isset($modelosObservacion[$variable->idVariable])){\n\t\t\t\t \t\t\t$modelosObservacion[$variable->idVariable] = [];\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t\t\t$modelos = Observaciones::find()->where(['idAsignacion' => $this->asignacion->idAsignacion, 'idVariable' => $variable->idVariable])->all();\n\t\t\t\t\t\t if (!empty($modelos)) {\n\t\t\t\t\t\t\t $modelosObservacion[$variable->idVariable] = array_merge($modelosObservacion[$variable->idVariable], $modelos);\n\t\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\n\t\t\t return $modelosObservacion;\n\t \t\n\t\t//return Observaciones::find()->where(['idAsignacion' => $this->asignacion->idAsignacion])->all();\n\t }", "title": "" }, { "docid": "635e4583787a2b3fd08104af11fc4bdd", "score": "0.5622605", "text": "public function listeContrat(){\n\t\t\t\t\t $sql = \"SELECT * FROM contrat\";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetchAll();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }", "title": "" }, { "docid": "1f364bdbe268993751d981754958152e", "score": "0.56138116", "text": "public static function getAll(){\n if(Auth::check()){\n return self::where('estatus', true)\n ->where('id_inversionista', Auth::user()->inversionista->id)\n ->get()\n ->toArray();\n }\n }", "title": "" }, { "docid": "f73e3fec8eddb118ccb2526569f20c85", "score": "0.5612767", "text": "public function getFilterQueries() {}", "title": "" }, { "docid": "a3f86d87869382c6b2475360a98a51a1", "score": "0.5605814", "text": "protected function filterRules() \n {\n return [\n 'national_id' => 'digits:10',\n 'status' => 'nullable|in:recepted,captured,visited,completed,rejected',\n ]; \n }", "title": "" }, { "docid": "55e40522a89848da66d890b608cfca04", "score": "0.5604119", "text": "public function getFilters()\n {\n \t$res = Mage::registry('ea_result');\n \tif ($res != null){\n\t $filters = array();\n\t if ($categoryFilter = $this->_getCategoryFilter()) {\n\t $filters[] = $categoryFilter;\n\t }\n\t\n\t $filterableAttributes = $this->_getFilterableAttributes();\n\t foreach ($filterableAttributes as $attribute) {\n\t $filters[] = $this->getChild($attribute['name'] . '_filter');\n\t }\n\n\t return $filters;\n \t} else {\n \t\treturn parent::getFilters();\n \t}\n }", "title": "" }, { "docid": "73a93ac38cde868e443ddc39a8963d03", "score": "0.5598155", "text": "public static function getCiclos(){\n\n\t\tif ( !Usuario::isAdmin() )\n\t\t\treturn Redirect::to('admin/logout');\n\n\t\t$busquedaCiclos = Ciclo::groupBy('cicCiclo')\n\t\t\t\t\t\t\t\t->get(array(\n\t\t\t\t\t\t\t\t'cicId',\n\t\t\t\t\t\t\t\t'cicCiclo'\n\t\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t\t->toArray();\n\t\treturn $busquedaCiclos;\n\t}", "title": "" }, { "docid": "58105587c5e852bf560faea7afd0fbd4", "score": "0.55941373", "text": "public function filters()\n {\n return [\n ];\n }", "title": "" }, { "docid": "6b53c34fd1403151466c5ec6be16e564", "score": "0.55898553", "text": "function getAllColorFilters()\n\t{\n\t\t$results = DB::table('colors as c')->select('c.id as color_id','c.hex_code')->leftJoin('product_to_color as pc','pc.color_id','=','c.id')->where('c.status','1')->groupBY('c.id')->get();\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "d2e6188f8fe68b1911183252639d511b", "score": "0.5584399", "text": "public static function getCatServicos(){\n $id_empresa = decode( sessionVar('_iE') );\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM servicos_categorias \n WHERE id_empresa = :id_empresa',array(':id_empresa'=> $id_empresa ));\n if(count($res)>0){\n return $res;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "ebbfa02b2e4a6fc1bf9ec9e7651db049", "score": "0.55788636", "text": "function filter($posts,$database){\r\n\r\n $queryWhere = '';\r\n $filterArray = [\r\n //Kamer nav daudz opcijas var pievienot ar roku.\r\n 'iestades1' => '(iestID = 1)',\r\n 'iestades2' => '(iestID = 2)',\r\n 'iestades3' => '(iestID = 3)',\r\n\t 'iestades4' => '(iestID = 4)',\r\n\t 'iestades5' => '(iestID = 5)',\r\n\t 'iestades6' => '(iestID = 6)',\r\n 'iestades7' => '(iestID = 7)',\r\n 'izglitiba1' => '(iestID = 1)',\r\n\t 'izglitiba2' => '(iestID = 2)',\r\n\t 'izglitiba3' => '(iestID = 4)',\r\n\t 'izglitiba4' => '(iestID = 7)',\r\n\t 'izglitiba5' => '(iestID = 5)',\r\n\t 'izglitiba6' => '(iestID = 6)'\r\n\r\n ];\r\n if (!empty($posts)) {\r\n $filterArray += getProfesijasForFilter();\r\n $keys = array_keys($filterArray);\r\n foreach ($posts['filter'] as $post) {\r\n if (in_array($post, $keys)) {\r\n if ($queryWhere != '' and $filterArray[$post] != '') {\r\n $queryWhere .= ' and ';\r\n }\r\n\r\n $queryWhere .= $filterArray[$post];\r\n } else {\r\n continue;\r\n }\r\n }\r\n //Meklēšana\r\n if ($posts['filter'][3] != '') {\r\n if ($queryWhere != '') {\r\n $queryWhere .= ' and ';\r\n }\r\n\r\n $queryWhere .= '(macibu_iestades.nosaukums like \\'%' . $posts['filter'][3] . '%\\')';\r\n }\r\n }\r\n\r\n if ($queryWhere != '') {\r\n $queryWhere = 'WHERE ' . $queryWhere;\r\n }\r\n //Apvieno visas tabulas, lai varetu filtret varbut kaut kad tiks uztaisita labaka metode par so, bet pagaidam ta strada\r\n $queryDefault = '\tSELECT \r\n\t\tmacibu_iestades.ID,macibu_iestades.registracijas_numurs,macibu_iestades.nosaukums,macibu_iestades.adrese,macibu_iestades.direktors,macibu_iestades.telefons,macibu_iestades.email,macibu_iestades.latitude,macibu_iestades.longtitude\r\n\tFROM\r\n\t\tmacibu_iestades\r\n\t\t\tLEFT JOIN\r\n\t\t(SELECT \r\n\t\t\tizglitiba, iestades_ID,iestasanas_tips.ID as iestID\r\n\t\tFROM\r\n\t\t\tiestasanas_tips\r\n\t\tINNER JOIN izglitiba_iestades ON iestasanas_tips.ID = izglitiba_iestades.izglitibas_veids) AS izglitiba ON macibu_iestades.ID = izglitiba.iestades_ID\r\n\t\t\tLEFT JOIN\r\n\t\t(SELECT \r\n\t\t\tprofesijas.profesija, iestades_ID, profesijas.ID\r\n\t\tFROM\r\n\t\t\tizglitibas_profesijas\r\n\t\tLEFT JOIN profesijas ON izglitibas_profesijas.profesija = profesijas.ID) AS profesijas ON macibu_iestades.ID = profesijas.iestades_ID \r\n LEFT JOIN macibu_iestades_papildus ON macibu_iestades.ID = macibu_iestades_papildus.iestades_ID '.$queryWhere.' group by macibu_iestades.ID limit 100 ORDER BY macibu_iestades.nosaukums ASC;';\r\n\r\n return $database->getFiltered($queryDefault);\r\n}", "title": "" }, { "docid": "cdeee19a29d58ddd5a606de15756d4b0", "score": "0.557223", "text": "public function index()\n\t{\t\n\t\treturn $this->filter();\n\t}", "title": "" }, { "docid": "e1cad0467507fa4acd3f6510904642c9", "score": "0.55709577", "text": "public function index()\n {\n \n $categorias = Categoria::where('estado','1')->get();\n\n return $categorias;\n\n }", "title": "" }, { "docid": "dbef33eb8338d8c00f19466758a25752", "score": "0.5570571", "text": "private function makeQuery() {\n\n $filtro = \"\";\n\n foreach ($this->request['filter']['columnsSelected'] as $key => $columna) {\n if ($this->request['filter']['valuesSelected'][$key] != '') {\n if ($filtro != '')\n $filtro .= ' AND ';\n $filtro .= \"({$this->form->getDataBaseName()}.ErpExistencias.{$columna} like '{$this->request['filter']['valuesSelected'][$key]}')\";\n }\n }\n\n if ($this->request['filter']['flags']['soloDisponible']) {\n if ($filtro != '')\n $filtro .= \" AND \";\n $filtro .= \"(Reales-Reservadas>0)\";\n }\n\n if ($this->request['filter']['flags']['agrupado']) {\n if ($this->request['filter']['valuesSelected'][0] == '')\n $query = \"select IDArticulo,sum(Reales) as Reales,sum(Reservadas) as Reservadas,sum(Entrando) as Entrando from {$this->form->getDataBaseName()}.ErpExistencias where ({$filtro}) GROUP BY IDArticulo order by {$this->request['filter']['orderBy']}\";\n else\n $query = \"select IDAlmacen, IDArticulo,sum(Reales) as Reales,sum(Reservadas) as Reservadas,sum(Entrando) as Entrando from {$this->form->getDataBaseName()}.ErpExistencias where ({$filtro}) GROUP BY IDAlmacen,IDArticulo order by {$this->request['filter']['orderBy']}\";\n } else {\n $query = \"select {$this->form->getDataBaseName()}.ErpExistencias.* from {$this->form->getDataBaseName()}.ErpExistencias where ({$filtro}) {$groupBy} order by {$this->request['filter']['orderBy']}\";\n }\n\n return $query;\n }", "title": "" }, { "docid": "8003e43d9a9eb67924b77e78f9fe1e1a", "score": "0.55656725", "text": "public function filter(Request $request)\n { \n // validate request data\n $data = $request->validate([\n 'condition' => 'required',\n 'code' => 'required',\n 'api_token' => 'required|min:8',\n ]);\n \n // get user by api_token\n $user = $this->get_user_by_api_token($data['api_token']);\n \n // if bad condition, then set =\n if (!in_array($data['condition'], ['>', '<', '='])) {\n $data['condition'] == '=';\n }\n\n // search secretcodes by condition\n $secretcodes = Secretcode::where('user_id', $user->id)->whereHas('codes', function($q) use ($data) {\n $q->where('value', $data['condition'], $data['code']);\n })->get()->load(\"codes\");\n\n // return object: secretcode + codes\n return $secretcodes;\n }", "title": "" }, { "docid": "c36f59b771c59c723b9f44f81bf4dff5", "score": "0.5562578", "text": "public function getBeneficiarios($criterio = \"1\") {\r\n $beneficiarios = null;\r\n $sql = \"SELECT b.idBeneficiario, CONCAT(re.der_nombre,'-',de.dep_nombre,'-',mu.mun_nombre,'-', c.nombre) as ubicacion, \"\r\n . \"b.codigoInterventoria, \"\r\n . \"b.codigoMintic, b.codigoOperador, b.nombre, b.fechaInicio, \"\r\n . \"b.latitudGrados, b.latitudMinutos, b.latitudSegundos, \"\r\n . \"b.S, b.longitudGrados, b.longitudMinutos, \"\r\n . \"b.longitudSegundos, b.W, m.descripcionMetaBeneficiario, \"\r\n . \"e.descripcionEstadoBeneficiario, \"\r\n . \"d.descripcionDDABeneficiario, \"\r\n . \"g.descripcionGrupoBeneficiario,\"\r\n . \"t.descripcionTipoBeneficiario \"\r\n . \"FROM beneficiario b \"\r\n . \"INNER JOIN metabeneficiario m ON m.idMetaBeneficiario = b.idMetaBeneficiario \"\r\n . \"INNER JOIN estadobeneficiario e ON e.idEstadoBeneficiario = b.idEstadoBeneficiario \"\r\n . \"INNER JOIN ddabeneficiario d ON d.idDDABeneficiario = b.idDDABeneficiario \"\r\n . \"INNER JOIN grupobeneficiario g ON g.idGrupoBeneficiario = b.idGrupoBeneficiario \"\r\n . \"INNER JOIN tipobeneficiario t ON t.idTipoBeneficiario = b.idTipoBeneficiario \"\r\n . \"INNER JOIN centropoblado c ON c.idCentroPoblado = b.idCentroPoblado \"\r\n . \"INNER JOIN municipio mu ON mu.mun_id = c.mun_id \"\r\n . \"INNER JOIN departamento de ON de.dep_id = mu.dep_id \"\r\n . \"INNER JOIN departamento_region re ON re.der_id = de.der_id \"\r\n . \"WHERE \"\r\n . $criterio . \" \"\r\n . \"ORDER BY ubicacion ASC\";\r\n $r = $this->db->ejecutarConsulta($sql);\r\n if ($r) {\r\n $cont = 0;\r\n while ($w = mysql_fetch_array($r)) {\r\n $beneficiarios[$cont]['idBeneficiario'] = $w['idBeneficiario'];\r\n $beneficiarios[$cont]['codigoInterventoria'] = $w['codigoInterventoria'];\r\n $beneficiarios[$cont]['codigoMintic'] = $w['codigoMintic'];\r\n $beneficiarios[$cont]['codigoOperador'] = $w['codigoOperador'];\r\n $beneficiarios[$cont]['centropoblado'] = $w['ubicacion'];\r\n $beneficiarios[$cont]['nombre'] = $w['nombre'];\r\n $sur = \"N\";\r\n if ($w['S']) {\r\n $sur = \"S\";\r\n }\r\n $west = \"E\";\r\n if ($w['W']) {\r\n $west = \"W\";\r\n }\r\n $beneficiarios[$cont]['latitud'] = $w['latitudGrados'] . \"&deg;\" . $w['latitudMinutos'] . \"'\" . $w['latitudSegundos'] . \"''\" . $sur;\r\n $beneficiarios[$cont]['longitud'] = $w['longitudGrados'] . \"&deg;\" . $w['longitudMinutos'] . \"'\" . $w['longitudSegundos'] . \"''\" . $west;\r\n $beneficiarios[$cont]['fechaInicio'] = $w['fechaInicio'];\r\n $beneficiarios[$cont]['estado'] = $w['descripcionEstadoBeneficiario'];\r\n $beneficiarios[$cont]['dda'] = $w['descripcionDDABeneficiario'];\r\n $beneficiarios[$cont]['grupo'] = $w['descripcionGrupoBeneficiario'];\r\n $beneficiarios[$cont]['tipo'] = $w['descripcionTipoBeneficiario'];\r\n $cont++;\r\n }\r\n }\r\n return $beneficiarios;\r\n }", "title": "" }, { "docid": "c8b3212256051fae06202e3669b0fc59", "score": "0.55590117", "text": "public function filtroListaEquipamentos($idCliente){\n\n if(($idCliente != \"\") && is_numeric($idCliente)){\n\n $query = \"SELECT equip.id,\n equip.nomeModeloEquipamento,\n equip.tipo_equipamento as 'equipamento', fabri.nome as 'fabricante',\n equip.potencia,\n equip.qnt_bateria,\n equip.tipo_bateria,\n equip.localBateria,\n simEquip.id_sim,\n clie.nome as 'cliente', fili.nome as 'filial', tipo_equip.tipo_equipamento as 'tipoEquip',\n estado.nome as 'estado', estadofili.nome as 'estadofili'\n FROM tb_equipamento equip\n LEFT JOIN tb_fabricante fabri ON fabri.id = equip.id_fabricante\n LEFT JOIN tb_sim_equipamento simEquip ON simEquip.id_equipamento = equip.id AND simEquip.status_ativo = 1\n LEFT JOIN tb_tipo_equipamento tipo_equip ON equip.tipo_equipamento = tipo_equip.id\n LEFT JOIN tb_cliente clie ON equip.id_cliente = clie.id\n LEFT JOIN tb_filial fili ON fili.id = equip.id_filial AND equip.id_filial > 0\n LEFT JOIN tb_estado estado ON (estado.id = clie.id_estado AND equip.id_filial = 0)\n LEFT JOIN tb_estado estadofili ON (estadofili.id = fili.id_estado AND equip.id_filial > 0)\n WHERE equip.status_ativo = '1' AND equip.id_cliente = '$idCliente'\";\n\n /* MONTA A RESULT */\n $result = $this->db->select($query);\n\n /* VERIFICA SE EXISTE RESPOSTA */\n if(!empty($result))\n {\n\n foreach ($result as $row) {\n $retorno[] = $row;\n }\n\n /* DEVOLVE RETORNO */\n $array = array('status' => true, 'equipamentos' => $retorno);\n\n }else{\n\n $array = array('status' => false, 'equipamentos' => '');\n\n }\n }else{\n $array = array('status' => false, 'equipamentos' => '');\n }\n\n return $array;\n }", "title": "" }, { "docid": "761e36e2b2e30d38d0e2012789b0f305", "score": "0.5556995", "text": "public function generateClinics()\n {\n $search = request()->all();\n $statistics = [];\n \n if($search){\n\n $search['medic'] = (isset($search['medic'])) ? $search['medic'] : '';\n $search['clinic'] = (isset($search['clinic'])) ? $search['clinic'] : '';\n $search['date1'] = (isset($search['date1'])) ? $search['date1'] : '';\n $search['date2'] = (isset($search['date2'])) ? $search['date2'] : '';\n\n \n \n $statistics = $this->clinicRepo->reportsStatisticsAppointments($search);\n \n \n }\n \n return $statistics;\n }", "title": "" }, { "docid": "7f537eca4bdf8b2e384577c3fc3ff96b", "score": "0.5554562", "text": "static function getAll($request){\n\t\treturn self::model()->info()->with([\"prodi\", \"prodi.jurusan\"])->paginate($request->has(\"limit\") ? $request->limit : 10);\n\t}", "title": "" }, { "docid": "8ef17db3f768f4188f34d1068084ddd4", "score": "0.5551525", "text": "function getall_convocatorias_abiertas()\n {\n $convocatoria = $this->db->query(\"\n SELECT\n c.*, g.gestion_descripcion, e.estado_descripcion, e.estado_color,\n pb.plaza_cantidad, b.beca_nombre\n FROM\n convocatoria as c\n left join gestion as g on c.gestion_id = g.gestion_id\n left join estado as e on c.estado_id = e.estado_id\n left join plazas_becas as pb on c.convocatoria_id = pb.convocatoria_id\n left join beca as b on pb.beca_id = b.beca_id\n where\n c.estado_id = 1\n ORDER BY c.convocatoria_id desc\n \")->result_array();\n return $convocatoria;\n }", "title": "" }, { "docid": "d6dc5bd7d222dd5aa700118a1646aca9", "score": "0.55490065", "text": "public function allContrats()\n {\n $contrats = Contrat::all();\n\n if(count($contrats))\n return response()->json($contrats, 200);\n else\n return response()->json(\"not found\", 404);\n \n }", "title": "" }, { "docid": "db3a0fe17d3295bf9c78a2cc20b3c4e1", "score": "0.5543681", "text": "function getApparts(){\n global $db;\n\n $req = \"SELECT * FROM appartement, contratbail, etage WHERE idEtageF = idEtage AND idContratF = idBail AND appartement.etat = 1 AND etage.etat = 1\";\n return $db->query($req)->fetchAll();\n }", "title": "" }, { "docid": "60b2379a8a2ea26b8c50c66ea613e93d", "score": "0.5542738", "text": "public function index() {\n\t\t$aMeses = $aAnos = $aCargos = $aLotacoes = $aVinculos = array ();\n\t\t$iMatricula = $sNome = '';\n\t\t\n\t\t$aInstituicoes = $this->__getInstituicoes ();\n\t\t\n\t\t/**\n\t\t * Peristir os dados do filtro quando voltar para a tela de busca\n\t\t */\n\t\tif (! empty ( $_GET ['instituicao'] )) {\n\t\t\t\n\t\t\t// Persiste instituicao\n\t\t\t$this->data ['Filtro'] ['instituicao'] = $_GET ['instituicao'];\n\t\t\t$aAnos = $this->__getAnos ( $_GET ['instituicao'] );\n\t\t\t\n\t\t\t// Persiste o ano\n\t\t\tif (! empty ( $_GET ['ano'] )) {\n\t\t\t\t\n\t\t\t\t$this->data ['Filtro'] ['ano'] = $_GET ['ano'];\n\t\t\t\t$aMeses = $this->__getMeses ( $_GET ['ano'], $_GET ['instituicao'] );\n\t\t\t\t\n\t\t\t\t// Persiste o mês\n\t\t\t\tif (! empty ( $_GET ['mes'] )) {\n\t\t\t\t\t\n\t\t\t\t\t$this->data ['Filtro'] ['mes'] = $_GET ['mes'];\n\t\t\t\t\t\n\t\t\t\t\t// Persiste cargos\n\t\t\t\t\t$aCargos = $this->__getCargos ( $_GET ['ano'], $_GET ['mes'], $_GET ['instituicao'] );\n\t\t\t\t\tif (! empty ( $_GET ['cargo'] )) {\n\t\t\t\t\t\t$this->data ['Filtro'] ['cargo'] = $_GET ['cargo'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Persiste lotações\n\t\t\t\t\t$aLotacoes = $this->__getLotacoes ( $_GET ['ano'], $_GET ['mes'], $_GET ['instituicao'] );\n\t\t\t\t\tif (! empty ( $_GET ['lotacao'] )) {\n\t\t\t\t\t\t$this->data ['Filtro'] ['lotacao'] = $_GET ['lotacao'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Persiste vinculos\n\t\t\t\t\t$aVinculos = $this->__getVinculos ( $_GET ['ano'], $_GET ['mes'], $_GET ['instituicao'] );\n\t\t\t\t\tif (! empty ( $_GET ['vinculo'] )) {\n\t\t\t\t\t\t$this->data ['Filtro'] ['vinculo'] = $_GET ['vinculo'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Persiste matrícula\n\t\tif (! empty ( $_GET ['matricula'] )) {\n\t\t\t$this->data ['Filtro'] ['matricula'] = $iMatricula = preg_replace ( '/[\\\\\\]/', '', $_GET ['matricula'] );\n\t\t}\n\t\t\n\t\t// Persiste nome\n\t\tif (! empty ( $_GET ['nome'] )) {\n\t\t\t$this->data ['Filtro'] ['nome'] = $sNome = preg_replace ( '/[\\\\\\]/', '', $_GET ['nome'] );\n\t\t}\n\t\t\n\t\t// Persiste checkbox de demitidos\n\t\tif (! empty ( $_GET ['demitidos'] )) {\n\t\t\t$this->data ['Filtro'] ['demitidos'] = $_GET ['demitidos'];\n\t\t}\n\t\t\n\t\t$this->set ( array (\n\t\t\t\t'aAnos' => $this->json ( $aAnos, false ),\n\t\t\t\t'aMeses' => $this->json ( $aMeses, false ),\n\t\t\t\t'aInstituicoes' => $this->json ( $aInstituicoes, false ),\n\t\t\t\t'aCargos' => $this->json ( $aCargos, false ),\n\t\t\t\t'aLotacoes' => $this->json ( $aLotacoes, false ),\n\t\t\t\t'aVinculos' => $this->json ( $aVinculos, false ),\n\t\t\t\t'matricula' => $this->json ( $iMatricula, false ),\n\t\t\t\t'nome' => $this->json ( $sNome, false ) \n\t\t) );\n\t}", "title": "" }, { "docid": "d7daceaa36503ba2c8410fc51d73e9dc", "score": "0.5542202", "text": "public function allCatesDescWithFilters();", "title": "" }, { "docid": "bb568cee6e532ea34f06a44d2708890f", "score": "0.5539113", "text": "function getComprobantes()\n {\n $this->db->select('tipo_comprobante.*', FALSE);\n $sql = $this->db->get('tipo_comprobante');\n\n\n\n if ($sql->num_rows() > 0) {\n foreach ($sql->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n }", "title": "" }, { "docid": "8df226f4a69727a039377341b374d53a", "score": "0.5538093", "text": "public function getContrato()\n {\n try {\n $datos = $_REQUEST;\n $filtros = array_filter($datos);\n $dbm = new DbmTransporte($this->get(\"db_manager\")->getEntityManager());\n $entidad = $dbm->BuscarContrato($filtros);\n \n if (!$entidad) {\n return new View(\"No se encontro ningun registro \", Response::HTTP_PARTIAL_CONTENT);\n }\n\n return new View($entidad, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "6f1a78662cc3b67b200293dc56369edb", "score": "0.5536439", "text": "public function index()\n {\n //\n return Categoria::all();\n }", "title": "" }, { "docid": "871ae64948ceae2b1338451b0709daea", "score": "0.5531451", "text": "public function serviciosActivos(){\n return Servicio::where('estado', '=', 'activo')->orderBy('visitas','desc')->get();\n \n }", "title": "" }, { "docid": "bab6d7b0ee504f52d318c69c09278d1c", "score": "0.5531235", "text": "public function baseFilter() {\n\t\t$querySearched = \"\";\n\n\t\tif (Auth::user()->groupe->id === 1)\n \t\t\t$querySearched = '*:* ';\n \n \telse {\n \t\t$user = Auth::user();\n \t\t$themes = $user->groupe->themes;\n\t\t\t$querySearched = (new GetKeywords($user))->getKeywordsByThemes($themes);\n \t}\n\n\t\t\n//dd($querySearched);\n\t\t\n\t\t// get a select query instance\n\t\t$query = $this->client->createSelect();\n\t\t$this->client->getPlugin('postbigrequest');\n\n\t\t$helper = $query->getHelper();\n\t\t//$querySearched = (new GetKeywords(Auth::user()))->get();\n\t\t//dd($querySearched);\n\t\t//dd($querySearched);\n\t\t$keywordsquery = \"\";\n\t\t$Textfields = ['Title_en', 'Title_fr', 'Title_ar' ,'Fulltext_en','Fulltext_fr', 'Fulltext_ar'];\n\n\t\tforeach ($Textfields as $value) {\n\t\t $keywordsquery .= $value.\":(\".$querySearched.\") \";\n\t\t}\n\t\t\n\t\t$query->createFilterQuery('filterkeywords')->setQuery($keywordsquery);\n\t\t\n\t\t$query->setFields([\n\t\t\t'id',\n\t\t\t'Title_en','Title_fr', 'Title_ar',\n\t\t\t'Fulltext_en','Fulltext_fr','Fulltext_ar',\n\t\t\t'document', 'Source','SourceName','ArticleLanguage', 'SourceDate','Author','score']);\n\n\t\t$facetSet = $query->getFacetSet();\n\t\t$facetSet->createFacetField('language')->setField('ArticleLanguage');\n\t\t$facetSet->createFacetField('author')->setField('Author');\n\t\t$facetSet->createFacetField('source')->setField('SourceName');\n\t\t$facetSet->createFacetField('date')->setField('SourceDate');\n\t\t$facetSet->setMinCount(1);\n\t\treturn $query;\n\n\t}", "title": "" }, { "docid": "fe4af429b2f46924b74a309cb88365b0", "score": "0.55290973", "text": "function get_all_applicant()\n {\n $this->db->join('course', 'courseID');\n $this->db->order_by('apid', 'asc');\n $this->db->where('studentstat !=', 'Approved');\n return $this->db->get('applicant')->result_array();\n }", "title": "" }, { "docid": "5c1bdc12edb33f4fc5c2963d13c8728f", "score": "0.5526848", "text": "public function beforeFilter() {\r\n parent::beforeFilter();\r\n $usuarios = $this->Auth->user();\r\n $acessos = $this->Acesso->find('list', array('fields' => array('pagina_id'), 'conditions' => array('conta_id' => $usuarios['Conta']['id'], 'visualizar' => 1)));\r\n $paginas_permitidas = $this->Pagina->find('all', array('fields' => array('nome', 'url', 'class_icon'), 'conditions' => array('id' => $acessos, \"url in ('Relatorios/gerencial','Logs', 'HistoricoChips', 'HistoricoVeiculos')\")));\r\n $this->set(compact('paginas_permitidas'));\r\n }", "title": "" }, { "docid": "f145f0a67253dd5d1ab8ea18a915dd8b", "score": "0.5515691", "text": "public function index()\n {\n $buscar= $request->buscar;\n if($buscar==''){\n $disciplinas = Disciplinas::all();\n }\n else{\n $disciplinas= Disciplinas::where('nombre', 'like', '%'.$buscar.'%')->get();\n }\n return $disciplinas;\n }", "title": "" }, { "docid": "a45a154007ec8cfad830b6014e8325ce", "score": "0.55126053", "text": "public function getCodigosSinUso($idBiblioteca)\n {\n /**$idUsuario=Auth::user()->id;\n $idBiblioteca=DB::table('bibliotecas')->select('id')->where('id_user','=',$idUsuario)->get()->first();\n if($idBiblioteca!=null)\n {*/\n $idPlanos=DB::table('planos')->select('id')->where('id_biblioteca','=',$idBiblioteca)->get();\n $idPlanosArray=array();\n foreach($idPlanos as $idPlano)\n {\n array_push($idPlanosArray,$idPlano->id);\n }\n if(count($idPlanosArray)>0)\n {\n $codigosUbicados=DB::table('codigoubicados')->select('id_codigo')->whereIn('id_plano',$idPlanosArray)->get();\n $codigosArray=array();\n foreach($codigosUbicados as $codigoU)\n {\n array_push($codigosArray,$codigoU->id_codigo);\n }\n $codigos=DB::table('codigos')->select()->where('id_biblioteca','=',$idBiblioteca)->whereNotIn('id',$codigosArray)->get();\n return response(['planos'=>$idPlanosArray,'codigos'=>$codigos],200);\n }\n else {\n return response(['error'=>'No se encontraron planos'],404);\n }\n /** }\n else {\n return response(['error'=>\"No se encontró la biblioteca\"],200);\n }*/\n\n}", "title": "" }, { "docid": "9f01138f173f21c2d701f9c4c3440232", "score": "0.55118763", "text": "public function productos_libro_precios_filter(){\n\n $result = array();\n\n $filter = $_GET['filter'];\n\n if(!empty($filter)){\n\n $this->productos->initialize($this->dbConnection);\n\n $result = $this->productos->get_term_two($filter, $this->session->userdata('user_id'));\n\n if(!empty($result)){\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array('done'=>1,'data'=>$result) )\n );\n }else{\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array('done'=>0) )\n );\n }\n \n\n }\n\n }", "title": "" } ]
57cf7eb5990833f23e218141c3dde976
Determine MPD playlist item type radio, upnp or song Similar to daemon.php391
[ { "docid": "93443ad2a9613d45286b72f25a6b5179", "score": "0.8036515", "text": "function mpdItemType($song) {\n\tif (substr($song['file'], 0, 4) == \"http\") {\n\t\t$type = isset($song['Artist']) ? 'upnp' : 'radio';\n\t}\n\telse {\n\t\t// TODO check if playlist should be separate\n\t\t$type = 'song';\n\t}\n\treturn $type;\n}", "title": "" } ]
[ { "docid": "56b3d9b01d39d5ce9e512eefaafa5884", "score": "0.57997835", "text": "function mpdEnrichItemInfo(&$res) {\n\tswitch ($res['type'] = mpdItemType($res)) {\n\t\tcase 'radio':\n\t\t\t// TODO make this a define\n\t\t\t$res['coverurl'] = 'images/webradio-cover.jpg';\n\t\t\t$res['Name'] = \"Radio station\";\n\n\t\t\t// TODO remove numerical indexes\n\t\t\t// TODO check if we want to parse Title into Artist - Title\n\t\t\tif (count($db = ConfigDB::read('cfg_radio', $res['file']))) {\n\t\t\t\t$res['x_radio'] = array();\n\t\t\t\tforeach ($db[0] as $key => $value) {\n\t\t\t\t\tif (!is_numeric($key)) {\n\t\t\t\t\t\t$res[$key] = $value;\n\t\t\t\t\t\t$res['x_radio'][$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$res['x_db'] = $db;\t// TODO remove\n\n\t\t\t\t// set coverurl\n\t\t\t\t$res['coverurl'] = 'local' == $res['logo'] ? 'images/webradio-logos/' . $res['name'] . '.png' : $res['logo'];\n\t\t\t\tunset($res['logo']); // TODO not needed\n\n\t\t\t\tif (isset($res['name'])) {\n\t\t\t\t\t$res['Name'] = $res['name'];\n\t\t\t\t\tunset($res['name']); // TODO not needed\n\t\t\t\t}\n\t\t\t}\n\t\t\t// break; // fallthrough\n\t\tcase 'upnp':\n\t\t\t// upnp + radio: fill title with full filename\n\t\t\tif (!isset($res['Title'])) {\n\t\t\t\t$res['Title'] = $res['file'];\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// song: fill title with filename without extension\n\t\t\tif (!isset($res['Title'])) {\n\t\t\t\t$res['Title'] = pathinfo($res['file'], PATHINFO_FILENAME);\n\t\t\t}\n\t}\n}", "title": "" }, { "docid": "ec15ea31c210293bbae2ff8727da780e", "score": "0.5794593", "text": "function is_playlist( $post = NULL ) {\n\treturn 'playlist' === get_post_type( $post );\n}", "title": "" }, { "docid": "5baf804d6adb70526229c6e37e7e031c", "score": "0.5722076", "text": "function wpra_detect_item_type($itemId, $item, $sourceId)\n{\n $logger = wpra_get_logger($sourceId);\n $url = parse_url($item->get_permalink());\n $url['query_str'] = isset($url['query']) ? $url['query'] : '';\n parse_str($url['query_str'], $url['query']);\n\n if (stripos($url['host'], 'youtube.com') !== false && !empty($url['query']['v'])) {\n $logger->info('Detected YouTube feed item');\n\n $videoCode = $url['query']['v'];\n $embedUrl = sprintf('https://youtube.com/embed/%s', $videoCode);\n\n update_post_meta($itemId, 'wprss_item_is_yt', '1');\n update_post_meta($itemId, 'wprss_item_yt_embed_url', $embedUrl);\n update_post_meta($itemId, 'wprss_item_embed_url', $embedUrl);\n }\n}", "title": "" }, { "docid": "a436015ef412b145fc1c3d9eff9c37ff", "score": "0.5565573", "text": "function is_audio_playlist_archive() {\n\treturn is_playlist_archive() && is_tax( 'playlist_type', 'audio');\n}", "title": "" }, { "docid": "c7fcb73e15a68c00f37497e8fc3f2f92", "score": "0.55627716", "text": "function fetchAudioListPlayer($runtime, $playlist, $filearea=\"content\",$protocol=\"\", $width=\"400\",$height=\"350\",$sequentialplay=\"true\",$useplayer,$showplaylist,$usepoodlldata=false){\nglobal $CFG, $USER, $COURSE;\n\n$moduleid = optional_param('id', 0, PARAM_INT); // The ID of the current module (eg moodleurl/view.php?id=X )\n\n\n//determine if we are on a mobile device or not\n $ismobile = isMobile($CFG->filter_poodll_html5play);\n\n\t//if its a poodll player we want an xml feed\n\t//if its jw or fp we want an rss feed\n\t//if we are ipads or html playlists + fp, we wont use a data feed, we will use a list of links\n\t//so in that case we pass a \"\" and just spit out the links.\n\tswitch($useplayer){\n\t\tcase \"pd\": \t$datatype = \"poodllaudiolist\";break;\n\t\tcase \"jw\":\t$datatype = \"poodllrsslist\";break;\n\t\tcase \"fp\": if($showplaylist) {\n\t\t\t\t\t\t$datatype=\"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$datatype = \"poodllrsslist\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t}\n\t\n\t//if we are using poodll data, flag that in the filearea param\n\tif($usepoodlldata){$filearea=\"poodlldata\";}\n\t\n\t\n\t//determine playlist url if necessary, if we are using fp player and a visible list we don't need this\n\t$fetchdataurl=\"\";\n\tif($datatype!=\"\"){\n\t\t//get the url to the automated medialist maker\n\t\t//$fetchdataurl= $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=poodllaudiolist'\n\t\t$fetchdataurl= $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=' . $datatype \n\t\t\t. '&courseid=' . $COURSE->id\n\t\t\t. '&moduleid=' . $moduleid\n\t\t\t. '&paramone=' . $playlist \n\t\t\t. '&paramtwo=' . $protocol \n\t\t\t. '&paramthree=' . $filearea\n\t\t\t. '&cachekiller=' . rand(10000,999999);\n\t}\n\t\n\n\t//If poodll player is not default, use flowplayer it will handle mobile and flash\n\tif($useplayer!=\"pd\"){\n\t\t$returnString=\"\";\n\t\t //if html playlist use links as list\n\t\t if ($showplaylist){\n\t\t\t$returnString = fetch_poodllaudiolist($moduleid,$COURSE->id,$playlist, \"http\", $filearea,\"alist\");\n\t\t\t$returnString .= \"<br clear='all'/>\";\n\t\t\t//get a flowplayer without a datafeed\n\t\t\t//size is hardcoded to match images pulled from styles.css in pooodll filter\n\t\t\t$returnString .= fetchFlowPlayerCode($width,40,\"/\",\"audiolist\", $ismobile, \"\", $sequentialplay);\n\t\t\t\n\t\t //if rss playlist use url of datafeed and pass to flowplayer\n\t\t }else{\n\t\t\t//get a flowplayer using the data feed\n\t\t\t//size is hardcoded to match images pulled from styles.css in pooodll filter\n\t\t\t$returnString .= fetchFlowPlayerCode($width,40,\"/\",\"audiolist\", $ismobile, $fetchdataurl, $sequentialplay);\n\t\t }\n\t\t \n\t\t return $returnString;\n\t\n\t//If this is a poodll player playlist \n\t}else{\n\t\t//Set our servername .\n\t\t$flvserver = $CFG->poodll_media_server;\n\n\n\t\n\t\t\n\t\t$params = array();\n\t\t\t$params['red5url'] = urlencode($flvserver);\n\t\t\t$params['playertype'] = $protocol;\n\t\t\t$params['sequentialplay'] = $sequentialplay;\n\t\t\t$params['playlist']=urlencode($fetchdataurl);\n\t\t\n\t\t\t$returnString= fetchSWFWidgetCode('poodllaudiolistplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t\t\t\t\t\t\t\n\t\t\treturn $returnString;\n\t}\n}", "title": "" }, { "docid": "19c677f8ec7d084692807691681787e6", "score": "0.5491318", "text": "function is_audio_playlist( $playlist = NULL ) {\n\treturn is_playlist( $playlist ) && ( 'audio' == get_playlist_type( $playlist ) );\n}", "title": "" }, { "docid": "2441d9564bbe4ac68f16e1a73920f30f", "score": "0.5487471", "text": "private function _setType()\n {\n switch (metadata('item', 'item type name')) {\n case 'Oral History':\n $type = 'interview';\n break;\n case 'Moving Image':\n $type = 'videoRecording';\n break;\n case 'Sound':\n $type = 'audioRecording';\n break;\n case 'Email':\n $type = 'email';\n break;\n case 'Website':\n case 'Hyperlink':\n $type = 'webPage';\n break;\n case 'Document':\n case 'Event':\n case 'Lesson Plan':\n case 'Person':\n case 'Interactive Resource':\n case 'Still Image':\n default:\n $type = 'document';\n break;\n }\n $this->_coins['rft.type'] = $type;\n }", "title": "" }, { "docid": "9507cd3779cdbd2ef8c6b93cc6203f33", "score": "0.5394232", "text": "function get_playlist_meta( $playlist = NULL ) {\n\t$playlist = get_post( $playlist );\n\tif( ! is_playlist( $playlist ) ) {\n\t\treturn false;\t\n\t}\n\t$meta = get_post_meta( $playlist->ID, '_playlist_metadata', true );\n\treturn $meta ? (array) $meta : array();\n}", "title": "" }, { "docid": "f929c348c08bedeac39d697539d5fd60", "score": "0.53664523", "text": "function get_itunes_type($type)\n\t{\n\t\t$CI =& get_instance();\n\t\t$types = $CI->config->item('itunes_type');\n\n\t\tforeach ($types as $mytype => $itunetype) \n\t\t{\n\t\t\tif($type == $mytype)\n\t\t\t{\n\t\t\t\treturn $itunetype;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "edafec63214d097b73a57e15ea91939b", "score": "0.5271959", "text": "function fetch_poodllaudiolist($moduleid, $courseid, $path=\"/\", $playertype, $filearea,$listtype=\"xml\"){\nglobal $CFG, $DB, $COURSE;\t\n\n\t//=================================================================\n\t\n//for debug purposes\n/*\n\tglobal $DB;\n \n //$ret_output .= '0 ' . get_system_context()->id;\n \n $result = array();\n\t\t//set up xml to return\t\n\t\t$ret_output = \"<files>\\n\";\n $file_records = $DB->get_records('files');\n foreach ($file_records as $file_record) {\n\t\t\t\n\t\t\t\t$ret_output .= '<file filename=\"' . $file_record->filename . '\" contextid=\"' . $file_record->contextid . '\" component=\"' . $file_record->component . '\" filearea=\"' . $file_record->filearea . '\" />';\n \n }\n\n\t\n\t//close xml to return\n\t$ret_output .= \"</files>\";\n\t\t//Return the data\n\treturn $ret_output;\n\t*/\n\n\t//==================================================================\n\t\n\t//if a single file was passed in, just play that alone.\n\t//for PoodlL 2 this is all we can do in a question right now\n\tif(strlen($path) > 4 && substr($path,-4)==\".flv\"){\n\t\tswitch($listtype){\n\t\t\tcase \"xml\":\n\t\t\t\t$ret_output = \"<audios>\\n\";\n\t\t\t\t$ret_output .= \"\\t<audio audioname='\" . basename($path). \"' playertype='\" . $playertype . \"' url='\" . trim($path) . \"'/>\\n\";\n\t\t\t\t$ret_output .= \"</audios>\\n\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"rss\":\n\t\t\t\t $ret_output = \"<channel><title></title>\";\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"alinks\":\n\t\t\t\t$ret_output = \"<div class=\\\"poodllplaylist\\\">\";\n\t\t\t\t$ret_output .= \"<a href=\\\"\" . trim($path) . \"\\\"><span>\" . basename($path). \"</span></a>\";\n\t\t\t\t$ret_output .= \"</div>\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $ret_output;\n\t}\n\n\n\t\n\t//FIlter could submit submission/draft/content/intro as options here\n\tif($filearea == \"\") {$filearea =\"content\";}\n\t\n\n\t\n\t//make sure we have a trailing slash\n\tif(strlen($path)>0){\n\t\tif(substr($path,-1) !='/'){\n\t\t\t$path .= \"/\";\n\t\t}\n\t\tif(substr($path,0,1) !='/'){\n\t\t\t$path = \"/\" . $path;\n\t\t}\n\t}else{\n\t\t$path = \"/\";\n\t}\n\t\n\n\t//set up xml/div to return\t\n\tswitch($listtype){\n\t\t\tcase \"xml\":\n\t\t\t\t$ret_output = \"<audios>\\n\";\n\t\t\t\tbreak;\n\t\t\tcase \"rss\":\n\t\t\t\t $ret_output = \"<channel><title></title>\";\n\t\t\t\tbreak;\n\t\t\tcase \"alist\":\n\t\t\t\t$ret_output = \"<div class=\\\"poodllplaylist\\\">\";\n\t\t\t\tbreak;\n\t}\n\t\n\tif($filearea==\"poodlldata\"){\n\t//if(strlen($path)>6 && true){\n\t//If we are using PoodLL Data Dir file handling, we build a list of files here:\n\t//=============================================\n\t\t//filter file types\n\t\t$filterstring=\"/*.{flv,mp3,mp4}\";\n\t\t//set up the search dir\n\t\t$baseDir = $CFG->{'dirroot'} . \"/\" . $CFG->{'filter_poodll_datadir'} . $path;\n\t\t$baseURL = $CFG->{'wwwroot'} . \"/\" . $CFG->{'filter_poodll_datadir'} . $path;\n\t\t//for debugging\n\t\t//$ret_output .= $baseDir . \" \" . $baseURL;\n\t\tforeach (glob($baseDir . $filterstring,GLOB_BRACE) as $filename) {\n\t\t\t$urltofile = $baseURL . basename($filename);\n\t\t\tswitch($listtype){\n\t\t\t\tcase \"xml\":\n\t\t\t\t\t$ret_output .= \"\\t<audio audioname='\" . basename($filename) .\"' playertype='\" . $playertype . \"' url='\" . $urltofile . \"'/>\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t//\"type\" was necessary for flowplayer ??? but it breaks JWPlayer\n\t\t\t\t// justin 20141220\n\t\t\t\tcase \"xrss\":\n\t\t\t\t\t$ext = substr($filename,-4);\n\t\t\t\t\tswitch($ext){\n\t\t\t\t\t\t\tcase \".mp3\": $mimetype=\"audio/mpeg3\"; break;\n\t\t\t\t\t\t\tcase \".flv\": $mimetype=\"audio/mp4\"; break;\n\t\t\t\t\t\t\tcase \".mp4\": $mimetype=\"video/x-flv\"; break;\n\t\t\t\t\t}\n\t\t\t\t\t$ret_output .= \"\\t<item><title>\" . \n\t\t\t\t\t\tbasename($filename) .\"</title><media:content url=\\\"\" .\n\t\t\t\t\t\ttrim($urltofile) . \"\\\" type=\\\"\" . $mimetype .\n\t\t\t\t\t\t\"\\\"/></item>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"rss\":\n\t\t\t\t\t$ret_output .= \"\\t<item><title>\" . \n\t\t\t\t\t\tbasename($filename) .\"</title><media:content url=\\\"\" .\n\t\t\t\t\t\ttrim($urltofile) . \"\\\" /></item>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"alist\":\n\t\t\t\t\t$ret_output .= \"<a href=\\\"\" . trim($urltofile) . \"\\\"><span>\" . basename($filename). \"</span></a>\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//$xml_output .= \"\\t<audio audioname='\" . basename($filename) .\"' playertype='\" . $playertype . \"' url='\" . $baseURL . basename($filename). \"'/>\\n\";\n\t\t}\n\t\n\t//=============================================\n\t//end of PoodLL Data Dir\n\t}else{\n\t\n\t//fetch info and ids about the module calling this data\n\t$course = $DB->get_record('course', array('id'=>$courseid));\n\t$modinfo = get_fast_modinfo($course);\n\t$cm = $modinfo->get_cm($moduleid);\n\t\n\t//If we are using Moodle 2 file handling, we build a list of files here:\n\t//=============================================\n\t//get filehandling objects\n\t$browser = get_file_browser();\n\t$fs = get_file_storage();\n\n\t//get a handle on the module context\n\t$thiscontext = context_module::instance($moduleid);\n\t$contextid = $thiscontext->id;\n\t\n\t//fetch a list of files in this area, and sort them alphabetically\n\t$files = $fs->get_area_files($contextid, \"mod_\" . $cm->modname, $filearea);\n\tusort($files, \"srtFilenames\");\n\n\t//loop through all the media files and load'em up\t\n\t\tforeach ($files as $f) {\n\t\t\t$filename =trim($f->get_filename());\n\t\t\t//if we are not a directory and filename is long enough and extension is mp3 or flv or mp4, we proceed\n\t\t\tif ($filename != \".\"){\n\t\t\t\tif(strlen($filename)>4){\n\t\t\t\t\t$ext = substr($filename,-4);\n\t\t\t\t\tif($ext==\".mp3\" || $ext==\".mp4\" || $ext==\".flv\"){\n\t\t\t\t\t\tswitch($ext){\n\t\t\t\t\t\t\tcase \".mp3\": $mimetype=\"audio/mpeg3\"; break;\n\t\t\t\t\t\t\tcase \".flv\": $mimetype=\"audio/mp4\"; break;\n\t\t\t\t\t\t\tcase \".mp4\": $mimetype=\"video/x-flv\"; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t//fetch our info object\n\t\t\t\t\t\t$fileinfo = $browser->get_file_info($thiscontext, $f->get_component(),$f->get_filearea(), $f->get_itemid(), $f->get_filepath(), $f->get_filename());\n\n\t\t\t\t\t\t//if we are at the dir level\n\t\t\t\t\t\tif($f->get_filepath()==$path){\n\t\t\t\t\t\t\t//get the url to the file and add it to the XML\n\t\t\t\t\t\t\t$urltofile = $fileinfo->get_url();\n\t\t\t\t\t\t\tswitch($listtype){\n\t\t\t\t\t\t\t\tcase \"xml\":\n\t\t\t\t\t\t\t\t\t$ret_output .= \"\\t<audio audioname='\" . basename($filename) .\"' playertype='\" . $playertype . \"' url='\" . trim($urltofile) . \"'/>\\n\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"rss\":\n\t\t\t\t\t\t\t\t\t$ret_output .= \"\\t<item><title>\" . \n\t\t\t\t\t\t\t\t\t\tbasename($filename) .\"</title><media:content url=\\\"\" .\n\t\t\t\t\t\t\t\t\t\ttrim($urltofile) . \"\\\" type=\\\"\" . $mimetype .\n\t\t\t\t\t\t\t\t\t\t\"\\\"/></item>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase \"alist\":\n\t\t\t\t\t\t\t\t\t$ret_output .= \"<a href=\\\"\" . trim($urltofile) . \"\\\"><span>\" . basename($filename). \"</span></a>\";\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\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\t//=============================================\n\t//end of Moodle 2 file \n\t}\n\t\n\t\n\t//for debugging\n\t//$ret_output .= \"\\t<audio audioname='\" . $cm->modname . \" \" . $filearea . \" \" . $urltofile .\"' playertype='\" . $playertype . \"' url='\" . $mediapath . basename($contextid). \"'/>\\n\";\n\t\n\t//close xml/alist tags to return\n\tswitch($listtype){\n\t\tcase \"xml\":\n\t\t\t$ret_output .= \"</audios>\";\n\t\t\tbreak;\n\t\tcase \"rss\":\n\t\t\t$ret_output .= \"</channel>\";\n\t\t\tbreak;\n\t\tcase \"alist\":\n\t\t\t$ret_output .= \"</div>\";\n\t\t\tbreak;\n\t}\n\t\n\n\t//Return the data\n\treturn $ret_output;\n\n\n}", "title": "" }, { "docid": "f720db6f8bb62d9d306e5341ab3d8ec1", "score": "0.52540636", "text": "function getPlayerWhenPlaylist(){\n\t$autoCont = '';\n\t$showCountDown = '';\n\t$playlistId = $_GET['pllstId'];\n\t//receive entries list as string\n\t$entriesList = $_GET['pllstByEntId'];\n\t\n\t$countDownTTS = $_GET['cntDwnTTS'];\n\t$countDownDuration = $_GET['cntDwnDur'];\n\n\tif (empty($countDownTTS)){\n\t\t$countDownTTS = \"10\";\n\t}\n\tif(empty($countDownDuration)){\n\t\t$countDownDuration = \"5\";\n\t}\n\n\t// move entries list string to array\n\t$entriesArray = explode(\",\",$entriesList);\n\t// Adding quotation marks to each element of the array\n\tforeach ($entriesArray as &$value){\n\t\t$value = '\"'.$value.'\"';\n\t}\n\tunset($value);\n\t//move updated array back to string\n\t$entriesList = implode(\",\",$entriesArray);\n\n\tif ($_GET['plLstAutoCont']=='on'){\n\t\t$autoCont = \"true\";\n\t}else{\n\t\t$autoCont = \"false\";\n\t}\n\n\tif ($_GET['plLstLoop']=='on'){\n\t\t$playlistLoop = \"true\";\n\t}else{\n\t\t$playlistLoop = \"false\";\n\t}\n\n\tif ($_GET['cntDwn']=='on'){\n\t\t$showCountDown = \"true\";\n\t}else{\n\t\t$showCountDown = \"false\";\n\t}\n\n\tif (!empty($entriesList) AND $_GET['plLstEntId']=='on'){\n\t\t// Adding code for Playlist by Entries IDs list\n\t\treturn \n\t\t\"\\n\\t try {\n\t\t\tvar kalturaPlayer = KalturaPlayer.setup(playerConfig);\n\t\t\tkalturaPlayer.loadPlaylistByEntryList({entries: [$entriesList]}, {options: {autoContinue: $autoCont , loop: $playlistLoop}, countdown: {timeToShow: $countDownTTS , duration: $countDownDuration, showing: $showCountDown}});\n\t\t } catch (e) {\n\t\t\tconsole.error(e.message)\n\t\t }\";\n\t}elseif(!empty($playlistId) AND $_GET['plLstPlLstId']=='on'){\n\t\t// Adding code for Playlist by Playlist ID\n\t\treturn \n\t\t\t\"\\n\\t try {\n\t\t\tvar kalturaPlayer = KalturaPlayer.setup(playerConfig);\n\t\t\tkalturaPlayer.loadPlaylist({playlistId: '$playlistId'}, {options: {autoContinue: $autoCont , loop: $playlistLoop}, countdown: {timeToShow: $countDownTTS, duration: $countDownDuration, showing: $showCountDown}});\n\t\t } catch (e) {\n\t\t\tconsole.error(e.message)\n\t\t }\";\n\t}else{\n\t\treturn \"getPlayer(playerConfig, mediaInfo);\";\n\t}\t\n}", "title": "" }, { "docid": "177395d75e15f56345223988e5d22ae8", "score": "0.52494675", "text": "private function doPlaylist() {\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3df2cffaeebc6eba4a19dd070ef5d470", "score": "0.5248703", "text": "protected function getPlayMode(string $type): bool\n {\n $mode = Helper::getMode($this->attributes[\"PlayMode\"]);\n return $mode[$type];\n }", "title": "" }, { "docid": "59c710ba347b8e4ef902c0f06fff1a82", "score": "0.5180736", "text": "private function parseType($html) {\n\n $sidebarInformation = $html->find('div#contentWrapper div#content div.js-scrollfix-bottom div');\n foreach($sidebarInformation as $value) {\n if(strpos($value->plaintext, 'Type:') !== false) {\n if(strpos($value->plaintext, 'Unknown') === false) {\n // MAL has no links for Music types anymore\n if($value->find('a', 0)) {\n return strtolower(trim($value->find('a', 0)->innertext));\n } else {\n return strtolower(trim($value->find('text', 2)->innertext));\n }\n }\n }\n }\n\n }", "title": "" }, { "docid": "e49db477832b5239df0656f40bb1aaf7", "score": "0.5106248", "text": "static function getUploadedMusic() {\n\t\treturn self::getWebResourcesFolder().system::getDirSeparator().self::FOLDER_MOMUSIC;\n\t}", "title": "" }, { "docid": "28ac7e4fc24136f62719780697b5879b", "score": "0.5102025", "text": "function header_playlist() { print \"#EXTM3U\\r\\n\"; }", "title": "" }, { "docid": "838986dc282f66b6191bc376bbe745d6", "score": "0.5086218", "text": "function mpdQueueInfo($sock) {\n\t$resp = execMpdCommand($sock, \"playlistinfo\");\n\treturn _parseFileListResponse($resp);\n}", "title": "" }, { "docid": "f833537b5259fe2eafec12b29423c073", "score": "0.50550896", "text": "function GetPlaylist() {\n\t\tif ( $this->debugging ) echo \"mpd->GetPlaylist()\\n\";\n\t\t$resp = $this->SendCommand(MPD_CMD_PLLIST);\n\t\t$playlist = $this->_parseFileListResponse($resp);\n\t\tif ( $this->debugging ) echo \"mpd->GetPlaylist() / return \".print_r($playlist).\"\\n\";\n\t\treturn $playlist;\n\t}", "title": "" }, { "docid": "6e3ca7f84b96bcbbe29e180613a2d000", "score": "0.50348467", "text": "function countMedia($id, $mediatype='', $pubFlag='', $processed='Y', $duration=0) {\n global $connection;\n \n switch ($mediatype) {\n case 'audio':\n $extrasql=\" AND m.media_type='audio-mp3' AND RIGHT(p.original_filename,4)='.wav'\";\n //echo \"<tr><td colspan='4'>\".$extrasql.\"</td>\";\n break;\n case 'video':\n $extrasql=\" AND m.media_type='iphone'\"; # could be any one of a number of options here, but iPhone is also used as 'root' media\n break;\n case 'transcript':\n $extrasql=\" AND m.media_type='transcript'\";\n break;\n case 'extra':\n $extrasql=\" AND m.media_type='extra'\";\n break;\n case 'epub':\n $extrasql=\" AND m.media_type='epub'\";\n break;\n case 'youtube':\n $extrasql=\" AND m.media_type='youtube'\";\n break;\n default:\n $extrasql=\"\";\n }\n \n if ($pubFlag=='Y' || $pubFlag=='N') {\n $extrasql.=\" AND p.published_flag='\".$pubFlag.\"'\";\n } else {\n // ignore publish flag state\n }\n \n if ($processed=='Y') {\n $extrasql.=\" AND m.processed_state=9\";\n } else {\n $extrasql.=\" AND m.processed_state<9\"; \n }\n \n if ($duration > 0) {\n $extrasql.=\" AND m.duration<\".$duration; \n }\n \n \n $sql=\"SELECT p.id FROM podcast_items p LEFT JOIN podcast_item_media m ON p.id=m.podcast_item\n WHERE p.podcast_id=\".$id.\" AND p.title!=''\".$extrasql;\n \n $result=@mysql_query($sql,$connection) or die(\"SQL error:<BR>\\n\".$sql.\"<BR>\\n\");\n $trackCount=mysql_num_rows($result);\n\n //if ($mediatype=='audio') {\n // echo \"<td colspan='9'>\".$sql.\"</td><td >\".$row['numTracks'].\"</td></tr>\";\n //} \n\n return($trackCount);\n}", "title": "" }, { "docid": "acf0dcfea38b39fd6b450771191433ff", "score": "0.503464", "text": "function get_playlist_media( $playlist = NULL ) {\n\t$playlist = get_post( $playlist );\n\t\n\tif( ! is_playlist( $playlist ) ) {\n\t\treturn false;\t\n\t}\n\t\n\tif( $playlist->media ) {\n\t\treturn $playlist->media;\t\n\t}\n\n\t$media = new WP_Query( array( 'media_in_playlist' => $playlist->ID ) );\n\treturn $media->posts;\t\n}", "title": "" }, { "docid": "c7ea93529f83e91b9f409f9fa14ce5d1", "score": "0.5025595", "text": "public function get_whosnext_type() {\n return $this->get_fm_field( 'whosnext_details', 'type' );\n }", "title": "" }, { "docid": "56b2673227f942e0ac2aed89bb0973b1", "score": "0.5004359", "text": "public function TV_getPlaylistM3U(){\r\n return file_get_contents('http://'.$this->_url.'/freeboxtv/playlist.m3u');\r\n }", "title": "" }, { "docid": "990899176956ad1c226545a46f002687", "score": "0.499426", "text": "function itemInformation($item) {\n if ($item->getType() == \"jzMediaNode\" || $item->getType() == \"jzMediaTrack\") {\n if ($item->isLeaf()) {\n\t\t$this->displayTrackInfo($item);\n } else { // node\n\t\tif (isNothing($item->getDescription())) {\n\t\t $this->displayNodeStats($item);\n\t\t} else {\n\t\t $this->displayReadMore($item);\n\t\t}\n }\n }\n }", "title": "" }, { "docid": "4cb51fa2176e5c066fddcd46110acf0a", "score": "0.4994131", "text": "abstract protected function getAlbumType():string;", "title": "" }, { "docid": "25fe35c9e3ff2994bc7f94fa79f818f1", "score": "0.4991216", "text": "public function getType()\n {\n // this basically extracts the mimetype and guess the filetype based\n // on the first part of the mimetype works for 99% of all cases, and\n // we don't need to make an SQL statement like EXT:media does currently\n if (!$this->properties['type']) {\n $mimeType = $this->getMimeType();\n list($fileType) = explode('/', $mimeType);\n switch (strtolower($fileType)) {\n case 'text':\n $this->properties['type'] = self::FILETYPE_TEXT;\n break;\n case 'image':\n $this->properties['type'] = self::FILETYPE_IMAGE;\n break;\n case 'audio':\n $this->properties['type'] = self::FILETYPE_AUDIO;\n break;\n case 'video':\n $this->properties['type'] = self::FILETYPE_VIDEO;\n break;\n case 'application':\n\n case 'software':\n $this->properties['type'] = self::FILETYPE_APPLICATION;\n break;\n default:\n $this->properties['type'] = self::FILETYPE_UNKNOWN;\n }\n }\n return (int)$this->properties['type'];\n }", "title": "" }, { "docid": "52feb87e2d789d5f4d9269fd3a794182", "score": "0.498453", "text": "function mpdListPlayList($sock, $plname) {\n\t$resp = execMpdCommand($sock, 'listplaylist \"' . $plname . '\"');\n\treturn _parseFileListResponse($resp);\n}", "title": "" }, { "docid": "ce88929bbf8208574e7ee9c83e71e87d", "score": "0.49786422", "text": "public function getType()\n {\n return 'audio';\n }", "title": "" }, { "docid": "940f61ebbe141c1c39ad4c4596997640", "score": "0.4977659", "text": "function getType() {\n\t\t\treturn \"jzMediaElement\";\n\t\t}", "title": "" }, { "docid": "7a11ca5130c4ef7f1460d1d19e724985", "score": "0.4976427", "text": "public function getDownloadTypeBySku($sku) {\n $tp = $this->getTrackPrefix();\n \tif (preg_match(\"/(.*)\" . $tp . \"[0-9]*$/\", $sku)) {\n return Que_Mytunes_Helper_Data::OPTION_MYTUNES_TYPE_TRACK;\n }\n else {\n return Que_Mytunes_Helper_Data::OPTION_MYTUNES_TYPE_ALBUM;\n }\n }", "title": "" }, { "docid": "39ec8c0267b5028270caf4d0808d9cb6", "score": "0.49467227", "text": "function canonicalName($item, $lastfm = FALSE, $radio_id){\n \n $item = get_corrected_name($item);\n\n // Moving featured artist from song name to interpret\n\n if( preg_match_all( '/\\((.*?)\\)/', $item['song'], $matches ) ) {\n foreach(split_words() as $sw){\n foreach ($matches[1] as $mkey => $match) {\n if(strpos($match, $sw) === 0) {\n $item['song'] = str_replace($matches[0][$mkey], '', $item['song']); \n if(strpos($item['interpret'], $match) !== FALSE) $item['interpret'] = $item['interpret'] . ' ' . $match;\n }\n }\n }\n } \n\n foreach(split_words() as $ssw){\n if (strpos($item['song'], $ssw) !== FALSE){\n\n // Split string in two by given position\n\n list($beg, $end) = preg_split('/(?<=.{'.strpos($item['song'], $ssw).'})/', $item['song'], 2);\n $item['song'] = str_replace($end, '', $item['song']); \n $item['interpret'] = $item['interpret'] . ' ' . $end;\n }\n }\n unset($ssw);\n \n $name = $item['song'];\n unset($item['song']);\n \n $sname = str_replace('�', '_', trim ($name));\n $sslug = sanitize_title($sname);\n $item['song'][$sslug]['slug'] = $sslug;\n $item['song'][$sslug]['name'] = $sname;\n \n $args = array(\n 'meta_key' => 'remote_id',\n 'meta_value' => $radio_id,\n 'post_type' => 'radio',\n 'post_status' => 'any',\n 'posts_per_page' => -1\n );\n \n //echo scrappy_renderList(get_posts($args));\n //echo '<hr>';\n //echo get_posts($args)[0]->ID;\n //exit;\n \n $item['song'][$sslug]['radio_id'] = get_posts($args)[0]->ID;\n unset($name);\n \n // Removing broken chars returned by parser\n \n $name = trim(str_replace(array('�'), array('_'), $item['interpret']));\n unset($item['interpret']);\n \n foreach (split_words() as $sssword) $split_words[] = ' '.$sssword;\n \n $name = str_replace(array('[ ', ' ]'), array('[', ']'), $name);\n $names = explode_by_array($split_words, str_replace(array(' & ', ' and ', ' And ', ' AND ', ',', ' , ', ' a ', ' A '), UNIDELIM, $name));\n if(!empty($names)){\n foreach ($names as $nkey => $aname){\n $item['interpret']['artists'][$nkey]['name'] = trim($aname);\n $item['interpret']['artists'][$nkey]['slug'] = sanitize_title($item['interpret']['artists'][$nkey]['name']);\n $sword_candidate = strtolower(trim(get_string_between($name, $names[($nkey - 1)], $aname)));\n if (strpos($sword_candidate, 'feat') !== FALSE) $sword_candidate = 'ft.';\n if (strpos($sword_candidate, 'vs') !== FALSE) $sword_candidate = 'vs.';\n if ((strpos($sword_candidate, 'and') !== FALSE) || $sword_candidate == 'a' || $sword_candidate == '+') $sword_candidate = ',';\n $item['interpret']['artists'][$nkey]['sword'] = $sword_candidate;\n if(!$item['interpret']['artists'][$nkey]['sword']) unset($item['interpret']['artists'][$nkey]['sword']);\n \n // Now we are asking last fm for artist data\n \n if($item['interpret']['artists'][$nkey]['last_fm']['name']) $item['interpret']['artists'][$nkey]['name'] = $item['interpret']['artists'][$nkey]['last_fm']['name'];\n }\n // Removing duplicates\n $item['interpret']['artists'] = array_unique($item['interpret']['artists'], SORT_REGULAR);\n \n }\n \n // Removes empty spaces from begining and end of artist name, further grooming may be required here\n $name = trim ($name);\n $item['interpret']['original_interpret_name'] = $name;\n $slug = sanitize_title($name);\n \n $item['song'][$sslug]['slug'] = $slug . '-' .$item['song'][$sslug]['slug'];\n $item['song'][$slug . '-' .$sslug] = $item['song'][$sslug];\n unset($item['song'][$sslug]);\n\n foreach ($item['interpret']['artists'] as $artist){\n $groomed_name .= ' ' . $artist['sword'] . ' ' . $artist['name'];\n }\n $groomed_name = str_replace(' , ', ', ', trim($groomed_name));\n $groomed_name = str_replace('. . ', '. ', trim($groomed_name));\n \n if (!in_array($groomed_name, array_column($item['interpret']['artists'], 'name'))){\n $item['interpret']['artists']['groomed']['name'] = $groomed_name;\n $item['interpret']['artists']['groomed']['slug'] = sanitize_title($groomed_name);\n }\n $item['interpret']['groomed_name'] = $groomed_name;\n //$item['song']['groomed_slug'] = sanitize_title($groomed_name)\n //$item['song']['groomed']['last_fm'] = get_last_fm_data($groomed_name, 'track.search', 1 , 1, array('track'=>$item['song']['name']));\n if(empty($item['interpret']['artists']['groomed'])) unset($item['interpret']['artists']['groomed']); \n \n return $item;\n}", "title": "" }, { "docid": "08e2c49d21ac7222a98367fac76f5b5c", "score": "0.49462372", "text": "static function getPlaylistPath($plsId, $type, $level)\n {\n $plsName = self::$_config[$type . PlsPrefix] . $plsId . '.m3u';\n $plsPath = self::$_config[downloadPath] . DIR_S . self::$_config[plsDir_L . $level] . DIR_S . $plsName;\n $plsPath = str_replace(DIR_S . DIR_S, DIR_S, $plsPath); // Fix double slash\n return $plsPath;\n }", "title": "" }, { "docid": "08bc0c1b2aaf01c45de3ef6c24f6bbc6", "score": "0.49432465", "text": "protected function getType() {\n\t\tswitch ($this->item['type']) {\n\t\t\tcase 'flat':\n\t\t\tcase 'duplex':\n\t\t\tcase 'apartment':\n\t\t\t\treturn '1';\n\t\t\tcase 'villa':\n\t\t\tcase 'penthouse':\n\t\t\tcase 'house':\n\t\t\tcase 'terraced_house':\n\t\t\tcase 'chalet':\n\t\t\tcase 'farmhouse':\n\t\t\tcase 'bungalow':\n\t\t\t\treturn '2';\n\t\t\tcase 'plot':\n\t\t\t\treturn '5';\n\t\t\tcase 'office':\n\t\t\t\treturn '6';\n\t\t\tdefault:\n\t\t\t\treturn '1';\n\t\t}\n\t}", "title": "" }, { "docid": "8a56703be1547289719db1fe455e878f", "score": "0.4920337", "text": "function is_playlist_archive() {\n\treturn is_post_type_archive( 'playlist' ); \n}", "title": "" }, { "docid": "7876e3d86397dcedb26b3b810deee9f7", "score": "0.49199402", "text": "function getMediaDuration($id, $mediatype='', $pubFlag='Y', $durationFilter=0) {\n // Can also be filtered to exclude files of min. duration, eg only include files over 5 minutes duration. (added to help\n // calculate cost of Closed Captions)\n\n global $connection;\n \n switch ($mediatype) {\n case 'audio':\n $extrasql=\" AND m.media_type='audio-mp3' AND RIGHT(p.original_filename,4)='.wav'\";\n //echo \"<tr><td colspan='4'>\".$extrasql.\"</td>\";\n break;\n case 'video':\n $extrasql=\" AND m.media_type='iphone'\"; # could be any one of a number of options here\n break;\n case 'transcript':\n $extrasql=\" AND m.media_type='transcript'\";\n break;\n default:\n $extrasql=\"\";\n }\n \n if ($durationFilter > 0) {\n $extrasql.=\" AND p.duration>\".$durationFilter;\n }\n \n $sql=\"SELECT SUM(p.duration) FROM podcast_items p LEFT JOIN podcast_item_media m ON p.id=m.podcast_item\n WHERE p.podcast_id=\".$id.\" AND p.published_flag='\".$pubFlag.\"' AND m.processed_state=9 AND p.title!=''\".$extrasql;\n \n $result=@mysql_query($sql,$connection) or die(\"SQL error:<BR>\\n\".$sql.\"<BR>\\n\");\n $row=mysql_fetch_array($result);\n $mediaDuration=$row['SUM(p.duration)'];\n\n //if ($mediatype=='audio') {\n // echo \"<td colspan='9'>\".$sql.\"</td><td >\".$row['numTracks'].\"</td></tr>\";\n //} \n\n return($mediaDuration);\n}", "title": "" }, { "docid": "81f21102bb39a70216540eaedf1c2477", "score": "0.49000955", "text": "function my_type()\n {\n return \"ITEM\";\n }", "title": "" }, { "docid": "5c857dc0cdf7b0b85a3a598596fea215", "score": "0.4897252", "text": "static public function MPEG() {\r\n return 'audio/mpeg';\r\n }", "title": "" }, { "docid": "358bfa0493546a4a744a4c90220eeb09", "score": "0.48925358", "text": "function is_music_file($s) {\n\t$e = pathinfo($s, PATHINFO_EXTENSION);\n\t$x = array('ogg', 'aac', 'mp3', 'wma');\n\tif (array_search($e, $x) !== false) return true;\n\treturn false;\n}", "title": "" }, { "docid": "2c5d36e7cc9306ff8e939fc48578db95", "score": "0.48732948", "text": "function getPType($ptype = '') {\n if ($ptype !== '') {\n switch($ptype) {\n case 'p':\n return 'Mainpiece';\n break;\n case 'a':\n return 'Afterpiece';\n break;\n case 'm':\n return 'Music';\n break;\n case 'd':\n return 'Dance';\n break;\n case 'e':\n return 'Entertainment';\n break;\n case 's':\n return 'Song';\n break;\n case 'b':\n return 'Ballet';\n break;\n case 'i':\n return 'Instrumental';\n break;\n case 'o':\n return 'Opera';\n break;\n case 'u':\n return 'Monologue';\n break;\n case 't':\n return 'Trick';\n break;\n }\n }\n return 'Performance';\n }", "title": "" }, { "docid": "6a129b51f4c88189c3ea35338af4727a", "score": "0.4866642", "text": "protected function getMediaType(){\n preg_match('/^youtube/',$this->_ci->router->method, $match);\n if(!empty($match[0])){\n $mtype = 'youtube';\n }else{\n preg_match('/^auth/',$this->_ci->router->class, $match);\n if(!empty($match[0])){\n preg_match('/^(google_auth|google_login)/',$this->_ci->router->method, $match);\n if(!empty($match[0])) {\n $mtype = 'google_login';\n } else {\n $mtype = 'google_auth';\n }\n } else {\n $mtype = 'google';\n }\n }\n return $mtype;\n }", "title": "" }, { "docid": "f093ee02deaa148bd2eef40f82d16643", "score": "0.48604506", "text": "abstract public function get_question_type_int();", "title": "" }, { "docid": "3cfaba69d0f365c9048163c470638d17", "score": "0.4855061", "text": "function get_playlist_media_ids( $playlist = NULL ) {\n\tif( ! is_playlist( $playlist ) ) {\n\t\treturn false;\t\n\t}\n\t$media = get_playlist_media( $playlist, $args );\n\treturn wp_list_pluck( $media, 'ID' );\t\n}", "title": "" }, { "docid": "e0a953653fa749972e5d91f97ab5131b", "score": "0.48507702", "text": "function get_mime_type() {\r\n\t\r\n\t\t$mime_types = array(\r\n\t\t \"ai\"=>\"application/postscript\",\r\n\t\t \"aif\"=>\"audio/x-aiff\",\r\n\t\t \"aifc\"=>\"audio/x-aiff\",\r\n\t\t \"aiff\"=>\"audio/x-aiff\",\r\n\t\t \"asc\"=>\"text/plain\",\r\n\t\t \"asf\"=>\"video/x-ms-asf\",\r\n\t\t \"asx\"=>\"video/x-ms-asf\",\r\n\t\t \"atom\"=>\"application/atom+xml\",\r\n\t\t \"au\"=>\"audio/basic\",\r\n\t\t \"avi\"=>\"video/x-msvideo\",\r\n\t\t \"bcpio\"=>\"application/x-bcpio\",\r\n\t\t \"bin\"=>\"application/octet-stream\",\r\n\t\t \"bz2\"=>\"application/x-bzip2\",\r\n\t\t \"c\"=>\"text/plain\",\r\n\t\t \"cc\"=>\"text/plain\",\r\n\t\t \"ccad\"=>\"application/clariscad\",\r\n\t\t \"cdf\"=>\"application/x-netcdf\",\r\n\t\t \"class\"=>\"application/octet-stream\",\r\n\t\t \"cpio\"=>\"application/x-cpio\",\r\n\t\t \"cpt\"=>\"application/mac-compactpro\",\r\n\t\t \"csh\"=>\"application/x-csh\",\r\n\t\t \"css\"=>\"text/css\",\r\n\t\t \"dcr\"=>\"application/x-director\",\r\n\t\t \"dir\"=>\"application/x-director\",\r\n\t\t \"dms\"=>\"application/octet-stream\",\r\n\t\t \"doc\"=>\"application/msword\",\r\n\t\t \"dot\"=>\"application/msword\",\r\n\t\t \"drw\"=>\"application/drafting\",\r\n\t\t \"dvi\"=>\"application/x-dvi\",\r\n\t\t \"dwf\"=>\"application/x-dwf\",\r\n\t\t \"dwg\"=>\"application/acad\",\r\n\t\t \"dxf\"=>\"application/dxf\",\r\n\t\t \"dxr\"=>\"application/x-director\",\r\n\t\t \"eps\"=>\"application/postscript\",\r\n\t\t \"etx\"=>\"text/x-setext\",\r\n\t\t \"exe\"=>\"application/octet-stream\",\r\n\t\t \"ez\"=>\"application/andrew-inset\",\r\n\t\t \"f\"=>\"text/plain\",\r\n\t\t \"f90\"=>\"text/plain\",\r\n\t\t \"fli\"=>\"video/x-fli\",\r\n\t\t \"gif\"=>\"image/gif\",\r\n\t\t \"gtar\"=>\"application/x-gtar\",\r\n\t\t \"gz\"=>\"application/x-gzip\",\r\n\t\t \"h\"=>\"text/plain\",\r\n\t\t \"hdf\"=>\"application/x-hdf\",\r\n\t\t \"hh\"=>\"text/plain\",\r\n\t\t \"hqx\"=>\"application/mac-binhex40\",\r\n\t\t \"htm\"=>\"text/html\",\r\n\t\t \"html\"=>\"text/html\",\r\n\t\t \"ica\"=>\"application/x-ica\",\r\n\t\t \"ice\"=>\"x-conference/x-cooltalk\",\r\n\t\t \"ico\"=>\"image/x-icon\",\r\n\t\t \"ief\"=>\"image/ief\",\r\n\t\t \"iges\"=>\"model/iges\",\r\n\t\t \"igs\"=>\"model/iges\",\r\n\t\t \"ips\"=>\"application/x-ipscript\",\r\n\t\t \"ipx\"=>\"application/x-ipix\",\r\n\t\t \"jnlp\"=>\"application/x-java-jnlp-file\",\r\n\t\t \"jpe\"=>\"image/jpeg\",\r\n\t\t \"jpeg\"=>\"image/jpeg\",\r\n\t\t \"jpg\"=>\"image/jpeg\",\r\n\t\t \"js\"=>\"application/x-javascript\",\r\n\t\t \"kar\"=>\"audio/midi\",\r\n\t\t \"latex\"=>\"application/x-latex\",\r\n\t\t \"lha\"=>\"application/octet-stream\",\r\n\t\t \"lsp\"=>\"application/x-lisp\",\r\n\t\t \"lzh\"=>\"application/octet-stream\",\r\n\t\t \"m\"=>\"text/plain\",\r\n\t\t \"m3u\"=>\"audio/playlist\",\r\n\t\t \"man\"=>\"application/x-troff-man\",\r\n\t\t \"mda\"=>\"application/vnd.ms-access\",\r\n\t\t\t\"mdb\"=>\"application/vnd.ms-access\",\r\n\t\t\t\"mde\"=>\"application/vnd.ms-access\",\r\n\t\t \"me\"=>\"application/x-troff-me\",\r\n\t\t \"mesh\"=>\"model/mesh\",\r\n\t\t \"mid\"=>\"audio/midi\",\r\n\t\t \"midi\"=>\"audio/midi\",\r\n\t\t \"mif\"=>\"application/vnd.mif\",\r\n\t\t \"mime\"=>\"www/mime\",\r\n\t\t \"mov\"=>\"video/quicktime\",\r\n\t\t \"movie\"=>\"video/x-sgi-movie\",\r\n\t\t \"mp2\"=>\"audio/mpeg\",\r\n\t\t \"mp3\"=>\"audio/mpeg\",\r\n\t\t \"mpa\"=>\"audio/mpeg\",\r\n\t\t \"mpc\"=>\"application/launcher\",\r\n\t\t \"mpe\"=>\"video/mpeg\",\r\n\t\t \"mpeg\"=>\"video/mpeg\",\r\n\t\t \"mpg\"=>\"video/mpeg\",\r\n\t\t \"mpga\"=>\"audio/mpeg\",\r\n\t\t \"mpp\"=>\"application/vnd.ms-project\",\r\n\t\t \"mpt\"=>\"application/launcher\",\r\n\t\t \"mpv\"=>\"application/launcher\",\r\n\t\t \"mpw\"=>\"application/launcher\",\r\n\t\t \"mpx\"=>\"application/launcher\",\r\n\t\t \"ms\"=>\"application/x-troff-ms\",\r\n\t\t \"msh\"=>\"model/mesh\",\r\n\t\t \"nc\"=>\"application/x-netcdf\",\r\n\t\t \"oda\"=>\"application/oda\",\r\n\t\t \"pbm\"=>\"image/x-portable-bitmap\",\r\n\t\t \"pdb\"=>\"chemical/x-pdb\",\r\n\t\t \"pdf\"=>\"application/pdf\",\r\n\t\t \"pfr\"=>\"application/font-tdpfr\",\r\n\t\t \"pgm\"=>\"image/x-portable-graymap\",\r\n\t\t \"pgn\"=>\"application/x-chess-pgn\",\r\n\t\t \"pls\"=>\"audio/x-scpls\",\r\n\t\t\t \"pm\"=>\"application/pagemaker\",\r\n\t\t\t\"pm5\"=>\"application/pagemaker\",\r\n\t\t \"png\"=>\"image/png\",\r\n\t\t \"pnm\"=>\"image/x-portable-anymap\",\r\n\t\t \"pot\"=>\"application/mspowerpoint\",\r\n\t\t \"ppm\"=>\"image/x-portable-pixmap\",\r\n\t\t \"pps\"=>\"application/mspowerpoint\",\r\n\t\t \"ppt\"=>\"application/mspowerpoint\",\r\n\t\t \"ppz\"=>\"application/mspowerpoint\",\r\n\t\t \"pre\"=>\"application/x-freelance\",\r\n\t\t \"prt\"=>\"application/pro_eng\",\r\n\t\t \"ps\"=>\"application/postscript\",\r\n\t\t \"pt5\"=>\"application/pagemaker\",\r\n\t\t \"qt\"=>\"video/quicktime\",\r\n\t\t \"qtl\"=>\"application/x-quicktimeplayer\",\r\n\t\t \"ra\"=>\"audio/x-realaudio\",\r\n\t\t \"ram\"=>\"audio/x-pn-realaudio\",\r\n\t\t \"ras\"=>\"image/cmu-raster\",\r\n\t\t \"rdf\"=>\"application/rdf+xml\",\r\n\t\t \"rgb\"=>\"image/x-rgb\",\r\n\t\t \"rm\"=>\"audio/x-pn-realaudio\",\r\n\t\t \"roff\"=>\"application/x-troff\",\r\n\t\t \"rpm\"=>\"audio/x-pn-realaudio-plugin\",\r\n\t\t \"rss\"=>\"application/rss+xml\",\r\n\t\t \"rtf\"=>\"text/rtf\",\r\n\t\t \"rtx\"=>\"text/richtext\",\r\n\t\t \"sav\"=>\"application/x-spss\",\r\n\t\t \"sbs\"=>\"application/x-spss\",\r\n\t\t \"scm\"=>\"application/x-lotusscreencam\",\r\n\t\t \"sea\"=>\"application/stuffit-lite\",\r\n\t\t \"set\"=>\"application/set\",\r\n\t\t \"sgm\"=>\"text/sgml\",\r\n\t\t \"sgml\"=>\"text/sgml\",\r\n\t\t \"sh\"=>\"application/x-sh\",\r\n\t\t \"shar\"=>\"application/x-shar\",\r\n\t\t \"silo\"=>\"model/mesh\",\r\n\t\t \"sit\"=>\"application/x-stuffit\",\r\n\t\t \"skd\"=>\"application/x-koan\",\r\n\t\t \"skm\"=>\"application/x-koan\",\r\n\t\t \"skp\"=>\"application/x-koan\",\r\n\t\t \"skt\"=>\"application/x-koan\",\r\n\t\t \"smi\"=>\"application/smil\",\r\n\t\t \"smil\"=>\"application/smil\",\r\n\t\t \"snd\"=>\"audio/basic\",\r\n\t\t \"sol\"=>\"application/solids\",\r\n\t\t \"spl\"=>\"application/x-futuresplash\",\r\n\t\t \"spo\"=>\"application/x-spss\",\r\n\t\t \"spp\"=>\"application/x-spss\",\r\n\t\t \"sps\"=>\"application/x-spss\",\r\n\t\t \"src\"=>\"application/x-wais-source\",\r\n\t\t \"step\"=>\"application/STEP\",\r\n\t\t \"stl\"=>\"application/SLA\",\r\n\t\t \"stp\"=>\"application/STEP\",\r\n\t\t\"sv4cpio\"=>\"application/x-sv4cpio\",\r\n\t\t \"sv4crc\"=>\"application/x-sv4crc\",\r\n\t\t \t\"svg\"=>\"application/svg+xml\",\r\n\t\t \"swf\"=>\"application/x-shockwave-flash\",\r\n\t\t \"t\"=>\"application/x-troff\",\r\n\t\t \"tar\"=>\"application/x-tar\",\r\n\t\t \"tbk\"=>\"application/toolbook\",\r\n\t\t \"tcl\"=>\"application/x-tcl\",\r\n\t\t \"tex\"=>\"application/x-tex\",\r\n\t\t \"texi\"=>\"application/x-texinfo\",\r\n\t\t \"texinf\"=>\"application/x-texinfo\",\r\n\t\t\"texinfo\"=>\"application/x-texinfo\",\t\t \r\n\t\t \"tgz\"=>\"application/x-gzip\",\r\n\t\t \"tif\"=>\"image/tiff\",\r\n\t\t \"tiff\"=>\"image/tiff\",\r\n\t\t \"tr\"=>\"application/x-troff\",\r\n\t\t \"tsi\"=>\"audio/TSP-audio\",\r\n\t\t \"tsp\"=>\"application/dsptype\",\r\n\t\t \"tsv\"=>\"text/tab-separated-values\",\r\n\t\t \"txt\"=>\"text/plain\",\r\n\t\t \"unv\"=>\"application/i-deas\",\r\n\t\t \"ustar\"=>\"application/x-ustar\",\r\n\t\t \"vcd\"=>\"application/x-cdlink\",\r\n\t\t \"vda\"=>\"application/vda\",\r\n\t\t \"viv\"=>\"video/vnd.vivo\",\r\n\t\t \"vivo\"=>\"video/vnd.vivo\",\r\n\t\t \"vrml\"=>\"model/vrml\",\r\n\t\t \"wav\"=>\"audio/x-wav\",\r\n\t\t \"wks\"=>\"application/lotus-123\",\r\n\t\t \"wp\"=>\"application/wordperfect\",\r\n\t\t \"wp5\"=>\"application/wordperfect5.1\",\r\n\t\t \"wp6\"=>\"application/wordperfect6.1\",\t\t \r\n\t\t \"wpd\"=>\"application/wordperfect\",\r\n\t\t \"wrl\"=>\"model/vrml\",\r\n\t\t \"xbm\"=>\"image/x-xbitmap\",\r\n\t\t \"xht\"=>\"application/xhtml+xml\",\r\n\t\t \"xhtml\"=>\"application/xhtml+xml\",\r\n\t\t \"xla\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xlb\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xlc\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xll\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xlm\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xls\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xlt\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xlw\"=>\"application/vnd.ms-excel\",\r\n\t\t \"xml\"=>\"application/xml\", // could also be \"text/xml\"\r\n\t\t \"xsl\"=>\"application/xml\",\r\n\t\t \"xslt\"=>\"application/xslt+xml\", \r\n\t\t \"xpm\"=>\"image/x-xpixmap\",\r\n\t\t \"xwd\"=>\"image/x-xwindowdump\",\r\n\t\t \"xyz\"=>\"chemical/x-pdb\",\r\n\t\t \"zip\"=>\"application/zip\");\r\n\t\t \r\n\t\t$extension = $this->get_extension();\r\n\t\t \r\n\t\tif ($extension && isset($mime_types[$extension])) {\r\n\t\t\treturn $mime_types[$extension];\r\n\t\t} else {\r\n\t\t\treturn \"application/octet-stream\";\r\n\t\t}\r\n\t\t \r\n\t}", "title": "" }, { "docid": "7f83370283deb9efa6d687741f54c826", "score": "0.48401454", "text": "function get_mime_type(&$structure) \r\n{ \r\n$primary_mime_type = array(\"TEXT\", \"MULTIPART\", \"MESSAGE\", \"APPLICATION\", \"AUDIO\", \"IMAGE\", \"VIDEO\", \"OTHER\"); \r\nif($structure->subtype) \r\n{ \r\nreturn $primary_mime_type[(int) $structure->type] . '/' . $structure->subtype; \r\n} \r\nreturn \"TEXT/PLAIN\"; \r\n}", "title": "" }, { "docid": "361a55e00591f2e7a939e7d090b279b5", "score": "0.48400992", "text": "function is_video_playlist_archive() {\n\treturn is_playlist_archive() && is_tax( 'playlist_type', 'video');\n}", "title": "" }, { "docid": "e2fdc7c236926d91bee74506701e6fe3", "score": "0.48395643", "text": "private function setMeta()\n {\n $metaObj = self::getXml(Meta::METAURL);\n $this->onAir = \\FALSE;\n for ($x=0; $x < count((array)$metaObj); $x++) {\n if ((string)$metaObj->mountpoint[$x]['id'] === '/radio') {\n $this->onAir = \\TRUE;\n $this->nowPlaying = $metaObj->mountpoint[$x]->playing;\n $this->dj = $metaObj->mountpoint[$x]->name;\n $this->currentListeners = $metaObj->mountpoint[$x]->listeners;\n $this->peakListeners = $metaObj->mountpoint[$x]->peaklisteners;\n $this->description = $metaObj->mountpoint[$x]->description;\n $this->genre = $metaObj->mountpoint[$x]->genre;\n }\n }\n }", "title": "" }, { "docid": "bd58c64b3af7205e337a5385b6ac59d1", "score": "0.4834716", "text": "public static function playlist_songs($input) {\n\n $playlist = new Playlist($input['filter']);\n $items = $playlist->get_items();\n\n foreach ($items as $object) {\n if ($object['object_type'] == 'song') {\n $songs[] = $object['object_id'];\n }\n } // end foreach\n\n XML_Data::set_offset($input['offset']);\n XML_Data::set_limit($input['limit']);\n ob_end_clean();\n echo XML_Data::songs($songs);\n\n }", "title": "" }, { "docid": "b5169967ba2e993723b14a86ad2aca23", "score": "0.48308027", "text": "public function getPlaylist()\n {\n \treturn $this->_playList;\n }", "title": "" }, { "docid": "41e8a23476149862e2b721dd90df7995", "score": "0.4813252", "text": "public static function playlist($input) {\n\n $uid = scrub_in($input['filter']);\n\n ob_end_clean();\n echo XML_Data::playlists(array($uid));\n\n }", "title": "" }, { "docid": "49b7c208334813d55f7dd251f0cb1d9f", "score": "0.4809454", "text": "function xhelpGetMBoxType($type)\r\n{\r\n $mboxTypes = array(\r\n _XHELP_MAILBOXTYPE_POP3 => 'POP3',\r\n _XHELP_MAILBOXTYPE_IMAP => 'IMAP');\r\n\r\n return (isset($mboxTypes[$type]) ? $mboxTypes[$type] : 'NA');\r\n}", "title": "" }, { "docid": "8ccb875d234d09b4addb04d2e1994f22", "score": "0.4799376", "text": "function PlayId($id) {\n\t\tif ( $this->debugging ) echo \"mpd->PlayId()\\n\";\n\t\tif ( ! is_numeric($id) ) {\n\t\t\t$this->errStr = \"PlayId() : argument 1 must be a numeric value\";\n\t\t\treturn NULL;\n\t\t}\n\t\tif ( ! is_null($pld = $this->SendCommand(MPD_CMD_PLAYID,$id))) $this->RefreshInfo();\n\t\tif ( $this->debugging ) echo \"mpd->PlayId() / return\\n\";\n\t\treturn $pld;\n\t}", "title": "" }, { "docid": "1c4e9c66278fccde30e7ce22e4273ea8", "score": "0.4792953", "text": "function displayPlaylists(){\n\t\t//grad the user's playlists\n\t\t$playlists = $this->tracklist['playlists'];\n\t\t//if size is zero display empty\n\t\tif(sizeof($playlists) == 0)\n\t\t\techo \"<p><font color=\\\"white\\\"><b>You have no tracks to display</b></font><br>\";\n\t\t//iterate radio button in html format\n\t\tforeach ($playlists as $key => $playlist) {\n\t\t\techo \t\"<div class=\\\"containerPlaylist\\\">\".\n\t\t\t\t \t\t\"<div class=playlist>\".\n\t\t\t\t \t\t\t\"<input type='radio' name=\\\"playlist\\\" value=\\\"$key\\\">$key\".\n\t\t\t\t \t\t\"</div>\".\n\t\t\t\t \t\"</div>\";\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "e237e75163ab44c027b887313c98a1c0", "score": "0.47833812", "text": "abstract protected function _getItemTypeMetadata();", "title": "" }, { "docid": "2b3f689fbe01d5dc735174d80e2ae116", "score": "0.47794202", "text": "public function getMusicReleaseFormat() {\n\t\treturn $this->musicReleaseFormat;\n\t}", "title": "" }, { "docid": "901681fa4901ba26afdefed2c2a83787", "score": "0.47599667", "text": "function updateMusicStatus()\n{\n\t$qry = 'SELECT music.id as ID, IFNULL(upMusic.id, 0) as upID, IFNULL(prevMusic.id, 0) as prevID, \n\t\t\tmusic.track as item, music.track_preview as itemPreview, upMusic.type as type\n\t\t\tFROM music \n\t\t\tINNER JOIN ftp_queue upMusic ON upMusic.type_id=music.id AND upMusic.type_to_name = music.track AND upMusic.status = 3\n\t\t\tLEFT JOIN ftp_queue prevMusic ON prevMusic.type_id=music.id AND prevMusic.type_to_name = music.track_preview \n\t\t\t\tAND prevMusic.status = 3\n\t\t\tWHERE music.status=4';\n\t$result = getResultSet($qry);\n\tprocessStatus($result);\n\t\n}", "title": "" }, { "docid": "1b995c526d819645063a546657124f64", "score": "0.4758391", "text": "function fetchAudioTestPlayer($runtime, $playlist,$protocol=\"\", $width=\"400\",$height=\"150\",$filearea=\"content\",$usepoodlldata=true){\nglobal $CFG, $USER, $COURSE;\n\n$moduleid = optional_param('id', 0, PARAM_INT); // The ID of the current module (eg moodleurl/view.php?id=X )\n\n//Set our servername .\n$flvserver = $CFG->poodll_media_server;\n\n////if usepoodlldata, then set that to filearea\nif($usepoodlldata){$filearea=\"poodlldata\";}\n\n\n//determine which of, automated or manual playlists to use\nif(strlen($playlist) > 4 && substr($playlist,-4)==\".xml\"){\n\t//get a manually made playlist\n\t$fetchdataurl = $CFG->wwwroot . \"/\" . $CFG->filter_poodll_datadir . \"/\" . $playlist ;\n}else{\n\t//get the url to the automated medialist maker\n\t$fetchdataurl= $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=poodllaudiolist'\n\t\t. '&courseid=' . $COURSE->id\n\t\t. '&moduleid=' . $moduleid\n\t\t. '&paramone=' . $playlist \n\t\t. '&paramtwo=' . $protocol \n\t\t. '&paramthree=' . $filearea\n\t\t. '&cachekiller=' . rand(10000,999999);\n}\n\n\t\n\t\t$params = array();\n\t\t$params['red5url'] = urlencode($flvserver);\n\t\t$params['playertype'] = $protocol;\n\t\t$params['playlist']=urlencode($fetchdataurl);\n\t\n \t$returnString= fetchSWFWidgetCode('poodllaudiotestplayer.lzx.swf9.swf',\n \t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n \t\t\t\t\t\t\n \treturn $returnString;\n\n}", "title": "" }, { "docid": "e9dafc11a03c208d07abe49c1c3267d7", "score": "0.47556296", "text": "public function getMatchMode($item)\n {\n $matchmode = \"auto\";\n if ($this->getParam('APIGRP:nolink', 0)) {\n $matchmode = \"none\";\n } else {\n if ($this->getParam(\"APIGRP:groupedbeforegrp\") == 1) {\n $matchmode = \"cursimples\";\n }\n if (isset($item[\"grouped_skus\"]) && trim($item[\"grouped_skus\"]) != \"\") {\n $matchmode = \"fixed\";\n }\n }\n return $matchmode;\n }", "title": "" }, { "docid": "bca400e5155a897add6c950316f04459", "score": "0.4754988", "text": "public function getMediaType()\n\t{\n\t\treturn self::$media_type[$this->media_type];\n\t}", "title": "" }, { "docid": "fc53c566e880662e40c2fd76655558ff", "score": "0.4744287", "text": "abstract public function get_question_type_string();", "title": "" }, { "docid": "b5158c4e3938f4ff52a535fde6ca578e", "score": "0.47392976", "text": "function msg_type_subtype($_type){\n\n\t\tif($_type > 0){\n\t\t\tswitch($_type){\n\t\t\t\tcase '0': $type = \"text\"; break;\n\t\t\t\tcase '1': $type = \"multipart\"; break;\n\t\t\t\tcase '2': $type = \"message\"; break;\n\t\t\t\tcase '3': $type = \"application\"; break;\n\t\t\t\tcase '4': $type = \"audio\"; break;\n\t\t\t\tcase '5': $type = \"image\"; break;\n\t\t\t\tcase '6': $type = \"video\"; break;\n\t\t\t\tcase '7': $type = \"other\"; break;\n\t\t\t}\n\t\t}\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "256d25d99e2765100eb376a015fcc414", "score": "0.4738695", "text": "function XSPFplaylist($tracks,$dir,$url,$getID3,$ID3version,$use_images){\n\t\t$i = 0;\n\t\t//Generate playlist header\n\t\t$output .= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<playlist version=\\\"0\\\" xmlns = \\\"http://xspf.org/ns/0/\\\">\\n\";\n\t\t$output .= \"<trackList>\\n\";\n\t\t//Generate playlist items\n\t\tfor($j = 0; $j < count($tracks); $j++){\n\t\t\t$filename = \"$dir\" . \"$tracks[$j]\";\n\t\t\t$tempname = substr($filename, strrpos($filename, '/')+1);\n\t\t\tif ($use_images) {\n\t\t\t\tforeach (glob(dirname($filename).\"/\".substr($tempname, 0, strpos($tempname, '.mp3')).\".*\") as $tempfile) {\n\t\t\t\t\tif (strpos($tempfile, '.jpg') || strpos($tempfile, '.bmp') || strpos($tempfile, '.gif') || strpos($tempfile, '.png')) {\n\t\t\t\t\t\t$audioimage[$j] = str_replace($dir,$url,$tempfile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($getID3){\n\t\t\t\t$fileinfo = $getID3->analyze($filename);\n\t\t\t\tif (!$fileinfo['tags']['id3v'.$ID3version]['title']['0']){\n\t\t\t\t\t$filetitle = substr($tempname, 0, strpos($tempname, '.mp3'));\n\t\t\t\t} else {\n\t\t\t\t\t$filetitle = $fileinfo['tags']['id3v'.$ID3version]['title']['0'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= \"<track><location>\" . $url . $tracks[$j] . \"</location>\";\n\t\t\tif ($getID3){\n\t\t\t\t$output .= \"<creator>\" . $fileinfo['tags']['id3v'.$ID3version]['artist']['0'] . \"</creator><title>\" . $filetitle . \"</title>\";\n\t\t\t\tif ($audioimage[$j]){\n\t\t\t\t\t$output .= \"<image>\" . $audioimage[$j] . \"</image>\";\n\t\t\t\t}\n\t\t\t\t$output .= \"</track>\\n\";\n\t\t\t} else {\n\t\t\t\tif (!strrpos(dirname($filename), '/')){\t\t\n\t\t\t\t\t$tempcreator = substr(dirname($filename), 0);\n\t\t\t\t} else {\n\t\t\t\t\t$tempcreator = substr(dirname($filename), strrpos(dirname($filename), '/')+1);\n\t\t\t\t}\n\t\t\t\t$output.= \"<creator>\" . $tempcreator . \"</creator><title>\" . substr($tempname, 0, strpos($tempname, '.mp3')) . \"</title>\";\n\t\t\t\tif ($audioimage[$j]){\n\t\t\t\t\t$output .= \"<image>\" . $audioimage[$j] . \"</image>\";\n\t\t\t\t}\n\t\t\t\t$output .= \"</track>\\n\";\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "a6c5043989a7f262ff573b3e3c7ad1ed", "score": "0.4736619", "text": "function is_mobile_dp(){\n\tif (is_admin())return;\n\n\tglobal $IS_MOBILE_DP;\n\t\n\t$arr_useragent = array(\n\t\t'iPhone', \t\t\t// iPhone\n\t\t'iPod', \t\t\t// iPod touch\n\t\t'Windows Phone',\t// Windows Phone\n\t\t'dream', \t\t\t// Pre 1.5 Android\n\t\t'CUPCAKE', \t\t\t// 1.5+ Android\n\t\t'blackberry9500', \t// Storm\n\t\t'blackberry9530', \t// Storm\n\t\t'blackberry9520', \t// Storm v2\n\t\t'blackberry9550', \t// Storm v2\n\t\t'blackberry9800', \t// Torch\n\t\t'webOS', \t\t\t// Palm Pre Experimental\n\t\t'incognito', \t\t// Other iPhone browser\n\t\t'webmate' \t\t\t// Other iPhone browser\n\t);\n\t$pattern = '/'.implode('|', $arr_useragent).'/i';\n\t$result = preg_match($pattern, $_SERVER['HTTP_USER_AGENT']);\n\n\t// Check Android device\n\tif (!$result) {\n\t\t// For Android mobile\n\t\t$arr_useragent = array('Android', 'Mobile');\n\t\t$pattern = '/^.*(?=.*'.implode(')(?=.*', $arr_useragent).').*$/i';\n\t\t$result = preg_match($pattern, $_SERVER['HTTP_USER_AGENT']);\n\t}\n\t$IS_MOBILE_DP = $result;\n\treturn $IS_MOBILE_DP;\n}", "title": "" }, { "docid": "c0c7be3b494e53578a77436edd0062e9", "score": "0.47321534", "text": "function currentPlaylist(){\n\t\treturn $this->tracklist['currentPlaylist'];\n\t}", "title": "" }, { "docid": "a49cbae02806b54ab54f000f7cc52c3c", "score": "0.4728724", "text": "public function item_type(){\n\n $data = $this->get_session_data();\n\n $data['title'] = 'ALS - Item Type';\n $this->parser->parse('templates/header.php', $data);\n\n $this->load->model('Item_type_model');\n $data['records'] = $this->Item_type_model->select_all();\n $this->parser->parse('masters/item_types/index.php', $data);\n\n $this->parser->parse('templates/footer.php', $data);\n }", "title": "" }, { "docid": "f9f8c83f31dd8e304df619bf85916303", "score": "0.4727316", "text": "function meeting_condition_mtg_item_itemtype_is($mtg_item, $itemtype) {\n return ($mtg_item->itemtype == $itemtype);\n}", "title": "" }, { "docid": "46c7c443e7385308dd7762b26721420b", "score": "0.47259986", "text": "function _parseMpdConf() {\n\t// prepare array\n\t$_mpd = array(\n\t\t'port' => '',\n\t\t'gapless_mp3_playback' => '',\n\t\t'auto_update' => '',\n\t\t'samplerate_converter' => '',\n\t\t'auto_update_depth' => '',\n\t\t'zeroconf_enabled' => '',\n\t\t'zeroconf_name' => '',\n\t\t'audio_output_format' => '',\n\t\t'mixer_type' => '',\n\t\t'audio_buffer_size' => '',\n\t\t'buffer_before_play' => '',\n\t\t'dsd_usb' => '',\n\t\t'device' => '',\n\t\t'volume_normalization' => ''\n\t);\n\n\t// read in mpd conf settings\n\t$mpdconf = ConfigDB::read('', 'mpdconf');\n\n\t// parse output for template\n\tforeach ($mpdconf as $key => $value) {\n\t\tif (in_array($value['param'], array_keys($_mpd))) {\n\t\t\t$_mpd[$value['param']] = $value['value_player'];\n\t\t}\n\t}\n\n\t// parse audio output format, ex \"44100:16:2\"\n\t$_mpd += parseAudioFormat($_mpd['audio_output_format']);\n\n\treturn $_mpd;\n}", "title": "" }, { "docid": "4b16a630dea9c21ba8948138596629e6", "score": "0.47107106", "text": "function websitez_get_mobile_types(){\n\treturn array(array('name'=>'Basic Mobile Device','option'=>WEBSITEZ_BASIC_THEME,'url_redirect'=>WEBSITEZ_BASIC_URL_REDIRECT),array('name'=>'Advanced Mobile Device','option'=>WEBSITEZ_ADVANCED_THEME,'url_redirect'=>WEBSITEZ_ADVANCED_URL_REDIRECT));\n}", "title": "" }, { "docid": "30cb08ff970726566ecb67cb57e319e9", "score": "0.4708629", "text": "abstract public function getQuestionType();", "title": "" }, { "docid": "8cbaa34da4efec8c40089da31879e7b6", "score": "0.47065198", "text": "function js19_cmb2_mediatype_radio_attributes( $args, $defaults, $field, $cmb ) {\n\tif ( $args['value'] ) {\n\t\t$args['label'] = '<span class=\"mediatype ' . $args['value'] . '\"></span>' . $args['label'];\n\t}\n\treturn $args;\n}", "title": "" }, { "docid": "599044bcf15b3cd9c115be044990399f", "score": "0.46965003", "text": "public function isAllowedFeedType(SimpleXMLElement $item) \r\n {\n $isAllowed = false;\n if(is_array($this->_allowedFeedType) && count($this->_allowedFeedType) >0) {\n $cedModules = $this->getCedCommerceExtensions();\n \r\n switch(trim((string)$item->update_type)) {\n case Ced_Jet_Model_Source_Updates_Type::TYPE_NEW_RELEASE :\n case Ced_Jet_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE :\n if (in_array(Ced_Jet_Model_Source_Updates_Type::TYPE_INSTALLED_UPDATE, $this->_allowedFeedType) && strlen(trim($item->module)) > 0 && isset($cedModules[trim($item->module)]) && version_compare($cedModules[trim($item->module)], trim($item->release_version), '<')===true) {\n $isAllowed = true;\n break;\n }\r\n\n case Ced_Jet_Model_Source_Updates_Type::TYPE_UPDATE_RELEASE :\n if(in_array(Ced_Jet_Model_Source_Updates_Type::TYPE_UPDATE_RELEASE, $this->_allowedFeedType) && strlen(trim($item->module)) > 0) {\n $isAllowed = true;\n break;\n }\r\n\n if(in_array(Ced_Jet_Model_Source_Updates_Type::TYPE_NEW_RELEASE, $this->_allowedFeedType)) {\n $isAllowed = true;\n }\n break;\n case Ced_Jet_Model_Source_Updates_Type::TYPE_PROMO :\n if(in_array(Ced_Jet_Model_Source_Updates_Type::TYPE_PROMO, $this->_allowedFeedType)) {\n $isAllowed = true;\n }\n break;\n case Ced_Jet_Model_Source_Updates_Type::TYPE_INFO :\n if(in_array(Ced_Jet_Model_Source_Updates_Type::TYPE_INFO, $this->_allowedFeedType)) {\n $isAllowed = true;\n }\n break;\n }\n }\r\n\n return $isAllowed;\n }", "title": "" }, { "docid": "46f6040395357253de3d725c6b42e6ca", "score": "0.4693955", "text": "public function currentLfmType()\n {\n $file_type = 'file';\n if ($this->isProcessingImages()) {\n $file_type = 'image';\n }\n\n return $file_type;\n }", "title": "" }, { "docid": "2c9b1a10f610be5ddd0b7ce9e3dcba09", "score": "0.46935108", "text": "function is_video_playlist( $playlist = NULL ) {\n\treturn is_playlist( $playlist ) && ( 'video' == get_playlist_type( $playlist ) );\n}", "title": "" }, { "docid": "dc71565fb5575b2994c37fec7ed431eb", "score": "0.46916118", "text": "function ztheme_zinamp_song_info($item) {\n\t$output = '';\n\t$output .= '<div><span class=\"title\">'.$item['title'].'</span>';\n\tif (isset($item['time'])) $output .= '<span class=\"time\"> ('.$item['time'].')</span>';\n\tif (isset($item['album'])) {\n\t\t$output .= '<br /><span class=\"album\">\"'.$item['album'].'\"';\n\t\tif (isset($item['year']) && !empty($item['year'])) $output .= ' ('.$item['year'].')';\n\t\t$output .='</span>';\n\t}\n\tif (isset($item['artist'])) {\n\t\t$output .= '<br /><span class=\"artist\">'.$item['artist'].'</span>';\n\t}\n\t$output .='</div>';\n\treturn $output;\n}", "title": "" }, { "docid": "d8ce63a4bba79a2710c57afec817240a", "score": "0.46910277", "text": "function displayItems() {\r\n global $session, $database;\r\n\r\n echo \"<h1>Items in Our Library</h1>\\n\";\r\n\r\n $q = \"SELECT * FROM \".DB_TBL_PRFX.\"items ORDER BY itemid ASC\";\r\n\r\n if(isset($_GET['type']) && !empty($_GET['type'])) {\r\n \t$itemType = $_GET['type'];\r\n $q = \"SELECT * FROM \".DB_TBL_PRFX.\"items WHERE itemtype='$itemType' ORDER BY itemid ASC\";\r\n }\r\n\r\n $result = $database->query($q);\r\n\r\n /* Error occurred, return given name by default */\r\n $num_rows = mysql_numrows($result);\r\n\r\n if(!$result || ($num_rows < 0)) {\r\n echo \"Error displaying info\";\r\n return;\r\n }\r\n\r\n if($num_rows == 0) {\r\n echo \"Database table empty\";\r\n return;\r\n }\r\n\r\n /* Display table contents */\r\n echo \"<table id=\\\"items\\\" align=\\\"center\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"3\\\">\\n\";\r\n echo \"<tr>\\n\";\r\n echo \"<th>itemID</th>\\n\";\r\n echo \"<th>Type</th>\\n\";\r\n echo \"<th>Title</th>\\n\";\r\n echo \"<th>Qty on Hand</th>\";\r\n if($session->isTeller() || $session->isAdmin()) {\r\n \techo \"<th>Check Media</th>\\n\";\r\n }\r\n echo \"</tr>\\n\";\r\n\r\n while($item = mysql_fetch_array($result, MYSQL_ASSOC)) {\r\n if($item['itemtype'] == \"BOOK\") {\r\n $qry = \"SELECT * FROM \".DB_TBL_PRFX.\"books WHERE itemid='\".$item['itemid'].\"'\";\r\n $qresult = $database->query($qry);\r\n $iteminfo = mysql_fetch_array($qresult, MYSQL_ASSOC);\r\n } else if ($item['itemtype'] == \"PERIODICAL\") {\r\n $qry = \"SELECT * FROM \".DB_TBL_PRFX.\"periodicals WHERE itemid='\".$item['itemid'].\"'\";\r\n $qresult = $database->query($qry);\r\n $iteminfo = mysql_fetch_array($qresult, MYSQL_ASSOC);\r\n } else if ($item['itemtype'] == \"DVD\") {\r\n $qry = \"SELECT * FROM \".DB_TBL_PRFX.\"dvds WHERE itemid='\".$item['itemid'].\"'\";\r\n $qresult = $database->query($qry);\r\n $iteminfo = mysql_fetch_array($qresult, MYSQL_ASSOC);\r\n } else if ($item['itemtype'] == \"CD\") {\r\n $qry = \"SELECT * FROM \".DB_TBL_PRFX.\"cds WHERE itemid='\".$item['itemid'].\"'\";\r\n $qresult = $database->query($qry);\r\n $iteminfo = mysql_fetch_array($qresult, MYSQL_ASSOC);\r\n } else {\r\n $iteminfo = NULL;\r\n }\r\n\r\n echo \"<tr>\";\r\n echo \"<td align=\\\"center\\\">\".$item['itemid'].\"</td>\\n\";\r\n echo \"<td align=\\\"center\\\"><div align=\\\"center\\\"><img src=\\\"\".SITE_BASE_URL.\"/img/itemtypes/\".$item['itemtype'].\".png\\\" alt=\\\"\".$item['itemtype'].\"\\\" class=\\\"clearimg\\\" /></div></td>\\n\";\r\n echo \"<td><a href=\\\"#TB_inline?height=155&amp;width=500&amp;inlineId=itemid\".$item['itemid'].\"\\\" class=\\\"thickbox\\\" title=\\\"\".$iteminfo['title'].\"\\\">\".$iteminfo['title'].\"</a>\\n\";\r\n echo \"<div id=\\\"itemid\".$item['itemid'].\"\\\" class=\\\"hide\\\"><p>\";\r\n if(!empty($iteminfo['description'])) {\r\n echo nl2br($iteminfo['description']);\r\n } else {\r\n \techo \"No Description\";\r\n }\r\n echo \"</p></div>\\n\";\r\n echo \"</td>\\n\";\r\n echo \"<td align=\\\"center\\\">\".$item['quantity'].\"</td>\\n\";\r\n if($session->isTeller() || $session->isAdmin()) {\r\n if($item['itemtype'] == \"BOOK\") {\r\n echo \"<td align=\\\"center\\\">\"\r\n .\"<a href=\\\"\".SITE_BASE_URL.\"/checkin.php?isbn=\".$iteminfo['isbn'].\"\\\">In</a>\"\r\n .\" / <a href=\\\"\".SITE_BASE_URL.\"/checkout.php?isbn=\".$iteminfo['isbn'].\"\\\">Out</a>\"\r\n .\"</td>\\n\";\r\n } else if ($item['itemtype'] == \"PERIODICAL\") {\r\n echo \"<td align=\\\"center\\\">\"\r\n .\"<a href=\\\"\".SITE_BASE_URL.\"/checkin.php?issn=\".$iteminfo['issn'].\"\\\">In</a>\"\r\n .\" / <a href=\\\"\".SITE_BASE_URL.\"/checkout.php?issn=\".$iteminfo['issn'].\"\\\">Out</a>\"\r\n .\"</td>\\n\";\r\n } else if ($item['itemtype'] == \"DVD\") {\r\n echo \"<td align=\\\"center\\\">\"\r\n .\"<a href=\\\"\".SITE_BASE_URL.\"/checkin.php?upc=\".$iteminfo['upc'].\"\\\">In</a>\"\r\n .\" / <a href=\\\"\".SITE_BASE_URL.\"/checkout.php?upc=\".$iteminfo['upc'].\"\\\">Out</a>\"\r\n .\"</td>\\n\";\r\n } else if ($item['itemtype'] == \"CD\") {\r\n echo \"<td align=\\\"center\\\">\"\r\n .\"<a href=\\\"\".SITE_BASE_URL.\"/checkin.php?upc=\".$iteminfo['upc'].\"\\\">In</a>\"\r\n .\" / <a href=\\\"\".SITE_BASE_URL.\"/checkout.php?upc=\".$iteminfo['upc'].\"\\\">Out</a>\"\r\n .\"</td>\\n\";\r\n } else {\r\n echo \"<td>&nbsp;</td>\\n\";\r\n }\r\n }\r\n echo \"</tr>\\n\";\r\n }\r\n echo \"</table><br /><br />\\n\";\r\n}", "title": "" }, { "docid": "a04a799050a4c880aa4947666e7b143c", "score": "0.46821842", "text": "abstract protected function qtype();", "title": "" }, { "docid": "ba5f239103d3cd608228e7aa4cd3e291", "score": "0.46797043", "text": "public static function numberOfTracksOnMedium(): string\n {\n return 'tracks';\n }", "title": "" }, { "docid": "083741d58653232f53f035587c231ebf", "score": "0.4675045", "text": "function media_identify($source)\r\n{\r\n $size = $width = $height = $duration = $group_id = $iptc = NULL;\r\n $type = FALSE;\r\n\r\n // Determine file format by magic bytes in file header\r\n if (!$fp = @fopen($source, 'rb')) {\r\n trigger_error(\"Could not open file: '$source_file'\", E_USER_NOTICE);\r\n return FALSE;\r\n }\r\n\r\n // Read file data\r\n fseek($fp, 0, SEEK_SET);\r\n $filedata = fread($fp, 128);\r\n fclose($fp);\r\n\r\n // Identify file format - loop through $format_info and detect with reg expr\r\n foreach ($GLOBALS['PROPS_MEDIA_TYPES'] as $media_type => $info) {\r\n // The /s switch on preg_match() forces preg_match() NOT to treat\r\n // newline (0x0A) characters as special chars but do a binary match\r\n if (preg_match('/'.$info['pattern'].'/s', $filedata)) {\r\n $type = $media_type;\r\n break;\r\n }\r\n }\r\n\r\n // Free memory\r\n unset($filedata);\r\n\r\n if ($type === FALSE) {\r\n props_error(\"This media file format is not supported.\", PROPS_E_WARNING);\r\n return FALSE;\r\n }\r\n\r\n $group_id = $GLOBALS['PROPS_MEDIA_TYPES'][$type]['group_id'];\r\n $mime_type = $GLOBALS['PROPS_MEDIA_TYPES'][$type]['mime_type'];\r\n $size = filesize($source);\r\n\r\n switch ($group_id) {\r\n case PROPS_MEDIA_GRAPHICS:\r\n // Get dimensions\r\n $imagesize = @getimagesize($source, $iptc);\r\n $width = $imagesize[0];\r\n $height = $imagesize[1];\r\n break;\r\n\r\n case PROPS_MEDIA_AUDIO:\r\n if (props_getkey('config.media.ffmpeg_path')) {\r\n $successfulRun = FALSE;\r\n list ($ret, $results, $stderr) = media_ffmpeg_exec($source, array('-vstats'));\r\n\r\n foreach ($stderr as $resultLine) {\r\n if (preg_match(\"/Unknown format/\", $resultLine, $regs)) {\r\n $successfulRun = FALSE;\r\n }\r\n\r\n if (preg_match(\"/Duration: (\\d+):(\\d+):(\\d+\\.\\d+)/\", $resultLine, $regs)) {\r\n $successfulRun = TRUE;\r\n $duration = floor(3600*$regs[1] + 60*$regs[2] + $regs[3]);\r\n }\r\n }\r\n\r\n if (!$successfulRun) {\r\n props_error(\"This audio file format is not supported.\", PROPS_E_WARNING);\r\n return FALSE;\r\n }\r\n }\r\n break;\r\n\r\n case PROPS_MEDIA_VIDEO:\r\n if (props_getkey('config.media.ffmpeg_path')) {\r\n $successfulRun = FALSE;\r\n list ($ret, $results, $stderr) = media_ffmpeg_exec($source, array('-vstats'));\r\n\r\n foreach ($stderr as $resultLine) {\r\n if (preg_match(\"/Unknown format/\", $resultLine, $regs)) {\r\n $successfulRun = FALSE;\r\n }\r\n\r\n if (preg_match(\"/Duration: (\\d+):(\\d+):(\\d+\\.\\d+)/\", $resultLine, $regs)) {\r\n $successfulRun = TRUE;\r\n $duration = floor(3600*$regs[1] + 60*$regs[2] + $regs[3]);\r\n }\r\n\r\n if (preg_match(\"/Stream.*?Video:.*?(\\d+)x(\\d+)/\", $resultLine, $regs)) {\r\n $successfulRun = TRUE;\r\n list ($width, $height) = array($regs[1], $regs[2]);\r\n }\r\n }\r\n\r\n if (!$successfulRun) {\r\n props_error(\"This video file format is not supported.\", PROPS_E_WARNING);\r\n return FALSE;\r\n }\r\n }\r\n break;\r\n }\r\n\r\n return array('width'=>$width, 'height'=>$height, 'size'=>$size, 'duration'=>$duration, 'group_id'=>$group_id, 'type'=>$type, 'mime_type'=>$mime_type, 'iptc'=>$iptc);\r\n}", "title": "" }, { "docid": "f94a2b841d39a7e14f05abc2cb268356", "score": "0.46695587", "text": "function mbl_playlist_file_path(){\n\treturn getPath4XMLFile().DS.$GLOBALS[\"video_slider_playlist_conf\"][\"iphone_videoSlider_playlist_name\"];\t\n}", "title": "" }, { "docid": "ee9f026e6fcde89200f1ad937f5c04ec", "score": "0.46687463", "text": "function get_item_type() {\n\t\t_deprecated_function( __METHOD__, '1.2' );\n\t}", "title": "" }, { "docid": "3fc9c9c08272784038a000b85c39d223", "score": "0.46658614", "text": "private function parse_type_items_link( $type ) {\n\t\ttry {\n\t\t\tif ( isset( $type['_links']['wp:items'][0]['href'] ) ) {\n\t\t\t\t$link = $type['_links']['wp:items'][0]['href'];\n\t\t\t\treturn $link;\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// Bummer\n\t\t}\n\n\t\ttry {\n\t\t\tif ( isset( $type['_links']['https://api.w.org/items'][0]['href'] ) ) {\n\t\t\t\t$link = $type['_links']['https://api.w.org/items'][0]['href'];\n\t\t\t\treturn $link;\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\t// Even bigger bummer\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8289725d4e4ee234d6ab1d33b12e07d1", "score": "0.46637425", "text": "function process_packid_PLDT($input) {\n\t\t$index = $this->_parentlist->get_active_index('ANAM');\n\t\t$type = $this->csunpack(\"L\",substr($input,0,4));\n\n\t\tif (in_array($type, array(0,1,6,9))) {\n\t\t\t$ordid = $this->process_packid(substr($input,4,4), TRUE);\n\t\t\tif (isset($ordid))\n\t\t\t\t$this->_parentlist->set_active($ordid, 'activity_formid', $index);\n\t\t}\n\t\telse {\n\t\t\t$raw = $this->csunpack('L', substr($input,4,4));\n\t\t\tif (isset($raw))\n\t\t\t\t$this->_parentlist->set_active($raw, 'activity_value', $index);\n\t\t}\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "6a3e6c516ebaf4e1c59294ec3eb29f91", "score": "0.46465272", "text": "function fetchSimpleAudioPlayer($runtime, $rtmp_file, $protocol=\"\", $width=\"450\",$height=\"25\",\n\t\t\t\t\t\t\t\t\t\t$embed=false, $embedstring=\"Play\",$permitfullscreen=false,\n\t\t\t\t\t\t\t\t\t\t$usepoodlldata=false, $splashurl=''){\nglobal $CFG, $USER, $COURSE;\n\n//Set our servername .\n$flvserver = $CFG->poodll_media_server;\n$courseid= $COURSE->id;\n$useplayer=$CFG->filter_poodll_defaultplayer;\n\n//determine if we are on a mobile device or not\n $ismobile = isMobile($CFG->filter_poodll_html5play);\n\n\t//Set our use protocol type\n\t//if one was not passed, then it may have been tagged to the url\n\t//this was the old way.\n\tif ($protocol==\"\"){\n\t\t$type = \"rtmp\";\n\t\tif (strlen($rtmp_file) > 5){\n\t\t\t$protocol = substr($rtmp_file,0,5);\n\t\t\tswitch ($protocol){\n\t\t\t\tcase \"yutu:\":\n\t\t\t\t\t$rtmp_file = substr($rtmp_file,5);\n\t\t\t\t\t$rtmp_file = getYoutubeLink($rtmp_file);\n\t\t\t\t\t$type=\"http\";\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase \"http:\":\n\t\t\t\t\t$rtmp_file = substr($rtmp_file,5);\n\t\t\t\t\t$type=\"http\";\n\t\t\t\t\tbreak;\t\t\n\t\t\t\tcase \"rtmp:\":\n\t\t\t\t\t$rtmp_file = substr($rtmp_file,5);\n\t\t\t\tdefault:\n\t\t\t\t\t$type=\"rtmp\";\t\t\t\t\n\n\t\t\t}\n\t\t\n\t\t}//end of if strlen(rtmpfile) > 4\n\n\t//If we have one passed in, lets set it to our type\n\t}else{\n\t\tswitch ($protocol){\n\t\t\t\tcase \"yutu\":\n\t\t\t\t\t$rtmp_file = getYoutubeLink($rtmp_file);\n\t\t\t\t\t$type=\"http\";\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\tcase \"http\":\n\t\t\t\tcase \"rtmp\":\n\t\t\t\tcase \"legacy\":\n\t\t\t\tdefault:\n\t\t\t\t\t$type=$protocol;\t\t\t\t\n\n\t\t\t}\n\t}\n\n\t//some common variables for the embedding stage.\t\n\t//$playerLoc = $CFG->wwwroot . '/filter/poodll/flash/poodllaudioplayer.lzx.swf9.swf';\n\n\t//If we are using the legacy coursefiles, we want to fall into this code\n\t//this is just a temporary fix to achieve this. Justin 20111213\n\tif($protocol=='rtmp' || $protocol=='legacy'){\n\t\t$rtmp_file= $CFG->wwwroot . \"/file.php/\" . $courseid . \"/\" . $rtmp_file;\n $type = 'http';\n\t//if using poodlldata, take stub from base dir + poodlldatadir then add file name/path\t\n\t}else if($usepoodlldata){\n\t\t$baseURL = $CFG->{'wwwroot'} . \"/\" . $CFG->{'filter_poodll_datadir'} . \"/\" ;\n\t\t$rtmp_file = $baseURL . $rtmp_file;\n\t}\n\t\n\t//If we want to avoid loading many players per page, this loads the player only after a text link is clicked\n\t//it uses the poodll player and only works if the file is an flv, otherwise it just proceeds as usual\n\t\n\t//I quit loading javascript.php in head, so loadAudioPlayer won't work. I think noone uses it anyway. hence added if \"false\"\n\t//Justin 20130406\n\tif (false && $embed && substr($rtmp_file,-4)=='.flv'){\n\t\t$lzid = \"lzapp_audioplayer_\" . rand(100000, 999999) ;\n\t\t$returnString=\"\t\t\n\t\t <div id='$lzid' class='player'>\n <a href='#' onclick=\\\"javascript:loadAudioPlayer('$rtmp_file', '$lzid', 'sample_$lzid', '$width', '$height'); return false;\\\">$embedstring </a>\n </div>\t\t\n\t\t\";\n\t\treturn $returnString;\n\t}\n\t//if we are using javascript to detect and insert (probably best..?)\t\n\t\n\t\t$params = array();\n\t\t$params['red5url'] = urlencode($flvserver);\n\t\t$params['playertype'] = $type;\n\t\t$params['mediapath'] = $rtmp_file;\n\t\t$params['permitfullscreen'] = $permitfullscreen;\n\t\t\n\t\t\n\t\t//establish the fileextension\n\t\t$ext = substr($rtmp_file,-3);\n\t\n\t\t//if we are on mobile we want to play mp3 using html5 tags\n\t\t//if we have a file type that flash wont play, default to runtime = js\n\t\tif($runtime=='auto' ){\n\t\t\tif($ismobile){\t\t\n\t\t\t\t\t$runtime='js';\n\t\t\t}else if($ext=='3gp' || $ext=='ebm' || $ext=='3g2'){\n\t\t\t\t\t$runtime='js';\n\t\t\t}else{\n\t\t\t\t\t$runtime='swf';\n\t\t\t}\n\t\t}//end of if runtime=auto\n\n\t\n\t\n\t\tif($runtime=='js' && ($CFG->filter_poodll_html5controls=='native')){\n\t\t\t\t$returnString=\"\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//the $rtmp_file as it comes from assignment and questions, is urlencoded, we need to decode \n\t\t\t\t//or html 5 playback will fail Justin 20121016\n\t\t\t\t$rtmp_file = urldecode($rtmp_file);\n\t\t\t\t\n\t\t\t\t//figure out the mime type by the extension\n\t\t\t\t$mime = \"\";\n\t\t\t\tswitch($ext){\n\t\t\t\t\tcase \"mov\":\n\t\t\t\t\tcase \"mp4\": $mime = \"video/mp4\"; break;\n\t\t\t\t\tcase \"3gp\": $mime = \"video/3gpp\"; break;\n\t\t\t\t\tcase \"3g2\": $mime = \"video/3gpp2\"; break;\n\t\t\t\t\tcase \"ebm\": $mime = \"video/webm\"; break;\n\t\t\t\t\tdefault: $mime = \"video/mp4\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//The HTML5 Code (can be used on its own OR with the mediaelement code below it\n\t\t\t\t$returnString .=\"<audio controls width='\" . $width . \"' height='\" . $height . \"'>\n\t\t\t\t\t\t\t\t<source type='\" . $mime . \"' src='\" .$rtmp_file . \"'/>\n\t\t\t\t\t\t\t\t</audio>\";\n\t\t\t\t\n\t\t\t\t//=======================\n\t\t\t\t//if we are using mediaelement js use this. We use JQuery which is not ideal, in moodle yui environment\n\t\t\t\t/*\n\t\t\t\t$mediajsroot = $CFG->wwwroot . '/filter/poodll/js/mediaelementjs/';\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"jquery.js'></script>\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mediaelement-and-player.min.js'></script>\";\n\t\t\t\t$returnString .=\"<link rel='stylesheet' href='\" . $mediajsroot . \"mediaelementplayer.css' />\t\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mep-feature-loop.js'></script>\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mep-feature-speed.js'></script>\";\n\t\t\t\t$returnString .=\"<script src='\" . $mediajsroot . \"mep-feature-progress.js'></script>\";\n\t\t\t\t//$returnString .=\"<script>$('audio,video').mediaelementplayer({features:['playpause','loop','speed','progess','volume']});</script>\";\n\t\t\t\t$returnString .=\"<script>$('audio,video').mediaelementplayer();</script>\";\n\t\t\t\t*/\n\t\t\t//=======================\n\t\t\t\n\t\t\t\n\t\t\t\t//=======================\n\t\t\t\t//If we use Kaltura, use this\t\t\t\n\t\t\t\t//$returnString .=\"<script src='http://html5.kaltura.org/js'></script>\";\n\t\t\t\t//=======================\n\t\t\n\t\t//if we are using SWF\t\t\n\t\t}else{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Flowplayer\n\t\t\t\tif($useplayer==\"fp\" || $CFG->filter_poodll_html5controls==\"js\"){\n\t\t\t\t\t\n\t\t\t\t\t$returnString= fetchFlowPlayerCode($width,$height,$rtmp_file,\"audio\",$ismobile,\"\",false,$splashurl);\n\t\t\t\t\n\t\t\t\t//JW player\n\t\t\t\t} else if($useplayer==\"jw\"){\n\t\t\t\t\t$flashvars = array();\n\t\t\t\t\t$flashvars['file'] = $rtmp_file;\n\t\t\t\t\t$flashvars['autostart'] = 'false';\n\t\t\t\t\t$returnString= fetchSWFObjectWidgetCode('jwplayer.swf',\n\t\t\t\t\t\t\t\t$flashvars,$width,$height,'#FFFFFF');\n\t\t\t\t\n\t\t\t\t//if the file is an mp3, and we are using poodll player, don't handle it\n\t\t\t\t//either pass it to multi media plugin filter or pass it flowplayer\n\t\t\t\t// PoodLL player can't mp3 without RTMP\n\t\t\t\t}else if(substr($rtmp_file,-4)=='.mp3'){\n\t\t\t\t\t\n\t\t\t\t\t$returnString= fetchFlowPlayerCode($width,$height,$rtmp_file,\"audio\",$ismobile);\n\t\t\t\t\t//$returnString= \"<a href=\\\"$rtmp_file\\\">$rtmp_file</a>\";\n\t\t\t\t\n\t\t\t\t//PoodLL Player\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$returnString= fetchSWFWidgetCode('poodllaudioplayer.lzx.swf9.swf',\n\t\t\t\t\t\t\t\t$params,$width,$height,'#FFFFFF');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//regardless of swf player, add a download icon if appropriate\n\t\t\t\t$context = context_course::instance($COURSE->id);\n\t\t\t\t$has_permission = has_capability('filter/poodll:candownloadmedia', $context);\n\t\t\t\tif($CFG->filter_poodll_download_media_ok && $has_permission){\n\t\t\t\t\t$returnString .= \"<a href='\" . urldecode($rtmp_file) . \"'>\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t. \"&nbsp;<img src='\" . $CFG->{'wwwroot'} . \"/filter/poodll/pix/download.gif' alt='download' />\" \n\t\t\t\t\t\t\t\t\t\t\t\t\t.\"</a>\";\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t}\n \t\t\t\t\t\t\n \treturn $returnString;\n}", "title": "" }, { "docid": "15953aa92fdb1a0fd0fd7326536f0e31", "score": "0.4646302", "text": "public function getTypeOfItem()\n {\n return $this->type;\n }", "title": "" }, { "docid": "53d9f9eeb15a8c2cb1e13283f9a880da", "score": "0.46399665", "text": "function is_audio($name, $as_admin)\n{\n require_code('media_renderer');\n $acceptable_media = MEDIA_TYPE_AUDIO;\n $hooks = find_media_renderers($name, array(), $as_admin, null, $acceptable_media);\n return !is_null($hooks);\n}", "title": "" }, { "docid": "36a829b5d3269c9f2bd48031328c34cd", "score": "0.4636853", "text": "function resolvePlexItem($item)\n{\n\t$height = getCacheImageSize('h');\n\t$width = getCacheImageSize('w');\n\t$nowPlayingHeight = getCacheImageSize('nph');\n\t$nowPlayingWidth = getCacheImageSize('npw');\n\t// Cache Directories\n\t$cacheDirectory = dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR;\n\t$cacheDirectoryWeb = 'plugins/images/cache/';\n\t// Types\n\tswitch ($item['type']) {\n\t\tcase 'season':\n\t\t\t$plexItem['type'] = 'tv';\n\t\t\t$plexItem['title'] = (string)$item['parentTitle'];\n\t\t\t$plexItem['secondaryTitle'] = (string)$item['title'];\n\t\t\t$plexItem['summary'] = (string)$item['parentSummary'];\n\t\t\t$plexItem['ratingKey'] = (string)$item['parentRatingKey'];\n\t\t\t$plexItem['thumb'] = (string)$item['thumb'];\n\t\t\t$plexItem['key'] = (string)$item['ratingKey'] . \"-list\";\n\t\t\t$plexItem['nowPlayingThumb'] = (string)$item['art'];\n\t\t\t$plexItem['nowPlayingKey'] = (string)$item['ratingKey'] . \"-np\";\n\t\t\t$plexItem['metadataKey'] = (string)$item['parentRatingKey'];\n\t\t\tbreak;\n\t\tcase 'episode':\n\t\t\t$plexItem['type'] = 'tv';\n\t\t\t$plexItem['title'] = (string)$item['grandparentTitle'];\n\t\t\t$plexItem['secondaryTitle'] = (string)$item['parentTitle'];\n\t\t\t$plexItem['summary'] = (string)$item['title'];\n\t\t\t$plexItem['ratingKey'] = (string)$item['parentRatingKey'];\n\t\t\t$plexItem['thumb'] = ($item['parentThumb'] ? (string)$item['parentThumb'] : (string)$item['grandparentThumb']);\n\t\t\t$plexItem['key'] = (string)$item['ratingKey'] . \"-list\";\n\t\t\t$plexItem['nowPlayingThumb'] = (string)$item['grandparentArt'];\n\t\t\t$plexItem['nowPlayingKey'] = (string)$item['grandparentRatingKey'] . \"-np\";\n\t\t\t$plexItem['nowPlayingTitle'] = (string)$item['grandparentTitle'] . ' - ' . (string)$item['title'];\n\t\t\t$plexItem['nowPlayingBottom'] = 'S' . (string)$item['parentIndex'] . ' · E' . (string)$item['index'];\n\t\t\t$plexItem['metadataKey'] = (string)$item['grandparentRatingKey'];\n\t\t\tbreak;\n\t\tcase 'clip':\n\t\t\t$useImage = (isset($item['live']) ? \"plugins/images/cache/livetv.png\" : null);\n\t\t\t$plexItem['type'] = 'clip';\n\t\t\t$plexItem['title'] = (isset($item['live']) ? 'Live TV' : (string)$item['title']);\n\t\t\t$plexItem['secondaryTitle'] = '';\n\t\t\t$plexItem['summary'] = (string)$item['summary'];\n\t\t\t$plexItem['ratingKey'] = (string)$item['parentRatingKey'];\n\t\t\t$plexItem['thumb'] = (string)$item['thumb'];\n\t\t\t$plexItem['key'] = (string)$item['ratingKey'] . \"-list\";\n\t\t\t$plexItem['nowPlayingThumb'] = (string)$item['art'];\n\t\t\t$plexItem['nowPlayingKey'] = isset($item['ratingKey']) ? (string)$item['ratingKey'] . \"-np\" : (isset($item['live']) ? \"livetv.png\" : \":)\");\n\t\t\t$plexItem['nowPlayingTitle'] = $plexItem['title'];\n\t\t\t$plexItem['nowPlayingBottom'] = isset($item['extraType']) ? \"Trailer\" : (isset($item['live']) ? \"Live TV\" : \":)\");\n\t\t\tbreak;\n\t\tcase 'album':\n\t\tcase 'track':\n\t\t\t$plexItem['type'] = 'music';\n\t\t\t$plexItem['title'] = (string)$item['parentTitle'];\n\t\t\t$plexItem['secondaryTitle'] = (string)$item['title'];\n\t\t\t$plexItem['summary'] = (string)$item['title'];\n\t\t\t$plexItem['ratingKey'] = (string)$item['parentRatingKey'];\n\t\t\t$plexItem['thumb'] = (string)$item['thumb'];\n\t\t\t$plexItem['key'] = (string)$item['ratingKey'] . \"-list\";\n\t\t\t$plexItem['nowPlayingThumb'] = ($item['parentThumb']) ? (string)$item['parentThumb'] : (string)$item['art'];\n\t\t\t$plexItem['nowPlayingKey'] = (string)$item['parentRatingKey'] . \"-np\";\n\t\t\t$plexItem['nowPlayingTitle'] = (string)$item['grandparentTitle'] . ' - ' . (string)$item['title'];\n\t\t\t$plexItem['nowPlayingBottom'] = (string)$item['parentTitle'];\n\t\t\t$plexItem['metadataKey'] = isset($item['grandparentRatingKey']) ? (string)$item['grandparentRatingKey'] : (string)$item['parentRatingKey'];\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$plexItem['type'] = 'movie';\n\t\t\t$plexItem['title'] = (string)$item['title'];\n\t\t\t$plexItem['secondaryTitle'] = (string)$item['year'];\n\t\t\t$plexItem['summary'] = (string)$item['summary'];\n\t\t\t$plexItem['ratingKey'] = (string)$item['ratingKey'];\n\t\t\t$plexItem['thumb'] = (string)$item['thumb'];\n\t\t\t$plexItem['key'] = (string)$item['ratingKey'] . \"-list\";\n\t\t\t$plexItem['nowPlayingThumb'] = (string)$item['art'];\n\t\t\t$plexItem['nowPlayingKey'] = (string)$item['ratingKey'] . \"-np\";\n\t\t\t$plexItem['nowPlayingTitle'] = (string)$item['title'];\n\t\t\t$plexItem['nowPlayingBottom'] = (string)$item['year'];\n\t\t\t$plexItem['metadataKey'] = (string)$item['ratingKey'];\n\t}\n\t$plexItem['uid'] = (string)$item['ratingKey'];\n\t$plexItem['elapsed'] = isset($item['viewOffset']) && $item['viewOffset'] !== '0' ? (int)$item['viewOffset'] : null;\n\t$plexItem['duration'] = isset($item['duration']) ? (int)$item['duration'] : (int)$item->Media['duration'];\n\t$plexItem['addedAt'] = isset($item['addedAt']) ? (int)$item['addedAt'] : null;\n\t$plexItem['watched'] = ($plexItem['elapsed'] && $plexItem['duration'] ? floor(($plexItem['elapsed'] / $plexItem['duration']) * 100) : 0);\n\t$plexItem['transcoded'] = isset($item->TranscodeSession['progress']) ? floor((int)$item->TranscodeSession['progress'] - $plexItem['watched']) : '';\n\t$plexItem['stream'] = isset($item->Media->Part->Stream['decision']) ? (string)$item->Media->Part->Stream['decision'] : '';\n\t$plexItem['id'] = str_replace('\"', '', (string)$item->Player['machineIdentifier']);\n\t$plexItem['session'] = (string)$item->Session['id'];\n\t$plexItem['bandwidth'] = (string)$item->Session['bandwidth'];\n\t$plexItem['bandwidthType'] = (string)$item->Session['location'];\n\t$plexItem['sessionType'] = isset($item->TranscodeSession['progress']) ? 'Transcoding' : 'Direct Playing';\n\t$plexItem['state'] = (((string)$item->Player['state'] == \"paused\") ? \"pause\" : \"play\");\n\t$plexItem['user'] = ($GLOBALS['homepageShowStreamNames'] && qualifyRequest($GLOBALS['homepageShowStreamNamesAuth'])) ? (string)$item->User['title'] : \"\";\n\t$plexItem['userThumb'] = ($GLOBALS['homepageShowStreamNames'] && qualifyRequest($GLOBALS['homepageShowStreamNamesAuth'])) ? (string)$item->User['thumb'] : \"\";\n\t$plexItem['userAddress'] = ($GLOBALS['homepageShowStreamNames'] && qualifyRequest($GLOBALS['homepageShowStreamNamesAuth'])) ? (string)$item->Player['address'] : \"x.x.x.x\";\n\t$plexItem['address'] = $GLOBALS['plexTabURL'] ? $GLOBALS['plexTabURL'] . \"/web/index.html#!/server/\" . $GLOBALS['plexID'] . \"/details?key=/library/metadata/\" . $item['ratingKey'] : \"https://app.plex.tv/web/app#!/server/\" . $GLOBALS['plexID'] . \"/details?key=/library/metadata/\" . $item['ratingKey'];\n\t$plexItem['nowPlayingOriginalImage'] = 'api/?v1/image&source=plex&img=' . $plexItem['nowPlayingThumb'] . '&height=' . $nowPlayingHeight . '&width=' . $nowPlayingWidth . '&key=' . $plexItem['nowPlayingKey'] . '$' . randString();\n\t$plexItem['originalImage'] = 'api/?v1/image&source=plex&img=' . $plexItem['thumb'] . '&height=' . $height . '&width=' . $width . '&key=' . $plexItem['key'] . '$' . randString();\n\t$plexItem['openTab'] = $GLOBALS['plexTabURL'] && $GLOBALS['plexTabName'] ? true : false;\n\t$plexItem['tabName'] = $GLOBALS['plexTabName'] ? $GLOBALS['plexTabName'] : '';\n\t// Stream info\n\t$plexItem['userStream'] = array(\n\t\t'platform' => (string)$item->Player['platform'],\n\t\t'product' => (string)$item->Player['product'],\n\t\t'device' => (string)$item->Player['device'],\n\t\t'stream' => (string)$item->Media->Part['decision'] . ($item->TranscodeSession['throttled'] == '1' ? ' (Throttled)' : ''),\n\t\t'videoResolution' => (string)$item->Media['videoResolution'],\n\t\t'throttled' => ($item->TranscodeSession['throttled'] == 1) ? true : false,\n\t\t'sourceVideoCodec' => (string)$item->TranscodeSession['sourceVideoCodec'],\n\t\t'videoCodec' => (string)$item->TranscodeSession['videoCodec'],\n\t\t'audioCodec' => (string)$item->TranscodeSession['audioCodec'],\n\t\t'sourceAudioCodec' => (string)$item->TranscodeSession['sourceAudioCodec'],\n\t\t'videoDecision' => streamType((string)$item->TranscodeSession['videoDecision']),\n\t\t'audioDecision' => streamType((string)$item->TranscodeSession['audioDecision']),\n\t\t'container' => (string)$item->TranscodeSession['container'],\n\t\t'audioChannels' => (string)$item->TranscodeSession['audioChannels']\n\t);\n\t// Genre catch all\n\tif ($item->Genre) {\n\t\t$genres = array();\n\t\tforeach ($item->Genre as $key => $value) {\n\t\t\t$genres[] = (string)$value['tag'];\n\t\t}\n\t}\n\t// Actor catch all\n\tif ($item->Role) {\n\t\t$actors = array();\n\t\tforeach ($item->Role as $key => $value) {\n\t\t\tif ($value['thumb']) {\n\t\t\t\t$actors[] = array(\n\t\t\t\t\t'name' => (string)$value['tag'],\n\t\t\t\t\t'role' => (string)$value['role'],\n\t\t\t\t\t'thumb' => (string)$value['thumb']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\t// Metadata information\n\t$plexItem['metadata'] = array(\n\t\t'guid' => (string)$item['guid'],\n\t\t'summary' => (string)$item['summary'],\n\t\t'rating' => (string)$item['rating'],\n\t\t'duration' => (string)$item['duration'],\n\t\t'originallyAvailableAt' => (string)$item['originallyAvailableAt'],\n\t\t'year' => (string)$item['year'],\n\t\t'studio' => (string)$item['studio'],\n\t\t'tagline' => (string)$item['tagline'],\n\t\t'genres' => ($item->Genre) ? $genres : '',\n\t\t'actors' => ($item->Role) ? $actors : ''\n\t);\n\tif (file_exists($cacheDirectory . $plexItem['nowPlayingKey'] . '.jpg')) {\n\t\t$plexItem['nowPlayingImageURL'] = $cacheDirectoryWeb . $plexItem['nowPlayingKey'] . '.jpg';\n\t}\n\tif (file_exists($cacheDirectory . $plexItem['key'] . '.jpg')) {\n\t\t$plexItem['imageURL'] = $cacheDirectoryWeb . $plexItem['key'] . '.jpg';\n\t}\n\tif (file_exists($cacheDirectory . $plexItem['nowPlayingKey'] . '.jpg') && (time() - 604800) > filemtime($cacheDirectory . $plexItem['nowPlayingKey'] . '.jpg') || !file_exists($cacheDirectory . $plexItem['nowPlayingKey'] . '.jpg')) {\n\t\t$plexItem['nowPlayingImageURL'] = 'api/?v1/image&source=plex&img=' . $plexItem['nowPlayingThumb'] . '&height=' . $nowPlayingHeight . '&width=' . $nowPlayingWidth . '&key=' . $plexItem['nowPlayingKey'] . '';\n\t}\n\tif (file_exists($cacheDirectory . $plexItem['key'] . '.jpg') && (time() - 604800) > filemtime($cacheDirectory . $plexItem['key'] . '.jpg') || !file_exists($cacheDirectory . $plexItem['key'] . '.jpg')) {\n\t\t$plexItem['imageURL'] = 'api/?v1/image&source=plex&img=' . $plexItem['thumb'] . '&height=' . $height . '&width=' . $width . '&key=' . $plexItem['key'] . '';\n\t}\n\tif (!$plexItem['nowPlayingThumb']) {\n\t\t$plexItem['nowPlayingOriginalImage'] = $plexItem['nowPlayingImageURL'] = \"plugins/images/cache/no-np.png\";\n\t\t$plexItem['nowPlayingKey'] = \"no-np\";\n\t}\n\tif (!$plexItem['thumb']) {\n\t\t$plexItem['originalImage'] = $plexItem['imageURL'] = \"plugins/images/cache/no-list.png\";\n\t\t$plexItem['key'] = \"no-list\";\n\t}\n\tif (isset($useImage)) {\n\t\t$plexItem['useImage'] = $useImage;\n\t}\n\treturn $plexItem;\n}", "title": "" }, { "docid": "8b8c5b1433be655d4d387c83718e6675", "score": "0.46333823", "text": "public static function song($input) {\n\n $uid = scrub_in($input['filter']);\n\n ob_end_clean();\n echo XML_Data::songs(array($uid));\n\n }", "title": "" }, { "docid": "f68e1041f287a7274663a7b47e3bd7fc", "score": "0.46320808", "text": "function theme_portaltvsl_formatter_audio_player($element) {\n $file = $element['#item'];\n $field = content_fields($element['#field_name']);\n $output = theme('portaltvsl_file', $file, $field);\n return $output;\n}", "title": "" }, { "docid": "a2f3fbc55bfb528a1dd682e2f36d49a2", "score": "0.46292734", "text": "function quiz_get_question_type($questionid) {\n global $DB;\n $questiontype = $DB->get_record('question', array('id' => $questionid));\n return($questiontype->qtype);\n}", "title": "" }, { "docid": "878b80fa3053ff23c8bd1e2c2d476e15", "score": "0.462465", "text": "public function playlists() {\r\n\t\treturn array(\r\n\t\t\t'titles' => array(\r\n\t\t\t\t'playlists' => __( 'Playlists', 'wpmudev_vids' ),\r\n\t\t\t\t'available_videos' => __( 'Available Videos', 'wpmudev_vids' ),\r\n\t\t\t\t'visibility_settings' => __( 'Visibility settings', 'wpmudev_vids' ),\r\n\t\t\t\t'add_videos' => __( 'Add videos', 'wpmudev_vids' ),\r\n\t\t\t),\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'recently_created' => __( 'Recently created playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'recently_updated' => __( 'Recently updated playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'never' => __( 'Never', 'wpmudev_vids' ),\r\n\t\t\t\t'video_title' => __( 'Video title', 'wpmudev_vids' ),\r\n\t\t\t\t'date_added' => __( 'Date added', 'wpmudev_vids' ),\r\n\t\t\t\t'bulk_actions' => __( 'Bulk actions', 'wpmudev_vids' ),\r\n\t\t\t\t'delete_playlist' => __( 'Delete playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'permissions' => __( 'Permissions', 'wpmudev_vids' ),\r\n\t\t\t\t'location' => __( 'Location', 'wpmudev_vids' ),\r\n\t\t\t\t'choose_location' => __( 'Choose WP Admin pages', 'wpmudev_vids' ),\r\n\t\t\t\t'edit_playlist' => __( 'Edit Playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_name' => __( 'Playlist name', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_desc' => __( 'Playlist description', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_thumbnail' => __( 'Playlist thumbnail image', 'wpmudev_vids' ),\r\n\t\t\t\t'placeholder_name' => __( 'E.g. New playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'create_playlist' => __( 'Create a new playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'search_videos' => __( 'Search videos', 'wpmudev_vids' ),\r\n\t\t\t\t'videos' => __( 'Videos', 'wpmudev_vids' ),\r\n\t\t\t\t/* translators: %s: Count of videos. */\r\n\t\t\t\t'videos_selected' => __( '%s videos selected', 'wpmudev_vids' ),\r\n\t\t\t\t'row_actions' => __( 'Row actions', 'wpmudev_vids' ),\r\n\t\t\t\t'loading' => __( 'Loading...', 'wpmudev_vids' ),\r\n\t\t\t\t'remove_from_playlist' => __( 'Remove video from playlist', 'wpmudev_vids' ),\r\n\t\t\t),\r\n\t\t\t'buttons' => array(\r\n\t\t\t\t'add_playlist' => __( 'Add Playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'create_playlist' => __( 'Create Playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'creating_playlist' => __( 'Creating Playlist', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_actions' => __( 'Open playlist actions', 'wpmudev_vids' ),\r\n\t\t\t\t'add_videos' => __( 'Add videos', 'wpmudev_vids' ),\r\n\t\t\t\t'visibility_settings' => __( 'Visibility settings', 'wpmudev_vids' ),\r\n\t\t\t\t'copy_shortcode' => __( 'Copy shortcode', 'wpmudev_vids' ),\r\n\t\t\t\t'add_video' => __( 'Add Video', 'wpmudev_vids' ),\r\n\t\t\t\t'adding_videos' => __( 'Adding Videos', 'wpmudev_vids' ),\r\n\t\t\t),\r\n\t\t\t'descriptions' => array(\r\n\t\t\t\t/* translators: %s: Count of videos. */\r\n\t\t\t\t'delete_playlist' => __( 'This playlist contains %d video(s). These videos will be unassigned from this playlist. Are you sure you want to delete this playlist?', 'wpmudev_vids' ),\r\n\t\t\t\t'playlists' => __( 'Playlists are groups of similar videos you can embed around WordPress for your clients to watch when needed. Add your first playlist by clicking the button below.', 'wpmudev_vids' ),\r\n\t\t\t\t'visibility_settings' => __( 'Control which user roles are able to see this playlist, in addition to where it will be displayed as an available WordPress widget', 'wpmudev_vids' ),\r\n\t\t\t\t'permissions' => __( 'Choose which user roles will be able to view this playlist.', 'wpmudev_vids' ),\r\n\t\t\t\t'location' => __( 'Choose which default locations will show this video playlist to the user roles selected above.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_title' => __( 'Give a title to your playlist.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_desc' => __( 'You can add description to your playlist.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_thumbnail' => __( 'Add a custom thumbnail to your playlist, otherwise we\\'ll just use the first video\\'s thumbnail.', 'wpmudev_vids' ),\r\n\t\t\t\t'create_playlist' => __( 'Choose a title, description and custom thumbnail for your playlist and then start adding videos to it.', 'wpmudev_vids' ),\r\n\t\t\t\t'select_videos' => __( 'Choose which videos you want to assign to this playlist. You can add as many as you like.', 'wpmudev_vids' ),\r\n\t\t\t\t'no_videos' => __( 'No videos assigned.', 'wpmudev_vids' ),\r\n\t\t\t),\r\n\t\t\t'notices' => array(\r\n\t\t\t\t'playlist_created' => __( 'Playlist created successfully.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_create_failed' => __( 'Could not create the playlist. Please try again.', 'wpmudev_vids' ),\r\n\t\t\t\t/* translators: %s: Playlist title. */\r\n\t\t\t\t'playlist_updated' => __( 'Playlist “%s” updated successfully.', 'wpmudev_vids' ),\r\n\t\t\t\t/* translators: %s: Playlist title. */\r\n\t\t\t\t'playlist_update_failed' => __( 'Updating playlist “%s” failed..', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_deleted' => __( 'Playlist deleted successfully.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_settings_updated' => __( 'Playlist settings updated successfully.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_settings_update_failed' => __( 'Playlist settings update failed.', 'wpmudev_vids' ),\r\n\t\t\t\t/* translators: %s: Link to the videos page. */\r\n\t\t\t\t'default_videos_not_available' => __( 'You don\\'t have any custom videos available to add to this playlist. To unlock WPMU DEV tutorial videos you\\'ll need to renew your membership. Note: You can still <a href=\"%s\">create and add custom videos</a> to this playlist.', 'wpmudev_vids' ),\r\n\t\t\t\t'get_access' => __( 'You don\\'t have any custom videos available to add to this playlist. You can unlock WPMU DEV white-labeled video tutorials by activating a full membership. Click the button below for more information on the WPMU DEV pricing structure.', 'wpmudev_vids' ),\r\n\t\t\t\t'install_plugin' => __( 'WPMU DEV videos are locked, and you only have access to custom videos because the WPMU DEV Dashboard plugin is not installed. Install and log into the WPMU DEV dashboard plugin to unlock the complete library of WPMU DEV video tutorials.', 'wpmudev_vids' ),\r\n\t\t\t\t'login_plugin' => __( 'WPMU DEV videos are locked, and you only have access to custom videos because you haven\\'t logged into the WPMU DEV Dashboard plugin. Log into the WPMU DEV dashboard plugin to unlock the complete library of WPMU DEV video tutorials.', 'wpmudev_vids' ),\r\n\t\t\t\t'activate_plugin' => __( 'WPMU DEV videos are locked, and you only have access to custom videos because the WPMU DEV Dashboard plugin is not active. Activate the WPMU DEV dashboard plugin to unlock the complete library of WPMU DEV video tutorials.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_videos_updated' => __( 'Playlist videos updated successfully.', 'wpmudev_vids' ),\r\n\t\t\t\t/* translators: %s: Link to the videos page. */\r\n\t\t\t\t'create_custom_videos' => __( '<strong>Note:</strong> You can still <a href=\"%s\">create and add custom videos</a> to this playlist.', 'wpmudev_vids' ),\r\n\t\t\t\t'playlist_videos_update_failed' => __( 'Could not update the playlist videos. Please try again.', 'wpmudev_vids' ),\r\n\t\t\t\t/* translators: %s: Link to the settings page. */\r\n\t\t\t\t'enable_contextual_help' => __( 'To configure locations for this playlist, please enable the <a href=\"%s\">Add Videos to Contextual Help</a> feature on the Settings page.', 'wpmudev_vids' ),\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "138b58f8d7f04c0952efee9c7e73ddf6", "score": "0.46153992", "text": "function Find($type,$string) {\n\t\tif ( $this->debugging ) echo \"mpd->Find()\\n\";\n\t\tif ( $type != MPD_SEARCH_ARTIST and\n\t $type != MPD_SEARCH_ALBUM and\n\t\t\t $type != MPD_SEARCH_TITLE ) {\n\t\t\t$this->errStr = \"mpd->Find(): invalid find type\";\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\tif ( is_null($resp = $this->SendCommand(MPD_CMD_FIND,$type,$string)))\treturn NULL;\n\t\t\t$searchlist = $this->_parseFileListResponse($resp);\n\t\t}\n\t\tif ( $this->debugging ) echo \"mpd->Find() / return \".print_r($searchlist).\"\\n\";\n\t\treturn $searchlist;\n\t}", "title": "" }, { "docid": "e114f32bb304976eb0b951752dad037b", "score": "0.45903897", "text": "function Search($type,$string) {\n\t\taddLog(\"mpd->Search()\");\n\t\tif ( $type != MPD_SEARCH_ARTIST and\n\t $type != MPD_SEARCH_ALBUM and\n\t $type != MPD_SEARCH_ANY and\n\t\t\t $type != MPD_SEARCH_TITLE ) {\n\t\t\taddErr( \"mpd->Search(): invalid search type\" );\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\tif ( is_null($resp = $this->SendCommand(MPD_CMD_SEARCH,$type,$string)))\treturn NULL;\n\t\t\t$searchlist = $this->_parseFileListResponse($resp);\n\t\t}\n\t\taddLog( \"mpd->Search() / return \".print_r($searchlist,true) );\n\t\treturn $searchlist;\n\t}", "title": "" }, { "docid": "e9c9d1625064bd67ca60258b321c2811", "score": "0.45818186", "text": "public function getXsiTypeName() {\n return \"PauseLineItems\";\n }", "title": "" }, { "docid": "39aac42e595482750fe091cf2d509795", "score": "0.4579051", "text": "function playlist_query($plname) {\n\t\n\t$plquery = 'https://www.googleapis.com/youtube/v3/playlistItems?'\n\t. 'part=contentDetails&'\n\t. 'maxResults=50&'\n\t. 'playlistId=' . $plname . '&'\n\t. 'fields=items%2FcontentDetails&'\n\t. 'key=AIzaSyArTyW_uUWZ2ZGSXSvsbk1qWJuT9Z9Cs_I';\n\t\n\treturn $plquery;\n}", "title": "" }, { "docid": "043235291a36d6cb282171734c0b32d2", "score": "0.45781514", "text": "public function getItemType()\n {\n return $this->item_type;\n }", "title": "" }, { "docid": "b27fd3d5ec0517b0a05c1c784d1ab680", "score": "0.4577898", "text": "public function getInputType()\r\n {\r\n $type = (boolean)$this->config->get('multiplicity', 1);\r\n if (!$type) {\r\n return 'radio';\r\n }\r\n\r\n return 'checkbox';\r\n }", "title": "" }, { "docid": "d5c21e5ed581d5fca9865026c6425288", "score": "0.45775026", "text": "function nfkpl_getGameType($code)\n\t{\n\t\tswitch($code)\n\t\t{\n\t\t\tcase \"0\":\n\t\t\t\treturn \"DM\";\n\t\t\t\tbreak;\n\t\t\tcase \"1\":\n\t\t\t\treturn \"PRAC\";\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\treturn \"TDM\";\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\treturn \"CTF\";\n\t\t\t\tbreak;\n\t\t\tcase \"4\":\n\t\t\t\treturn \"RAIL\";\n\t\t\t\tbreak;\n\t\t\tcase \"5\":\n\t\t\t\treturn \"DOM\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"6\":\n\t\t\t\treturn \"PRAC\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"7\":\n\t\t\t\treturn \"DOM\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn \"Unknown\";\n\t\t}\n\t}", "title": "" }, { "docid": "0770bd312704a46128953149485acc3b", "score": "0.4576641", "text": "function ibio_playlist_items($playlist, $connected_type = 'playlist_to_talks', $audience = null, $orderby = 'date')\n{\n\n $args = array(\n 'post_type' => 'ibiology_talk',\n 'connected_type' => $connected_type,\n 'connected_items' => $playlist,\n 'post_status' => 'publish',\n 'nopaging' => true,\n 'orderby' => 'date'\n );\n\n\n if (!empty($audience)) {\n $audience_query = array(\n 'taxonomy' => 'audience',\n 'field' => 'slug',\n 'terms' => $audience\n );\n\n $args['tax_query'] = array($audience_query);\n }\n\n\n $items = new WP_Query($args);\n\n // loop through to get the item order.\n\n foreach ($items->posts as $t) {\n $playlist_order = p2p_get_meta($t->p2p_id, 'order', true);\n $t->menu_order = intval($playlist_order);\n }\n\n usort($items->posts, 'ibio_compare_playlist_posts');\n\n wp_reset_query();\n\n return $items;\n}", "title": "" }, { "docid": "b4d306e59d6bc23c43ee31dbe3072091", "score": "0.4575852", "text": "public function getMeta()\n {\n if (self::pollStream() === \\TRUE) {\n $this->meta = [\n 'status' => 'on',\n 'playing' => (string)$this->nowPlaying,\n 'dj' => (string)$this->dj,\n 'listeners' => (int)$this->currentListeners,\n 'peak' => (int)$this->peakListeners,\n 'desc' => (string)$this->description,\n 'genre' => (string)$this->genre\n ];\n } else {\n $this->meta = ['status' => 'off'];\n }\n return $this->meta;\n }", "title": "" }, { "docid": "ca70726fe888a59a11ecddf7f7fdc99f", "score": "0.45662057", "text": "public function getTheMimeTypeOfThisSoundFormat($sound_format){\n \n if($sound_format == strtolower('mp3')){\n return 'audio/mpeg3';\n }else if($sound_format == strtolower('mp3')){\n return 'audio/x-mpeg-3';\n }else if($sound_format == strtolower('aac')){\n return 'audio/aac';\n }else if($sound_format == strtolower('3gp')){\n return 'audio/3gpp';\n }else if($sound_format == strtolower('aiff')){\n return 'audio/aiff';\n }else if($sound_format == strtolower('aiff')){\n return 'audio/x-aiff';\n }else if($sound_format == strtolower('gsm')){\n return 'audio/x-gsm';\n }else if($sound_format == strtolower('wma')){\n return 'audio/x-ms-wma';\n }else if($sound_format == strtolower('webm')){\n return 'audio/webm';\n }else { \n return 0;\n }\n }", "title": "" }, { "docid": "51b47aec404c4c7ec6819678004ab074", "score": "0.4552426", "text": "public function testCreatePlaylist()\n {\n\n }", "title": "" }, { "docid": "766a27ef2ceb44072163415847d781e9", "score": "0.45466402", "text": "public function getMtype()\r\n {\r\n \treturn $this->_mtype;\r\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "b3402eab0e6e7fcae87ea6d302ba7755", "score": "0.6850561", "text": "public function DELETE() {\r\n // delete the cached resource, if it exists\r\n if ($this->HEAD($this->getURI())) {\r\n // load the resource, then delete it\r\n $this->bind($this->getStorage()->delete($this->getURI()));\r\n // mark changed\r\n $this->changed();\r\n }\r\n // return\r\n return $this->resource;\r\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "927318d3938d4582d26e3e1b37ebd064", "score": "0.64233065", "text": "public function delete($storagePath);", "title": "" }, { "docid": "0fde60a4a832f83bd9545fcf3a9f0ab4", "score": "0.63617754", "text": "abstract protected function destroyResource();", "title": "" }, { "docid": "faba92f0be7607f0097b4e53a426fedc", "score": "0.6179998", "text": "public function removeStorage($id) {\n\t\t$allStorages = $this->readConfig();\n\n\t\tif (!isset($allStorages[$id])) {\n\t\t\tthrow new NotFoundException('Storage with id \"' . $id . '\" not found');\n\t\t}\n\n\t\t$deletedStorage = $allStorages[$id];\n\t\tunset($allStorages[$id]);\n\n\t\t$this->writeConfig($allStorages);\n\n\t\t$this->triggerHooks($deletedStorage, Filesystem::signal_delete_mount);\n\n\t\t// delete oc_storages entries and oc_filecache\n\t\ttry {\n\t\t\t$rustyStorageId = $this->getRustyStorageIdFromConfig($deletedStorage);\n\t\t\t\\OC\\Files\\Cache\\Storage::remove($rustyStorageId);\n\t\t} catch (\\Exception $e) {\n\t\t\t// can happen either for invalid configs where the storage could not\n\t\t\t// be instantiated or whenever $user vars where used, in which case\n\t\t\t// the storage id could not be computed\n\t\t\t\\OCP\\Util::writeLog(\n\t\t\t\t'files_external_moe',\n\t\t\t\t'Exception: \"' . $e->getMessage() . '\"',\n\t\t\t\t\\OCP\\Util::ERROR\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "6a08f90e572a14a3c01e60869b338dc1", "score": "0.6066186", "text": "public function destroy(Resource $resource)\n {\n //\n $this->authorize('delete', $resource);\n \n //\n $resource->delete();\n \n if(request()->wantsJson()) {\n return response([], 204);\n }\n \n return redirect('/resources');\n }", "title": "" }, { "docid": "15547d48f16617b6e604a8cc0f0c7ff3", "score": "0.6064962", "text": "public function deleteresource() {\n $objectType = $this->uri->segment(4);\n $objectId = $this->uri->segment(5);\n $fieldName = $this->uri->segment(6);\n $fileId = $this->uri->segment(7);\n CmsService::instance()->unsetFileFromObject($objectType, $objectId, $fieldName, $fileId);\n redirect(getEditActionForType($objectType, $objectId));\n }", "title": "" }, { "docid": "9162d9ba896538427a8e1773f7d8e162", "score": "0.60375607", "text": "public function destroy(Resource $resource)\n { \n $resource->delete();\n return redirect()->route('admin.resources.index')\n ->with('success', \"Ресурс удален!\");\n }", "title": "" }, { "docid": "3ff3eb4c888091d51777732571bf9ca6", "score": "0.60349095", "text": "public function delete()\n\t{\n\t\t$this->data = null;\n\n\t\t$this->app['files']->delete($this->path);\n\t}", "title": "" }, { "docid": "1a074782e571df2a192ef1524212c70b", "score": "0.598511", "text": "public function destroy($id)\n {\n $file = Image::whereId($id)->first();\n // dd($file->path);\n if($file) {\n Storage::delete('public/' . $file->path);\n $file->delete();\n }\n }", "title": "" }, { "docid": "0970be01760e0e449ee46eafae6afae6", "score": "0.5966808", "text": "function removeStorage (Storage $storage) {\n\t\t$storages = new ArrayObject(array(), ArrayObject::STD_PROP_LIST);\n\t\tforeach($this->storages as $st) {\n\t\t\tif ($st !== $storage) {\n\t\t\t\t$storages[] = $st;\n\t\t\t}\n\t\t}\n\t\t$this->storages = $storages;\n\t}", "title": "" }, { "docid": "f3905bdbcab5c96ef9e916065a987c60", "score": "0.59465545", "text": "public function remove() {\n\t\t$this->removeImage();\n\t\t$this->delete();\n\t}", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "0698cf26bce52e43c195f1fad0967e6d", "score": "0.5913288", "text": "public function delete() {\n $this->fs->delete($this);\n }", "title": "" }, { "docid": "4fb02ae20521d64ccdc1eac1271f8260", "score": "0.590333", "text": "public function delete()\n {\n \\File::delete([\n storage_path() . '/' . $this->path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "1a2c14d0b44aa237e13ac45586b67eba", "score": "0.59004754", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $resources = $this->resourceRepository->findSimilarResources($resource);\n if (count($resources) > 1) {\n $message = sprintf('Did not unpublish resource %s with SHA1 hash %s because it is used by other Resource objects.', $resource->getFilename(), $resource->getSha1());\n $this->messageCollector->append($message, Error::SEVERITY_NOTICE);\n return;\n }\n $this->unpublishFile($this->getRelativePublicationPathAndFilename($resource));\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": "0d73bf0782eda25b96970857b212cfff", "score": "0.5886981", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void;", "title": "" }, { "docid": "79ce20b0e69714bb06975a21a79e987f", "score": "0.5854394", "text": "public function destroy(int $id)\n {\n $copy = $this->findById($id);\n\n app('db')->transaction(function () use ($copy) {\n $this->repository->destroy($copy->id);\n\n // Physically remove file from storage\n if (file_exists($copy->getFullLocalPath()) && unlink($copy->getFullLocalPath()) === false) {\n throw new FailedToRemoveFromStorageException('Failed to remove the file from storage');\n }\n });\n\n return $copy;\n }", "title": "" }, { "docid": "2ef703b87d6f9b65ea849ba60a25d1f1", "score": "0.5847894", "text": "public function deleteResource($path) {\n\t\t$url = $this->restUrl . '/resource' . $path;\n\t\t$result = $this->prepAndSend($url, array(200), 'DELETE');\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f89b6fc617f359aa945932d418c3c622", "score": "0.58316517", "text": "public function destroy(ResourceFile $resourceFile)\n {\n //\n }", "title": "" }, { "docid": "28bcd6f8e6860de51cbfe673db10e4a5", "score": "0.58216614", "text": "public function addResourceToDelete(ResourceReference $resource)\r\n {\r\n $this->resourcesToDelete[] = $resource;\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "d1335db4dedf75baf1e49487a53c90ce", "score": "0.5774422", "text": "public function remove(string $path);", "title": "" }, { "docid": "2536f3c707dfeb6706a820453b721bc6", "score": "0.57129586", "text": "public function destroy($id)\n {\n $serie=Serie::find($id);\n //delete related file from storage\n $serie->delete();\n return redirect()->route('series.index');\n }", "title": "" }, { "docid": "594986c2072c40bbbef41829c66f5e39", "score": "0.56989014", "text": "public function destroy($id)\n {\n $item = slider::findOrFail($id);\n unlink('storage/' . $item->picture);\n $item->delete();\n\n return redirect()->route('slider');\n }", "title": "" }, { "docid": "74e6c0a4ecd0e1ac5045775357fa48b9", "score": "0.5696829", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n $resource->delete();\n return redirect(back());//cambiar\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "40574d2596130d06f5fe2ee4ceccb66b", "score": "0.5674429", "text": "public function removeObject(StoredInterface $object);", "title": "" }, { "docid": "b2d81a752b54a0616aa754491d87cfb0", "score": "0.5658517", "text": "public function destroy($id)\n {\n $data = Article::find($id);\n \n $fileName = $data->image;\n Storage::delete($fileName);\n $data->delete();\n return redirect()->route('article.index');\n }", "title": "" }, { "docid": "b00ceccc5abdc295d4f38a54fc3ef687", "score": "0.5655932", "text": "public function destroy(Request $request)\n {\n $request->validate([\n 'path' => 'required|string'\n ]);\n\n if (Storage::exists($request->path)) {\n Storage::delete($request->path);\n }\n }", "title": "" }, { "docid": "5a70b194bf3f4758be24fd2d2e8969b5", "score": "0.56523496", "text": "public function destroy($id)\n {\n $upload = Upload::findOrFail($id);\n Storage::delete($upload->location);\n $upload->delete();\n }", "title": "" }, { "docid": "f836dfbf25c901118ec1aef1ddf8d708", "score": "0.56470925", "text": "public function destroy($id)\n\t{\n\t\t$res = Resource::find($id);\n\t\t$res->delete();\n\n\t\tSession::flash('success', '删除资源成功');\n\t\treturn redirect()->route('admin.resource.index');\n\t}", "title": "" }, { "docid": "786a12a689855596655493143a37b27e", "score": "0.5645049", "text": "public function unlink(string $path)\n {\n return Storage::delete($path);\n }", "title": "" }, { "docid": "475d22992dbf16ddbbde7e840f8642e6", "score": "0.56246966", "text": "public function remove() { }", "title": "" }, { "docid": "645b206cb0ef45a3942664a6e15fcf5b", "score": "0.56037223", "text": "public function delete($resource, array $conditions);", "title": "" }, { "docid": "c94904da66f47b4ed4ee2a440f4f4028", "score": "0.55946094", "text": "public function remove_bookable_resource() {\n\t\tcheck_ajax_referer( 'delete-bookable-resource', 'security' );\n\n\t\t$post_id = absint( $_POST['post_id'] );\n\t\t$resource_id = absint( $_POST['resource_id'] );\n\t\t$product = get_wc_product_booking( $post_id );\n\t\t$resource_ids = $product->get_resource_ids();\n\t\t$resource_ids = array_diff( $resource_ids, array( $resource_id ) );\n\t\t$product->set_resource_ids( $resource_ids );\n\t\t$product->save();\n\t\tdie();\n\t}", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "9065fbf2778793732e085d8f00072e64", "score": "0.5579296", "text": "public function destroy($id)\n {\n $file=students_file::find($id);\n unlink(public_path($file->file_path.\"/\".$file->file_name));\n students_file::destroy($id);\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "6dbd2a82e80175a2ecec0fb020266770", "score": "0.5577625", "text": "public function destroy($id)\n {\n //\n $filename = File::where('id',$id)->pluck('name')->toArray(); \n $image_path = 'uploads/'.$filename[0];\n unlink($image_path); \n $file = File::destroy($id);\n return Response::json($file);\n }", "title": "" }, { "docid": "1d0074fade303d75155eb2ad3252af0f", "score": "0.55738467", "text": "public function _unlink($resource, $exp_time = null)\n {\n if (isset($exp_time)) {\n if (time() - @filemtime($resource) >= $exp_time) {\n return @unlink($resource);\n }\n } else {\n return @unlink($resource);\n }\n }", "title": "" }, { "docid": "aea09d85d9c53e815b918c3f257179a1", "score": "0.5571349", "text": "function remove_object($location_id, $filename) {\n $location = $this->get_location($location_id);\n\n if ($s3 = $this->s3_bucket_factory($location)) {\n $target = $this->s3_compute_bucket_name_and_uri($location, $filename);\n return $s3->deleteObject($target['bucket_name'], $target['uri']);\n }\n\n }", "title": "" }, { "docid": "3f0c158bd398730260750b138d392138", "score": "0.5568787", "text": "public function destroy($id)\n\t{\n\n $image = Image::find($id);\n $image->delete();\n\n\t}", "title": "" }, { "docid": "60b0d79f549613bd513e106a06d9bcf1", "score": "0.555708", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name==='file') {\n $this->resources['file'] = array('class'=>'Dwoo_Template_File', 'compiler'=>null);\n }\n }", "title": "" }, { "docid": "d607312000ff1629a7d194da09363f78", "score": "0.55405146", "text": "public function __invoke(Asset $asset): void\n {\n $this->authorize('delete', $asset);\n\n $asset->unlink();\n\n abort(Response::HTTP_NO_CONTENT);\n }", "title": "" }, { "docid": "71db8be3bb0bf671c5cd2c4be28e45ae", "score": "0.55401355", "text": "public function delete($resource, array $options = [])\n {\n return $this->api('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "a1412b0535ee0309739c031f67bf249e", "score": "0.55388325", "text": "public function unlink() {\r\n\t\t\r\n\t\tif(!empty($this->path)) unlink($this->path);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6a9b08fae5306520b3efd6f2532b1bca", "score": "0.553763", "text": "public function destroy($id)\n {\n $find = Product::find($id);\n $photo = $find->product_image;\n\n if($photo){\n unlink($photo);\n $delete = Product::where('id',$id)->delete();\n }else{\n $delete = Product::where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "306e91148ba7988dd22824148b9d4401", "score": "0.55344576", "text": "public function destroy($id)\n {\n $previousImage = Article::find($id)->image;\n Storage::delete('images/'.$previousImage);\n unlink(public_path('storage/images/'.$previousImage));\n\n $article=Article::where('article2_id',$id)->delete();\n if($article){\n return Redirect::to('/');\n }\n\n\n }", "title": "" }, { "docid": "103f82f6cdde92b309955b018f86aa59", "score": "0.5534417", "text": "public function delete($resource, array $headers = array())\n {\n return $this->sendRequest($resource, 'DELETE', array(), $headers);\n }", "title": "" }, { "docid": "0e38bf52f188fa4c9103fccdd3cd72a7", "score": "0.5527166", "text": "public function delete($resource, $resourceId = null)\n {\n $resourcePath = \"/$resource\";\n\n $resourceIdPath = (isset($resourceId)) ? \"/$resourceId\" : \"\";\n\n $relationshipsPath = \"\";\n if (isset($resource['relationship'])) {\n $relationshipsPath = \"/relationships/{$resource['relationship']}\";\n }\n\n $uri = \"{$resourcePath}{$resourceIdPath}{$relationshipsPath}\";\n $res = $this->request(\"DELETE\", $uri);\n return $res->getBody();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "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": "a50d19c729bcd0ecae4f0c64627ba229", "score": "0.552693", "text": "public function delete() {\n $filename = self::getFilename($this->key);\n \n \tif (is_file($filename)) {\n \t\tunlink($filename);\n \t}\n \tunset(self::$members[$this->key]);\n }", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "1ae9665ebaf1561d52881b50b774ab80", "score": "0.55193347", "text": "private function eliminarArchivoLocal($ruta){\n \\Storage::delete($ruta);\n }", "title": "" }, { "docid": "c67d90f9a81cb44bc5cd1369d206c5db", "score": "0.55190516", "text": "public function delete()\n {\n parent::delete();\n\n if (Arr::get($this->diskOptions, 'cleanup') && $pointer = $this->resolvePointer()) {\n $this->resolveDisk()->delete($pointer);\n }\n }", "title": "" }, { "docid": "d47025184711b99fdfa1771fa94c618f", "score": "0.55053926", "text": "public function destroy($id)\n {\n // dd($id);\n $del = File::find($id);\n Storage::delete($del->path);\n $del->delete();\n\n return redirect('/file')->with('success', 'Foto Berhasil Dihapus');\n }", "title": "" }, { "docid": "dd9001e86e2eb451896dd8ecbc002381", "score": "0.5503835", "text": "public function destroy($id)\n {\n $slider = Slider::where('id',$id)->first()->delete();\n unlink(public_path('back/images/slider/'.$slider->image));\n return redirect()->back()->with('success','Slider has been deleted successfully.');\n }", "title": "" }, { "docid": "0cb0536ff08f2e6e88e57744bc820000", "score": "0.55017096", "text": "public function removeUpload()\n {\n if($file = $this->getAbsolutePath())\n {\n unlink($file);\n }\n }", "title": "" }, { "docid": "b655cddc3659b7f9fcba7a39d960e97e", "score": "0.5498977", "text": "public function destroy( $id ) {\n\t\t$file = $this->getFile( $id );\n\t\tif ( $file->exists() ) {\n\t\t\t$file->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "5a6876b5136ed6a1bc2b6449e6e1d452", "score": "0.54987067", "text": "public function free()\r\n {\r\n if ($this->check()) {\r\n if ($this->enabled) {\r\n $this->remove();\r\n }\r\n\r\n event_free($this->resource);\r\n $this->resource = null;\r\n }\r\n }", "title": "" }, { "docid": "41a09fcd3175ce9019613caec36a1001", "score": "0.54935354", "text": "public function deleteAction(Request $request, Resource $resource)\n {\n $form = $this->createDeleteForm($resource);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($resource);\n $em->flush();\n $request->getSession()->getFlashBag()->add( 'danger', 'resource.delete.flash' );\n }\n\n return $this->redirect($request->headers->get('referer'));\n }", "title": "" }, { "docid": "6ca167089eb695c6ef41cc95554f73ea", "score": "0.54930675", "text": "function deleteResource()\n {\n ///////////////////\n include_once(\"../Config/database.php\");\n $db = new DATABASE_CONFIG();\n $db_object = (object) $db;\n $db_array = $db_object->{'default'};\n $response['db_info'] = $db_array['host'];\n $mysqli = new mysqli($db_array['host'], $db_array['login'], $db_array['password'], $db_array['database']);\n\n if ($mysqli->connect_error) {\n die('Connect Error (' . $mysqli->connect_errno . ') '\n . $mysqli->connect_error);\n }\n //Delete the resource with the id\n $sql = $mysqli->prepare(\"DELETE FROM collections\n WHERE collections.id = ?\");\n $sql->bind_param(\"s\", $_POST['id']);\n $sql->execute();\n $result = $sql->get_result();\n // $result = $mysqli->query($sql);\n //while($row = mysqli_fetch_assoc($result))\n //$collections[] = $row;\n $results['id'] = $_POST['id'];\n $results['sql'] = $sql;\n $results['result'] = $result;\n $this->json(200, $results);\n }", "title": "" }, { "docid": "4c0f515601b2c4f626f4641a8eba9243", "score": "0.5490852", "text": "public function destroy($id)\n {\n $gallery = Gallery::findOrFail($id);\n\n\n $path = storage_path('app\\images\\\\'.$gallery->nom_image);\n\n // dd($path);\n\n $real_path = Storage::delete($path);\n\n // dd($real_path);\n\n $gallery->delete();\n\n return redirect()->back()->with(['message'=>'image supprimée', 'class'=>'alert-danger']);\n }", "title": "" }, { "docid": "64230229b26e85085a8e553e0f231391", "score": "0.5488363", "text": "public function remove($key)\n {\n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5484861", "text": "public function destroy($id);", "title": "" }, { "docid": "d42b7a0376cce8423fa6db882ff0f69d", "score": "0.5483016", "text": "public function remove(string $id);", "title": "" } ]
64ee612fcf3a82dad826f0ba2bf32bf0
returns first and abbreviated last name of user.
[ { "docid": "6a733e49ec7f97bbfd878ddb950a41ca", "score": "0.0", "text": "function getNameAbbr(){\n return utils::htmlEncode($this->getCustomValue('first_name')\n \t.' '.substr($this->getCustomValue('last_name'), 0, 1).'.');\n }", "title": "" } ]
[ { "docid": "c927951d5eeb1aab79ad91073aa44a08", "score": "0.82412624", "text": "public function woo_slg_get_user_last_name() {\n $this->woo_slg_get_user_details();\n if (!$this->user)\n return false;\n return apply_filters('woo_slg_get_user_last_name', $this->user->getLastName());\n }", "title": "" }, { "docid": "bee761ec18493b71f49c4db928457faa", "score": "0.82243377", "text": "function get_user_lastname($user_id) {\n\t\t\treturn get_user_meta( $user_id, 'last_name', true );\n\t}", "title": "" }, { "docid": "084d8e964fb1f2a49019393116b3df97", "score": "0.81570286", "text": "public function getUser_lastname()\n {\n return $this->user_lastname;\n }", "title": "" }, { "docid": "39da9e99b64564526f90e1611bd8db0e", "score": "0.7909989", "text": "public function getUsers_lastname()\n {\n return $this->users_lastname;\n }", "title": "" }, { "docid": "96f560ffcf89e9dda43509d7314e6585", "score": "0.77771777", "text": "public function get_last_name() {\n\t\treturn $this->last_name;\n\t}", "title": "" }, { "docid": "c8ef94653ca268052db0479ff468a32b", "score": "0.7775127", "text": "public function getLastName();", "title": "" }, { "docid": "c8ef94653ca268052db0479ff468a32b", "score": "0.7775127", "text": "public function getLastName();", "title": "" }, { "docid": "c8ef94653ca268052db0479ff468a32b", "score": "0.7775127", "text": "public function getLastName();", "title": "" }, { "docid": "98d767ec5dab7c08a007a0ae81f6e5cf", "score": "0.7775085", "text": "public function get_last_name()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "9546232f2a0cd410c48b1fe204462830", "score": "0.7722768", "text": "public function getLongName()\n {\n $cert = $this->getCertification()->abbreviation ? $this->getCertification()->abbreviation : \"N/A\";\n $name = $this->user->last_name . \", \" . $this->user->first_name . \" - \" . $cert . \": \" . $this->getGraduationDate()->format(\"m/Y\");\n\n return $name;\n }", "title": "" }, { "docid": "4c1ae6142b7c3d052bf5b255346e5e5c", "score": "0.76766783", "text": "public function getUserLastname() {\n $token_param = $this->getAccessTokenParams();\n $token = $this->getAccessToken($token_param);\n $user_email = $token['user_name'];\n\n $qry = \"SELECT last_name FROM users WHERE email='\" . $user_email . \"'\";\n $qry_result = mysql_query($qry);\n \n $user = mysql_fetch_assoc($qry_result);\n return $user['last_name'];\n }", "title": "" }, { "docid": "d4b9d5e630304b605d750630d32691bd", "score": "0.7649214", "text": "public function getLastname()\n {\n return $this->getValue('lastname');\n }", "title": "" }, { "docid": "a5e5160b204a63a4827e5e35c0aa3d36", "score": "0.76404643", "text": "function get_last_name() {\n return $this->last_name;\n }", "title": "" }, { "docid": "efbcf26b4ec0f1180ee1d3472a187c63", "score": "0.76388586", "text": "public function getLastName(): string;", "title": "" }, { "docid": "bd92ee6576a66d38ec87130713ed4300", "score": "0.7634239", "text": "public function getLast_name()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "bd92ee6576a66d38ec87130713ed4300", "score": "0.7634239", "text": "public function getLast_name()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "bd92ee6576a66d38ec87130713ed4300", "score": "0.7634239", "text": "public function getLast_name()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "bd92ee6576a66d38ec87130713ed4300", "score": "0.7634239", "text": "public function getLast_name()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "348f47efd672006553631d4860498444", "score": "0.7560972", "text": "function fullname_user(){\n\t$user=current_user();\n\treturn $user->first_name.$user->last_name;\n}", "title": "" }, { "docid": "38f19656eeb170700ad19e3c4f5e7924", "score": "0.7550274", "text": "function get_display_name() {\n\n if (auth()->check()) {\n $user = user();\n\n if ($user->first_name === null) {\n return $user->user_name;\n }\n\n return $user->first_name . ' ' . $user->last_name;\n }\n\n return '';\n }", "title": "" }, { "docid": "c611a05aaadb9890626e4e1eb7bdfbd6", "score": "0.7538305", "text": "public function getLastname(): string\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "75ab4e3a3a64f82abfdf2b8a83f40785", "score": "0.75139135", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "af7da4fa7f490e5c5bd9de9924279a99", "score": "0.7506722", "text": "public function getCurrentUserFullName()\n {\n $user = Sentry::getUser();\n\n $fullName = sprintf('%s %s', $user->first_name, $user->last_name);\n\n return $fullName;\n }", "title": "" }, { "docid": "18b4b52e4b9e98874fd8b73addbe1b76", "score": "0.75035304", "text": "public function getLastName() : string\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "5f56633274fc745238b20ae0a13f75ca", "score": "0.7501034", "text": "public function getLastName()\n {\n return $this->last_name;\n }", "title": "" }, { "docid": "e85b277b567de062418177e5c084742d", "score": "0.7493896", "text": "public function getLast_name()\r\n {\r\n return $this->last_name;\r\n }", "title": "" }, { "docid": "c52b9fc5e00066d63ee1e12ef3376c3e", "score": "0.7447968", "text": "public function lastName();", "title": "" }, { "docid": "99cbd378d26adf79357419b60dde4ae2", "score": "0.7434936", "text": "public function getFirstAndLastName(){\n $query = mysqli_query($this->con, \"SELECT CONCAT(firstName, ' ', lastName) AS 'name' FROM users WHERE username='$this->username'\");\n $row = mysqli_fetch_array($query);\n return $row['name'];\n }", "title": "" }, { "docid": "c9076d1e4097562d514932c0058892e1", "score": "0.74258095", "text": "public function fullName()\n\t{\n\t\treturn $this->first_name . ' ' . $this->last_name;\n\t}", "title": "" }, { "docid": "a6ad481b883b5f5f9adc249ad411ec5e", "score": "0.7422162", "text": "public function getLastName()\n {\n\n return $this->last_name;\n }", "title": "" }, { "docid": "6dbed0388e921859a1152947f53c9de9", "score": "0.74084514", "text": "public function getProfileLastName(): string {\n\t\treturn ($this->profileLastName);\n\t}", "title": "" }, { "docid": "e6690f219f83853f84c88f499b5ce295", "score": "0.7377006", "text": "public function getLastName()\n {\n return $this->_get(self::LAST_NAME);\n }", "title": "" }, { "docid": "beae846074ca54bf9cace34ad9060ea5", "score": "0.7366248", "text": "public function getLastName(){\n\t\t\treturn $this->exists() ? $this->row['last_name'] : \"\";\n\t\t}", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "57eb10075a7659bd8d5e980d1288b9e3", "score": "0.73636293", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "89936f226598e5b5aa9a2a58a1064072", "score": "0.73458606", "text": "public function getDisplayName()\n {\n return trim(($this -> getFirstName() ?: '') . ' ' . ($this -> getLastName() ?: ''));\n }", "title": "" }, { "docid": "9e65fdbb4505afa97ec9ebe87048cbbd", "score": "0.7342888", "text": "public function getLastName() {\n return $this->row['lastName'];\n }", "title": "" }, { "docid": "6142766f811283926e346556b1ad2d01", "score": "0.7339476", "text": "public function getLastName()\n {\n return $this->get(self::LASTNAME);\n }", "title": "" }, { "docid": "0086576dca0bba583bcb72eb0fc78f0b", "score": "0.7319826", "text": "public function name(){\n if(func_num_args()==0)\n $user = $this;\n else\n $user = LAIKA_User::load(func_get_arg(0));\n return $user->firstname.\" \".$user->lastname;\n }", "title": "" }, { "docid": "15c95761e5a0e015119b7530cd2c8678", "score": "0.73184454", "text": "public function getLastName() {\n return $this->lastName;\n }", "title": "" }, { "docid": "26c8b0e5dd1d7cb2d361da46d5c138a9", "score": "0.73088145", "text": "function acp_select_reformat_username_to_fullname( $label, WP_User $user ) {\n\tif ( $user->first_name || $user->last_name ) {\n\t\t$label = trim( $user->first_name . ' ' . $user->last_name );\n\t}\n\n\treturn $label;\n}", "title": "" }, { "docid": "a3626195641ca478d98e3878bf182060", "score": "0.7295881", "text": "public function getUserLname()\n {\n\n return $this->user_lname;\n }", "title": "" }, { "docid": "baadfd8dfc5b91e9e5c89b9ace825df7", "score": "0.7289155", "text": "public function get_lastname()\n\t\t{\n\t\t\treturn $this->lastname;\n\t\t}", "title": "" }, { "docid": "bc7ad407b0c0062dfa5f413158b580c8", "score": "0.72798866", "text": "public function getLastName()\n {\n return $this->getData(self::LAST_NAME_KEY);\n }", "title": "" }, { "docid": "6070c9b4cee16128e3f5c9d315bb68c1", "score": "0.7279557", "text": "public function getLastName()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "58f11cafebb4447a3caf587015a6e7c0", "score": "0.7272123", "text": "public function lastName(): string\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "3a90fe331046fd3c416be4b46c465937", "score": "0.726597", "text": "public function getLastname()\n {\n return $this->_lastname;\n }", "title": "" }, { "docid": "9d38cbfd73e97fb32e30af273b108f18", "score": "0.7260956", "text": "public function getFirstLastName()\n {\n return $this->firstname . '&nbsp;' . $this->lastname;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f7c83fcca131232917fbec796673e062", "score": "0.72593164", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f38773f2f860b65c1280fd2c71da7f52", "score": "0.7236462", "text": "public function getLastName() {\n return $this->lastName;\n }", "title": "" }, { "docid": "fb3a46ed551a716f51b5eb41d3b93acc", "score": "0.7229312", "text": "public function getFullname() {\n $fullName = Yii::app()->db->createCommand()\n\t\t\t\t->select(['concat(first_name, \" \",middle_name, \" \",last_name) as value'])\n ->from('{{user}} u')//currently using the table \"arm_user\" but will use \"arm_users\" later\n ->where('u.id=:id', array(':id' => Yii::app()->user->id))\n ->queryScalar();\n return $fullName;\n }", "title": "" }, { "docid": "c7aecdd3fcd9c92f236fa93c028c540b", "score": "0.7193908", "text": "public function getLastname() : string\n\t{\n\t\treturn (string) $this->lastname;\n\t}", "title": "" }, { "docid": "1f93a6c890a6283218c4f16ea37b4e91", "score": "0.71889085", "text": "public function getLastName()\n\t{\n\t\treturn $this->lastName;\n\t}", "title": "" }, { "docid": "1f93a6c890a6283218c4f16ea37b4e91", "score": "0.71889085", "text": "public function getLastName()\n\t{\n\t\treturn $this->lastName;\n\t}", "title": "" }, { "docid": "2f8722bcc1c87033b8b56f095369161f", "score": "0.7185162", "text": "public function getLastName() {\n\t\treturn $this->lastName;\n\t}", "title": "" }, { "docid": "a15490a306cbde7d1acda5512cfecbae", "score": "0.7182359", "text": "public function getLastName()\n {\n return $this->getResponseData('last_name');\n }", "title": "" }, { "docid": "e5f18d5c11bd2c336c6df126919f1bec", "score": "0.71738636", "text": "public function getLastname()\n {\n return $this->lastname;\n }", "title": "" }, { "docid": "adc223dd0eb699e9f52a76decee53066", "score": "0.71611726", "text": "public function getFullName()\n {\n if ($this->firstname && $this->lastname) {\n return $this->firstname . \" \" . $this->lastname;\n } elseif ($this->firstname) {\n return $this->firstname;\n }\n return $this->email;\n }", "title": "" }, { "docid": "22ef7c77108ef712ce4cec694f3dc573", "score": "0.71602225", "text": "public function getLastName()\n {\n return $this->_lastName;\n }", "title": "" }, { "docid": "9e613d9028b8428f1912414a680d60ab", "score": "0.71473", "text": "public function getName(){\n return sprintf(\"%s,%s\", $this->ldapService->getLastName($this->username),\n $this->ldapService->getFirstName($this->username));\n }", "title": "" }, { "docid": "85e1d02c0752ec564df5f7c9e2c43711", "score": "0.7146861", "text": "public function getCustomerLastname()\n {\n return $this->session->getCustomerData()->getLastname();\n }", "title": "" }, { "docid": "9cdf5dd523a58191f16f1d9b4113050a", "score": "0.7142501", "text": "public function get_name() {\n\t\treturn sprintf( '%s %s', $this->first_name, $this->last_name );\n\t}", "title": "" }, { "docid": "0309ef9831623296164972b860bf71ed", "score": "0.71393335", "text": "public function fullName() {\n return \"{$this->first_name} {$this->last_name}\";\n }", "title": "" }, { "docid": "9c348cebe8ffcba29dcae6806cc8489b", "score": "0.71354485", "text": "public function getFullName() {\n return $this->getSanitizedValue('firstName') . ' ' . $this->getSanitizedValue('lastName');\n }", "title": "" }, { "docid": "0d98a2ec6e3b902cc36bc1a31556b607", "score": "0.71280235", "text": "public function name(){\n $user= $this->user;\n return $user['FirstName'] . ' ' . $user['LastName'];\n }", "title": "" }, { "docid": "645c98eeeae97d10f95893ea6d951bf6", "score": "0.7125646", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "67e205c722a7fb25784e61c3da80815d", "score": "0.7124389", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "90f6af73c4bbadd44c12b9e6b1bf1bf7", "score": "0.7121711", "text": "public function getLastName()\n {\n return $this->LastName;\n }", "title": "" }, { "docid": "46db12ee1f2a484a3a4f16fed457de37", "score": "0.7103947", "text": "public function getFullname()\n\t{\n\t\treturn $this->firstname.\" \".$this->lastname;\n\t}", "title": "" }, { "docid": "57ba88cd583e8cae8bb52f9f43dc6d14", "score": "0.7102226", "text": "public function fullname()\n {\n return trim($this->first_name . ' ' . $this->last_name);\n }", "title": "" }, { "docid": "7d44fadca01713a0f99825a1a5ea2f44", "score": "0.7101647", "text": "public function getLastName()\n {\n return $this->lastName;\n }", "title": "" }, { "docid": "f44896edc220a6cee29237285d648d34", "score": "0.7101044", "text": "public function full_name()\n {\n return $this->first_name.\" \".$this->last_name;\n }", "title": "" }, { "docid": "27f807285f939befdce24b73f5c98c20", "score": "0.7078411", "text": "public function getFullName(){\n\t\treturn ucfirst($this->getFirstname()).' '.ucfirst($this->getLastname());\n\t}", "title": "" }, { "docid": "293916b170df025a030389c8938ddb4b", "score": "0.7078279", "text": "public function getFullname(): string\n {\n return $this->firstname . ' ' . $this->lastname;\n }", "title": "" }, { "docid": "0dca2d126a82d61a32932b42df716598", "score": "0.70781225", "text": "public function getLastName() {\n\t\t\treturn $this->lastName;\n\t\t}", "title": "" }, { "docid": "f81f2efbebaa5a07b69cae932bf3dc33", "score": "0.7067915", "text": "public function getFullName() {\n $fullname = trim($this->first_name . ' ' . $this->last_name);\n return ( $fullname ? $fullname : $this->email );\n }", "title": "" }, { "docid": "97e65e2892592a15b80f8018a6ab99e5", "score": "0.70518404", "text": "public function getTributeLastName()\n\t{\n\t\treturn $this->tribute_last_name;\n\t}", "title": "" }, { "docid": "481086de9cd239ac3056c0e847a808cc", "score": "0.7046233", "text": "function get_user_name($id) {\r\n $name = null;\r\n\r\n $fname_hide_status = get_the_author_meta('hide_first_name', $id);\r\n $lname_hide_status = get_the_author_meta('hide_last_name', $id);\r\n\r\n if (get_the_author_meta('first_name', $id) || get_the_author_meta('last_name', $id)) {\r\n if (get_the_author_meta('first_name', $id) != '' && $fname_hide_status == 0) {\r\n $name .= get_the_author_meta('first_name', $id) . ' ';\r\n }\r\n if (get_the_author_meta('last_name', $id) != '' && $lname_hide_status == 0) {\r\n $name .= get_the_author_meta('last_name', $id);\r\n }\r\n }\r\n return $name;\r\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "6223a99212503822644cb80f41e354fd", "score": "0.0", "text": "public function destroy($id)\n {\n $users_r = User::find($id);\n $users_r->delete();\n return redirect()->back()->with('message', 'Done!');\n }", "title": "" } ]
[ { "docid": "9e3888bdb250b09daf6881b2c953ce96", "score": "0.7387755", "text": "protected function removeImageFromStorage (HCResources $resource)\n {\n $path = $this->uploadPath . $resource->id;\n\n if (Storage::has ($path)) {\n Storage::delete ($path);\n }\n }", "title": "" }, { "docid": "67120cc52c09f1239f92f34fd173437e", "score": "0.7333458", "text": "function remove($resource)\n {\n }", "title": "" }, { "docid": "3f1322e69a1884d9745c5ef5f1590e48", "score": "0.7141337", "text": "public function removeResource($resourceName);", "title": "" }, { "docid": "e8f55d4cc56465e75499a86915b35d9b", "score": "0.70428175", "text": "public function delete($resource);", "title": "" }, { "docid": "e390bf434f5cce46402b827d582cdcbe", "score": "0.7039089", "text": "public function removeResource(Resource $resource): void\n {\n if (!isset($this->resources[$resource->getUri()])) {\n return;\n }\n unset($this->resources[$resource->getUri()]);\n }", "title": "" }, { "docid": "96aa9ea6689a46a9441f009aa879d999", "score": "0.6885214", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->id;\n $join->resource_id = $resource->id;\n $join->delete();\n }", "title": "" }, { "docid": "d522def58731edf5dda07c4a8e3cb839", "score": "0.6839906", "text": "public function remove(IUser $user, ?IResource $resource): void;", "title": "" }, { "docid": "5b18f4f0f245d93e1d14486ac0afbbc7", "score": "0.6735704", "text": "public function remove(ResourceInterface $resource)\n {\n $this->_em->remove($resource);\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "9d416bb966c467169e3ae97e3c181868", "score": "0.63677", "text": "abstract function deleteResource(int $id);", "title": "" }, { "docid": "b9f567113f04c7ad2db0fe760a0a6fdc", "score": "0.63184243", "text": "public function unregisterResource()\n {\n Zend_Registry::get('acl')->remove($this);\n }", "title": "" }, { "docid": "13034525cd05a6a81ce72172a28a6888", "score": "0.6213014", "text": "public function delete()\n {\n $request = new StorageDeleteRequest();\n $request->setBucketName($this->bucket->getName());\n $request->setKey($this->key);\n\n [$response, $status] = $this->storage->_baseStorageClient->Delete($request)->wait();\n Utils::okOrThrow($status);\n }", "title": "" }, { "docid": "ae13b12a81ef5a04c54c2ae2a1fbfc6f", "score": "0.61720115", "text": "public function unsetStorageId();", "title": "" }, { "docid": "251c69886b6b7be9441be8fe7c79bf9f", "score": "0.6166032", "text": "public function destroy($id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "ac2ff7081643a335753979289127eb7f", "score": "0.6098791", "text": "function destroy( $resource ){\n\n\n\n\n\n \n\n}", "title": "" }, { "docid": "7f77f3b95410a985ed02a0994980a5dd", "score": "0.6076961", "text": "public function deleteResource(AbstractNode $resource) : void;", "title": "" }, { "docid": "c1246d964fe6c011b7e9a2e92e2bce69", "score": "0.60498166", "text": "public function destroy($id)\n\t{\n\t\t//\n\t\t$file = \\App\\Resource::find($id)->image;\n\t\tunlink('pictures/' . $file);\n\t\t\\App\\Resource::destroy($id);\n\t\treturn Redirect::to('/');\n\t}", "title": "" }, { "docid": "e9a19d00feed0894857d58eb3e4aea34", "score": "0.6019356", "text": "protected function dropResource()\n {\n $this->dropFile('Resource', $this->getResourcePath());\n }", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.5991417", "text": "public function rm( $path );", "title": "" }, { "docid": "6dd2ae009f2219fb531720e25a26531d", "score": "0.5974692", "text": "public function remove() {\n\t\t$this->storage->rmdir($this->path);\n\t\t$this->user->triggerChange('avatar');\n\t}", "title": "" }, { "docid": "4f634fd6a5cf444037bf2efc93dadfeb", "score": "0.5945026", "text": "public function clear()\n {\n \tunlink($this->_storage);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "15a853ed70c99f4514a71c5e2d0b94aa", "score": "0.59332573", "text": "public function remove($resource)\n {\n try {\n $resourceId = $this->get($resource)->getResourceId();\n } catch (Zend_Acl_Exception $e) {\n require_once 'Zend/Acl/Exception.php';\n throw new Zend_Acl_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n $resourcesRemoved = [$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 return $this;\n }", "title": "" }, { "docid": "b8b5d5ca606833c889a1285814fba6f4", "score": "0.5917159", "text": "public function unlinkResource() {\n\t\t$this->resource=null;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1f9a1be4bb584e042a8ad8d688ac9917", "score": "0.59067374", "text": "public function delete() {\n if (file_exists($this->src)) unlink($this->src);\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": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "d03fcfa49d2ade09cffc8d88d701076d", "score": "0.58893216", "text": "public function dropStorageFromName($storageName);", "title": "" }, { "docid": "4b22b7ee3a57517ec9e3b86bea1578c9", "score": "0.5856808", "text": "public function clearStorage();", "title": "" }, { "docid": "84e424b359d9d6f2b49045a0bf4df9de", "score": "0.58229584", "text": "public function destroy($id)\n {\n $productImage = ProductImage::find($id);\n $productImage->delete();\n $fullPath = str_replace(\"storage\",\"/public\",$productImage->path);\n Storage::delete($fullPath);\n return $productImage;\n }", "title": "" }, { "docid": "2d75567656921f9588d0f6a09e30ea8c", "score": "0.5816774", "text": "public function testItShouldRemoveSpecifiedResource()\n {\n $this->json['data'] = [];\n $this->json('DELETE', $this->base_url . $this->getId(), [], $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "e53013c127607b9b9763311d1d78cf4b", "score": "0.58067673", "text": "public function detach()\n {\n if (!isset($this->resource)) {\n return null;\n }\n $resource = $this->resource;\n unset($this->resource);\n $this->size = null;\n $this->uri = null;\n $this->readable = false;\n $this->seekable = false;\n $this->writable = false;\n return $resource;\n }", "title": "" }, { "docid": "567e641bf24d438f1c69a4a617fddcb1", "score": "0.57947505", "text": "function delete($resource, $headers = array())\n {\n $result = $this->client->delete($this->build_url($resource), [\n 'headers' => array_merge([\n 'Authorization' => $this->getBearer()\n ], $headers)\n ]);\n return $result;\n }", "title": "" }, { "docid": "1dee477f6e099b050eb54e8469548631", "score": "0.57649726", "text": "public function destroy($id)\n {\n $slider=Slider::find($id);\n if($slider->image)\n {\n if(Storage::exists('public/slider/' . $slider->image)){\n $delete= Storage::delete('/public/slider/' . $slider->image); \n }\n }\n $slider->delete();\n alert::success('slider Deleted Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "4d84ab18e7e3c7bf3662c486977fb999", "score": "0.57371354", "text": "public function delete() {\n return $this->storage->delete($this->getId());\n }", "title": "" }, { "docid": "aa96241e32a2910707191042a72208b3", "score": "0.5733017", "text": "public function destroy(Resource $resource): JsonResponse\n {\n Storage::disk('article')->delete($resource->url);\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "cbac86afaa4d65131418099d416a05f8", "score": "0.5731129", "text": "public function destroy($id)\n {\n $resource = Resource::find($id);\n\n if ($fileName = $resource->book->name) {\n $file = public_path() . '/resources/' . $fileName;\n unlink($file);\n }\n\n $resource->delete();\n\n $message = 'El recurso literario \"' . $resource->title . '\" ha sido eliminado.';\n $class = 'danger';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "30d12407d208c7245c67fe3e3c0e6844", "score": "0.5715374", "text": "public function remove (object $entity);", "title": "" }, { "docid": "148f851e6e394ade1c2f9c6b118d123d", "score": "0.5697347", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['status' => 'ok']);\n }", "title": "" }, { "docid": "dfafd8026a650244c991d50f54215453", "score": "0.569202", "text": "public function free():void { unlink($this->getfilename()); }", "title": "" }, { "docid": "5b249643a990832f9ecd53f247c87bb4", "score": "0.5689915", "text": "public function destroy($id)\n {\n $find = DB::table('suppliers')->where('id',$id)->first();\n $photo = $find->photo;\n\n if($photo){\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }else{\n DB::table('suppliers')->where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "c0f1056876f778bb47bd815edbae240a", "score": "0.5686687", "text": "public function destroy($id)\n {\n //\n\n $query = Picture::find($id);\n $collections = collect($query);\n $filename = $collections->get('title');\n // default is config/filesystems.php\n $contents = Storage::get($filename);\n Storage::delete($filename);\n Picture::destroy($id);\n \n return redirect('picture');\n //return $contents;\n \n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bf109080b5ee3a89d2c795999303aee7", "score": "0.5680265", "text": "public function delete(){\n if($this->removable) {\n $directory = $this->getRootDir();\n\n App::fs()->remove($directory);\n }\n }", "title": "" }, { "docid": "3b5ab38f0f5c2e97d3b02bce08803b25", "score": "0.56787795", "text": "public function destroy($id)\n {\n \n $imageUpload = Image::findOrfail($id);\n\n File::delete([\n public_path(('/images/').$imageUpload->imageName),\n ]);\n $imageUpload->delete();\n }", "title": "" }, { "docid": "63bd4ba9d20687d38d658987b149d5fb", "score": "0.5676478", "text": "public function deleteResource(\n $uri = \"\",\n $headers = []\n );", "title": "" }, { "docid": "9821f26046d4f47083ca51bd2deff710", "score": "0.5674362", "text": "public function destroy($id)\n {\n //\n $item = post::find($id);\n \n$item->tags()->detach();\n $image_path = $item->file; // the value is : localhost/project/image/filename.format\n \n //Image::destroy($image_path);\n \n $item->delete();\n return redirect('post');\n }", "title": "" }, { "docid": "3d074a3589196f3e2c63d1b79c3a54f2", "score": "0.5669239", "text": "public function destroy()\n {\n $file = pathinfo(request()->getContent());\n $storagePath = $this->baseStoragePath();\n $path = \"{$storagePath}/{$file['basename']}\";\n\n $fileDeleted = Storage::disk(config('canvas.storage_disk'))->delete($path);\n\n if ($fileDeleted) {\n return response()->json([], 204);\n }\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "3819490d97e5dfe8f2ffd81ae03e6e53", "score": "0.56674856", "text": "public function remove(ReadModelInterface $element);", "title": "" }, { "docid": "b182edae2a719de4edc919c7a7b5885e", "score": "0.5663417", "text": "public function destroy($id)\n {\n\n $post = Roler::findOrFail($id);\n\n $path=public_path('/storage/uploads/');\n if (isset($post->image)) {\n $oldname=$post->image;\n File::delete($path.''.$oldname);\n }\n\n if (Roler::where('id', $id)->delete()) {\n\n return redirect()->back()->with('success', 'Record deleted successfully');\n\n }\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "2d475aa3098e33e6020ec88b30a03b25", "score": "0.5662905", "text": "public function purgeAsset($asset);", "title": "" }, { "docid": "84ffd5d41241886a42efaaa6c4cb6c45", "score": "0.5658867", "text": "public function delete()\n {\n self::remove($this->key);\n $this->key = null;\n $this->value = null;\n }", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "dc84ba400b70ef909d87e4a92424f6ac", "score": "0.5648853", "text": "public function destroy($id)\n {\n $album = Album::find($id);\n if($album==null){\n return reidrect('/portfolio')->with('error','this portfolio does not exist');\n }else{\n if(Storage::delete('public/album_covers/'.$album->cover_image)){\n $album->delete();\n return redirect('/portfolio')->with('success','Album removed');\n }\n }\n}", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.5646982", "text": "public abstract function remove();", "title": "" }, { "docid": "7257252b8ba3d014ab6c945b9b1f8774", "score": "0.5646248", "text": "public function destroy($id)\n {\n\n $slider = Slider::whereId($id)->first();\n $image = $slider->slider_image;\n $path = 'public/slider_images/'; \n Storage::delete( $path . $image); \n \n $data = Slider::findOrFail($id);\n $data->delete();\n\n Session::flash('success', 'Slider deleted successfully..');\n return redirect()->route('all.slider');\n }", "title": "" }, { "docid": "884fba4384b6fac636fcb5fd3a0b8119", "score": "0.56440735", "text": "public function deletePhoto($resource, $id)\n {\n if (($resource === 'user') || ($resource === 'group') || ($resource === 'memo')) {\n\n //Validate Model is valid and return valid response\n list($param, $model) = $this->validateModelIsValid($resource, $id);\n //Get Image Name\n $image = $model->img_url;\n\n //Delete Avatar and Thumbnail\n if ($image != null) {\n Storage::delete(\"/$param/avatars/thumbnails/$image\");\n Storage::delete(\"/$param/avatars/$image\");\n }\n //Update Profile Photo Field To Null\n $model->img_url = null;\n //Save in Database\n $model->save();\n //Return Response\n return response()->json($model, 202);\n }\n\n return response('Invalid request', 400);\n\n }", "title": "" }, { "docid": "ff85d8135b960df73371ee3703e738a4", "score": "0.5643097", "text": "public function destroy($id)\n {\n $file_name = DB::table(\"research\")->where('id',$id)->value('research_image');\n unlink(public_path(\"front/assets/images/what-we-do/research/\".$file_name)); \n DB::table(\"research\")->where('id',$id)->delete();\n return redirect()->route('all-research')->with('msg','Research deleted successfully with the image');\n }", "title": "" }, { "docid": "684caecb3cebeb517274f1dbe758544f", "score": "0.5639566", "text": "abstract public function remove($scope = null, $pref = null);", "title": "" }, { "docid": "4dfae537943a63cbddf6151c77a88821", "score": "0.5636697", "text": "public function destroy($id)\n { \n $products = Product::findOrFail($id);\n // $delete = $products->slug;\n if($products->slug) {\n \\File::delete( public_path('storage/'.$products->slug ) );\n }\n \n // File::delete(public_path(\"storage/\"), $delete);\n Product::destroy($id);\n return redirect()->route('product-list.index')->with('success','Product Destory Successfully !!!');\n\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "3cfb84429aef8127ecc19fa5934511fe", "score": "0.56167203", "text": "public function deleteTagging($resource)\n {\n $taggingList = $this->getEm()->createQueryBuilder()\n ->select('t')\n ->from('UnifikDoctrineBehaviorsBundle:Tagging', 't')\n ->where('t.resourceType = :type')\n ->setParameter('type', $resource->getResourceType())\n ->andWhere('t.resourceId = :id')\n ->setParameter('id', $resource->getId())\n ->getQuery()\n ->getResult();\n\n foreach ($taggingList as $tagging) {\n $this->getEm()->remove($tagging);\n }\n }", "title": "" }, { "docid": "30687a12463a759554c0cdd15b679592", "score": "0.56098014", "text": "public function remove (EntityInterface $entity);", "title": "" }, { "docid": "8bd2c06eeb1572fe4c48014cc912a6d6", "score": "0.5607892", "text": "public function delete() {\n @unlink($this->path());\n return parent::delete();\n }", "title": "" }, { "docid": "942f7427e779526c94189558d1185b66", "score": "0.56033164", "text": "public function delete()\n {\n Yii::debug(\"Deleting last upload.\", self::CATEGORY);\n unlink($this->path);\n Yii::$app->session->remove(self::cacheKey());\n }", "title": "" }, { "docid": "bc970628483c63b419ea48f599c8c972", "score": "0.5598614", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $photo = $product->image;\n if ($photo) {\n unlink($photo);\n Product::findOrFail($id)->delete(); \n }else{\n Product::findOrFail($id)->delete();\n }\n\n }", "title": "" }, { "docid": "14eedb590aed3088ebca2d6e88f88b70", "score": "0.55937696", "text": "public function destroy($id)\n {\n if ($id) {\n $storagek = Storagek::find($id);\n unlink(public_path('storage/images/').$storagek->file);\n $storagek->delete();\n return response()->json([\n \"success\" => true,\n \"message\" => \"File successfully delete\",\n ]);\n } else {\n return response()->json(['Err' => 'id no found']);\n }\n\n\n\n //\n }", "title": "" }, { "docid": "1b06eb968537fe78419acb4959d62e6d", "score": "0.55909395", "text": "public function destroy(Request $request, $id)\n\t{\n\t\t$storage = Storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\n\t\tif ($storage) {\n\t\t\t$storage->delete();\n\t\t\tSession::flash('success', 'Склад была успешно удален из справочника!');\n\t\t} else {\n\t\t\tSession::flash('error', 'Склад не найден в справочнике!');\n\t\t}\n\n\t\treturn redirect()->route('storage.index');\n\t}", "title": "" }, { "docid": "1f90eefbc842f865e713597e80b0fc92", "score": "0.55857533", "text": "public function remove($file);", "title": "" }, { "docid": "b3f61ce5e85b70bb0bf7f3a5ad6064ba", "score": "0.55771476", "text": "function remove(){\n shm_remove($this->id);\n }", "title": "" }, { "docid": "68aa5a7a833751b6ce51749cd9ab047e", "score": "0.5570882", "text": "public function destroy()\n {\n LaraFile::delete(\"images/{Auth::user()->avatar}\");\n }", "title": "" }, { "docid": "1f9a85d3b28293dfe2336fc2953ad59f", "score": "0.55613", "text": "public function destroy($id)\n {\n // get divide\n $divide = Divide::findOrFail($id);\n \n File::delete(public_path('image/') . $divide->img);\n \n if($divide->delete()) {\n return new DivideResource($divide);\n }\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.5560665", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "82eeede68c38b70a29849c8d452c2f6a", "score": "0.5556357", "text": "public function destroy($id)\n { \n $product = Item::find($id);\n $image = $product->image;\n\n $basename ='img/products/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n if($basename != 'img/products/img_place_holder_product.png'){\n unlink($basename);\n }\n }\n $product->delete();\n\n Session::flash('success','Product Deleted');\n return redirect()->back();\n }", "title": "" }, { "docid": "614063fb503a57e9decfce510aa95492", "score": "0.5555877", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n if (($oldFile = $product->photo) !== 'uyuni.jpg'){\n Storage::delete($oldFile);\n }\n $product->delete();\n return redirect()->route('product.index')->with('success', 'Product successfully destroyed');\n }", "title": "" }, { "docid": "e58edf0ef06400cd31b9c6df91114be3", "score": "0.5555602", "text": "public function destroy(Attribute $attribute)\n {\n //delete a attribute by softDelete.\n $userId = $attribute->Category->Store->user_id;\n\n if (auth()->id() == $userId) {\n if ($attribute->delete()) {\n return new AttributeResource($attribute);\n }\n } else {\n abort(400, 'the Auth user do not store owner');\n }\n }", "title": "" }, { "docid": "7cdf7f14d455dbb5d9ed3ea3b44142b0", "score": "0.55545616", "text": "protected static function removeComponent()\n {\n (new Filesystem)->delete(\n resource_path('assets/js/components/ExampleComponent.vue')\n );\n }", "title": "" }, { "docid": "7488846bbe831c2c5afdad208317b7bd", "score": "0.5543239", "text": "public function destroy(File $file)\n {\n //\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', $file);\n }", "title": "" }, { "docid": "9d72fe7c299d9bc6b0d19ba6bb397fa3", "score": "0.55405164", "text": "public function destroy($id)\n {\n $product = Product::where('id', $id)->first();\n if ($product->image) {\n unlink($product->image);\n }\n Product::where('id', $id)->delete();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "66928b15fb30f2f5cf746449308643ba", "score": "0.5534244", "text": "public function remove()\n {\n $this->_context->builder->waveletRemove($this->waveId, $this->waveletId);\n }", "title": "" }, { "docid": "45876224e081764ab571b0cb929a5473", "score": "0.5533963", "text": "public function destroy($id)\n {\n\n $product=Product::find($id);\n $image=str_slug($product->imagePath);\n //no se borro la imagen ???\n Storage::delete($image);\n $product->delete();\n \n return back();\n \n }", "title": "" }, { "docid": "a3bbd69ef2b058074f49c04b76cdbd14", "score": "0.55301565", "text": "public function delete() {\n if ($this->_filepath and is_writable($this->_filepath)) {\n unlink($this->_filepath);\n }\n }", "title": "" }, { "docid": "98e71b5db6e284bbc48862c743eb819b", "score": "0.552751", "text": "public function destroy($id)\n {\n //\n $makale_resim = Article::find($id)->img->name;\n @unlink(public_path(\"uploads/\".$makale_resim));\n @unlink(public_path(\"uploads/thumb_\".$makale_resim));\n Img::where(\"imageable_id\",$id)->where(\"imageable_type\",\"App\\Article\")->delete();\n Article::destroy($id);\n Session::flash(\"durum\",1);\n return redirect(\"/admin/haber\");\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": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "aa783df931362807e2c13a6c5e0e8dbb", "score": "0.0", "text": "public function destroy($id, Request $request)\n\t{\n\t\t$user = User::findOrFail($id);\n\n\t\t$user->delete();\n\n\t\t$message = 'El Usuario '. $user->name .' fue eliminado';\n\n\t\tif ($request->ajax()) {\n\t\t\treturn response()->json([\n\t\t\t\t'id' => $user->id,\n\t\t\t\t'message' => $message\n\t\t\t]);\n\t\t}\n\n\t\tSession::flash('message', $message);\n\n\t\treturn redirect()->route(\"category.index\");\n\t}", "title": "" } ]
[ { "docid": "323473ed6f508b74e659356efaa1c48c", "score": "0.71817523", "text": "public function delete(Resource $resource);", "title": "" }, { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "d0200b5511e373dc382f72a63508d06c", "score": "0.6805081", "text": "public function remove()\n {\n\n // delete it phsically\n Storage::delete($this->getAttribute('file_path'));\n\n // delete the db record\n $this->delete();\n\n }", "title": "" }, { "docid": "60e0eaaca05e10d390d77cb40782adfc", "score": "0.67393976", "text": "public function remove($resourcePath, $checkExistence = true);", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "901346032d849135a1cc9b1c8ea4554a", "score": "0.6501505", "text": "public function remove()\n {\n $this->store->remove($this->identifier);\n }", "title": "" }, { "docid": "dfa556aa3ba45a435d6c6cf0513a0e45", "score": "0.62263656", "text": "private function delete($resource, $max_version = FALSE)\n\t{\n\t\t// check its retention policy\n\t\t\n\t\t// if only archiving\n\t\tDatabase::getInstance()->archive($resource, $max_version);\n\t}", "title": "" }, { "docid": "fe71fcb7a71c2406c9cd8f327891a179", "score": "0.61919874", "text": "function destroy( $resource ){\n\n $result = softDelete( 'products', $resource );\n\n if( !$result ){\n\n redirect( route( 'product?message=1' ) );\n\n }\n\n redirect( route( 'product' ) );\n}", "title": "" }, { "docid": "2a16eec4649872586b53cd9c5d322b4e", "score": "0.6179796", "text": "final public function delete()\n {\n $this->data->unlink();\n }", "title": "" }, { "docid": "2e3244eae75a5a190b83c17304240fa4", "score": "0.61707264", "text": "public function destroy(Resource $resource)\n {\n try {\n Gate::authorize('delete', $resource);\n\n $resource->delete();\n } catch (\\Illuminate\\Database\\Eloquent\\ModelNotFoundException $e) {\n\n throw abort(401);\n }\n\n $fileName = $resource->getMedia()[0]->file_name ?? 'unknown file';\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-resource',\n 'message' => $fileName . ' was deleted sucessfully!',\n 'resource_id' => $resource->id\n ]);\n }", "title": "" }, { "docid": "e66bdca3dafa110f9ec6b1f5dc9131de", "score": "0.61525285", "text": "function destroy( $resource ){\n\n return softDelete( 'receivables', $resource) ? true : false;\n\n}", "title": "" }, { "docid": "77014b4d73bed44bc9f32b0e436008eb", "score": "0.61250305", "text": "public function remove()\n {\n @unlink($this->getCachePath());\n }", "title": "" }, { "docid": "2931d9b75e0e409683172c9703f69836", "score": "0.61063725", "text": "public function delete(){\n Storage::cloud()->delete($this->url);\n parent::delete();\n }", "title": "" }, { "docid": "4d3716fdeabf4d654b91d48076636ceb", "score": "0.6075143", "text": "public function deleteresource($instrumentID,$resourceID) {\r\n $user_id = Auth::user()->getId();\r\n $instrumentID = (int) $instrumentID; // force instrumentID to int for security\r\n $resourceID = (int) $resourceID; // force resourceID to int for security\r\n\r\n // then we need an image to represent the mp3\r\n $resourcequery = \\DB::table('resources')\r\n ->where('resourceID', '=', $resourceID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($resourcequery) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for resource\r\n }\r\n\r\n $resourceType = $resourcequery[0]->resourceType; \r\n $resourceFileName = $resourcequery[0]->resourceFileName; \r\n\r\n // get instrument\r\n $instrument = \\DB::table('instruments')\r\n ->where('instrumentID', '=', $instrumentID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($instrument) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for instrument\r\n }\r\n\r\n $legalBodyID = $instrument[0]->legalBodyID; \r\n $instrumentName = $instrument[0]->titlePreferred; \r\n\r\n // get collection\r\n $legalbodies = \\DB::table('legalbodies')\r\n ->where('legalBodyID', '=', $legalBodyID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($legalbodies) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for collection\r\n }\r\n\r\n $legalBodyMDAcode = $legalbodies[0]->legalBodyMDAcode; \r\n $legalBodyName = $legalbodies[0]->legalBodyName; \r\n\r\n // now remove the record from the database...\r\n \\DB::table('resources')->where('resourceID', '=', $resourceID)->delete();\r\n\r\n // now remove any rights info for this resource from the database...\r\n \\DB::table('rights')->where('resourceID', '=', $resourceID)->delete();\r\n\r\n // set flash data to show deletion\r\n session()->flash('flashdata', \"Instrument resource successfully deleted\");\r\n $sessiondata = session()->all();\r\n\r\n // add delete resource activity\r\n \\DB::table('user_activity')->insert(\r\n ['userID' => $user_id, 'resourceID' => $resourceID, 'activity' => \"You deleted a \".$resourceType, 'instrumentID' => $instrumentID, 'instrumentName' => $instrumentName, 'legalBodyID' => $legalBodyID, 'legalBodyName' => $legalBodyName, 'activityDate' => \\Carbon\\Carbon::now() ]\r\n );\r\n\r\n // remove the files then redirect...\r\n if ($resourceType == \"image\")\r\n {\r\n \\File::Delete('instrument_resources/images/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the image\r\n \\File::Delete('instrument_resources/images/'.$legalBodyMDAcode.'/thumbnails/'.$resourceFileName); // delete image thumb if exists\r\n return \\Redirect::action('Resources@editimages', array('instrumentID' => $instrumentID)); // redirect to image list\r\n } \r\n\r\n if ($resourceType == \"sound\")\r\n {\r\n \\File::Delete('instrument_resources/sound/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the audio\r\n return \\Redirect::action('Resources@editaudio', array('instrumentID' => $instrumentID)); // redirect to audio list\r\n } \r\n\r\n if ($resourceType == \"video\")\r\n {\r\n \\File::Delete('instrument_resources/video/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the video\r\n return \\Redirect::action('Resources@editvideo', array('instrumentID' => $instrumentID)); // redirect to video list\r\n } \r\n\r\n}", "title": "" }, { "docid": "cc659928abe790e8fac51c06e7c6117b", "score": "0.6034554", "text": "public function destroy($id)\n {\n $slider = Slider::find($id);\n \n if(Storage::disk('public')->exists($slider->image)){\n Storage::disk('public')->delete($slider->image);\n $slider->delete();\n\n return redirect()->route('admin.slider.index');\n\n\n }\n}", "title": "" }, { "docid": "f57a1543be50c05c9d9e836022b5df10", "score": "0.60049963", "text": "public function deleteInStorage()\n {\n $driver = Storage::disk($this->storage);\n $driver->delete($this->source);\n\n $styles = $this->imagestyles()->filter(function ($item) {\n return $item['path'];\n });\n foreach ($styles as $style) {\n $driver->delete($style['path']);\n }\n }", "title": "" }, { "docid": "0907ddc27d61e616fb26e1efc6859210", "score": "0.599938", "text": "public function unpublishPersistentResource(\\TYPO3\\Flow\\Resource\\Resource $resource)\n {\n return $this->resourcePublishingTarget->unpublishPersistentResource($resource);\n }", "title": "" }, { "docid": "65d9262aaa2d8511e09375a64eebcea3", "score": "0.5985362", "text": "protected function deleteFromStorage(string $path): void\n {\n unlink($this->storagePath($path));\n }", "title": "" }, { "docid": "870c1879d675e54a39e9c3193bfa3762", "score": "0.5935635", "text": "protected function deleteResource($resourceId) {\n if($this->resourceModel != null) {\n $this->resourceModel->deleteResource($resourceId);\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "6135bcff168c3ab2e042cd2a00a4650c", "score": "0.59222406", "text": "protected function removeStorage()\n {\n $this->session->remove($this->formid);\n }", "title": "" }, { "docid": "91d9de58482d119659d570a40c8aa219", "score": "0.59040296", "text": "public function remove($entity)\n {\n $location = './public' . $this->options->getAttachmentPath() . $entity->getFileName();\n unlink($location);\n\n parent::remove($entity);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "1ff0354ec98125684a2a7f79c1a86828", "score": "0.5880235", "text": "function delete() {\n\n unlink($this->path);\n\n }", "title": "" }, { "docid": "15d77f2192a4aacfad530291891099cb", "score": "0.5879458", "text": "private function delete_resource($rid){\n\t\t$this->r_db->query('DELETE FROM resource WHERE rid = $rid');\n\t}", "title": "" }, { "docid": "665b7c1d9e70f47ed64d96953e0ebd6a", "score": "0.5873777", "text": "public function remove()\n\t{\n\t\t$this->deleteOrTrash(false);\n\t}", "title": "" }, { "docid": "801474b9e900757e5407f546db807117", "score": "0.5853427", "text": "public function destroy($id)\n {\n $store = Store::find($id);\n $path = '/storage/store_image/'.$store->pic;\n //var_dump(public_path().$path);\n File::delete(public_path().$path);\n \n \n $store->delete();\n return redirect('/adminstore');\n }", "title": "" }, { "docid": "306e785660b4a48d4b7818865a87fdbf", "score": "0.5834261", "text": "public function delete($resourceType, $resourceId, $parameters = []);", "title": "" }, { "docid": "9ebd94a50a2e958b6710ddc0436ae1ea", "score": "0.5826271", "text": "public function destroy(StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "4d396a2a1d64c7bc35e491fede78f6ac", "score": "0.5820096", "text": "public function destroy(Attribute $attribute);", "title": "" }, { "docid": "7db018972c54aca2f0bcafd770255c57", "score": "0.5793602", "text": "public function remove($key) {\n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1bbcc8124b9085869b6835e05fefac01", "score": "0.5779648", "text": "public function deleteResource($entity)\n {\n $this->getDoctrine()->getManager()->remove($entity);\n $event = new RepositoryEvent($entity, 'delete');\n $this->get('event_dispatcher')->dispatch('okApp.pre_validate', $event);\n $this->get('event_dispatcher')->dispatch('okApp.pre_flush', $event);\n $this->getDoctrine()->getManager()->flush(); // save changes to already attached entity\n $this->get('event_dispatcher')->dispatch('okApp.post_flush', $event);\n\n return $entity;\n }", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "ebc7a125ebe4737bc2998e770814f71b", "score": "0.5739182", "text": "public function destroy($id)\n {\n $res = UploadResource::findOrFail($id);\n $path = $res->{'path'};\n $ueditor = app('ueditor');\n if ($result = $ueditor->deleteResource($path)) {\n $res->delete();\n }\n return response()->json(['code' => 200, 'data' => ['result' => $result]]);\n }", "title": "" }, { "docid": "3c664f57f9c4dbfaab4e33c4c362aa28", "score": "0.5723814", "text": "public function remove() {\n return unlink($this->getAbsolute());\n }", "title": "" }, { "docid": "b86ae32c63f3ca7d52497df28e9fc6c7", "score": "0.5715146", "text": "public function remove(string $path): self;", "title": "" }, { "docid": "987fae9b29119a6e8cf27b87eaa6430d", "score": "0.5696804", "text": "public function __unlink__() {\n \n // has been unlinked before?\n if ( $this->_unlinked ) return;\n \n // test if object is writable by current user\n if ( !$this->isWritable() )\n throw Object( 'Exception.IO', 'Not enough permissions to delete object: ' . $this->url );\n \n // set the unlinked object flag \n $this->_unlinked = TRUE;\n \n // if the object has an _id, it implies that the object has been saved\n // before in the database. so we remove it.\n if ( $this->_id ) {\n // make sure we delete only a single object from database.\n $this->_server->objects->remove([ '_id' => $this->_id ], [ 'justOne' => TRUE ]);\n }\n \n }", "title": "" }, { "docid": "31552ad8a419fce5ba6d67be1e8ea658", "score": "0.56877464", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n if($file->delete())\n {\n return new FileResource($file);\n }\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "f9520978afbaf3da90dc31b6415b2157", "score": "0.5683821", "text": "public function wipeStorage(): void\n {\n }", "title": "" }, { "docid": "e69dc0cbd5f874e75c6ce3e19f1fda0b", "score": "0.56808966", "text": "public function remove($identifier)\n {\n unset($this->assets[$identifier]);\n }", "title": "" }, { "docid": "30573ad9e3e221d53f80f033fa21635e", "score": "0.56723815", "text": "public function rmPhoto($photo) \n {\n return Storage::delete($this->storagePath.'/'.$photo);\n }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.5665747", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.5665747", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "65d0b4ad7c743cc4cb3030c4f6cc4bf1", "score": "0.5652733", "text": "public function destroy($id)\n {\n $brand=Brand::with('photo')->whereId($id)->first();\n //for showing image the url is:/storage/photos/imagName\n //for deleting image the url is:public/photos/image\n //so we need to ommit storage from the path\n // the storage is added to path by accessor in photo model\n $dir= str_replace('/storage/','',$brand->photo->path);\n Storage::disk('public')->delete($dir);\n //the bellow works when we dont use accessors\n// Storage::disk('public')->delete('photos/'. $brand->photo->path);\n Photo::find($brand->photo_id)->delete();\n Session::flash('delete','برند با موفقیت حذف گردید.');\n return redirect()->route('brand.index');\n }", "title": "" }, { "docid": "3c1d74895129edf90ccfa12701fc59d9", "score": "0.56470865", "text": "public function deleted(Asset $asset): void\n {\n $asset->project->decrementUsedStorageBy($asset->file_size);\n }", "title": "" }, { "docid": "6aabfb0c93b68c59f34da645f69bf7cc", "score": "0.5638543", "text": "public function destroy($id) {\n\n\n $image = Image::find($id);\n unlink(public_path() . \"/extra-images/\" . $image->path);\n $image->delete();\n\n return redirect()->back();\n }", "title": "" }, { "docid": "d518661f40324022339bdb48961c2dff", "score": "0.5636839", "text": "public function delete($path)\n {\n $objectName = $this->_getObjectName($path);\n\n $status = $this->_s3->removeObject($objectName);\n\n if (!$status) {\n if ($this->_s3->isObjectAvailable($objectName)) {\n throw new Omeka_Storage_Exception('Unable to delete file.');\n } else {\n _log(\"Omeka_Storage_Adapter_ZendS3: Tried to delete missing object '$objectName'.\", Zend_Log::WARN);\n }\n } else {\n _log(\"Omeka_Storage_Adapter_ZendS3: Removed object '$objectName'.\");\n }\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "5f74be406524d1dd367332df9f956681", "score": "0.5630604", "text": "public function fsRemove(): void;", "title": "" }, { "docid": "c291ed5f62661f8ae3c7ebd197fd20a7", "score": "0.56288564", "text": "public function destroy($id)\n {\n $link=Link::find($id);\n //delete related file from storage\n $link->delete();\n return redirect()->route('links.index');\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "73ac3f972acee5b7fd463d6b5a330028", "score": "0.5622749", "text": "public function destroy($upload)\n {\n $upload = Upload::find($upload);\n\n if($upload->delete()){\n return new UploadResource($upload);\n }\n }", "title": "" }, { "docid": "81330da370f2fa8918bf911dbbabd413", "score": "0.5621184", "text": "public function delete_image(){\n Storage::delete($this->image_path);\n }", "title": "" }, { "docid": "f352556f4e66b189947335dec9b06fff", "score": "0.5616907", "text": "public function destroy($id)\n {\n $item = Item::find($id);\n \n\n\n if(Storage::exists('/public/item/'.$item->image)){\n\n Storage::delete('/public/item/'.$item->image);\n\n }\n\n $item->delete();\n \n\n return redirect()->route('item.index')->with('success','item is deleted');\n }", "title": "" }, { "docid": "f4fee47f6d2a99e0273d0b83ff75e8d1", "score": "0.5606612", "text": "public function unpublishPersistentResource(\\TYPO3\\Flow\\Resource\\Resource $resource)\n {\n $result = false;\n $pathAndFilename = $this->buildPersistentResourcePublishPathAndFilename($resource, true);\n foreach (glob($pathAndFilename . '*') as $publishedResourcePathAndFilename) {\n unlink($publishedResourcePathAndFilename);\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "de45c4dca2d6523c2022cb0e74bc40d3", "score": "0.56060195", "text": "public function destroy($id)\n\t{\n\t\t$disk = Storage::disk('s3');\n\t\t$product = Product::find($id);\n\t\t$server = MyS3Tool::getGlideServer();\n \t\t$server->deleteCache($product->file_path);\n\t\t$disk->delete($product->file_path);\n\t\t$product->delete();\n\t\treturn Redirect::to('admin/products');\n\t}", "title": "" }, { "docid": "c0964a1f3d98ed05c28e086f64c70cd6", "score": "0.5598138", "text": "public function destroy($id){\n $image = $this->findById($id);\n return $image->delete();\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "ac975279aabe631d72ba36ab9e59ecc2", "score": "0.5591231", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n if ($file->delete()) {\n return new FileResource($file);\n }\n }", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.5590984", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "74b509420981e517c8d4ac09b8facadd", "score": "0.5582708", "text": "public function deleteImage() {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "a3405548801d1f43db03c2af439660f3", "score": "0.5578764", "text": "public function testRemove()\n {\n $path = 'foo.bar';\n // Not expecting much this time\n $repository_mock = $this->getRepositoryMock();\n\n $repository_mock\n ->expects($this->once())\n ->method('remove')\n ->with($path)\n ;\n\n $storage = new DatabaseStorage($repository_mock);\n $storage->remove($path);\n }", "title": "" }, { "docid": "5179b19b5312e92f8e000263d75f03ae", "score": "0.5571099", "text": "public function remove(Ressource $ressource)\n {\n if ($hash = $this->contains($ressource)) {\n unset($this->register[$hash]);\n }\n }", "title": "" }, { "docid": "471ea99d18c0ec83043973e3c3a7bee0", "score": "0.55674917", "text": "public function removeFromStorage(string $key): RequestInterface;", "title": "" }, { "docid": "32ccf3fad3618561467a2c67eea18aac", "score": "0.5564203", "text": "public function destroy($id)\n {\n $produc=products::find($id);\n if(Storage::disk('public')->exists('productImage/'.$produc->image)){\n Storage::disk('public')->delete('productImage/'.$produc->image);\n }\n $produc->delete();\n return redirect()->back();\n\n\n\n\n }", "title": "" }, { "docid": "18ffafef63ac8ab7ff8598b372ac00db", "score": "0.55592227", "text": "function del_resource($id){\n $data = $this->executeSQL(\"SELECT 1 AS Exist FROM Room_Resource WHERE RoomID = $id LIMIT 1\");\n if($data != null)\n return false;\n\n $sql =\n \"DELETE FROM\n Resource\n WHERE\n Resource.ResourceID = $id\";\n\n return $this->executeCommand($sql);\n }", "title": "" }, { "docid": "3a4437ecd3ac49434983bcba4dbcca09", "score": "0.55526173", "text": "public function destroy($id){\n\n $data = Product::findOrFail($id);\n if (strpos($data->image, '/uploads/') !== false) {\n $image = str_replace( asset('').'storage/', '', $data->image);\n Storage::disk('public')->delete($image);\n }\n $data->delete();\n $message = __('dashboard.deleted');\n return $this->successResponse(null, $message);\n }", "title": "" }, { "docid": "13d8740fa49c2f0b7efc4e2a52be2a21", "score": "0.5548022", "text": "public function destroy(Request $request)\n {\n //\n\n\n $Details = store::where('id', $request->id)->first();\n Storage::disk('public_uploads')->delete($Details->file_path);\n $Details->delete();\n session()->flash('delete', 'T-Shirt Deleted');\n return redirect('/store');\n\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "1e91a964584f7d2cabfa01501c86af79", "score": "0.5539283", "text": "public function unSaveResource(Resource $resource)\n {\n $this->resourceModel->unSaveResourceFromLoggedInUser($resource);\n return redirect()->back();\n }", "title": "" }, { "docid": "fd689274281a2b1dd2aff836fb81a613", "score": "0.5537332", "text": "public function destroy($id)\n {\n // Todo soft deleting..\n }", "title": "" }, { "docid": "9e1d042bf9beb73bf0bd909737159dcd", "score": "0.5536505", "text": "public function destroy($id)\n {\n $ad=Ad::find($id);\n //delete related file from storage\n $ad->delete();\n return redirect()->route('ads.index');\n }", "title": "" }, { "docid": "381b30a221854b3db02b5984cf2dfa22", "score": "0.5533826", "text": "public function remove()\n {\n // Evaluate timestamp and set attribute\n $timestamp = date('Y:m:d H:i:s');\n $attribute = static::$softDeleteAttribute;\n $this->$attribute = $timestamp;\n\n // Save record\n $this->save(false, [$attribute]);\n\n // Trigger after delete\n $this->afterDelete();\n }", "title": "" }, { "docid": "def6dee7957f1dde81d6592297e7ae11", "score": "0.5529798", "text": "static public function remove($var)\n\t\t{\n\t\t\ttry {\n\t\t\t\tStorage::remove(self::TABLE, array('var' => $var));\n\t\t\t} catch (Storage\\Exception $e) {\n\t\t\t\tthrow new MetaException($e->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "02ecd7a76ad592c312f2ab516e079c3f", "score": "0.5523932", "text": "public function destroy($id)\n {\n $file = CloudStorage::find($id);\n $filename = $file->file_name;\n $dir = '/';\n $recursive = false;\n $contents = collect(Storage::cloud()->listContents($dir, $recursive));\n $file = $contents\n ->where('type', '=', 'file')\n ->where('filename', '=', pathinfo($filename, PATHINFO_FILENAME))\n ->where('extension', '=', pathinfo($filename, PATHINFO_EXTENSION))\n ->first(); // there can be duplicate file names!\n Storage::cloud()->delete($file['path']);\n CloudStorage::destroy($id);\n return redirect()->route('reports.index');\n }", "title": "" } ]
74cbeb861bf5b6f1913716eeb33e7e3f
Define the application's command schedule.
[ { "docid": "44bd30b6f884da4d56ddda8e1caf084b", "score": "0.0", "text": "protected function schedule(Schedule $schedule)\n {\n /** ----------- Update price for all products from Dorepha site at daily ------------------- */\n $schedule->command('update:dorepha_price')\n ->dailyAt('5.00')\n ->withoutOverlapping();\n\n /** ----------- Update price for all products from Maesta site at daily ------------------- */\n $schedule->command('update:maesta_price')\n ->dailyAt('5.00')\n ->withoutOverlapping();\n\n /** ----------- Update price for all products from GoldenScent site at hourly ------------------- */\n $schedule->command('update:golden_scent_price')\n ->hourly()\n ->withoutOverlapping(60);\n\n /** ----------- Fetch all categories, size and brands from Maesta site at daily ------------------- */\n $schedule->command('fetch:maesta_attributes')\n ->dailyAt('12.30')\n ->withoutOverlapping(60);\n\n /** ----------- Fetch all products from Maesta site at daily ------------------- */\n $schedule->command('fetch:maesta_products')\n ->dailyAt('1.00')\n ->withoutOverlapping(60);\n\n /** ----------- Fetch all products from Dorepha site at daily ------------------- */\n $schedule->command('fetch:dorepha_products')\n ->dailyAt('1.00')\n ->withoutOverlapping(60);\n\n /** ----------- Fetch all products from Niceone site at daily ------------------- */\n $schedule->command('fetch:niceone_products')\n ->dailyAt('1.00')\n ->withoutOverlapping(60);\n\n /** ----------- Update price for all products from Niceone site at daily ------------------- */\n $schedule->command('update:niceone_price')\n ->dailyAt('5.00')\n ->withoutOverlapping(60);\n\n }", "title": "" } ]
[ { "docid": "726b5d50a59f8a1d3a90291319adc300", "score": "0.8277635", "text": "public function defineConsoleSchedule()\n\t{\n\t $schedule = $this->royalcms['schedule'];\n\t $this->schedule($schedule);\n\t}", "title": "" }, { "docid": "1c7045f74004e7fd25b23a761965cf4f", "score": "0.6662882", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n //emai:everyHour là tên của command chúng ta đã khai báo\n $schedule->command('newauto:everyHour')->dailyAt('09:30'); \n }", "title": "" }, { "docid": "f624db35058d582a918b73b18fcbb6f0", "score": "0.6635794", "text": "public function schedule() {\n\n\t}", "title": "" }, { "docid": "52085116cbe8cdcd53c4a0ccd5a3b2e3", "score": "0.65879965", "text": "public function schedule() {\n\n }", "title": "" }, { "docid": "fa2b74a77374b66a93567485c4dba64a", "score": "0.65050936", "text": "public function schedule();", "title": "" }, { "docid": "d64f4b554e25390311acb387ce8174a5", "score": "0.6417602", "text": "protected function schedule(Schedule $schedule)\r\n {\r\n $schedule->command('inspire')->hourly();\r\n/* $schedule->command('message:get')->everyMinute();\r\n $schedule->command('message:send')->everyMinute();*/\r\n // $schedule->command('message:setRead')->everyMinute();\r\n\r\n $schedule->command('syncGmailLabels:get')->daily();\r\n $schedule->command('import:message:get amazon')->everyMinute();\r\n $schedule->command('import:message:get aliexpress')->everyThirtyMinutes();\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "ce9d0d0c150f9f70d04218b0edbf3332", "score": "0.63829386", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('destiny:milestones')\n // ->weeklyOn(2, '12:30')\n // ->timezone('America/Chicago')\n // ->withoutOverlapping();\n\n $schedule->command('destiny:manifest', ['--force'])\n ->everyThirtyMinutes()\n ->timezone('America/Chicago')\n ->withoutOverlapping();\n\n // $schedule->command('destiny:milestones', ['--milestone' => 534869653])\n // ->weeklyOn(5, '12:30')\n // ->timezone('America/Chicago')\n // ->withoutOverlapping();\n\n $gamers = Gamer::all();\n foreach ($gamers as $gamer) {\n $safeGamertag = str_replace(' ', '_', $gamer->gamertag);\n $schedule->command('games:update')\n ->name('Update games')\n ->daily()\n ->withoutOverlapping()\n ->sendOutputTo(storage_path(\"logs/commands/games-update.log\"));\n\n $schedule->command('gamers', [$gamer->xuid])\n ->name('Update ' . $gamer->gamertag)\n ->hourly()\n ->withoutOverlapping()\n ->sendOutputTo(storage_path(\"logs/commands/{$safeGamertag}.log\"));\n\n $schedule->command('gamers:clips', [$gamer->xuid])\n ->name('Update ' . $gamer->gamertag . '\\'s clips')\n ->everyThirtyMinutes()\n ->withoutOverlapping()\n ->sendOutputTo(storage_path(\"logs/commands/{$safeGamertag}-clips.log\"));\n\n $schedule->command('gamers:screenshots', [$gamer->xuid])\n ->name('Update ' . $gamer->gamertag . '\\'s screenshots')\n ->everyThirtyMinutes()\n ->withoutOverlapping()\n ->sendOutputTo(storage_path(\"logs/commands/{$safeGamertag}-screenshots.log\"));\n }\n }", "title": "" }, { "docid": "b9f073e20f4aba2a4de25635f7dc32e4", "score": "0.63422567", "text": "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class, ['--server=a'])->everyThirtyMinutes();\n }", "title": "" }, { "docid": "9c3664f56bc2e7a38397a077c3596c3d", "score": "0.6334595", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('lms:expiration')\n ->timezone(self::STANDARD_TZ)\n ->daily();\n\n// $schedule->command('lms:daily-usage --user=kyle --user=gjacob --user=jordan')\n// ->timezone(self::STANDARD_TZ)\n// ->daily();\n\n $schedule->command('lms:daily-usage --user=gjacob --user=jordan')\n ->timezone(self::STANDARD_TZ)\n ->daily();\n\n $schedule->command('lms:automotive-weekly-usage')\n ->timezone(self::STANDARD_TZ)\n ->weeklyOn('5');\n\n $schedule->command('lms:non-automotive-weekly-usage')\n ->timezone(self::STANDARD_TZ)\n ->weeklyOn('5');\n\n $schedule->command('lms:video_notification')\n ->timezone(self::STANDARD_TZ)\n ->daily();\n\n $schedule->command('dealer:sidebar')\n ->timezone(self::STANDARD_TZ)\n ->dailyAt('00:02');\n }", "title": "" }, { "docid": "2b90fca701e6d8a32ee3e3fc29d19f47", "score": "0.62967", "text": "protected function schedule(Schedule $schedule)\n {\n \n $schedule->command('generate:hydromet')->everyFiveMinutes();\n \n }", "title": "" }, { "docid": "5804b26588b17c4e9b6694d0818e2644", "score": "0.6246623", "text": "protected function schedule(Schedule $schedule)\n {\n\n\n //$schedule->command('servicio:delivery')->dailyAt('14:00');\n //$schedule->command('desactivarreglas:desactivarreglasContrato')->everyMinute(); // CADA MINUTO\n //$schedule->command('alertadesactivarreglas:desactivarreglasmanana')->dailyAt('08:00');\n //$schedule->command('redessociales:publicidadredessociales')->dailyAt('13:59');\n //$schedule->command('redessociales:publicidadredessociales')->dailyAt('15:00');\n }", "title": "" }, { "docid": "3f0d8bbd2c2b06799ac0eb90684f153c", "score": "0.6243292", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('wedbooker:JobMatchReminder')\n ->dailyAt('0:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:JobQuoteReminder')\n ->dailyAt('0:15')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:offerExpirationReminder')\n ->dailyAt('0:30')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:closeExpiredJobPosts')\n ->dailyAt('1:00')->onOneServer()->withoutOverlapping(10);\n \n $schedule->command('wedbooker:bookingDateReminder')\n ->dailyAt('1:30')->onOneServer()->withoutOverlapping(10);\n \n $schedule->command('wedbooker:jobPostExpirationReminder')\n ->dailyAt('2:00')->onOneServer()->withoutOverlapping(10);\n \n $schedule->command('wedbooker:draftJobReminder')\n ->dailyAt('2:10')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('backup:run --only-db')->dailyAt('03:00');\n $schedule->command('backup:clean')->dailyAt('03:20');\n\n $schedule->command('wedbooker:jobQuoteExpirationReminder')\n ->dailyAt('3:30')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:closeExpiredJobQuotes')\n ->dailyAt('4:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:balanceDueReminder')\n ->dailyAt('5:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:sendMorningAccountNotificationSummary')\n ->dailyAt('06:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:sendVendorReviewToCouples')\n ->dailyAt('06:30')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:sendAfternoonAccountNotificationSummary')\n ->dailyAt('16:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:sendMessageInboxSummary')\n ->weekly()->mondays()->at('11:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:sendMessageInboxSummary')\n ->weekly()->fridays()->at('11:00')->onOneServer()->withoutOverlapping(10);\n\n $schedule->command('wedbooker:unreadNotificationReminder')\n ->weekly()->mondays()->when(function() { return date('W') % 2; })->at('12:00')->onOneServer()->withoutOverlapping(10);\n }", "title": "" }, { "docid": "e4a644ca325c569f3ede39523522e808", "score": "0.6232382", "text": "function setSchedule()\r\n {\r\n\r\n }", "title": "" }, { "docid": "f4f1bed74bffedc829a683d15d66baf7", "score": "0.62197053", "text": "function autoSchedule()\r\n {\r\n\r\n }", "title": "" }, { "docid": "851d2e33d6c0cdddb55a048067b9591a", "score": "0.61971545", "text": "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('Inspire')->everyFiveMinutes();\n $schedule->command('backup:database')->everyFiveMinutes();\n }", "title": "" }, { "docid": "b143714d70bf07497eaa786ba0c5919c", "score": "0.6180543", "text": "protected function schedule(Schedule $schedule)\n\t{\n /**\n * This is what we would like to run but Heroku cron on the free plan only runs every 10 minutes.\n * If the minute that it runs doesn't exactly pass the regular expression for our commands (e.g on the stroke of\n * midnight and every 10 minutes past the hour), then our commands will never run.\n * For that reason these have been commented out and moved to the cron schedule. They remain here for future\n * use and for documentation on what commands need to be regularly run.\n */\n //$schedule->command('pocket:synchronise')->daily()->withoutOverlapping();\n //$schedule->command('article:run-all')->everyTenMinutes()->withoutOverlapping();\n\t}", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.6178192", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.6178192", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.6178192", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.6178192", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.6178192", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "e6d78e0eb6c61a5f682e3e7aac58c54d", "score": "0.6172674", "text": "protected function schedule(Schedule $schedule)\n {\n /*$schedule->command('inspire')\n ->hourly();*/\n $schedule->call(function(){\n DB::table('rg')->insert(['name'=>'huangbiao']);\n })->hourly();\n /* $schedule->call(function(){\n DB::table('user')->insert(['name'=>'hunagbiao']);\n })->hourly();\n //operating system commands\n $schedule->exec('ls -al')->daily();\n $schedule->exec('ls -alh')->monthly()->when(function(){\n return true;\n });\n //Preventing Task Overlaps\n //scheduled tasks will be run even if the previous \n //instance of the task is still running. To prevent this, you may use the withoutOverlapping method:\n $schedule->command('emails:send')->hourly()->withoutOverlapping();\n\n //Task output\n $schedule->command('email:send')->hourly()->sendOutputTo($filepath);\n $schedule->command('email:send')->monthly()->appendOutputTo($filepath);\n \n\n //Task Hooks\n //Using the before and after methods, \n //you may specify code to be executed before and after the scheduled task is complete:\n $schedule->command('email:send')->dailyAt('12:00')->before(function(){\n //some code\n })->after(function(){\n //some code \n });\n\n\n //Pingind URLs\n //Using the pingBefore and thenPing methods, \n //the scheduler can automatically ping a given URL before or after a task is complete.\n //This method is useful for notifying an external service, \n //such as Laravel Envoyer, that your scheduled task is commencing or complete:\n\n $schedule->command('email:send')->at('12:32')->pingBefore($url)->thenPing($url);\n\n */\n /*constraints\n ->cron('* * * * * *'); Run the task on a custom Cron schedule\n ->everyMinute(); Run the task every minute\n ->everyFiveMinutes(); Run the task every five minutes\n ->everyTenMinutes(); Run the task every ten minutes\n ->everyThirtyMinutes(); Run the task every thirty minutes\n ->hourly(); Run the task every hour\n ->daily(); Run the task every day at midnight\n ->dailyAt('13:00'); Run the task every day at 13:00\n ->twiceDaily(1, 13); Run the task daily at 1:00 & 13:00\n ->weekly(); Run the task every week\n ->monthly(); Run the task every month\n ->yearly(); Run the task every year\n ->weekdays(); Limit the task to weekdays\n ->sundays(); Limit the task to Sunday\n ->mondays(); Limit the task to Monday\n ->tuesdays(); Limit the task to Tuesday\n ->wednesdays(); Limit the task to Wednesday\n ->thursdays(); Limit the task to Thursday\n ->fridays(); Limit the task to Friday\n ->saturdays(); Limit the task to Saturday\n ->when(Closure); Limit the task based on a truth test\n */\n }", "title": "" }, { "docid": "705595989791695f952fe41c6f066e94", "score": "0.6159021", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command( DeleteChatMessageMore30Day::class)->dailyAt('1:00')->timezone('Europe/Madrid');\n $schedule->command( DeleteOutTimeAccount::class)->dailyAt('2:00')->timezone('Europe/Madrid');\n $schedule->command( UserMailToConfirmAccount::class)->dailyAt('3:00')->timezone('Europe/Madrid');\n $schedule->command( MailReminderYearly::class)->dailyAt('4:00')->timezone('Europe/Madrid');\n $schedule->command( CheckCapsuleToOpen::class)->dailyAt('5:00')->timezone('Europe/Madrid');\n $schedule->command('queue:work mails --queue=mails')->everyFiveMinutes();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.615892", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "8e0ea7d0d82e723965364c3afc3ca27a", "score": "0.61423045", "text": "protected function schedule(Schedule $schedule)\n\t{\n\t\t// $schedule->command('inspire')\n\t\t// ->hourly();\n\t}", "title": "" }, { "docid": "8e0ea7d0d82e723965364c3afc3ca27a", "score": "0.61423045", "text": "protected function schedule(Schedule $schedule)\n\t{\n\t\t// $schedule->command('inspire')\n\t\t// ->hourly();\n\t}", "title": "" }, { "docid": "04da0f0c979d450ec8a4eab51ae65237", "score": "0.6123874", "text": "public function run()\n {\n App\\Schedule::create([\n 'type'=> 0,\n 'open' => date('H:i:s'),\n 'close' => date('H:i:s'),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n\n App\\Schedule::create([\n 'type'=> 1,\n 'open' => date('H:i:s'),\n 'close' => date('H:i:s'),\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "21cabdbc6af90c5c382a13b4fe4f2bbd", "score": "0.6122525", "text": "protected function schedule(Schedule $schedule)\r\n {\r\n Log::info('time_info',['time'=>'start']);\r\n\r\n $schedule->command('order:release') //订单定时释放\r\n ->everyTenMinutes();\r\n\r\n $schedule->command('order:receive') //订单定时收货\r\n ->daily();\r\n\r\n $AdminConfig = AdminConfig::where(['name'=>'market_status'])->first();\r\n if (!empty($AdminConfig['description'])) {\r\n Log::info('admin_config',['info'=>'market_status']);\r\n $time = explode(',', $AdminConfig['description']);\r\n switch ($AdminConfig['value']) {\r\n case '1':\r\n $schedule->call(function () {\r\n AdminConfig::where(['name'=>'market_status'])->update(['value'=>2]);\r\n Log::info('admin_config_value',['value'=>2]);\r\n Cache::forget('market_status');\r\n })->dailyAt($time[0]);\r\n break;\r\n case '2':\r\n $schedule->call(function () {\r\n AdminConfig::where(['name'=>'market_status'])->update(['value'=>1]);\r\n Log::info('admin_config_value',['value'=>1]);\r\n Cache::forget('market_status');\r\n })->dailyAt($time[1]);\r\n break;\r\n }\r\n }\r\n\r\n $schedule->command('goods:synchronize') //商品同步ERP自动处理\r\n ->daily();\r\n\r\n $schedule->command('index:data') //每天同步指数信息\r\n ->daily();\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "51355c8ac0f40458194728493060f1a3", "score": "0.6105607", "text": "function SUNRAIL_API_Schedule()\n {\n do_action(\"sunrail_api_{$this->type}_constructor\", $this);\n }", "title": "" }, { "docid": "89691ec1c8b4e13dee3fc0faf95d54e1", "score": "0.60950315", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n //update elapsed pair payer\n $schedule->command('app:update-elapse-payer')\n ->hourly()\n ->appendOutputTo( storage_path('commands/elapsed-payers.txt') );\n ;\n\n //pair payers to a receiver\n $schedule->command('app:pair')\n ->twiceDaily(12, 18)\n ->appendOutputTo(storage_path('commands/pairing-output.txt'));\n\n //update elapsed pair\n// $schedule->command('app:update-pair')\n// ->dailyAt('11:00')\n// ->appendOutputTo(storage_path('commands/update-pair.txt'));\n\n //make successful payers receivers\n $schedule->command('app:make-receivers')\n ->dailyAt('11:50')\n ->appendOutputTo(storage_path('commands/receivers.txt'));\n\n $schedule->command('app:make-receivers')\n ->dailyAt('17:50')\n ->appendOutputTo(storage_path('commands/receivers.txt'));\n\n }", "title": "" }, { "docid": "9ba0b856ca20ce82380d9f32540572bb", "score": "0.606297", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('dashboard:heartbeat')\n ->everyMinute()\n ->between('7:00', '18:00');\n\n $schedule->command('dashboard:sonos')\n ->everyMinute()\n ->between('7:00', '18:00');\n\n $schedule->command('dashboard:calendar')\n ->everyFiveMinutes()\n ->between('7:00', '18:00');\n\n $schedule->command('dashboard:slack')\n ->everyFiveMinutes()\n ->between('7:00', '18:00');\n }", "title": "" }, { "docid": "c469ac18e4bcdab038d45bb9f8679cc3", "score": "0.6058248", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('send_emails')\n ->everyTenMinutes();\n $schedule->command('playlist_loop')\n ->everyMinute();\n $schedule->command('check_ads')\n ->twiceDaily(12, 23);\n $schedule->command('check_trial')\n ->twiceDaily(12, 23);\n $schedule->command('clear_statistics')\n ->monthly();\n }", "title": "" }, { "docid": "12f158fb4b85a2d4466de8485250783e", "score": "0.6039777", "text": "public function schedule(Schedule $schedule)\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "63d2ba6cf07d1c1a542867c6ac3cfd1a", "score": "0.6035635", "text": "public function run()\n {\n $appDefaultSett = [\n \t[\n \t\t'no_of_months_for_cal' => 1,\n \t]\n\n ];\n\n $times = [\n [\n 'time' => '09:00:00',\n ],\n [\n 'time' => '10:00:00',\n ],\n [\n 'time' => '11:00:00',\n ],\n [\n 'time' => '12:00:00',\n ],\n [\n 'time' => '13:00:00',\n ],\n [\n 'time' => '14:00:00',\n ],\n [\n 'time' => '15:00:00',\n ],\n [\n 'time' => '16:00:00',\n ],\n [\n 'time' => '17:00:00',\n ],\n [\n 'time' => '18:00:00',\n ],\n [\n 'time' => '19:00:00',\n ],\n [\n 'time' => '20:00:00',\n ],\n [\n 'time' => '21:00:00',\n ],\n [\n 'time' => '22:00:00',\n ],\n ];\n\n AppDefaultSetting::insert($appDefaultSett);\n TimeSetting::insert($times);\n }", "title": "" }, { "docid": "f94a854559f3af29e6928c262c9b9a0a", "score": "0.6006349", "text": "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('feed:parse 2')\n //->dailyAt('01:00')\n //->everyFiveMinutes()\n //->sendOutputTo(storage_path().'/logs/console_log.txt')->emailOutputTo('[email protected]');\n //$schedule->dispatch(new SendReminderEmail())->everyFiveMinutes();\n $schedule->command('feed:check')\n ->dailyAt('01:00');\n //$schedule->command('parse:file')\n //->everyTemMinutes();\n }", "title": "" }, { "docid": "10dee195f0269a13dba6d2d5ef7f156d", "score": "0.6003442", "text": "public function run()\n {\n Schedule::create([\n 'doctor_id' => '4',\n 'weekday' => 'Monday',\n 'start_time' => '10:00',\n 'end_time' => '12:00',\n ]);\n }", "title": "" }, { "docid": "2a04bfd38ab178d681548fbd69241d7d", "score": "0.5993427", "text": "protected function schedule(Schedule $schedule)\n {\n $filePath = '/var/data/www/sites/ccb/storage/logs/artisan.log';\n $baseFilePath = '/var/data/www/sites/ccb/storage/logs/';\n\n // Telegram Raid Event Notification\n $schedule->command('send:TelegramRaidNotifications')->everyMinute();\n\n // D2 Manifest\n $schedule->command('update:manifest')->weeklyOn(env('DESTINY_RESET_DAY'), env('DESTINY_RESET_HOUR').':03'); //->appendOutputTo($baseFilePath . 'manifest.log'); // After Reset\n\n // Member Aliases\n $schedule->command('update:memberAlias')->hourly(); //->appendOutputTo($baseFilePath . 'alias.log');\n\n // Member Characters\n $schedule->command('update:characters')->hourly(); //->appendOutputTo($baseFilePath . 'characters.log');\n\n // Member Exotic Collection\n // $schedule->command('update:memberExotic')->hourlyAt(30)->appendOutputTo($baseFilePath . 'exotics.log');\n\n // Member Platform Profile\n $schedule->command('update:memberPlatformProfile')->hourlyAt(15); //->appendOutputTo($baseFilePath . 'platform.log');\n\n // Seal Progression\n $schedule->command('update:seals')->hourly(); //->appendOutputTo($baseFilePath . 'seals.log');\n\n // Milestones\n $schedule->command('update:milestones')->hourlyAt(2); //->appendOutputTo($baseFilePath . 'milestones.log');\n $schedule->command('update:milestones')->weeklyOn(env('DESTINY_RESET_DAY'), env('DESTINY_RESET_HOUR').':05'); //->appendOutputTo($baseFilePath . 'milestones.log'); // After Reset\n\n $schedule->command('update:nightfalls')->hourlyAt(2); //->appendOutputTo($baseFilePath . 'nightfalls.log');\n $schedule->command('update:nightfalls')->weeklyOn(env('DESTINY_RESET_DAY'), env('DESTINY_RESET_HOUR').':05'); //->appendOutputTo($baseFilePath . 'nightfalls.log'); // After Reset\n\n // Vendor Stuff\n $schedule->command('update:vendors')->hourlyAt(2); //->appendOutputTo($baseFilePath . 'vendors.log');\n $schedule->command('update:vendors')->weeklyOn(env('DESTINY_RESET_DAY'), env('DESTINY_RESET_HOUR').':05'); //->appendOutputTo($baseFilePath . 'vendors.log'); // After Reset\n\n // Telegram Xur Notification - Ensure after Vendor\n $schedule->command('send:TelegramXurNotifications')->weeklyOn(6, env('XUR_TELEGRAM_NOTIFY_TIME')); //->appendOutputTo($baseFilePath . 'telegram.log'); // After Reset\n\n // Raid lockouts\n // $schedule->command('update:lockouts')->everyFifteenMinutes()->appendOutputTo($baseFilePath . 'lockouts.log');\n\n // Stats\n $schedule->command('update:raidStats')->daily(); //->appendOutputTo($baseFilePath . 'stats.log');\n $schedule->command('update:PVEStats')->daily(); //->appendOutputTo($baseFilePath . 'stats.log');\n $schedule->command('update:PVPStats')->daily(); //->appendOutputTo($baseFilePath . 'stats.log');\n $schedule->command('update:GambitStats')->daily(); //->appendOutputTo($baseFilePath . 'stats.log');\n $schedule->command('update:GambitPrimeStats')->daily(); //->appendOutputTo($baseFilePath . 'stats.log');\n // $schedule->command('update:TrialsStats')->everyFifteenMinutes()->appendOutputTo($baseFilePath . 'stats.log');\n }", "title": "" }, { "docid": "58d141ea02070a11157631582d36b8ff", "score": "0.59926206", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n // while (1<2) {\n $schedule->command('create:log');\n // ->cron('* * * * *');\n // }\n // ->everyMinute();\n // $schedule->exec(\"curl -XGET 'http://localhost:8000'\")->daily()->everyMinute();\n }", "title": "" }, { "docid": "3f0c8840bde540fac1143beebd5c91fe", "score": "0.5991781", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('run:AutoDates')->daily();\n $schedule->command('run:Frequency')->daily();\n $schedule->command('run:birthday')->daily();\n $schedule->command('run:queues')->everyMinute();\n }", "title": "" }, { "docid": "933ff4161d7a01be8bc2069fa4cf068f", "score": "0.5990821", "text": "protected function configure()\n { $this\n ->setName('bot:calendar:process')\n ->setDescription(\"Process and save calendars to database as events\");\n }", "title": "" }, { "docid": "621032c78a9bff13d60e1dfbea42319d", "score": "0.59824", "text": "protected function schedule(Schedule $schedule)\n {\n\n $schedule->command('scrape:theme --page=1-3 --provider=themeforest')\n ->twiceDaily(9, 13);\n $schedule->command('scrape:plugin --page=1-3 --provider=themeforest')\n ->twiceDaily(9, 13);\n\n\n }", "title": "" }, { "docid": "617fbc61ebbec86b12cc2283d6fabd23", "score": "0.59625745", "text": "function globe_create_cron_schedule($schedules = '') {\n $schedules['every5minutes'] = array(\n 'interval' => 300,\n 'display' => __('Every five minutes'),\n );\n return $schedules;\n}", "title": "" }, { "docid": "5bc72d15b61252556c95a8893cf57b06", "score": "0.5960325", "text": "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n\n\n $schedule->command('followers:pull')\n ->cron('*/3 * * * *')\n ->withoutOverlapping();\n\n $schedule->command('SharePriceCalculator:calculate')->monthly();\n $schedule->command('KloutScoreCalculator:calculate')->daily();\n $schedule->command('twitteruser:pull')->cron('*/15 * * * *')->withoutOverlapping();\n $schedule->command('tweets:pull')->cron('*/15 * * * *')->withoutOverlapping();\n $schedule->command('subscription:check')->daily();\n\n }", "title": "" }, { "docid": "cf16c2fdc6870e8039337b819974acd4", "score": "0.59575176", "text": "protected function schedule(Schedule $schedule)\n {\n // 春蚕\n // $schedule->command('spring:end')\n // ->dailyAt('01:00')\n // // ->everyMinute()\n // ->sendOutputTo('/spring.log');\n $schedule->command('spring:start')\n ->dailyAt('01:30')\n // ->everyMinute()\n ->sendOutputTo('/spring.log');\n\n // 融通四海\n $schedule->command('rtsh:object')\n ->dailyAt('02:00')\n // ->everyMinute()\n ->sendOutputTo('/rtsh.log');\n\n // 每日赠送10\n $schedule->command('give:day')\n ->dailyAt('02:30')\n // ->everyMinute()\n ->sendOutputTo('/giveDay.log');\n\n // 年费检查\n $schedule->command('year:fee')\n ->dailyAt('03:00')\n // ->everyMinute()\n ->sendOutputTo('/yearFee.log');\n // 开拓积分到期检查\n $schedule->command('point:open')\n ->dailyAt('03:30')\n // ->everyMinute()\n ->sendOutputTo('/pointopen.log');\n }", "title": "" }, { "docid": "7e06d37afcc5c38d3b342ebfea27067d", "score": "0.5957362", "text": "public function cronAction() {\n\n\t\tif(SettingController::get('CRON_ACTIVE') == 1){\n\t\t\t\n\t\t\t/*\n\t\t\t * Find the PHP5.3 executable\n\t\t\t */\n\t\t\t$php_to_run = MagicUtils::get_php_binary();\n\t\t\t//MagicLogger::log(\"PHP binary: {$php_to_run}\");\n\t\t\t//$message_lines[] = \"PHP binary: {$php_to_run}\";\n\t\t\t/*\n\t\t\t * Decide what to run\n\t\t\t */\n\t\t\t$crons_to_run = array();\n\t\t\t$crons_to_run[] = \"minute\";\n\t\t\t$time_to_run_nightly = strtotime(\"today 00:00\");\n\t\t\t$time_to_run_daily = strtotime(\"today 12:00\");\n\t\t\tif (time() > $time_to_run_nightly && time() < $time_to_run_nightly + 60) {\n\t\t\t\t$crons_to_run[] = \"nightly\";\n\t\t\t}\n\t\t\tif (time() > $time_to_run_daily && time() < $time_to_run_daily + 60) {\n\t\t\t\t$crons_to_run[] = \"daily\";\n\t\t\t}\n\t\t\tif (date(\"i\") == \"00\") {\n\t\t\t\t$crons_to_run[] = \"hourly\";\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Gather files\n\t\t\t */\n\t\t\t$files_to_run = array();\n\t\t\tif (in_array(\"minute\", $crons_to_run)) {\n\t\t\t\t$files_to_run = array_merge($files_to_run, (array)MagicUtils::get_directory_list(DIR_APP . \"/cron/minute\"));\n\t\t\t}\n\t\t\tif (in_array(\"nightly\", $crons_to_run)) {\n\t\t\t\t$files_to_run = array_merge($files_to_run, (array)MagicUtils::get_directory_list(DIR_APP . \"/cron/nightly\"));\n\t\t\t}\n\t\t\tif (in_array(\"daily\", $crons_to_run)) {\n\t\t\t\t$files_to_run = array_merge($files_to_run, (array)MagicUtils::get_directory_list(DIR_APP . \"/cron/daily\"));\n\t\t\t}\n\t\t\tif (in_array(\"hourly\", $crons_to_run)) {\n\t\t\t\t$files_to_run = array_merge($files_to_run, (array)MagicUtils::get_directory_list(DIR_APP . \"/cron/hourly\"));\n\t\t\t}\n\t\t\t//MagicLogger::log(\"Crons to run: \" . implode(\", \", $crons_to_run));\n\n\t\t\t/*\n\t\t\t * Sort the files by name\n\t\t\t */\n\t\t\tsort($files_to_run);\n\n\t\t\t/*\n\t\t\t * Crunch through files\n\t\t\t */\n\t\t\tforeach ($files_to_run as $file_to_run) {\n\t\t\t\t//Make the string that exec() is going to exec.\n\t\t\t\t$file_to_run = trim($file_to_run);\n\t\t\t\t$run = \"{$php_to_run} {$file_to_run}\";\n\t\t\t\t//Log the execution line\n\t\t\t\tMagicLogger::log(\"\");\n\t\t\t\tMagicLogger::log(\"Executing: {$run}\");\n\t\t\t\t$message_lines[] = \"Executing: {$run}\";\n\t\t\t\t//Execute...\n\t\t\t\t$this_run_output = array();\n\t\t\t\texec($run, $this_run_output);\n\n\t\t\t\t//Log the execution result\n\t\t\t\tforeach ($this_run_output as $line) {\n\t\t\t\t\t$line = \" > \" . $line;\n\t\t\t\t\techo $line . \"\\n\";\n\n\t\t\t\t\t$message_lines[] = $line;\n\t\t\t\t}\n\t\t\t\t$message_lines[] = '';\n\t\t\t}\n\n\t\t\t//Add some more data about the crontab that just ran\n\t\t\t$message_lines[] = \"Run on \" . date(\"F j, Y, g:i a\");\n\t\t\t$message_lines[] = \"Crontab minute run - \" . date(\"Y/m/d H:i:s\");\n\t\t\t$message_lines[] = print_r($files_to_run, true);\n\n\t\t\t//Email the cron results\n\t\t\tif (MagicConfig::get(\"EMAIL_ON_EVERY_CRON\") == \"true\") {\n\t\t\t\tMail::Factory()->set_subject(APPNAME . \" crontab - \" . implode(\", \", $crons_to_run))->set_message(implode(\"\\n\", $message_lines))->save()->send();\n\t\t\t}\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "974cd678221db67e971d901daa6a0bc8", "score": "0.595628", "text": "protected function schedule(Schedule $schedule)\n {\n\t\t$schedule->command('getForwardPointsFromFTP')\n\t\t\t->hourlyAt(7)\n\t\t\t->weekdays()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('getFuturesFromCME')\n\t\t\t->hourlyAt(17)\n\t\t\t->weekdays()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('getYahooRates')\n\t\t\t->twiceDaily()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('sendEndSubscriptionEmail')\n\t\t\t->daily()\n\t\t\t->withoutOverlapping();\n\n $schedule->command('getOptionExpirations')\n\t\t\t->daily()\n\t\t ->weekdays()\n\t\t\t->withoutOverlapping();\n\t \n\t\t$schedule->command('updateUserSubscriptions')\n\t\t\t->twiceDaily(1, 18)\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('checkPayments')\n\t\t\t->everyMinute()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('getWeeklyFromFile')\n\t\t\t->cron('*/2 * * * * *')\n\t\t\t->weekdays()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('getMonthlyFromFile')\n\t\t\t->cron('*/2 * * * * *')\n\t\t\t->weekdays()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('getUsaFromFile')\n\t\t\t->cron('*/2 * * * * *')\n\t\t\t->weekdays()\n\t\t\t->withoutOverlapping();\n\n\t\t$schedule->command('getWednesdayFromFile')\n\t\t\t->cron('*/2 * * * * *')\n\t\t\t->weekdays()\n\t\t\t->withoutOverlapping();\n }", "title": "" }, { "docid": "8bef293e557c5b92a2f3eacc11d99830", "score": "0.59495306", "text": "protected function schedule(Schedule $schedule)\n {\n //$start_date = date('Y-m-d', strtotime(\"-1 days\"));\n //var_dump($start_date);\n //exit;\n //$schedule->command('cronjob:autoinit')->everyMinute()->between('3:05', '24:00');;\n $start_date = date('Y-m-d H:i:s');\n echo $start_date.\"\\n\";\n \n $schedule->command('cronjob:autoinit')\n ->dailyAt('0:05');\n \n $schedule->command('cronjob:autoupdate')\n ->everyFiveMinutes()\n ->between('0:15', '15:00');\n }", "title": "" }, { "docid": "6bd0f34d70d50cf5cbd87edc77df225d", "score": "0.59355134", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('low:price')\n ->everyMinute();\n $schedule->command('verify:account')\n ->everyMinute();\n \n $schedule->command('horizontal:support')->everyMinute();//bigchief\n $schedule->command('moving:average')->everyMinute();//bigchief\n\n $schedule->command('closing:ico')->everyMinute();\n }", "title": "" }, { "docid": "8fd2a71f4a8abb326a7cfeb77248035d", "score": "0.5923976", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();\n $schedule->command('syncpipedrive')->everyMinute();\n }", "title": "" }, { "docid": "bd325104d4ca7409cbf75137b4466715", "score": "0.59218633", "text": "protected function schedule(Schedule $schedule)\n\t{\n\n\t\t$schedule->call(function () {\n\t\t\tif (Cache::get('sys::settings::reset_next-day')) {\n\t\t\t\tCache::forever('sys::settings::run_dial', true);\n\t\t\t\tCache::forever('sys::settings::run_re-dial', true);\n\t\t\t\tCache::forever('sys::settings::check-missing-credits', true);\n\t\t\t}\n\t\t})->name('check_for_reset')->dailyAt('3:00');\n\n\t\t$schedule->command(GetCredits::class)\n\t\t\t->name('get_credits')\n\t\t\t->dailyAt('3:30');\n\n//\t\t$schedule->command(ReadUSBList::class)\n//\t\t\t->name('read_usd')\n//\t\t\t->dailyAt('3:45');\n//\n//\t\t$schedule->command(CreateSchedule::class)\n//\t\t\t->name('create_schedule')\n//\t\t\t->dailyAt('5:00');\n\n\t\t$schedule->command(GetCredits::class, ['yes'])\n\t\t\t->name('get_credits_yes')\n\t\t\t->between('5:50', '23:55')\n\t\t\t->everyFiveMinutes();\n\n//\t\tif (Cache::get('sys::settings::check-missing-credits')) {\n//\t\t\t$schedule->command(ExtendMissingCredits::class)\n//\t\t\t\t->name('missing_credits')\n//\t\t\t\t->between('10:00', '23:00')\n//\t\t\t\t->everyFiveMinutes();\n//\t\t}\n\n//\t\tif (Cache::get('sys::settings::run_dial')) {\n//\t\t\t$schedule->command(RunCaller::class)\n//\t\t\t\t->name('voip_scheduler_caller')\n//\t\t\t\t->everyMinute()\n//\t\t\t\t->between('6:00', '23:55')\n//\t\t\t\t->withoutOverlapping();\n//\t\t}\n//\n//\t\tif (Cache::get('sys::settings::run_re-dial')) {\n//\t\t\t$schedule->command(RunReCaller::class)\n//\t\t\t\t->name('voip_scheduler_recall')\n//\t\t\t\t->cron('*/3 * * * *')\n//\t\t\t\t->between('6:00', '23:55')\n//\t\t\t\t->withoutOverlapping();\n//\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "5e32e8177df111ed721a7dc683754378", "score": "0.5919547", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command(LoadSqlAdbCommand::class)->dailyAt(\"00:00\");\n\n $schedule->command(LoadMongoDBCommand::class)->dailyAt(\"00:30\");\n\n $schedule->command(LoadNeo4jCommand::class)->dailyAt(\"01:00\");\n }", "title": "" }, { "docid": "850f2bc064f4c177d0211043e4e767e4", "score": "0.5917199", "text": "public function run()\n {\n Schedule::create([\n 'name'=> 'Vespertino',\n 'begin_at'=> '2018-11-23 19:00:00',\n 'finish_at'=> '2018-11-23 20:00:00'\n ]);\n }", "title": "" }, { "docid": "3e0bb3b6001ed04aae4e35e611854b7f", "score": "0.5913767", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('tag_static:run team')->everyFiveMinutes();\n $schedule->command('tag_static:run league')->everyFiveMinutes();\n// $schedule->command('record_cache:run detail')->everyFiveMinutes();//录像终端静态化,静态化完他就不会执行逻辑了\n\n //足球、篮球比赛 数据同步 开始\n $schedule->command('sync_update_football_matches:run')->everyMinute();\n $schedule->command('sync_update_basketball_matches:run')->everyMinute();\n //$schedule->command('sync_live_matches:run')->everyMinute();\n //足球、篮球比赛 数据同步 结束\n\n $schedule->command('live_json_cache:run')->everyMinute();//每分钟刷新一次赛事缓存\n $schedule->command('index_cache:run all')->everyMinute();//每分钟刷新主页缓存\n\n //$schedule->command('live_detail_cache:run')->everyFiveMinutes();//每5分钟刷新终端缓存 在保存的时候静态化\n $schedule->command('lh_channel:run all')->everyFiveMinutes();//刷新乐虎直播线路\n\n $schedule->command('player_json_cache:run')->everyFiveMinutes();//->everyMinute();//5分钟刷新一次正在直播的比赛的线路内容 在保存的时候静态化\n //$schedule->command('ns_player_json_cache:run')->everyFiveMinutes();//->everyMinute();//5分钟刷新一次未开始比赛的线路内容 一小时内执静态化所有的json 在保存的时候静态化\n\n $schedule->command('delete_cache:run')->dailyAt('07:00');//每天删除一次文件\n\n //$schedule->command('mobile_detail_cache:run')->everyMinute();//每五分钟刷新移动直播终端缓存\n\n $mController = new LiveController();\n $schedule->call(function () use ($mController) {\n $mController->matchLiveStatic(new Request());//每分钟刷新比赛状态数据\n })->everyMinute();\n\n //appsocket相关\n //静态化app主播接口 /app/v120/anchor/index.json , /app/v120/anchor/room/url/26.json , /app/v120/anchor/living.json\n //$schedule->command(\"anchor_living_cache:run\")->everyMinute();\n \n //主播定时任务\n //$schedule->command(\"anchor_index_cache:run all\")->everyMinute();//每分钟静态化主播主页\n// $schedule->command(\"anchor_detail_cache:run all\")->everyTenMinutes();//每10分钟静态化主播终端页\n //$schedule->command(\"anchor_json_cache:run\")->everyMinute();//每分钟静态化队列里面的内容\n\n// $schedule->command(\"anchor_check_stream:run\")->everyMinute();//每分钟检查主播的直播流是断开\n //$schedule->command(\"anchor_key_frame:run\")->everyMinute();//每分钟获取直播的直播流的关键帧并且检测流是否存在\n\n\n //文章静态化定时任务\n $schedule->command(\"article_lives:run\")->everyMinute();\n $schedule->command(\"article_page:run all\")->everyFiveMinutes();\n $schedule->command(\"article_cache:run\")->everyTenMinutes();\n\n $schedule->command('spider_ttzb:run')->hourlyAt(10);\n\n //shop接口\n $schedule->command('shop_living_json:run')->everyMinute();\n\n //百度主动推送,一小时一次\n $schedule->command('baidu_push:run all')->hourlyAt(20);\n\n $schedule->command('db_spread_cache:run')->everyTenMinutes();\n\n //$schedule->command('ttzb_player_json_cache:run')->cron('*/2 * * * *');//2分钟刷新一次天天直播的线路。\n\n //视频 静态化\n $schedule->command('hot_video_page_cache:run tab')->everyFiveMinutes();//5分钟刷新一次视频分页静态化 右侧tab栏分页\n $schedule->command('hot_video_page_cache:run league')->everyFiveMinutes();//5分钟刷新一次视频分页静态化 左侧 赛事、联赛\n $schedule->command('hot_video_page_cache:run tag')->everyFiveMinutes();//5分钟刷新一次视频分页静态化 左侧 球员\n\n //专题静态化\n //$schedule->command('subject_cover_sync:run')->everyFiveMinutes();//->everyMinute();//5分钟同步一次专题封面 待优化\n //$schedule->command('subject_leagues_json:run')->everyFiveMinutes();//->everyMinute();//5分钟刷新一次专题列表json 待优化\n $schedule->command('subject_detail_cache:run all')->everyFiveMinutes();//->everyMinute();//10分钟刷新一次专题终端 待优化\n\n //百度sitemap生成器,一天两次\n $schedule->command('generate:sitemap')->twiceDaily(1, 18);\n\n //数据,一天一次\n $schedule->command('data_cache:run index')->dailyAt(\"7:20\");\n $schedule->command('data_cache:run league')->dailyAt(\"7:20\");\n }", "title": "" }, { "docid": "4eefb9e2ebb803cd5b189b8dad79e593", "score": "0.58989376", "text": "protected function schedule(Schedule $schedule)\n {\n// //執行排程\n// $schedule->command('CouponSnSendJob:CouponSnSendJob')\n// ->everyMinute();\n }", "title": "" }, { "docid": "1a0b70b77c6b2e385587829e5494185a", "score": "0.5894759", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('vk:messages')\n ->everyMinute();\n //guess for debug reasons - had incident on GroupChat leave message hang\n $schedule->command('cache:clear')\n ->hourly();\n\n\n\n //!!!! REBELISH FEATURE LIST\n if (Config::get('app.mode') == 'rebel'){\n\n $schedule->command('vk:trigger 1 1 1')\n ->everyTenMinutes();\n $schedule->command('vk:trigger')\n ->daily(); \n }\n\n }", "title": "" }, { "docid": "f75baef98c3a8d2213f293a9d2efa85e", "score": "0.5889031", "text": "protected function schedule(Schedule $schedule)\n {\n // Sync Bible Equivalents\n $schedule->command('SyncEbible')->daily();\n $schedule->command('SyncTalkingBibles')->daily();\n\n $schedule->command('BackUpLogs')->cron('5 * * * *');\n }", "title": "" }, { "docid": "682a16c49e02f545a3a2ec911b838078", "score": "0.5885758", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('ollyxpic:highscores')->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['magic'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['sword'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['axe'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['club'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['distance'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['shielding'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['achievements'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['loyalty'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['fist'])->dailyAt('04:00');\n $schedule->command('ollyxpic:skills', ['fishing'])->dailyAt('04:00');\n $schedule->command('ollyxpic:online')->everyFiveMinutes();\n $schedule->command('purge:log')->everyTenMinutes();\n }", "title": "" }, { "docid": "0efefe6f0f30dd73f9ef8826ee5e97f6", "score": "0.5881832", "text": "protected function schedule(Schedule $schedule)\n {\n /**\n * Crawling task\n */\n $schedule->command(\"crawl:run\")->everyMinute()->name(\"crawl-sites\");\n /**\n * Sync user task\n */\n $schedule->command(\"sync:run\")->everyMinute()->name(\"sync-users\");\n /**\n * Report task\n */\n $schedule->command(\"report:run\")->everyMinute()->name(\"reports\");\n }", "title": "" }, { "docid": "e3287129cb0af2e91a0cb1ebb8b9745e", "score": "0.5870446", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n // \n \n \n $beisbolID = Clase::where('name', 'Baseball')->first()->id;\n $hockeyID = Clase::where('name', 'NHL')->first()->id;\n $futbolAmericanoID = Clase::where('name', 'American Football')->first()->id;\n $baloncestoID = Clase::where('name', 'American Football')->first()->id;\n $minutosBeisbol = TiempoLectura::where('clase_id', $beisbolID)->first()->minutos;\n $minutosHockey = TiempoLectura::where('clase_id', $hockeyID)->first()->minutos;\n $minutosFutbolAmericano = TiempoLectura::where('clase_id', $futbolAmericanoID)->first()->minutos;\n $minutosBaloncesto = TiempoLectura::where('clase_id', $baloncestoID)->first()->minutos;\n\n $schedule->command('xml:beisbol')->cron('/'.$minutosBeisbol.' * * * * *');\n $schedule->command('xml:hockey')->cron('/'.$minutosHockey.' * * * * *');\n $schedule->command('xml:futbolAmericano')->cron('/'.$minutosFutbolAmericano.' * * * * *');\n $schedule->command('xml:baloncesto')->cron('/'.$minutosBaloncesto.' * * * * *');\n\n }", "title": "" }, { "docid": "c68b51bc6f7cf3702cbd39e9fd06a0b5", "score": "0.5859268", "text": "protected function configure()\n {\n $this->setName('wyomind:cronscheduler:task:show')\n ->setDescription(__('Cron Scheduler : get details of a task'))\n ->setDefinition([\n new \\Symfony\\Component\\Console\\Input\\InputArgument(\n self::TASK_ID_ARG, \\Symfony\\Component\\Console\\Input\\InputArgument::REQUIRED, __('The id of the task')\n )\n ]);\n parent::configure();\n }", "title": "" }, { "docid": "06e2d00978c93a34b6ed743ed77c9169", "score": "0.58589137", "text": "protected function schedule(Schedule $schedule)\n {\n $env_name = env('APP_ENV');\n $env_name = \"production\";\n $filePath = env('LOG_DIR') . \"/smart.log\";\n\t# run every hour\n $schedule->command(\"smart $env_name\")->cron(\"0 */6 * * * *\")->sendOutputTo($filePath);\n\n }", "title": "" }, { "docid": "b6445b16da01b333a53f7bee6a745622", "score": "0.5858058", "text": "protected function schedule(Schedule $schedule)\n {\n //\n $schedule->command('case:cron-update-data')->hourly()->withoutOverlapping()->sendOutputTo(\"/Library/WebServer/Documents/api/storage/logs/log.txt\");\n $schedule->command('case:cron-update-listing')->hourly()->withoutOverlapping()->sendOutputTo(\"/Library/WebServer/Documents/api/storage/logs/listinglog.txt\");\n //$schedule->command('queue:work --tries=10')->everyMinute()->withoutOverlapping()->sendOutputTo(\"/Library/WebServer/Documents/api/storage/logs/worklog.txt\");\n }", "title": "" }, { "docid": "4ac2d0c3f46acea8f27acb14086d7d60", "score": "0.5845198", "text": "public function set_cron_task(): void\n {\n try {\n add_filter('cron_request', [$this, 'change_cron_scheme'], 10, 1);\n add_filter('cron_schedules', [$this, 'create_interval'], 50, 1);\n add_action('init', [$this, 'add_new_task'], 50);\n\n if (defined('DOING_CRON') && DOING_CRON) {\n add_action($this->slug, [$this, 'run_task'], 50);\n }\n } catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "49f71e127ad389f2fd1f6a002a3ed71c", "score": "0.5834965", "text": "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('notify:email')\n// ->timezone('Asia/Dhaka')\n// ->dailyAt('16:00');\n//\n// $schedule->command('backup:database')\n// ->timezone('Asia/Dhaka')\n// ->weeklyOn(1, '14:00');\n\n $schedule->command('make:csv-import')\n ->timezone('Asia/Dhaka')\n ->everyTenMinutes();\n }", "title": "" }, { "docid": "8f278eef92a982382ce4a8a3ea3ad4b7", "score": "0.5831049", "text": "protected function schedule(Schedule $schedule)\n {\n //zip files\n $schedule->command('zipFiles')\n ->timezone('Asia/Shanghai')\n ->dailyAt('12:45');\n\n //send emails\n //$schedule->command('sendEmails')\n // ->timezone('Asia/Shanghai')\n //->dailyAt('13:30');\n\n //delete files\n $schedule->command('deleteFiles')\n ->timezone('Asia/Shanghai')\n ->dailyAt('23:50');\n }", "title": "" }, { "docid": "3470eff47c19bb1f44d4d982d4d05b0b", "score": "0.5823434", "text": "protected function schedule(Schedule $schedule)\n {\n // === By Minute === //\n\n $schedule->command('teaman:runner', ['-v'])\n ->everyMinute()\n ->withoutOverlapping();\n\n $schedule->command('networkdata:download')\n ->everyTwoMinutes()\n ->withoutOverlapping(5)\n ->graceTimeInMinutes(10);\n\n $schedule->command('horizon:snapshot')\n ->everyFiveMinutes()\n ->withoutOverlapping()\n ->doNotMonitor();\n\n $schedule->command('visit-transfer:cleanup')\n ->everyTenMinutes();\n\n // === By Hour === //\n\n $schedule->command('members:certupdate')\n ->hourlyAt(10)\n ->graceTimeInMinutes(15);\n\n $schedule->command('sync:cts-roles')\n ->hourlyAt(15)\n ->graceTimeInMinutes(15);\n\n // === By Day === //\n\n $schedule->command('telescope:prune')\n ->dailyAt('03:30')\n ->doNotMonitor();\n\n $schedule->command('sync:tg-forum-groups')\n ->dailyAt('04:30');\n\n $schedule->command('schedule-monitor:clean')\n ->dailyAt('08:00');\n }", "title": "" }, { "docid": "a5c58eacaca49ce47000587630944edd", "score": "0.58209145", "text": "public function getSchedule()\n\t\t{\n\t\t\t$frequency = static::config()->frequency;\n\t\t\treturn \"*/$frequency * * * *\";\n\t\t}", "title": "" }, { "docid": "df59e4a1ecd7e20871889317ebc20ea3", "score": "0.581569", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('globalBonus:everyMonth')\n ->everyMinute();\n $schedule->command('make:backup')\n ->daily();\n }", "title": "" }, { "docid": "4be9ce87658c72b462d83313bfc0b8eb", "score": "0.5810385", "text": "public function schedule_cron(string $schedule = '*/5 * * * *'): void\n {\n //$path = BOOKCLUBPATH.DS.'bookclub.cron';\n //$url = url_site() . \"/cron_elist/\";\n //file_put_contents($path, \"MAILTO=\\\"\\\"\\n$schedule /usr/bin/wget --no-check-certificate -qO /dev/null $url\\n\");\n //exec(\"crontab $path\");\n }", "title": "" }, { "docid": "6f35dbcf77410364b688ea688d1db3af", "score": "0.5792753", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('sb:ComputeAll')->daily();\n $schedule->command('sb:SendMailRequestForVolunteers')->weeklyOn(5, '18:00');\n }", "title": "" }, { "docid": "ef46834f76b4b761a988c629b43f9abd", "score": "0.57692885", "text": "public function __construct()\n\t{\n\t\t$schedules = new telldusSchedules();\n\t\t$schedules->fetchScenes();\n\t\t$schedules->fetchEvents();\n\t\t$objects[] = $schedules;\n\t\t$objects[] = \"00 1 * * * curl \\\"localhost/ajax.php?action=updateCrontabSunSchedule\\\"\";\n\n\t\t$print = implode(\"\\n\",$objects);\n\t\t$print .= \"\\n\";\n\n\t\t$file = fopen(\"/tmp/crontab\",\"w\");\n\t\tif(!$file)\n\t\t{\n\t\t\tdie(\"failed to open crontab\");\n\t\t}\n\n\t\tfwrite($file,$print);\n\t\tfclose($file);\n\t\tsystem(\"crontab /tmp/crontab\");\n\t\tunlink(\"/tmp/crontab\");\n\t}", "title": "" }, { "docid": "c4635b71f7f49f6f31d42690ea64fc6a", "score": "0.57674855", "text": "public function cron()\n\t{\n\n\t}", "title": "" }, { "docid": "1b5069f6816ef137a0d79348c06367ba", "score": "0.57608074", "text": "protected function schedule(Schedule $schedule)\n {\n \n //Email com as tarefas diárias a vencer no dia e dos dias anteriores não concluídas\n $schedule->command('email:dailyTask')\n ->dailyAt('09:00');\n \n //Email com a cobrança uma hora antes de vencer a atividade não concluída\n $schedule->command('email:expiringTasks')\n ->hourly();\n\n //Email com a cobrança 10 minutos após a atividade vencer - Cópia para gestor\n $schedule->command('email:lateTasks')\n ->everyTenMinutes();\n\n //Email com a cobrança de hora em hora dos vencido e sem prev\n $schedule->command('email:noPrevision')\n ->hourlyAt(15);\n \n }", "title": "" }, { "docid": "89714f16c02aa94f83dcd9fa0e0f507c", "score": "0.5755044", "text": "function _runCron()\r\t{\r\t\t$this->_extendCron();\r\t}", "title": "" }, { "docid": "b79a48687d382e8c76a193eb9417c16d", "score": "0.57529557", "text": "protected function configure()\n {\n // $this->addArguments(array(\n // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n // ));\n\n $this->addOptions(array(\n new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),\n new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine'),\n // add your own options here\n ));\n\n $this->namespace = 'cron';\n $this->name = 'concursos';\n $this->briefDescription = 'Pasa a Referéndum todos los concursos de más de 60 y 7 días. Además notifica por e-mail';\n $this->detailedDescription = <<<EOF\nThe [cron:concursos|INFO] task does things.\nCall it with:\n\n [php symfony cron:concursos|INFO]\nEOF;\n }", "title": "" }, { "docid": "0bcda9b53deecc13bf5070f1c732d38e", "score": "0.5752214", "text": "protected function schedule(Schedule $schedule)\n {\n\n $schedule->command('ogame:alliance-queue')->cron('*/2 * * * *')\n ->withoutOverlapping()\n ->sendOutputTo(\\storage_path('logs/alliances.log'));\n $schedule->command('ogame:player-queue')->cron('*/2 * * * *')\n ->withoutOverlapping()\n ->sendOutputTo(\\storage_path('logs/players.log'));\n $schedule->command('ogame:galaxy-queue')->cron('*/2 * * * *')\n ->withoutOverlapping()\n ->sendOutputTo(\\storage_path('logs/planets.log'));\n $schedule->command('ogame:universe-queue')->cron('*/2 * * * *')\n ->sendOutputTo(\\storage_path('logs/universes.log'));\n $schedule->command('ogame:highscore-queue')->cron('*/2 * * * *')\n ->sendOutputTo(\\storage_path('logs/highscore.log'));\n $schedule->command('ogame:daily-stats')->daily()\n ->sendOutputTo(\\storage_path('logs/dailystats.log'));\n $schedule->command('ogame:clean-update-errors')->cron('0 * * * *')\n ->sendOutputTo(\\storage_path('logs/updaterrors.log'));\n $schedule->command('ogame:install-universe-queue')->cron('*/4 * * * *')\n ->withoutOverlapping()\n ->sendOutputTo(\\storage_path('logs/install-queue.log'));\n\n //how to install new universes:\n //Update the server name list configuration: ogame_servers.php (New France universe name)\n //php artisan ogame:update-api-universes\n //php artisan ogame:toggle-universe 597 (y 390) //Solo si te da flojera moverlos de lugar\n }", "title": "" }, { "docid": "a8f60d9dd14b2406a8047fe925e4f642", "score": "0.57521063", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('command:senddisconnection')\n // ->everyMinute();\n \n // $schedule->command('command:sendreminder')\n // ->everyMinute();\n\n // $schedule->command('command:message')\n // ->everyMinute();\n\n $schedule->command('command:checkincomingmessages')\n ->everyMinute();\n \n $schedule->command('command:sendreconnection')\n ->everyMinute();\n\n // $schedule->command('command:clearreconnected')\n // ->everyTenMinutes();\n \n }", "title": "" }, { "docid": "0cf690007017178ca5b07d9d53971111", "score": "0.57513183", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n\n $meeting = Appointment::select('date', 'time')->where('patient_id', '=', '1')->get();\n foreach ($meeting as $value) {\n date_default_timezone_set('Asia/Jerusalem');\n $dateInDatabase = $value->date;\n $time = $value->time;\n $dateTime = substr($dateInDatabase . \" \" . $time, 0, -3);\n // echo($dateTime);\n $schedule->command('SendNot:reminder')->when(function () use ($dateTime) {\n $date = date(\"Y-m-d H:i\");\n $time = strtotime($date);\n $time = $time + (30 * 60);\n $date = date(\"Y-m-d H:i\", $time);\n // echo ($dateTime);\n // echo(\" \");\n // echo($date);\n // echo(\" \");\n return ($dateTime === $date);\n });\n $schedule->command('Meeting:create')->when(function () use ($dateTime) {\n $date = date(\"Y-m-d H:i\");\n $time = strtotime($date);\n $time = $time + (5 * 60);\n $date = date(\"Y-m-d H:i\", $time);\n // echo ($dateTime);\n // echo(\" \");\n // echo($date);\n // echo(\" \");\n return ($dateTime === $date);\n });\n }\n }", "title": "" }, { "docid": "aed42e1472cff19f1849f6d4a64938eb", "score": "0.5746095", "text": "public function getSchedule()\r\n {\r\n return '52,53,54 * * * *';\r\n }", "title": "" }, { "docid": "96d9d9a8705512e937d47cb6e6fa40c6", "score": "0.5738262", "text": "function setup_cron() {\n\n\t\t$mpi_sync = wp_next_scheduled( 'mpi_sync' );\n\t\tif ( ! $mpi_sync ) {\n\t\t\t$cron_enabled = get_option( 'mpi_cron_enable', 'on' );\n\t\t\tif ( 'on' === $cron_enabled ) {\n\t\t\t\t$mpi_sync_frequency = apply_filters( 'mpi_sync_frequency', 'weekly' );\n\t\t\t\twp_schedule_event( time(), esc_html( $mpi_sync_frequency ), 'mpi_sync' );\n\t\t\t} else {\n\t\t\t\t$timestamp = wp_next_scheduled( 'mpi_sync' );\n\t\t\t\twp_unschedule_event( $timestamp, 'mpi_sync' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6bb3dc16ac586db0dc14adb5ec048e82", "score": "0.570975", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule\n ->command('microfin:post-receivables-to-loan-statement')\n ->weekdays()\n ->at('17:00');\n\n $schedule\n ->command('microfin:repay')\n ->weekdays()\n ->at('17:00');\n\n $schedule\n ->command('microfin:recalibrate-missed-deductions')\n ->weekdays()\n ->between('8:00', '17:00')\n ->when(function () {\n return LoanRepayment::due()->unpaid()->whereStatus(null)->count() > 0;\n })\n ->withoutOverlapping();\n\n $schedule\n ->command('microfin:accrue-daily-interest')\n ->weekdays()\n ->at('17:00');\n }", "title": "" }, { "docid": "7ba0c7e0f38362a0285f97925579de5f", "score": "0.5709421", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n// Log::info('schedule start.');\n// $schedule->call(function () {\n// DB::table('items')->where('id', 4)->update(['item_name' => '电伴热']);\n// })->everyMinute();\n// Log::info('schedule end.');\n }", "title": "" }, { "docid": "6516b64e93be049f8f7598fccd6b197d", "score": "0.56983656", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('documents:archive-expired')\n ->dailyAt('03:00');\n \n $schedule->command('documents:notify-approval')\n ->dailyAt('10:00');\n \n $schedule->command('documents:send-published')\n ->everyFiveMinutes()->withoutOverlapping();\n }", "title": "" } ]
cd679d200760aa6703d57fe5f4d9e291
Create admin menu item
[ { "docid": "4802272e6704eadb6d3fb8986c6db55a", "score": "0.0", "text": "function household_photos_create_menu() {\n\tadd_menu_page(\n\t\t'Household Photos',\n\t\t'Household Photos',\n\t\t'administrator',\n\t\t'household-photos',\n\t\t'household_photos_admin'\n\t);\n\n\tadd_submenu_page(\n\t\t'household-photos',\n\t\t'Photo Albums',\n\t\t'Photo Albums',\n\t\t'administrator',\n\t\t'household-photos-albums',\n\t\t'household_photos_albums'\n\t);\n\n\tadd_submenu_page(\n\t\t'household-photos',\n\t\t'Import Photos',\n\t\t'Import Photos',\n\t\t'administrator',\n\t\t'household-photos-import',\n\t\t'household_photos_import'\n\t);\n\n\t/*\n\tadd_submenu_page(\n\t\t'options-general.php',\n\t\t'Household Photos',\n\t\t'Household Photos',\n\t\t'administrator',\n\t\t__FILE__,\n\t\t'household_photos_admin',\n\t\tplugins_url('/images/icon.png', __FILE__)\n\t);\n\t*/\n}", "title": "" } ]
[ { "docid": "29e5c65b087b30b36e116b30ed920a24", "score": "0.79824376", "text": "public function addAdminMenu();", "title": "" }, { "docid": "31d60706f47d4f4d88f67c11b8e59424", "score": "0.7502712", "text": "public function admin_menu() {}", "title": "" }, { "docid": "4df0bf03d1d76f141c49a024de1b1cd0", "score": "0.7451989", "text": "function create_admin_menu() {\n\n\t\t// Add object page\n\t\t$page = add_menu_page('Karmic Load', 'Karmic Load', 'read', 'list-karmic-load', array($this, 'list_karmic_load'), plugins_url('images/karma16.png', __FILE__));\n\n\t\t// Add tools page\n\t\tadd_management_page('Export Carnie Karma', 'Export Carnie Karma', 'read_private_posts', 'export-carnie-karma-tools', array($this, 'export_karma_page'));\n\t}", "title": "" }, { "docid": "d278959f5ee8e9887190b1dceca7acf0", "score": "0.7416387", "text": "public function add_menu() {\r\n //create new top-level menu\r\n add_menu_page(\r\n esc_html__( 'Property fields', 'myhome-core' ),\r\n esc_html__( 'Property fields', 'myhome-core' ),\r\n 'administrator',\r\n 'myhome_attributes',\r\n array( $this, 'admin_page' ),\r\n '',\r\n '22'\r\n );\r\n }", "title": "" }, { "docid": "e5e737d78eee76e0fa60e232c40ba76e", "score": "0.7381728", "text": "function admin_menu_item() {\n\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t// In this case menu item is add in admin menu 'Appearance'\n\t\t\tadd_theme_page(esc_html__('Install Demo Data', 'trx_utils'), esc_html__('Install Demo Data', 'trx_utils'), 'edit_theme_options', 'trx_importer', array($this, 'build_page'));\n\t\t}\n\t}", "title": "" }, { "docid": "48cf3ffa8e726071451f3491e5a29ab8", "score": "0.7355848", "text": "public function createMenu() {\n $this->createMenuItem(\n [\n 'label' => 'Bestellungen / Bestellnummern Healer',\n 'controller' => 'Bestellnummer',\n 'class' => 'sprite-application-block',\n 'action' => 'Index',\n 'active' => 1,\n 'parent' => $this->Menu()->findOneBy(['label' => 'Artikel'])\n ]\n );\n\n }", "title": "" }, { "docid": "4d9e26a5ac8f7bf77e8b6f9b2f513f17", "score": "0.73034936", "text": "protected function addToAdminMenu()\n {\n // Ensure the 'admin' menu exists\n Menu::firstOrCreate([\n 'name' => 'admin',\n ]);\n $menu = Menu::where('name', 'admin')->firstOrFail();\n\n // Add a top level 'Portfolio' menu item\n $parentItem = MenuItem::firstOrNew([\n 'menu_id' => $menu->id,\n 'title' => 'Portfolio',\n 'url' => '#',\n 'route' => null,\n ]);\n if (!$parentItem->exists) {\n $parentItem->fill([\n 'target' => '_self',\n 'icon_class' => 'voyager-certificate',\n 'color' => null,\n 'parent_id' => null,\n 'order' => 7,\n ])->save();\n }\n\n // Nest Portfolio and Categories under Blog\n $menuItem = MenuItem::firstOrNew([\n 'menu_id' => $menu->id,\n 'title' => 'Posts',\n 'url' => '',\n 'route' => 'voyager.portfolio.index',\n ]);\n if (!$menuItem->exists) {\n $menuItem->fill([\n 'target' => '_self',\n 'icon_class' => 'voyager-certificate',\n 'color' => null,\n 'parent_id' => $parentItem->id,\n 'order' => 1,\n ])->save();\n }\n\n $menuItem = MenuItem::firstOrNew([\n 'menu_id' => $menu->id,\n 'title' => 'Categories',\n 'url' => '',\n 'route' => 'voyager.portfolio-categories.index',\n ]);\n if (!$menuItem->exists) {\n $menuItem->fill([\n 'target' => '_self',\n 'icon_class' => 'voyager-categories',\n 'color' => null,\n 'parent_id' => $parentItem->id,\n 'order' => 2,\n ])->save();\n }\n }", "title": "" }, { "docid": "6190e52b53cc0b1b0a2ada85f5b4bfb3", "score": "0.7282082", "text": "public function add_menu_item()\n {\n $settings = add_submenu_page(\n 'woocommerce',\n __( 'Uni CPO Settings', 'uni-cpo' ),\n __( 'Uni CPO Settings', 'uni-cpo' ),\n 'manage_woocommerce',\n 'uni-cpo-settings',\n array( $this, 'settings_page' )\n );\n $import = add_submenu_page(\n 'woocommerce',\n __( 'Uni CPO Import/Export tool', 'uni-cpo' ),\n __( 'Uni CPO Import/Export tool', 'uni-cpo' ),\n 'manage_woocommerce',\n 'uni-cpo-import-export',\n array( $this, 'import_export_page' )\n );\n }", "title": "" }, { "docid": "ab1e3df3708ef444a4a130aab0d6d4b0", "score": "0.7204745", "text": "function createAdminMenu ()\n\t{\n\t\t$parentSlug \t= \"tools.php\";\n\t\t$page_title \t= \"Progress Tracker\";\n\t\t$menu_title\t\t= \"Progress Tracker\";\n\t\t$menu_slug\t\t= \"ptracker-settings\";\n\t\t$drawFunction\t= array( $this, 'drawSettingsPage' );\n\t\t$handle = add_management_page(\n\t\t\t$page_title,\n\t\t\t$menu_title,\n\t\t\t'manage_options',\n\t\t\t$menu_slug,\n\t\t\t$drawFunction\n\t\t);\n\n\t\tadd_action( 'admin_head-'. $handle, array( $this, 'adminSettingsEnqueues' ) );\n\t\tadd_action( 'admin_footer-'. $handle, array( $this, 'adminSettingsInline' ), 200 );\n\t}", "title": "" }, { "docid": "60fb2a58cda8b6d2a8162425ccd79fa4", "score": "0.71762073", "text": "public function admin_menu() {\n\n\t}", "title": "" }, { "docid": "c997bd6b4d1bf9af01f8ef4e810a14e6", "score": "0.7107413", "text": "static function add_menu_item()\r\n {\r\n if ( !current_user_can('activate_plugins') ) return;\r\n add_object_page( 'RDP Google Custom Search', 'RDP GCS', 'publish_posts', RDP_GCS_PLUGIN::$plugin_slug, 'RDP_GCS_ADMIN::generate_page',plugins_url('/rdp-google-custom-search/pl/images/menu-icon.gif') );\r\n $sAllText = __('All Search Engines', RDP_GCS_PLUGIN::$plugin_slug);\r\n $sAllCSEText = __('All Google CSEs', RDP_GCS_PLUGIN::$plugin_slug);\r\n add_submenu_page( RDP_GCS_PLUGIN::$plugin_slug, $sAllText, $sAllCSEText, \"publish_posts\", RDP_GCS_PLUGIN::$plugin_slug, \"RDP_GCS_ADMIN::generate_page\" ); \r\n $sAddNewTitle = __('Google Custom Search Engine', RDP_GCS_PLUGIN::$plugin_slug);\r\n $sAddNewText = __('Add New Google CSE', RDP_GCS_PLUGIN::$plugin_slug);\r\n add_submenu_page( RDP_GCS_PLUGIN::$plugin_slug, $sAddNewTitle, $sAddNewText, 'publish_posts', RDP_GCS_PLUGIN::$plugin_slug.'-new', 'RDP_GCS_ADMIN::add_new');\r\n }", "title": "" }, { "docid": "d19d621b74334d848cf16bd33f829e85", "score": "0.7098276", "text": "public function create_admin_menu() {\n\n $sub_menus = apply_filters( 'wpsl_sub_menu_items', array(\n array(\n 'page_title' => __( 'Settings', 'wpsl' ),\n 'menu_title' => __( 'Settings', 'wpsl' ),\n 'caps' => 'manage_wpsl_settings',\n 'menu_slug' => 'wpsl_settings',\n 'function' => array( $this, 'load_template' )\n ),\n array(\n 'page_title' => __( 'Add-Ons', 'wpsl' ),\n 'menu_title' => __( 'Add-Ons', 'wpsl' ),\n 'caps' => 'manage_wpsl_settings',\n 'menu_slug' => 'wpsl_add_ons',\n 'function' => array( $this, 'load_template' )\n )\n )\n );\n\n if ( count( $sub_menus ) ) {\n foreach ( $sub_menus as $sub_menu ) {\n add_submenu_page( 'edit.php?post_type=wpsl_stores', $sub_menu['page_title'], $sub_menu['menu_title'], $sub_menu['caps'], $sub_menu['menu_slug'], $sub_menu['function'] );\n }\n }\n }", "title": "" }, { "docid": "b1c4c3404ae3ae6a9397e35011345caf", "score": "0.7089023", "text": "public function createMenu() {\n\t//create new top-level menu\n\tadd_menu_page(\n 'FilePreviews.io', \n 'FilePreviews.io', \n 'administrator', \n __FILE__, \n [$this, 'settingsPage'] , \n plugins_url('/images/icon.png', __FILE__) \n );\n }", "title": "" }, { "docid": "7ed94b1f5bb141b6fd276a3ff7f1036f", "score": "0.7046576", "text": "static function admin_menu(){\n\t\tadd_menu_page('tf keyword management', 'KeyWords', 'manage_options', 'keyword_manager', array(get_class(), 'menu_page_keyword_management'), JfKeywordUsing::get_url('images/key.png'));\n\t\tadd_submenu_page('keyword_manager', ucwords('new or edit a keyword'), 'Add New', 'manage_options', 'addnew_keyword', array(get_class(), 'submenu_add_or_edit_keyword'));\n\t\tadd_submenu_page('keyword_manager', ucwords('import keywords'), 'Import', 'manage_options', 'import_keyword', array(get_class(), 'submenu_import_keywords'));\n\t\tadd_submenu_page('keyword_manager', ucwords('export keywords'), 'Export', 'manage_options', 'export_keyword', array(get_class(), 'submenu_export_keywords'));\n\t}", "title": "" }, { "docid": "d677e07b651de32c8bb95a8cc423fdee", "score": "0.70131004", "text": "public function admin_add() {\n\t\ttry {\n\t\t\t$result = $this->Menu->add($this->data);\n\t\t\tif ($result === true) {\n\t\t\t\t$this->Session->setFlash(__('The menu 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 \n\t}", "title": "" }, { "docid": "94f85fb113ebb01407ef8f13425392c9", "score": "0.70028436", "text": "function addTest($x){\n//$x='admin_bar_menu'\n $x->add_menu( array(\n 'id' => 'my-menu',\n 'title' => 'hello, kin29!'\n ) );\n}", "title": "" }, { "docid": "f5b410dfe70c386335c36ce8162201d7", "score": "0.69556427", "text": "public function actionCreate()\n {\n $model = new CmsMenuItem();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) { \n $notification_msg = Yii::t('app', '{className} successfully created.', [\"className\"=>\"Menu Item\"]);\n return $this->redirect(['update', 'id' => $model->ID, 'msg'=>$notification_msg]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "3a68d47254764b903fb45510aa444c4f", "score": "0.6947372", "text": "public function create()\n {\n //\n return view('admin.menu.create');\n }", "title": "" }, { "docid": "f29945f30266e24ac207dd772ac5769b", "score": "0.6942625", "text": "function vooddo_addAdminMenu()\n{\n // Add a new submenu under Options:\n add_options_page(VOODDO__PLUGIN_NAME, VOODDO__PLUGIN_NAME, 'administrator', 'vooddo-options', 'vooddo_createAdminPage');\n}", "title": "" }, { "docid": "80943281ec9fb5f4e84dd53135dba70c", "score": "0.6919227", "text": "public function dbwp_add_admin_menu(){\n\t\tglobal $dbwp_settings;\n\t\t// Create the link to WP menu \n\t\t$dbwp_settings = add_menu_page('Performance Tester (by DareBoost)', 'Performance Tester', 'manage_options', 'Performance_Tester', array($this, 'dbwp_menu_html'));\n\t}", "title": "" }, { "docid": "7d0b1ad777db2cafbd39388ba5347410", "score": "0.690822", "text": "public function setUpMenuItems()\n {\n $Menu = new DModuleMenu();\n $Menu->setIcon( '<i class=\"fa fa-file-excel-o\"></i> ' );\n $MenuItem = new DModuleMenuItem( \"showupload\" , \"Subir\" );\n $MenuItem -> setIcon( '<i class=\"fa fa-upload\"></i> ');\n $Menu -> addItemObject( $MenuItem );\n $this -> setMenu( $Menu );\n }", "title": "" }, { "docid": "57d7a68a2e6a7fa4fe2d3ca0187ce9d5", "score": "0.6907448", "text": "function enviroAdminMenu()\n{\n add_menu_page('Tabele Administration', 'Tabele', 'manage_options', 'tables-admin-page.php', 'myplguin_admin_page', 'dashicons-grid-view', 26);\n}", "title": "" }, { "docid": "f1947836509cfe50e8f598b3860a004a", "score": "0.6906541", "text": "function candy_add_menu_item()\n{\n\tadd_menu_page('candy', 'Candy', 'manage_options', 'candy', function(){\n\t\trequire CANDY_PATH . '/templates/admin.php';\n\t});\n}", "title": "" }, { "docid": "2886dea0560a90ae2a21cf4d0b5a2697", "score": "0.6905725", "text": "public function add_menu_item() {\n\t\t\n\t\tadd_menu_page( '2020_content', __('Content',\"admin2020\"), 'read', 'admin_2020_content', array($this,'build_media_page'),'dashicons-database', 4 );\n\t\treturn;\n\t\n\t}", "title": "" }, { "docid": "101949679de74cf02db92b400bf6af1a", "score": "0.68988824", "text": "public static function bbdi_create_menu(){\n\t\t# make sure menu 'Main Menu' doesn't already exist\n\t\tif(wp_get_nav_menu_object('Main Menu')){\n\t\t\techo 'There\\'s already a menu called <code>Main Menu</code>';\n\t\t\tdie();\n\t\t}\n\t\t# create the menu\n\t $menu_id = wp_create_nav_menu('Main Menu');\n\t \n\t ## pages\n\t $pages = array('Home', 'About Us', 'Services', 'Blog', 'Contact');\n\t foreach($pages as $page){\n\t \t# make sure we have the page to add as a menu item\n\t \tif(!($page_obj = get_page_by_title($page))){\n\t \t\techo '<span class=\"fail\"><code>'. $page .'</code> page not found.</span><br />';\n\t \t\tcontinue;\n\t \t}\n\t \t# add the page as a menu item\n\t \t\n\t \t$new_menu_item_id = self::create_menu_item( array(\n\t \t\t# for the WP function wp_update_nav_menu_item()\n\t \t\t'menu-item-title' => $page_obj->post_title,\n\t \t\t'menu-item-object-id' => $page_obj->ID,\n\t \t\t'menu-item-object' => 'page',\n\t \t\t'menu-item-type' => 'post_type',\n\t \t\t'menu-item-status' => 'publish',\n\t \t\t\n\t \t\t# for our custom function\n\t \t\t'menu_id' => $menu_id,\n\t \t));\n\n\t \t# we're done now except for blog item\n\t \t# for the blog item, we need to add submenu items\n\t \tif($page != 'Blog') continue;\n\t \t\n\t \t$cats = array('faq', 'helpful-hints', 'testimonials');\n\t \tforeach($cats as $cat){\n\t \t\t# make sure the category exists\n\t \t\tif(!($cat_obj = get_category_by_slug($cat))){\n\t \t\t\techo '<span class=\"fail\">Category <code>'. $cat .'</code> doesn\\'t exist.</span><br />';\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\tself::create_menu_item(array(\n\t\t\t\t\t# for the WP function wp_update_nav_menu_item()\n\t\t\t\t\t'menu-item-title' => $cat_obj->name,\n\t\t\t\t\t'menu-item-object-id' => $cat_obj->term_id,\n\t\t\t\t\t'menu-item-parent-id' => $new_menu_item_id,\n\t\t\t\t\t'menu-item-object' => 'category',\n\t\t\t\t\t'menu-item-type' => 'taxonomy',\n\t\t\t\t\t'menu-item-status' => 'publish',\n\t\t\t\t\n\t\t\t\t\t# for our custom function\n\t\t\t\t\t'menu_id' => $menu_id,\n\t \t\t));\n\t \t}\n\t }\n\t\tdie();\n\t}", "title": "" }, { "docid": "9ebdabb7cd86d87027ea9d567bfb6843", "score": "0.68887365", "text": "public function create()\n {\n\n return view('pages.admin.menu.create');\n }", "title": "" }, { "docid": "22c360a60537a8adc6363080a1d9aae3", "score": "0.68830484", "text": "public function action_addAdminMenus()\n {\n // Default to the model's likely controller.\n $defaultController = Controller::generateClassName($this->model->getShortName());\n $parentSlug = 'edit.php?post_type=' . $this->model->getWordpressKey();\n\n foreach ($this->getConfiguration() as $func => $config) {\n $config += array(\n 'title' => ucfirst($func),\n 'menu-title' => ucfirst($func),\n 'capability' => \"manage_options\",\n 'icon' => null,\n 'route' => array($defaultController, $func),\n 'position' => null,\n );\n\n // This is to circumvent how Wordpress doesn't let you pass arguments to\n // callbacks so we can send the controller and function to the router.\n // We dont want people to have to specify that odd function name.\n // Allow them to send the controller string name and take care of the rest.\n if (is_string($config['route'])) {\n $route = Router::callback($config['route'], $func);\n } else {\n $route = Router::callback($config['route'][0], $config['route'][1]);\n }\n\n $uniquePage = $this->model->getWordpressKey() . \"_\" . $func;\n add_submenu_page($parentSlug, $config['title'], $config['menu-title'], $config['capability'], $uniquePage, $route, $config['icon'], $config['position']);\n }\n }", "title": "" }, { "docid": "6523d4ef10a070699353f8c10a64d4bf", "score": "0.6870701", "text": "public function dg_add_admin_menu() {\r\n add_menu_page(\r\n $this->menu_name,\r\n $this->page_title,\r\n 'manage_options',\r\n $this->page_slug,\r\n array( $this, 'dg_options_page' )\r\n );\r\n }", "title": "" }, { "docid": "d444f52c89048df658c991abd46d4f55", "score": "0.68570715", "text": "public function processAdminMenuItems() {\n add_menu_page(__('POI', 'miksei'), __('POI', 'miksei'), 'manage_options', 'edit.php?post_type=point_of_interest', '', 'dashicons-location-alt', 50);\n add_submenu_page('edit.php?post_type=point_of_interest', __('Add new POI', 'miksei'), __('Add new POI', 'miksei'), 'manage_options', 'post-new.php?post_type=point_of_interest', '');\n }", "title": "" }, { "docid": "332038f7435b9efaf78e7bf55070c1a9", "score": "0.6856604", "text": "public function create()\n {\n $parents = Menu::root()->get();\n $types = Dictionary::menuType()->get();\n $pos = Dictionary::posType()->get();\n $priUnits = Dictionary::privType()->get();\n\n return view('Imperator::menu.create')\n ->with('parents', $parents)\n ->with('types', $types)\n ->with('pos', $pos)\n ->with('privileges', $priUnits)\n ->with('pageName', '菜单添加');\n }", "title": "" }, { "docid": "966a99c7904df4cc5c110fcb9e7eedc7", "score": "0.68384707", "text": "public function create()\n {\n return view('admin.menu.create');\n }", "title": "" }, { "docid": "b354cf074f6835163f9dccf6d03700c0", "score": "0.6832992", "text": "public function create()\n {\n // Add submenu page\n add_action('admin_menu', [$this, 'addPage']);\n\n // Register settings and fields\n add_action('admin_init', [$this, 'settingsInit']);\n }", "title": "" }, { "docid": "da3cc577ea22094ddcdd1319394d8b79", "score": "0.6828143", "text": "public function create()\n {\n request()->validate([\"parent\" => \"required\"]);\n\n return view(\"atrochar::menuitems.create\", [\n \"parent\" => Menu::find(request('parent')),\n \"routes\" => Atrochar::getRouteNames(),\n \"icons\" => Atrochar::getIcons()\n ]);\n }", "title": "" }, { "docid": "13d44b726eeae95810fa33557707545e", "score": "0.6824909", "text": "function admin_bar_menu() {\n\t\t\tglobal $wp_admin_bar;\n\t\t\tif ( $user_id = get_current_user_id() ) {\n\t\t\t\t$membership = pmpro_getMembershipLevelForUser( $user_id );\n\t\t\t\tif ( $membership && $membership->id === static::$membership_level_id ) {\n\t\t\t\t\t$menu_item = array(\n\t\t\t\t\t\t'parent' => 'user-actions',\n\t\t\t\t\t\t'id' => 'makerspace-checkinout',\n\t\t\t\t\t\t'title' => 'Checkin',\n\t\t\t\t\t\t'href' => '#checkin',\n\t\t\t\t\t);\n\t\t\t\t\tif ( static::is_member_in( $user_id ) ) {\n\t\t\t\t\t\t$menu_item['title'] = 'Checkout';\n\t\t\t\t\t\t$menu_item['href'] = '#checkout';\n\t\t\t\t\t}\n\t\t\t\t\t$wp_admin_bar->add_node( $menu_item );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8aed1e8ff28ea2e66f353e7b272fcef0", "score": "0.68150795", "text": "public function admin_menu(){\n\t\t\t$menu_title = $this->get_menu_title();\n\t\t\t$menu_type = $this->get_menu_type();\n\t\t\t$option_name = $this->get_option_name();\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//TODO: Remove need for switch\n\t\t\tswitch ($menu_type) {\n\t\t\t case 'dashboard':\n\t\t\t $this->_options_page = add_dashboard_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'posts':\n\t\t\t $this->_options_page = add_posts_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'media':\n\t\t\t $this->_options_page = add_media_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'links':\n\t\t\t $this->_options_page = add_links_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'pages':\n\t\t\t $this->_options_page = add_pages_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'comments':\n\t\t\t $this->_options_page = add_comments_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'users':\n\t\t\t $this->_options_page = add_users_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tcase 'tools':\n\t\t\t $this->_options_page = add_management_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t case 'plugins':\n\t\t\t $this->_options_page = add_plugins_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t case 'settings':\n\t\t\t $this->_options_page = add_options_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_options_page = add_theme_page($menu_title, $menu_title, 'administrator', $option_name, array(&$this, 'load_options_page'));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t\n\t\t\tadd_action(\"load-$this->_options_page\", array(&$this, 'admin_load'));\n\t\t\t//add_action(\"admin_enqueue_scripts\", array(&$this, 'admin_load'));\n\t\t\tadd_action(\"load-$this->_options_page\", array(&$this, 'handle_post_data'), 49);\n\t\t\tadd_action('admin_print_scripts-media-upload-popup', array(&$this, 'media_upload_change_script') );\n\n\t\t}", "title": "" }, { "docid": "eec60e3a70c8c5886d6ca94def28721b", "score": "0.6813986", "text": "public function admin_page(){\n \n $menu[] = array( 'Checklist Sidebar', 'Checklist Sidebar', 1, 'add_new_option_'.self::$plugin_slug, array( $this, 'add_new_option_'.self::$plugin_slug.'_function' ), self::$icon );\n $menu[] = array( 'Settings', 'Settings', 1, 'add_new_option_'.self::$plugin_slug, 'settings_'.self::$plugin_slug, array( $this, 'settings_'.self::$plugin_slug.'_function' ) );\n \n if( is_array( $menu )){\n add::load_menu_page( $menu );\n }\n }", "title": "" }, { "docid": "e3444d52d3d14ad69c4f1ca545e29c05", "score": "0.6812907", "text": "public static function admin_menu() {\n\t\t$admin_page = add_menu_page (\n\t\t\t\t__ ( 'Catáºlogo', 'tasks' ),\n\t\t\t\t__ ( 'Catálogo', 'tasks' ),\n\t\t\t\t'manage_options', 'tasks',\n\t\t\t\tarray (\n\t\t\t\t\t__CLASS__,\n\t\t\t\t\t'tasks_menu_settings' \n\t\t\t\t),\n\t\t\t\tTASKS_PLUGIN_URL . '/images/settings.png' );\n\t}", "title": "" }, { "docid": "f43db77f1881e391fdf70ff8471b568b", "score": "0.6806143", "text": "public function create()\n {\n //\n $item = new TopMenu();\n\n $menuList = $this->menuItem->getForSelect();\n\n return view(env('THEME').'.admin.settings.menu-edit', compact('item', 'menuList'));\n }", "title": "" }, { "docid": "3ff325235752b48c302ca8c3f0c26391", "score": "0.6799267", "text": "function ah_create_menu() {\n\tglobal $displayName;\n\tadd_menu_page( $displayName, $displayName, 'read', 'ah-main', 'ah_main' );\n}", "title": "" }, { "docid": "51aa2473e2ddfa187224f578bc89d70b", "score": "0.67889005", "text": "protected function updateMenuItems(){\n\n\t\tswitch( $this->action->id){\n\t\t\tcase 'upload':\n\t\t\t\t{\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'List Backup'), 'url'=>array('index'));\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'Create Backup'), 'url'=>array('create'));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'List Backup'), 'url'=>array('index'));\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'Create Backup'), 'url'=>array('create'));\n\t\t\t\t\t$this->menu[] = array('label'=>JBackupTranslator::t('backup', 'Upload Backup'), 'url'=>array('upload'));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "9f207ba47edf1df09383e3ff06009aae", "score": "0.6787727", "text": "function create_admin()\n\t\t{\n\t\t\t// Action to initiate the admin setup and admin menu setup\n\t\t\tadd_action('admin_menu', array(&$this, 'load_admin'));\n\t\t}", "title": "" }, { "docid": "9e31774089fe7411948da54ca23d8bf5", "score": "0.67850184", "text": "public static function addMenu(){\n add_submenu_page(\n avimayeur_generality::GROUP, // slug parent\n self::SUB_TITLE, // page_title\n self::SUB_MENU, // menu_title\n self::PERMITION, // capability\n self::SUB_GROUP, // slug_menu\n [self::class, 'render'] // CALLBACK\n );\n }", "title": "" }, { "docid": "f46b08a4f63ec3481ff0925566263e25", "score": "0.67819643", "text": "public function register_admin_menus()\n {\n $title = 'Bonus';\n $callback = array(&$this,'load_panel');\n $icon = $this->plugin_uri.'img/bonus-16.png';\n $pos = 101;\n \n $this->page['primary'] = add_menu_page($title, $title, $this->cap, $this->slug, $callback, $icon, $pos); \n \n $this->_page_setup($this->page['primary']);\n\n $title = 'Manage Plans';\n\n $this->page['bonusplan'] = add_submenu_page($this->slug, $title, $title, $this->cap, $this->slug.'&spage=bonusplan', $callback);\n \n $this->_page_setup($this->page['bonusplan']); \n \n $title = 'Add Bonus Plan';\n \n $this->page['addnew'] = add_submenu_page($this->slug, $title, $title, $this->cap, $this->slug.'&spage=addnew', $callback);\n \n $this->_page_setup($this->page['addnew']);\n \n //unset($this->page['primary']); \n }", "title": "" }, { "docid": "1e269ce10077bd74300cda2c5f14d82d", "score": "0.677228", "text": "public function getAdminMenuItem(){\n\t\treturn drawMenuItem($this->code,$GLOBALS['webroot'].ltrim($this->path,'/').$this->adminurl,$this->name);\n\t}", "title": "" }, { "docid": "d1f88407c4de5863da78ece47d9c0963", "score": "0.67613363", "text": "function PBX_admin_menu(){\n\t\n $mymenu = new PBX_option_list(); \n}", "title": "" }, { "docid": "391eb44d21f0a444170fb519722af882", "score": "0.6759046", "text": "function menu_admin_show() {\n\tadd_menu_page('Data Siswa', //page title\n\t'Input Absen Siswa', //menu title\n\t'manage_options', //capabilities\n\t'input_absensi', //menu slug\n\t'input_absensi' //function\n\t);\n add_submenu_page('input_absensi', //parent slug\n 'Kelola Kelas', //page title\n 'Kelola Kelas', //menu title\n 'manage_options', //capability\n 'kelola_kelas', //menu slug\n 'kelola_kelas'); //function\n add_submenu_page('input_absensi', //parent slug\n 'Data Siswa', //page title\n 'Data Siswa', //menu title\n 'manage_options', //capability\n 'data_siswa_list', //menu slug\n 'data_siswa_list'); //function\n add_submenu_page('input_absensi', //parent slug\n 'Rekap Absensi', //page title\n 'Rekap Absensi', //menu title\n 'manage_options', //capability\n 'rekap_absensi', //menu slug\n 'rekap_absensi'); //function\n add_submenu_page(null, //parent slug\n 'Edit Siswa Baru', //page title\n 'Edit Siswa', //menu title\n 'manage_options', //capability\n 'edit_data_siswa', //menu slug\n 'edit_data_siswa'); //function\n add_submenu_page(null, //parent slug\n 'Tambah Siswa Baru', //page title\n 'Tambah Siswa', //menu title\n 'manage_options', //capability\n 'input_data_siswa', //menu slug\n 'input_data_siswa'); //function\n}", "title": "" }, { "docid": "01d1acaafea6350351e9b9dba00ed701", "score": "0.67558914", "text": "function dud_add_menu_items(){\n add_users_page('Delete User Data', 'Delete User Data', 'editor', DUD_SLUG, 'dud_render_list_page');\n}", "title": "" }, { "docid": "e403b5150e2fa309acacbfbc242aeab2", "score": "0.6751341", "text": "public function do_admin_menu( $type ) {\n\t\t\t$functionName = array(\n\t\t\t\t\"settings\" => \"add_options_page\",\n\t\t\t\t\"tools\" => \"add_management_page\",\n\t\t\t\t\"media\" => \"add_media_page\"\n\t\t\t);\n\t\t\tif( array_key_exists( $type, $this->admin_menus ) ) {\n\t\t\t\t$menu = $this->admin_menus[ $type ];\n\t\t\t\t$this->log( 3,\"do_admin_menu() Add an item to the \".$type.\" menu.\".print_r( $menu, true ) );\n\t\t\t\t$functionName[ $type ](\n\t\t\t\t\t( array_key_exists( 'title', $menu ) ? $menu[ 'title' ] : $menu[ 'label' ] ),\n\t\t\t\t\t$menu[ 'label' ],\n\t\t\t\t\t\"manage_options\",\n\t\t\t\t\t$this->slug.\"_\".$type.\"_menu\",\n\t\t\t\t\tarray( &$this, 'display_admin_screen' )\n\t\t\t\t);\n\t\t\t} // END if\t\t\n\t\t}", "title": "" }, { "docid": "af6149ba96c49f7ebd01fd80351582e9", "score": "0.67443156", "text": "public function create()\n {\n // Si no tiene permisos para ver el listado lo echa.\n if (!auth()->user()->can('admin-menu-create')) {\n app()->abort(403);\n }\n\n $menu = new Menu();\n\n $form_data = array(\n 'route' => array('menu.store'),\n 'method' => 'POST',\n 'id' => 'formData',\n 'class' => 'form-horizontal'\n );\n\n $page_title = trans(\"basic::menu/admin_lang.nuevo_menu\");\n\n return view('basic::menu.admin_edit', compact('page_title', 'menu', 'form_data'));\n }", "title": "" }, { "docid": "1bf92bb6521526138fae6cae812f75d0", "score": "0.6725409", "text": "public function set_admin_menu()\n\t{\n\t\t$this->menu->add_admin_menu_core( 'dashboard' , array(\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin'),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-dashboard',\n\t\t\t'title'\t\t\t=>\t\t__( 'Dashboard' )\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'media' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Media Library' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-image',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/media')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'installer' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Install Apps' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-flask',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/installer')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'modules' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Modules' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-puzzle-piece',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/modules')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'themes' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Themes' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-columns',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/themes')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'themes' , array(\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/controllers'),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-bookmark',\n\t\t\t'title'\t\t\t=>\t\t__( 'Menus' )\n\t\t) );\n\t\t//\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'users' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Manage Users' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-users',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/users')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'users' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Create a new User' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-users',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/users/create')\n\t\t) );\n\t\t// Self settings\n\t\t$this->menu->add_admin_menu_core( 'users' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'My Profile' ) , // current_user( 'PSEUDO' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-users',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/profile')\n\t\t) );\n\t\t\t\n\t\t$this->menu->add_admin_menu_core( 'roles' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Roles' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-shield',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/roles')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'roles' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Create new role' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-shield',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/roles/create')\n\t\t) );\n\t\t$this->menu->add_admin_menu_core( 'roles' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Roles permissions' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-shield',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/roles/permissions')\n\t\t) );\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'settings' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'Settings' ),\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-cogs',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/settings')\n\t\t) );\n\t\t\n\t\t/** $this->menu->add_admin_menu_core( 'frontend' , array(\n\t\t\t'title'\t\t\t=>\t\tsprintf( __( 'Visit %s' ) , riake( 'site_name' , $this->options ) ) ,\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-eye',\n\t\t\t'href'\t\t\t=>\t\tsite_url('index')\n\t\t) );\n\t\t**/\n\t\t\n\t\t$notices_nbr\t\t=\t\t0;\n\t\t// $notices_nbr\t\t+=\t\t( get_user_meta( 'tendoo_status' ) == false ) ? 1 : 0;\n\t\t\n\t\t$this->menu->add_admin_menu_core( 'about' , array(\n\t\t\t'title'\t\t\t=>\t\t__( 'About' ) ,\n\t\t\t'icon'\t\t\t=>\t\t'fa fa-rocket',\n\t\t\t'href'\t\t\t=>\t\tsite_url('admin/about'),\n\t\t\t'notices_nbr'\t=>\t\t $notices_nbr\n\t\t) );\t\n\t}", "title": "" }, { "docid": "e40d75c6a959fe8b0b2276722561118c", "score": "0.6724282", "text": "public function setupMenu(){\r\n $theSlug=add_menu_page(\r\n 'My Page-Title',\r\n 'My Menu Title', \r\n 'administrator', \r\n 'mySlug',\r\n array($this,'aCallbackMethod'), '',9);\r\n // add_submenu_page('tt_newletter_subscriberlist', 'neuer Abonnent', 'neuer Abonnent',\r\n // 'administrator', 'tt_newsletter_subscribercreate',array($this->sc, 'create' ));\r\n }", "title": "" }, { "docid": "e2ff9bd61237a9cd55311e1ca6c86b5c", "score": "0.67176574", "text": "function gestore_operatori_add_page()\n {\n add_menu_page('Gestore Operatori', 'Gestore Operatori', 'manage_options', 'gestoreoperatori', 'gestoreoperatori_do_page', 'dashicons-id');\n }", "title": "" }, { "docid": "7d27d9a1ab40b837032056d4c6fa97b5", "score": "0.671705", "text": "public function create_admin_page() {\n\n\t\t$submenu_page = add_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t_x( 'Post Type Mapper', 'Admin Page Title', 'post-type-mapper' ),\n\t\t\t_x( 'Post Type Mapper', 'Admin Menu Title', 'post-type-mapper' ),\n\t\t\t'manage_options',\n\t\t\t'post-type-mapper',\n\t\t\tarray( $this, 'admin_page_content' )\n\t\t);\n\n\t}", "title": "" }, { "docid": "9ef8608c016cd7fec250a7f4ddae3dd0", "score": "0.6706885", "text": "function add_menu_page() {\n\t\tif ( isset( $_GET['assessment_result'] ) && isset( $_GET['action'] ) && 'delete' == sanitize_text_field( wp_unslash( $_GET['action'] ) ) ) {\n\t\t\t$this->delete_item( intval( $_GET['assessment_result'] ) );\n\t\t}\n\t\t$this->add_new_item();\n\t\t$this->add_list_table();\n\t}", "title": "" }, { "docid": "d81637d6655bb6d7a2fd66fd924c689f", "score": "0.6695771", "text": "public function add_menus()\n {\n }", "title": "" }, { "docid": "3c4694bedd0afc51d56d93b3c6e4acba", "score": "0.6691214", "text": "function buildSupervisorNewPostingMenu(){\r\n return buildMenu('Supervisor Portal', '1', SUPERMENU);\r\n}", "title": "" }, { "docid": "f69b54ff8087e1509b6f9359c11eb1bc", "score": "0.6678957", "text": "function createMenuItems()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$db = JFactory::getDbo();\n\t\t$db->setQuery(\"SELECT extension_id FROM #__extensions WHERE element='com_flexicontent' AND type='component' \");\n\t\t$flexi_comp_id = $db->loadResult();\n\n\t\t$db->setQuery(\"DELETE FROM #__menu_types WHERE menutype='flexihiddenmenu' \");\n\t\t$db->execute();\n\n\t\t$db->setQuery(\"INSERT INTO #__menu_types (`menutype`,`title`,`description`) \" .\n\t\t\t\"VALUES ('flexihiddenmenu', 'FLEXIcontent Hidden Menu', 'A hidden menu to host Flexicontent needed links')\"\n\t\t);\n\t\t$db->execute();\n\n\t\t$db->setQuery(\"DELETE FROM #__menu WHERE menutype='flexihiddenmenu' \");\n\t\t$db->execute();\n\n\t\t$query \t= \"INSERT INTO #__menu (\"\n\t\t\t. \"`menutype`,`title`,`alias`,`path`,`link`,`type`,`published`,`parent_id`,`component_id`,`level`,\"\n\t\t\t. \"`checked_out`,`checked_out_time`,`browserNav`,`access`,`params`,`lft`,`rgt`,`home`, `language`\"\n\t\t\t. (FLEXI_J40GE ? \", `img`\" : '')\n\t\t. \") VALUES (\"\n\t\t\t. \"'flexihiddenmenu','Content','content_page','content_page','index.php?option=com_flexicontent&view=flexicontent','component',1,1,$flexi_comp_id,1,\"\n\t\t\t. \"0,'0000-00-00 00:00:00',0,1,'rootcat=0',0,0,0,'*'\"\n\t\t\t. (FLEXI_J40GE ? \", ''\" : \"\")\n\t\t. \")\";\n\n\t\ttry\n\t\t{\n\t\t\t$db->setQuery($query)->execute();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tjexit('<span class=\"install-notok\"></span>' . $e->getMessage());\n\t\t}\n\n\t\t// Save the created menu item as default_menu_itemid for the component\n\t\t$cparams = JComponentHelper::getParams('com_flexicontent');\n\t\t$cparams->set('default_menu_itemid', $db->insertid());\n\t\t$cparams_str = $cparams->toString();\n\n\t\t$flexi = JComponentHelper::getComponent('com_flexicontent');\n\t\t$query = 'UPDATE ' . (FLEXI_J16GE ? '#__extensions' : '#__components')\n\t\t\t\t. ' SET params = ' . $db->Quote($cparams_str)\n\t\t\t\t. ' WHERE ' . (FLEXI_J16GE ? 'extension_id' : 'id') . '=' . $flexi->id;\n\n\t\ttry\n\t\t{\n\t\t\t$db->setQuery($query)->execute();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tjexit('<span class=\"install-notok\"></span>' . $e->getMessage());\n\t\t}\n\n\t\techo '<span class=\"install-ok\"></span>';\n\n\t\t// This is necessary as extension data are cached ... and just above we updated the component parameters -manually- (and (also added menu item)\n\t\t$cache = JFactory::getCache();\n\t\t$cache->clean('_system');\n\t}", "title": "" }, { "docid": "8ae30ae14790576352e4c648f5f51727", "score": "0.66785717", "text": "public function add_menu_item()\n {\n $page = add_submenu_page(\n 'options-general.php',\n __('Theme Options', 'options_editor'),\n __('Theme options', 'options_editor'),\n 'manage_options',\n 'options_editor',\n array($this, 'settings_page')\n );\n\n add_action('admin_print_styles-' . $page, array($this, 'options_assets'));\n add_action('load-' . $page, array($this, 'manager_delete_options'));\n add_action('load-' . $page, array($this, 'manager_add_option'));\n }", "title": "" }, { "docid": "5f6412b7a2933d47d97669dd8f0c45ed", "score": "0.66759056", "text": "protected function menu_items()\n {\n return array(\n 'path' => 'index/create',\n 'title' => 'Create index',\n 'weight' => 1\n );\n }", "title": "" }, { "docid": "e9ba75eb795f4f1b7f0bc091a01064de", "score": "0.66731286", "text": "public function admin_menu() {\n\t\t$this->security('admin_menu',$_SESSION['user_typeID']);\n\t\t$template = \"admin_menu.tpl\";\n\t\t$this->load_smarty(null,$template);\n\t}", "title": "" }, { "docid": "3b282937155bec1de761ef0bb77a31cf", "score": "0.6664305", "text": "public function addAdminMenu()\n {\n $i18n = I18n::getPackage('Modules');\n if (!Utilities::adminMenuExists('Kontentblocks')) {\n add_menu_page(\n 'kontentblocks',\n 'Kontentblocks',\n 'manage_kontentblocks_global_modules',\n '/edit.php?post_type=kb-gmd',\n false,\n false\n );\n }\n\n add_submenu_page(\n '/edit.php?post_type=kb-dyar',\n $i18n['global']['menuTitle'],\n $i18n['global']['menuTitle'],\n 'manage_kontentblocks_global_modules',\n '/edit.php?post_type=kb-gmd',\n false\n );\n\n }", "title": "" }, { "docid": "2d6f0389848d4c772f403c8ce6cf21b8", "score": "0.66630006", "text": "function add_new_menu_item($autodisp_page_id) {\r\n\t\r\n\tglobal $wpdb;\r\n\t\r\n\t//let's get the first menu\r\n\t$menu_id = $wpdb->get_var(\"SELECT t1.term_id FROM $wpdb->terms t1 JOIN $wpdb->term_taxonomy t2 ON ( t1.term_id = t2.term_id ) WHERE t2.taxonomy = 'nav_menu' LIMIT 0,1\");\r\n\t\r\n\tif ( $menu_id ) {\r\n\t\t$item_id = wp_update_nav_menu_item($menu_id, 0, array(\r\n\t\t\t\t'menu-item-object-id' \t=> $autodisp_page_id,\r\n\t\t\t\t'menu-item-object'\t\t=> 'page',\r\n\t\t\t\t'menu-item-type' \t=> 'post_type',\r\n\t\t\t\t'menu-item-status'\t\t=> 'publish'\r\n\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\tupdate_option('auto_disp_menu_item_id', array( 'menu' => $menu_id, 'item' => $item_id ) );\r\n\t}\r\n}", "title": "" }, { "docid": "55f4482b754a0283206c9b540df9c18f", "score": "0.66608113", "text": "public function create_admin_menu() {\n\t\tdo_action( 'slp_admin_menu_starting' );\n\n\t\t// The main hook for the menu\n\t\t//\n\t\t$slp_menu_name = apply_filters( 'slp_admin_menu_text' , SLPLUS_NAME );\n\t\t$this->slplus->admin_page_prefix = sanitize_title( $slp_menu_name ) . '_page_';\n\t\t$main_hook = add_menu_page( $slp_menu_name, $slp_menu_name, 'manage_slp', SLPLUS_PREFIX, array( $this, 'renderPage_GeneralSettings' ), SLPlus::menu_icon , 31 );\n\n\t\t// Default menu items\n\t\t//\n\t\t$this->menu_items['slp_manage_locations'] =\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Locations', 'store-locator-le' ),\n\t\t\t\t'slug' => 'slp_manage_locations',\n\t\t\t\t'class' => $this,\n\t\t\t\t'function' => 'renderPage_Locations',\n\t\t\t 'screen_options' => 'slp_manage_locations_screen_options' ,\n\t\t\t);\n\t\t$this->menu_items['slp_experience'] =\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Settings', 'store-locator-le' ),\n\t\t\t\t'slug' => 'slp_experience',\n\t\t\t\t'class' => $this,\n\t\t\t\t'function' => 'render_experience_tab'\n\t\t\t);\n\t\t$this->menu_items['slp_general'] =\n\t\t\tarray(\n\t\t\t\t'label' => __( 'General', 'store-locator-le' ),\n\t\t\t\t'slug' => 'slp_general',\n\t\t\t\t'class' => $this,\n\t\t\t\t'function' => 'renderPage_GeneralSettings'\n\t\t\t);\n\n\t\tadd_filter( 'slp_menu_items' , array( $this , 'add_info_menu' ) , 90 );\n\n\t\t// Third party plugin add-ons\n\t\t//\n\t\t$new_menu_items = apply_filters( 'slp_menu_items', $this->menu_items );\n\t\tforeach( $new_menu_items as $slug => $menu_item ) {\n\t\t\tif ( ! array_key_exists( $slug , $this->menu_items ) ){\n\t\t\t\t$this->menu_items[ $menu_item['slug'] ] = $menu_item;\n\t\t\t}\n\t\t}\n\n\n\n\t\t// Attach Menu Items To Sidebar and Top Nav\n\t\t//\n\t\tforeach ( $this->menu_items as $slug => $menu_item ) {\n\n\t\t\t// Sidebar connect...\n\t\t\t//\n\t\t\t// Differentiate capability for User Managed Locations\n\t\t\tif ( $menu_item['label'] == __( 'Locations', 'store-locator-le' ) ) {\n\t\t\t\t$slpCapability = 'manage_slp_user';\n\t\t\t} else {\n\t\t\t\t$slpCapability = 'manage_slp_admin';\n\t\t\t}\n\n\t\t\t// Using class names (or objects)\n\t\t\t//\n\t\t\tif ( isset( $menu_item['class'] ) ) {\n\t\t\t\t$this->menu_items[ $slug ][ 'hook' ] = add_submenu_page(\n\t\t\t\t\tSLPLUS_PREFIX,\n\t\t\t\t\t$menu_item['label'],\n\t\t\t\t\t$menu_item['label'],\n\t\t\t\t\t$slpCapability,\n\t\t\t\t\t$menu_item['slug'],\n\t\t\t\t\tarray( $menu_item['class'], $menu_item['function'] )\n\t\t\t\t);\n\t\t\t\tif ( ! empty( $this->menu_items[ $slug ][ 'screen_options' ] ) ) {\n\t\t\t\t\tadd_action( 'load-' . $this->menu_items[ $slug ][ 'hook' ] , array( $this , $this->menu_items[ $slug ][ 'screen_options' ] ) );\n\t\t\t\t}\n\n\t\t\t\t// Full URL or plain function name\n\t\t\t\t//\n\t\t\t} else {\n\t\t\t\tif ( isset( $menu_item['url'] ) && isset( $menu_item['label'] ) ) {\n\t\t\t\t\t$this->menu_items[ $slug ][ 'hook' ] = add_submenu_page(\n\t\t\t\t\t\tSLPLUS_PREFIX,\n\t\t\t\t\t\t$menu_item['label'],\n\t\t\t\t\t\t$menu_item['label'],\n\t\t\t\t\t\t$slpCapability,\n\t\t\t\t\t\t$menu_item['url']\n\t\t\t\t\t);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->menu_items[ SLPLUS_PREFIX ][ 'hook' ] = $main_hook;\n\n\t\t// Remove the duplicate menu entry\n\t\t//\n\t\tremove_submenu_page( SLPLUS_PREFIX, SLPLUS_PREFIX );\n\t}", "title": "" }, { "docid": "b09e1907e7b6c400c9e59165c60d98ae", "score": "0.665795", "text": "static function admin_menu(){\n\t\tadd_submenu_page('themes.php', 'Sidebars', 'Sidebars', 'manage_options', __CLASS__, array('SidebarGenerator','admin_page'));\n\t}", "title": "" }, { "docid": "3c9fa52a72e58f69758523580e732f88", "score": "0.6657799", "text": "function add_admin_menu(){\n $this->admin_page = add_theme_page(\n $this->page,\n $this->page,\n 'manage_options',\n $this->option_name,\n array(&$this, 'display')\n );\n\n $this->load_assets();\n }", "title": "" }, { "docid": "0b78a1d0ccb51dc2ff68e27929e3c23a", "score": "0.66439575", "text": "public function actionAdd() {\n if (!Yii::app()->request->getQuery('menuId') || !is_numeric(Yii::app()->request->getQuery('menuId'))) {\n //new menu\n $menu = new MenuItem();\n\t\t\t\n $menu->setScenario(\"add\");\n } else {\n $menu = MenuItem::model()->findByPk(Yii::app()->request->getQuery('menuId'));\n $menu->setScenario(\"edit\");\n }\n\n if (Yii::app()->request->getQuery('owner_id') != '' )\n\t\t{\n\t\t\t$menu[\"owner_id\"] = Yii::app()->request->getQuery('owner_id');\n\t\t}\n\t\t\n \n //$userRoles = Role::model()->findAll();\n\t\t//$userRoles = AdminGroups::model()->findAll();\n\t\t/*array (\n\t\t\tarray('id' => 1, 'name' => 'Super Admin'),\n\t\t\tarray('id' => 2, 'name' => 'Admin'),\n\t\t\tarray('id' => 3, 'name' => 'Operations Admin'),\n\t\t\tarray('id' => 4, 'name' => 'Finance Admin'),\n\t\t\tarray('id' => 5, 'name' => 'Moderator'),\n\t\t\tarray('id' => 6, 'name' => 'Client'),\n\t\t\tarray('id' => 7, 'name' => 'Editor'),\n\t\t);*/\n\t\t$userRoles = Yii::app()->authManager->getAuthItems(2);\n\n if (Yii::app()->request->getPost('ajax') && Yii::app()->request->getPost('ajax') === 'menu-form') {\n echo CActiveForm::validate(array($menu));\n Yii::app()->end();\n }\n\t\t\n\t\tif (Yii::app()->request->getPost('MenuItem')) {\n \n $menu->attributes = Yii::app()->request->getPost('MenuItem');\n\n\t\t\tif ($menu->save()) {\n\t\t\t\t//change menu access\n\t\t\t\t$menusAccess = Yii::app()->request->getPost('menusAccess', array());\n\t\t\t\tif($menusAccess && count($menusAccess) > 0) \n\t\t\t\t{\n\t\t\t\t\tMenuItemAccess::model()->addMenusAccess($menu->id ,$menusAccess);\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tYii::app()->user->setFlash('menus', 'Menu Added');\n\t\t\t\tif (Yii::app()->request->isAjaxRequest) \n\t\t\t\t{\n\t\t\t\t\techo CJSON::encode(array(\n\t\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t\t'div' => \"Successfully added\"\n\t\t\t\t\t));\n\t\t\t\t\tYii::app()->end();\n\t\t\t\t} \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->redirect(array('index'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n $responseArray = array(\n 'menu' => $menu,\n 'newRecord' => true,\n 'userRoles' => $userRoles,\n );\n if (Yii::app()->request->isAjaxRequest) {\n echo CJSON::encode(array(\n 'status' => 'failure',\n 'div' => $this->renderPartial(\n Yii::app()->request->getQuery('parent') ? '_form_parent' : '_form', $responseArray, true\n )\n ));\n Yii::app()->end();\n }else\n $this->render(Yii::app()->request->getQuery('parent') ? '_form_parent' : '_form', $responseArray);\n }", "title": "" }, { "docid": "03e3db9c11518761c9b1d78892e309fe", "score": "0.6642154", "text": "public function createMenuItem() : MenuItem\n {\n $menu = new MenuItem();\n\n $menu->setTitle($this->getTitle());\n $menu->setUrl($this->getUrl() ? $this->getUrl() : $this->getId() .'-'.$this->getSlug());\n $menu->setVisible(true);\n \n return $menu;\n }", "title": "" }, { "docid": "8c062dc4b2d5323206a296207ba17848", "score": "0.664016", "text": "protected function MenuHome_new() {\n }", "title": "" }, { "docid": "9febbbdb1b7c3a50c58eb7ec69bc9466", "score": "0.66308755", "text": "public function menu( )\n {\n\n if( $this->view->isType( View::WINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n $view->setTitle('Daidalos Module');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTemplate( 'menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setSource('genf/bdl/modmenu');\n\n }", "title": "" }, { "docid": "321fd33289bcd892cd9c76c0ad829c8a", "score": "0.6629239", "text": "public function addAction() {\n \t$menuService = new Common_Service_Menu(Common::getConfig(\"siteConfig\", \"advertiser_mainMenu\"), 0);\n \t$level = $menuService->getMainLevels();\n\t\t$this->assign('level', $level);\n }", "title": "" }, { "docid": "e323de40b4e6357f7bb10a7c1fa054d4", "score": "0.6627683", "text": "public static function create_menu_item($args){\n\t\t# make sure we have a menu_id\n\t\tif(!$args['menu_id']) return;\n\t\t# insert the menu item and make sure we don't have an error\n\t\t$menu_item_id = wp_update_nav_menu_item($args['menu_id'], 0, $args);\n\t\tif(is_wp_error($menu_item_id)){\n\t\t\techo '<span class=\"fail\">There was a problem with the <code>'. $args['menu-item-title'] .'</code> menu item.</span><br />';\n\t\t\treturn;\n\t\t}\n\t\techo '<span class=\"success\">Menu item <code>'. $args['menu-item-title'] .'</code> successfully added.</span><br />';\n\t\treturn $menu_item_id;\n\t}", "title": "" }, { "docid": "0427afd67345a7b60c62723d50359b65", "score": "0.66264373", "text": "public function hook_menu() {\n\n $items = array();\n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'Waywire Videos',\n 'description' => 'Add edit and update waywire videos.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of waywire videos.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n 'title' => 'Add a waywire video',\n 'description' => 'Add a new waywire video',\n 'page callback' => 'waywire_video_add_page',\n 'access callback' => 'waywire_video_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'waywire_video.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module']),\n );\n\n // Add menu items to add each different type of entity.\n foreach (waywire_video_get_types() as $type) {\n $items[$this->path . '/add/' . $type->type] = array(\n 'title' => 'Add ' . $type->label,\n 'page callback' => 'waywire_video_form_wrapper',\n 'page arguments' => array(waywire_video_create(array('type' => $type->type))),\n 'access callback' => 'waywire_video_access',\n 'access arguments' => array('edit', 'edit ' . $type->type),\n 'file' => 'waywire_video.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n }\n\n // Loading and editing waywire video entities\n $items[$this->path . '/waywire_video/' . $wildcard] = array(\n 'page callback' => 'waywire_video_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'waywire_video_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'waywire_video.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/waywire_video/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/waywire_video/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'waywire_video_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'waywire_video_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'waywire_video.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing waywire videos\n $items['waywire_video/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'waywire_video_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'waywire_video_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'waywire_video_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "title": "" }, { "docid": "a77f163428264aefc048165bbaa62712", "score": "0.66200745", "text": "public function createTaggerAdminMenu() {\n\t\tadd_options_page( 'Tagger Options', 'Tagger Settings', 'manage_options', 'tagger-options', [\n\t\t\t$this,\n\t\t\t'addTaggerPluginOptionPage'\n\t\t] );\n\t}", "title": "" }, { "docid": "ea5e138b21c4647d2f3df3f45421c349", "score": "0.66192853", "text": "public static function generateModuleMenu()\n {\n\n Menu::modify('super_admin', function ($menu) {\n if (\\Auth::user()->can('edit_settings')) {\n\n $menu->add([\n 'url' => route('backend.menumaker.index'),\n 'title' => __('Menu Builder'),\n 'icon' => 'ni ni-briefcase-24 text-primary'\n ])/*->order(2)*/\n ;\n\n }\n\n });\n\n }", "title": "" }, { "docid": "07182215cd066418066b793340441545", "score": "0.6617469", "text": "function wolf_add_theme_options_menu_item_to_admin_bar() {\r\n\tglobal $wp_admin_bar;\r\n\t$wp_admin_bar->add_menu(\r\n\t\tarray(\r\n\t\t\t'parent' => 'site-name',\r\n\t\t\t'id' => 'wolf_options',\r\n\t\t\t'title' => esc_html__( 'Theme options', 'inkpro' ),\r\n\t\t\t'href' => esc_url( admin_url( 'admin.php?page=wolf-theme-options' ) ),\r\n\t\t\t'meta' => array( 'class' => 'wolf-admin-bar-theme-options' ),\r\n\t\t)\r\n\t);\r\n}", "title": "" }, { "docid": "aba5fbd5b5dc6dc0d8e5ac0b5458bb7d", "score": "0.66076136", "text": "public function add_admin_menu() {\n\n\t\t// Strings passed in from the config file.\n\t\t$strings = $this->strings;\n\n\t\t$this->hook_suffix = add_submenu_page(\n\t\t\tesc_html( $this->parent_slug ), esc_html( $strings['admin-menu'] ), esc_html( $strings['admin-menu'] ), sanitize_key( $this->capability ), sanitize_key( $this->merlin_url ), array( $this, 'admin_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "3167b65c9d73bb7c0e5968fbfec00d40", "score": "0.6603281", "text": "function handleAdminMenu() {\n add_meta_box('960gs_sc', 'Gestion des colonnes', 'insertForm', 'post', 'normal');\n add_meta_box('960gs_sc', 'Gestion des colonnes', 'insertForm', 'page', 'normal');\n}", "title": "" }, { "docid": "ff94828ab97f912f4e2abac0b056de94", "score": "0.6601466", "text": "function dev_edit_admin_menus() {\r\n\t global $menu;\r\n\t global $submenu;\r\n\r\n\t $menu[5][0] = 'News'; // Change Posts to Houses\r\n\t $submenu['edit.php'][5][0] = 'News';\r\n\t $submenu['edit.php'][10][0] = 'Add News';\r\n\t $submenu['edit.php'][16][0] = 'News Tags';\r\n\t }", "title": "" }, { "docid": "5c1684c599d9eaca881d039d3258c09f", "score": "0.65991575", "text": "public function create()\n {\n $this->data('model', new MainPageMenu);\n\n $this->data('page_title', trans('labels.mainpagemenu_create'));\n\n $this->breadcrumbs(trans('labels.mainpagemenu_create'));\n\n $this->_fillAdditionalTemplateData();\n\n return $this->render('views.mainpagemenu.create');\n }", "title": "" }, { "docid": "a0e5eccde5a4d3e1f855aea941f37a95", "score": "0.65985453", "text": "function sp_register_admin_menu()\n{\n if(sp_user_rights())\n $page = add_submenu_page('tools.php', 'Social Poster', 'Social Poster', 'publish_posts', 'Social-Poster', 'sp_main_page');\n}", "title": "" }, { "docid": "724901afc14373e46b8001e0249162d5", "score": "0.65971124", "text": "public function create()\n {\n return view('pages.admin.menus.create');\n }", "title": "" }, { "docid": "9bee3eb17997fd1ee46f2713c3b47775", "score": "0.65949726", "text": "public static function register_menu() {\n\t\tadd_options_page(_x('Feast', 'page title', 'feast'), _x('Feast', 'menu title', 'feast'), 'manage_options', 'feast_options', array(__CLASS__, 'admin_page'));\n\t}", "title": "" }, { "docid": "76d56e773b2063ac3731c0db6e29de63", "score": "0.65904593", "text": "public function addAdminMenu()\n {\n\n if (!Utilities::adminMenuExists('Kontentblocks')) {\n add_menu_page(\n 'kontentblocks',\n 'Kontentblocks',\n 'manage_kontentblocks_dynamic_areas',\n '/edit.php?post_type=kb-dyar',\n false,\n false\n );\n }\n add_submenu_page(\n '/edit.php?post_type=kb-dyar',\n 'Areas',\n 'Areas',\n 'manage_kontentblocks_dynamic_areas',\n '/edit.php?post_type=kb-dyar',\n false\n );\n\n }", "title": "" }, { "docid": "fe3358c15e79bf9493b613be7c937145", "score": "0.65900177", "text": "public function admin_menu() {\n // anything for Settings class\n $this->_settings->admin_menu();\n }", "title": "" }, { "docid": "630cc17d81876abd860dc62dbd64c30a", "score": "0.65898705", "text": "function createMenu($menu_data) {\n $menu_data = array_merge(['enabled' => 1], $menu_data);\n if (findMenu($menu_data['title'], $menu_data['menu_name'], $menu_data['parent'])) {\n drush_print('The menu \"' . $menu_data['title'] . '\" is existing.');\n return;\n }\n $menu = MenuLinkContent::create($menu_data);\n $menu->save();\n drush_print('The menu \"' . $menu->getTitle() . '\" is created.');\n return $menu;\n}", "title": "" }, { "docid": "f115562655978f18b3c75448ed1a5d2d", "score": "0.6584707", "text": "public function adminMenu() {\n\n\t\tadd_menu_page(\n\t\t\tesc_html__( 'Sermon Test', 'wpsm' ),\n\t\t\tesc_html__( 'Sermon Test', 'wpsm' ),\n\t\t\t$this->getEditCapability(),\n\t\t\t$this->getMenuSlug(),\n\t\t\t'',\n\t\t\t'dashicons-book-alt',\n\t\t\t21.48376 // Life hack: this makes it very unlikely we'll have a position collision with another plugin\n\t\t);\n\t}", "title": "" }, { "docid": "e21b3ef565bb50dec3afdbc5195a9230", "score": "0.6582935", "text": "public function admin_menu() {\n\n\t\tadd_submenu_page(\n\t\t\t$this->menu_parent,\n\t\t\t$this->menu_name,\n\t\t\t$this->menu_name,\n\t\t\t'manage_options',\n\t\t\t'edit.php?post_type=' . $this->cpt_slug\n\t\t);\n\n\t}", "title": "" }, { "docid": "c48d0df648a22512b043f52523ca3c7d", "score": "0.65827966", "text": "static function admin_menu() {\n\t add_menu_page('NBW', 'Nothing But Web', 'manage_options', 'NBWGlucose', array('NBWAdmin', 'option_page'), 'none');\n// add_options_page(\"NBW Custom\", \"NBW\", \"manage_options\", \"NBW-custom\", array(\"NBWAdmin\", \"option_page\"));\n }", "title": "" }, { "docid": "968837f4de80bd1e3d6fecc00de9a0de", "score": "0.65823984", "text": "public static function admin_menu() {\n\t\tadd_menu_page( 'Academy', 'Academy', 'manage_options', 'djb-academy', array( 'DJB\\Admin', 'shadow_academy' ) );\n\t\tadd_menu_page( 'ACC', 'ACC', 'manage_options', 'djb-acc', array( 'DJB\\Admin', 'acc' ) );\n\t\tadd_menu_page( 'MAA', 'MAA', 'manage_options', 'djb-maa', array( 'DJB\\Admin', 'maa' ) );\n\t\tadd_menu_page( 'DJB Data', 'DJB Data', 'manage_options', 'djb-data', array( 'DJB\\Admin', 'page_data' ) );\n\t\tadd_menu_page( 'DJB Importer', 'DJB Importer', 'manage_options', 'djb-data-importer', array( 'DJB\\Admin', 'importer' ) );\n\n\t\t$importers = static::importers();\n\n\t\tadd_submenu_page( 'djb-data-importer', 'Dashboard', 'Dashboard', 'manage_options', 'djb-data-importer', array( 'DJB\\Admin', 'importer' ) );\n\n\t\tforeach( $importers as $slug => $name ) {\n\t\t\t$object = self::importer_object( $name );\n\n\t\t\tadd_submenu_page( \n\t\t\t\t'djb-data-importer', \n\t\t\t\t$name, \n\t\t\t\t$name, \n\t\t\t\t'manage_options', \n\t\t\t\t'djb-data-importer-' . $slug, \n\t\t\t\tarray( \n\t\t\t\t\t$object, \n\t\t\t\t\t'page'\n\t\t\t\t) \n\t\t\t);\n\t\t}//end foreach\n\t}", "title": "" }, { "docid": "2b425df3789bf1491f317d1328385c04", "score": "0.65811586", "text": "function menu_button( $wp_admin_bar ) {\n\tif ( ! syndicatable() ) {\n\t\treturn;\n\t}\n\n\t$wp_admin_bar->add_node(\n\t\tarray(\n\t\t\t'id' => 'distributor',\n\t\t\t'title' => esc_html__( 'Distributor', 'distributor' ),\n\t\t\t'href' => '#',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "91642e754a38418a10e530b8feaeab6e", "score": "0.6579717", "text": "public static function admin_menu() {\n\t\t$admin_page = add_menu_page (\n\t\t\t\t__ ( 'Catáºlogo', 'catalogo' ),\n\t\t\t\t__ ( 'Catálogo', 'catalogo' ),\n\t\t\t\t'manage_options', 'catalogo',\n\t\t\t\tarray (\n\t\t\t\t\t__CLASS__,\n\t\t\t\t\t'catalogo_menu_settings' \n\t\t\t\t),\n\t\t\t\tCATALOGO_PLUGIN_URL . '/images/settings.png' );\n\t}", "title": "" }, { "docid": "34798767d8e03abe66dfc75ecdf601c2", "score": "0.6579247", "text": "function sfavorites_create_admin_page()\n{\n add_menu_page('Stellar Favorites', 'Stellar Favorites', 'edit_pages', 'stellar-favorites.php',\n 'sfavorites_admin_page', 'dashicons-star-half', 49);\n}", "title": "" }, { "docid": "6c0f5cda8fdb82fc59a32d3bb3e0bbb8", "score": "0.6575859", "text": "function add_admin_menu() {\n add_menu_page('Hello World', 'Hello World plugin', 'manage_options', 'helloworld', array($this, 'menu_html')); }", "title": "" }, { "docid": "3b1f8de0622ca337c0f37883ef7f5ab7", "score": "0.65706784", "text": "static function insertMenuItem($hmenu,$before = null,$position_item,$menuItemInfo) \n {\n \n }", "title": "" }, { "docid": "d8a722729dc293ecd3a64f5bb218e56a", "score": "0.65686864", "text": "public static function declareAdmin(){\n add_menu_page('Configuration Météo', 'Meteo',\n 'manage_options', 'Meteo', array($this, 'menuHtml'));\n\n }", "title": "" }, { "docid": "6847558731ff8fa13609e377edb9b511", "score": "0.6563985", "text": "public function index()\n {\n \n\n return view('admin.menu.create',[\n 'nav' => true,\n 'sidebar' => true,\n 'action' => Route('menu_save'),\n 'title' => 'update',\n ]);\n }", "title": "" }, { "docid": "de0b046b3211cb017f570c02b9972a16", "score": "0.6561252", "text": "function extendAdminMenu(Menu_Admin $menu)\n{\n // další položky\n $menu->addItem( Menu_Admin::SECTION_LISTS, \n new Menu_Admin_Item(34000, array('cs' => 'Druhy místností'), 'places-list', 'text','page.png') );\n $menu->addItem( Menu_Admin::SECTION_LISTS, \n new Menu_Admin_Item(34001, array('cs' => 'Druhy řemeslníků'), 'peoples-list', 'text','page.png') );\n\n // vlastní sekce\n $menu->addSection('cubecms', array('cs' => 'Cube CMS - testing'), 'cog.png');\n $menu->addItem( 'cubecms', \n new Menu_Admin_Item(Menu_Admin_Item::getLastID(), array('cs' => 'Text v záhlaví'), 'text-header', 'text','page.png') );\n $menu->addItem( 'cubecms', \n new Menu_Admin_Item(Menu_Admin_Item::getLastID(), array('cs' => 'Text v zápatí'), 'text-footer', 'text','page.png') );\n}", "title": "" }, { "docid": "a5582d6a3e55a4421bf58242c69bc501", "score": "0.655345", "text": "public static function admin_menu() {\n\t\t$title = esc_html__( 'Webmention', 'webmention' );\n\t\tadd_management_page(\n\t\t\t$title,\n\t\t\t$title,\n\t\t\t'manage_options',\n\t\t\t'webmention-tools',\n\t\t\tarray( static::class, 'tools_page' )\n\t\t);\n\t}", "title": "" }, { "docid": "cca95d7fc9c8f4b1f514a4e15137f4e8", "score": "0.6550901", "text": "function getMenuItems()\n {\n $this->menuitem(\"document_types\", dispatch_url(\"docmanager.documenttype\", \"admin\"), \"setup\", array(\"docmanager.documenttype\", \"admin\"));\n }", "title": "" }, { "docid": "ec2d3e900c1f06652a0410e12fc01d86", "score": "0.6546048", "text": "static function admin_menu(){\n\t\tadd_submenu_page('edit.php?post_type=document', 'Paypal Credentials', 'Paypal', 'manage_options', 'papal-for-documents', array(get_class(), 'configure_payapl'));\n\t\tadd_submenu_page('edit.php?post_type=document', 'Document Plans', 'Plan & Price', 'manage_options', 'plan-nd-price-for-documents', array(get_class(), 'plan_and_price'));\t\t\n\t}", "title": "" }, { "docid": "aa8fa893e17b472ff771b8c9912569da", "score": "0.6544293", "text": "public function testCreateMenu()\n {\n\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "a4b3ababbaf4bafe0df36c978c358635", "score": "0.0", "text": "public function destroy($id)\n {\n $product = product::find($id);\n if($product != null) {\n $product->delete();\n return response([\n 'message' => 'Data has been deleted!']);\n } else {\n return response([\n 'message' => 'No data found!',], 403);\n }\n }", "title": "" } ]
[ { "docid": "323473ed6f508b74e659356efaa1c48c", "score": "0.71817523", "text": "public function delete(Resource $resource);", "title": "" }, { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "d0200b5511e373dc382f72a63508d06c", "score": "0.6805081", "text": "public function remove()\n {\n\n // delete it phsically\n Storage::delete($this->getAttribute('file_path'));\n\n // delete the db record\n $this->delete();\n\n }", "title": "" }, { "docid": "60e0eaaca05e10d390d77cb40782adfc", "score": "0.67393976", "text": "public function remove($resourcePath, $checkExistence = true);", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "901346032d849135a1cc9b1c8ea4554a", "score": "0.6501505", "text": "public function remove()\n {\n $this->store->remove($this->identifier);\n }", "title": "" }, { "docid": "dfa556aa3ba45a435d6c6cf0513a0e45", "score": "0.62263656", "text": "private function delete($resource, $max_version = FALSE)\n\t{\n\t\t// check its retention policy\n\t\t\n\t\t// if only archiving\n\t\tDatabase::getInstance()->archive($resource, $max_version);\n\t}", "title": "" }, { "docid": "fe71fcb7a71c2406c9cd8f327891a179", "score": "0.61919874", "text": "function destroy( $resource ){\n\n $result = softDelete( 'products', $resource );\n\n if( !$result ){\n\n redirect( route( 'product?message=1' ) );\n\n }\n\n redirect( route( 'product' ) );\n}", "title": "" }, { "docid": "2a16eec4649872586b53cd9c5d322b4e", "score": "0.6179796", "text": "final public function delete()\n {\n $this->data->unlink();\n }", "title": "" }, { "docid": "2e3244eae75a5a190b83c17304240fa4", "score": "0.61707264", "text": "public function destroy(Resource $resource)\n {\n try {\n Gate::authorize('delete', $resource);\n\n $resource->delete();\n } catch (\\Illuminate\\Database\\Eloquent\\ModelNotFoundException $e) {\n\n throw abort(401);\n }\n\n $fileName = $resource->getMedia()[0]->file_name ?? 'unknown file';\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-resource',\n 'message' => $fileName . ' was deleted sucessfully!',\n 'resource_id' => $resource->id\n ]);\n }", "title": "" }, { "docid": "e66bdca3dafa110f9ec6b1f5dc9131de", "score": "0.61525285", "text": "function destroy( $resource ){\n\n return softDelete( 'receivables', $resource) ? true : false;\n\n}", "title": "" }, { "docid": "77014b4d73bed44bc9f32b0e436008eb", "score": "0.61250305", "text": "public function remove()\n {\n @unlink($this->getCachePath());\n }", "title": "" }, { "docid": "2931d9b75e0e409683172c9703f69836", "score": "0.61063725", "text": "public function delete(){\n Storage::cloud()->delete($this->url);\n parent::delete();\n }", "title": "" }, { "docid": "4d3716fdeabf4d654b91d48076636ceb", "score": "0.6075143", "text": "public function deleteresource($instrumentID,$resourceID) {\r\n $user_id = Auth::user()->getId();\r\n $instrumentID = (int) $instrumentID; // force instrumentID to int for security\r\n $resourceID = (int) $resourceID; // force resourceID to int for security\r\n\r\n // then we need an image to represent the mp3\r\n $resourcequery = \\DB::table('resources')\r\n ->where('resourceID', '=', $resourceID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($resourcequery) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for resource\r\n }\r\n\r\n $resourceType = $resourcequery[0]->resourceType; \r\n $resourceFileName = $resourcequery[0]->resourceFileName; \r\n\r\n // get instrument\r\n $instrument = \\DB::table('instruments')\r\n ->where('instrumentID', '=', $instrumentID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($instrument) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for instrument\r\n }\r\n\r\n $legalBodyID = $instrument[0]->legalBodyID; \r\n $instrumentName = $instrument[0]->titlePreferred; \r\n\r\n // get collection\r\n $legalbodies = \\DB::table('legalbodies')\r\n ->where('legalBodyID', '=', $legalBodyID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($legalbodies) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for collection\r\n }\r\n\r\n $legalBodyMDAcode = $legalbodies[0]->legalBodyMDAcode; \r\n $legalBodyName = $legalbodies[0]->legalBodyName; \r\n\r\n // now remove the record from the database...\r\n \\DB::table('resources')->where('resourceID', '=', $resourceID)->delete();\r\n\r\n // now remove any rights info for this resource from the database...\r\n \\DB::table('rights')->where('resourceID', '=', $resourceID)->delete();\r\n\r\n // set flash data to show deletion\r\n session()->flash('flashdata', \"Instrument resource successfully deleted\");\r\n $sessiondata = session()->all();\r\n\r\n // add delete resource activity\r\n \\DB::table('user_activity')->insert(\r\n ['userID' => $user_id, 'resourceID' => $resourceID, 'activity' => \"You deleted a \".$resourceType, 'instrumentID' => $instrumentID, 'instrumentName' => $instrumentName, 'legalBodyID' => $legalBodyID, 'legalBodyName' => $legalBodyName, 'activityDate' => \\Carbon\\Carbon::now() ]\r\n );\r\n\r\n // remove the files then redirect...\r\n if ($resourceType == \"image\")\r\n {\r\n \\File::Delete('instrument_resources/images/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the image\r\n \\File::Delete('instrument_resources/images/'.$legalBodyMDAcode.'/thumbnails/'.$resourceFileName); // delete image thumb if exists\r\n return \\Redirect::action('Resources@editimages', array('instrumentID' => $instrumentID)); // redirect to image list\r\n } \r\n\r\n if ($resourceType == \"sound\")\r\n {\r\n \\File::Delete('instrument_resources/sound/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the audio\r\n return \\Redirect::action('Resources@editaudio', array('instrumentID' => $instrumentID)); // redirect to audio list\r\n } \r\n\r\n if ($resourceType == \"video\")\r\n {\r\n \\File::Delete('instrument_resources/video/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the video\r\n return \\Redirect::action('Resources@editvideo', array('instrumentID' => $instrumentID)); // redirect to video list\r\n } \r\n\r\n}", "title": "" }, { "docid": "cc659928abe790e8fac51c06e7c6117b", "score": "0.6034554", "text": "public function destroy($id)\n {\n $slider = Slider::find($id);\n \n if(Storage::disk('public')->exists($slider->image)){\n Storage::disk('public')->delete($slider->image);\n $slider->delete();\n\n return redirect()->route('admin.slider.index');\n\n\n }\n}", "title": "" }, { "docid": "f57a1543be50c05c9d9e836022b5df10", "score": "0.60049963", "text": "public function deleteInStorage()\n {\n $driver = Storage::disk($this->storage);\n $driver->delete($this->source);\n\n $styles = $this->imagestyles()->filter(function ($item) {\n return $item['path'];\n });\n foreach ($styles as $style) {\n $driver->delete($style['path']);\n }\n }", "title": "" }, { "docid": "0907ddc27d61e616fb26e1efc6859210", "score": "0.599938", "text": "public function unpublishPersistentResource(\\TYPO3\\Flow\\Resource\\Resource $resource)\n {\n return $this->resourcePublishingTarget->unpublishPersistentResource($resource);\n }", "title": "" }, { "docid": "65d9262aaa2d8511e09375a64eebcea3", "score": "0.5985362", "text": "protected function deleteFromStorage(string $path): void\n {\n unlink($this->storagePath($path));\n }", "title": "" }, { "docid": "870c1879d675e54a39e9c3193bfa3762", "score": "0.5935635", "text": "protected function deleteResource($resourceId) {\n if($this->resourceModel != null) {\n $this->resourceModel->deleteResource($resourceId);\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "6135bcff168c3ab2e042cd2a00a4650c", "score": "0.59222406", "text": "protected function removeStorage()\n {\n $this->session->remove($this->formid);\n }", "title": "" }, { "docid": "91d9de58482d119659d570a40c8aa219", "score": "0.59040296", "text": "public function remove($entity)\n {\n $location = './public' . $this->options->getAttachmentPath() . $entity->getFileName();\n unlink($location);\n\n parent::remove($entity);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "1ff0354ec98125684a2a7f79c1a86828", "score": "0.5880235", "text": "function delete() {\n\n unlink($this->path);\n\n }", "title": "" }, { "docid": "15d77f2192a4aacfad530291891099cb", "score": "0.5879458", "text": "private function delete_resource($rid){\n\t\t$this->r_db->query('DELETE FROM resource WHERE rid = $rid');\n\t}", "title": "" }, { "docid": "665b7c1d9e70f47ed64d96953e0ebd6a", "score": "0.5873777", "text": "public function remove()\n\t{\n\t\t$this->deleteOrTrash(false);\n\t}", "title": "" }, { "docid": "801474b9e900757e5407f546db807117", "score": "0.5853427", "text": "public function destroy($id)\n {\n $store = Store::find($id);\n $path = '/storage/store_image/'.$store->pic;\n //var_dump(public_path().$path);\n File::delete(public_path().$path);\n \n \n $store->delete();\n return redirect('/adminstore');\n }", "title": "" }, { "docid": "306e785660b4a48d4b7818865a87fdbf", "score": "0.5834261", "text": "public function delete($resourceType, $resourceId, $parameters = []);", "title": "" }, { "docid": "9ebd94a50a2e958b6710ddc0436ae1ea", "score": "0.5826271", "text": "public function destroy(StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "4d396a2a1d64c7bc35e491fede78f6ac", "score": "0.5820096", "text": "public function destroy(Attribute $attribute);", "title": "" }, { "docid": "7db018972c54aca2f0bcafd770255c57", "score": "0.5793602", "text": "public function remove($key) {\n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1bbcc8124b9085869b6835e05fefac01", "score": "0.5779648", "text": "public function deleteResource($entity)\n {\n $this->getDoctrine()->getManager()->remove($entity);\n $event = new RepositoryEvent($entity, 'delete');\n $this->get('event_dispatcher')->dispatch('okApp.pre_validate', $event);\n $this->get('event_dispatcher')->dispatch('okApp.pre_flush', $event);\n $this->getDoctrine()->getManager()->flush(); // save changes to already attached entity\n $this->get('event_dispatcher')->dispatch('okApp.post_flush', $event);\n\n return $entity;\n }", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "ebc7a125ebe4737bc2998e770814f71b", "score": "0.5739182", "text": "public function destroy($id)\n {\n $res = UploadResource::findOrFail($id);\n $path = $res->{'path'};\n $ueditor = app('ueditor');\n if ($result = $ueditor->deleteResource($path)) {\n $res->delete();\n }\n return response()->json(['code' => 200, 'data' => ['result' => $result]]);\n }", "title": "" }, { "docid": "3c664f57f9c4dbfaab4e33c4c362aa28", "score": "0.5723814", "text": "public function remove() {\n return unlink($this->getAbsolute());\n }", "title": "" }, { "docid": "b86ae32c63f3ca7d52497df28e9fc6c7", "score": "0.5715146", "text": "public function remove(string $path): self;", "title": "" }, { "docid": "987fae9b29119a6e8cf27b87eaa6430d", "score": "0.5696804", "text": "public function __unlink__() {\n \n // has been unlinked before?\n if ( $this->_unlinked ) return;\n \n // test if object is writable by current user\n if ( !$this->isWritable() )\n throw Object( 'Exception.IO', 'Not enough permissions to delete object: ' . $this->url );\n \n // set the unlinked object flag \n $this->_unlinked = TRUE;\n \n // if the object has an _id, it implies that the object has been saved\n // before in the database. so we remove it.\n if ( $this->_id ) {\n // make sure we delete only a single object from database.\n $this->_server->objects->remove([ '_id' => $this->_id ], [ 'justOne' => TRUE ]);\n }\n \n }", "title": "" }, { "docid": "31552ad8a419fce5ba6d67be1e8ea658", "score": "0.56877464", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n if($file->delete())\n {\n return new FileResource($file);\n }\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "f9520978afbaf3da90dc31b6415b2157", "score": "0.5683821", "text": "public function wipeStorage(): void\n {\n }", "title": "" }, { "docid": "e69dc0cbd5f874e75c6ce3e19f1fda0b", "score": "0.56808966", "text": "public function remove($identifier)\n {\n unset($this->assets[$identifier]);\n }", "title": "" }, { "docid": "30573ad9e3e221d53f80f033fa21635e", "score": "0.56723815", "text": "public function rmPhoto($photo) \n {\n return Storage::delete($this->storagePath.'/'.$photo);\n }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.5665747", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.5665747", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "65d0b4ad7c743cc4cb3030c4f6cc4bf1", "score": "0.5652733", "text": "public function destroy($id)\n {\n $brand=Brand::with('photo')->whereId($id)->first();\n //for showing image the url is:/storage/photos/imagName\n //for deleting image the url is:public/photos/image\n //so we need to ommit storage from the path\n // the storage is added to path by accessor in photo model\n $dir= str_replace('/storage/','',$brand->photo->path);\n Storage::disk('public')->delete($dir);\n //the bellow works when we dont use accessors\n// Storage::disk('public')->delete('photos/'. $brand->photo->path);\n Photo::find($brand->photo_id)->delete();\n Session::flash('delete','برند با موفقیت حذف گردید.');\n return redirect()->route('brand.index');\n }", "title": "" }, { "docid": "3c1d74895129edf90ccfa12701fc59d9", "score": "0.56470865", "text": "public function deleted(Asset $asset): void\n {\n $asset->project->decrementUsedStorageBy($asset->file_size);\n }", "title": "" }, { "docid": "6aabfb0c93b68c59f34da645f69bf7cc", "score": "0.5638543", "text": "public function destroy($id) {\n\n\n $image = Image::find($id);\n unlink(public_path() . \"/extra-images/\" . $image->path);\n $image->delete();\n\n return redirect()->back();\n }", "title": "" }, { "docid": "d518661f40324022339bdb48961c2dff", "score": "0.5636839", "text": "public function delete($path)\n {\n $objectName = $this->_getObjectName($path);\n\n $status = $this->_s3->removeObject($objectName);\n\n if (!$status) {\n if ($this->_s3->isObjectAvailable($objectName)) {\n throw new Omeka_Storage_Exception('Unable to delete file.');\n } else {\n _log(\"Omeka_Storage_Adapter_ZendS3: Tried to delete missing object '$objectName'.\", Zend_Log::WARN);\n }\n } else {\n _log(\"Omeka_Storage_Adapter_ZendS3: Removed object '$objectName'.\");\n }\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "5f74be406524d1dd367332df9f956681", "score": "0.5630604", "text": "public function fsRemove(): void;", "title": "" }, { "docid": "c291ed5f62661f8ae3c7ebd197fd20a7", "score": "0.56288564", "text": "public function destroy($id)\n {\n $link=Link::find($id);\n //delete related file from storage\n $link->delete();\n return redirect()->route('links.index');\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "73ac3f972acee5b7fd463d6b5a330028", "score": "0.5622749", "text": "public function destroy($upload)\n {\n $upload = Upload::find($upload);\n\n if($upload->delete()){\n return new UploadResource($upload);\n }\n }", "title": "" }, { "docid": "81330da370f2fa8918bf911dbbabd413", "score": "0.5621184", "text": "public function delete_image(){\n Storage::delete($this->image_path);\n }", "title": "" }, { "docid": "f352556f4e66b189947335dec9b06fff", "score": "0.5616907", "text": "public function destroy($id)\n {\n $item = Item::find($id);\n \n\n\n if(Storage::exists('/public/item/'.$item->image)){\n\n Storage::delete('/public/item/'.$item->image);\n\n }\n\n $item->delete();\n \n\n return redirect()->route('item.index')->with('success','item is deleted');\n }", "title": "" }, { "docid": "f4fee47f6d2a99e0273d0b83ff75e8d1", "score": "0.5606612", "text": "public function unpublishPersistentResource(\\TYPO3\\Flow\\Resource\\Resource $resource)\n {\n $result = false;\n $pathAndFilename = $this->buildPersistentResourcePublishPathAndFilename($resource, true);\n foreach (glob($pathAndFilename . '*') as $publishedResourcePathAndFilename) {\n unlink($publishedResourcePathAndFilename);\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "de45c4dca2d6523c2022cb0e74bc40d3", "score": "0.56060195", "text": "public function destroy($id)\n\t{\n\t\t$disk = Storage::disk('s3');\n\t\t$product = Product::find($id);\n\t\t$server = MyS3Tool::getGlideServer();\n \t\t$server->deleteCache($product->file_path);\n\t\t$disk->delete($product->file_path);\n\t\t$product->delete();\n\t\treturn Redirect::to('admin/products');\n\t}", "title": "" }, { "docid": "c0964a1f3d98ed05c28e086f64c70cd6", "score": "0.5598138", "text": "public function destroy($id){\n $image = $this->findById($id);\n return $image->delete();\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "ac975279aabe631d72ba36ab9e59ecc2", "score": "0.5591231", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n if ($file->delete()) {\n return new FileResource($file);\n }\n }", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.5590984", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "74b509420981e517c8d4ac09b8facadd", "score": "0.5582708", "text": "public function deleteImage() {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "a3405548801d1f43db03c2af439660f3", "score": "0.5578764", "text": "public function testRemove()\n {\n $path = 'foo.bar';\n // Not expecting much this time\n $repository_mock = $this->getRepositoryMock();\n\n $repository_mock\n ->expects($this->once())\n ->method('remove')\n ->with($path)\n ;\n\n $storage = new DatabaseStorage($repository_mock);\n $storage->remove($path);\n }", "title": "" }, { "docid": "5179b19b5312e92f8e000263d75f03ae", "score": "0.5571099", "text": "public function remove(Ressource $ressource)\n {\n if ($hash = $this->contains($ressource)) {\n unset($this->register[$hash]);\n }\n }", "title": "" }, { "docid": "471ea99d18c0ec83043973e3c3a7bee0", "score": "0.55674917", "text": "public function removeFromStorage(string $key): RequestInterface;", "title": "" }, { "docid": "32ccf3fad3618561467a2c67eea18aac", "score": "0.5564203", "text": "public function destroy($id)\n {\n $produc=products::find($id);\n if(Storage::disk('public')->exists('productImage/'.$produc->image)){\n Storage::disk('public')->delete('productImage/'.$produc->image);\n }\n $produc->delete();\n return redirect()->back();\n\n\n\n\n }", "title": "" }, { "docid": "18ffafef63ac8ab7ff8598b372ac00db", "score": "0.55592227", "text": "function del_resource($id){\n $data = $this->executeSQL(\"SELECT 1 AS Exist FROM Room_Resource WHERE RoomID = $id LIMIT 1\");\n if($data != null)\n return false;\n\n $sql =\n \"DELETE FROM\n Resource\n WHERE\n Resource.ResourceID = $id\";\n\n return $this->executeCommand($sql);\n }", "title": "" }, { "docid": "3a4437ecd3ac49434983bcba4dbcca09", "score": "0.55526173", "text": "public function destroy($id){\n\n $data = Product::findOrFail($id);\n if (strpos($data->image, '/uploads/') !== false) {\n $image = str_replace( asset('').'storage/', '', $data->image);\n Storage::disk('public')->delete($image);\n }\n $data->delete();\n $message = __('dashboard.deleted');\n return $this->successResponse(null, $message);\n }", "title": "" }, { "docid": "13d8740fa49c2f0b7efc4e2a52be2a21", "score": "0.5548022", "text": "public function destroy(Request $request)\n {\n //\n\n\n $Details = store::where('id', $request->id)->first();\n Storage::disk('public_uploads')->delete($Details->file_path);\n $Details->delete();\n session()->flash('delete', 'T-Shirt Deleted');\n return redirect('/store');\n\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "1e91a964584f7d2cabfa01501c86af79", "score": "0.5539283", "text": "public function unSaveResource(Resource $resource)\n {\n $this->resourceModel->unSaveResourceFromLoggedInUser($resource);\n return redirect()->back();\n }", "title": "" }, { "docid": "fd689274281a2b1dd2aff836fb81a613", "score": "0.5537332", "text": "public function destroy($id)\n {\n // Todo soft deleting..\n }", "title": "" }, { "docid": "9e1d042bf9beb73bf0bd909737159dcd", "score": "0.5536505", "text": "public function destroy($id)\n {\n $ad=Ad::find($id);\n //delete related file from storage\n $ad->delete();\n return redirect()->route('ads.index');\n }", "title": "" }, { "docid": "381b30a221854b3db02b5984cf2dfa22", "score": "0.5533826", "text": "public function remove()\n {\n // Evaluate timestamp and set attribute\n $timestamp = date('Y:m:d H:i:s');\n $attribute = static::$softDeleteAttribute;\n $this->$attribute = $timestamp;\n\n // Save record\n $this->save(false, [$attribute]);\n\n // Trigger after delete\n $this->afterDelete();\n }", "title": "" }, { "docid": "def6dee7957f1dde81d6592297e7ae11", "score": "0.5529798", "text": "static public function remove($var)\n\t\t{\n\t\t\ttry {\n\t\t\t\tStorage::remove(self::TABLE, array('var' => $var));\n\t\t\t} catch (Storage\\Exception $e) {\n\t\t\t\tthrow new MetaException($e->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "02ecd7a76ad592c312f2ab516e079c3f", "score": "0.5523932", "text": "public function destroy($id)\n {\n $file = CloudStorage::find($id);\n $filename = $file->file_name;\n $dir = '/';\n $recursive = false;\n $contents = collect(Storage::cloud()->listContents($dir, $recursive));\n $file = $contents\n ->where('type', '=', 'file')\n ->where('filename', '=', pathinfo($filename, PATHINFO_FILENAME))\n ->where('extension', '=', pathinfo($filename, PATHINFO_EXTENSION))\n ->first(); // there can be duplicate file names!\n Storage::cloud()->delete($file['path']);\n CloudStorage::destroy($id);\n return redirect()->route('reports.index');\n }", "title": "" } ]
4eaaa25bbe1456d122f436a0598dc103
without this laravel would allow multiple requests to be sent simply by clicking "add/edit" button multiple times it introduces delay in adding and editing so it prevents spam
[ { "docid": "059e7b109f473de5f7c641dd64637fe8", "score": "0.0", "text": "public function add(Request $request)\n {\n if(isSpam($request, \"addArtistSpam\")){\n return redirect()->back()->withErrors([\"spam\" => \"you will have to wait 10s to add new contractor\"]);\n die();\n }\n\n $this->validate($request, [\n 'company_name' => 'required|string|max:255',\n 'initial_payment' => 'numeric|required|regex:/^\\d*(\\.\\d{1,2})?$/|min:0|max:1000000000',\n 'full_payment' => 'numeric|required|regex:/^\\d*(\\.\\d{1,2})?$/|min:0|max:1000000000',\n 'type' => 'required|string|max:255',\n\n 'description' => 'string|max:255',\n ],\n ['regex' => 'The :attribute is currency therefore has to be formatted : x.xx or x.x or x ',]\n );\n\n $concert_id = $request->session()->get(\"concertId\");\n\n $company_name = $request->input('company_name', '');\n $type = $request->input('type', '');\n $initial_payment = $request->input('initial_payment', '');\n $full_payment = $request->input('full_payment', '');\n $description = $request->input('description', '');\n\n $contractor = new Contractor();\n\n\n $contractor->concert_id = $concert_id;\n\n $contractor->company_name = $company_name;\n $contractor->type = $type;\n $contractor->initial_payment = $initial_payment;\n $contractor->full_payment = $full_payment;\n $contractor->description = $description;\n\n\n $contractor->save();\n\n\n return redirect()->route(\"manageContractorPanel\");\n }", "title": "" } ]
[ { "docid": "04a6ccb42f4cb63a56d2e4e637e65bb0", "score": "0.62530035", "text": "public function actionIndex()\n {\n ini_set('memory_limit', '-1');\n //OrderFunctions::checkRequests();\n //self::checkAllRequests();\n if (isset($_POST['editableAttribute'])) {\n $toLog = [\n 'type' => 'request',\n 'title' => '',\n 'description' => '',\n ];\n /** @var Request $model */\n $model = Request::find()\n ->where(['_id' => $_POST['editableKey']])\n ->one();\n if ($_POST['editableAttribute'] == 'closeDate') {\n $model['closeDate'] = date(\"Y-m-d H:i:s\", $_POST['Request'][$_POST['editableIndex']]['closeDate']);\n $toLog['title'] = 'Изменена дата закрытия заявки';\n $toLog['description'] = 'Комментарий: изменена дата закрытия заявки №' . $model['serialNumber'] . ' на ' . $model['closeDate'];\n }\n if ($_POST['editableAttribute'] == 'requestStatusUuid') {\n $model['requestStatusUuid'] = $_POST['Request'][$_POST['editableIndex']]['requestStatusUuid'];\n $toLog['title'] = 'Изменен статус заявки';\n $toLog['description'] = 'Комментарий: изменен статус заявки №' . $model['serialNumber'] . ' на ' . $model['requestStatus']['title'];\n if ($model['requestStatusUuid'] == RequestStatus::COMPLETE) {\n Request::closeAppeal($model);\n }\n }\n if ($_POST['editableAttribute'] == 'type') {\n $model['type'] = $_POST['Request'][$_POST['editableIndex']]['type'];\n if ($model['type'] == 0)\n $type = \"Бесплатная заявка\";\n else $type = \"Платная заявка\";\n $toLog['title'] = 'Изменен тип заявки';\n $toLog['description'] = 'Комментарий: изменен тип заявки №' . $model['serialNumber'] . ' на ' . $type;\n }\n if ($_POST['editableAttribute'] == 'comment') {\n $model['comment'] = $_POST['Request'][$_POST['editableIndex']]['comment'];\n $toLog['title'] = 'Изменен комментарий заявки';\n $toLog['description'] = 'Комментарий: изменен комментарий заявки №' . $model['serialNumber'] . ' на ' . $model['comment'];\n }\n if ($_POST['editableAttribute'] == 'verdict') {\n $model['verdict'] = $_POST['Request'][$_POST['editableIndex']]['verdict'];\n $toLog['title'] = 'Изменен вердикт заявки';\n $toLog['description'] = 'Комментарий: изменен вердикт заявки №' . $model['serialNumber'] . ' на ' . $model['verdict'];\n }\n if ($_POST['editableAttribute'] == 'result') {\n $model['result'] = $_POST['Request'][$_POST['editableIndex']]['result'];\n $toLog['title'] = 'Изменен результат';\n $toLog['description'] = 'Комментарий: изменен результат контроля заявки №' . $model['serialNumber'] . ' на ' . $model['result'];\n }\n\n if ($_POST['editableAttribute'] == 'serialNumber') {\n $oldValue = $model['serialNumber'];\n $model['serialNumber'] = $_POST['Request'][$_POST['editableIndex']]['serialNumber'];\n $toLog['title'] = 'Изменен номер заявки';\n $toLog['description'] = 'Комментарий: изменен номер заявки с ' . $oldValue . ' на ' . $model['serialNumber'];\n $model->scenario = Request::SCENARIO_API;\n }\n\n // костыль для того чтобы можно было изменить обращения которые были созданы без контрагента и оборудования\n if ($model->contragentUuid == null && $model->equipmentUuid == null) {\n $model->scenario = Request::SCENARIO_API;\n }\n\n if ($model->save()) {\n MainFunctions::register($toLog['type'], $toLog['title'], $toLog['description'], $model['uuid']);\n return json_encode([]);\n } else {\n $message = '';\n foreach ($model->errors as $error) {\n $message = $error[0] . '<br/>';\n }\n return json_encode(['message' => $message]);\n }\n }\n\n $searchModel = new RequestSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination->pageSize = 50;\n if (isset($_GET['start_time'])) {\n $dataProvider->query->andWhere(['>=', 'request.createdAt', date('Y-m-d 00:00:00', strtotime($_GET['start_time']))]);\n $dataProvider->query->andWhere(['<', 'request.createdAt', date('Y-m-d 00:00:00', strtotime($_GET['end_time']))]);\n }\n //$dataProvider->setSort(['defaultOrder' => ['_id' => SORT_DESC]]);\n\n if (isset($_GET['house'])) {\n $dataProvider->query->andWhere(['=', 'object.houseUuid', $_GET['house']]);\n }\n if (isset($_GET['object'])) {\n $dataProvider->query->andWhere(['=', 'object.uuid', $_GET['object']]);\n }\n if (Yii::$app->request->isAjax && isset($_POST['house']) && isset($_POST['object'])) {\n if ($_POST['object'] != '0')\n return $this->redirect('../request/index?object=' . $_POST['object']);\n }\n if (Yii::$app->request->isAjax && isset($_POST['house'])) {\n return $this->redirect('../request/index?house=' . $_POST['house']);\n }\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "0ffd2af0e96ebbc120cdc6deeb2b47fa", "score": "0.6092124", "text": "public function store(Request $request)\n {\n //Edit Title Entry Start\n if($request->input('edited_about_us_title_id') != null){\n\n $requested_id = AboutUs::where('id','=',$request->input('edited_about_us_title_id'))->first();\n\n $requested_id->title = $request->input('edited_about_us_title');\n $requested_id->save();\n return \\Redirect::back();\n }\n //Edit Title Entry End\n\n //Edit Description Entry Start\n if($request->input('edited_about_us_description_id') != null){\n\n $requested_id = AboutUs::where('id','=',$request->input('edited_about_us_description_id'))->first();\n\n $requested_id->description = $request->input('edited_about_us_description');\n $requested_id->save();\n return \\Redirect::back();\n }\n //Edit Description Entry End\n\n\n //Edit Container Data Entry Start\n if($request->input('edited_container_data_id') != null){\n\n $requested_id = AboutUs::where('id','=',$request->input('edited_container_data_id'))->first();\n\n $requested_id->title = $request->input('edited_container_data_title');\n $requested_id->description = $request->input('edited_container_data_description');\n $requested_id->fa_icon = $request->input('edited_container_data_fa_icon');\n $requested_id->bg_color = $request->input('edited_container_data_bgcolor');\n $requested_id->save();\n return \\Redirect::back();\n }\n //Edit Container Data Entry End\n\n\n\n\n\n }", "title": "" }, { "docid": "8ddacf6dbc1560ddfa658e7deaae56cc", "score": "0.6074812", "text": "public function getEdit() {\n\n $requests = Svcrequest::where('email',Auth::user()->email)->get();\n\n\n $services = Service::getServiceDesc();\n\n\n return View::make('requests')\n ->with('requests',$requests)\n ->with('services',$services);\n\n\n\n }", "title": "" }, { "docid": "e8c040ff5831d62d8354be8e8e3c901b", "score": "0.58673364", "text": "public function edit(Request $request)\n {\n \n \n }", "title": "" }, { "docid": "9fb2cf4f50d6461c2c22e95a3fee0274", "score": "0.5843557", "text": "function ico_view(Request $request, $id)\n {\n try {\n if ($request->isMethod('post')) {\n $get_ico = ico::where('id', $id)->first();\n $status = $get_ico->status;\n if ($status == $request['status']) {\n return redirect('check_admin/token_request');\n } else {\n\n $get_ico->status = $request['status'];\n Session::flash('success', 'Successfully Updated');\n $get_ico->save();\n if ($request['update_status'] == 'on') {\n $get_ico_details = icodetails::where('ico_id', $id)->first();\n $get_ico_details->reason = $request['email_body'];\n\n $to = $get_ico_details->email;\n\n $subject = get_template('14', 'subject');\n $message = get_template('14', 'template');\n $mailarr = array(\n '###CONTENT###' => $request['email_body'],\n '##STATUS##' => $request['status'],\n '###Name###' => get_config('site_name'),\n );\n $message = strtr($message, $mailarr);\n $subject = strtr($subject, $mailarr);\n sendmail($to, $subject, ['content' => $message]);\n }\n return redirect('check_admin/token_request');\n }\n\n\n } else {\n $get_ico = ico::where('id', $id)->first();\n\n $get_ico_details = icodetails::where('ico_id', $id)->first();\n\n return view('panel.ico_view', ['result' => $get_ico, 'results' => $get_ico_details, 'id' => $id]);\n }\n } catch (\\Exception $exception) {\n return $exception->getMessage() . '<br>' . $exception->getLine() . '<br>' . $exception->getFile();\n }\n }", "title": "" }, { "docid": "12cf58bd2956bf5d019c7aec157abc20", "score": "0.58396834", "text": "public function hook_after_edit($request, $id) {\n //Your code here\n }", "title": "" }, { "docid": "b9cd194070a12d209da611800367508a", "score": "0.5826552", "text": "public function edit($id, Request $request)\n {\n $checkrights = \\App\\Models\\Admin::checkPermission(\\App\\Models\\Admin::$EDIT_ASSIGN_TASK);\n \n if($checkrights) \n {\n return $checkrights;\n }\n\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Add Comment\"; \n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\";\n $data['editMode'] = \"\";\n \n $data['users'] = User::where('status',1)\n ->where('user_type_id', '!=', CLIENT_USER)\n ->where('id', '!=' ,'1')\n ->pluck(\"name\",\"id\")\n ->all(); \n\n \n $data['projects'] = \\App\\Models\\Project::getList(); \n //$data['viewTask'] = AssignTask::where('id','=',$id)->first(); \n\n $data['viewTask'] = AssignTask::select(TBL_ASSIGN_TASK.\".*\",TBL_USERS.\".name as user_name\",TBL_PROJECT.\".title as pro_title\")\n ->join(TBL_USERS,TBL_ASSIGN_TASK.\".user_id\",\"=\",TBL_USERS.\".id\")\n ->join(TBL_PROJECT,TBL_ASSIGN_TASK.\".project_id\",\"=\",TBL_PROJECT.\".id\")\n ->where(TBL_ASSIGN_TASK.\".id\",$id) \n ->first();\n \n\n $data['assignUser'] = TaskComment::select(TBL_TASK_COMMENT.\".*\",TBL_USERS.\".name as user_names\")\n ->join(TBL_USERS,TBL_TASK_COMMENT.\".user_id\",\"=\",TBL_USERS.\".id\")\n ->where(TBL_TASK_COMMENT.\".assing_task_id\",$id)\n ->orderBy(TBL_TASK_COMMENT.'.created_at','desc')\n ->first(); \n\n $data['assignUserTask'] = AssignTask::select(TBL_ASSIGN_TASK.\".*\",TBL_USERS.\".name as user_names\")\n ->join(TBL_USERS,TBL_ASSIGN_TASK.\".user_id\",\"=\",TBL_USERS.\".id\")\n ->where(TBL_ASSIGN_TASK.\".id\",$id) \n ->first();\n\n $data['viewComment'] = TaskComment::select(TBL_TASK_COMMENT.\".*\",TBL_USERS.\".name as user_name\")\n ->join(TBL_USERS,TBL_TASK_COMMENT.\".comment_by_user_id\",\"=\",TBL_USERS.\".id\") \n ->where(TBL_TASK_COMMENT.\".assing_task_id\",$id) \n ->get();\n\n $data['viewCommentBy'] = TaskComment::select(TBL_TASK_COMMENT.\".*\",TBL_USERS.\".name as comment_by_user_name\")\n ->join(TBL_USERS,TBL_TASK_COMMENT.\".comment_by_user_id\",\"=\",TBL_USERS.\".id\") \n ->get();\n\n\n return view($this->moduleViewName.'.edit', $data);\n }", "title": "" }, { "docid": "cf01723b8dff4fc54232d0189268ea21", "score": "0.5826538", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "3121d1c80930e5e981d71d4dd70c0ee9", "score": "0.5784005", "text": "public function edit(HttpRequest $request)\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57518333", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57518333", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57518333", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "c28027feda5c11615dcf472d6af3f96c", "score": "0.57518333", "text": "public function edit()\n {\n //\n }", "title": "" }, { "docid": "64789e1840b3c7f45875b4d534173773", "score": "0.5751461", "text": "public function edit(Request $request)\n {\n\n }", "title": "" }, { "docid": "0e79aed61cf6776605c79152cfdbd4fc", "score": "0.5726281", "text": "public function edit(){\n\n }", "title": "" }, { "docid": "a0e96c792c1d25cf156814d5d365c35d", "score": "0.5721337", "text": "public function editRoute(Request $request)\n {\n if(isset($request->toDelete)) { // usuwamy\n $oldRoute = Route::find($request->route_id);\n $oldRoute->status = 0; // status 0 - usunięty, 1 - aktywny\n $oldRoute->save();\n\n $oldRoutesInfo = RouteInfo::where('routes_id', '=', $request->route_id)->get();\n foreach($oldRoutesInfo as $oldInfo) {\n $oldInfo->status = 0; // status 0 - usunięty, 1 - aktywny\n $oldInfo->save();\n }\n\n $request->session()->flash('adnotation', 'Trasa została usunięta pomyślnie!');\n\n new ActivityRecorder(12,'Route_id: ' . $request->route_id,188,3);\n\n return Redirect::to('/showRoutes');\n }\n else { //edytujemy\n $voivode = $request->voivode;\n $city = $request->city;\n\n $voivodeIdArr = explode(',', $voivode);\n $cityIdArr = explode(',', $city);\n\n $cityNamesArr = array();\n\n foreach ($cityIdArr as $city) {\n $givenCity = Cities::where('id', '=', $city)->first();\n $name = $givenCity->name;\n array_push($cityNamesArr, $name);\n }\n\n $nameOfRoute = '';\n foreach ($cityNamesArr as $name) {\n $nameOfRoute .= $name . ' | ';\n }\n $nameOfRoute = trim($nameOfRoute, ' | ');\n\n $thisRoute = Route::find($request->route_id);\n $thisRoute->name = $nameOfRoute;\n $thisRoute->save();\n\n $oldRoute = RouteInfo::where([\n ['routes_id', '=', $request->route_id],\n ['status', '=', 1]\n ])\n ->get();\n\n foreach ($oldRoute as $item) {\n $item->status = '0';\n $item->save();\n }\n\n foreach ($voivodeIdArr as $voivodekey => $voivode) {\n foreach ($cityIdArr as $citykey => $city) {\n if ($voivodekey == $citykey) {\n $newRouteInfo = new RouteInfo();\n $newRouteInfo->routes_id = $request->route_id;\n $newRouteInfo->voivodeship_id = $voivode;\n $newRouteInfo->city_id = $city;\n $newRouteInfo->status = 1; // 1 - aktywne dane, 0 - usunięte dane\n $newRouteInfo->save();\n }\n }\n }\n $request->session()->flash('adnotation', 'Trasa została edytowana pomyślnie!');\n\n new ActivityRecorder(12,'Route_id: ' . $request->route_id,188,2);\n\n return Redirect::to('/showRoutes');\n }\n\n }", "title": "" }, { "docid": "baab65ab566b403a0c018336039e220a", "score": "0.5707751", "text": "public function edit()\n {\n \n\t}", "title": "" }, { "docid": "bcc9ec4d9b629015f0b46a3c83fd67fe", "score": "0.57075906", "text": "public function postEdit(Request $request, $id){ $temp = Task::where('taskname',$request->taskname)->where('project_id',$request->project_id)->get();\n if($temp->isEmpty()){\n\n $task = Task::find($id);\n $task->taskname = $request->taskname;\n $task->project_id = $request->project_id;\n $task->comments = $request->comments;\n $task->availability = $request->availability;\n $task->save();\n\n return redirect('admin/task/list')->with('thongbao','You edit success');\n \n }else{\n\n // $check_task = Task::where('comments',$request->comments)->where('availability',$request->availability)->get();\n // if($check_task->isEmpty()){\n // $task = Task::find($id);\n // $task->taskname = $request->taskname;\n // $task->project_id = $request->project_id;\n // $task->comments = $request->comments;\n // $task->availability = $request->availability;\n // $task->save();\n\n // return redirect('admin/task/list')->with('thongbao','You edit success');\n // }\n\n $task = Task::find($id);\n if($task->comments != $request->comments || $task->availability != $request->availability){\n \n $task->comments = $request->comments;\n $task->availability = $request->availability;\n $task->save();\n\n return redirect('admin/task/list')->with('thongbao','You edit success');\n }\n\n return redirect('admin/task/edit/'.$id)->with('error','taskname_exits');\n \n }\n \n }", "title": "" }, { "docid": "e9db751fc647eccaf9e5c7c79cc28f98", "score": "0.57059854", "text": "public function updatenew(Request $request){ //1st front eke task eka requst variable ekatada gannawa\n\n $this->validate($request,[\n 'task'=>'required|max:100|min:5',\n ]);\n\n $id=$request->id;\n $task=$request->task;\n $newtask=Task::find($id);\n $newtask->task=$task;\n $newtask->save();\n $data=Task::all();\n return view('task')->with('tasks1',$data);\n \n }", "title": "" }, { "docid": "eff687b2e86fa2242f570f709e01b984", "score": "0.56989944", "text": "public function anyEdit()\n\t{\n\n // dd(Input::All());\n\t//\t$user =new Auth\\User();\n // $id = Input::get('modify');\n\n // $user = Auth\\User::find();\n//dd($user->name);\n $form = DataEdit::source( User\\User::with('groups'));\n $form->add('modify','modify', 'hidden');\n $form->add('name','Name', 'text')->rule('required|min:2');\n $form->add('email','Email', 'text');\n $form->add('password','Password', 'password');\n $form->add('group.group_id','group','tags');\n // $form->add('group.group_name','groupName','text');\n // $form->add('photo','Photo', 'image')->move('uploads/demo/')->fit(240, 160)->preview(120,80);\n // $form->submit('Save');\n\n $form->saved(function () use ($form) {\n $form->message(\"ok record saved\");\n $form->link(\"/test\",\"back to the form\",'BR');\n });\n $form->build();\n return view('test',compact('form'));\n\t}", "title": "" }, { "docid": "b58634df2e89466b8b9865440d8d1b8a", "score": "0.56930196", "text": "public function multipleEdit(Request $request) {\n $this->model->editMultiple($request->all());\n }", "title": "" }, { "docid": "5f3ea29657c83d421ba1d03e9a5f3481", "score": "0.5684066", "text": "public function store(Request $request)\n {\n foreach($request->all() as $key=>$requests) {\n if($key != '_token' && $key != 'evento' && $key != 'evento_nombre' && $key != 'evento_fecha' && $key != 'evento_hora' && $key != 'relacionador_nombre' && $key != 'relacionador_apellido' && $key != 'relacionador_id')\n {\n if(strpos($key, 'key') === false){\n }else{\n $ids = $requests;\n $aux = User::find($ids);\n $invEven = Invitados_eventos::where('evento_id',$request->input('evento'))->where('invitado_id',$ids)->where('relacionador_id',$request->input('relacionador_id'))->update(['estado'=>'1']);\n $idinve = Invitados_eventos::where('evento_id',$request->input('evento'))->where('invitado_id',$ids)->where('relacionador_id',$request->input('relacionador_id'))->get();\n\n $this->EnviarMail($ids,$aux->name,$aux->apellidos, $idinve[0]->id, $aux->email,$request->input('relacionador_nombre'),$request->input('evento_nombre'));\n\n /*Mail::send('emails.welcome', [$request->all(),'user' => $aux], function ($message) use ($aux) {\n $message->from('[email protected]', 'Laravel');\n $message->to($aux->email)->cc('[email protected]');\n });*/\n }\n }\n }\n return Redirect::to('/evento/'.$request->input('evento'));\n }", "title": "" }, { "docid": "52c20bafbf7afe0b23140caff773061d", "score": "0.56835157", "text": "public function edit($id, Request $request)\n\n { \n Session::forget('jobtasks');\n $jobTasks = Job::find($id)->jobTasks()->get();\n $job = Job::find($id);\n $tasks = Task::all();\n $employees = User::where('user_type' , 'employee')->get();\n $customers = User::where('user_type' , 'customer')->get();\n $services = Service::all();\n\n return view('admin.jobs.edit' , compact('tasks' , 'employees' , 'customers' , 'services' , 'job' , 'jobTasks'));\n \n }", "title": "" }, { "docid": "d75e43f79c988ce0dc9825a2b379e179", "score": "0.5682291", "text": "public function edit(Request $request)\n {\n // \n }", "title": "" }, { "docid": "ad5fb1f9a9ead12d9ab54211bffea710", "score": "0.5680513", "text": "public function edit()\n {\n<<<<<<< HEAD\n if(auth()->user()->usertype == 'recycler'){\n $submissionsNo = Submission::where('recycledBy',auth()->user()->username)->count() ; \n }\n else {\n $submissionsNo = Submission::where('submittedBy',auth()->user()->username)->count() ; \n \n }\n return view('profile.edit',['submissionsNo'=>$submissionsNo]);\n=======\n return view('profile.edit');\n>>>>>>> e305c46bcdc686c5205023d72c7e0f1699beedc8\n }", "title": "" }, { "docid": "17154c3494130eef6e32d341a3d21664", "score": "0.5679134", "text": "public function edit(Request $request){\n if($this->check_authention()):\n $flag = 0;\n $this->check_validation($request);\n $parent_id = $request->input('hidden_parent');\n $name = $request->input('name');\n $new_email = $request->input(\"email\");\n $new_password = $request->input(\"password\");\n /**\n * to create the uniqueness of the emails at the time of Updation Process \n * Process Start\n */\n $fetch_rows = DB::table(\"users\")->where(\"parent_id\",\"!=\",$parent_id)->get(); \n foreach($fetch_rows as $email_row){\n $old_email = $email_row->email;\n if($old_email == $new_email){\n $email_existed = \"Error is already taken by other user\"; \n $flag = 1;\n break;\n }\n }\n /**\n * Process End\n */\n if($flag == 1){\n return redirect()->back()->withErrors([\"email\"=>$email_existed])->withInput();\n }\n else{\n if(User::where(\"parent_id\",$parent_id)->update([\"name\"=>$name,\"email\"=>$new_email,\"password\"=>Hash::make($new_password)])):\n return redirect()->route(\"home\");\n endif;\n }\n else:\n return redirect(\"/\");\n endif;\n }", "title": "" }, { "docid": "efd5b89071979c16fb73f4299fc38452", "score": "0.5670914", "text": "public function edit()\n {\n\n }", "title": "" }, { "docid": "a1ee4aa45fcc55ec8a3a3d9b563dba91", "score": "0.5661932", "text": "public function postEdit(Request $request){\n try {\n $user_details = $this->user_model->getUserById($request->input('post_id'));\n return view('users.add_view', compact('user_details'));\n } catch (\\Exception $e) {\n return response()->json(['exc' => utf8_encode($e->getMessage())]);\n }\n }", "title": "" }, { "docid": "1e91609b356f0b40ed93845ccbc76931", "score": "0.5659754", "text": "public function store(Request $request)\n {\n if($request->id){\n //return $request->all();\n $addressdata = $request->except(['id','address_id','contact_id','whatsapp','phone_number','mobile_number', 'fax_number', 'email', 'employee_id','spouse_first_name','spouse_middle_name','spouse_last_name','relation','gender','dob','domicile','marital_status','patronage','created_at','updated_at']);\n $contactdata = $request->except(['id','address_id','contact_id','whatsapp','address_line_1', 'address_line_2', 'address_line_3', 'street', 'sector', 'city', 'state', 'country', 'postal_code', 'zip_code', 'employee_id','spouse_first_name','spouse_middle_name','spouse_last_name','relation','gender','dob','domicile','marital_status','patronage','created_at','updated_at']);\n $spousedata = $request->except(['id','address_id','contact_id','whatsapp','address_line_1', 'address_line_2', 'address_line_3', 'street', 'sector', 'city', 'state', 'country', 'postal_code', 'zip_code', 'phone_number','mobile_number', 'fax_number', 'email','created_at','updated_at']);\n tbladdress::where('id', $request->address_id)->update($addressdata);\n tblcontact::where('id', $request->contact_id)->update($contactdata);\n erp_spouse_detail::where('id', $request->id)->update($spousedata);\n return \"Update\";\n }else{\n $addressdata = $request->except(['phone_number','mobile_number', 'fax_number', 'email', 'employee_id','spouse_first_name','spouse_middle_name','spouse_last_name','relation','gender','dob','domicile','marital_status','patronage']);\n $address = tbladdress::create($addressdata);\n $contactdata = $request->except(['address_line_1', 'address_line_2', 'address_line_3', 'street', 'sector', 'city', 'state', 'country', 'postal_code', 'zip_code', 'employee_id','spouse_first_name','spouse_middle_name','spouse_last_name','relation','gender','dob','domicile','marital_status','patronage']);\n $contact = tblcontact::create($contactdata);\n $spousedata = $request->except(['address_line_1', 'address_line_2', 'address_line_3', 'street', 'sector', 'city', 'state', 'country', 'postal_code', 'zip_code', 'phone_number','mobile_number', 'fax_number', 'email']);\n $spousedata['address_id'] = $address->id;\n $spousedata['contact_id'] = $contact->id;\n erp_spouse_detail::create($spousedata);\n }\n return \"Save\";\n }", "title": "" }, { "docid": "52ea74ef96f2e8d62d8d290d00763e1e", "score": "0.5654008", "text": "public function index()\n { \n $data[\"action\"] = \"/member/ecommerce/product/collection/add_submit\";\n $data[\"_ec_product\"] = Tbl_ec_product::where(\"archived\",0)->where(\"eprod_shop_id\",Ecom_Product::getShopId())->get();\n $id = Request::input(\"id\");\n if($id)\n {\n $data[\"collection_id\"] = $id;\n $data[\"action\"] = \"/member/ecommerce/product/collection/edit_submit\";\n $data[\"collection\"] = Tbl_collection::where(\"collection_id\",$id)->first();\n $data[\"collection_item\"] = Tbl_collection_item::where(\"collection_id\",$id)->get();\n }\n\n return view(\"member.ecommerce_collection.ecommerce_collection\",$data); \n }", "title": "" }, { "docid": "6aeb1a437f2f97f6dcbeec030b2a6adb", "score": "0.5649172", "text": "public function edit(Request $req)\n {\n //\n }", "title": "" }, { "docid": "f96c33b4ea4e7b9cb1c537d336894bdd", "score": "0.564774", "text": "public function edit(Request $request,$id)\n {\n $task = Task::where('id', $id)\n ->where('company_id',company_id())\n ->first();\n if(! $request->ajax()){\n return view('backend.accounting.task.edit',compact('task','id'));\n }else{\n return view('backend.accounting.task.modal.edit',compact('task','id'));\n } \n \n }", "title": "" }, { "docid": "a7d044ba09ca6a4042d71af8711b3280", "score": "0.5641356", "text": "public function updateEditItem($id,Request $request){\n $items = Item::where('list_id',$id)->delete();\n $data = request()->all();\n $lista= Lista::orderby('id','desc')->first();\n if(count($request->nombre_club) > 0){\n foreach($request->nombre_club as $item=>$v){\n $data2=array(\n // 'nombre_club'\n 'nombre_club' => $request->nombre_club[$item],\n 'nombre_estadio' => $request->nombre_estadio[$item],\n 'capacidad_estadio' => $request->capacidad_estadio[$item],\n 'pais' => $request->pais[$item],\n 'list_id' => $lista->id,\n );\n Item::create($data2);\n }\n }\n return redirect()->route('users.showListas');\n }", "title": "" }, { "docid": "1748f2a17bdb988fb6b8e16ac87f361a", "score": "0.56320685", "text": "public function update(Request $request, $id)\n {\n if($request->input('process')==\"MISC\"){\n $misc = Misc::find($id);\n $misc->penalty = 0.00;\n $misc->save();\n\n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n\n $path = \"admin-misc/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully waive penalty.'); \n }else if($request->input('process')==\"MISCREQUEST\"){\n $misc = Misc::find($id);\n \n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n $newwaive = WaiveMisc::where('collect_id',$id)->get();\n if(count($newwaive)>1){\n $path = \"admin-misc/\".$buy_id.\"/edit\";\n return redirect($path)->with('error','You already request a waive for this transaction.'); \n }\n\n $waive = new WaiveMisc;\n $waive->collect_id=$id;\n $waive->status=\"OPEN\";\n $waive->save();\n \n \n\n $path = \"admin-misc/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully sent waive penalty request.'); \n }else if($request->input('process')==\"MISCAPPROVED\"){\n $misc = Misc::find($id);\n \n\n $waive = WaiveMisc::where('collect_id',$id)->first();;\n $waive->status=\"CLOSED\";\n $waive->save();\n\n $misc = Misc::find($id);\n $misc->penalty = 0.00;\n $misc->save();\n \n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n $path = \"admin-misc/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully approved waive penalty request.'); \n }\n else if($request->input('process')==\"MISCAPPROVED2\"){\n $misc = Misc::find($id);\n $totaldues = $misc->totaldues;\n $penalty =$misc->penalty;\n $newtotaldues=round($totaldues,2)-round($penalty,2);\n\n\n $waive = WaiveMisc::where('collect_id',$id)->first();;\n $waive->status=\"CLOSED\";\n $waive->save();\n\n $misc = Misc::find($id);\n $misc->penalty = 0.00;\n $misc->totaldues=$newtotaldues;\n $misc->save();\n \n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n $path = \"admin-misc/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully approved waive penalty request.'); \n }\n else if($request->input('process')==\"EQUITYREQUEST\"){\n $misc = Equity::find($id);\n \n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n $newwaive = WaiveEquity::where('collect_id',$id)->get();\n if(count($newwaive)>1){\n $path = \"admin-misc/\".$buy_id.\"/edit\";\n return redirect($path)->with('error','You already request a waive for this transaction.'); \n }\n\n $waive = new WaiveEquity;\n $waive->collect_id=$id;\n $waive->status=\"OPEN\";\n $waive->save();\n \n \n\n $path = \"admin-equity/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully sent waive penalty request.'); \n } else if($request->input('process')==\"EQUITYAPPROVED\"){\n \n \n $misc = Equity::find($id);\n $totaldues = $misc->totaldues;\n $penalty =$misc->penalty;\n $newtotaldues=round($totaldues,2)-round($penalty,2);\n\n \n $waive = WaiveEquity::where('collect_id',$id)->first();;\n $waive->status=\"CLOSED\";\n $waive->save();\n\n $misc = Equity::find($id);\n $misc->penalty = 0.00;\n $misc->totaldues=$newtotaldues;\n $misc->save();\n \n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n $path = \"admin-equity/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully approved waive penalty request.'); \n } else if($request->input('process')==\"EQUITYAPPROVED2\"){\n $misc = Equity::find($id);\n $totaldues = $misc->totaldues;\n $penalty =$misc->penalty;\n $newtotaldues=round($totaldues,2)-round($penalty,2);\n\n\n $waive = WaiveEquity::where('collect_id',$id)->first();;\n $waive->status=\"CLOSED\";\n $waive->save();\n\n $misc = Equity::find($id);\n $misc->penalty = 0.00;\n $misc->totaldues=$newtotaldues;\n $misc->save();\n \n $client_id = $misc->client_id;\n $property_id = $misc->property_id;\n $buy = Buy::where('client_id',$client_id)->where('property_id',$property_id)->get();\n $buy_id=$buy[0]->id;\n\n $path = \"admin-equity/\".$buy_id.\"/edit\";\n return redirect($path)->with('success','Successfully approved waive penalty request.'); \n }else if($request->input('process')==\"REFUND\"){\n $this->validate($request,[\n 'transact'=>'required',\n 'amount'=>'required',\n 'bankname'=>'required',\n 'cheque'=>'required'\n ]);\n $buy = Buy::find($id);\n $cheque=$request->input('cheque');\n \n $voucher = Voucher::where('cheque',$cheque)->get();\n\n \n if(count($voucher)<=0){\n\n $property_id= $buy->property_id;\n $property = Property::find($property_id);\n $property->status=\"ACTIVE\";\n $property->save();\n\n $newvouch = new Voucher;\n $newvouch->amount=$request->input('amount');\n $newvouch->bank=$request->input('bankname');\n $newvouch->dates=$request->input('transact');\n $newvouch->cheque=$request->input('cheque');\n $newvouch->terms=\"REFUND\";\n $newvouch->cv=$property_id;\n $newvouch->save();\n\n $buy->status=\"REFUND\";\n $buy->save();\n\n $path = \"admin-collection/\";\n return redirect($path)->with('success','Successfully save refund.'); \n\n }else{\n\n $path = \"admin-collection/\";\n return redirect($path)->with('error','Cheque number already in the system.');\n }\n \n\n\n }\n \n }", "title": "" }, { "docid": "7d8b36006fc5554555b5498e4d62290f", "score": "0.561689", "text": "public function edit(Request $request)\n {\n //\n }", "title": "" }, { "docid": "d91415478d12573f7f3b623e84e1bbfe", "score": "0.5615027", "text": "public function edit(Request $request, $id){\n\n /*if($request->status){\n $task = Task::find($id);\n $task->update($request->all());\n return back();\n }*/\n\n }", "title": "" }, { "docid": "559ff5734eb71f6318773cd1cd38b79b", "score": "0.561114", "text": "public function edit(Requests $requests)\n {\n //\n }", "title": "" }, { "docid": "4a8ec3e276d396b88b4949c52b6e304a", "score": "0.55987203", "text": "public function editAction() { }", "title": "" }, { "docid": "bb485f9cce8308e6bced5a1745728222", "score": "0.5598032", "text": "public function edit(Request $request){\n\n $sintitularbox = $request->input('sintitular');\n\n $idtitular = $request->input('idtitular'); //id titular\n\n $sintitular = false;\n\n if($sintitularbox != null){\n\n $idtitular = null;\n $sintitular = true;\n\n }else{\n\n if($idtitular==''){\n\n $titular = new Titular($request->only('nombre_titular','responsable','dom_titular','cp_titular','pob_titular','exp_titular','dni_titular','tel_titular','ema_titular','pro_titular'));\n $idtitular = $titular->insertGetId($titular->attributesToArray());\n }\n else{\n\n $titularA = new Titular($request->only('nombre_titular','responsable','dom_titular','cp_titular','pob_titular','exp_titular','dni_titular','tel_titular','ema_titular','pro_titular'));\n $titular = Titular::find($idtitular);\n $titular->update($titularA->attributesToArray());\n $idtitular = $request->input('idtitular'); //id titular\n\n }\n }\n\n $nichoU = new Nicho($request->except('nombre_titular','responsable','dom_titular','cp_titular','pob_titular','exp_titular','dni_titular','tel_titular','ema_titular','pro_titular'));\n $nicho = Nicho::find($request->input('idnicho'));\n $nichoU->GC_TITULAR_id = $idtitular;\n $nichoU->sintitular = $sintitular;\n $nicho->update($nichoU->attributesToArray());\n\n if($sintitularbox == \"on\") {\n\n\n }else{\n $factura = new FacturacionController();\n $factura->facturaCesion($idtitular, $nicho->id, $nicho->cesion);\n }\n\n }", "title": "" }, { "docid": "7e334374ee948826bf9b09b88924db78", "score": "0.5590634", "text": "public function edit()\n {\n\n }", "title": "" }, { "docid": "7e334374ee948826bf9b09b88924db78", "score": "0.5590634", "text": "public function edit()\n {\n\n }", "title": "" }, { "docid": "7e334374ee948826bf9b09b88924db78", "score": "0.5590634", "text": "public function edit()\n {\n\n }", "title": "" }, { "docid": "7e334374ee948826bf9b09b88924db78", "score": "0.5590634", "text": "public function edit()\n {\n\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.5573334", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.5573334", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "254850d5a901846731d151c6d1689b21", "score": "0.55729014", "text": "public function edit(Request $request)\n {\n $info = $request->except('_token');\n $cur_name = Task::where('id', '=', $info['id'])->pluck('name')->toArray();\n $info['name'] = $info['name_edit'];\n unset($info['name_edit']);\n if($info['type'] == 'Daily'){\n $info['type'] = 0;\n }\n if($info['type'] == 'Weekly'){\n $info['type'] = 1;\n }\n else{\n $info['type'] = 2;\n }\n if(strcmp($cur_name[0], $info['name']) == 0){\n }\n else{\n $check = Task::where('name', '=', $info['name'])->count();\n if($check != 0){\n $error = \\Illuminate\\Validation\\ValidationException::withMessages([\n 'name_edit' => ['Task name has already been taken.'],\n 'task_name' => [$cur_name[0]],\n ]);\n throw $error;\n }\n }\n $img_present = Task::where('id', '=', $info['id'])->pluck('img')->toArray();\n if(!(!array_key_exists('img_edit', $info) and $img_present != 'task.png')){\n unset($info['img_edit']);\n $img = app('App\\Http\\Controllers\\UtilController')->upload('task');\n $info['img'] = $img;\n Task::where('id', '=', $info['id'])->update($info);\n }\n else{\n Task::where('id', '=', $info['id'])->update($info);\n }\n return redirect('task/list');\n\n\n\n\n }", "title": "" }, { "docid": "8b0175a28eb8746a041d69d389b68b63", "score": "0.55695015", "text": "public function showEdit(Request $request, $id) {\n $unitIssues = ItemUnitIssue::orderBy('unit_name')->get();\n $instancePO = PurchaseJobOrder::with(['poitems', 'awardee'])->find($id);\n $prID = $instancePO->pr_id;\n $poNo = $instancePO->po_no;\n $poDate = $instancePO->date_po;\n $companyName = $instancePO->awardee['company_name'];\n $companyAddress = $instancePO->awardee['address'];\n $companyTinNo = $instancePO->awardee['tin_no'];\n $placeDelivery = $instancePO->place_delivery;\n $dateDelivery = $instancePO->date_delivery;\n $deliveryTerm = $instancePO->delivery_term;\n $paymentTerm = $instancePO->payment_term;\n $amountWords = $instancePO->amount_words;\n $grandTotal = $instancePO->grand_total;\n $fundCluster = $instancePO->fund_cluster;\n $sigDepartment = $instancePO->sig_department;\n $sigApproval = $instancePO->sig_approval;\n $sigFundsAvailable = $instancePO->sig_funds_available;\n $documentType = $instancePO->document_type;\n $poItems = $instancePO->poitems;\n $instanceAbstract = AbstractQuotation::with('modeproc')->where('pr_id', $prID)->first();\n $modeProcurement = $instanceAbstract->modeproc->mode_name;\n $signatories = Signatory::addSelect([\n 'name' => User::select(DB::raw('CONCAT(firstname, \" \", lastname) AS name'))\n ->whereColumn('id', 'signatories.emp_id')\n ->limit(1)\n ])->where('is_active', 'y')->get();\n $poNumbers = PurchaseJobOrder::select('po_no')->where('pr_id', $prID)->get();\n\n if ($documentType == 'po') {\n $view = 'modules.procurement.po-jo.po-update';\n } else {\n $view = 'modules.procurement.po-jo.jo-update';\n }\n\n foreach ($signatories as $sig) {\n $sig->module = json_decode($sig->module);\n }\n\n return view($view, compact(\n 'id', 'poNo', 'poDate', 'companyName', 'companyAddress',\n 'companyTinNo', 'placeDelivery', 'dateDelivery',\n 'deliveryTerm', 'amountWords', 'grandTotal', 'paymentTerm',\n 'fundCluster', 'sigDepartment', 'sigApproval',\n 'sigFundsAvailable', 'poItems', 'signatories',\n 'modeProcurement', 'instancePO' , 'poNumbers',\n 'unitIssues'\n ));\n }", "title": "" }, { "docid": "9af3155fc0ebec3ba9a9aa97337671dd", "score": "0.5565938", "text": "public function submitEdit(Request $request){\n $id = $request->input('task_id');\n $editTask = $request->input('text_edit');\n\n //save the edits\n $task = Task::find($id);\n $task->task = $editTask;\n $task->save();\n \n //redirect to home\n return redirect()->route('home');\n }", "title": "" }, { "docid": "d92c196e9bb054370f048ebc4a39fd30", "score": "0.5561961", "text": "public function SousTacheFini (Request $request,$id)\n {\n $user = Auth::user()->id;\n $tache = Liste::where('id',$id)->where('user_id',$user)->get();\n\n\n if(!$tache->isEmpty())\n {\n //ici écriture dans la BDD de ma form tache\n $tache=new Liste();\n $tache = Liste::find($id);\n $tache->Accompli=\"1\";\n $tache->update();\n return redirect('/list')->with('flash_message','Modifié avec succés');\n }\n else\n {\n return redirect('/list')->with('flash_message_bad',\"Erreur vous avez modifié l'id\");\n }\n\n }", "title": "" }, { "docid": "e29f241e980497bc2954e34a1cfe1434", "score": "0.5543806", "text": "public function updateCreateMyTrip(Request $request){\n // $alert = \"error\";\n if($request->ajax()):\n $fullName = $request->title.$request->fullName;\n $phone = $request->numberPhone;\n //$country = $request->country;\n $email = $request->email;\n $ageGroup = $request->ageGroup;\n $newsletter = $request->newsletter;\n $condition = $request->condition;\n $numAdult = $request->numAdult;\n $numChild = $request->numChild;\n $numBaby = $request->numBaby;\n $numTeenager = $request->numTeenager;\n $arrivalDate = $request->arrivalDate;\n $duration = $request->duration;\n $explainTrip = $request->explainTrip;\n $otherDest = $request->otherDest;\n $budgetPerson = $request->budgetPerson;\n $currencyPerson = $request->currencyPerson;\n $accommodation = $request->accommodation;\n $accommon = $request->accommon;\n $physical = $request->physical;\n $project = $request->project;\n //$furtherNote = $request->furtherNote;\n $meals= $request->meals;\n $mealsTrips = $request->mealsTrips;\n $doubleRoom = $request->doubleRoom;\n $twinRoom = $request->twinRoom;\n $individualRoom = $request->individualRoom;\n $tripleRoom = $request->tripleRoom;\n $rooms = \"\";\n if(intval($doubleRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $doubleRoom.\" double room \";\n }else{\n $rooms .= \", \".$doubleRoom.\" double rooms \";\n }\n }\n if(intval($twinRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $twinRoom. \" twin rooms\";\n }else{\n $rooms .=\", \".$twinRoom. \" twin rooms\";\n }\n }\n if(intval($individualRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $individualRoom.\" individual room\";\n }else{\n $rooms .= \", \".$individualRoom.\" individual room\";\n }\n }\n if(intval($tripleRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $tripleRoom.\" triple rooms \";\n }else{\n $rooms .=\", \".$tripleRoom.\" triple rooms \";\n }\n }\n $destinations = $request->destination;\n $tourTypes = $request->tourType;\n //$hobbies = $request->hobbies;\n //$lastLong = $request->lastLong;\n $canContact = $request->canContact;\n $titleIntro = $request->titleIntro;\n $fullNameIntro = $request->fullNameIntro;\n /* $checkMobileApps = false;\n $appointmentDate = $request->appointmentDate;\n $timeZone = $request->timeZone;\n $timeSlots = $request->timeSlot;\n $mobileApps = $request->mobileApp; \n $checkMobileApps = false;\n if($mobileApps != \"\"){\n $checkMobileApps = true;\n $mobileApps = (array) json_decode($mobileApps);\n }\n $mapp;\n if($checkMobileApps == false) : $mapp = \"\";\n else :\n $i = 0; $arrMobileApp;\n foreach($mobileApps as $mobileApp) :\n $title = $mobileApp[0];\n $value = $mobileApp[1];\n if($i == 0) : \n $arrMobileApp = $title.' : '.$value;\n elseif($i > 0) : \n $arrMobileApp .= ', ' .$title.' : '.$value;\n endif;\n $i++;\n endforeach;\n $mapp = $arrMobileApp;\n endif;*/\n /* $checkTimeSlots = false;\n if($timeSlots != \"\") :\n $checkTimeSlots = true;\n $timeSlots = (array) json_decode($timeSlots);\n endif;\n $ts;\n if($checkTimeSlots == false) : $ts = \"\"; \n else : \n $i = 0; $arrTimeSlot;\n foreach($timeSlots as $timeSlot) : \n if($i == 0) : \n $arrTimeSlot = $timeSlot;\n elseif($i > 0) : \n $arrTimeSlot .= ', '.$timeSlot;\n endif;\n $i++;\n endforeach;\n $ts = $arrTimeSlot;\n endif;*/\n $checkDestinations = false;\n if($destinations != \"\") :\n $checkDestinations = true;\n $destinations = (array) json_decode($destinations);\n endif;\n $desc; $descTitle;\n if($checkDestinations == true) : \n $i = 0; $arrDestination; $arrDestinationTitle;\n foreach($destinations as $destination) : \n if($i == 0) : \n $arrDestination = $destination;\n $arrDestinationTitle = $destination;\n elseif($i > 0) : \n $arrDestination .= ', '.$destination;\n $arrDestinationTitle .= ' + ' .$destination;\n endif;\n $i++;\n endforeach;\n $desc = $arrDestination;\n $descTitle = $arrDestinationTitle;\n endif;\n $checkTourTypes = false;\n if($tourTypes != \"\"): \n //$checkMobileApps = true;\n $tourTypes = (array) json_decode($tourTypes);\n endif;\n $tour;\n if($checkTourTypes == false) : $tour = \"\";\n else :\n $i = 0; $arrtourType;\n foreach($tourTypes as $tourType) :\n if($i == 0) : \n $arrtourType = $tourType;\n elseif($i > 0) : \n $arrtourType .= ', ' .$tourType;\n endif;\n $i++;\n endforeach;\n $tour = $arrtourType;\n endif;\n $phoneSystem = phone();\n $mailSystem = mailSystem();\n $domain = $request->getHost();\n $splitDate = explode(',',$arrivalDate);\n $replaceDate = str_replace('/', '-', $splitDate[1]);\n $dateTitle = date(\"d M Y\", strtotime($replaceDate));\n // content\n if(!empty($fullName) && !empty($email) && !empty($ageGroup) && !empty($phone) && !empty($arrivalDate) && intval($numAdult) > 0 && !empty($desc) && !empty($condition)) : \n $h3 = 'font-size: 16px;line-height:31px;background-color:#666;border-radius: 10px; margin: 0;color: #fff;text-align: center; ';\n $fleft = 'float: left; width: 100%;';\n $overflow = 'overflow: hidden';\n $wrapper = 'font-size: 15px; line-height: 21px; color: #666; font-family: Arial; background-color: #fff; width: 600px; margin: 0 auto; -webkit-overflow-scrolling: touch; overflow: auto;';\n $header = 'width: 100%;';\n $logo ='display: block';\n $container_fluid = 'padding: 0 40px; clear: both;';\n $box_modal = 'padding: 10px; text-align: left;';\n $box_modal_ul = 'padding-left: 25px; margin: 0;';\n $box_modal_p_li = 'color: #555; position: relative; margin-left: 0;';\n $about_box = 'background-color: #f1f1f1;padding:18px 34px 44px; text-align: center; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px;';\n $about_box_ul = 'padding-left:0 ;list-style: none; margin: 0; color: #7e7e7e;';\n $about_box_info_li = 'margin-bottom: 22px; display: block; margin-left: 0;';\n $list_button = 'margin-top: 25px;';\n $list_button_2 = 'margin-bottom: 25px; background-color:#f1f1f1; padding: 20px 0; border-radius:10px;';\n $list_button_li = 'text-align: center; margin: 0 0 15px 0;';\n $list_button_li_right = 'text-align: center; margin: 0 ;';\n $list_button_li_a = 'display: block; width: 300px; max-width: 100%; line-height: 33px; background-color: #e73361;color: #fff; border-radius: 10px; text-decoration: none; margin: 0 auto;';\n $list_button_li_a_right = 'display: block; width: 300px; max-width: 100%; line-height: 33px;background-color: #34e6d0;color: #fff; border-radius: 10px; text-decoration: none; margin: 0 auto;';\n $red_color = 'color: #e73362';\n $button_group = 'background-color: #f1f1f1; margin-bottom: 50px; border-radius: 10px;';\n $share_box = 'background-color: #f1f1f1; border-top-left-radius: 10px; border-top-right-radius: 10px;';\n $share_h3 = 'color: #666; font-size: 14px; line-height: 20px; margin: 19px 0 25px; text-align: center;';\n $share_ul = 'overflow: hidden;';\n $share_li = 'float:left; width: 20%; max-width: 100%; max-height: 100%; margin: 0 auto; box-sizing: border-box; margin-bottom: 15px;';\n $share_li_a = 'width: 30px; height: 30px; line-height: 30px; text-align: center; max-width: 100%; margin: 0 auto; background-color: #e73361; border-radius: 5px; display: block;';\n $footer = 'background-color: #666; clear: both;';\n $footer_ul = 'overflow:hidden; padding: 20px 0;';\n $footer_li = 'width: 33.33%; float: left; color: #fff; max-width: 100%; max-height: 100%; margin: 0 auto; box-sizing: border-box; text-align: center;';\n $footer_li_a = 'color: inherit; text-decoration: underline; font-size: 14px;';\n $footer_span = 'border-radius: 50%; width: 25px; height: 25px; line-height: 25px; text-align: center; background-color: #fff; display: inline-block; margin-right: 6px;'; \n $wrap_img = 'margin: 30px 0 25px; text-align: center;';\n $img = 'display: inline-block; max-width: 100%; height: auto; vertical-align: middle;'; \n $note = 'text-align: right; color: #666; margin-top: 10px; font-size: 11px; line-height: 18px';\n $onMouseOver = \"this.style.backgroundColor='#e73361'\";\n $onMouseOut = \"this.style.backgroundColor ='#d9d9d9'\";\n $content = '<div style=\"'. $wrapper .'\">';\n $content .= '<div style=\"'. $header . $fleft. '\">';\n $content .= '<a href=\"'.route('home').'\" target=\"_blank\" style=\"'. $logo .'\"><img style=\"'.$img.'\" src=\"'.asset('public/images/email_icon/banner-mail.png').'\" alt=\"BiiGHoliday\"></a>';\n $content .= '</div> ';\n $content .= '<div style=\"'. $container_fluid .'\">'; \n $content .= '<div style=\"'. $about_box .'\">';\n $content .= '<ul style= \"'. $about_box_ul .'\">';\n $content .= '<li style=\"'. $about_box_info_li .'\">'.$fullName.'</li>';\n $content .= '<li style=\"color: #e62757; font-weight: bold;'. $about_box_info_li .' \">Greetings from BiiG Holiday !</li>';\n $content .= '<li style=\"'. $about_box_info_li .'\">Many thanks for your interest.</li>';\n $content .= '<li style=\"'. $about_box_info_li .'\">One of our travel consultants will contact you shortly to address <br/> your query.</li>';\n $content .= '<li style=\"'. $about_box_info_li .' margin-bottom:0;\">In the meantime. you can review your message as detailed below.</li>';\n $content .= '</ul>';\n $content .= '<ul style=\"'. $about_box_ul . $list_button .'\">';\n $content .= '<li style=\"'. $list_button_li .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">Send another request</a></li>';\n $content .= '<li style=\"'. $list_button_li_right .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a_right .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">View all tours</a></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div style=\"'. $wrap_img .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/base_fill_mail.png').'\" alt=\"bee\" style=\"'. $img .'\" />';\n $content .= '</div>';\n $content .= '<div style=\"margin-bottom: 50px;\">';\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Your personal information</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Name: <span style=\"'. $red_color .'\"> '.$fullName.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Age Group: <span style=\"'. $red_color .'\"> '.$ageGroup.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Phone number: <span style=\"'. $red_color .'\"> '.$phone.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Email: <a href=\"'.$email.'\" target=\"_blank\" style=\"'. $red_color .'\"> '.$email.' </a></li>';\n if(intval($numChild) > 0 || intval($numBaby) > 0){\n if(intval($numChild) > 0 && intval($numBaby) == 0){\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' , Child 2-12 y.o: '.$numChild.' </span></li>';\n }elseif(intval($numChild) == 0 && intval($numBaby) > 0){\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' , Baby < 2 y.o: '.$numBaby.' </span></li>';\n }else{\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' , Child 2-12 y.o: '.$numChild.' / Baby < 2 y.o: '.$numBaby.' </span></li>';\n }\n }else{\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' </span></li>';\n }\n $content .= '<li style=\"'. $box_modal_p_li .'\">Physical conditions of participants: <span style=\"'. $red_color .'\"> '.$condition.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Newsletter: <span style=\"'. $red_color .'\"> '.$newsletter.' </span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Your project information</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Arrival date : <span style=\"'. $red_color .'\">'. $arrivalDate .'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Duration : <span style=\"'. $red_color .'\">'.$duration.'days</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Budget per person : <span style=\"'. $red_color .'\">'.$budgetPerson.' '.$currencyPerson.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Accommodation type : <span style=\"'. $red_color .'\">'.$accommodation.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of rooms : <span style=\"'. $red_color .'\">'.$rooms.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Meal preferences : <span style=\"'. $red_color .'\">'. $meals .', '.$mealsTrips.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Destination(s) : <span style=\"'. $red_color .'\">'.$desc.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Describe your project and outlook of the trip : <p style=\"'. $red_color .'\">'.$otherDest.'</p></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Tour style(s): <span style=\"'. $red_color .'\">'.$tour .'</span></li>';\n $content .= '</ul>';\n $content .='</div>';\n $content .= '</div>';\n /*$content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">To know you better</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Describe your hobbies. passion and what you dislike : <p style=\"'. $red_color .'\">'. $hobbies .'</p></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Describe your last long haul travel experience : <p style=\"'. $red_color .'\">'.$lastLong.'</p></li>';\n $content .= '</ul>';\n $content .='</div>';\n $content .= '</div>';*/\n if($fullNameIntro != \"\" || $titleIntro != \"\"){\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Sponsorship</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .' padding-left: 17px;\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Are you recommended by an existing BiiG Holiday customer? : <span style=\"'. $red_color .'\">Yes</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Sponsored by: <span style=\"'. $red_color .'\">'. $titleIntro.$fullNameIntro .'</span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n }else{\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Sponsorship</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .' padding-left: 17px;\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Are you recommended by an existing BiiG Holiday customer? : <span style=\"'. $red_color .'\">No</span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n }\n $content .='</div>'; \n $content .= '<ul style=\"'. $about_box_ul . $list_button_2 .'\">';\n $content .= '<li style=\"'. $list_button_li .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">Send another request</a></li>';\n $content .= '<li style=\"'. $list_button_li_right .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a_right .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">View all tours</a></li>';\n $content .= '</ul>';\n $content .= '<div style=\"'. $share_box .'\">';\n $content .= '<h3 style=\"'. $share_h3 .'\">Follow us on</h3>';\n $content .= '<ul style=\"'. $about_box_ul . $share_ul .'\">';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://instagram.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/instagram.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://facebook.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/facebook.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://twitter.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/twitter.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://youtube.com/ target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/youtube.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://pinterest.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/pinterest.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '<div style=\"'. $footer .'\">';\n $content .= '<ul style=\"'. $about_box_ul . $footer_ul .'\">';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/phone.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</span>';\n $content .= 'Hotline Laos *';\n $content .= '<p><a href=\"tel:+856 20 9596 9226\" style=\"'. $footer_li_a .'\"><img src=\"'.asset('public/images/email_icon/laos-icon.png').'\" alt=\"\" style=\" margin-right: 5px; '. $img . '\" />+856 20 9596 9226</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/phone.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</span>';\n $content .= 'Hotline Vietnam *';\n $content .= '<p><a href=\"tel:+84 977 247 394\" style=\"'. $footer_li_a .'\"><img src=\"'.asset('public/images/email_icon/vietnam-icon.png').'\" alt=\"\" style=\" margin-right: 5px; '. $img . '\" />+84 977 247 394</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/envelope-small.png').'\" alt=\"\" style=\"'. $img .'\" />';\n $content .= '</span>';\n $content .= 'Email';\n $content .= '<p><a href=\"mailto:'.$mailSystem.'\" style=\"'. $footer_li_a .'\">'.$mailSystem.'</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/global.png').'\" alt=\"\" style=\"'. $img .'\" />';\n $content .= '</span>';\n $content .= 'Website';\n $content .= '<p><a href=\"'.route('home').'\" style=\"'. $footer_li_a .'\">'. $domain .'</a></p>';\n $content .= '</li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '<p style=\"clear:both;'. $note .'\">* Call us free on whatsapp. Messenger. Skype</p>';\n $content .= '</div>';\n //mail admin\n // $data = array( 'email' => $email, 'from' => $mailSystem, 'fullName' => $fullName, 'content'=> $content);\n // Mail::send( 'mails.admin.contact', compact('data'), function( $message ) use ($data){\n // $message->to($data['from'])\n // ->from( $data['email'], $data['fullName'] )\n // ->subject('[Contact to BiigHoliday] - '.$data['fullName']);\n // });\n $data = array( 'email' => $email, 'from' => '[email protected]', 'fullName' => $fullName, 'descTitle' => $descTitle, 'dateTitle' => $dateTitle, 'duration' => $duration, 'content'=> $content);\n Mail::send( 'mails.admin.create_my_trip', compact('data'), function( $message ) use ($data){\n $message->to($data['from'])\n ->from( $data['email'], $data['fullName'] )\n ->subject('[Sonasia Holiday] '.$data['fullName'].' / '.$data['descTitle'].' / '.$data['dateTitle'].' / '.$data['duration'].'days');\n });\n //mail customer\n $data = array( 'email' => $email, 'from' => $email, 'fullName' => $fullName, 'descTitle' => $descTitle, 'dateTitle' => $dateTitle, 'duration' => $duration ,'content' => $content);\n Mail::send( 'mails.create_my_trip', compact('data'), function( $message ) use ($data){\n $message->to($data['email'])\n ->from( $data['from'], '[Sonasia Holiday]')\n ->subject('[Sonasia Holiday] '.$data['fullName'].' / '.$data['descTitle'].' / '.$data['dateTitle'].' / '.$data['duration'].'days');\n });\n return 'true';\n endif;\n return 'if';\n endif;\n return 'false';\n }", "title": "" }, { "docid": "c5a4e699fd8b77e3a342adf53c1d7cd6", "score": "0.55417866", "text": "public function indexEditPost(Request $request) {\n// dd($request);\n //Get values from form elements\n $voivode = $request->voivode;\n $city = $request->city;\n $hour = $request->hour;\n $date = $request->date;\n $clientIdNotTrimmed = $request->clientId;\n\n //explode values into arrays\n $voivodeArr = explode(',', $voivode);\n $cityArr = explode(',', $city);\n $hourArr = explode(',',$hour);\n $clientId = explode('_',$clientIdNotTrimmed)[1];\n $dateArr = explode(',',$date);\n\n $loggedUser = Auth::user();\n\n// dd($hourArr);\n //New insertion into ClientRoute table\n $clientRoute = ClientRoute::find($request->route_id);\n $clientRoute->client_id = $clientId;\n $clientRoute->user_id = $loggedUser->id;\n $clientRoute->status = 0;\n $clientRoute->save();\n\n ClientRouteInfo::where('client_route_id','=',$request->route_id)->delete();\n //New insertions into ClientRouteInfo table\n for($i = 0; $i < count($voivodeArr); $i++) {\n for($j = 1; $j <= $hourArr[$i] ; $j++) { // for example if user type 2 hours, method will insert 2 insertions with given row.\n $clientRouteInfo = new ClientRouteInfo();\n $clientRouteInfo->client_route_id = $clientRoute->id;\n $clientRouteInfo->city_id = $cityArr[$i];\n $clientRouteInfo->voivode_id = $voivodeArr[$i];\n $clientRouteInfo->date = $dateArr[$i];\n $clientRouteInfo->verification = 0; // 0 - not set, 1 - set\n $day = substr($dateArr[$i],8,2);\n\n $month = substr($dateArr[$i],5,2);\n\n $year = substr($dateArr[$i], 0,4);\n\n $date = mktime(0, 0, 0, $month, $day, $year);\n $weekOfYear = date('W',$date);\n $clientRouteInfo->weekOfYear = $weekOfYear;\n $clientRouteInfo->save();\n }\n }\n $request->session()->flash('adnotation', 'Trasa została pomyślnie przypisana dla klienta');\n\n new ActivityRecorder(12,'ClientRouteId: '. $request->route_id, 206,2);\n\n return Redirect::back();\n\n }", "title": "" }, { "docid": "329416f6945c98bcd6a7fea431ca2a74", "score": "0.55390525", "text": "public function postEdit() {\n\n try {\n $request = Svcrequest::findOrFail(Input::get('id'));\n }\n catch(exception $e) {\n return Redirect::to('/requests')->with('flash_message', 'Request not found');\n }\n\n # http://laravel.com/docs/4.2/eloquent#mass-assignment\n $request->fill(Input::all());\n\n // Build the validation constraint set.\n $rules = array(\n 'email' => 'required|email',\n 'breed' => 'required|alpha_spaces',\n 'age' => 'required|numeric|min:0',\n 'svcdate' => 'required|date',\n 'nbrdogs' => 'required|numeric|min:0'\n\n );\n\n // Create a new validator instance.\n $validator = Validator::make(Input::all(), $rules);\n\n if($validator->fails()) {return Redirect::to('/requests_edit/{id}')\n ->with('flash_message', 'Invalid Input; please complete the form.')\n ->withInput()\n ->withErrors($validator);}\n\n\n $request->save();\n\n return Redirect::action('ServiceController@getEdit')->with('flash_message','Your changes have been saved.');\n\n }", "title": "" }, { "docid": "0cdca7609b17e892f07727c1a32a66b2", "score": "0.5522304", "text": "public function actInsert(Request $request){\n $acts = DB::select('select * from acts where user_id = :user_id order by id ASC', \n [\n 'user_id' => $request->user_id,\n ]);\n\n if($request->todoCompleted == 0){ //If the todolist is completed\n if(count($acts) > 90){ //The cap\n DB::table('acts')->where('id', '=', $acts[0]->id)->delete();\n DB::table('acts')->where('id', '=', $acts[1]->id)->delete();\n } \n\n DB::table('acts')->insert([\n [\n 'user_id' => $request->user_id,\n 'name' =>$request->name,\n 'type' =>'task'\n ],\n [\n 'user_id' => $request->user_id,\n 'name' =>$request->listName,\n 'type' =>'list'\n ],\n ]);\n return '2 things added'.$request->todoCompleted;\n } else {// If the todolist isn't completed\n\n if(count($acts) > 90){ //The cap\n DB::table('acts')->where('id', '=', $acts[0]->id)->delete();\n } \n\n DB::table('acts')->insert([\n 'user_id' => $request->user_id,\n 'name' =>$request->name,\n 'type' =>'task'\n ]);\n return '1 things added'.$request->todoCompleted;\n }\n }", "title": "" }, { "docid": "94db3ef016813978caae698d052e35fb", "score": "0.55169797", "text": "public function add(Request $request)\n {\n }", "title": "" }, { "docid": "94db3ef016813978caae698d052e35fb", "score": "0.55169797", "text": "public function add(Request $request)\n {\n }", "title": "" }, { "docid": "99e723c030f6441472bddd1153aa973c", "score": "0.5515958", "text": "public function edit()\n\t{\n\n\t}", "title": "" }, { "docid": "ec1f302f6e7bc109ffd1744c7b680c1e", "score": "0.55150056", "text": "public function add(){\n $this->add_edit();\n }", "title": "" }, { "docid": "147733e823d56d1f30afdf3119328273", "score": "0.5511202", "text": "public function updateConfirm(Request $request)\n {\n $validator=Validator::make($request->all(),[\n 'title'=>['required', Rule::unique('posts')->ignore($request->edit_id)],\n 'description'=>'required'], \n \n ['title.required'=>'Title is required.',\n 'title.max'=>'The title cannot be longer than 255 words.',\n 'title.unique'=>'Post already exist',\n 'description.required'=>'Description is required.'\n ]);\n if($validator->fails())\n {\n $postData=[\"post\"=>$request->all(),\n \"isValidate\"=>false,\n \"errors\"=>$validator->errors()\n ];\n \n }\n else\n {\n $postData=[\"post\"=>$request->all(),\n \"isValidate\"=>true, \n ];\n\n }\n return response()->json($postData); \n\n }", "title": "" }, { "docid": "703fd6e9691ae1cf77d369a3b33b90c3", "score": "0.5507178", "text": "public function edit($id)\n {\n try { \n if(isset($id) && !empty($id)) {\n\n $data = Permission::select('id','name','display_name')->where(['id'=>$id,'deleted_at'=>NULL])->first();\n $is_update_url = 1;\n return view('permission.add',compact('data','is_update_url'));\n } else {\n Toast::errot('Something Went Wrong.');\n return Redirect::to('/permission');\n }\n } catch (\\Exception $e) {\n Log::critical($e->getMessage());\n app('sentry')->captureException($e);\n Toast::errot('Something Went Wrong.');\n return redirect('/permission');\n } \n }", "title": "" }, { "docid": "078441d6082aa4ff82f2ea24704d84e4", "score": "0.5506527", "text": "public function edit($id){\n try {\n $required=\"*\";\n $personal_info= array();\n $selected_cat= array();\n $site_info = BusinessInfo::where('_id', $id)->where('type','personal')->first(); \n $fm_data= FieldMaster::where('title', 'personal_sites')->where('lang','en')->first();\n $countries= DropdownOption::where('name','countries')->where('lang', 'en')->first();\n $organizations= DropdownOption::where('name','organization')->where('lang','en')->first();\n $activities= DropdownOption::where('name', 'activity_type')->where('lang', 'en')->first();\n $site_opts= DropdownOption::where('name','business_operation')->where('lang','en')->first();\n $markets= DropdownOption::where('name','market')->where('lang', 'en')->first();\n \n if(empty($site_info)){\n return Redirect::route('personal-select_cat-index')->with('message', \"The prsonal site is not present, please create a new\");\n }\n \n if(!empty($site_info->personal_info)){\n foreach ($site_info->personal_info as $key => $value) {\n $personal_info[$key] = $value;\n }\n }\n \n foreach ($site_info as $key => $value) {\n $personal_info[$key] = $value;\n }\n \n foreach ($site_info->category_id as $key => $value) {\n $val= Categories::where('cat_id','=',$value)->where('lang','=','en')->first();\n $selected_cat[$value]=$val->name;\n }\n\n foreach($countries->options as $countryname){\n $country[$countryname]=$countryname;\n }\n \n foreach($organizations->options as $organizationname){\n $organization[$organizationname]=$organizationname;\n }\n\n foreach($activities->options as $activity_name){\n $activity[$activity_name]=$activity_name;\n }\n \n foreach($site_opts->options as $site_optname){\n $site_opt[$site_optname]=$site_optname;\n }\n\n foreach($markets->options as $marketname){\n $market[$marketname]=$marketname;\n }\n\n return view('backend.dashboard.personal_sites.edit',compact('fm_data','required','country','organization','activity','site_opt','market', 'site_info','selected_cat','personal_info'));\n }\n catch(\\Exception $e){\n $errors = $this->errorMessage($e);\n return Redirect::route('exceptions.create')->with('message','Oops! You are here because Something went Wrong. Please report the Error')->withErrors($errors);\n }\n }", "title": "" }, { "docid": "c11ffd76c300978c429a35f1a8494b9b", "score": "0.55020523", "text": "public function edit()\n\t{\n\t\t// TODO: fonction\n\t}", "title": "" }, { "docid": "eca7dec5d7ad93c4ad08aaabdc045f9a", "score": "0.5498541", "text": "public function updatePersonalize(Request $request){\n // $alert = \"error\";\n if($request->ajax()):\n $fullName = $request->title.$request->fullName;\n $phone = $request->numberPhone;\n $email = $request->email;\n $ageGroup = $request->ageGroup;\n $newsletter = $request->newsletter;\n $condition = $request->condition;\n $numAdult = $request->numAdult;\n $numChild = $request->numChild;\n $numBaby = $request->numBaby;\n $numTeenager = $request->numTeenager;\n $arrivalDate = $request->arrivalDate;\n $duration = $request->duration;\n $explainTrip = $request->explainTrip;\n $otherDest = $request->otherDest;\n $budgetPerson = $request->budgetPerson;\n $currencyPerson = $request->currencyPerson;\n $accommodation = $request->accommodation;\n $accommon = $request->accommon;\n $physical = $request->physical;\n $project = $request->project;\n $meals= $request->meals;\n $mealsTrips = $request->mealsTrips;\n $doubleRoom = $request->doubleRoom;\n $twinRoom = $request->twinRoom;\n $individualRoom = $request->individualRoom;\n $tripleRoom = $request->tripleRoom;\n $rooms = \"\";\n if(intval($doubleRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $doubleRoom.\" double room \";\n }else{\n $rooms .= \", \".$doubleRoom.\" double rooms \";\n }\n }\n if(intval($twinRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $twinRoom. \" twin rooms\";\n }else{\n $rooms .=\", \".$twinRoom. \" twin rooms\";\n }\n }\n if(intval($individualRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $individualRoom.\" individual room\";\n }else{\n $rooms .= \", \".$individualRoom.\" individual room\";\n }\n }\n if(intval($tripleRoom) > 0){\n if( $rooms == \"\"){\n $rooms .= $tripleRoom.\" triple rooms \";\n }else{\n $rooms .=\", \".$tripleRoom.\" triple rooms \";\n }\n }\n $canContact = $request->canContact;\n $titleIntro = $request->titleIntro;\n $fullNameIntro = $request->fullNameIntro;\n $phoneSystem = phone();\n $mailSystem = mailSystem();\n $domain = $request->getHost();\n $splitDate = explode(',',$arrivalDate);\n $replaceDate = str_replace('/', '-', $splitDate[1]);\n $dateTitle = date(\"d M Y\", strtotime($replaceDate));\n // content\n if(!empty($fullName) && !empty($email) && !empty($ageGroup) && !empty($phone) && !empty($arrivalDate) && intval($numAdult) > 0 && !empty($explainTrip) && !empty($condition) ) : \n $h3 = 'font-size: 16px;line-height:31px;background-color:#666;border-radius: 10px; margin: 0;color: #fff;text-align: center; ';\n $fleft = 'float: left; width: 100%;';\n $overflow = 'overflow: hidden';\n $wrapper = 'font-size: 15px; line-height: 21px; color: #666; font-family: Arial; background-color: #fff; width: 600px; margin: 0 auto; -webkit-overflow-scrolling: touch; overflow: auto;';\n $header = 'width: 100%;';\n $logo ='display: block;';\n $container_fluid = 'padding: 0 40px; clear: both;';\n $box_modal = 'padding: 10px; text-align: left;';\n $box_modal_ul = 'padding-left: 25px; margin: 0;';\n $box_modal_p_li = 'color: #555; position: relative; margin-left: 0;';\n $about_box = 'background-color: #f1f1f1;padding:18px 34px 44px; text-align: center; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px;';\n $about_box_ul = 'padding-left:0 ;list-style: none; margin: 0; color: #7e7e7e;';\n $about_box_info_li = 'margin-bottom: 22px; display: block; margin-left: 0;';\n $list_button = 'margin-top: 25px;';\n $list_button_2 = 'margin-bottom: 25px; background-color:#f1f1f1; padding: 20px 0; border-radius:10px;';\n $list_button_li = 'text-align: center; margin: 0 0 15px 0;';\n $list_button_li_right = 'text-align: center; margin: 0 ;';\n $list_button_li_a = 'display: block; width: 300px; max-width: 100%; line-height: 33px; background-color: #e73361;color: #fff; border-radius: 10px; text-decoration: none; margin: 0 auto;';\n $list_button_li_a_right = 'display: block; width: 300px; max-width: 100%; line-height: 33px;background-color: #34e6d0;color: #fff; border-radius: 10px; text-decoration: none; margin: 0 auto;';\n $red_color = 'color: #e73362;';\n $button_group = 'background-color: #f1f1f1; margin-bottom: 50px; border-radius: 10px;';\n $share_box = 'background-color: #f1f1f1; border-top-left-radius: 10px; border-top-right-radius: 10px;';\n $share_h3 = 'color: #666; font-size: 14px; line-height: 20px; margin: 19px 0 25px; text-align: center;';\n $share_ul = 'overflow: hidden;';\n $share_li = 'float:left; width: 20%; max-width: 100%; max-height: 100%; margin: 0 auto; box-sizing: border-box; margin-bottom: 15px;';\n $share_li_a = 'width: 30px; height: 30px; line-height: 30px; text-align: center; max-width: 100%; margin: 0 auto; background-color: #e73361; border-radius: 5px; display: block;';\n $footer = 'background-color: #666; clear: both;';\n $footer_ul = 'overflow:hidden; padding: 20px 0;';\n $footer_li = 'width: 50%; float: left; color: #fff; max-width: 100%; max-height: 100%; margin: 0 auto; box-sizing: border-box; text-align: center;';\n $footer_li_a = 'color: inherit; text-decoration: underline; font-size: 14px;';\n $footer_span = 'border-radius: 50%; width: 25px; height: 25px; line-height: 25px; text-align: center; background-color: #fff; display: inline-block; margin-right: 6px;'; \n $wrap_img = 'margin: 30px 0 25px; text-align: center;';\n $img = 'display: inline-block; max-width: 100%; height: auto; vertical-align: middle;'; \n $note = 'text-align: right; color: #666; margin-top: 10px; font-size: 11px; line-height: 18px';\n $onMouseOver = \"this.style.backgroundColor='#e73361';\";\n $onMouseOut = \"this.style.backgroundColor ='#d9d9d9';\";\n $content = '<div style=\"'. $wrapper .'\">';\n $content .= '<div style=\"'. $header . $fleft. '\">';\n $content .= '<a href=\"'.route('home').'\" target=\"_blank\" style=\"'. $logo .'\"><img style=\"'.$img.'\" src=\"'.asset('public/images/email_icon/banner-mail.png').'\" alt=\"BiiGHoliday\"></a>';\n $content .= '</div> ';\n $content .= '<div style=\"'. $container_fluid .'\">'; \n $content .= '<div style=\"'. $about_box .'\">';\n $content .= '<ul style= \"'. $about_box_ul .'\">';\n $content .= '<li style=\"'. $about_box_info_li .'\">'.$fullName.'</li>';\n $content .= '<li style=\"color: #e62757; font-weight: bold;'. $about_box_info_li .' \">Greetings from BiiG Holiday !</li>';\n $content .= '<li style=\"'. $about_box_info_li .'\">Many thanks for your interest.</li>';\n $content .= '<li style=\"'. $about_box_info_li .'\">One of our travel consultants will contact you shortly to address <br/> your query.</li>';\n $content .= '<li style=\"'. $about_box_info_li .' margin-bottom:0;\">In the meantime. you can review your message as detailed below.</li>';\n $content .= '</ul>';\n $content .= '<ul style=\"'. $about_box_ul . $list_button .'\">';\n $content .= '<li style=\"'. $list_button_li .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">Send another request</a></li>';\n $content .= '<li style=\"'. $list_button_li_right .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a_right .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">View all tours</a></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div style=\"'. $wrap_img .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/base_fill_mail.png').'\" alt=\"bee\" style=\"'. $img .'\" />';\n $content .= '</div>';\n $content .= '<ul style= \"'. $about_box_ul .'margin-bottom: 30px; text-align: center;\">';\n $content .= '<li style=\"font-weight: bold;'. $about_box_info_li .' \">Personalization of \"The Real Luang Prabang\" tour</li>';\n $content .= '<li style=\"'. $about_box_info_li .'margin-bottom:0;\">Flow the link below to check the tour detail</li>';\n $content .= '<li style=\"'. $about_box_info_li .' margin-bottom:0;\"><a target=\"_blank\" href=\"http://biigholiday.dsmart.vn/tours/single/6-day-luang-prabang-family-tour\" style=\"'. $red_color .'text-decoration: none;\">'.$domain.'/tours/the-real-luang-prabang.html</a></li>';\n $content .= '</ul>';\n $content .= '<div style=\"margin-bottom: 50px;\">';\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Your personal information</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Name: <span style=\"'. $red_color .'\"> '.$fullName.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Phone number: <span style=\"'. $red_color .'\"> '.$phone.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Age Group: <span style=\"'. $red_color .'\"> '.$ageGroup.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Email: <a href=\"'.$email.'\" target=\"_blank\" style=\"'. $red_color .'\"> '.$email.' </a></li>';\n if(intval($numChild) > 0 || intval($numBaby) > 0){\n if(intval($numChild) > 0 && intval($numBaby) == 0){\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' , Child 2-12 y.o: '.$numChild.' </span></li>';\n }elseif(intval($numChild) == 0 && intval($numBaby) > 0){\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' , Baby < 2 y.o: '.$numBaby.' </span></li>';\n }else{\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' , Child 2-12 y.o: '.$numChild.' / Baby < 2 y.o: '.$numBaby.' </span></li>';\n }\n }else{\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of Travelers: <span style=\"'. $red_color .'\"> Adult: '.$numAdult.' </span></li>';\n }\n $content .= '<li style=\"'. $box_modal_p_li .'\">Physical conditions of participants: <span style=\"'. $red_color .'\"> '.$condition.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Newsletter: <span style=\"'. $red_color .'\"> '.$newsletter.' </span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div style=\"clear: both;\">';\n $content .= '<h3 style=\"'. $h3 .'\">Your project information</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Arrival date : <span style=\"'. $red_color .'\">'. $arrivalDate .'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Duration : <span style=\"'. $red_color .'\">'.$duration.'days</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Budget per person : <span style=\"'. $red_color .'\">'.$budgetPerson.' '.$currencyPerson.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Accommodation type : <span style=\"'. $red_color .'\">'.$accommodation.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Number of rooms : <span style=\"'. $red_color .'\">'.$rooms.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Meal preferences : <span style=\"'. $red_color .'\">'. $meals .', '.$mealsTrips.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">What you expect from this trip : <p style=\"'. $red_color .'\">'. $explainTrip .'</p></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Is there anything you want to personalize : <p style=\"'. $red_color .'\">'. $otherDest .'</p></li>';\n $content .= '</ul>';\n $content .='</div>';\n $content .= '</div>';\n if($fullNameIntro != \"\" || $titleIntro != \"\"){\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Sponsorship</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .' padding-left: 17px;\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Are you recommended by an existing BiiG Holiday customer? : <span style=\"'. $red_color .'\">Yes</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Sponsored by: <span style=\"'. $red_color .'\">'. $titleIntro.$fullNameIntro .'</span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n }else{\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Sponsorship</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .' padding-left: 17px;\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Are you recommended by an existing BiiG Holiday customer? : <span style=\"'. $red_color .'\">No</span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n }\n $content .='</div>'; \n $content .= '<ul style=\"'. $about_box_ul . $list_button_2 .'\">';\n $content .= '<li style=\"'. $list_button_li .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">Send another request</a></li>';\n $content .= '<li style=\"'. $list_button_li_right .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a_right .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">View all tours</a></li>';\n $content .= '</ul>';\n $content .= '<div style=\"'. $share_box .'\">';\n $content .= '<h3 style=\"'. $share_h3 .'\">Follow us on</h3>';\n $content .= '<ul style=\"'. $about_box_ul . $share_ul .'\">';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://instagram.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/instagram.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://facebook.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/facebook.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://twitter.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/twitter.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://youtube.com/ target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/youtube.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://pinterest.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/pinterest.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '<div style=\"'. $footer .'\">';\n $content .= '<ul style=\"'. $about_box_ul . $footer_ul .'\">';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/phone.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</span>';\n $content .= 'Hotline Laos *';\n $content .= '<p><a href=\"tel:+856 20 9596 9226\" style=\"'. $footer_li_a .'\"><img src=\"'.asset('public/images/email_icon/laos-icon.png').'\" alt=\"\" style=\" margin-right: 5px; '. $img . '\" />+856 20 9596 9226</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/phone.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</span>';\n $content .= 'Hotline Vietnam *';\n $content .= '<p><a href=\"tel:+84 977 247 394\" style=\"'. $footer_li_a .'\"><img src=\"'.asset('public/images/email_icon/vietnam-icon.png').'\" alt=\"\" style=\" margin-right: 5px; '. $img . '\" />+84 977 247 394</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/envelope-small.png').'\" alt=\"\" style=\"'. $img .'\" />';\n $content .= '</span>';\n $content .= 'Email';\n $content .= '<p><a href=\"mailto:'.$mailSystem.'\" style=\"'. $footer_li_a .'\">'.$mailSystem.'</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/global.png').'\" alt=\"\" style=\"'. $img .'\" />';\n $content .= '</span>';\n $content .= 'Website';\n $content .= '<p><a href=\"'.route('home').'\" style=\"'. $footer_li_a .'\">'. $domain .'</a></p>';\n $content .= '</li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '<p style=\"clear:both;'. $note .'\">* Call us free on whatsapp. Messenger. Skype</p>';\n $content .= '</div>';\n //mail admin\n // $data = array( 'email' => $email, 'from' => $mailSystem, 'fullName' => $fullName, 'content'=> $content);\n // Mail::send( 'mails.admin.contact', compact('data'), function( $message ) use ($data){\n // $message->to($data['from'])\n // ->from( $data['email'], $data['fullName'] )\n // ->subject('[Contact to BiigHoliday] - '.$data['fullName']);\n // });\n $data = array( 'email' => $email, 'from' => '[email protected]', 'fullName' => $fullName, 'dateTitle' => $dateTitle, 'duration' => $duration, 'content'=> $content);\n Mail::send( 'mails.admin.create_my_trip', compact('data'), function( $message ) use ($data){\n $message->to($data['from'])\n ->from( $data['email'], $data['fullName'] )\n ->subject('[Sonasia Holiday] '.$data['fullName'].' / '.$data['dateTitle'].' / '.$data['duration'].'days');\n });\n //mail customer\n $data = array( 'email' => $email, 'from' => $email, 'fullName' => $fullName, 'dateTitle' => $dateTitle, 'duration' => $duration ,'content' => $content);\n Mail::send( 'mails.create_my_trip', compact('data'), function( $message ) use ($data){\n $message->to($data['email'])\n ->from( $data['from'], '[Sonasia Holiday]')\n ->subject('[Sonasia Holiday] '.$data['fullName'].' / '.$data['dateTitle'].' / '.$data['duration'].'days');\n });\n // $alert = 'Thank you sent request to the BiigHoliday, we will reeback you in the early time.';\n return 'true';\n endif;\n return 'if';\n endif;\n return 'false';\n }", "title": "" }, { "docid": "7ccdb4698d8cb16c65c8562dd5b05da6", "score": "0.5493969", "text": "public function edit($id)\n { \n try { \n if(isset($id) && !empty($id)) {\n\n $data = Entity::find($id);\n $is_update_url = 1;\n\n if(isset($data) && !empty($data)) {\n\n return view('entity.add',compact('data','is_update_url'));\n\n } else {\n Toast::error('Data Not found.');\n return Redirect::to('/entity'); \n }\n } else {\n Toast::error('Id not found.');\n return Redirect::to('/entity');\n }\n\n } catch (\\Exception $e) {\n Log::critical($e->getMessage());\n app('sentry')->captureException($e);\n Toast::error('Something Went Wrong.');\n return Redirect::to('/entity');\n } \n }", "title": "" }, { "docid": "86f2ce92a1a9c06d493a7f6969401d5a", "score": "0.54934555", "text": "public function update(Request $request)\n {\n // return $request;\n if(isset($request->repeat)==4) {\n $user = $request->user_id;\n $complaints = Complaint::findOrFail($request->id);\n $complaints->update([\"user_id\"=> $user ,\"status\"=> 4]); //For Repeated Complaints\n $complaints->save();\n \n return redirect('working');\n }\n if (isset($request->updatecomplaint)==1) {\n \n $complaint=Complaint::find($request->complaint_id);\n $complaint->name=$request->name;\n $complaint->mobile=$request->mobile;\n $complaint->address=$request->address;\n $complaint->save();\n return redirect('complaints'); \n }\n $user = $request->user_id;\n $complaints = Complaint::findOrFail($request->id);\n $complaints->update([\"user_id\"=> $user ,\"status\"=> 1]); //For Working Complaints\n $complaints->save();\n \n return redirect('working');\n\n }", "title": "" }, { "docid": "b13204608c75b8139e47caa7f11709ed", "score": "0.5492285", "text": "public function edit(Request $request)\n {\n $data=[\n 'nom'=>$request['nom'],\n 'prenom'=>$request['prenom'],\n 'email'=>$request['email'],\n 'id_pfe'=>$request['pfe'],\n 'msg'=>$request['msg'],\n 'cv'=>$request['cv']\n ];\n DB::table('stagiaires')->where('id',$request['id'])->update($data);\n return back()->withmessage('updated');\n }", "title": "" }, { "docid": "e4d008d464ddd7d5feab49ea4c060058", "score": "0.54780996", "text": "public function add()\n {\n $this->edit();\n }", "title": "" }, { "docid": "56d4d75822de8661b3624b6374469c6f", "score": "0.5476109", "text": "public function postEditar()\n {\n if ( Request::ajax() ) {\n $regex = 'regex:/^([a-zA-Z .,ñÑÁÉÍÓÚáéíóú]{2,60})$/i';\n $required = 'required';\n $reglas = array(\n 'nombre' => $required.'|'.$regex,\n );\n\n $mensaje= array(\n 'required' => ':attribute Es requerido',\n 'regex' => ':attribute Solo debe ser Texto',\n );\n\n $validator = Validator::make(Input::all(), $reglas, $mensaje);\n\n if ( $validator->fails() ) {\n return Response::json( array('rst'=>2, 'msj'=>$validator->messages()) );\n }\n\n $poi_subtipoId = Input::get('id');\n $poi_subtipo = PoiSubtipo::find($poi_subtipoId);\n $poi_subtipo->nombre = Input::get('nombre');\n $poi_subtipo->estado = Input::get('estado');\n $poi_subtipo->color = Input::get('color');\n $poi_subtipo->tamano = Input::get('tamano');\n $poi_subtipo->costo_actual = Input::get('costo_actual');\n $poi_subtipo->usuario_updated_at = Auth::user()->id;\n $poi_subtipo->save();\n \n $update='update poi_subtipos_historico set ultimo=0\n where subtipo_id='.$poi_subtipo->id;\n DB::update($update); \n \n $poi_subtipo_h= new PoiSubtipohistorico;\n $poi_subtipo_h->subtipo_id = $poi_subtipo->id;\n $poi_subtipo_h->costo = Input::get('costo_actual');\n $poi_subtipo_h->fecha_cambio = date(\"Y-m-d h:m:s\");\n $poi_subtipo_h->color = Input::get('color');\n $poi_subtipo_h->tamano = Input::get('tamano');\n $poi_subtipo_h->usuario_updated_at = Auth::user()->id;\n \n $poi_subtipo_h->save();\n return Response::json(array('rst'=>1, 'msj'=>'Registro actualizado correctamente'));\n }\n }", "title": "" }, { "docid": "751c427cb327fe5df769e194c0e42917", "score": "0.5475411", "text": "public function update(Request $request)\n {\n\n $trabajoaltura=SuficienciaTrabajoAltura::find($request['trabajo_altura_id']);\n if(request()->ajax()) {\n $data = request()->validate([\n 'optradio'=>'nullable',\n 'anamnesis_item1'=>'nullable',\n 'anamnesis_item2'=>'nullable',\n 'anamnesis_item3'=>'nullable',\n 'anamnesis_item4'=>'nullable',\n 'anamnesis_item5'=>'nullable',\n 'anamnesis_item6'=>'nullable',\n 'anamnesis_item7'=>'nullable',\n 'anamnesis_item8'=>'nullable',\n 'anamnesis_item9'=>'nullable',\n 'anamnesis_item10'=>'nullable',\n 'anamnesis_comentarios'=>'nullable',\n 'exploracion_fisica_fc'=>'nullable',\n 'exploracion_fisica_fr'=>'nullable',\n 'exploracion_fisica_pa'=>'nullable',\n 'exploracion_fisica_talla'=>'nullable',\n 'exploracion_fisica_peso'=>'nullable',\n 'exploracion_fisica_imc'=>'nullable',\n 'exploracion_fisica_perimetro_cuello'=>'nullable',\n 'exploracion_fisica_perimetro_cintura'=>'nullable',\n 'exploracion_fisica_perimetro_cadera'=>'nullable',\n 'exploracion_fisica_icc'=>'nullable',\n 'exploracion_fisica_perimetro_toracico_inspiracion'=>'nullable',\n 'exploracion_fisica_perimetro_toracico_espiracion'=>'nullable',\n 'exploracion_fisica_item_1'=>'nullable',\n 'exploracion_fisica_item_2'=>'nullable',\n 'exploracion_fisica_item_3'=>'nullable',\n 'exploracion_fisica_item_4'=>'nullable',\n 'exploracion_fisica_item_5'=>'nullable',\n 'exploracion_fisica_item_6'=>'nullable',\n 'exploracion_fisica_item_7'=>'nullable',\n 'exploracion_fisica_item_8'=>'nullable',\n 'exploracion_fisica_item_9'=>'nullable',\n 'exploracion_fisica_item_10'=>'nullable',\n 'exploracion_fisica_detalle'=>'nullable',\n 'prueba_auxiliar_item_1'=>'nullable',\n 'prueba_auxiliar_item_2'=>'nullable',\n 'prueba_auxiliar_item_3'=>'nullable',\n 'prueba_auxiliar_item_4'=>'nullable',\n 'prueba_auxiliar_item_5'=>'nullable',\n 'prueba_auxiliar_detalle_medicina'=>'nullable',\n 'prueba_auxiliar_otro'=>'nullable',\n 'conclusion_apto'=>'nullable',\n 'desde'=>'nullable',\n 'hasta'=>'nullable',\n 'recomendacion'=>'nullable',\n 'lista_examen_id'=>'nullable',\n 'cita_id'=>'nullable'\n ]);\n\n $primera_aptiud=\"\";\n $revalidacion=\"\";\n if($data['optradio']=='primera_aptitud')\n {\n $primera_aptiud=\"1\";\n $revalidacion=\"0\";\n }\n else {\n $primera_aptiud=\"0\";\n $revalidacion='1';\n }\n $trabajoaltura->update([\n\n\n 'primera_aptitud'=>$primera_aptiud,\n 'revalidacion'=>$revalidacion,\n 'anamnesis_item1'=>isset($data['anamnesis_item1'])? $data['anamnesis_item1']:0,\n 'anamnesis_item2'=>isset($data['anamnesis_item2'])? $data['anamnesis_item2']:0,\n 'anamnesis_item3'=>isset($data['anamnesis_item3'])? $data['anamnesis_item3']:0,\n 'anamnesis_item4'=>isset($data['anamnesis_item4'])? $data['anamnesis_item4']:0,\n 'anamnesis_item5'=>isset($data['anamnesis_item5'])? $data['anamnesis_item5']:0,\n 'anamnesis_item6'=>isset($data['anamnesis_item6'])? $data['anamnesis_item6']:0,\n 'anamnesis_item7'=>isset($data['anamnesis_item7'])? $data['anamnesis_item7']:0,\n 'anamnesis_item8'=>isset($data['anamnesis_item8'])? $data['anamnesis_item8']:0,\n 'anamnesis_item9'=>isset($data['anamnesis_item9'])? $data['anamnesis_item9']:0,\n 'anamnesis_item10'=>isset($data['anamnesis_item10'])? $data['anamnesis_item10']:0,\n 'anamnesis_comentarios'=>isset($data['anamnesis_comentarios'])? $data['anamnesis_comentarios']:null,\n 'exploracion_fisica_fc'=>isset($data['exploracion_fisica_fc'])? $data['exploracion_fisica_fc']:null,\n 'exploracion_fisica_fr'=>isset($data['exploracion_fisica_fr'])? $data['exploracion_fisica_fr']:null,\n 'exploracion_fisica_pa'=>isset($data['exploracion_fisica_pa'])? $data['exploracion_fisica_pa']:null,\n 'exploracion_fisica_talla'=>isset($data['exploracion_fisica_talla'])? $data['exploracion_fisica_talla']:null,\n 'exploracion_fisica_peso'=>isset($data['exploracion_fisica_peso'])? $data['exploracion_fisica_peso']:null,\n 'exploracion_fisica_imc'=>isset($data['exploracion_fisica_imc'])? $data['exploracion_fisica_imc']:null,\n 'exploracion_fisica_perimetro_cuello'=>isset($data['exploracion_fisica_perimetro_cuello'])? $data['exploracion_fisica_perimetro_cuello']:null,\n 'exploracion_fisica_perimetro_cintura'=>isset($data['exploracion_fisica_perimetro_cintura'])? $data['exploracion_fisica_perimetro_cintura']:null,\n 'exploracion_fisica_perimetro_cadera'=>isset($data['exploracion_fisica_perimetro_cadera'])? $data['exploracion_fisica_perimetro_cadera']:null,\n 'exploracion_fisica_icc'=>isset($data['exploracion_fisica_icc'])? $data['exploracion_fisica_icc']:null,\n 'exploracion_fisica_perimetro_toracico_inspiracion'=>isset($data['exploracion_fisica_perimetro_toracico_inspiracion'])? $data['exploracion_fisica_perimetro_toracico_inspiracion']:null,\n 'exploracion_fisica_perimetro_toracico_espiracion'=>isset($data['exploracion_fisica_perimetro_toracico_espiracion'])? $data['exploracion_fisica_perimetro_toracico_espiracion']:null,\n 'exploracion_fisica_item_1'=>isset($data['exploracion_fisica_item_1'])? $data['exploracion_fisica_item_1']:0,\n 'exploracion_fisica_item_2'=>isset($data['exploracion_fisica_item_2'])? $data['exploracion_fisica_item_2']:0,\n 'exploracion_fisica_item_3'=>isset($data['exploracion_fisica_item_3'])? $data['exploracion_fisica_item_3']:0,\n 'exploracion_fisica_item_4'=>isset($data['exploracion_fisica_item_4'])? $data['exploracion_fisica_item_4']:0,\n 'exploracion_fisica_item_5'=>isset($data['exploracion_fisica_item_5'])? $data['exploracion_fisica_item_5']:0,\n 'exploracion_fisica_item_6'=>isset($data['exploracion_fisica_item_6'])? $data['exploracion_fisica_item_6']:0,\n 'exploracion_fisica_item_7'=>isset($data['exploracion_fisica_item_7'])? $data['exploracion_fisica_item_7']:0,\n 'exploracion_fisica_item_8'=>isset($data['exploracion_fisica_item_8'])? $data['exploracion_fisica_item_8']:0,\n 'exploracion_fisica_item_9'=>isset($data['exploracion_fisica_item_9'])? $data['exploracion_fisica_item_9']:0,\n 'exploracion_fisica_item_10'=>isset($data['exploracion_fisica_item_10'])? $data['exploracion_fisica_item_10']:0,\n 'exploracion_fisica_detalle'=>isset($data['exploracion_fisica_detalle'])? $data['exploracion_fisica_detalle']:null,\n 'prueba_auxiliar_item_1'=>isset($data['prueba_auxiliar_item_1'])? $data['prueba_auxiliar_item_1']:0,\n 'prueba_auxiliar_item_2'=>isset($data['prueba_auxiliar_item_2'])? $data['prueba_auxiliar_item_2']:0,\n 'prueba_auxiliar_item_3'=>isset($data['prueba_auxiliar_item_3'])? $data['prueba_auxiliar_item_3']:0,\n 'prueba_auxiliar_item_4'=>isset($data['prueba_auxiliar_item_4'])? $data['prueba_auxiliar_item_4']:0,\n 'prueba_auxiliar_item_5'=>isset($data['prueba_auxiliar_item_5'])? $data['prueba_auxiliar_item_5']:0,\n 'prueba_auxiliar_detalle_medicina'=>isset($data['prueba_auxiliar_detalle_medicina'])? $data['prueba_auxiliar_detalle_medicina']:null,\n 'prueba_auxiliar_otro'=>isset($data['prueba_auxiliar_otro'])? $data['prueba_auxiliar_otro']:null,\n 'conclusion_apto'=>isset($data['conclusion_apto'])? $data['conclusion_apto']:null,\n 'desde'=>isset($data['desde'])? $data['desde']:null,\n 'hasta'=>isset($data['hasta'])? $data['hasta']:null,\n 'recomendacion'=>isset($data['recomendacion'])? $data['recomendacion']:null,\n\n\n // 'fecha_registro'=>Carbon::now(),\n // 'lista_examen_id'=>isset($data['lista_examen_id'])? $data['']:null,\n // 'cita_id'=>isset($data['cita_id'])? $data['']:null,\n // 'estado'=>true\n ]);\n $trabajoaltura->save();\n return response()->json(['mensaje' => 'registro actualizado']);\n }\n\n }", "title": "" }, { "docid": "d62b6423a511499a0f8747d2257c5f60", "score": "0.54726243", "text": "public function do_edit()\n {\n if($this->session->userdata('user_auth') === 'LIMITED'){ \n redirect('/login/do_logout');\n }\n\n $this->do_create(TRUE);\n }", "title": "" }, { "docid": "630b428cd6582668387fe75dcdcd3702", "score": "0.54670066", "text": "public function store(Request $request)\n {\n\n $file_price = $request->get('file_price');\n $wasadepositreceived = $request->get('wasadepositreceived');\n $much_received = $request->get('much_received');\n $who_received = $request->get('who_received');\n $other_receiver = $request->get('other_receiver');\n $fileid = $request->get('fileid');\n\n $status = $request->get('status'); // status exist only if it is approve or rejected in tge review popup\n if(isset($status)){\n $status = $request->get('status');\n }\n else{\n\n $checkexist = FileInformation::where('ref_file' , $fileid)->first();\n\n if(isset($checkexist)){\n $status = 'pending';\n }\n else{\n $status = 'completed';\n }\n\n }\n\n\n if(auth()->user()->type != \"Admin\"){\n $user_type = UserFileTypes::where('file_id', $fileid)->where('user_id' , auth()->user()->email)->first()->user_type;\n }else{\n $user_type = auth()->user()->type;\n }\n\n //last time the file was edited\n fileLastTimeEdited($fileid);\n\n\n // to be done later : check if requested fields are all empty and current data is empty as well ,\n // i.e : if(empty($name) && empty($row->name))\n if($status == \"pending\") {\n\n if (\n empty($file_price) &&\n empty($wasadepositreceived) &&\n empty($much_received) &&\n empty($who_received) &&\n empty($other_receiver) &&\n empty($much_received)\n\n ) {\n\n $status = 'completed';\n\n }\n }\n\n if($user_type == \"Client\" && ( $status == \"pending\" || $status ==\"completed\") ) {\n\n if($request->ajax()) {\n\n if(FileInformation::updateOrCreate(\n ['ref_file' => $fileid ],\n [\n\n 'is_deposit_received' => $wasadepositreceived ,\n 'file_price' => $file_price ,\n 'much_received' => $much_received ,\n 'who_received' => $who_received ,\n 'other_receiver' => $other_receiver ,\n 'status' => 'completed' ,\n\n\n ]\n )){\n\n echo 'SUCCESS';\n\n }\n\n\n }\n\n\n }\n else{\n\n if($status == 'completed'){\n\n if($request->ajax()) {\n\n if(FileInformation::updateOrCreate(\n ['ref_file' => $fileid ],\n [\n\n 'is_deposit_received' => $wasadepositreceived ,\n 'file_price' => $file_price ,\n 'much_received' => $much_received ,\n 'who_received' => $who_received ,\n 'other_receiver' => $other_receiver ,\n 'status' => $status ,\n\n\n ]\n )){\n\n echo 'SUCCESS';\n\n }\n\n\n }\n\n }\n\n elseif ($status == 'pending'){\n\n if($request->ajax()) {\n\n if(FileInformation::updateOrCreate(\n ['ref_file' => $fileid ],\n [\n\n 'holder_is_deposit_received' => $wasadepositreceived ,\n 'holder_file_price' => $file_price ,\n 'holder_much_received' => $much_received ,\n 'holder_who_received' => $who_received ,\n 'holder_other_receiver' => $other_receiver ,\n\n 'submitted_by'=> auth()->user()->type . ' User Name: '.\n auth()->user()->name . ' ' .\n auth()->user()->last_name .'<br>'.\n 'User Email: ' . auth()->user()->email .'<br>'.\n 'Submission Date/Time: ' . Carbon::now() ,\n\n 'status' => $status ,\n\n\n ]\n )){\n\n echo 'SUCCESS';\n\n }\n\n\n }\n\n }\n\n elseif ($status == 'approve'){\n\n $Info = FileInformation::where('ref_file', $fileid)->first();\n\n if($request->ajax()) {\n\n if(FileInformation::updateOrCreate(\n ['ref_file' => $fileid ],\n [\n\n 'is_deposit_received' => $Info->holder_is_deposit_received ,\n 'file_price' => $Info->holder_file_price ,\n 'much_received' => $Info->holder_much_received ,\n 'who_received' => $Info->holder_who_received ,\n 'other_receiver' => $Info->holder_other_receiver ,\n\n 'approved_is_deposit_received' => $Info->holder_is_deposit_received ,\n 'approved_file_price' => $Info->holder_file_price ,\n 'approved_much_received' => $Info->holder_much_received ,\n 'approved_who_received' => $Info->holder_who_received ,\n 'approved_other_receiver' => $Info->holder_other_receiver ,\n\n 'approved_by' => auth()->user()->type . ' User Name: '.\n auth()->user()->name . ' ' .\n auth()->user()->last_name .'<br>'.\n 'User Email: ' . auth()->user()->email .'<br>'.\n 'Submission Date/Time: ' . Carbon::now(),\n\n 'status' => 'completed' ,\n\n ]\n )){\n\n echo 'SUCCESS';\n\n }\n\n\n }\n\n }\n\n elseif ($status == 'reject'){\n\n $Info = FileInformation::where('ref_file', $fileid)->first();\n\n if($request->ajax()) {\n\n if(FileInformation::updateOrCreate(\n ['ref_file' => $fileid ],\n [\n\n\n 'rejected_is_deposit_received' => $Info->holder_is_deposit_received ,\n 'rejected_file_price' => $Info->holder_file_price ,\n 'rejected_much_received' => $Info->holder_much_received ,\n 'rejected_who_received' => $Info->holder_who_received ,\n 'rejected_other_receiver' => $Info->holder_other_receiver ,\n\n 'rejected_by' => auth()->user()->type . ' User Name: '.\n auth()->user()->name . ' ' .\n auth()->user()->last_name .'<br>'.\n 'User Email: ' . auth()->user()->email .'<br>'.\n 'Rejection Date/Time: ' . Carbon::now() ,\n\n\n 'status' => 'completed' ,\n\n ]\n )){\n\n echo 'SUCCESS';\n\n }\n\n\n }\n\n\n }\n\n }\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "5d8911c9a4d78f654dfc9bd1a8846313", "score": "0.54627675", "text": "public function postEdit(Request $request){\n //get channel id\n $channel_id = $request->input('post_id');\n //channel details by it's id\n $channel_details = $this->channel_model->getChannelById($channel_id);\n $projects = $this->commonGetProjects(); //projects\n //channel edit view with channel and project details\n return view('channels.channel_form_partial', compact('data','channel_details', 'projects'));\n }", "title": "" }, { "docid": "169daebe8690dcce28e6751b7f7c7944", "score": "0.5461064", "text": "public function postEditar()\n {\n if ( Request::ajax() ) {\n $regex='regex:/^([a-zA-Z .,ñÑÁÉÍÓÚáéíóú]{2,60})$/i';\n $required='required';\n $reglas = array(\n 'nombre' => $required.'|'.$regex,\n );\n\n $mensaje= array(\n 'required' => ':attribute Es requerido',\n 'regex' => ':attribute Solo debe ser Texto',\n );\n\n $validator = Validator::make(Input::all(), $reglas, $mensaje);\n\n if ( $validator->fails() ) {\n return Response::json(\n array(\n 'rst'=>2,\n 'msj'=>$validator->messages(),\n )\n );\n }\n $tiporespuestaId = Input::get('id');\n $tipoRespuesta = TipoRespuesta::find($tiporespuestaId);\n $tipoRespuesta['nombre'] = Input::get('nombre');\n $tipoRespuesta['tiempo'] = Input::get('tiempo');\n $tipoRespuesta['estado'] = Input::get('estado');\n $tipoRespuesta['usuario_updated_at'] = Auth::user()->id;\n $tipoRespuesta->save();\n if (Input::get('estado') == 0 ) {\n //actualizando a estado 0 segun\n DB::table('tipos_respuesta_detalle')\n ->where('tipo_respuesta_id', $tiporespuestaId)\n ->update(array(\n 'estado' => 0,\n 'usuario_updated_at' => Auth::user()->id\n ));\n }\n return Response::json(\n array(\n 'rst'=>1,\n 'msj'=>'Registro actualizado correctamente',\n )\n );\n }\n }", "title": "" }, { "docid": "36bed31589820bd4652c44223f65e97d", "score": "0.54607016", "text": "public function edit(Request $request)\n {\n if(\\Request::ajax()){\n $messages = [\n\n 'name_trade_mark.required' =>__('Name TradeMark: Required'),\n 'name_trade_mark.unique' =>__('Name TradeMark already exists'), \n 'name_trade_mark.max' =>__('Name TradeMark: Unsupported value length') \n\n ];\n\n $validator = Validator::make($request->all(), [\n 'name_trade_mark' => 'required|max:200|unique:trade_marks,name_trade_mark,'.$request->id,\n\n ], $messages);\n\n if ($validator->fails()) {\n $result['title'] = __('Trade Marks');\n $result['message'] = '';\n foreach ($validator->errors()->all() as $key => $value) {\n $result['message'] .= $value.'<br/>';\n }\n $result['data'] = null;\n $result['type_message'] = 'error';\n $result['redirect'] = route('trade_marks');\n }else{\n try{\n $TradeMarktUpdate = TradeMark::find($request->id);\n $TradeMarktUpdate->name_trade_mark = $request->name_trade_mark;\n $TradeMarktUpdate->user_id = Auth::user()->id;\n $TradeMarktUpdate->date_register = date(\"Y-m-d H-i-s\");\n $TradeMarktUpdate->ip = $request->ip();\n $TradeMarktUpdate->save();\n\n $result['status'] = 1;\n $result['title'] = __('Trade Marks');\n $result['message'] = __('Updated');\n $result['type_message'] = 'success';\n $result['redirect'] = route('trade_marks');\n\n } catch (Exception $e) {\n\n $result['status'] = 0;\n $result['title'] = __('Trade Marks');\n $result['message'] = $e->getMessage();\n $result['type_message'] = 'error';\n $result['redirect'] = route('trade_marks');\n }\n }\n return $result; \n }else{\n return Redirect::to('home');\n }\n }", "title": "" }, { "docid": "e3a3f40151983f8c0f60e588c3744e34", "score": "0.5460265", "text": "public function getEdit(Request $request)\n {\n if($_GET['type']=='newsletter') $trang='newsletter';\n else if($_GET['type']=='doi-tac') $trang='đối tác';\n else if($_GET['type']=='cam-nhan') $trang='cảm nhận khách hàng';\n else if($_GET['type']=='chuyen-muc') $trang='banner chuyên mục';\n else $trang ='hình ảnh';\n\n if(!empty($_GET['type'])){\n $com=$_GET['type'];\n }else{\n $com='';\n }\n $id= Request::get('id');\n //Tìm article thông qua mã id tương ứng\n $data = NewsLetter::find($id);\n if(!empty($data)){\n if(Request::get('hienthi')>0){\n if($data->status == 1){\n $data->status = 0; \n }else{\n $data->status = 1; \n }\n $data->update();\n return redirect('backend/newsletter?type='.$com)->with('status','Cập nhật thành công !');\n }\n if(Request::get('noibat')>0){\n if($data->noibat == 1){\n $data->noibat = 0; \n }else{\n $data->noibat = 1; \n }\n $data->update();\n return redirect('backend/newsletter?type='.$com)->with('status','Cập nhật thành công !');\n }\n $news = NewsLetter::select('stt')->orderBy('id','asc')->get()->toArray();\n // Gọi view edit.blade.php hiển thị bải viết\n return view('admin.newsletter.edit',compact('data','news','id','trang'));\n }else{\n return redirect('backend/newsletter?type='.$com)->with('status','Dữ liệu không có thực !');\n }\n \n }", "title": "" }, { "docid": "01a703785ffabebe67da32ac7e31d20b", "score": "0.54545176", "text": "public function postItemUpdateAjax(Request $request, $id) {\n\n\t\t$item = Item::withTrashed()->find($id);\n\n\t\t//$item->title = request('title');\n\t\t$item->text = request('text');\n\t\t$item->video = request('video');\n\t\t$item->published_at = request('published_at');\n\t\t$item->image = request('image');\n\t\t$item->image_src = request('image_src');\n\t\t$item->link = request('link');\n\t\t$item->slug_title = request('slug_title');\n\t\t$item->tags_str = request('tags_str');\n\t\t$item->recipients_str = request('recipients_str');\n\t\t$item->template = request('template');\n\t\tif(request('deleted_at')) {\n\t\t\t$item->deleted_at = \\Date::now();\n\t\t} else {\n\t\t\t$item->deleted_at = null;\n\t\t}\n\t\t$item->rss = request('rss');\n\t\t$item->is_blog = request('is_blog');\n\t\t\n\t\t// title\n\t\tif(request('slug_title') == null) {\n\t\t\tif($item->slug_title != null) {\n\t\t\t\t// Slug has been removed, not empty before\n\t\t\t\t$item->slug_title = null;\n\t\t\t\t$item->title = request('title');\n\t\t\t\t$item->slug = Thinker::uniqueSlugWithTableAndItem(Folio::table('items'), $item);\n\t\t\t} else {\n\t\t\t\t// Slug is empty, and was empty before\n\t\t\t\tif($item->title != request('title')) {\n\t\t\t\t\t$item->title = request('title');\n\t\t\t\t\t$item->slug = Thinker::uniqueSlugWithTableAndItem(Folio::table('items'), $item);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$item->slug = request('slug_title');\n\t\t\t$item->title = request('title');\n\t\t\tif($item->slug_title != request('slug_title')) {\n\t\t\t\t// Slug has been edited\n\t\t\t\t$item->slug_title = request('slug_title');\n\t\t\t}\n\t\t}\n\n\t\t// ..\n\t\tif(Thinker::IsInstagramPostURL($item->image)) {\n\t\t\t$item->image = Thinker::InstagramImageURL($item->image);\n\t\t}\n\t\tif(Thinker::IsInstagramPostURL($item->image_src)) {\n\t\t\t$item->image_src = Thinker::InstagramImageURL($item->image_src);\n\t\t}\n\t\tif($item->template == \"null\") {\n\t\t\t$item->template = null;\n\t\t}\n\t\tif ($item->tags_str != '') {\n\t\t\t$item->retag(explode(\",\", $item->tags_str));\n\t\t} else {\n\t\t\t$item->untag();\n\t\t}\n\n\t\t// Recipients\n\t\t$item->recipients()->delete();\n\t\tif($item->recipients_str != NULL)\n\t\t{\n\t\t\tforeach($item->recipientsArray() as $recipient)\n\t\t\t{\n\t\t\t$item->recipients()->save(new Recipient([\"twitter\" => $recipient]));\n\t\t\t}\n\t\t}\n\n\t\t$item->save();\n\n\t\treturn response()->json([\n\t\t\t'message' => 'Post updated successfully!',\n\t\t\t'path' => '/'.$item->path()\n\t\t], 200);\n\n\t}", "title": "" }, { "docid": "cdd57d998409e5632cbba3d4e4c7e060", "score": "0.5453591", "text": "public function cargo(Request $request,$id){ \n if($request->ajax()){\n $carbon=Carbon::now();\n $users=User::find($id);\n $users->type=$request->type; \n $users->updated_at=$carbon; \n $users->save();\n return response()->json([\n \"message\" => \"Se realizo correctamente\"\n ]); \n } \n }", "title": "" }, { "docid": "eae76bef7e2be5a4658085515971baad", "score": "0.54532725", "text": "public function update(Request $request){\r\n\r\n $tallerEditar = Taller::find($request->codigo);\r\n $tallerNombre = Taller::where('nombre', $request->nombre)->first();\r\n\r\n if (!isset($tallerEditar)){\r\n return response()->json(['status' => 'error' ,'msg' => Mensaje::$tallerErrorCodigoNoEncon]);\r\n }\r\n\r\n if(isset($tallerNombre) && $tallerNombre != $tallerEditar){\r\n return response()->json(['status' => 'error', 'msg' => Mensaje::$tallerErrorNombreDupli]);\r\n }\r\n\r\n if($request->codigo == $request->requisito)\r\n return response()->json(['status' => 'error' ,'msg' => Mensaje::$tallerErrorRequisito ]);\r\n\r\n $tallerEditar->nombre = $request->nombre;\r\n $tallerEditar->descripcion = $request->descripcion;\r\n $tallerEditar->modulo = $request->modulo;\r\n\r\n if($request->requisito != \"\") //si el request no tiene requisito , no se coloca para no afectar query\r\n $tallerEditar->requisito = $request->requisito;\r\n else\r\n $tallerEditar->requisito = null;\r\n\r\n $tallerEditar->save();\r\n $tallerEditar->moduloNombre = Modulos::find($tallerEditar->modulo)->nombre; //agregar el nombre del modulo\r\n\r\n //Agregar el nombre del requisito en dado caso que exista.\r\n $requisito = Taller::find($request->requisito);\r\n $tallerEditar->requisitoNombre = (!isset($requisito)) ? \"\"\r\n :$requisito->nombre.\" (\".$requisito->codigo.\")\";\r\n\r\n return response()->json(['status' => 'ok', 'msg' => Mensaje::$tallerEditaOk, 'content' => $tallerEditar->toJson()]);\r\n }", "title": "" }, { "docid": "3c5a04d239030173452e5f9c6b0379d1", "score": "0.54511833", "text": "public function edit($id){\n $user = Auth::user()->admin;\n\n if($user == 0)\n {\n return redirect('home');\n }\n\n else\n {\n\n\n $book_list = book_list::find($id);\n\n\n\n\n $genre_lists = genre_list::all();\n \n $section_lists = section_list::all(); \n\n\n\n\n return view('edit')->with(\"book_list\", $book_list)->with(\"genre_lists\", $genre_lists)->with(\"section_lists\",$section_lists);\n\n\n\n }\n\n\n\n\n}", "title": "" }, { "docid": "82ef71b9eb13f75af2717eec52d63aee", "score": "0.5442404", "text": "protected function edit_item($request){\n $error = array();\n $ri = inventory::where('item_id',$request->id)->first();\n if($ri->item_name !== $request->item_name){\n $validator = Validator::make($request->all(),[\n 'item_name' => 'required|unique:inventory',\n ]);\n if($validator->fails()) :\n foreach($validator->errors()->getMessages() as $validationErrors):\n if (is_array($validationErrors)) {\n foreach($validationErrors as $validationError):\n $error[] = $validationError;\n endforeach;\n } else {\n $error[] = $validationErrors;\n }\n endforeach;\n endif;\n\n }\n\n $validator = Validator::make($request->all(),[\n 'item_quantity' => 'required|int'\n ]);\n if($validator->fails()) :\n foreach($validator->errors()->getMessages() as $validationErrors):\n if (is_array($validationErrors)) {\n foreach($validationErrors as $validationError):\n $error[] = $validationError;\n endforeach;\n } else {\n $error[] = $validationErrors;\n }\n endforeach;\n endif;\n \n\n if(count($error)===0){\n unset($error);\n //update inventory item\n if($ri->item_name !== $request->item_name){\n $ri->item_name = $request->item_name;\n }\n $ri->item_description = $request->item_description;\n $ri->item_quantity = $request->item_quantity;\n $ri->update();\n\n //retrieved all inventory items\n $inv_items = inventory::orderBy('created_at','asc')->orderBy('updated_at','asc')->take(200)->get();\n \n return array( 'success' => true, 'items' => $inv_items );\n }else{\n $str = '<ul class=\"c_red padding_zero margin_zero menu\">';\n foreach($error as $e ){\n $str.= '<li>'.$e.'</li>';\n }\n $str.='</ul>';\n\n return array('success' => false, 'message' => $str );\n }\n }", "title": "" }, { "docid": "2d1f4b3e271a9173a8c87428b8868735", "score": "0.5438672", "text": "public function editReSub(Request $request) {\n\t\t\t$post = $request->all();\n\t\t $idReEdit=$post['idRe'];\n\t\t $txtReEdit=$post['txtRe'];\n\t\t $userIdRe=Auth::user()->id;\n\t\t $ReEdit = array(\n\t\t\t\t\t'textReviewOff' => $txtReEdit,\n\t\t\t\t);\n\t\t\t$reUpd = DB::table('offerReview')->where('idReviewOff', $idReEdit)->where('userIdReviewOff', $userIdRe)->update($ReEdit);\n\n\t\t\t//-- Query Check(Start)\n\t\t\tif($request->ajax()){\n\t if($reUpd>0){\n\t\t\t\t\t$reviewNew[] = array(\n\t\t\t\t\t\t'textReNew' => $txtReEdit,\n\t\t\t\t\t\t'idReNew' => $idReEdit\n\t\t\t\t\t);\n\t return response()->json([\n\t \t'reviewNew' => $reviewNew\n\t ]);\n\t } \n\t }\n\t\t\t//-- Query Check(End)\n\t\t}", "title": "" }, { "docid": "a9d0a637c0cb6362874a197f6f121693", "score": "0.5438273", "text": "public function getRequestEdit($id) {\n\n $services = Service::getServiceDesc();\n\n try {\n $request = Svcrequest::findOrFail($id);\n\n }\n catch(exception $e) {\n return Redirect::to('/requests')->with('flash_message', 'Request not found');\n }\n\n return View::make('requests_edit')\n ->with('request', $request)\n ->with('services',$services);\n\n\n }", "title": "" }, { "docid": "c77f6e4ed8902fffa8d8aa7ca4140b52", "score": "0.543801", "text": "public function postEdit(Request $request){\n $input = Input::all();\n\n $id = $input['id'];\n $data = null;\n\n if(isset($id)) {\n $data = MasterData::find($id);\n }\n $rules = array(\n 'type' => 'required',\n 'name' => 'required',\n 'value' => 'required',\n 'sortorder' => 'required|numeric',\n 'status' => 'required|numeric'\n );\n\n $this->validate($request, $rules);\n $input = $request->all();\n // dd($data);\n $data = MasterData::updateOrCreate(array('id' => $id), $input);\n// if (Cache::has($data->type))\n// {\n// Cache::forget($data->type);\n// }\n session()->flash('flash_message','MasterData Details were successfully saved!');\n\n $redirectPath = 'admin/masterdata';\n return Redirect::to($redirectPath)->withInput();\n }", "title": "" }, { "docid": "315e1f3b153d03b46ec035ba2c48d095", "score": "0.54374486", "text": "public function feitotodo(Request $request)\n {\n $todolist= todolist::find($request->id);\n $todolist->feito=1;\n $todolist->save();\n return Redirect::back()->with('Success', 'Nota Atualizada')->withInput();\n }", "title": "" }, { "docid": "f3851a49b5f5cb8be3a511a634b9ae1b", "score": "0.54344517", "text": "public function update(Request $request) {\n// $data['register'] = notificationModel::where('notificationName','register')->first();\n \n $gister=['content'=>$request->get('register')];\n $data['register'] = notificationModel::updateOrCreate(['notificationName' => 'register'], $gister); \n $gister=['content'=>$request->get('aprove')];\n $data['aprove'] = notificationModel::updateOrCreate(['notificationName' => 'aprove'], $gister); \n $gister=['content'=>$request->get('addsupplier')];\n $data['add_supplier'] = notificationModel::updateOrCreate(['notificationName' => 'add_supplier'], $gister); \n $gister=['content'=>$request->get('claim_profile')];\n $data['claim_profile'] = notificationModel::updateOrCreate(['notificationName' => 'claim_profile'], $gister); \n \n $gister=['content'=>$request->get('claim_profile_admin')];\n// print_r($gister);exit();\n $data['claim_profile_admin'] = notificationModel::updateOrCreate(['notificationName' => 'claim_profile_admin'], $gister); \n \n $gister=['content'=>$request->get('contactus')];\n// print_r($gister);exit();\n $data['contactus'] = notificationModel::updateOrCreate(['notificationName' => 'contactus'], $gister); \n \n $gister=['content'=>$request->get('d_membership_request')];\n// print_r($gister);exit();\n $data['d_membership_request'] = notificationModel::updateOrCreate(['notificationName' => 'd_membership_request'], $gister); \n \n $gister=['content'=>$request->get('duplicate_company')];\n// print_r($gister);exit();\n $data['duplicate_company'] = notificationModel::updateOrCreate(['notificationName' => 'duplicate_company'], $gister); \n \n $gister=['content'=>$request->get('send_message')];\n// print_r($gister);exit();\n $data['send_message'] = notificationModel::updateOrCreate(['notificationName' => 'send_message'], $gister); \n \n $gister=['content'=>$request->get('rest_password')];\n// print_r($gister);exit();\n $data['rest_password'] = notificationModel::updateOrCreate(['notificationName' => 'rest_password'], $gister); \n \n $gister=['content'=>$request->get('qoute_accepted_buyer')];\n// print_r($gister);exit();\n $data['qoute_accepted_buyer'] = notificationModel::updateOrCreate(['notificationName' => 'qoute_accepted_buyer'], $gister); \n \n $gister=['content'=>$request->get('qoute_accepted_supplier')];\n// print_r($gister);exit();\n $data['qoute_accepted_supplier'] = notificationModel::updateOrCreate(['notificationName' => 'qoute_accepted_supplier'], $gister); \n \n $gister=['content'=>$request->get('qoute_invitation')];\n// print_r($gister);exit();\n $data['qoute_invitation'] = notificationModel::updateOrCreate(['notificationName' => 'qoute_invitation'], $gister); \n \n $gister=['content'=>$request->get('qoute_receive')];\n// print_r($gister);exit();\n $data['qoute_receive'] = notificationModel::updateOrCreate(['notificationName' => 'qoute_receive'], $gister); \n \n $gister=['content'=>$request->get('user_create')];\n// print_r($gister);exit();\n $data['user_create'] = notificationModel::updateOrCreate(['notificationName' => 'user_create'], $gister); \n \n \n $gister=['content'=>$request->get('request_approve')];\n// print_r($gister);exit();\n $data['request_approve'] = notificationModel::updateOrCreate(['notificationName' => 'request_approve'], $gister); \n \n \n $gister=['content'=>$request->get('request_rejected')];\n// print_r($gister);exit();\n $data['request_rejected'] = notificationModel::updateOrCreate(['notificationName' => 'request_rejected'], $gister); \n \n $gister=['content'=>$request->get('review')];\n// print_r($gister);exit();\n $data['review'] = notificationModel::updateOrCreate(['notificationName' => 'review'], $gister); \n \n \n $gister=['content'=>$request->get('service_request_created')];\n// print_r($gister);exit();\n $data['service_request_created'] = notificationModel::updateOrCreate(['notificationName' => 'service_request_created'], $gister); \n \n $gister=['content'=>$request->get('service_request_created_emil')];\n// print_r($gister);exit();\n $data['service_request_created_emil'] = notificationModel::updateOrCreate(['notificationName' => 'service_request_created_emil'], $gister); \n \n \n $gister=['content'=>$request->get('quotes_left')];\n// print_r($gister);exit();\n $data['quotes_left'] = notificationModel::updateOrCreate(['notificationName' => 'quotes_left'], $gister); \n \n \n $gister=['content'=>$request->get('registered_email')];\n// print_r($gister);exit();\n $data['registered_email'] = notificationModel::updateOrCreate(['notificationName' => 'registered_email'], $gister); \n \n \n $gister=['content'=>$request->get('request_edit')];\n// print_r($gister);exit();\n $data['request_edit'] = notificationModel::updateOrCreate(['notificationName' => 'request_edit'], $gister); \n \n $gister=['content'=>$request->get('supplier_invoice')];\n// print_r($gister);exit();\n $data['supplier_invoice'] = notificationModel::updateOrCreate(['notificationName' => 'supplier_invoice'], $gister); \n \n \n $gister=['content'=>$request->get('refund_user')];\n// print_r($gister);exit();\n $data['refund_user'] = notificationModel::updateOrCreate(['notificationName' => 'refund_user'], $gister); \n \n \n $gister=['content'=>$request->get('refund_user_admin')];\n// print_r($gister);exit();\n $data['refund_user_admin'] = notificationModel::updateOrCreate(['notificationName' => 'refund_user_admin'], $gister); \n \n \n $gister=['content'=>$request->get('respond_to_request')];\n// print_r($gister);exit();\n $data['respond_to_request'] = notificationModel::updateOrCreate(['notificationName' => 'respond_to_request'], $gister); \n \n \n// print_r($request->all()); exit();\n \n if ($request->file('template_file') != null) {\n $fileName = saveOrReplaceFile(\"img/notification_image\", $request->file('template_file'), \"\", 1, \"2016-09-06\");\n// print_r($fileName); exit();\n// $request->merge(array('template_file' => $fileName));\n $gister=['template_image'=>$fileName,'created_at'=>'2016-09-06'];\n $data['template_file'] = notificationModel::updateOrCreate(['notificationName' => 'template_image'], $gister); \n if (!empty($userDetailsArray['template_file']) && \n File::exists(public_path(\"img/notification_image/\".getFolderStructureByDate(\"2016-09-06\").\"/\"\n .$userDetailsArray['template_file']))) {\n File::delete(\"img/notification_image/\".getFolderStructureByDate($request->get('created_at')).\"/\".$userDetailsArray['template_file']);\n }\n }\n \n \n \n// print_r($data);exit;\n return redirect(\"admin-panel/notificationContent\")->with('message', 'Notifications are Updated');\n }", "title": "" }, { "docid": "191b3661bbf80ad0d3de29dc6d070a1e", "score": "0.5431994", "text": "public function edit($id)\n {\n\n \n }", "title": "" }, { "docid": "ee470f4e42003be58b658b89aeef58c9", "score": "0.54282653", "text": "public function edit( )\n {\n //\n }", "title": "" }, { "docid": "0455401d71da0092720a0cfc6ab0f961", "score": "0.5425125", "text": "public function edit($id)\n {\n \n }", "title": "" }, { "docid": "0455401d71da0092720a0cfc6ab0f961", "score": "0.5425125", "text": "public function edit($id)\n {\n \n }", "title": "" }, { "docid": "0455401d71da0092720a0cfc6ab0f961", "score": "0.5425125", "text": "public function edit($id)\n {\n \n }", "title": "" }, { "docid": "0455401d71da0092720a0cfc6ab0f961", "score": "0.5425125", "text": "public function edit($id)\n {\n \n }", "title": "" }, { "docid": "e7072724008a63931bd671f31c5b374e", "score": "0.5422947", "text": "public function vieweditSTache(Request $request,$id)\n {\n $user = Auth::user()->id;\n $tache = Liste::where('id',$id)->where('user_id',$user)->get();\n\n\n if($tache->isEmpty())\n {\n return redirect('/list')->with('flash_message_bad','Ceci n\\'est pas votre sous-tache');\n }\n else\n {\n return view('/updateSousTache',compact('id'));\n }\n\n }", "title": "" }, { "docid": "0dc8f421f12fa01785fa97e2a6cd9045", "score": "0.5421931", "text": "public function updateContact(Request $request){\n if($request->ajax()):\n $fullName = $request->fullName;\n $email = $request->email;\n //$ageGroup = $request->ageGroup;\n //$country = $request->country;\n $newsletter = $request->newsletter;\n $phone = $request->numberPhone;\n $subject = $request->subject;\n $message = $request->message;\n //$titleIntro = $request->titleIntro;\n //$firstNameIntro = $request->firstNameIntro;\n //$lastNameIntro = $request->lastNameIntro;\n $phoneSystem = phone();\n $mailSystem = mailSystem();\n $domain = $request->getHost();\n // content\n if(!empty($fullName) && !empty($email) && !empty($phone) && !empty($subject) && !empty($message)) : \n $h3 = 'font-size: 16px;line-height:31px;background-color:#666;border-radius: 10px; margin: 0;color: #fff;text-align: center; ';\n $fleft = 'float: left; width: 100%;';\n $overflow = 'overflow: hidden';\n $wrapper = 'font-size: 15px; line-height: 21px; color: #666; font-family: Arial; background-color: #fff; width: 600px; margin: 0 auto; -webkit-overflow-scrolling: touch; overflow: auto;';\n $header = 'width: 100%;';\n $logo ='display: block';\n $container_fluid = 'padding: 0 40px;';\n $box_modal = 'padding: 10px; text-align: left;';\n $box_modal_ul = 'padding-left: 25px; margin: 0;';\n $box_modal_p_li = 'color: #555; position: relative; margin-left: 0;'; \n $about_box = 'background-color: #f1f1f1;padding:18px 34px 44px; text-align: center; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px;';\n $about_box_ul = 'padding-left:0 ;list-style: none; margin: 0; color: #7e7e7e;';\n $about_box_info_li = 'margin-bottom: 22px; display: block; margin-left: 0;';\n $list_button = 'margin-top: 25px;';\n $list_button_2 = 'margin-bottom: 25px; background-color:#f1f1f1; padding: 20px 0; border-radius:10px;';\n $list_button_li = 'text-align: center; margin: 0 0 15px 0;';\n $list_button_li_right = 'text-align: center; margin: 0 ;';\n $list_button_li_a = 'display: block; width: 300px; max-width: 100%; line-height: 33px; background-color: #e73361;color: #fff; border-radius: 10px; text-decoration: none; margin: 0 auto;';\n $list_button_li_a_right = 'display: block; width: 300px; max-width: 100%; line-height: 33px;background-color: #34e6d0;color: #fff; border-radius: 10px; text-decoration: none; margin: 0 auto;';\n $red_color = 'color: #e73362';\n $button_group = 'background-color: #f1f1f1; margin-bottom: 50px; border-radius: 10px;';\n $share_box = 'background-color: #f1f1f1; border-top-left-radius: 10px; border-top-right-radius: 10px;';\n $share_h3 = 'color: #666; font-size: 14px; line-height: 20px; margin: 19px 0 25px; text-align: center;';\n $share_ul = 'overflow: hidden;';\n $share_li = 'float:left; width: 20%; max-width: 100%; max-height: 100%; margin: 0 auto; box-sizing: border-box; margin-bottom: 15px;';\n $share_li_a = 'width: 30px; height: 30px; line-height: 30px; text-align: center; max-width: 100%; margin: 0 auto; background-color: #e73361; border-radius: 5px; display: block;';\n $footer = 'background-color: #666; clear: both;';\n $footer_ul = 'overflow:hidden; padding: 20px 0;';\n $footer_li = 'width: 50%; float: left; color: #fff; max-width: 100%; max-height: 100%; margin: 0 auto; box-sizing: border-box; text-align: center;';\n $footer_li_a = 'color: inherit; text-decoration: underline; font-size: 14px;';\n $footer_span = 'border-radius: 50%; width: 25px; height: 25px; line-height: 25px; text-align: center; background-color: #fff; display: inline-block; margin-right: 6px;'; \n $wrap_img = 'margin: 30px 0 25px; text-align: center;';\n $img = 'display: inline-block; max-width: 100%; height: auto; vertical-align: middle;'; \n $note = 'text-align: right; color: #666; margin-top: 10px; font-size: 11px; line-height: 18px';\n $onMouseOver = \"this.style.backgroundColor='#e73361'\";\n $onMouseOut = \"this.style.backgroundColor ='#d9d9d9'\";\n $content = '<div style=\"'. $wrapper .'\">';\n $content .= '<div style=\"'. $header . '\">';\n $content .= '<a href=\"'.route('home').'\" target=\"_blank\" style=\"'. $logo .'\"><img style=\"'.$img.'\" src=\"'.asset('public/images/email_icon/banner-mail.png').'\" alt=\"BiiGHoliday\"></a>';\n $content .= '</div> ';\n $content .= '<div style=\"'. $container_fluid .'\">'; \n $content .= '<div style=\"'. $about_box .'\">';\n $content .= '<ul style= \"'. $about_box_ul .'\">';\n $content .= '<li style=\"'. $about_box_info_li .'\">'.$fullName.'</li>';\n $content .= '<li style=\"color: #e62757; font-weight: bold;'. $about_box_info_li .' \">Greetings from BiiG Holiday !</li>';\n $content .= '<li style=\"'. $about_box_info_li .'\">Many thanks for your interest.</li>';\n $content .= '<li style=\"'. $about_box_info_li .'\">One of our travel consultants will contact you shortly to address <br/> your query.</li>';\n $content .= '<li style=\"'. $about_box_info_li .' margin-bottom:0;\">In the meantime. you can review your message as detailed below.</li>';\n $content .= '</ul>';\n $content .= '<ul style=\"'. $about_box_ul . $list_button .'\">';\n $content .= '<li style=\"'. $list_button_li .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">Send another request</a></li>';\n $content .= '<li style=\"'. $list_button_li_right .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a_right .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">View all tours</a></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div style=\"'. $wrap_img .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/base_fill_mail.png').'\" alt=\"bee\" style=\"'. $img .'\" />';\n $content .= '</div>';\n $content .= '<div style=\"margin-bottom: 50px\">';\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Your personal information</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Name: <span style=\"'. $red_color .'\"> '.$fullName.' </span></li>';\n //$content .= '<li style=\"'. $box_modal_p_li .'\">Age Group: <span style=\"'. $red_color .'\">'.$ageGroup.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Phone number: <span style=\"'. $red_color .'\"> '.$phone.' </span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Email: <a href=\"'.$email.'\" target=\"_blank\" style=\"'. $red_color .'\">'.$email.'</a></li>';\n //$content .= '<li style=\"'. $box_modal_p_li .'\">Country: <span style=\"'. $red_color .'\">'.$country.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Newsletter: <span style=\"'. $red_color .'\">'. $newsletter .'</span></li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '</div>';\n $content .= '<div>';\n $content .= '<h3 style=\"'. $h3 .'\">Your Message</h3>';\n $content .= '<div style=\"'. $box_modal .'\">';\n $content .= '<ul style=\"'. $box_modal_ul .'\">';\n $content .= '<li style=\"'. $box_modal_p_li .'\">Subject: <span style=\"'. $red_color .'\">'.$subject.'</span></li>';\n $content .= '<li style=\"'. $box_modal_p_li .'\"><span style=\"color: #666\">Message: </span> <p style=\"'. $red_color .'\">'.$message.'</p></li>';\n $content .= '</ul>';\n $content .='</div>';\n $content .= '</div>';\n // if($firstNameIntro != \"\" || $lastNameIntro != \"\" || $titleIntro != \"\"){\n // $content .= '<div>';\n // $content .= '<h3 style=\"'. $h3 .'\">Sponsorship</h3>';\n // $content .= '<div style=\"'. $box_modal .'\">';\n // $content .= '<ul style=\"'. $box_modal_ul .' padding-left: 17px;\">';\n // $content .= '<li style=\"'. $box_modal_p_li .'\">Are you recommended by an existing BiiG Holiday customer?: <span style=\"'. $red_color .'\">Yes</span></li>';\n // if($firstNameIntro != \"\" && $lastNameIntro != \"\" && $titleIntro != \"\" ){\n // $content .= '<li style=\"'. $box_modal_p_li .'\">Sponsored by: <span style=\"'. $red_color .'\">'. $titleIntro.$firstNameIntro .' '. $lastNameIntro .'</span></li>';\n // }elseif($firstNameIntro != \"\" && $lastNameIntro == \"\" && $titleIntro != \"\"){\n // $content .= '<li style=\"'. $box_modal_p_li .'\">Sponsored by: <span style=\"'. $red_color .'\">'. $titleIntro.$firstNameIntro .'</span></li>';\n // }elseif($firstNameIntro == \"\" && $lastNameIntro != \"\" && $titleIntro != \"\"){\n // $content .= '<li style=\"'. $box_modal_p_li .'\">Sponsored by: <span style=\"'. $red_color .'\">'. $titleIntro.$lastNameIntro .'</span></li>';\n // }elseif($firstNameIntro == \"\" && $lastNameIntro != \"\" && $titleIntro == \"\"){\n // $content .= '<li style=\"'. $box_modal_p_li .'\">Sponsored by: <span style=\"'. $red_color .'\">'. $firstNameIntro .' '. $lastNameIntro .'</span></li>';\n // }\n // $content .= '</ul>';\n // $content .= '</div>';\n // $content .= '</div>';\n // }else{\n // $content .= '<div>';\n // $content .= '<h3 style=\"'. $h3 .'\">Sponsorship</h3>';\n // $content .= '<div style=\"'. $box_modal .'\">';\n // $content .= '<ul style=\"'. $box_modal_ul .' padding-left: 17px;\">';\n // $content .= '<li style=\"'. $box_modal_p_li .'\">Are you recommended by an existing BiiG Holiday customer?: <span style=\"'. $red_color .'\">No</span></li>';\n // $content .= '</ul>';\n // $content .= '</div>';\n // $content .= '</div>';\n // }\n $content .='</div>'; \n $content .= '<ul style=\"'. $about_box_ul . $list_button_2 .'\">';\n $content .= '<li style=\"'. $list_button_li .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">Send another request</a></li>';\n $content .= '<li style=\"'. $list_button_li_right .'\"><a href=\"'.route('home').'\" style=\"'. $list_button_li_a_right .'\" onMouseOver=\"'. $onMouseOver .'\" onMouseOut=\"'. $onMouseOut .'\">View all tours</a></li>';\n $content .= '</ul>';\n $content .= '<div style=\"'. $share_box .'\">';\n $content .= '<h3 style=\"'. $share_h3 .'\">Follow us on</h3>';\n $content .= '<ul style=\"'. $about_box_ul . $share_ul .'\">';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://instagram.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/instagram.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://facebook.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/facebook.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://twitter.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/twitter.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://youtube.com/ target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/youtube.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '<li style=\"'. $share_li .'\">';\n $content .= '<a href=\"https://pinterest.com/\" target=\"_blank\" style=\"'. $share_li_a .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/pinterest.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</a>';\n $content .= '</li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '<div style=\"'. $footer .'\">';\n $content .= '<ul style=\"'. $about_box_ul . $footer_ul .'\">';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/phone.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</span>';\n $content .= 'Hotline Laos *';\n $content .= '<p><a href=\"tel:+856 20 9596 9226\" style=\"'. $footer_li_a .'\"><img src=\"'.asset('public/images/email_icon/laos-icon.png').'\" alt=\"\" style=\" margin-right: 5px; '. $img . '\" />+856 20 9596 9226</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/phone.png').'\" alt=\"\" style=\"'. $img . '\" />';\n $content .= '</span>';\n $content .= 'Hotline Vietnam *';\n $content .= '<p><a href=\"tel:+84 977 247 394\" style=\"'. $footer_li_a .'\"><img src=\"'.asset('public/images/email_icon/vietnam-icon.png').'\" alt=\"\" style=\" margin-right: 5px; '. $img . '\" />+84 977 247 394</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/envelope-small.png').'\" alt=\"\" style=\"'. $img .'\" />';\n $content .= '</span>';\n $content .= 'Email';\n $content .= '<p><a href=\"mailto:'.$mailSystem.'\" style=\"'. $footer_li_a .'\">'.$mailSystem.'</a></p>';\n $content .= '</li>';\n $content .= '<li style=\"'. $footer_li .'\">';\n $content .= '<span style=\"'. $footer_span .'\">';\n $content .= '<img src=\"'.asset('public/images/email_icon/global.png').'\" alt=\"\" style=\"'. $img .'\" />';\n $content .= '</span>';\n $content .= 'Website';\n $content .= '<p><a href=\"'.route('home').'\" style=\"'. $footer_li_a .'\">'. $domain .'</a></p>';\n $content .= '</li>';\n $content .= '</ul>';\n $content .= '</div>';\n $content .= '<p style=\"clear:both;'. $note .'\">* Call us free on whatsapp. Messenger. Skype</p>';\n $content .= '</div>';\n //mail admin\n // $data = array( 'email' => $email, 'from' => $mailSystem, 'fullName' => $fullName, 'content'=> $content);\n // Mail::send( 'mails.admin.contact', compact('data'), function( $message ) use ($data){\n // $message->to($data['from'])\n // ->from( $data['email'], $data['fullName'] )\n // ->subject('[Contact to BiigHoliday] - '.$data['fullName']);\n // });\n $data = array( 'email' => $email, 'from' => '[email protected]', 'fullName' => $fullName, 'content'=> $content);\n Mail::send( 'mails.admin.contact', compact('data'), function( $message ) use ($data){\n $message->to($data['from'])\n ->from( $data['email'], '[Sonasia Holiday]' )\n ->subject('[Contact to BiigHoliday] - '.$data['fullName']);\n });\n //mail customer\n $data = array( 'email' => $email, 'from' => $email, 'fullName' => $fullName, 'content' => $content);\n Mail::send( 'mails.contact', compact('data'), function( $message ) use ($data){\n $message->to($data['email'])\n ->from( $data['from'], '[Sonasia Holiday]')\n ->subject('[Biig] Thank you sent request');\n });\n endif;\n endif;\n }", "title": "" }, { "docid": "4c0a2e5be1edf38a893b6dbf2860ab53", "score": "0.54178274", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'client_id' => 'required',\n 'billing_type' => 'required',\n 'status' => 'required',\n 'fixed_rate' => 'required_if:billing_type,fixed',\n 'hourly_rate' => 'required_if:billing_type,hourly',\n 'start_date' => 'required',\n ]);\n\n if ($validator->fails()) {\n if($request->ajax()){ \n return response()->json(['result'=>'error','message'=>$validator->errors()->all()]);\n }else{\n return redirect()->route('projects.edit', $id)\n ->withErrors($validator)\n ->withInput();\n } \n }\n \n \n DB::beginTransaction();\n\n $company_id = company_id();\n\n $project = Project::where('id',$id)\n ->where('company_id',$company_id)\n ->first();\n $project->name = $request->input('name');\n $project->client_id = $request->input('client_id');\n $project->progress = $request->input('progress');\n $project->billing_type = $request->input('billing_type');\n\n if($project->status != $request->input('status')){\n $project->status = $request->input('status');\n create_log('projects', $project->id, _lang('وضعیت پروژه تغییر کرد').' - '.ucwords(str_replace('_',' ',$project->status)));\n }\n $project->fixed_rate = $request->input('fixed_rate');\n $project->hourly_rate = $request->input('hourly_rate');\n $project->start_date = $request->input('start_date');\n $project->end_date = $request->input('end_date');\n $project->description = $request->input('description');\n $project->user_id = Auth::id();\n $project->company_id = $company_id;\n \n $project->save();\n\n create_log('projects', $project->id, _lang('پروژه بروزرسانی شد'));\n\n $existing_members = ProjectMember::where('project_id', $project->id)->get();\n\n\n if(isset($request->members)){\n //Remove Project Members\n foreach($existing_members as $existing_member){\n if(! in_array($existing_member->user_id, $request->members)){\n $project_member = ProjectMember::find($existing_member->id);\n create_log('projects', $project->id, _lang('حذف').' '.$project_member->user->name.' '._lang('از پروژه'));\n $project_member->delete();\n }\n }\n\n //Store New Project Members\n foreach($request->members as $member){\n if(! $existing_members->contains('user_id', $member)){\n //Added New Member\n $project_member = new ProjectMember();\n $project_member->project_id = $project->id;\n $project_member->user_id = $member;\n $project_member->save();\n\n create_log('projects', $project->id, _lang('مربوط به').' '.$project_member->user->name);\n }\n \n }\n }else{\n $existing_members = ProjectMember::where('project_id', $project->id);\n $existing_members->delete();\n }\n\n if($project->client->user->id != null){\n Notification::send($project->client->user, new ProjectUpdated($project));\n }\n Notification::send($project->members, new ProjectUpdated($project));\n\n DB::commit();\n \n if(! $request->ajax()){\n return redirect()->route('projects.index')->with('success', _lang('با موفقیت بروزرسانی شد'));\n }else{\n return response()->json(['result'=>'success','action'=>'update', 'message'=>_lang('با موفقیت بروزرسانی شد'), 'data'=>$project, 'table' => '#projects_table']);\n }\n \n }", "title": "" }, { "docid": "ce8cf26d9c83fc07e22dcbca7c8cea3c", "score": "0.5409146", "text": "public function enquiry(Request $request)\n {\n if (!empty($request->id) && $request->type == 'del') { \n $response = MyFun::update(['active'=>'del'], 'tblquery', ['id' => $request->id]);\n if ($response) {\n \\Session::flash('success', RECORDDELETE);\n return redirect('admin/enquiry');\n }\n }\n $data = DB::table('tblquery')\n ->where('active','<>','del')\n ->orderBy('id', 'desc')\n ->get();\n return view('backend.enquiry',['data'=>$data]);\n }", "title": "" }, { "docid": "e329d40a686315d387b9a42929566e5f", "score": "0.5408953", "text": "public function update(Request $request)\n {\n\n\n\n }", "title": "" }, { "docid": "cdd114dd87e592dde86ba5f2c22f54ec", "score": "0.5407852", "text": "public function editAdmin(){\n \t$nipbaru = $_REQUEST['nipbaru'];\n\t\t$namabaru = $_REQUEST['namabaru'];\n\t\t$otoritasbaru = $_REQUEST['otoritasbaru'];\n\t\t$niplama = $_REQUEST['niplama'];\n\n\t\t$admin = Admin::find($niplama);\n\t\t$admin->admin_id = $nipbaru;\n\t\t$admin->nama = $namabaru;\n\t\t$admin->otoritas = $otoritasbaru;\n\t\t$saved = $admin->save();\n\n\t\tdd($saved);\n\n\t\treturn 'done';\n\n }", "title": "" }, { "docid": "9d5a78af9f2c44e87a3a7b84cdf26b68", "score": "0.5407495", "text": "public function edit()\n {\n //\n return response()->json([ 'status' => 404,'message' => 'Page Not Found.'], 404);\n }", "title": "" }, { "docid": "2dbfca85fe7bb3d9cddaed30fca7424c", "score": "0.5401804", "text": "public function update(Request $request)\n {\n \n }", "title": "" }, { "docid": "c6518e0d8bc1eb18802c3b4049a05a43", "score": "0.5400435", "text": "public function store(Request $request)\n {\n \n \n \n }", "title": "" }, { "docid": "c7c66b17a265eee02e27d70e9e302ab5", "score": "0.5397912", "text": "public function addAction(){\n// $response = new Phalcon\\Http\\Response();\n $user = User::getLogged($this->session->get('session_id'));\n if($user->_id){\n if($this->request->isGet() === true){\n\n } elseif($this->request->isPost() === true){\n// print_r($request->getPost());die;\n $snippet = new Snippet();\n $snippet->title = $this->request->getPost('title');\n $snippet->body = $this->request->getPost('body');\n $snippet->demo = $this->request->getPost('demo');\n $snippet->tags = trim($this->request->getPost('tags'));\n $snippet->save();\n return $this->response->redirect('snippets/' . $snippet->num);\n }\n } else{\n $this->session->set('back_url', 'add');\n return $this->response->redirect('user/auth');\n }\n\n }", "title": "" }, { "docid": "bd47465f1325e149bf59a71464816828", "score": "0.53972733", "text": "public function edit_todayexpand_form_action(Request $request,$id){\n\n\n if($request->isMethod('post')){\n\n $data = $request->all();\n\n Expend::where(['id'=>$id])->update(['expend_amount'=>$data['expend_amount'],'expend_details'=>$data['expend_details']]);\n\n\n return redirect('/today_expand')->with('flash_message_error','Today Expand Information option update successfully');\n\n\n }\n\n\n\n\n\n}", "title": "" } ]
f8048ce20e61d21776b2ce5348047f86
Registers custom taxonomy with WordPress
[ { "docid": "d02253a138040063da9287b799b037f6", "score": "0.7234253", "text": "private function registerTax() {\n $labels = array(\n 'name'\t\t\t\t=> esc_html__( 'Event Types', 'qode-music' ),\n 'singular_name'\t\t=> esc_html__( 'Event Type', 'qode-music' ),\n 'search_items'\t\t=> esc_html__( 'Search Event Types', 'qode-music' ),\n 'all_items'\t\t\t=> esc_html__( 'All Event Types', 'qode-music' ),\n 'parent_item'\t\t=> esc_html__( 'Parent Event Type', 'qode-music' ),\n 'parent_item_colon'\t=> esc_html__( 'Parent Event Type:', 'qode-music' ),\n 'edit_item'\t\t\t=> esc_html__( 'Edit Event Type', 'qode-music' ),\n 'update_item'\t\t=> esc_html__( 'Update Event Type', 'qode-music' ),\n 'add_new_item'\t\t=> esc_html__( 'Add New Event Type', 'qode-music' ),\n 'new_item_name'\t\t=> esc_html__( 'New Event Type Name', 'qode-music' ),\n 'menu_name'\t\t\t=> esc_html__( 'Event Types', 'qode-music' ),\n );\n\n register_taxonomy($this->taxBase, array($this->base), array(\n 'hierarchical'\t\t=> true,\n 'labels'\t\t\t=> $labels,\n 'show_ui'\t\t\t=> true,\n 'query_var'\t\t\t=> true,\n\t 'show_admin_column'\t=> true,\n 'rewrite'\t\t\t=> array( 'slug' => 'event-type' ),\n ));\n }", "title": "" } ]
[ { "docid": "369e3fbb2107b511b2d77639c6ea7597", "score": "0.8350937", "text": "public function create_custom_taxonomy() {\n register_taxonomy( $this->taxonomy, array_keys($this->object_type), $this->args );\n }", "title": "" }, { "docid": "5eb13629cd6f3cb42d9f6e390c7ece9a", "score": "0.82585293", "text": "public function register_custom_taxonomy() {\n if( !taxonomy_exists( $this->taxonomy_key ) ) {\n $args = array( 'hierarchical' => false,\n 'update_count_callback' => '_update_post_term_count',\n 'label' => false,\n 'query_var' => false,\n 'rewrite' => false,\n 'show_ui' => false\n );\n register_taxonomy( $this->taxonomy_key, 'post', $args );\n }\n }", "title": "" }, { "docid": "6548100318e9d7e0b3c669c339daf122", "score": "0.8169366", "text": "protected function register(): void\r\n\t{\r\n\t\tif (empty($this->properties['labels'])) {\r\n\t\t\t$this->labels();\r\n\t\t}\r\n\r\n\t\tif ($this->properties['rewrite'] === true) {\r\n\t\t\t$this->rewrite($this->name);\r\n\t\t}\r\n\r\n\t\t$object = register_taxonomy($this->name, $this->object_type, $this->properties);\r\n\r\n\t\tif (!is_wp_error($object)) {\r\n\t\t\t$this->initialize(get_taxonomy($this->name));\r\n\t\t}\r\n\r\n\t\t$this->properties = [];\r\n\t}", "title": "" }, { "docid": "960b847fc852e91cd7b2cab83bb267ea", "score": "0.8141551", "text": "function register_taxonomy() {\n\t\\register_taxonomy(\n\t\tTAXONOMY,\n\t\t\\array_keys( \\get_post_types() ),\n\t\t[\n\t\t\t'public' => false,\n\t\t\t'rewrite' => false,\n\t\t\t'show_in_rest' => false,\n\t\t]\n\t);\n}", "title": "" }, { "docid": "9dc68a4a97f376d8dc60b19cd7d56e04", "score": "0.8052912", "text": "function ath_taxonomy_register() {\n\tregister_taxonomy(ATH_TAXNAME, 'post',\n\t\tarray('label'=>_('Authors'), 'rewrite'=>array('slug'=>ATH_TAXNAME), 'query_var'=>ATH_TAXNAME, 'public'=>true)\n\t);\n}", "title": "" }, { "docid": "5cfa64f31ad10fc882550058ff2fad13", "score": "0.8026361", "text": "function register_taxonomies() {\n }", "title": "" }, { "docid": "78ffa9046a04c01dbb007aaef16e8e51", "score": "0.8019067", "text": "function register_taxonomies(){\n\t\t}", "title": "" }, { "docid": "b8ef531fe836e1cc1f3a58a294df5d93", "score": "0.8012331", "text": "function register_taxonomies(){\n\t\t\t}", "title": "" }, { "docid": "a86c73b99e2bff6a5dcd1b7a9c78f04f", "score": "0.79961884", "text": "function register_taxonomy()\n\t{\n\t\tregister_taxonomy($this->tax_slug, $this->slug, array(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => array(\n\t\t\t\t'name' => 'Locations',\n\t\t\t\t'singular_name' => 'Location',\n\t\t\t\t'search_items' => 'Search locations',\n\t\t\t\t'all_items' => 'All locations',\n\t\t\t\t'parent_item' => 'Parent location',\n\t\t\t\t'parent_item_colon' => 'Parent location:',\n\t\t\t\t'edit_item' => 'Edit location',\n\t\t\t\t'update_item' => 'Update location',\n\t\t\t\t'add_new_item' => 'Add new location',\n\t\t\t\t'new_item_name' => 'New location name',\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.7980936", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.7980936", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.7980936", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.7980936", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "34f9babbd19b4d7f3c5f1108bb2236ec", "score": "0.7972486", "text": "public function register() {\n\n\t\tregister_taxonomy(\n\t\t\tstrtolower( $this->tax_key ),\n\t\t\t$this->post_types,\n\t\t\t$this->options()\n\t\t);\n\t}", "title": "" }, { "docid": "e1bd185e993f440d9e513d6009d540cf", "score": "0.79572296", "text": "protected function register_taxonomy()\n {\n foreach ((object) $this->taxonomies as $tax) {\n\n // Cast array to an object\n $tax = (object) $tax;\n\n // Setup the taxonomy labels\n $labels = array(\n 'name' => __($tax->plural),\n 'singular_name' => __($tax->singular),\n 'search_items' => __('Search ' . $tax->plural),\n 'popular_items' => __('Popular ' . $tax->plural),\n 'all_items' => __('All ' . $tax->plural),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __('Edit ' . $tax->singular),\n 'update_item' => __('Update ' . $tax->singular),\n 'add_new_item' => __('Add New ' . $tax->singular),\n 'new_item_name' => __('New ' . $tax->singular),\n 'separate_items_with_commas' => __('Separate ' . strtolower($tax->plural) . ' with commas'),\n 'add_or_remove_items' => __('Add or remove ' . strtolower($tax->plural)),\n 'choose_from_most_used' => __('Most used ' . strtolower($tax->plural)),\n 'not_found' => __('No ' . strtolower($tax->plural) . ' found.'),\n 'menu_name' => __($tax->plural),\n );\n\n // Setup the taxonomy options\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array(\n 'slug' => str_replace(' ', '-', strtolower($this->group . '/') . strtolower($tax->singular)),\n 'with_front' => false\n ),\n );\n\n // Register the taxonomy\n $error = \\register_taxonomy(str_replace(' ', '-', strtolower($tax->plural)), strtolower($this->name), $args);\n\n // Register preset terms\n if (!empty($tax->terms)) {\n foreach ($tax->terms as $term) {\n\n // Cast $term array to object\n $term = (object) $term;\n\n \\wp_insert_term(\n $term->name, // Term name\n str_replace(' ', '-', strtolower($tax->plural)), // Term taxonomy\n array( // Term options\n 'alias_of' => $term->alias_of,\n 'description' => $term->description,\n 'parent' => $term->parent,\n 'slug' => $term->slug\n )\n );\n }\n }\n }\n }", "title": "" }, { "docid": "c61191f3cab82e8ded08d6148c81e28a", "score": "0.7945267", "text": "public function register_taxonomy() {\n\n\t\t\t// Array of taxomy name and label to register.\n\t\t\t$taxonomy = array( 'restaurants_type' => 'Restaurants Type', 'food_type' => 'Food Type' );\n\n\t\t\t/**\n\t\t\t * Filter to register more than one taxonomies.\n\t\t\t *\n\t\t\t * filter to register more than 1 taxonomy at a time by giving key and label of each\n\t\t\t * taxonomy in array.\n\t\t\t *\n\t\t\t * @since 0.1\n\t\t\t *\n\t\t\t * @param string $var Filter name.\n\t\t\t * @param array $args {\n\t\t\t * @type string $var key for taxonomy\n\t\t\t * @type string $var Label for taxonomy\n\t\t\t * }\n\t\t\t */\n\t\t\t$taxonomy = apply_filters( 'rt_restaurant_get_taxonomies_with_label', $taxonomy );\n\n\t\t\t$post_type = 'restaurants';\n\n\t\t\tforeach ( $taxonomy as $name => $label ) {\n\t\t\t\t$args = array(\n\t\t\t\t 'show_ui' => true,\n\t\t\t\t 'show_admin_column' => true,\n\t\t\t\t 'label' => $label\n\t\t\t\t);\n\n\t\t\t\t/**\n\t\t\t\t * Filter to change taxonomy arguments\n\t\t\t\t *\n\t\t\t\t * This filter allow user to change taxonomy arguments by passing arguments array in filter.\n\t\t\t\t *\n\t\t\t\t * @since 0.1\n\t\t\t\t *\n\t\t\t\t * @param string $var Filter name\n\t\t\t\t * @param array $args Array of arguments for taxonomy\n\t\t\t\t */\n\t\t\t\t$args = apply_filters( 'rt_restaurant_taxonomy_args', $args );\n\n\t\t\t\tregister_taxonomy( $name, $post_type, $args );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1a3677a29e5c67a8bf8891925ff37665", "score": "0.7808713", "text": "public function register_taxonomies() {\n }", "title": "" }, { "docid": "02742d4dda5c9e57a87f8291a7ac5663", "score": "0.7788884", "text": "function add_fruits_taxonomy_to_post(){\n $taxonomy = 'Fruits';\n //set the post types for the taxonomy\n $object_type = 'post';\n \n //populate our array of names for our taxonomy\n $labels = array(\n 'name' => 'Fruits',\n 'singular_name' => 'Fruit',\n 'search_items' => 'Search Fruits',\n 'all_items' => 'All Fruits',\n 'parent_item' => 'Parent Fruits',\n 'parent_item_colon' => 'Parent Fruits:',\n 'update_item' => 'Update Fruits',\n 'edit_item' => 'Edit Fruits',\n 'add_new_item' => 'Add New Fruits', \n 'new_item_name' => 'New Member Fruits',\n 'menu_name' => 'Fruits'\n );\n \n //define arguments to be used \n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'show_ui' => true,\n 'how_in_nav_menus' => true,\n 'public' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'Fruits')\n );\n \n //call the register_taxonomy function\n register_taxonomy($taxonomy, $object_type, $args); \n}", "title": "" }, { "docid": "869bd2167f040c98468b25c3a857f57c", "score": "0.7771413", "text": "public function register_taxonomies() {\n\t}", "title": "" }, { "docid": "cc072211898c66a79ed55082fb752f04", "score": "0.77702785", "text": "function create_my_taxonomies() {\n register_taxonomy(\n 'test_post_test_blog',\n 'test_post',\n array(\n 'labels' => array(\n 'name' => 'Blog',\n 'add_new_item' => 'Add New Blog',\n 'new_item_name' => \"New Blog\"\n ),\n 'show_ui' => true,\n 'show_tagcloud' => false,\n 'hierarchical' => true\n )\n );\n}", "title": "" }, { "docid": "f3152b8344038840064dc68760ca77db", "score": "0.7749532", "text": "public function register() {\n // Add new taxonomy, make it hierarchical (like categories)\n $name = ucfirst($this->get_taxonomy_name());\n $label = (isset($this->label_name) ? $this->label_name : $this->taxonomy_name);\n $singular = (isset($this->singular_name) ? $this->singular_name : $this->taxonomy_name);\n $labels = array(\n 'name' => _x($label, 'taxonomy general name'),\n 'singular_name' => _x($singular, 'taxonomy singular name'),\n 'search_items' => __('Search '.$name),\n 'all_items' => __('All '.$label),\n 'parent_item' => __('Parent '.$singular),\n 'parent_item_colon' => __('Parent '.$label.':'),\n 'edit_item' => __('Edit '.$singular),\n 'update_item' => __('Update '.$singular),\n 'add_new_item' => __('Add New '.$label),\n 'new_item_name' => __('New '.$singular),\n 'menu_name' => __($label),\n );\n\n register_taxonomy($this->get_taxonomy_name(), $this->get_post_types(), array(\n 'hierarchical' => $this->hierarchical,\n 'labels' => $labels,\n 'show_ui' => $this->get_show_ui(),\n 'query_var' => $this->get_query_var(),\n 'rewrite' => array('slug' => $this->get_taxonomy_name()),\n 'show_tagcloud' => $this->get_show_tagcloud(),\n 'show_in_nav_menus' => $this->get_show_in_nav_menus(),\n ));\n }", "title": "" }, { "docid": "79d4ca7c6b178c1169b966dca9992a1b", "score": "0.77454805", "text": "function wpsite_register_taxonomy()\n{\n\t$singular = 'Topic';\n\t$plural = 'Topics';\n\t$labels = array(\n\t\t'name' => $plural,\n\t\t'singular_name' => $singular,\n\t\t'search_items' => 'Search ' .$plural,\n\t\t'all_items' => 'All ' .$plural,\n\t\t'popular_items' => 'Popular ' .$plural,\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => 'Edit '.$singular,\n\t\t'update_item' => 'Update '.$singular,\n\t\t'add_new_item' => 'Add New '.$singular,\n\t\t'new_item_name' => 'New '.$singular. ' Name',\n\t\t'menu_name' => $plural,\n\t\t'separate_items_with_commas' => 'Separate '.$plural. ' with commas',\n\t\t'add_or_remove_items' => 'Add or remove ' .$plural,\n\t\t'choose_from_most_used' => 'Choose from most used ' .$plural,\n\t\t'not_found' => 'No ' .$plural.' found',\n\t);\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'genre' ),\n\t);\n\tregister_taxonomy( 'topic', 'code_snip', $args );\n}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.77440363", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.77440363", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.77440363", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "947de56b9997bb61c2535b66bc7805d3", "score": "0.76710844", "text": "function etx_register_taxonomy(){\n\tregister_taxonomy(\n\t\t'fetured_cat', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces).\n\t\t'fetured-items', //post type name\n\t\t\t array(\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'label' => 'Fetured Category', //Display name\n\t\t\t\t'query_var' => true,\n\t\t\t 'show_admin_column' => true,\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'slug' => 'fetured-category', // This controls the base slug that will display before each term\n\t\t\t\t\t'with_front' => true // Don't display the category base before\n\t\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\tif(!term_exists( 'fetured', 'fetured_cat' ) )\n\t wp_insert_term( 'fetured', 'fetured_cat' );\n\tif(!term_exists( 'gallery', 'fetured_cat' ) )\n\t\twp_insert_term( 'gallery', 'fetured_cat' );\n\tif(!term_exists( 'international-logo', 'fetured_cat' ) )\n\t\twp_insert_term( 'international-logo', 'fetured_cat' );\n\tif(!term_exists( 'local-logo', 'fetured_cat' ) )\n\t\twp_insert_term( 'local-logo', 'fetured_cat' );\n\n\tregister_taxonomy(\n\t\t'event_cat', //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces).\n\t\t'event-items', //post type name\n\t\t\t array(\n\t\t\t\t'hierarchical' => true,\n\t\t\t\t'label' => 'Event Category', //Display name\n\t\t\t\t'query_var' => true,\n\t\t\t 'show_admin_column' => true,\n\t\t\t\t'rewrite' => array(\n\t\t\t\t\t'slug' => 'event-category', // This controls the base slug that will display before each term\n\t\t\t\t\t'with_front' => true // Don't display the category base before\n\t\t\t\t\t)\n\t\t\t)\n\t\t);\n\tif(!term_exists( 'upcoming-event','event_cat' ))\n\t\twp_insert_term( 'upcoming-event','event_cat' );\n\tif(!term_exists( 'running-event','event_cat' ))\n\t\twp_insert_term( 'running-event','event_cat' );\n}", "title": "" }, { "docid": "ccdb577fc98c41ab2cdad1f5acd8e70b", "score": "0.76698154", "text": "public function registerTaxonomies()\n {\n foreach ($this->newTaxonomies as $taxonomy_name => $tax) {\n // register the taxonomy with Wordpress\n register_taxonomy($taxonomy_name, $this->postTypeName, $tax->options);\n }\n }", "title": "" }, { "docid": "36d6ea4bbbf2f82a9d44d94450c6a39e", "score": "0.7599745", "text": "function register_the_custom_taxonomies() {\n\t$configs = array();\n\n\t/**\n\t * Add taxonomy runtime configurations for generating and\n\t * registering each with WordPress.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param array Array of configurations.\n\t */\n\t$configs = (array) apply_filters( 'add_custom_taxonomy_runtime_config', $configs );\n\n\tforeach ( $configs as $taxonomy => $config ) {\n\t\tregister_the_custom_taxonomy( $taxonomy, $config );\n\t}\n}", "title": "" }, { "docid": "f5d1e52c5a26bf6cd80a9a2ec6e09b93", "score": "0.7592793", "text": "function ipress_xxx_add_taxonomy_custom_fields() {}", "title": "" }, { "docid": "c812787f29564e4ed5ae0c46db7bfe39", "score": "0.7576823", "text": "public function register()\n\t{\n\t\tCP_Custom_Taxonomy_Core::GetInstance()->register_custom_taxonomy($this);\n\t}", "title": "" }, { "docid": "2d74ad03c4fd0def81018da9828778b5", "score": "0.7570198", "text": "function create_corgi_genre_taxonomy()\r\n{\r\n\r\n $labels = array('name' => _x( 'Gender','wp_corgi'),'menu_name' => __( 'Genders','wp_corgi'), 'add_new_item' => __( 'Add Corgi Gender','wp_corgi'));\r\n\t\tregister_taxonomy( 'corgi-gender', 'corgi', array( 'hierarchical' => false, 'labels' => $labels, 'query_var' => 'corgi-gender', 'public' =>FALSE, 'show_admin_column'=>TRUE,'show_in_nav_menus'=>TRUE, 'rewrite' => array( 'slug' => __('genre','wp_corgi'), 'hierarchical' => false,'with_front' => FALSE ) ) );\r\n flush_rewrite_rules();\r\n}", "title": "" }, { "docid": "8b9081bbf29877d88dce5de0c02621c3", "score": "0.75247127", "text": "function register_staff_taxonomy () {\n\n $taxonomy_labels = array (\n 'name' => 'Staff Types',\n 'singular_name' => 'Staff Type',\n 'search_items' => 'Search Staff Types',\n 'all_items' => 'All Staff Types',\n 'edit_item' => 'Edit Staff Type',\n 'update_item' => 'Update Staff Type',\n 'add_new_item' => 'Add Staff Type',\n 'new_item_name' => 'New Staff Type',\n 'menu_name' => 'Staff Types'\n );\n\n $taxonomy_options = array (\n 'hierarchical' => true,\n 'labels' => $taxonomy_labels,\n 'show_ui' => true,\n 'show_admin_column' => false,\n 'show_tagcloud' => false\n );\n\n register_taxonomy (DS_CATEGORY_TYPE_NAME, DS_POST_TYPE_NAME, $taxonomy_options);\n\n }", "title": "" }, { "docid": "d91b70789f2474588098349c7f5cc915", "score": "0.751932", "text": "function create_genre_custom_taxonomy() {\n \n $labels = array(\n 'name' => _x( 'Genre', 'taxonomy general name' ),\n 'singular_name' => _x( 'Genre', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Genre' ),\n 'all_items' => __( 'All Genres' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Edit Genre' ), \n 'update_item' => __( 'Update Genre' ),\n 'add_new_item' => __( 'Add New Genre' ),\n 'new_item_name' => __( 'New Genre Name' ),\n 'menu_name' => __( 'Genre' ),\n ); \t\n \n register_taxonomy('genre',array('lesson'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'genre' ),\n ));\n}", "title": "" }, { "docid": "dbc33d39ef6c11dc1a2e77727dfa2aad", "score": "0.75081944", "text": "public function register(): void {\n\t\tif (!$this->taxonomy) {\n\t\t\tthrow new \\Error(\"Property 'taxonomy' is not defined.\");\n\t\t}\n\n\t\tif (!$this->post_types) {\n\t\t\tthrow new \\Error(\"Property 'post_types' is not defined.\");\n\t\t}\n\n\t\tif (!$this->args) {\n\t\t\tthrow new \\Error(\"Property 'args' is not defined.\");\n\t\t}\n\n\t\tregister_taxonomy($this->taxonomy, $this->post_types, $this->args);\n\t}", "title": "" }, { "docid": "56677ac76858a70c2d261a84cf83df90", "score": "0.75049686", "text": "function be_create_my_taxonomies() {\n}", "title": "" }, { "docid": "7d850c13b2bfb7f4df690936ea23602c", "score": "0.7470089", "text": "function register_cpt_tag1() {\n\n\t/**\n\t * Taxonomy: TAGNAME\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( \"TAGNAME\", \"BODYSLUG\" ),\n\t\t\"singular_name\" => __( \"TAGNAME\", \"BODYSLUG\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"TAGNAME\", \"BODYSLUG\" ),\n\t\t\"labels\" => $labels,\n\t\t\"public\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"label\" => \"TAGNAME\",\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => array( 'slug' => 'TAGNAME', 'with_front' => true, ),\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"TAGNAME\",\n\t\t'rest_controller_class' => 'WP_REST_Terms_Controller',\n\t\t\"show_in_quick_edit\" => false,\n\t);\n\tregister_taxonomy( \"TAGNAME\", array( \"POSTTYPENAME\" ), $args );\n}", "title": "" }, { "docid": "59d5991f3bf9e77c7c51375c089ae3d2", "score": "0.7468382", "text": "function mh_custom_taxonomy() {\n\n\t// add new taxonomy -- hierarchical -- Category -- Genre\n\t$genreLabels = array(\n\t\t'name' => 'Genres',\n\t\t'singular_name' => 'Genre',\n\t\t'search_items' => 'Search Genres',\n\t\t'all_items' => 'All Genres',\n\t\t'parent_item' => 'Parent Genre',\n\t\t'parent_item_colon' => 'Parent Genre:',\n\t\t'edit_item' => 'Edit Genre',\n\t\t'update_item' => 'Update Genre',\n\t\t'add_new_item' => 'New Genre',\n\t\t'new_item_name' => 'New Genre Name',\n\t\t'menu_name' => 'Genre'\n\t);\n\n\t$genreArgs = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $genreLabels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'genre')\n\t);\n\tregister_taxonomy( 'genre', array('library'), $genreArgs);\n\n\t// add new taxonomy -- NON hierarchical -- Tag -- Publisher\n\t$publisherLabels = array(\n\t\t'name' => 'Publishers',\n\t\t'singular_name' => 'Publisher',\n\t\t'search_items' => 'Search Publishers',\n\t\t'all_items' => 'All Publishers',\n\t\t'parent_item' => 'Parent Publisher',\n\t\t'parent_item_colon' => 'Parent Publisher:',\n\t\t'edit_item' => 'Edit Publisher',\n\t\t'update_item' => 'Update Publisher',\n\t\t'add_new_item' => 'New Publisher',\n\t\t'new_item_name' => 'New Publisher Name',\n\t\t'menu_name' => 'Publisher'\n\t);\n\n\t$publisherArgs = array(\n\t\t'hierarchical' => false,\n\t\t'labels' => $publisherLabels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'publisher')\n\t);\n\tregister_taxonomy( 'publisher', array('library'), $publisherArgs);\n}", "title": "" }, { "docid": "5350f80ab874a8c49d7f259bbef6dcff", "score": "0.74594855", "text": "public function cx_core_register_taxonomy( $name, $args = array(), $labels = array() ) {\n\t\tif ( ! empty( $name ) ) {\n\n\t\t\t// Name of the post type.\n\t\t\t$post_type_name = $this->post_type_name;\n\n\t\t\t// Taxonomy properties.\n\t\t\t$taxonomy_name \t = self::cx_get_slug( $name );\n\t\t\t$this->taxonomy_labels = $labels;\n\t\t\t$this->taxonomy_args = $args;\n\n\t\t\tif ( ! taxonomy_exists( $taxonomy_name ) ) {\n\n\t\t\t\t// Creating the taxonomy and attaching it to the object type (post type).\n\t\t\t\t$name = self::cx_beautify( $name );\n\t\t\t\t$plural = self::cx_pluralize( $name );\n\t\t\t\t$cx_name \t= strpos( $taxonomy_name, 'tag' ) !== false ? self::cx_pluralize( 'Tag' ) : self::cx_pluralize( 'Category' );\n\n\t\t\t\t// Setting the default labels.\n\t\t\t\t$labels = array_merge(\n\n\t\t\t\t\t// Defaults.\n\t\t\t\t\tarray(\n\t\t\t\t\t\t/* translators: %s: taxonomy plural name */\n\t\t\t\t\t\t'name' => sprintf( esc_html_x( '%s', 'taxonomy general name', 'codexin-core' ), $plural ),\n\t\t\t\t\t\t/* translators: %s: taxonomy singular name */\n\t\t\t\t\t\t'singular_name' => sprintf( esc_html_x( '%s', 'taxonomy singular name', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy plural name */\n\t\t\t\t\t\t'search_items' => sprintf( esc_html__( 'Search %s', 'codexin-core' ), $plural ),\n\t\t\t\t\t\t/* translators: %s: taxonomy plural name */\n\t\t\t\t\t\t'all_items' => sprintf( esc_html__( 'All %s', 'codexin-core' ), $plural ),\n\t\t\t\t\t\t/* translators: %s: taxonomy name */\n\t\t\t\t\t\t'parent_item' => sprintf( esc_html__( 'Parent %s', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy name */\n\t\t\t\t\t\t'parent_item_colon' => sprintf( esc_html__( 'Parent %s:', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy name */\n\t\t\t\t\t\t'edit_item' => sprintf( esc_html__( 'Edit %s', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy name */\n\t\t\t\t\t\t'update_item' => sprintf( esc_html__( 'Update %s', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy name */\n\t\t\t\t\t\t'add_new_item' => sprintf( esc_html__( 'Add New %s', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy name */\n\t\t\t\t\t\t'new_item_name' => sprintf( esc_html__( 'New %s Name', 'codexin-core' ), $name ),\n\t\t\t\t\t\t/* translators: %s: taxonomy modified name */\n\t\t\t\t\t\t'menu_name' => sprintf( esc_html__( '%s', 'codexin-core' ), $cx_name ),\n\t\t\t\t\t),\n\t\t\t\t\t// Given labels.\n\t\t\t\t\t$this->taxonomy_labels\n\t\t\t\t);\n\n\t\t\t\t// Setting the default arguments.\n\t\t\t\t$args = array_merge(\n\n\t\t\t\t\t// Defaults.\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'label' => $plural,\n\t\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t\t'hierarchical' \t\t\t=> strpos( $taxonomy_name, 'tag' ) !== false ? false : true,\n\t\t\t\t\t\t'public' => true,\n\t\t\t\t\t\t'has_archive'\t\t\t=> true,\n\t\t\t\t\t\t'show_admin_column' \t=> true,\n\t\t\t\t\t\t'query_var' \t\t\t=> true,\n\t\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t\t\t'rewrite' \t\t\t=> array(\n\t\t\t\t\t\t\t'slug' => $taxonomy_name,\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t// Given args.\n\t\t\t\t\t$this->taxonomy_args\n\t\t\t\t);\n\n\t\t\t\t// Adding the taxonomy to the post type.\n\t\t\t\tadd_action( 'init',\n\t\t\t\t\tfunction() use ( $taxonomy_name, $post_type_name, $args ) {\n\t\t\t\t\t\tregister_taxonomy( $taxonomy_name, $post_type_name, $args );\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// If the taxonomy already exists, attaching it to the object type (post type).\n\t\t\t\tadd_action( 'init',\n\t\t\t\t\tfunction() use ( $taxonomy_name, $post_type_name ) {\n\t\t\t\t\t\tregister_taxonomy_for_object_type( $taxonomy_name, $post_type_name );\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} // End if().\n\t\t} // End if().\n\t}", "title": "" }, { "docid": "abcadb4889e12b9f41b14711fafdf801", "score": "0.74582744", "text": "function tkno_register_venue_taxonomy() {\n $labels = array(\n 'name' => 'Venues',\n 'singular_name' => 'Venue',\n 'search_items' => 'Search Venues',\n 'all_items' => 'All Venues',\n 'edit_item' => 'Edit Venue',\n 'update_item' => 'Update Venue',\n 'add_new_item' => 'Add New Venue',\n 'new_item_name' => 'New Venue Name',\n 'menu_name' => 'Venues',\n 'view_item' => 'View Venues',\n 'popular_items' => 'Popular Venues',\n 'separate_items_with_commas' => 'Separate venues with commas',\n 'add_or_remove_items' => 'Add or remove venues',\n 'choose_from_most_used' => 'Choose from the most used venues',\n 'not_found' => 'No venues found'\n );\n register_taxonomy(\n 'venue',\n array('post'),\n array(\n 'label' => __( 'Venue' ),\n 'hierarchical' => false,\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => false,\n 'show_ui' => true,\n 'show_in_nav_menus' => false,\n 'show_tagcloud' => false,\n 'show_admin_column' => false,\n 'rewrite' => array( 'slug' => 'venue','with_front' => false),\n )\n );\n}", "title": "" }, { "docid": "56243ef48f2af501563fb29e574f7eda", "score": "0.7445847", "text": "public function lessonRegisterCustomTaxonomy()\n\t\t{\n\t\t\t$labels = array(\n\t\t\t\t'name' => __('Lesson Types', 'cf-demo-lessons'),\n\t\t\t\t'singular_name' => __('Lesson Type', 'cf-demo-lessons'),\n\t\t\t\t'search_items' => __('Search Lesson Types', 'cf-demo-lessons'),\n\t\t\t\t'all_items' => __('All Lesson Types', 'cf-demo-lessons'),\n\t\t\t\t'parent_item' => __('Parent Lesson Type', 'cf-demo-lessons'),\n\t\t\t\t'parent_item_colon' => __('Parent Lesson Type:', 'cf-demo-lessons'),\n\t\t\t\t'edit_item' => __('Edit Lesson Type', 'cf-demo-lessons'),\n\t\t\t\t'update_item' => __('Update Lesson Type', 'cf-demo-lessons'),\n\t\t\t\t'add_new_item' => __('Add New Lesson Type', 'cf-demo-lessons'),\n\t\t\t\t'new_item_name' => __('New Lesson Type Name', 'cf-demo-lessons'),\n\t\t\t\t'menu_name' => __('Lesson Types', 'cf-demo-lessons'),\n\t\t\t);\n\n\t\t\tregister_taxonomy(\n\t\t\t\t'lesson_types',\n\t\t\t\tarray('cpt_lessons'),\n\t\t\t\tarray(\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_admin_column' => true,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array('slug' => 'type'),\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "48d6b7a5d1b8c631aa171a85d368daab", "score": "0.7422853", "text": "function add_custom_taxonomies() {\n// Add new \"LOCATIONS\" taxonomy to ALL Posts types\n register_taxonomy('location', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Locations', 'taxonomy general name' ),\n 'singular_name' => _x( 'Location', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Locations' ),\n 'all_items' => __( 'All Locations' ),\n 'parent_item' => __( 'Parent Location' ),\n 'parent_item_colon' => __( 'Parent Location:' ),\n 'edit_item' => __( 'Edit Location' ),\n 'update_item' => __( 'Update Location' ),\n 'add_new_item' => __( 'Add New Location' ),\n 'new_item_name' => __( 'New Location Name' ),\n 'menu_name' => __( 'Locations' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'locations', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n// Add new \"INDUSTRY\" taxonomy to ALL Posts types\n register_taxonomy('industry', 'post', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Industry', 'taxonomy general name' ),\n 'singular_name' => _x( 'Industry', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Industries' ),\n 'all_items' => __( 'All Industries' ),\n 'parent_item' => __( 'Parent Industry' ),\n 'parent_item_colon' => __( 'Parent Industry:' ),\n 'edit_item' => __( 'Edit Industry' ),\n 'update_item' => __( 'Update Industry' ),\n 'add_new_item' => __( 'Add New Industry' ),\n 'new_item_name' => __( 'New Industry Name' ),\n 'menu_name' => __( 'Industries' ),\n ),\n // Control slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'industry', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => true // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n\n}", "title": "" }, { "docid": "fcd6285fd57d3cc08c479321fcbf0039", "score": "0.73990387", "text": "public function registerEntity()\n {\n parent::registerEntity();\n\n // Args\n $args = apply_filters('cuztom_taxonomy_args', array_merge(\n [\n 'label' => sprintf(__('%s', 'cuztom'), $this->plural),\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n '_builtin' => false,\n 'show_admin_column' => false,\n 'labels' => [\n 'name' => sprintf(_x('%s', 'taxonomy general name', 'cuztom'), $this->plural),\n 'singular_name' => sprintf(_x('%s', 'taxonomy singular name', 'cuztom'), $this->title),\n 'search_items' => sprintf(__('Search %s', 'cuztom'), $this->plural),\n 'all_items' => sprintf(__('All %s', 'cuztom'), $this->plural),\n 'parent_item' => sprintf(__('Parent %s', 'cuztom'), $this->title),\n 'parent_item_colon' => sprintf(__('Parent %s:', 'cuztom'), $this->title),\n 'edit_item' => sprintf(__('Edit %s', 'cuztom'), $this->title),\n 'update_item' => sprintf(__('Update %s', 'cuztom'), $this->title),\n 'add_new_item' => sprintf(__('Add New %s', 'cuztom'), $this->title),\n 'new_item_name' => sprintf(__('New %s Name', 'cuztom'), $this->title),\n 'menu_name' => sprintf(__('%s', 'cuztom'), $this->plural),\n ],\n ],\n $this->original\n ), $this);\n\n register_taxonomy($this->name, $this->postType, $args);\n }", "title": "" }, { "docid": "03eacca5e87aacea678e8f4b839e3e36", "score": "0.7390912", "text": "public static function create_taxonomies() {\n\t\t\tif ( ! taxonomy_exists( self::TAG_SLUG ) ) {\n\t\t\t\t$tag_taxonomy_params = self::get_tag_taxonomy_params();\n\t\t\t\tregister_taxonomy( self::TAG_SLUG, self::POST_TYPE_SLUG, $tag_taxonomy_params );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "45b8bb15e6fc96c7d7915328fd1ad9ec", "score": "0.7385163", "text": "function create_qualifications_staff_taxomony() {\n $labels = array(\n 'name' => _x('Qualifications', 'general name'),\n 'singular_name' => _x('Qualification', 'singular name'),\n 'search_items' => __('Search Qualifications'),\n 'all_items' => __('All Qualifications'),\n 'parent_item' => __('Parent Qualification'),\n 'parent_item_colon' => __('Parent Qualification:'),\n 'edit_item' => __('Edit Qualification'),\n 'update_item' => __('Update Qualification'),\n 'add_new_item' => __('Add New Qualification'),\n 'new_item_name' => __('New Qualification Name'),\n 'menu_name' => __('Qualification')\n );\n // register the taxonomy in wordpress and plug in the data from our labels array\n register_taxonomy('Qualifications', array('staff'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true\n )\n );\n}", "title": "" }, { "docid": "595d4176280bd0138e7b4906885ad234", "score": "0.7374248", "text": "function mycuma_define_taxononomy_actu() {\n\n $labels = array(\n 'name' => 'Types Actualites',\n 'singular_name' => 'type',\n 'all_items' => 'tous les types',\n 'edit_item' => 'modifier le type',\n 'update_item' => 'mettre à jour le type',\n 'add_new_item' => 'ajouter un type',\n 'search_items' => 'Rechercher dans les types',\n 'new_item_name' => 'nouveau nom du type',\n 'menu_name' => 'types des actualités'\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'hierarchical' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'actu'),\n 'show_admin_column' => true\n );\n\n register_taxonomy('type_actu', 'mycuma_actualite', $args);\n}", "title": "" }, { "docid": "7e2f525b2fdff71a1ae6f66a28340223", "score": "0.7338956", "text": "static function register_post_type() {\n\t\tself::$post_type_args['taxonomies'] = self::$taxonomies;\n\n\t\tregister_post_type( self::SLUG, self::$post_type_args );\n\t}", "title": "" }, { "docid": "ac5f31becd609a27092e01ffa462d319", "score": "0.73247015", "text": "function create_post_taxonomy_team() {\n\n// Add new taxonomy, make it hierarchical like categories\n//first do the translations part for GUI\n\n $labels = array(\n 'name' => _x( 'Týmy', 'pasos' ),\n 'singular_name' => _x( 'Tým', 'pasos' ),\n 'search_items' => __( 'Najít Tým' ),\n 'all_items' => __( 'Všechny Týmy' ),\n 'parent_item' => __( 'Parent Topic' ),\n 'parent_item_colon' => __( 'Parent Topic:' ),\n 'edit_item' => __( 'Upravit Tým' ), \n 'update_item' => __( 'Aktualizovat Tým' ),\n 'add_new_item' => __( 'Přidat novou Tým' ),\n 'new_item_name' => __( 'Název nové Tým' ),\n 'menu_name' => __( 'Týmy' ),\n ); \t\n\n// Now register the taxonomy\n\n register_taxonomy('pasos-tym',array('post'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'pasos-tym' ),\n ));\n\n}", "title": "" }, { "docid": "8bd776ec967076672e1dbc792fe4d8ee", "score": "0.7300193", "text": "function horeca_abc_taxonomies_notions() {\n $labels = array(\n 'name' => _x( 'ABC Categorieën ', 'taxonomy general name' ),\n 'singular_name' => _x( 'ABC Categorie ', 'taxonomy singular name' ),\n 'search_items' => __( 'Zoek in het abc' ),\n 'all_items' => __( 'Het gehele abc' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Wijzig het abc' ), \n 'update_item' => __( 'Update het abc' ),\n 'add_new_item' => __( 'Add letter to the abc' ),\n 'new_item_name' => __( 'New letter' ),\n 'menu_name' => __( 'ABC Categorieën' ),\n );\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'slug' => 'abc', \n );\n register_taxonomy( 'notion-abc', 'notions', $args );\n }", "title": "" }, { "docid": "1fc01dd4168af9014ddab600d081c6a0", "score": "0.7295617", "text": "function wpppp_create_taxonomy(){\n\t\t// Add new taxonomy, make it hierarchical (like categories)\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Project Types', 'taxonomy general name', 'wp-perfect-portfolio-plugin' ),\n\t\t\t'singular_name' => _x( 'Project Types', 'taxonomy singular name', 'wp-perfect-portfolio-plugin' ),\n\t\t);\n\t\t$args = array(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'item type' ),\n\t\t);\n\t\tregister_taxonomy( 'wpppp_item_type', 'wpppp_portfolio', $args );\n\t}", "title": "" }, { "docid": "5f63739fab5d9d3136f69290da4a2d61", "score": "0.72898394", "text": "function diseases_init() {\r\n\tregister_taxonomy(\r\n\t\t'diseases',\r\n\t\t'post',\r\n\t\tarray(\r\n\t\t\t'label' => __( 'Diseases' ),\r\n\t\t\t//'rewrite' => array( 'slug' => 'person' ),\r\n\t\t\t/*'capabilities' => array(\r\n\t\t\t\t'assign_terms' => 'edit_guides',\r\n\t\t\t\t'edit_terms' => 'publish_guides'\r\n\t\t\t)*/\r\n\t\t)\r\n\t);\r\n}", "title": "" }, { "docid": "678e9381e0a178709d3d5497b19b8c27", "score": "0.72825235", "text": "private function register()\n {\n $this->options['labels'] = $this->label;\n\n if( !isset( $this->options['rewrite']) )\n $this->options['rewrite'] = array('slug' => $this->singular );\n\n $that =& $this;\n add_action( 'init', function() use(&$that){\n register_post_type( $that->singular, $that->options );\n });\n }", "title": "" }, { "docid": "66bdd8f226faaca5b9739ebb7676c1ae", "score": "0.726742", "text": "function wpm_add_taxonomies()\n{\n // ...\n \n $args_cat_serie = array(\n 'hierarchical' => false,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array(\n 'slug' => STATIC_BOARDS_TAXONOMY_SLUG // some static random string in base slug, that will be replaced\n ),\n );\n \n register_taxonomy('planche', 'image', $args_cat_serie);\n}", "title": "" }, { "docid": "bdebf94a83947a199e24d03178481341", "score": "0.7249234", "text": "function tlpm_taxonomy_register(){\r\n\tregister_taxonomy( // Writer (Author)\r\n\t\t'tlpm_writer',\r\n\t\tarray('documents', 'audio', 'video'), // These are the posts it is attached to\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Authors', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Author', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Authors' ),\r\n\t\t\t\t'all_items' => __( 'All Authors' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Author' ), \r\n\t\t\t\t'update_item' => __( 'Update Author' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Author' ),\r\n\t\t\t\t'new_item_name' => __( 'New Author Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'writer' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Publisher\r\n\t\t'tlpm_publisher',\r\n\t\tarray('documents', 'audio', 'video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Publishers', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Publisher', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Publishers' ),\r\n\t\t\t\t'all_items' => __( 'All Publishers' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Publishers' ), \r\n\t\t\t\t'update_item' => __( 'Update Publisher' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Publisher' ),\r\n\t\t\t\t'new_item_name' => __( 'New Publisher Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'publisher' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Speaker\r\n\t\t'tlpm_speaker',\r\n\t\tarray('audio', 'video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Speakers', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Speaker', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Speakers' ),\r\n\t\t\t\t'all_items' => __( 'All Speakers' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Speaker' ), \r\n\t\t\t\t'update_item' => __( 'Update Speaker' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Speaker' ),\r\n\t\t\t\t'new_item_name' => __( 'New Speaker Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'speaker' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Album Artist\r\n\t\t'tlpm_albumartist',\r\n\t\tarray('audio'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Album Artists', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Album Artist', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Artists' ),\r\n\t\t\t\t'all_items' => __( 'All Artists' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Artist' ), \r\n\t\t\t\t'update_item' => __( 'Update Artist' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Artist' ),\r\n\t\t\t\t'new_item_name' => __( 'New Artist Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'albumartist' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Album Conductor\r\n\t\t'tlpm_albumconductor',\r\n\t\tarray('audio'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Conductors', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Conductor', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Conductors' ),\r\n\t\t\t\t'all_items' => __( 'All Conductors' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Conductor' ), \r\n\t\t\t\t'update_item' => __( 'Update Conductor' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Conductor' ),\r\n\t\t\t\t'new_item_name' => __( 'New Conductor Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'albumconductor' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Director\r\n\t\t'tlpm_director',\r\n\t\tarray('video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Directors', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Director', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Directors' ),\r\n\t\t\t\t'all_items' => __( 'All Directors' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Director' ), \r\n\t\t\t\t'update_item' => __( 'Update Director' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Director' ),\r\n\t\t\t\t'new_item_name' => __( 'New Director Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'director' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Producer\r\n\t\t'tlpm_producer',\r\n\t\tarray('audio', 'video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Producers', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Producer', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Producers' ),\r\n\t\t\t\t'all_items' => __( 'All Producers' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Producer' ), \r\n\t\t\t\t'update_item' => __( 'Update Produced' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Producer' ),\r\n\t\t\t\t'new_item_name' => __( 'New Producer Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'producer' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Actor\r\n\t\t'tlpm_actor',\r\n\t\tarray('audio', 'video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Actors', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Actor', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Actors' ),\r\n\t\t\t\t'all_items' => __( 'All Actors' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Actor' ), \r\n\t\t\t\t'update_item' => __( 'Update Actor' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Actor' ),\r\n\t\t\t\t'new_item_name' => __( 'New Actor Name' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'actor' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Series\r\n\t\t'tlpm_series',\r\n\t\tarray('documents', 'audio', 'video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Series', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Series', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Series' ),\r\n\t\t\t\t'all_items' => __( 'All Series' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Series' ), \r\n\t\t\t\t'update_item' => __( 'Update Series' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Series' ),\r\n\t\t\t\t'new_item_name' => __( 'New Series' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'series' ),\r\n\t\t)\r\n\t);\r\n\tregister_taxonomy( // Category (just like a normal post's \"Tags\")\r\n\t\t'tlpm_categorytag',\r\n\t\tarray('documents', 'audio', 'video'),\r\n\t\tarray(\r\n\t\t\t'hierarchical' => false,\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' => _x( 'Category Tags', 'taxonomy general name' ),\r\n\t\t\t\t'singular_name' => _x( 'Category Tag', 'taxonomy singular name' ),\r\n\t\t\t\t'search_items' => __( 'Search Category Tags' ),\r\n\t\t\t\t'all_items' => __( 'All Category Tags' ),\r\n\t\t\t\t'edit_item' => __( 'Edit Category Tag' ), \r\n\t\t\t\t'update_item' => __( 'Update Category Tag' ),\r\n\t\t\t\t'add_new_item' => __( 'Add New Category Tag' ),\r\n\t\t\t\t'new_item_name' => __( 'New Category Tag' ),\r\n\t\t\t),\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'categorytag' ),\r\n\t\t)\r\n\t);\r\n}", "title": "" }, { "docid": "2045393e8c2702223f2991c567158405", "score": "0.7246566", "text": "public function register_taxonomy() {\n\t\t$labels = array(\n\t\t\t'name' => 'Faculty Members',\n\t\t\t'singular_name' => 'Faculty Member',\n\t\t\t'search_items' => 'Search faculty members',\n\t\t\t'all_items' => 'All Faculty',\n\t\t\t'edit_item' => 'Edit Faculty Member',\n\t\t\t'update_item' => 'Update Faculty Member',\n\t\t\t'add_new_item' => 'Add New Faculty Member',\n\t\t\t'new_item_name' => 'New Faculty Member',\n\t\t\t'menu_name' => 'Faculty Members',\n\t\t);\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'description' => 'Faculty associated with degree program factsheets.',\n\t\t\t'public' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'rewrite' => false,\n\t\t\t'show_in_rest' => true,\n\t\t);\n\t\tregister_taxonomy( $this->taxonomy_slug, array( WSUWP_Graduate_Degree_Programs()->post_type_slug ), $args );\n\t}", "title": "" }, { "docid": "d82c0edfbc43d1052e315b54534456c2", "score": "0.72445333", "text": "function resource_categories_taxonomy() {\n//first do the translations part for GUI \n \n// Now register the taxonomy. Replace the parameter resources withing the array by the name of your custom post type.\n \n register_taxonomy('portfolio_cat',array('portfolio'), array(\n 'hierarchical' => true,\n 'labels' => 'Portfolio Category',\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'portfolio' ),\n ));\n \n}", "title": "" }, { "docid": "377db45e87569a2e27ee0b4101c1d048", "score": "0.72341883", "text": "function create_tag_taxonomies4() \n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Suitable for', 'taxonomy general name' ),\n 'singular_name' => _x( 'Suitable for', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Suitable fors' ),\n 'popular_items' => __( 'Popular Suitable fors' ),\n 'all_items' => __( 'All Suitable fors' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Suitable for' ), \n 'update_item' => __( 'Update Suitable for' ),\n 'add_new_item' => __( 'Add New Suitable for' ),\n 'new_item_name' => __( 'New Suitable for Name' ),\n 'separate_items_with_commas' => __( 'Separate Suitable fors with commas' ),\n 'add_or_remove_items' => __( 'Add or remove Suitable fors' ),\n 'choose_from_most_used' => __( 'Choose from the most used Suitable fors' ),\n 'menu_name' => __( 'Suitable fors' ),\n ); \n\n register_taxonomy('suitable','packages',array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'suitable' ),\n ));\n}", "title": "" }, { "docid": "3d07b85c596e577b59febf28fdde9917", "score": "0.7225619", "text": "function revista_build_taxonomies() {\n\n\t $labels = array(\n\t 'name' \t\t\t\t=> 'Publicações',\n\t 'singular_name'\t \t=> 'Publicação',\n\t 'search_items' \t\t=> 'Pesquisar publicações',\n\t 'all_items' \t\t=> 'Todas as publicações',\n\t 'edit_item' \t\t=> 'Editar publicação', \n\t 'update_item' \t\t=> 'Atualizar publicação',\n\t 'add_new_item' \t\t=> 'Adicionar Nova Publicação',\n\t 'new_item_name' \t=> 'Nova publicação',\n\t ); \t\n\t\n\t register_taxonomy( 'publicacoes', 'revista', array(\n\t 'hierarchical'\t\t=> true,\n\t 'labels' \t\t\t=> $labels,\n\t 'show_ui' \t\t\t=> true,\n\t \t'show_in_nav_menus' => false,\n\t 'query_var' \t\t=> true,\n\t 'rewrite' \t\t\t=> array( 'slug' => 'publicacoes' ),\n\t ));\n\n}", "title": "" }, { "docid": "26c928a50edd052ab89bbe33698374d0", "score": "0.7219897", "text": "public function create_taxonomy() {\r\n\t\t\t\r\n\t\t\t$editable_taxes = cp_advanced_editable_taxes_settings();\r\n\t\t\tif (in_array('measurements',$editable_taxes)):\r\n\t\t\t\t$editable = true;\r\n\t\t\telse :\r\n\t\t\t\t$editable = false;\r\n\t\t\tendif;\t\r\n\t\t\t\t\r\n\t\t\t$labels = array(\r\n\t\t\t\t'name' => __('Measurements', 'cooked'),\r\n\t\t\t\t'singular_name' => __('Measurement', 'cooked'),\r\n\t\t\t\t'search_items' => __('Search Measurements', 'cooked'),\r\n\t\t\t\t'all_items' => __('All Measurements', 'cooked'),\r\n\t\t\t\t'parent_item' => __('Parent Measurement', 'cooked'),\r\n\t\t\t\t'parent_item_colon' => __('Parent Measurement:', 'cooked'),\r\n\t\t\t\t'edit_item' => __('Edit Measurement', 'cooked'), \r\n\t\t\t\t'update_item' => __('Update Measurement', 'cooked'),\r\n\t\t\t\t'add_new_item' => __('Add New Measurement', 'cooked'),\r\n\t\t\t\t'new_item_name' => __('New Measurement Name', 'cooked'),\r\n\t\t\t\t'menu_name' => __('Measurements', 'cooked')\r\n\t\t\t);\r\n\r\n\t\t\t$args = array(\r\n\t\t\t\t'hierarchical' => true,\r\n\t\t\t\t'labels' => $labels,\r\n\t\t\t\t'show_ui' => $editable,\r\n\t\t\t\t'show_admin_column' => $editable,\r\n\t\t\t\t'query_var' => true,\r\n\t\t\t\t'rewrite' => false\r\n\t\t\t);\r\n\r\n\t\t\tregister_taxonomy(self::TAXONOMY, array('cp_recipe'), $args);\r\n\t\t}", "title": "" }, { "docid": "bc358af43232ead20a943ce655d11dcf", "score": "0.7218959", "text": "function add_custom_taxonomies() {\n // Add new \"Courses\" taxonomy to Posts\n register_taxonomy('home-panel-types', 'home-panel', array(\n // Hierarchical taxonomy (like categories)\n 'hierarchical' => true,\n // This array of options controls the labels displayed in the WordPress Admin UI\n 'labels' => array(\n 'name' => _x( 'Home Panel Types', 'taxonomy general name' ),\n 'singular_name' => _x( 'Home Panel Type', 'taxonomy singular name' ),\n 'search_items' => __( 'Search by Home Panel Type' ),\n 'all_items' => __( 'All Home Panel Types' ),\n 'parent_item' => __( 'Parent Item' ),\n 'parent_item_colon' => __( 'Parent Item:' ),\n 'edit_item' => __( 'Edit Home Panel Type' ),\n 'update_item' => __( 'Update Home Panel Type' ),\n 'add_new_item' => __( 'Add New Home Panel Type' ),\n 'new_item_name' => __( 'New Home Panel Type' ),\n 'menu_name' => __( 'Home Panel Types' ),\n ),\n // Control the slugs used for this taxonomy\n 'rewrite' => array(\n 'slug' => 'home-panel-types', // This controls the base slug that will display before each term\n 'with_front' => false, // Don't display the category base before \"/locations/\"\n 'hierarchical' => false // This will allow URL's like \"/locations/boston/cambridge/\"\n ),\n ));\n}", "title": "" }, { "docid": "3a04acc23a5abf1cf23c4e2729d3820f", "score": "0.7206552", "text": "function create_tag_taxonomies11() \n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Locations', 'taxonomy general name' ),\n 'singular_name' => _x( 'Location', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Location' ),\n 'popular_items' => __( 'Popular Location' ),\n 'all_items' => __( 'All Location' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Location' ), \n 'update_item' => __( 'Update Location' ),\n 'add_new_item' => __( 'Add New Location' ),\n 'new_item_name' => __( 'New Location Name' ),\n 'separate_items_with_commas' => __( 'Separate Locations with commas' ),\n 'add_or_remove_items' => __( 'Add or remove Locations' ),\n 'choose_from_most_used' => __( 'Choose from the most used Locations' ),\n 'menu_name' => __( 'Locations' ),\n ); \n\n register_taxonomy('locations','activities',array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'location' ),\n ));\n}", "title": "" }, { "docid": "0b268b4bd8d8f8b8136401b51465bb3e", "score": "0.7205554", "text": "public function registerExistingTaxonomies()\n {\n foreach ($this->existingTaxonomies as $taxonomy_name) {\n register_taxonomy_for_object_type($taxonomy_name, $this->postTypeName);\n }\n }", "title": "" }, { "docid": "934cb21540aa9203db89bb254ef9c378", "score": "0.71951544", "text": "function create_organismes_taxo() {\n \n $labels = array(\n 'name' => _x( 'Organismes', 'taxonomy general name' ),\n 'singular_name' => _x( 'Organismes', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Organismes' ),\n 'popular_items' => __( 'Popular Organismes' ),\n 'all_items' => __( 'All Organismes' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Organismes' ), \n 'update_item' => __( 'Update Organismes' ),\n 'add_new_item' => __( 'Add New Organismes' ),\n 'new_item_name' => __( 'New Organismes Name' ),\n 'separate_items_with_commas' => __( 'Separate organismes with commas' ),\n 'add_or_remove_items' => __( 'Add or remove organismes' ),\n 'choose_from_most_used' => __( 'Choose from the most used organismes' ),\n 'menu_name' => __( 'Organismes' ),\n ); \n \n// Now register the non-hierarchical taxonomy like tag\n \n register_taxonomy('organismes','post',array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'organismes' ),\n ));\n}", "title": "" }, { "docid": "194b2db8d5ca6fcf8ee4c209391e72a4", "score": "0.71917325", "text": "public static function taxonomies() {\n\t\t\t// Add new \"Types\" taxonomy to Posts\n\t\t register_taxonomy('custom-taxonomy-name', 'post', array(\n\t\t // Hierarchical taxonomy (like categories)\n\t\t 'hierarchical' => true,\n\t\t // This array of options controls the labels displayed in the WordPress Admin UI\n\t\t 'labels' => array(\n\t\t 'name' => _x( 'Taxonomy Name', 'taxonomy general name', \\Elexicon\\Helper::$theme_prefix),\n\t\t 'singular_name' => _x( 'Taxonomy Name', 'taxonomy singular name', \\Elexicon\\Helper::$theme_prefix),\n\t\t 'search_items' => __( 'Search Product & Services Categories', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'all_items' => __( 'All Product & Services Categories', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'parent_item' => __( 'Parent Taxonomy Name', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'parent_item_colon' => __( 'Parent Taxonomy Name:', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'edit_item' => __( 'Edit Taxonomy Name', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'update_item' => __( 'Update Taxonomy Name', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'add_new_item' => __( 'Add New Taxonomy Name', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'new_item_name' => __( 'New Taxonomy Name Name', \\Elexicon\\Helper::$theme_prefix ),\n\t\t 'menu_name' => __( 'Product & Service Categories', \\Elexicon\\Helper::$theme_prefix ),\n\t\t ),\n\t\t // Control the slugs used for this taxonomy\n\t\t 'rewrite' => array(\n\t\t 'slug' => 'taxonomy-slug', // This controls the base slug that will display before each term\n\t\t 'with_front' => false, // Don't display the Taxonomy Name base before \"/Types/\"\n\t\t 'hierarchical' => true // This will allow URL's like \"/Types/boston/cambridge/\"\n\t\t ),\n\t\t ));\n\n\t\t\tflush_rewrite_rules();\n\t\t}", "title": "" }, { "docid": "05feebff562dc9565f7c9f4ec731e99b", "score": "0.7190962", "text": "function create_resources_taxonomies() {\n\t$labels = array(\n\t\t'name' \t=> _x( 'Custom_Taxonomy_Name', 'taxonomy general name' ),\n\t\t'singular_name' \t=> _x( 'Custom_Taxonomy_Name', 'taxonomy singular name' ),\n\t\t'search_items' \t=> __( 'Search Custom_Taxonomy_Name' ),\n\t\t'all_items' \t=> __( 'All Custom_Taxonomy_Name' ),\n\t\t'parent_item' \t=> __( 'Parent Custom_Taxonomy_Name' ),\n\t\t'parent_item_colon' \t=> __( 'Parent Custom_Taxonomy_Name:' ),\n\t\t'edit_item' \t=> __( 'Edit Custom_Taxonomy_Name' ),\n\t\t'update_item' \t=> __( 'Update Custom_Taxonomy_Name' ),\n\t\t'add_new_item' \t=> __( 'Add New Custom_Taxonomy_Name' ),\n\t\t'new_item_name' \t=> __( 'New Custom_Taxonomy_Name Name' ),\n\t\t'menu_name' \t=> __( 'Custom_Taxonomy_Name' ),\n\t);\n\n\t$args = array(\n\t\t'hierarchical' \t=> true, // Tags if its false\n\t\t'labels' \t=> $labels,\n\t\t'show_ui' \t=> true,\n\t\t'show_admin_column' \t=> true,\n\t\t'query_var' \t=> true,\n\t\t'rewrite' \t=> array( 'slug' => 'resource-categories' ),\n\t);\n\n register_taxonomy( 'custom_taxonomy_name', array( 'post_type_name' ), $args );\n}", "title": "" }, { "docid": "12ace7fe1a2c3d131f4ded202bcdc8b4", "score": "0.7184038", "text": "function tac_create_custom_tax() {\n\n\t// For posts.\n\tregister_taxonomy(\n\t\t'phase',\n\t\t'post',\n\t\tarray(\n\t\t\t'label' => __( 'Phases' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'phase',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'interest',\n\t\t'post',\n\t\tarray(\n\t\t\t'label' => __( 'Interests' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'interest',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'subject',\n\t\t'post',\n\t\tarray(\n\t\t\t'label' => __( 'Subjects' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'subject',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\n\t// For events.\n\tregister_taxonomy(\n\t\t'type',\n\t\t'event',\n\t\tarray(\n\t\t\t'label' => __( 'Type' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'event-type',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'region',\n\t\t'event',\n\t\tarray(\n\t\t\t'label' => __( 'Region' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'region',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'topic',\n\t\t'event',\n\t\tarray(\n\t\t\t'label' => __( 'Theme' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'theme',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'organiser',\n\t\t'event',\n\t\tarray(\n\t\t\t'label' => __( 'Organiser' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'organiser',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\n\t// For courses.\n\tregister_taxonomy(\n\t\t'suitability',\n\t\t'course',\n\t\tarray(\n\t\t\t'label' => __( 'Suitability' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'suitability',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'theme',\n\t\t'course',\n\t\tarray(\n\t\t\t'label' => __( 'Theme' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'theme',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n\n\tregister_taxonomy(\n\t\t'duration',\n\t\t'course',\n\t\tarray(\n\t\t\t'label' => __( 'Duration' ),\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'duration',\n\t\t\t),\n\t\t\t'hierarchical' => true,\n\t\t)\n\t);\n}", "title": "" }, { "docid": "b0a3ad98a535a631a1df9f32ad6c0100", "score": "0.7178173", "text": "function ys_setup_taxonomies() {\n // News Tags\n register_taxonomy(\n \t\t'tag',\n \t\t'news',\n \t\tarray(\n \t\t\t'label' => 'Tags',\n \t\t\t'rewrite' => array( 'slug' => 'tag' ),\n \t\t\t'hierarchical' => false,\n \t\t)\n \t);\n // News Categories\n register_taxonomy(\n \t\t'category',\n \t\t'news',\n \t\tarray(\n \t\t\t'label' => 'Categories',\n \t\t\t'rewrite' => array( 'slug' => 'category' ),\n \t\t\t'hierarchical' => true,\n \t\t)\n \t);\n}", "title": "" }, { "docid": "34c56ed7ba193e1b39eae9534ae34c9e", "score": "0.71734184", "text": "function main_slider_taxonomy(){\n\tregister_taxonomy(\n'main_slider_cat',\n'slider-item',\narray(\n'hierarchical'=>true,\n'label'\t\t\t=>'Slider Category',\n'query_var'\t\t=>true,\n'rewrite'\t\t=>array(\n'slug'\t\t\t=>'Slider-Category',\n'with_fornt'\t\t=>true\n)\n)\n\n\t);\n}", "title": "" }, { "docid": "93216834c95959b2bb17644a403735e6", "score": "0.7169527", "text": "function publications_custom_taxonomies() {\n\tregister_taxonomy(\n\t\t'type',\t\t// internal name = machine-readable taxonomy name\n\t\t'publication',\t\t// object type = post, page, link, or custom post-type\n\t\tarray(\n\t\t\t'hierarchical' => true,\n\t\t\t'label' => 'Publication Type',\t// the human-readable taxonomy name\n\t\t\t'show_admin_column' => true,\n\t\t\t'query_var' => true,\t// enable taxonomy-specific querying\n\t\t\t'rewrite' => array( 'slug' => 'type' ),\t// pretty permalinks for your taxonomy?\n\t\t)\n\t);\n\n}", "title": "" }, { "docid": "f51a10e1ba9cc315468e4699c2ec44e2", "score": "0.7145426", "text": "public function create_taxonomie()\n {\n $labels = [\n 'name' => 'Catégories',\n 'singular_name' => 'Catégorie',\n 'menu_name' => 'Catégorie',\n 'all_items' => 'Toutes les catégories',\n 'new_item_name' => 'Nouvelle catégorie',\n 'add_new_item' => 'Ajouter une catégorie',\n 'update_item' => 'Mettre à jour une catégorie',\n 'edit_item' => 'Editer une catégorie',\n 'view_item' => 'Voir toutes les catégories',\n 'separate_items_with_commas' => 'Séparer les catégories avec une virgule',\n 'add_or_remove_items' => 'Ajouter une supprimer un catégorie',\n 'choose_from_most_used' => 'Choisir parmis les catégories les plus utilisés',\n 'popular_items' => 'Catégories populaires',\n 'search_items' => 'Rechercher une catégorie',\n 'not_found' => 'Aucune catégorie trouvé',\n 'items_list' => 'Lister les catégories',\n 'items_list_navigation' => 'Lister les catégories',\n ];\n $args = [\n 'labels' => $labels,\n 'hierarchical' => true,\n 'public' => true,\n 'show_in_rest' => true,\n 'featured_image' => true,\n ];\n register_taxonomy('categorie', 'actualite', $args);\n\n \n }", "title": "" }, { "docid": "b9103d59684e05c0511f359a5eb0f9ce", "score": "0.71347475", "text": "function register_taxonomies() {\n $category_args = array(\n 'hierarchical' => true,\n 'query_var' => 'category',\n 'rewrite' => array(\n 'slug' => 'category',\n 'with_front' => false),\n 'labels' => array(\n 'name' => __('Category', 'tainacan'),\n 'singular_name' => __('Category', 'tainacan'),\n 'edit_item' => __('Edit Category', 'tainacan'),\n 'update_item' => __('Update Category', 'tainacan'),\n 'add_new_item' => __('Add New Category', 'tainacan'),\n 'new_item_name' => __('New Category Name', 'tainacan'),\n 'all_items' => __('All Categories', 'tainacan'),\n 'search_items' => __('Search Categories', 'tainacan'),\n 'parent_item' => __('Parent Category', 'tainacan'),\n 'parent_item_colon' => __('Parent Category:', 'tainacan')),\n );\n register_taxonomy('socialdb_category_type', array('socialdb_object'), $category_args);\n register_taxonomy('socialdb_tag_type', array('socialdb_collection'));\n register_taxonomy('socialdb_channel_type', array('socialdb_channel'));\n register_taxonomy('socialdb_license_type', array('socialdb_license'));\n register_taxonomy('socialdb_collection_type', array('socialdb_collection'));\n register_taxonomy('socialdb_property_type', array('socialdb_vote'));\n register_taxonomy('socialdb_event_type', array('socialdb_event'));\n}", "title": "" }, { "docid": "966da391aa72e55029e27741206625e1", "score": "0.713466", "text": "function register_taxonomies() {\n\tregister_taxonomy( 'sticky_tax_test_hierarchical', 'post', array(\n\t\t'label' => 'Sticky Tax: Test Hierarchical',\n\t\t'hierarchical' => true,\n\t) );\n\n\tregister_taxonomy( 'sticky_tax_test_non_hierarchical', 'post', array(\n\t\t'label' => 'Sticky Tax: Test Non-Hierarchical',\n\t\t'hierarchical' => false,\n\t) );\n}", "title": "" }, { "docid": "c902a17119aaa25b1bebc7337c6f2f6c", "score": "0.71291107", "text": "function ici_insertstax_init() {\n // create a new taxonomy\n $labels = array(\n 'name' => _x( 'Inserts Types', 'taxonomy general name' ),\n 'singular_name' => _x( 'Inserts Type', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Types' ),\n 'all_items' => __( 'All Types' ),\n 'parent_item' => __( 'Parent Type' ),\n 'parent_item_colon' => __( 'Parent Type:' ),\n 'edit_item' => __( 'Edit Type' ), \n 'update_item' => __( 'Update Type' ),\n 'add_new_item' => __( 'Add New Inserts Type' ),\n 'new_item_name' => __( 'New Inserts Type Name' ),\n 'menu_name' => __( 'Types' ),\n ); \t\n\n register_taxonomy(\n \t'inserts_type',\n array(''), /* post types that can use this */\n array(\n\t\t'hierarchical' => true,\n \t'labels' => $labels,\n )\n );\n}", "title": "" }, { "docid": "ef06ad8003b52dbf19e641925ed8856c", "score": "0.71251047", "text": "public function create_SF_taxonomy() {\n //sf_state\n register_taxonomy(\n 'sf_state',\n 'sf_city',\n array(\n 'label' => __( 'State' ),\n 'labels' => array(\n 'menu_name' => __( 'sf_state', 'SF_SEO' )\n ),\n 'rewrite' => false,\n 'hierarchical' => false,\n \"show_in_menu\" => false,\n 'show_ui' => true,\n\t\t'show_admin_column' => true,\n 'meta_box_cb' => Array($this,'SF_State_meta_box'), //Load metabox from SF_State_meta_box function\n )\n ); \n \n //sf_service\n register_taxonomy(\n 'sf_service',\n 'sf_city',\n array('label' => __( 'Service' ),\n 'labels' => array(\n 'menu_name' => __( 'Service', 'SF_SEO' )\n ),\n 'rewrite' => false,\n 'hierarchical' => true,\n 'parent_item' => null,\n 'parent_item_colon' => null,\n \"show_in_menu\" => 'SF_SEO',\n )\n ); \n }", "title": "" }, { "docid": "34f0a14bca84a057365a42a668d83f47", "score": "0.7120366", "text": "function cp_register_taxonomies() {\n\tglobal $cp_options;\n\n\t$labels = array(\n\t\t'name' => _x( 'Ad Categories', 'taxonomy general name', APP_TD ),\n\t\t'singular_name' => _x( 'Category', 'taxonomy singular name', APP_TD ),\n\t\t'search_items' => __( 'Search Categories', APP_TD ),\n\t\t'popular_items' => __( 'Popular Categories', APP_TD ),\n\t\t'all_items' => __( 'All Categories', APP_TD ),\n\t\t'parent_item' => __( 'Parent Category', APP_TD ),\n\t\t'parent_item_colon' => __( 'Parent Category:', APP_TD ),\n\t\t'edit_item' => __( 'Edit Category', APP_TD ),\n\t\t'view_item' => __( 'View Category', APP_TD ),\n\t\t'update_item' => __( 'Update Category', APP_TD ),\n\t\t'add_new_item' => __( 'Add New Category', APP_TD ),\n\t\t'new_item_name' => __( 'New Category Name', APP_TD ),\n\t\t'separate_items_with_commas' => __( 'Separate ad categories with commas', APP_TD ),\n\t\t'add_or_remove_items' => __( 'Add or remove ad categories', APP_TD ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used ad categories', APP_TD ),\n\t\t'not_found' => __( 'No ad categories found.', APP_TD ),\n\t\t'no_terms' => __( 'No ad categories', APP_TD ),\n\t\t'items_list_navigation' => __( 'Ad categories list navigation', APP_TD ),\n\t\t'items_list' => __( 'Ad categories list', APP_TD ),\n\t\t'menu_name' => _x( 'Categories', 'taxonomy menu name', APP_TD ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'show_ui' => true,\n\t\t'query_var' => true,\n\t\t'show_in_rest' => true,\n\t\t'rewrite' => array( 'slug' => $cp_options->ad_cat_tax_permalink, 'with_front' => false, 'hierarchical' => true ),\n\t\t'update_count_callback' => '_update_post_term_count',\n\t);\n\n\tregister_taxonomy( APP_TAX_CAT, APP_POST_TYPE, $args );\n\n\n\t$labels = array(\n\t\t'name' => _x( 'Ad Tags', 'taxonomy general name', APP_TD ),\n\t\t'singular_name' => _x( 'Tag', 'taxonomy singular name', APP_TD ),\n\t\t'search_items' => __( 'Search Tags', APP_TD ),\n\t\t'popular_items' => __( 'Popular Tags', APP_TD ),\n\t\t'all_items' => __( 'All Tags', APP_TD ),\n\t\t'parent_item' => __( 'Parent Tag', APP_TD ),\n\t\t'parent_item_colon' => __( 'Parent Tag:', APP_TD ),\n\t\t'edit_item' => __( 'Edit Tag', APP_TD ),\n\t\t'view_item' => __( 'View Tag', APP_TD ),\n\t\t'update_item' => __( 'Update Tag', APP_TD ),\n\t\t'add_new_item' => __( 'Add New Tag', APP_TD ),\n\t\t'new_item_name' => __( 'New Tag Name', APP_TD ),\n\t\t'separate_items_with_commas' => __( 'Separate ad tags with commas', APP_TD ),\n\t\t'add_or_remove_items' => __( 'Add or remove ad tags', APP_TD ),\n\t\t'choose_from_most_used' => __( 'Choose from the most common ad tags', APP_TD ),\n\t\t'not_found' => __( 'No ad tags found.', APP_TD ),\n\t\t'no_terms' => __( 'No ad tags', APP_TD ),\n\t\t'items_list_navigation' => __( 'Ad tags list navigation', APP_TD ),\n\t\t'items_list' => __( 'Ad tags list', APP_TD ),\n\t\t'menu_name' => _x( 'Tags', 'taxonomy menu name', APP_TD ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => false,\n\t\t'show_ui' => true,\n\t\t'query_var' => true,\n\t\t'show_in_rest' => true,\n\t\t'rewrite' => array( 'slug' => $cp_options->ad_tag_tax_permalink, 'with_front' => false ),\n\t\t'update_count_callback' => '_update_post_term_count',\n\t);\n\n\tregister_taxonomy( APP_TAX_TAG, APP_POST_TYPE, $args );\n}", "title": "" }, { "docid": "534903fa164200883f6ffa425573abde", "score": "0.71101946", "text": "function wpmu_register_taxonomy()\n{\n //Register \"Services\"\n $labels = array(\n 'name' => __('Services', 'wpmu'),\n 'singular_name' => __('Service', 'wpmu'),\n 'search_items' => __('Search Services', 'wpmu'),\n 'all_items' => __('All Services', 'wpmu'),\n 'edit_item' => __('Edit Services', 'wpmu'),\n 'update_item' => __('Update Services', 'wpmu'),\n 'add_new_item' => __('Add New Services', 'wpmu'),\n 'new_item_name' => __('New Service Name', 'wpmu'),\n 'menu_name' => __('Services', 'wpmu'),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'sort' => true,\n 'args' => array('orderby' => 'term_order'),\n 'rewrite' => array('slug' => 'services'),\n 'show_admin_column' => true\n );\n\n register_taxonomy('service', array('post', 'project'), $args);\n\n //Register \"Country\"\n\n $labels = array(\n 'name' => __('Countries', 'wpmu'),\n 'singular_name' => __('Country', 'wpmu'),\n 'search_items' => __('Search Countries', 'wpmu'),\n 'all_items' => __('All Countries', 'wpmu'),\n 'edit_item' => __('Edit Countries', 'wpmu'),\n 'update_item' => __('Update Countries', 'wpmu'),\n 'add_new_item' => __('Add New Countries', 'wpmu'),\n 'new_item_name' => __('New CountriesName', 'wpmu'),\n 'menu_name' => __('Countries', 'wpmu'),\n );\n\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'sort' => true,\n 'args' => array('orderby' => 'term_order'),\n 'rewrite' => array('slug' => 'countries'),\n 'show_admin_column' => true\n );\n register_taxonomy('country', array('post', 'project'), $args);\n}", "title": "" }, { "docid": "d5232426e1485c50780a75175bb58a8d", "score": "0.7092256", "text": "function rs_custom_taxonomies()\r\n\t\t{\r\n\t\t // Add new taxonomy, make it hierarchical (like brands)\r\n\t\t $labels = array(\r\n\t\t\t'name' => _x( 'Brands', 'taxonomy general name' ),\r\n\t\t\t'singular_name' => _x( 'Brand', 'taxonomy singular name' ),\r\n\t\t\t'search_items' => __( 'Search Brands' ),\r\n\t\t\t'all_items' => __( 'All Brands' ),\r\n\t\t\t'parent_item' => __( 'Parent Brand' ),\r\n\t\t\t'parent_item_colon' => __( 'Parent Brands:' ),\r\n\t\t\t'edit_item' => __( 'Edit Brands' ),\r\n\t\t\t'update_item' => __( 'Update Brands' ),\r\n\t\t\t'add_new_item' => __( 'Add New Brand' ),\r\n\t\t\t'new_item_name' => __( 'New Brand Name' ),\r\n\t\t\t'menu_name' => __( 'Brands' ),\r\n\t\t ); \r\n\r\n\t\t register_taxonomy('product_brand',array('product'), array(\r\n\t\t\t'hierarchical' => true,\r\n\t\t\t'show_in_nav_menus' => true,\r\n\t\t\t'labels' => $labels,\r\n\t\t\t'show_ui' => true,\r\n\t\t\t'query_var' => true,\r\n\t\t\t//'rewrite' => true,\r\n\t\t\t'rewrite' => array( 'slug' => 'product-brand', 'with_front' => true ),\r\n\t\t ));\r\n\t\t \r\n\t\t register_taxonomy_for_object_type( 'product_brand', 'product' );\r\n\t\t}", "title": "" }, { "docid": "4ae7a7b300b96b7747475115919741c6", "score": "0.7090935", "text": "function register_cpt_category1() {\n\n\t/**\n\t * Taxonomy: CATEGORYNAME\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( \"CATEGORYNAME\", \"BODYSLUG\" ),\n\t\t\"singular_name\" => __( \"CATEGORYNAME\", \"BODYSLUG\" ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( \"CATEGORYNAME\", \"BODYSLUG\" ),\n\t\t\"labels\" => $labels,\n\t\t\"public\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"label\" => \"CATEGORYNAME\",\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => array( 'slug' => 'CATEGORYNAME', 'with_front' => true, ),\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => true,\n\t\t\"rest_base\" => \"CATEGORYNAME\",\n\t\t'rest_controller_class' => 'WP_REST_Terms_Controller',\n\t\t\"show_in_quick_edit\" => false,\n\t);\n\tregister_taxonomy( \"CATEGORYNAME\", array( \"POSTTYPENAME\" ), $args );\n}", "title": "" }, { "docid": "ab4ba235efa85cdc22f3d0623d4749e4", "score": "0.70769036", "text": "function tax_contacts() {\r\n\tregister_taxonomy(\r\n\t\t'contacts',\r\n\t\t'contact',\r\n\t\tarray(\r\n\t\t\t'label' => __( 'Catagories' ),\r\n\t\t\t'rewrite' => array( 'slug' => 'contacts' ),\r\n\t\t\t'hierarchical' => true\r\n\t\t\t)\r\n\t);\r\n}", "title": "" }, { "docid": "a708cb0f5cf42274a1f49b27ce4d991e", "score": "0.7074779", "text": "function socialdb_add_tax_terms($object_id, $terms, $taxonomy) {\n global $wpdb;\n foreach ($terms as $term) {\n $term_info = socialdb_term_exists($term, $taxonomy);\n $verify = socialdb_relation_exists($term, $object_id);\n if (!isset($verify['object_id'])) {\n $tt_id = $term_info['term_taxonomy_id'];\n $wpdb->insert($wpdb->term_relationships, array('object_id' => $object_id, 'term_taxonomy_id' => $tt_id));\n }\n//wp_update_term_count(array($tt_id), $taxonomy);\n }\n}", "title": "" }, { "docid": "f6dc78b7aafd878083026ae33729168b", "score": "0.707322", "text": "function add_custom_taxonomies() {\r\n // Taxonomia Espacos: Grupos\r\n register_taxonomy('grupos', 'espacos', array(\r\n 'hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => _x('Grupos', 'Grupos de espacos'),\r\n 'singular_name' => _x('grupos'),\r\n 'search_items' => __('Procurar Grupos'),\r\n 'all_items' => __('Todos os Grupos'),\r\n 'parent_item' => __('Grupo pai'),\r\n 'parent_item_colon' => __('Grupo pai:'),\r\n 'edit_item' => __('Editar Grupo'),\r\n 'update_item' => __('Atualizar Grupo'),\r\n 'add_new_item' => __('Adicionar novo Grupo'),\r\n 'new_item_name' => __('Novo nome de Grupo'),\r\n 'menu_name' => __('Grupos'),\r\n ),\r\n 'rewrite' => array(\r\n 'slug' => 'grupos',\r\n 'with_front' => false,\r\n 'hierarchical' => true\r\n ),\r\n ));\r\n // Taxonomia Espacos: Categorias (Eventos)\r\n register_taxonomy('categorias', 'eventos', array(\r\n 'hierarchical' => true,\r\n 'labels' => array(\r\n 'name' => _x('Categorias', 'Categorias de espacos'),\r\n 'singular_name' => _x('categorias'),\r\n 'search_items' => __('Procurar categorias'),\r\n 'all_items' => __('Todos as categorias'),\r\n 'parent_item' => __('Categoria pai'),\r\n 'parent_item_colon' => __('Categoria pai:'),\r\n 'edit_item' => __('Editar categoria'),\r\n 'update_item' => __('Atualizar categoria'),\r\n 'add_new_item' => __('Adicionar nova categoria'),\r\n 'new_item_name' => __('Novo nome de categoria'),\r\n 'menu_name' => __('Categorias'),\r\n ),\r\n 'rewrite' => array(\r\n 'slug' => 'categorias',\r\n 'with_front' => false,\r\n 'hierarchical' => true\r\n ),\r\n ));\r\n}", "title": "" }, { "docid": "75f9f324ca70fec8258e42e08bca9ffc", "score": "0.7072944", "text": "function destination_custom_taxonomy() {\n\n\t$labels = array(\n\t\t'name' => 'Destination Tags',\n\t\t'singular_name' => 'Destination Tag',\n\t\t'menu_name' => 'Destination Tags',\n\t\t'all_items' => 'All Destinations',\n\t\t'parent_item' => 'Parent Item',\n\t\t'parent_item_colon' => 'Parent Item:',\n\t\t'new_item_name' => 'New Destination Tag',\n\t\t'add_new_item' => 'Add New Destination Tag',\n\t\t'edit_item' => 'Edit Destination Tag',\n\t\t'update_item' => 'Update Destination Tag',\n\t\t'separate_items_with_commas' => 'Separate Tags with commas',\n\t\t'search_items' => 'Search Destination Tags',\n\t\t'add_or_remove_items' => 'Add or remove Tags',\n\t\t'choose_from_most_used' => 'Choose from the most used Destination Tags',\n\t\t'not_found' => 'Destination Tag Not Found',\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t);\n\tregister_taxonomy( 'destination_tag', array('art', 'destination_feature'), $args );\n\n}", "title": "" }, { "docid": "8a183436203619be60a8ec71580a5e85", "score": "0.7072819", "text": "function ici_insertstax_init_tags() {\n // create a new taxonomy\n $labels = array(\n 'name' => _x( 'Insets Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Inserts Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Tags' ),\n 'all_items' => __( 'All Tags' ),\n 'parent_item' => __( 'Parent Tag' ),\n 'parent_item_colon' => __( 'Parent Tag:' ),\n 'edit_item' => __( 'Edit Tag' ), \n 'update_item' => __( 'Update Tag' ),\n 'add_new_item' => __( 'Add New Inserts Tag' ),\n 'new_item_name' => __( 'New Inserts Tag Name' ),\n 'menu_name' => __( 'Tags' ),\n ); \t\n\n register_taxonomy(\n \t'inserts_tag',\n array(''), /* post types that can use this */\n array(\n\t\t'hierarchical' => false,\n \t'labels' => $labels,\n )\n );\n}", "title": "" }, { "docid": "36bd951b0d54ff5d51a84d68bf0382b2", "score": "0.7072603", "text": "function reg_tag() {\n register_taxonomy_for_object_type('post_tag', 'card');\n}", "title": "" }, { "docid": "b6fa11dcc217098808076f8e1ae4211e", "score": "0.7054704", "text": "protected function register_taxonomy_tag() {\n\t\t$labels = array(\n\t\t\t'name' => __( 'Tags', 'madang' ),\n\t\t\t'singular_name' => __( 'Tag', 'madang' ),\n\t\t\t'menu_name' => __( 'Tags', 'madang' ),\n\t\t\t'edit_item' => __( 'Edit Tag', 'madang' ),\n\t\t\t'update_item' => __( 'Update Tag', 'madang' ),\n\t\t\t'add_new_item' => __( 'Add New Tag', 'madang' ),\n\t\t\t'new_item_name' => __( 'New Tag Name', 'madang' ),\n\t\t\t'parent_item' => __( 'Parent Tag', 'madang' ),\n\t\t\t'parent_item_colon' => __( 'Parent Tag:', 'madang' ),\n\t\t\t'all_items' => __( 'All Tags', 'madang' ),\n\t\t\t'search_items' => __( 'Search Tags', 'madang' ),\n\t\t\t'popular_items' => __( 'Popular Tags', 'madang' ),\n\t\t\t'separate_items_with_commas' => __( 'Separate tags with commas', 'madang' ),\n\t\t\t'add_or_remove_items' => __( 'Add or remove tags', 'madang' ),\n\t\t\t'choose_from_most_used' => __( 'Choose from the most used tags', 'madang' ),\n\t\t\t'not_found' => __( 'No tags found.', 'madang' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'show_in_nav_menus' => false,\n\t\t\t'show_ui' => true,\n\t\t\t'show_tagcloud' => true,\n\t\t\t'hierarchical' => false,\n\t\t\t'show_admin_column' => true,\n\t\t\t'query_var' => true,\n\n\t\t);\n\n\t\t$args = apply_filters( 'madang_tag_args', $args );\n\n\t\tregister_taxonomy( 'nutrition_tag', array( 'nutrition' ), $args );\n\n\t}", "title": "" }, { "docid": "f46e6cbcd7ccfa895cbb2bc228a56bed", "score": "0.7048041", "text": "function snippets_categories_taxonomy() {\r\n \r\n $snippets_cats = array(\r\n 'name' => _x( 'Snippets Categories', 'taxonomy general name' ),\r\n 'singular_name' => _x( 'Snippet Category', 'taxonomy singular name' ),\r\n 'search_items' => __( 'Search Snippet Categories' ),\r\n 'all_items' => __( 'All Snippet Categories' ),\r\n 'parent_item' => __( 'Parent Snippet Category' ),\r\n 'parent_item_colon' => __( 'Parent Snippet Category:' ),\r\n 'edit_item' => __( 'Edit Snippet Category' ), \r\n 'update_item' => __( 'Update Snippet Category' ),\r\n 'add_new_item' => __( 'Add New Snippet Category' ),\r\n 'new_item_name' => __( 'New Snippet Category' ),\r\n 'menu_name' => __( 'Snippets Categories' ),\r\n ); \r\n \r\n// Now register the taxonomy\r\n register_taxonomy('snippets_categories',array('snippets'), array(\r\n 'hierarchical' => true,\r\n 'labels' => $snippets_cats,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => 'snippets_categories' ),\r\n ));\r\n \r\n}", "title": "" }, { "docid": "61566e09ec65e0ae0a3b1841c931e8c1", "score": "0.70478636", "text": "function champagne_category() {\n register_taxonomy(\n 'cat-champ',\n 'champagne',\n array(\n 'label' => __( 'Types de champagnes' ),\n 'rewrite' => array( 'slug' => 'project-cat' ),\n 'hierarchical' => true,\n )\n );\n}", "title": "" }, { "docid": "be3663b5533074049f8a3a3b17e44c09", "score": "0.7029618", "text": "function rs_custom_tax()\n{\n\t$args = array(\n\t\t'label' => __('Estado', 'rede-sustentabilidade'),\n\t\t'rewrite' => array('slug' => 'regional'),\n\t\t'hierarchical' => true,\n\t\t'show_admin_column' => true,\n\t\t'capabilities' => array(\n\t\t\t'manage_terms' => 'manage_states',\n\t\t\t'edit_terms' => 'manage_states',\n\t\t\t'delete_terms' => 'manage_states',\n\t\t\t'assign_terms' => 'edit_post_regions',\n\t\t),\n\t);\n\tregister_taxonomy('state', 'post_region', $args);\n\tregister_taxonomy_for_object_type('state', 'event');\n}", "title": "" }, { "docid": "7266321b1da4a70aaefbc2b06f49a8c7", "score": "0.7028404", "text": "function mc_taxonomies() {\n\t$types = mc_post_type();\n\t$enabled = array( 'mc-events' );\n\tif ( is_array( $enabled ) ) {\n\t\tforeach ( $enabled as $key ) {\n\t\t\t$value = $types[ $key ];\n\t\t\tregister_taxonomy(\n\t\t\t\t'mc-event-category',\n\t\t\t\t// Internal name = machine-readable taxonomy name.\n\t\t\t\tarray( $key ),\n\t\t\t\tarray(\n\t\t\t\t\t'hierarchical' => true,\n\t\t\t\t\t'label' => __( 'Event Categories', 'my-calendar' ),\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array( 'slug' => apply_filters( 'mc_event_category_slug', 'mc-event-category' ) ),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "2ce2157c3b917eb42357146bb54d1db7", "score": "0.70073533", "text": "function create_banner_category_taxonomy() {\n\n $labels = array(\n 'name' => __( 'Categoría Banner'),\n 'singular_name' => __( 'Categoría Banner'),\n 'search_items' => __( 'Buscar Categoría Banner'),\n 'all_items' => __( 'Todas Categorías del Banner' ),\n 'parent_item' => __( 'Categoría padre del banner' ),\n 'parent_item_colon'=> __( 'Categoría padre:' ),\n 'edit_item' => __( 'Editar categoría de banner' ), \n 'update_item' => __( 'Actualizar categoría de banner' ),\n 'add_new_item' => __( 'Agregar nueva categoría de banner' ),\n 'new_item_name' => __( 'Nuevo nombre categoría de banner' ),\n 'menu_name' => __( 'Categoria Banner' ),\n ); \t\n\n// Now register the taxonomy\n\n register_taxonomy('banner_category',array('banner'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column'=> true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'banner-category' ),\n ));\n\n}", "title": "" }, { "docid": "a4b20ca83e81fba830aa2dd0ca7f2055", "score": "0.70014864", "text": "function partners_custom_taxonomies() {\n\tregister_taxonomy(\n\t\t'partner-type',\t\t// internal name = machine-readable taxonomy name\n\t\t'partner',\t\t// object type = post, page, link, or custom post-type\n\t\tarray(\n\t\t\t'hierarchical' => true,\n\t\t\t'label' => 'Category',\t// the human-readable taxonomy name\n\t\t\t'show_admin_column' => true,\n\t\t\t'query_var' => true,\t// enable taxonomy-specific querying\n\t\t\t'rewrite' => array( 'slug' => 'partner-type' ),\t// pretty permalinks for your taxonomy?\n\t\t)\n\t);\n\n}", "title": "" }, { "docid": "928f804265eb7f0a1564730d930fb088", "score": "0.69984156", "text": "public function register_meta()\n {\n foreach ( $this->taxonomies as $taxonomy ) {\n register_post_meta( \n 'post', \n \"_bjh_primary_$taxonomy\", \n [\n 'type' => 'integer',\n 'description' => \"The primary $taxonomy assigned to a post\",\n 'single' => true,\n 'show_in_rest' => true,\n // Required for private meta keys\n // @see https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/metabox/meta-block-2-register-meta/\n 'auth_callback' => function() {\n return current_user_can('edit_posts');\n }\n ]\n );\n }\n }", "title": "" }, { "docid": "c5e644c88a6f597025dc2d3ef3ee5e53", "score": "0.6995819", "text": "private function create_taxonomy() {\n\n $labels = array(\n 'name' => _x( 'Kategorier', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Kategori', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Sök kategorier', 'textdomain' ),\n 'all_items' => __( 'Alla kategorier', 'textdomain' ),\n 'edit_item' => __( 'Redigera kategori', 'textdomain' ),\n 'update_item' => __( 'Uppdatera kategori', 'textdomain' ),\n 'add_new_item' => __( 'Lägg till kategori', 'textdomain' ),\n 'new_item_name' => __( 'Ny kategori', 'textdomain' ),\n 'menu_name' => __( 'Kategorier', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'show_in_nav_menus' => true,\n 'rewrite' => array('slug' => 'kalendariekategori'),\n );\n\n register_taxonomy( 'eventcat', 'event', $args );\n\n // Add tags\n $labels = array(\n 'name' => _x( 'Tags', 'taxonomy general name' ),\n 'singular_name' => _x( 'Tag', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Tags' ),\n 'popular_items' => __( 'Popular Tags' ),\n 'all_items' => __( 'All Tags' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Tag' ), \n 'update_item' => __( 'Update Tag' ),\n 'add_new_item' => __( 'Add New Tag' ),\n 'new_item_name' => __( 'New Tag Name' ),\n 'separate_items_with_commas' => __( 'Separate tags with commas' ),\n 'add_or_remove_items' => __( 'Add or remove tags' ),\n 'choose_from_most_used' => __( 'Choose from the most used tags' ),\n 'menu_name' => __( 'Tags' ),\n ); \n\n register_taxonomy('tag', 'event', array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'tag' ),\n ));\n\n }", "title": "" }, { "docid": "169ec2227b41f67d5cc3d61065e98ab3", "score": "0.6966483", "text": "function create_tag_taxonomies3() \n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Travel Style', 'taxonomy general name' ),\n 'singular_name' => _x( 'Travel Style', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Travel Styles' ),\n 'popular_items' => __( 'Popular Travel Styles' ),\n 'all_items' => __( 'All Travel Styles' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Travel Style' ), \n 'update_item' => __( 'Update Travel Style' ),\n 'add_new_item' => __( 'Add New Travel Style' ),\n 'new_item_name' => __( 'New Travel Style Name' ),\n 'separate_items_with_commas' => __( 'Separate Travel Styles with commas' ),\n 'add_or_remove_items' => __( 'Add or remove Travel Styles' ),\n 'choose_from_most_used' => __( 'Choose from the most used Travel Styles' ),\n 'menu_name' => __( 'Travel Styles' ),\n ); \n\n register_taxonomy('travel-style','packages',array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'travel-style' ),\n ));\n}", "title": "" }, { "docid": "ff9e5ca1e1fdb4f1da6d243adfe5e6d2", "score": "0.6959357", "text": "public function wca_taxonomy() {\n\n $labels = array(\n 'name' => _x( 'Category', 'taxonomy general name' ),\n 'singular_name' => _x( 'Category', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Category' ),\n 'popular_items' => __( 'Popular Category' ),\n 'all_items' => __( 'All Categories' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Category' ),\n 'update_item' => __( 'Update Category' ),\n 'add_new_item' => __( 'Add New Category' ),\n 'new_item_name' => __( 'New Topic Name' ),\n 'separate_items_with_commas' => __( 'Separate categories with commas' ),\n 'add_or_remove_items' => __( 'Add or remove categories' ),\n 'choose_from_most_used' => __( 'Choose from the most used categories' ),\n 'menu_name' => __( 'Category' ),\n );\n\n // Now register the non-hierarchical taxonomy like tag\n\n register_taxonomy('wca-category','wc_address',array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'wca-taxonomy' ),\n ));\n }", "title": "" }, { "docid": "f59f940cd7e3e5755f9b840211ee0efb", "score": "0.6957993", "text": "function create_tag_taxonomies12() \n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Environment', 'taxonomy general name' ),\n 'singular_name' => _x( 'Environment', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Environment' ),\n 'popular_items' => __( 'Popular Environment' ),\n 'all_items' => __( 'All Environment' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Environment' ), \n 'update_item' => __( 'Update Environment' ),\n 'add_new_item' => __( 'Add New Environment' ),\n 'new_item_name' => __( 'New Environment Name' ),\n 'separate_items_with_commas' => __( 'Separate Environment with commas' ),\n 'add_or_remove_items' => __( 'Add or remove Environment' ),\n 'choose_from_most_used' => __( 'Choose from the most used Environment' ),\n 'menu_name' => __( 'Environment' ),\n ); \n\n register_taxonomy('environment',array('accommodations','activities'),array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'environment' ),\n ));\n}", "title": "" }, { "docid": "5ab4834eeaceff9a26ab977fc66d9d76", "score": "0.6956829", "text": "function create_tag_taxonomies13() \n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'View', 'taxonomy general name' ),\n 'singular_name' => _x( 'View', 'taxonomy singular name' ),\n 'search_items' => __( 'Search View' ),\n 'popular_items' => __( 'Popular View' ),\n 'all_items' => __( 'All View' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit View' ), \n 'update_item' => __( 'Update View' ),\n 'add_new_item' => __( 'Add New View' ),\n 'new_item_name' => __( 'New View Name' ),\n 'separate_items_with_commas' => __( 'Separate View with commas' ),\n 'add_or_remove_items' => __( 'Add or remove View' ),\n 'choose_from_most_used' => __( 'Choose from the most used View' ),\n 'menu_name' => __( 'View' ),\n ); \n\n register_taxonomy('view',array('accommodations'),array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'view' ),\n ));\n}", "title": "" }, { "docid": "30357f8d1ff0eaf842a5cc8722b4fac1", "score": "0.6946406", "text": "function firstOne_create_custom_taxonomies(){\n\n // Add New Hierarical Taxonomy\n $labels = array(\n 'name' => 'Fields',\n \t\t'singular_name' => 'Field',\n \t\t'search_items' => 'Search Fields',\n \t\t'all_items' => 'All Fields',\n \t\t'parent_item' => 'Parent Field',\n \t\t'parent_item_colon' => 'Parent Field:',\n \t\t'edit_item' => 'Edit Field',\n \t\t'update_item' => 'Update Field',\n \t\t'add_new_item' => 'Add New Work Field',\n \t\t'new_item_name' => 'New Field Name',\n \t\t'menu_name' => 'Fields'\n );\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true, // To Show UI For User in Control Pannel\n 'show_admin_column' => true, // To Appear in Column Section\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'field')\n );\n register_taxonomy('field', array('portfolio'), $args);\n\n\n // Add New Nonhierarical Taxonomy\n register_taxonomy('software', 'portfolio' ,array(\n 'labels' => array('name'=>'Software'),\n 'hierarchical' => false,\n 'rewrite' => array('slug' => 'software'),\n ));\n\n }", "title": "" }, { "docid": "4d818a6fba821ec51dbf2ea5105557ab", "score": "0.69323057", "text": "function neuf_register_theme_taxonomies() {\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Custom post templates', 'taxonomy general name' ),\n 'singular_name' => _x( 'Post template', 'taxonomy singular name' ),\n 'search_items' => __( ''),\n 'popular_items' => __( 'Popular Templates' ),\n 'all_items' => __( 'All Post Templates' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Edit Post Template' ),\n 'update_item' => __( 'Update Post Template' ),\n 'add_new_item' => __( 'Add New Post Template' ),\n 'new_item_name' => __( 'New Post Template' ),\n 'separate_items_with_commas' => __( 'Separate post templates with commas' ),\n 'add_or_remove_items' => __( 'Add or remove post templates' ),\n 'choose_from_most_used' => __( 'Choose from the most used post templates' ),\n 'menu_name' => __( 'Post Templates' ),\n );\n\n register_taxonomy('post_template','post',array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_nav_menus' => false,\n 'show_tagcloud' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => false,\n //'rewrite' => array( 'slug' => 'writer' ),\n 'rewrite' => false,\n ));\n}", "title": "" }, { "docid": "ffb850f8a15fe48518be28432bf6d66f", "score": "0.6928701", "text": "function ffw_port_setup_taxonomies() {\n\n $slug = defined( 'FFW_PORT_SLUG' ) ? FFW_PORT_SLUG : 'port';\n\n /** Categories */\n $category_labels = array(\n 'name' => sprintf( _x( '%s Categories', 'taxonomy general name', 'ffw_port' ), ffw_port_get_label_singular() ),\n 'singular_name' => _x( 'Category', 'taxonomy singular name', 'ffw_port' ),\n 'search_items' => __( 'Search Categories', 'ffw_port' ),\n 'all_items' => __( 'All Categories', 'ffw_port' ),\n 'parent_item' => __( 'Parent Category', 'ffw_port' ),\n 'parent_item_colon' => __( 'Parent Category:', 'ffw_port' ),\n 'edit_item' => __( 'Edit Category', 'ffw_port' ),\n 'update_item' => __( 'Update Category', 'ffw_port' ),\n 'add_new_item' => __( 'Add New Category', 'ffw_port' ),\n 'new_item_name' => __( 'New Category Name', 'ffw_port' ),\n 'menu_name' => __( 'Categories', 'ffw_port' ),\n );\n\n $category_args = apply_filters( 'ffw_port_category_args', array(\n 'hierarchical' => true,\n 'labels' => apply_filters('ffw_port_category_labels', $category_labels),\n 'show_ui' => true,\n 'query_var' => 'port_category',\n 'rewrite' => array('slug' => $slug . '/category', 'with_front' => false, 'hierarchical' => true ),\n 'capabilities' => array( 'manage_terms','edit_terms', 'assign_terms', 'delete_terms' ),\n 'show_admin_column' => true\n )\n );\n register_taxonomy( 'port_category', array('ffw_port'), $category_args );\n register_taxonomy_for_object_type( 'port_category', 'ffw_port' );\n\n}", "title": "" }, { "docid": "2a3901a8b3dc729de0b6b592674ba1e1", "score": "0.68981725", "text": "public function register_taxonomies() {\r\n\r\n\t\tif ( $this->options['general']['use_categories'] === true && $this->options['general']['builtin_categories'] === false ) {\r\n\t\t\t$labels_news_categories = array(\r\n\t\t\t\t'name'\t\t\t\t => _x( 'News Categories', 'taxonomy general name', 'news-manager' ),\r\n\t\t\t\t'singular_name'\t\t => _x( 'News Category', 'taxonomy singular name', 'news-manager' ),\r\n\t\t\t\t'search_items'\t\t => __( 'Search News Categories', 'news-manager' ),\r\n\t\t\t\t'all_items'\t\t\t => __( 'All News Categories', 'news-manager' ),\r\n\t\t\t\t'parent_item'\t\t => __( 'Parent News Category', 'news-manager' ),\r\n\t\t\t\t'parent_item_colon'\t => __( 'Parent News Category:', 'news-manager' ),\r\n\t\t\t\t'edit_item'\t\t\t => __( 'Edit News Category', 'news-manager' ),\r\n\t\t\t\t'view_item'\t\t\t => __( 'View News Category', 'news-manager' ),\r\n\t\t\t\t'update_item'\t\t => __( 'Update News Category', 'news-manager' ),\r\n\t\t\t\t'add_new_item'\t\t => __( 'Add New News Category', 'news-manager' ),\r\n\t\t\t\t'new_item_name'\t\t => __( 'New News Category Name', 'news-manager' ),\r\n\t\t\t\t'menu_name'\t\t\t => __( 'Categories', 'news-manager' ),\r\n\t\t\t);\r\n\r\n\t\t\t$slug = $this->options['permalinks']['news_slug'] . '/' . $this->options['permalinks']['news_categories_rewrite_slug'];\r\n\r\n\t\t\tif ( $this->options['permalinks']['single_news_prefix'] === true && $this->options['permalinks']['single_news_prefix_type'] === 'category' )\r\n\t\t\t\t$slug = $this->options['permalinks']['news_slug'];\r\n\r\n\t\t\t$args_news_categories = array(\r\n\t\t\t\t'public'\t\t\t\t => true,\r\n\t\t\t\t'hierarchical'\t\t\t => true,\r\n\t\t\t\t'labels'\t\t\t\t => $labels_news_categories,\r\n\t\t\t\t'show_ui'\t\t\t\t => true,\r\n\t\t\t\t'show_admin_column'\t\t => true,\r\n\t\t\t\t'update_count_callback'\t => '_update_post_term_count',\r\n\t\t\t\t'query_var'\t\t\t\t => true,\r\n\t\t\t\t'rewrite'\t\t\t\t => array(\r\n\t\t\t\t\t'slug'\t\t\t => $slug,\r\n\t\t\t\t\t'with_front'\t => false,\r\n\t\t\t\t\t'hierarchical'\t => false\r\n\t\t\t\t),\r\n\t\t\t\t'capabilities'\t\t\t => array(\r\n\t\t\t\t\t'manage_terms'\t => 'manage_news_categories',\r\n\t\t\t\t\t'edit_terms'\t => 'manage_news_categories',\r\n\t\t\t\t\t'delete_terms'\t => 'manage_news_categories',\r\n\t\t\t\t\t'assign_terms'\t => 'edit_news'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tregister_taxonomy( 'news-category', 'news', apply_filters( 'nm_register_news_categories', $args_news_categories ) );\r\n\t\t}\r\n\r\n\t\tif ( $this->options['general']['use_tags'] === true && $this->options['general']['builtin_tags'] === false ) {\r\n\t\t\t$labels_news_tags = array(\r\n\t\t\t\t'name'\t\t\t\t\t\t => _x( 'News Tags', 'taxonomy general name', 'news-manager' ),\r\n\t\t\t\t'singular_name'\t\t\t\t => _x( 'News Tag', 'taxonomy singular name', 'news-manager' ),\r\n\t\t\t\t'search_items'\t\t\t\t => __( 'Search News Tags', 'news-manager' ),\r\n\t\t\t\t'popular_items'\t\t\t\t => __( 'Popular News Tags', 'news-manager' ),\r\n\t\t\t\t'all_items'\t\t\t\t\t => __( 'All News Tags', 'news-manager' ),\r\n\t\t\t\t'parent_item'\t\t\t\t => null,\r\n\t\t\t\t'parent_item_colon'\t\t\t => null,\r\n\t\t\t\t'edit_item'\t\t\t\t\t => __( 'Edit News Tag', 'news-manager' ),\r\n\t\t\t\t'update_item'\t\t\t\t => __( 'Update News Tag', 'news-manager' ),\r\n\t\t\t\t'add_new_item'\t\t\t\t => __( 'Add New News Tag', 'news-manager' ),\r\n\t\t\t\t'new_item_name'\t\t\t\t => __( 'New News Tag Name', 'news-manager' ),\r\n\t\t\t\t'separate_items_with_commas' => __( 'Separate news tags with commas', 'news-manager' ),\r\n\t\t\t\t'add_or_remove_items'\t\t => __( 'Add or remove news tags', 'news-manager' ),\r\n\t\t\t\t'choose_from_most_used'\t\t => __( 'Choose from the most used news tags', 'news-manager' ),\r\n\t\t\t\t'menu_name'\t\t\t\t\t => __( 'Tags', 'news-manager' ),\r\n\t\t\t);\r\n\r\n\t\t\t$slug = $this->options['permalinks']['news_slug'] . '/' . $this->options['permalinks']['news_tags_rewrite_slug'];\r\n\r\n\t\t\tif ( $this->options['permalinks']['single_news_prefix'] === true && $this->options['permalinks']['single_news_prefix_type'] === 'tag' )\r\n\t\t\t\t$slug = $this->options['permalinks']['news_slug'];\r\n\r\n\t\t\t$args_news_tags = array(\r\n\t\t\t\t'public'\t\t\t\t => true,\r\n\t\t\t\t'hierarchical'\t\t\t => false,\r\n\t\t\t\t'labels'\t\t\t\t => $labels_news_tags,\r\n\t\t\t\t'show_ui'\t\t\t\t => true,\r\n\t\t\t\t'show_admin_column'\t\t => true,\r\n\t\t\t\t'update_count_callback'\t => '_update_post_term_count',\r\n\t\t\t\t'query_var'\t\t\t\t => true,\r\n\t\t\t\t'rewrite'\t\t\t\t => array(\r\n\t\t\t\t\t'slug'\t\t\t => $slug,\r\n\t\t\t\t\t'with_front'\t => false,\r\n\t\t\t\t\t'hierarchical'\t => false\r\n\t\t\t\t),\r\n\t\t\t\t'capabilities'\t\t\t => array(\r\n\t\t\t\t\t'manage_terms'\t => 'manage_news_tags',\r\n\t\t\t\t\t'edit_terms'\t => 'manage_news_tags',\r\n\t\t\t\t\t'delete_terms'\t => 'manage_news_tags',\r\n\t\t\t\t\t'assign_terms'\t => 'edit_news'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\tregister_taxonomy( 'news-tag', 'news', apply_filters( 'nm_register_news_tags', $args_news_tags ) );\r\n\t\t}\r\n\t}", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "aa2a27ab6625210a80b22b31ae30661e", "score": "0.0", "text": "public function run(){\n \t$faker = \\Faker\\Factory::create();\n\n DB::table('users')->insert([\n \t[\n\t \t'username' => $faker->userName,\n\t\t\t\t'fullname' => $faker->name,\n\t\t\t\t'email' => \"[email protected]\",\n\t\t\t\t'role_id' => 1,\n\t\t\t\t'email_verified_at' => now(),\n\t\t\t\t'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\t\t\t\t'image' => $faker->image,\n\t\t\t\t'remember_token' => Str::random(10),\n \t],\n\n \t[\n\t \t'username' => $faker->userName,\n\t\t\t\t'fullname' => $faker->name,\n\t\t\t\t'email' => \"[email protected]\",\n\t\t\t\t'role_id' => 2,\n\t\t\t\t'email_verified_at' => now(),\n\t\t\t\t'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\t\t\t\t'image' => $faker->image,\n\t\t\t\t'remember_token' => Str::random(10),\n \t],\n\n \t[\n\t \t'username' => $faker->userName,\n\t\t\t\t'fullname' => $faker->name,\n\t\t\t\t'email' => \"[email protected]\",\n\t\t\t\t'role_id' => 3,\n\t\t\t\t'email_verified_at' => now(),\n\t\t\t\t'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\t\t\t\t'image' => $faker->image,\n\t\t\t\t'remember_token' => Str::random(10),\n \t],\n\n \t[\n\t \t'username' => $faker->userName,\n\t\t\t\t'fullname' => $faker->name,\n\t\t\t\t'email' => \"[email protected]\",\n\t\t\t\t'role_id' => 4,\n\t\t\t\t'email_verified_at' => now(),\n\t\t\t\t'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\t\t\t\t'image' => $faker->image,\n\t\t\t\t'remember_token' => Str::random(10),\n \t],\n\n \t[\n\t \t'username' => $faker->userName,\n\t\t\t\t'fullname' => $faker->name,\n\t\t\t\t'email' => \"[email protected]\",\n\t\t\t\t'role_id' => 5,\n\t\t\t\t'email_verified_at' => now(),\n\t\t\t\t'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n\t\t\t\t'image' => $faker->image,\n\t\t\t\t'remember_token' => Str::random(10),\n \t]\n ]);\n }", "title": "" } ]
[ { "docid": "026cbaddf68d6d6a45da6661bc9c4127", "score": "0.79270625", "text": "public function run() {\n\n $this->call([\n CategorySeeder::class,\n ColorSeeder::class,\n SubCategorySeeder::class\n ]);\n// $products = Product::factory()->count(1000)\n// ->has(Image::factory()->count(4))\n// ->hasAttached(Size::factory()->count(3))\n// ->hasAttached(Price::factory()->count(3), [\n// 'discounted_price' => 0\n// ])\n// ->create();\n//\n// foreach($products as $product) {\n// $product->colors()->attach(Color::whereIn('id', [1, 6, 8, 14])->get());\n// }\n//\n $categories = Category::all();\n $subcategories = Subcategory::all();\n foreach($categories as $category) {\n $category->slug = Str::slug($category->name);\n $category->save();\n }\n foreach($subcategories as $subcategory) {\n $subcategory->slug = Str::slug($subcategory->name);\n $subcategory->save();\n }\n\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'customer']);\n }", "title": "" }, { "docid": "9ebafd651532d8097278ffd87e4126dd", "score": "0.7914175", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'username' => 'Admin',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => Hash::make('Admin'),\n 'isadmin' => 1,\n 'remember_token' => Str::random(10),\n ]);\n User::create([\n 'name' => 'User',\n 'username' => 'user',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => Hash::make('password'),\n 'remember_token' => Str::random(10),\n ]);\n \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Author::factory(10)->create();\n\n $authors = Author::all();\n\n foreach ($authors as $author) {\n $booksNumber = rand(1, 10);\n\n for ($i = 0; $i < $booksNumber; $i++) {\n $book = new Book;\n $faker = Faker::create();\n $book->create([\n 'author_id' => $author->id,\n 'title' => $faker->sentence(6),\n 'year' => $faker->year(),\n 'isbn' => $faker->isbn13\n ]);\n }\n }\n }", "title": "" }, { "docid": "652f431dbbffe4e36aa5c0bfc4a05f31", "score": "0.79028475", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //factory(App\\User::class, 3)->create();\n /*factory(App\\Project::class, 20)->create();\n factory(App\\Position::class, 20)->create();*/\n DB::table('position_categories')->insert([\n 'name' => 'Architecture',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Design',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Economics',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Programming',\n ]);\n DB::table('position_categories')->insert([\n 'name' => 'Network',\n ]);\n\n DB::table('users')->insert([\n 'firstname' => 'Admin',\n 'lastname' => 'Admin',\n 'type' => 'admin',\n 'activate' => '1',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n ]);\n DB::table('users')->insert([\n 'firstname' => 'Tomas',\n 'lastname' => 'Svetlik',\n 'type' => 'supervisor',\n 'activate' => '1',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n ]);\n }", "title": "" }, { "docid": "dfe583e94e177ff570601466401e1b2b", "score": "0.78664804", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = f::create();\n foreach (range(1,20) as $item) {\n DB::table('persons')->insert([\n 'firstName' => $faker->name,\n 'documentType' => \"CC\",\n 'document' => 123456,\n\t 'lastName' => $faker->lastName,\n 'company' => $faker->company,\n 'emailAddress' => $faker->email,\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'province' => $faker->state,\n 'country' => $faker->countryCode,\n 'phone' =>$faker->tollFreePhoneNumber,\n 'mobile'=>$faker->e164PhoneNumber\n\t ]);\n }\n }", "title": "" }, { "docid": "f571785bdbff3ab02c615eb8fd1f1aa1", "score": "0.78613377", "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 Address::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Address::create([\n 'addressName' => $faker->randomLetter,\n 'addressStreet' => $faker->streetName,\n 'addressNumber' => $faker->randomNumber(1),\n 'addressZip' => $faker->postcode,\n 'addressPlace' => $faker->city,\n 'addressCountry' => $faker->country,\n 'addressState' => $faker->state,\n 'addressMailBoxNumber' => $faker->buildingNumber,\n 'addressExtraInfo' => $faker->realText($maxNbChars = 30, $indexSize = 2),\n 'loadingPresent' => $faker->boolean(50),\n 'trailerAccess' => $faker->randomLetter\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "56e4a3e209083146c894bf986fe10c2d", "score": "0.7851426", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Articulo::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articulos in our database:\n for ($i = 0; $i < 50; $i++) {\n Articulo::create([\n 'titulo' => $faker->sentence,\n 'cuerpo' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "b7a61e5a71620bfa33e1faa0f7e7a4e0", "score": "0.7838723", "text": "public function run()\n {\n $users = factory(App\\Book::class, 1000)->create();\n // $this->call(UserSeeder::class);\n// DB::table('books')->insert([\n// 'title' => Str::random(10),\n// 'author' => Str::random(10),\n// 'category' => Str::random(10),\n// 'piece' => 5,\n// ]);\n }", "title": "" }, { "docid": "5637d7e19c1ec7123232747c49238622", "score": "0.7834799", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\Product')->create(['name' => 'Fanta', 'price' => 140]);\n factory('App\\Product')->create(['name' => 'Coca Cola', 'price' => 180]);\n factory('App\\Product')->create(['name' => 'Pepsi Cola', 'price' => 160, 'discount' => 20]);\n factory('App\\Product')->create(['name' => 'Sprite', 'price' => 120]);\n factory('App\\Product')->create(['name' => 'Limonade', 'price' => 200]);\n }", "title": "" }, { "docid": "b444ac88819a191047d8feec2c185e1c", "score": "0.78344816", "text": "public function run()\n {\n\n DB::table('posts')->delete();\n\n $faker = Faker::create();\n $cats_id = Category::all()->pluck('id')->toArray();\n $pers_id = Person::all()->pluck('id')->toArray();\n foreach (range(1,20) as $i) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'cat_id' => $faker->randomElement($cats_id),\n 'per_id' => $faker->randomElement($pers_id)\n ]);\n }\n }", "title": "" }, { "docid": "b2d9243b0e4d2434d34d38fb01906601", "score": "0.78318644", "text": "public function run()\n {\n // User::truncate();\n // Category::truncate();\n // Donation::truncate();\n // Transacton::truncate();\n // DB::table('category_donation')->truncate();\n\n User::create([\n 'name' => 'Busola Okeowo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'verified' => User::VERIFIED,\n 'admin' => true,\n ]);\n\n factory(User::class, 500)->create();\n\n factory(Category::class, 10)->create();\n\n factory(Donation::class, 1000)->create()->each(\n function ($donation) {\n $categories = Category::all()->random(mt_rand(1, 3))->pluck('id');\n $donation->categories()->attach($categories);\n }\n );\n\n factory(Transacton::class, 1000)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6c432cf75a7b37364927c71d18b2a940", "score": "0.7817219", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Country::class, 10)->create();\n factory(App\\Supplier::class, 5)->create();\n factory(App\\User::class, 3)->create();\n factory(App\\Phone::class, 3)->create();\n factory(App\\Post::class, 3)->create();\n factory(App\\Comment::class, 15)->create();\n factory(App\\Role::class, 5)->create();\n factory(App\\History::class, 5)->create();\n }", "title": "" }, { "docid": "cddbf6f9d3cf8855efd49fd8690a82a9", "score": "0.78134006", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker= Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n \t$title=$faker->sentence(5);\n \t$slug=str_slug($title, \"-\");\n CatalogCategory::create([\n 'catalog_id'=>2,\n 'parent' => 0,\n 'title' => $title,\n 'content' => $faker->realText(250),\n 'meta_title' => $faker->sentence(5),\n 'meta_keywords' => $faker->sentence(10),\n 'meta_description' => $faker->realText(50),\n 'active' => 'active',\n 'language' => 'en',\n 'slug' => $slug, \n ]);\n }\n }", "title": "" }, { "docid": "e085eed193e63f3018e503b814f52203", "score": "0.7808198", "text": "public function run()\n {\n // DB::table('articles')->insert(\n // [\n\n // [\n // 'category_id' => 4,\n // 'title' => '文章4',\n // 'content' => '内容4'\n // ],\n // [\n // 'category_id' => 5,\n // 'title' => '文章5',\n // 'content' => '内容5'\n // ]\n // ]\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 'category_id' => array_random([1, 2, 3, 4, 5, 6]),\n 'title' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString()\n\n ]);\n }\n\n }", "title": "" }, { "docid": "f919a3f40e792d8990ecc3b06279bfa2", "score": "0.780527", "text": "public function run()\n {\n $db = DB::table('users');\n\n $this->faker = Faker\\Factory::create();\n\n $values ['firstName'] = 'Роман';\n $values ['lastName'] = 'Телепнёв';\n $values ['email'] = '[email protected]';\n $values ['password'] = bcrypt('123123');\n $values ['role_id'] = 2;\n\n $db->insert($values);\n\n for($i = 0; $i < 10; $i++) {\n\n $values ['firstName'] = $this->faker->firstName;\n $values ['lastName'] = $this->faker->lastName;\n $values ['email'] = $this->faker->email;\n $values ['password'] = bcrypt('123123');\n $values ['role_id'] = 1;\n\n $db->insert($values);\n }\n }", "title": "" }, { "docid": "dafd5ed6a9dfac3846fdf76150c59c25", "score": "0.7797067", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::factory(15)->create();\n Categorie::factory(10)->create();\n Product::factory(200)->create();\n UserProduct::factory(50)->create();\n }", "title": "" }, { "docid": "c11978691651e5bb5ec8631cb4f07e6e", "score": "0.7793273", "text": "public function run()\n {\n //$this->labFacultiesSeeder();\n $this->labRolesSeeder();\n $this->labMembersSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labSkillsTableSeeder();\n $this->labPreferencesTableSeeder();\n $this->labPositionsTableSeeder();\n }", "title": "" }, { "docid": "b9287aff88d859492bd31ea1291e44cc", "score": "0.7793", "text": "public function run()\n {\n // Truncate existing records to start from scratch\n // Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // create products in DB\n for($i = 0; $i < 10; $i++) {\n // Product::create([\n // 'name' => $faker->word,\n // 'description' => $faker->realText($maxNbChars = 20, $indexSize = 1),\n // 'qty' => $faker->randomDigit\n // ]);\n }\n }", "title": "" }, { "docid": "84a5c18a5563f5fd35652bc3991e7a13", "score": "0.7788151", "text": "public function run()\n {\n // reset the students table\n DB::table('students')->truncate();\n // generate 100 dummy students data\n $students = [];\n $faker = Factory::create();\n for ($i = 1; $i <= 100; $i++) {\n $students[] = [\n 'teacher_id' => rand(1, 2),\n 'classroom_id' => rand(1, 3),\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'gender' => $faker->randomElement(['M', 'F']),\n 'joined_year' => $faker->randomElement([2017, 2018, 2019])\n ];\n }\n DB::table('students')->insert($students);\n }", "title": "" }, { "docid": "11c50d315926c6e7b655ef6b05e875c4", "score": "0.778813", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n 'is_admin' => \"0\",\n 'phone' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'nrc' => '9/MaKaNa(N)123456',\n 'passport' => $faker->creditCardNumber,\n 'city' => $faker->city,\n 'country' => $faker->country,\n 'is_foreigner' => $faker->numberBetween(0, 1),\n 'status' => \"1\"\n ]);\n }\n foreach (range(1, 5) as $index) {\n DB::table('room_types')->insert([\n 'type' => $faker->word,\n ]);\n }\n foreach (range(1, 100) as $index) {\n DB::table('rooms')->insert([\n 'name' => 'Room-' . $faker->numberBetween(0, 100),\n 'price' => $faker->numberBetween(1000, 5000),\n 'roomtype_id' => $faker->numberBetween(1, 5),\n 'maxPerson' => $faker->numberBetween(2, 5)\n ]);\n }\n\n }", "title": "" }, { "docid": "0d82c7815e29e8d3580735f06d9c1aaf", "score": "0.7787371", "text": "public function run()\n {\n\n \t/*DB::table('posts')->insert([\n \t\t'title'=>'Hello World Post!',\n \t\t'is_private'=>false,\n \t\t'content'=>'Primeiro Post do Blog!',\n \t\t'tag'=>'tests']);\n\t\t*/\n \t$faker = Faker\\Factory::create();\n \t\n \tfor ($i=0;$i<=50;$i++){\n \t\tDB::table('posts')->insert([\n \t\t\t'title'=>$faker->sentence(4,true),\n \t\t\t'is_private'=>$faker->numberBetween(0,1),\n \t\t\t'content'=>$faker->realText(),\n \t\t\t'tag'=>$faker->word,\n \t\t\t'created_at'=>date(\"Y-m-d H:i:s\"),\n \t\t\t'updated_at'=>date(\"Y-m-d H:i:s\"),\n\t\t\t\t'user_id'=>$faker->numberBetween(1,10),\n \t\t\t]);\n\n \t}\n }", "title": "" }, { "docid": "764ce860db37bfaef26f84398a089d37", "score": "0.77847266", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(MenuSeeder::class);\n $this->call(SubMenuSeeder::class);\n $this->call(AspirationCategorySeeder::class);\n $this->call(RoleSeeder::class);\n factory(App\\User::class, 10)->create();\n factory(App\\Aspiration::class,100)->create();\n factory(App\\Comment::class, 50)->create();\n factory(App\\Upvote::class,1000)->create();\n }", "title": "" }, { "docid": "1008c0f54658330473447dc378540eff", "score": "0.77835673", "text": "public function run()\n {\n // $this->call(\n // UsersTableSeeder::class\n // AdminTableSeeder::class\n // );\n $faker = Faker\\Factory::create();\n // users Table ..\n /*\n for ($i=0; $i < 4; $i++) { \n App\\User::create([\n 'name'=> $faker->name,\n 'email'=>$faker->unique()->email,\n 'password' => bcrypt('test'),\n 'remember_token' => str_random(10),\n ]);\n }\n */\n\n // questions Table ..\n /*\n for ($i=0; $i < 20; $i++) { \n App\\Question::create([\n 'title'=>$faker->text,\n 'a' => str_random(10),\n 'b' => str_random(10),\n 'c' => str_random(10),\n 'correct_answer'=> str_random(10),\n 'chapter'=> '2',\n 'process_group'=>'3',\n 'feedback'=>$faker->text,\n 'created_at'=>$faker->date,\n 'updated_at'=>$faker->date\n ]);\n }\n */\n }", "title": "" }, { "docid": "7a448194d3ffeafa2e4480cbd7d668c7", "score": "0.7781228", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Schema::disableForeignKeyConstraints();\n Estudiante::truncate();\n Nota::truncate();\n\n factory(Estudiante::class, 1000)->create();\n factory(Nota::class, 10000)->create();\n\n }", "title": "" }, { "docid": "0f84f24f66f5b72c344f056d5c4ac2be", "score": "0.7779334", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n //Zbog relacija moramo prvo napraviti seed tablica na koje se oslanjaju relacije. Koristimo reference. \n CategoryTableSeeder::class,\n MealsTableSeeder::class, \n IngredientsTableSeeder::class, \n TagsTableSeeder::class,\n LanguagesTableSeeder::class,\n\n CategoryTranslationSeeder::class,\n IngredientsTranslationSeeder::class,\n MealsTranslationSeeder::class,\n TagsTranslationSeeder::class,\n\n IngredientsMealsSeeder::class,\n TagsMealsSeeder::class,\n ]);\n }", "title": "" }, { "docid": "3367ba7c5de754802d54125c0434d35b", "score": "0.77788985", "text": "public function run()\n {\n // $this->call(DatabaseSeeder::class);\n\n $users = factory(App\\User::class)->times(20)->create();\n \t\t\t$products = factory(App\\Product::class)->times(40)->create();\n \t\t\t$categories = factory(App\\Category::class)->times(5)->create();\n $projects = factory(App\\Project::class)->times(5)->create();\n $organizations = factory(App\\Organization::class)->times(4)->create();\n\n foreach ($products as $oneProduct) {\n \t\t\t\t$oneProduct->user()->associate($users->random(1)->first()->id);\n \t\t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->project()->associate($projects->random(1)->first()->id);\n \t\t\t\t$oneProduct->save();\n }\n foreach ($projects as $oneProject) {\n \t\t\t\t$oneProject->Organization()->associate($organizations->random(1)->first()->id);\n \t\t\t\t$oneProject->save();\n }\n foreach ($organizations as $oneONG) {\n $oneONG->user()->associate($users->random(1)->first()->id);\n \t\t\t\t$oneONG->save();\n }\n foreach ($organizations as $oneONG) {\n $user = $oneONG->User->id;\n $ElUser = User::find($user);\n $ElUser->organization()->associate($oneONG->id);\n // $ElUser->organization_id = $oneONG->id;\n $ElUser->save();\n }\n }", "title": "" }, { "docid": "73d68c75e35031be9ad04679b3f01bbb", "score": "0.7776164", "text": "public function run()\n {\n // $faker init\n $faker = Factory::create();\n\n // Disable foreign key\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n // truncate users table and start fresh\n DB::table('users')->truncate();\n // Insert three users\n DB::table('users')->insert([\n [\n 'name' => 'Fares Kato',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n [\n 'name' => 'Jhon Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n [\n 'name' => 'Jane Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'bio' => $faker->text(rand(200, 300)),\n ],\n\n ]);\n }", "title": "" }, { "docid": "9ccf154b9532504223396f096629de84", "score": "0.77724695", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 1)->create();\n factory(Business::class, 10)->create();\n factory(Category::class, 10)->create();\n }", "title": "" }, { "docid": "a876d481bffb816b3f928cdd2f048955", "score": "0.77708864", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // User::factory(10)->create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate(); // bila tidak ingin menyimpan data tabel user saat generate seed\n DB::table('posts')->truncate(); // bila tidak ingin menyimpan data tabel post saat generate seed\n DB::table('authors')->truncate();\n\n User::factory(10)->create()->each(function($user){\n $user->posts()->save(Post::factory()->make());\n });\n }", "title": "" }, { "docid": "cb0cb2bf6e95ebc39e97de57dc88be67", "score": "0.77682835", "text": "public function run()\n {\n $faker = Faker::create();\n\n $data = array();\n foreach (range(1, 30) as $index)\n {\n $data[] = [\n 'title' => $faker->unique()->realText(40, 3),\n 'summary' => $faker->realText(300, 3),\n 'content' => '<p>'. $faker->realText(500, 3) .'</p>',\n 'is_hidden' => mt_rand(0, 1),\n 'read_num' => mt_rand(10, 1000),\n 'published_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months'),\n 'created_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months'),\n 'updated_at' => $faker->dateTimeBetween('- 1 months', '+ 1 months')\n ];\n }\n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "2d7708bdf4209a991289a027ee4a826a", "score": "0.7767735", "text": "public function run()\n {\n // a way of seeding using set rather than random entries\n// Category::create([\n// 'slug' => 'personal',\n// 'name' => 'Personal'\n// ]);\n User::truncate();\n Category::truncate();\n Post::truncate();\n Comment::truncate();\n\n User::factory(2)->create();\n\n// User::factory(2)->create([\n// 'name' => 'Gay Lord'\n// ]);\n\n Category::factory(4)->create();\n Post::factory(10)->create();\n Comment::factory(30)->create();\n }", "title": "" }, { "docid": "e035961a57b8995e91904afa3ddca96a", "score": "0.77625465", "text": "public function run()\n {\n /*$this->call(RoleTableSeeder::class);\n $this->call(UsersTableSeeder::class);*/\n\n //factory(Category::class, 182)->create();\n factory(Tag::class, 182)->create();\n }", "title": "" }, { "docid": "ba2b70724958ce50610fe0a518ac2278", "score": "0.77595687", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $password = Hash::make('toptal');\n\n \\App\\User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \\App\\User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n ]);\n }\n }", "title": "" }, { "docid": "d98bd94d2928528bf0080703ee7ddf4e", "score": "0.77595174", "text": "public function run()\n {\n DB::table('users')->insert([\n \t'name'=> 'Andrius',\n \t'surname'=> 'Kamarauskas',\n \t'phone'=> '37064103803',\n \t'city'=> 'Vilnius',\n \t'car'=> 'Mercedes-Benz',\n \t'car_year'=> 2017,\n \t'email'=> '[email protected]',\n \t'password'=> bcrypt('inzinierius'),\n 'status' => 'admin',\n \t'rating' => 8.8\n ]);\n\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\t DB::table('users')->insert([\n\t 'name' => $faker->firstNameMale,\n\t 'surname' => $faker->lastName,\n\t 'phone' => rand(37061546100,37069546100),\n\t 'city' => $faker->city,\n\t 'car' => $faker->company,\n\t 'car_year' => rand(1980,2017),\n\t 'email' => $faker->email,\n\t 'password' => bcrypt('inzinierius'),\n\t 'rating' => rand(55, 99) / 10,\n\t ]);\n\t }\n }", "title": "" }, { "docid": "b1559fc256ac5c4b5c1045c0f0e8a8a4", "score": "0.7757995", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n\n \\App\\Models\\User::factory(500)->create();\n \\App\\Models\\Producto::factory(600)->create();\n \\App\\Models\\Pregunta::factory(1601)->create();\n \\App\\Models\\Comentario::factory(1514)->create();\n \\App\\Models\\Follower::factory(5000)->create();\n \\App\\Models\\Respuesta::factory(3401)->create();\n }", "title": "" }, { "docid": "acd8c5aa6a40c4d8772af72a60c15231", "score": "0.77574354", "text": "public function run()\n {\n \t$this->call(PersonSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(PostSeeder::class);\n /*--Con esto creo 10 usuarios y 3 posteos--\n factory(\\App\\User::class, 10)->create()->each(function ($user) {\n $user->posts()->saveMany(factory(\\App\\Post::class, 3)->make());\n });*/\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "aca60e38bfce5fae0fb865e4ccea4601", "score": "0.77563274", "text": "public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n $authors = \\App\\Models\\Author::factory(8)->create();\n $categories = \\App\\Models\\Category::factory(5)->create();\n \n $books = \\App\\Models\\Book::factory(22)->create();\n\n $books->each(function(\\App\\Models\\Book $bk) use($authors) {\n $bk->authors()->attach(\n $authors->random(rand(1, 2))->pluck('id')->toArray()\n );\n });\n\n $books->each(function(\\App\\Models\\Book $bk) use($categories) {\n $bk->categories()->attach(\n $categories->random(rand(1, 2))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "d29f10984b7a9a2b2a29680ef7f29b48", "score": "0.775588", "text": "public function run()\n {\n DB::table('books')->delete();\n\n Book::create(array(\n 'title' => 'First Title',\n 'isbn' => \"4675455555555557\",\n 'price'=> '12.10',\n 'cover' => 'a.jpg',\n 'author_id' => 1\n ));\n\n Book::create(array(\n 'title' => 'Second Title',\n 'isbn' => \"555555557\",\n 'price'=> '16.10',\n 'cover' => 'b.jpg',\n 'author_id' => 2\n ));\n\n Book::create(array(\n 'title' => 'Third Title',\n 'isbn' => \"46754555\",\n 'price'=> '10.10',\n 'cover' => 'c.jpg',\n 'author_id' => 3\n ));\n }", "title": "" }, { "docid": "0c2ded42e9d0c10f029db7e3ed4b12d8", "score": "0.77556497", "text": "public function run()\n {\n Collaborator::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 Collaborator::create([\n 'Sector' => 'Administractive',\n 'full_name' => $faker->name,\n 'birth_date' => $faker->date('Y-m-d'),\n 'salary' => mt_rand(1500, 2000),\n 'status' => true,\n ]);\n }\n }", "title": "" }, { "docid": "00db072ab00cec4bd1725e29a0bb3cb7", "score": "0.7751737", "text": "public function run()\n {\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'remember_token' => null,\n ]\n );\n\n UserRole::create(\n [\n 'user_id' => $user->id,\n 'role_id' => AppHelper::USER_SUPERADMIN\n ]\n );\n\n }", "title": "" }, { "docid": "064f1e23710aabe50f7131210d3ee5a4", "score": "0.77514464", "text": "public function run()\n {\n \n factory(App\\Type::class, 80)->create(); \n factory(App\\Photo::class, 80)->create();\n factory(App\\Contenu::class, 40)->create(); \n $this->call(menuTableSeeder::class);\n $this->call(UserTableSeeder::class); \n $this->call(UserMenuTableSeeder::class);\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('contenus')->insert([\n 'titre'=> 'voici titre ' . $j ,\n 'prix'=> rand(1, 400),\n 'menu_id' => rand(1, 14),\n 'type_id' => $j,\n 'photo_id' => $j,\n ]);\n }\n }\n \n }", "title": "" }, { "docid": "1f0a50fa2842591d8fbae9ae56978f0b", "score": "0.7750377", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $this->call(RolesTableSeeder::class);\n\n // $faker = Faker::create('id_ID');\n\n // for ($i=0; $i < 10 ; $i++) { \n // DB::table('coba2')\n // ->insert([\n // 'nama'=>$faker->name\n // ]);\n // }\n }", "title": "" }, { "docid": "4958ed0abf866906c5d7a7246225bf5b", "score": "0.77496284", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n // $this->call(ProductoTableSeeder::class);\n factory('App\\Producto', 5)->create();\n factory('App\\Proveedor', 5)->create();\n factory('App\\Client', 5)->create();\n factory('App\\Mascota', 5)->create();\n }", "title": "" }, { "docid": "24b9c38dd60797bf8156ad42fe9fa447", "score": "0.7745141", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory( \\App\\User::class , 100 )->create();\n factory(\\App\\Post::class, 1500)->create();\n factory(\\App\\Category::class, 10)->create();\n factory(\\App\\Image::class, 1500)->create();\n factory(\\App\\Comment::class, 2500)->create();\n factory(\\App\\Bid::class, 1500)->create();\n factory(\\App\\Report::class, 15)->create();\n\n }", "title": "" }, { "docid": "c493764ad5b414fc41be06adcd91283d", "score": "0.7744368", "text": "public function run()\n {\n $this->call(CategorySeeder::class);\n factory(\\App\\Models\\User::class,1)->create();\n factory(\\App\\Models\\Announcement::class,15)->create();\n\n }", "title": "" }, { "docid": "756e1e45f695ea39ad39e056034c1896", "score": "0.77388614", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class, 5)->create();\n factory(Terms::class, 3)->create();\n factory(Levels::class, 4)->create();\n factory(ClassType::class, 5)->create();\n factory(Classes::class, 6)->create();\n factory(Subject::class, 10)->create();\n }", "title": "" }, { "docid": "c01585794619650e65c31c6fc9573d03", "score": "0.77383953", "text": "public function run()\n {\n factory(User::class, 10)->create();\n\n factory(Post::class, 20)->create();\n\n factory(Comment::class, 20)->create();\n //\n // $this->call(CategoriesTableSeeder::class);\n // $this->call(BooksTableSeeder::class);\n }", "title": "" }, { "docid": "b43ea34f0172c41cb99daf105ded89cf", "score": "0.77383405", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n DB::table('empresa')\n ->insert([\n 'rif' => 'V123456789',\n 'razon_social' => 'Empresa de prueba, C.A',\n 'direccion' => 'Carupano',\n 'dias_utilidades' => 30,\n 'estatus' => 'activa'\n ]);\n\n DB::table('asignaciones')\n ->insert([\n 'he_diurnas' => 1.5,\n 'he_nocturnas' => 1.8,\n 'feriados' => 1.5,\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('deducciones')\n ->insert([\n 'ivss' => 4,\n 'faov' => 1,\n 'paro_forzoso' => 0.5,\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('cesta_ticket')\n ->insert([\n 'cantidad' => '1800',\n 'desde' => '01-01-2019',\n 'estatus' => 'activa'\n ]);\n\n DB::table('salario_minimo')\n ->insert([\n 'monto' => 18000,\n 'tipo' => 'mensual',\n 'desde' => '01-01-2019',\n 'estatus' => 'activo'\n ]);\n }", "title": "" }, { "docid": "d5c75e93f0f8e33ad3dafaae89c3f7a2", "score": "0.7737602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n (new Train())->truncate();\n (new Schedule())->truncate();\n (new Country())->truncate();\n\n $trainData = [\n 'train_number' => '1'\n ];\n\n $scheduleData = [\n 'time_departure' => '12:00',\n 'time_arrival' => '14:00',\n 'id_train' => '1'\n ];\n\n $countryData = [\n 'country' => 'Dnepr'\n ];\n\n $train = App\\Train::create($trainData);\n\n $schedule = App\\Schedule::create($scheduleData);\n\n $country = App\\Country::create($countryData);\n }", "title": "" }, { "docid": "de69c5c7f3e24fa429ea61201ee8058d", "score": "0.7736333", "text": "public function run()\n {\n // Create a faker instance\n $faker = Faker::create();\n\n // For covering the users, we get the count from user model.\n // So that way the foreign key user_id won't give us any problems.\n\n Category::create(\n [\n 'name'=>'Abogado',\n 'description'=>'Todo lo relacionado a la ley',\n 'role_id'=>0,\n 'role'=>0\n\n ]\n );\n\n for ($i=0; $i < 40; $i++) {\n Category::create(\n [\n 'name'=>$faker->text(45),\n 'description'=>$faker->text(500),\n\t\t\t\t\t'role_id'=>0,\n\t\t\t\t\t'role'=>0\n\n ]\n );\n }\n }", "title": "" }, { "docid": "8a376d33104830ce6aa1e08f1eccb298", "score": "0.7736265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'username' => \"Alice\",\n 'role'=>\"student\",\n 'user_session'=>0,\n ]);\n\n DB::table('users')->insert([\n 'username' => \"Bob\",\n 'role'=>\"student\",\n 'user_session'=>0,\n ]);\n\n DB::table('users')->insert([\n 'username' => \"Professor\",\n 'role'=>\"lecturer\",\n 'user_session'=>0,\n ]);\n\n\n }", "title": "" }, { "docid": "3ac6186a7420c809b274788c1c9f0c6c", "score": "0.77233964", "text": "public function run()\n {\n \tSchema::disableForeignKeyConstraints();\n \tAd::truncate();\n \tSchema::enableForeignKeyConstraints();\n \t$faker = Faker::create();\n for ($i=0; $i < env('SEEDER_ITEM_LIMT'); $i++) { \n \t$title = \"My Test Advert - \".$i;\n \t$title = $title.\"-\".$i;\n \t$slug = \\Str::slug($title, '-');\n\t \tAd::insert([\n\t 'title' => $title,\n\t 'slugurl' => $slug,\n\t 'price' => mt_rand(10, 500),\n\t 'contactnumber' => mt_rand(12, 12),\n\t 'email' => \\Str::random(10, 20).$i.'@mail.com',\n\t 'description' => \"Grab this Christmas special before prices go up!\",\n\t 'category_id' => mt_rand(1,4),\n\t 'currency_id' => mt_rand(1,2),\n\t 'created_at' => \\Carbon\\Carbon::now(),\n\t ]);\n \t}\n }", "title": "" }, { "docid": "f3fac8bb5058ea57eef4e10aa6eee1b8", "score": "0.77152103", "text": "public function run()\n {\n $faker = Faker\\Factory::create('uk_UA');\n\n Doctor::create([\n 'user_id' => 1,\n 'biography' => $faker->text(self::MAX_NB_CHARS),\n 'work_experience' => 5,\n 'is_active' => true,\n ]);\n\n Doctor::create([\n 'user_id' => 2,\n 'biography' => $faker->text(self::MAX_NB_CHARS),\n 'work_experience' => 3,\n 'is_active' => true,\n ]);\n }", "title": "" }, { "docid": "969c4dd5fd7ea0964ba7c8d0fe24bf29", "score": "0.77092785", "text": "public function run()\n {\n factory(\\App\\Models\\Category::class, 50)->create();\n factory(\\App\\Models\\Tag::class, 50)->create();\n\n \\Illuminate\\Support\\Facades\\DB::table('roles')->insert(['name'=>'administrator']);\n \\Illuminate\\Support\\Facades\\DB::table('roles')->insert(['name'=>'user']);\n\n factory(\\App\\Models\\User::class, 50)->create()->each(function($u){\n $team = factory(\\App\\Models\\Team::class)->make();\n $u->own_team()->save($team);\n $u->teams()->save($team);\n $u->roles()->attach(\\App\\Models\\Role::all()->random()->id);\n $u->profile()->save(factory(\\App\\Models\\Profile::class)->make());\n $u->projects()->saveMany(factory(\\App\\Models\\Project::class, rand(3,10))->make())->each(function($p){\n $p->users()->attach(\\App\\Models\\User::all()->random()->id);\n $p->categories()->attach(\\App\\Models\\Category::all()->random()->id);\n $p->tags()->attach(\\App\\Models\\Tag::all()->random()->id);\n });\n $u->clients()->saveMany(factory(\\App\\Models\\Client::class,50)->make());\n });\n }", "title": "" }, { "docid": "045f6aee16de66fd4cb5b31782c1124f", "score": "0.7708508", "text": "public function run()\n {\n Model::unguard();\n // $this->call('UsersTableSeeder');\n factory('App\\PageType', 2)->create();\n factory('App\\OrderStatus', 5)->create();\n factory('App\\Category', 10)->create();\n factory('App\\CompensationPlan', 5)->create();\n factory('App\\Field', 30)->create();\n factory('App\\FindingLine', 30)->create();\n factory('App\\Heading', 200)->create();\n factory('App\\LocalForeign', 5)->create();\n factory('App\\AdType', 30)->create();\n factory('App\\PayPlan', 10)->create();\n factory('App\\PrimaryBook', 50)->create();\n factory('App\\SalesRep', 20)->create();\n factory('App\\SourceBook', 250)->create();\n factory('App\\Udac', 250)->create();\n factory('App\\Customer', 500)->create();\n factory('App\\Order', 500)->create();\n factory('App\\OrderLine', 2000)->create();\n Model::reguard();\n }", "title": "" }, { "docid": "b9ff2268495aff5817159bd76ba8023c", "score": "0.7705018", "text": "public function run()\n {\n //adds the category lists\n $this->call(CategorySeeder::class);\n\n //adds 15 companies (entidades) for testing\n factory(\\App\\Company::class, 15)->create();\n\n //adds 3 accounts for testing\n factory(\\App\\Account::class, 3)->create();\n\n //adds 50 transactions for testing\n factory(\\App\\Transaction::class, 100)->create();\n }", "title": "" }, { "docid": "749d8b2282722f907beee85a97ad43ae", "score": "0.7703396", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $user = factory(User::class)->create([\n 'name' => 'Amitav Office',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'active' => 1,\n ]);\n\n $this->createComments($user->id, 10);\n\n $user = factory(User::class)->create([\n 'name' => 'Amitav Personal',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'active' => 1,\n ]);\n\n $this->createComments($user->id, 4);\n }", "title": "" }, { "docid": "f562a75a25e951d5d5b616b128f2a23d", "score": "0.77031195", "text": "public function run()\n { \n \n // $this->call(UsersTableSeeder::class);\n\n // temporarily disables mass assignment protection for our tables, needed to seed from .sql files.\n \tEloquent::unguard();\n\n \t// seed the locations table\n \t$locations_path = 'sql/locations.sql';\n \tDB::unprepared(file_get_contents($locations_path));\n $this->command->info('Locations table seeded!');\n\n // seed the happy_hours table\n $happy_hours_path = 'sql/happy_hours.sql';\n DB::unprepared(file_get_contents($happy_hours_path));\n $this->command->info('Happy Hours table seeded!');\n\n // seed the roles table.\n $roles_path = 'sql/roles.sql';\n DB::unprepared(file_get_contents($roles_path));\n $this->command->info('Roles table seeded!');\n }", "title": "" }, { "docid": "11f6e7c2dabe7122d9342081e225136f", "score": "0.7699845", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(CategoriaSeeder::class);\n $this->call(InvitadoSeeder::class);\n $this->call(RegaloSeeder::class);\n $this->call(UserSeeder::class);\n Evento::factory(50)->create();\n $this->call(RegistroSeeder::class);\n }", "title": "" }, { "docid": "7ccfa8092296c64ec8e74b65a7ffadc8", "score": "0.7695215", "text": "public function run()\n {\n DB::table('users')->truncate();\n DB::table('suppliers')->truncate();\n DB::table('categories')->truncate();\n DB::table('vendors')->truncate();\n DB::table('products')->truncate();\n\n // $this->call(UsersTableSeeder::class);\n factory(Supplier::class, 50)->create();\n factory(Category::class, 20)->create();\n factory(User::class, 50)->create();\n factory(Vendor::class, 50)->create()->each(static function($v) {\n $v->products()->saveMany(factory(Product::class, rand(1,10))->make());\n });\n }", "title": "" }, { "docid": "acca81c2cdc382edc11610c07dd17bdb", "score": "0.7694645", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n \n\n\n DB::table('categories')->truncate(); \n DB::table('categories')->insert(\n ['name' => 'Clothing'],\n );\n DB::table('categories')->insert(\n ['name' => 'Footwear'],\n );\n DB::table('categories')->insert(\n ['name' => 'Beauty'],\n );\n DB::table('categories')->insert(\n ['name' => 'Cars'],\n );\n DB::table('categories')->insert(\n ['name' => 'Mobile technology'],\n );\n DB::table('categories')->insert(\n ['name' => 'Animals'],\n );\n DB::table('categories')->insert(\n ['name' => 'Sports'],\n ); \n DB::table('categories')->insert(\n ['name' => 'Technology'],\n ); \n DB::table('categories')->insert(\n ['name' => 'Specify'],\n );\n\n\n \n \t \n }", "title": "" }, { "docid": "0d3fa3d1d24b4594f3e479d62e2be438", "score": "0.76877815", "text": "public function run()\n {\n //Static seed for Categories table\n\n Category::create(\n [\n 'name' => 'Controllo Access',\n 'description' => 'Sistemi di controlo accessi integrati'\n ]);\n Category::create(\n [\n 'name' => 'TVCC',\n 'description' => 'Realizzaione sistemi di TVCC'\n ]);\n Category::create(\n [\n 'name' => 'Fornitura e configurazione',\n 'description' => 'Fornitura di apparati configurati'\n ]);\n Category::create(\n [\n 'name' => 'Consulenza',\n 'description' => 'Consulenza Tecnica'\n ]);\n }", "title": "" }, { "docid": "b87cc0dffbf57617ce6dfdb861f468e0", "score": "0.7686323", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //Desativo as Foregn Keys\n DB::statement('SET FOREIGN_KEY_CHECKS = 0;');\n\n //Executo as factories\n dump(factory(\"App\\\\Models\\\\Aluguel\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Ator\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Categorium\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Cidade\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Cliente\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Endereco\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Filme\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeAtor\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeCategorium\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\FilmeTexto\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Funcionario\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Idioma\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Inventario\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Loja\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Pagamento\", 2)->create()->toJson());\n dump(factory(\"App\\\\Models\\\\Pai\", 2)->create()->toJson());\n\n //Ativo as Foregn Keys\n DB::statement('SET FOREIGN_KEY_CHECKS = 1;');\n }", "title": "" }, { "docid": "ad87f4a74146c171f1e42a1d771bd24e", "score": "0.76850647", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\ProductCategory::class, 10)->create();\n factory(App\\ProductSize::class, 10)->create();\n factory(App\\ProductColor::class, 10)->create();\n factory(App\\Product::class, 50)->create()->each(function($product) {\n $product->images()->saveMany(factory(App\\ProductImage::class, 5)->make());\n });\n }", "title": "" }, { "docid": "068a939918fda33f9082cfedcea0988f", "score": "0.7684781", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n\n $models = factory(Model::class )->times(self::GENERATE_NUMBER)->make()->each(function ($model){\n $model->mmid = generate_mmid();\n $model->price = rand(1000 , 9999) / 100;\n $model->download = rand(10 , 999);\n $model->fav = rand(10 , 999);\n $model->view = rand(10 , 999);\n $model->polygons = rand(10 , 999);\n $model->vertices = rand(10 , 999);\n $model->textures = mt_rand(1,2);\n $model->materials = mt_rand(1,2);\n $model->rigged = mt_rand(1,2);\n $model->animated = mt_rand(1,2);\n $model->printable_ready_3d = mt_rand(1,2);\n $model->game_ready = mt_rand(1,2);\n $model->uv_mapped = mt_rand(1,2);\n $model->created_at = \\Carbon\\Carbon::now();\n $model->updated_at = \\Carbon\\Carbon::now();\n\n });\n\n Model::insert($models->toArray());\n }", "title": "" }, { "docid": "bdf30ecf76a15345de09c1ece359c2df", "score": "0.76804036", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Desigination::class, 5)->create();\n factory(Department::class, 5)->create();\n factory(User::class, 10)->create();\n }", "title": "" }, { "docid": "b31fbf2926f8429938cfe290400a6c2f", "score": "0.7674838", "text": "public function run()\n {\n\n Storage::deleteDirectory('menu');\n Storage::makeDirectory('menu');\n\n Category::factory(5)->create();\n $this->call(UserSeeder::class);\n Client::factory(10)->create();\n Role::factory(8)->create();\n State::factory(9)->create();\n $this->call(MenuSeeder::class);\n $this->call(OrderSeeder::class);\n }", "title": "" }, { "docid": "07ea31818e19b1faf98dd1b38d81ebcb", "score": "0.7672805", "text": "public function run()\n {\n Candidate::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 Candidate::create([\n 'firstName' => $faker->firstName,\n 'lastName' => $faker->lastName,\n 'phone' => $faker->phoneNumber,\n 'email'=> $faker->email,\n 'linkCv' => $faker->url,\n 'origin' => rand(1,3),\n 'position'=> rand(1,3),\n 'status'=> rand(0,1),\n ]);\n }\n }", "title": "" }, { "docid": "6b5f957c69605b7e58e0f80311a997a8", "score": "0.7667893", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n $animals = [];\n for ($i = 0; $i < 20; $i++) {\n $animals[] = [\n 'name' => $faker->firstName,\n 'species' => $faker->randomElement($array = array (1, 2)),\n 'breed' => $faker->lastName,\n 'sex' => $faker->randomElement($array = array (1, 2)),\n 'age' => $faker->randomNumber(2),\n 'notes' => $faker->sentence,\n 'contacts' => $faker->phoneNumber,\n 'main_foto' => $faker->imageUrl(500, 500, 'cats'),\n 'published' => 1,\n ];\n }\n DB::table('animals')->insert($animals);\n }", "title": "" }, { "docid": "7c9bdd789d5f65269e40b2e2f526a8ab", "score": "0.7663764", "text": "public function run()\n {\n // $this->call(RolesAndPermissionsSeeder::class);\n // factory(App\\Model\\Place::class, 15)->create();\n // factory(App\\Model\\Scenic_Culture::class, 30)->create();\n // factory(App\\Model\\Promotion::class, 20)->create();\n // factory(App\\Model\\TourGuider::class, 30)->create();\n // factory(App\\Model\\Schedule::class, 5)->create();\n // factory(App\\Model\\Review::class, 30)->create();\n factory(App\\Model\\News::class, 15)->create();\n // factory(App\\Model\\Tour::class, 15)->create();\n\n }", "title": "" }, { "docid": "1a1406408dd87b056312265f6b8605cc", "score": "0.7663735", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //\n\n// factory(App\\User::class, 80)->create();\n factory(App\\Client::class, 5)->create();\n factory(App\\Contact::class, 20)->create()->each(function ($contact) {\n App\\Client::all()->random()->contacts()->attach($contact);\n });\n factory(App\\Task::class, 5)->create();\n factory(App\\BillablePurchaseOrder::class, 20)->create();\n factory(App\\NonBillablePurchaseOrder::class, 20)->create();\n // factory(App\\Category::class, 8)->create();\n // factory(App\\Dispatch::class, 500)->create();\n // factory(App\\Item::class, 1000)->create()->each(function ($item) {\n // App\\Dispatch::dispatch()->get()->random()->items()->attach($item);\n // });\n }", "title": "" }, { "docid": "dafd840dc1f11c0cbdd36e194644c7a8", "score": "0.7662661", "text": "public function run()\n {\n //$this->call('UsersTableSeeder');\n $faker = Faker\\Factory::create();\n\n for( $i = 0; $i < 10; $i++ ) {\n \tDB::table('books')->insert([\n\t 'title' => $faker->title,\n\t 'author' => $faker->name,\n\t 'isbn' => $faker->isbn10,\n\t ]);\n }\n }", "title": "" }, { "docid": "831749eecbd9350d2739ac1b2536d247", "score": "0.76618975", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Blog::truncate();\n Category::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $categories = ['Pendidikan','Pengetahuan', 'Sosial','Umum'];\n foreach($categories as $cat){\n Category::create(['name'=>$cat]);\n }\n\n $faker = Faker::create('id_ID');\n $category_id = Category::all()->pluck('id');\n $user_id = User::all()->pluck('id');\n for($i=0;$i<15;$i++){\n Blog::create([\n 'category_id'=>$category_id->random(),\n 'title'=>$faker->sentence(10),\n 'banner'=>'banner'.rand(1,5).'.png',\n 'content'=>implode('<br><br>',$faker->paragraphs),\n 'user_id'=>$user_id->random(),\n 'status'=>'accepted'\n ]);\n }\n }", "title": "" }, { "docid": "0969356d2e9fdf8b6e6080a629d07215", "score": "0.7657977", "text": "public function run()\n {\n $this->call([\n RolesSeeder::class,\n CategoriesSeeder::class,\n FilesSeeder::class\n ]);\n Country::factory()->count(10)->create();\n User::factory()->count(10)->create();\n Category::factory()->count(20)->create();\n Product::factory()->hasAttached(File::factory()->count(5)->create(),[], 'images')->count(30)->create();\n Order::factory()->has(Product::factory()->count(2))->count(20)->create();\n Newsletter::factory()->count(12)->create();\n Promotion::factory()->has(Product::factory()->count(2));\n }", "title": "" }, { "docid": "6a627f470c7a9c5cbcb294efa94e3dbe", "score": "0.76559", "text": "public function run()\n {\n //factory(App\\Book::class, 200)->create();\n $faker = Faker::create();\n \n foreach(range(1, 200) as $x)\n {\n \t$book = Book::create([\n \t\t'name' => $faker->name,\n \t\t'author' => $faker->name,\n \t\t'publishedDate' => $faker->date,\n \t]);\n\n \tforeach(range(1, mt_rand(2, 4)) as $y)\n \t{\n \t\t$book->categories()->attach(Category::all()->random()->id);\n \t}\n }\n }", "title": "" }, { "docid": "05177be6524fe4d70cf88eb80b07f0f9", "score": "0.76558113", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionTableSeeder::class);\n \n $this->call(CreateAdminUserSeeder::class);\n\n \n factory(App\\User::class,1)->create();\n factory(App\\Models\\Category::class,1)->create();\n factory(App\\Models\\Brand::class,1)->create();\n factory(App\\Models\\Subcategory::class,1)->create();\n factory(App\\Models\\Product::class,10)->create();\n factory(App\\Models\\Color::class,1)->create();\n factory(App\\Models\\Size::class,1)->create();\n }", "title": "" }, { "docid": "b07e760db9234bd6822f6d81a39f753f", "score": "0.76546866", "text": "public function run()\n {\n $this->seeds([\n KlasifikasiPenyakit::class => ['master/penyakit/klasifikasi_penyakit.csv', 22],\n KelompokPenyakit::class => ['master/penyakit/kelompok_penyakit.csv', 537],\n Penyakit::class => ['master/penyakit/penyakit.csv', 13309],\n ]);\n }", "title": "" }, { "docid": "7faf74d1087f03f60414bc0fbbc49004", "score": "0.76546746", "text": "public function run()\n {\n //\n\n// Students::truncate();\n\n // Initialize the Faker package. We can use several different locales for it, so\n // let's use the german locale to play with it.\n $faker = \\Faker\\Factory::create('de_DE');\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Students::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'registration_number' => $faker->numberBetween(0, 99999),\n 'starting_course' => ( $faker->numberBetween(0, 1) == 0 ) ? 'MPP' : 'FPP'\n ]);\n }\n }", "title": "" }, { "docid": "9a0aab2ba333b8672b30964e15cc6493", "score": "0.76514786", "text": "public function run()\n {\n //使用DB方式\n /*DB::table('users')->insert([\n 'name' => str_random(10),\n 'email' => str_random(10).'@gmail.com',\n 'password' => bcrypt('secret'),\n ]);*/\n\n //使用模型工厂\n /*factory(App\\Model\\Role::class, 50)->create()->each(function ($u) {\n $u->posts()->save(factory(App\\Post::class)->make()); //模型关联插入\n });*/\n\n factory(App\\Model\\Role::class, 5)->create();\n //执行命令 php artisan db:seed --class=RolesSeeder\n }", "title": "" }, { "docid": "05857a6ff127b2c1e1f9f0bcb8aa242c", "score": "0.76498", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['name' => 'admin',\n 'email' => '[email protected]',\n 'password' => 'admin'],\n ['name' => 'youke',\n 'email' => '[email protected]',\n 'password' => 'youke'],\n ]);\n\n DB::table('menus')->insert([\n ['name'=>'skill','url'=>'/admin'],\n ['name'=>'portfolio','url'=>'/admin'],\n ['name'=>'education','url'=>'/admin'],\n ['name'=>'work','url'=>'/admin'],\n ['name'=>'菜单列表','url'=>'/admin/menu/index'],\n ]);\n }", "title": "" }, { "docid": "e4f4934df5701d0ca97044ef7d5c2079", "score": "0.7649058", "text": "public function run()\n {\n // clear our database ------------------------------------------\n DB::table('users')->delete();\n \n\n $first_user = User::create(array(\n 'name' => 'Muhammad Nauman',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ));\n\n \n \n $this->command->info('Users are seeded!');\n \n // now seed the departments\n DB::table('department')->delete();\n \n\n $first_dpt = Department::create(array(\n 'department_name' => 'Computer Science',\n 'contact' => '0313',\n 'status' => 'Active',\n 'hod_id' => $first_user->id,\n 'entered_id' => $first_user->id,\n ));\n \n $this->command->info('Department are seeded!');\n \n // now seed the programs\n DB::table('programs_offered')->delete();\n \n\n $first_program = ProgramOffered::create(array(\n 'program_name' => 'BSCS',\n 'duration' => '4',\n 'code' =>'BS',\n 'status' => 'Active',\n 'incharge_id' => $first_user->id,\n 'entered_id' => $first_user->id,\n 'department_id' => $first_dpt->id,\n ));\n $this->command->info('Program are seeded!');\n \n }", "title": "" }, { "docid": "d7ebe12cdf5432aa34add67af7be50b3", "score": "0.76487887", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n $faker->addProvider(new \\Bezhanov\\Faker\\Provider\\Species($faker));\n foreach(range(0,7) as $i){\n DB::table('plants')->insert([\n 'name' => $faker->plant,\n 'description' => $faker->sentence(20,true),\n 'price' => $faker->randomNumber(6),\n 'rate' => $faker->randomFloat(NULL,0,5),\n 'types' => 'popular',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }\n }", "title": "" }, { "docid": "c73b07e08ed90eb5b38fd5ee302292bc", "score": "0.7647306", "text": "public function run()\n {\n /*\n * Calling the seeds in the following order ensures that foreign key \n * constraints are not violated\n */\n factory(App\\Hostel::class, 1)->create(); //add 10 hostels\n factory(App\\AuthorizationLevel::class, 1)->create(); //add 3 auth levels\n DB::table('complaints_status')->insert(array(\n array('name'=>'submitted','message'=>'Your complaint has been submitted','is_viewable'=>true, 'is_editable'=>true, 'is_creatable'=>true, 'is_deletable'=>true),\n array('name'=>'in progress','message'=>'Your complaint is in progress','is_viewable'=>true, 'is_editable'=>false, 'is_creatable'=>false, 'is_deletable'=>false),\n array('name'=>'completed','message'=>'Your complaint has been completed','is_viewable'=>true, 'is_editable'=>false, 'is_creatable'=>false, 'is_deletable'=>false))); \n \n /*Submitted, In progress, completed*/\n }", "title": "" }, { "docid": "18fd1caf8ca6a7017a4b6b4067046cb1", "score": "0.7647273", "text": "public function run()\n {\n $this->call(AdminSeeder::class);\n $this->call(SuperAdminRoleseeder::class);\n $this->call(ProductCategorySeeder::class);\n $this->call(ProductColorSeeder::class);\n $this->call(ProductTagSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(ProductSizeSeeder::class);\n\n factory(\\App\\User::class,10)->create();\n factory(\\App\\Tag::class,5)->create();\n factory(\\App\\Post::class,10)->create()->each(function ($post){\n return $post->like()->save(factory(\\App\\Like::class)->make());\n });\n factory(\\App\\Comment::class,50)->create();\n\n }", "title": "" }, { "docid": "e962f279a1dbddfaa2db67cf48a15f39", "score": "0.76464486", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\"name\" => \"Administrador\"]);\n Role::create([\"name\" => \"Común\"]);\n User::create([\n \"name\" => \"4dm1n\",\n \"email\" => \"[email protected]\",\n \"role_id\" => 1,\n \"password\" => bcrypt(\"Pollo\")\n ]);\n }", "title": "" }, { "docid": "3754b8504d32198111105ff3083d9046", "score": "0.76400363", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('grades')->truncate();\n DB::table('teachers')->truncate();\n DB::table('lessons')->truncate();\n DB::table('students')->truncate();\n DB::table('marks')->truncate();\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Grade::factory(5)->create();\n Teacher::factory(5)->create();\n Lesson::factory(4)->create();\n Student::factory(10)->create();\n Mark::factory(20)->create();\n\n User::factory(3)->state(new Sequence(\n [\n 'name' => 'Nicolas',\n 'email' => '[email protected]',\n ],\n [\n 'name' => 'Alexis',\n 'email' => '[email protected]',\n ],\n [\n 'name' => 'Karine',\n 'email' => '[email protected]',\n ],\n ))->create();\n }", "title": "" }, { "docid": "8e6adf883c596121b0906ea06e5abf6c", "score": "0.76395786", "text": "public function run()\n {\n $faker = Faker::create();\n $categories = Category::pluck('id')->all();\n $roles = Role::pluck('id')->all();\n foreach (range(1,20) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->safeEmail,\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'biography' => $faker->paragraph,\n 'password' => $faker->password,\n 'category_id' => $faker->randomElement($categories),\n 'role_id' => $faker->randomElement($roles),\n 'birth' => $faker->date,\n 'created_at' => $faker->dateTime($max = 'now'),\n 'updated_at' => $faker->dateTime($max = 'now'),\n ]);\n }\n }", "title": "" }, { "docid": "b063def35fe79f7a0710248af466f402", "score": "0.76395", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n $article = DB::table('articles');\n\n $article->truncate();\n\n for($i = 0; $i < 100; $i++){\n $title = $faker->sentence;\n\n $article->insert([\n 'title' => $title,\n 'slug' => str_slug($title),\n 'short_description' => $faker->realText(500),\n 'description' => $faker->realText(10000),\n 'created_at' => $faker->dateTimeBetween(),\n 'updated_at' => $faker->dateTimeBetween(),\n ]);\n }\n }", "title": "" }, { "docid": "b3e9a647fe40c3c7848b4498aaefaeb3", "score": "0.76392335", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES_DETAILS')->delete();\n $data = [];\n foreach (range(1, 100) as $value) {\n foreach (range(1, 5) as $value_v) {\n $data[] = [\n 'sales_id' => $value,\n 'product_id' => $value_v,\n 'price' => 400\n ];\n }\n }\n DB::table('MST_SALES_DETAILS')->insert($data);\n }", "title": "" }, { "docid": "3b722497c87d9f24b84a12a29c4abd9f", "score": "0.76390076", "text": "public function run()\n {\n\n // $this->call(UserTableSeeder::class);\n\n // App\\User::create([\n // 'name'=>'tester',\n // 'email'=>'[email protected]',\n // 'password'=>bcrypt('secret')\n // ]);\n\n $severities = [\n [\n 'rating' => 1,\n 'description' => 'easy walk',\n ],\n [\n 'rating' => 2,\n 'description' => 'moderate walk',\n ],\n [\n 'rating' => 3,\n 'description' => 'strenuous walk',\n ],\n [\n 'rating' => 4,\n 'description' => 'very strenuous walk',\n ]\n ];\n\n $exposures = [\n [\n 'rating' => '1',\n 'description' => 'no exposure to heights',\n ],\n [\n 'rating' => '2',\n 'description' => 'mild exposure to heights',\n ],\n [\n 'rating' => '3',\n 'description' => 'moderate exposure to heights',\n ],\n [\n 'rating' => '4',\n 'description' => 'extreme exposure to heights',\n ]\n ];\n\n DB::table('severities')->delete();\n foreach ($severities as $severity) {\n DB::table('severities')->insert($severity);\n }\n\n DB::table('exposures')->delete();\n foreach ($exposures as $exposure) {\n DB::table('exposures')->insert($exposure);\n }\n\n if (!$severities = DB::table('severities')->select('id')->get()) {\n exit('There are no severities in the db.');\n }\n\n if (!$exposures = DB::table('exposures')->select('id')->get()) {\n exit('There are no exposures in the db.');\n }\n\n $severity_ids = [];\n foreach ($severities as $s) {\n $severity_ids[] = $s->id;\n }\n\n $exposure_ids = [];\n foreach ($exposures as $e) {\n $exposure_ids[] = $e->id;\n }\n\n $trails = [\n [\n 'name' => 'Skeleton Gorge',\n 'description' => 'strenuous shady trail, that leads to a dam',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-01-09 22:14:06',\n ],\n [\n 'name' => 'Contour Path',\n 'description' => 'very long level path that goes almost around the table mountain.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-07-10 10:16:11',\n ],\n [\n 'name' => 'Pipe Track',\n 'description' => 'easy trail with historical water pipes.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-01-06 13:04:06',\n ],\n [\n 'name' => 'platteklip gorge',\n 'description' => 'steep trail up the face of table mountain.',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-02-28 16:10:06',\n ],\n [\n 'name' => 'kasteels poort',\n 'description' => 'goes from the pipe track up to the twelve apostles',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'table mountain road',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'tokai forest',\n 'description' => 'walk under the trees',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'muizenberg peak',\n 'description' => 'ajofda owerij pasofk ewfjolefakfdj oa fej, asldfj',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-05-22 19:01:38',\n ],\n [\n 'name' => 'sIlvermines',\n 'description' => 'o accessused t plowerf the mountain by carts oar',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'newlands Ravine',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2014-12-31 23:59:59',\n ],\n [\n 'name' => 'the saddle',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-06-10 00:14:06',\n ],\n [\n 'name' => 'cable car',\n 'description' => 'fsadofewm fpaofk epwfkpwef faehg kuylo ',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'hely hutchinson dam',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n [\n 'name' => 'old dogs trail',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2016-10-16 15:14:06',\n ],\n [\n 'name' => '1234 32432 afasdfsa',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n 'created_at' => '2015-08-19 22:14:06',\n ],\n [\n 'name' => 'pfasdf 99',\n 'description' => 'used to access lower parts of the mountain by car',\n 'severity_id' => $severity_ids[rand(0, 3)],\n 'exposure_id' => $exposure_ids[rand(0, 3)],\n ],\n ];\n\n DB::table('trails')->delete();\n foreach ($trails as $trail) {\n DB::table('trails')->insert($trail);\n }\n\n $trails = DB::table('trails')->select('id')->get();\n\n $trail_ids = [];\n foreach ($trails as $trail) {\n $trail_ids[] = $trail->id;\n }\n\n $count = count($trail_ids);\n\n $hikes = [\n [\n 'title' => 'newlands forest to the blockhouse',\n 'description' => 'Hike from newlands forest to the King\\'s Blockhouse.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('newlands forest to the blockhouse'),\n ],\n [\n 'title' => 'cecilia forest to hely hutchinson dam via skeleton gorge',\n 'description' => 'A steep climb up skeleton gorge to hely hutchinson dam and back down via nursery ravine',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('cecilia forest to hely hutchinson dam via skeleton gorge'),\n ],\n [\n 'title' => 'Rhodes Memorial to Woodstock Cave',\n 'description' => 'A nice hike from Rhodes Mem to Woodstock Cave.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('Rhodes Memorial to Woodstock Cave'),\n ],\n [\n 'title' => 'Twelve Apostles',\n 'description' => 'A very long hike.',\n 'severity_id' => $severity_ids[rand(0,3)],\n 'exposure_id' => $exposure_ids[rand(0,3)],\n 'slug' => str_slug('Twelve Apostles'),\n ],\n ];\n\n DB::table('hikes')->delete();\n DB::table('hike_trail')->delete();\n foreach ($hikes as $hike) {\n $id = DB::table('hikes')->insertGetId($hike);\n $number_of_trails_to_add = rand(0, $count);\n\n $i = 0;\n $used_trail_ids = [];\n while($number_of_trails_to_add >= $i) {\n\n while(in_array($trail_id = rand(0, ($count - 1)), $used_trail_ids)) {\n continue;\n }\n\n $used_trail_ids[] = $trail_id;\n $hike_trail = [\n 'hike_id' => $id,\n 'trail_id' => $trail_ids[$trail_id],\n ];\n DB::table('hike_trail')->insert($hike_trail);\n $i++;\n }\n\n }\n\n\n }", "title": "" }, { "docid": "154cba18dfdeb8c4ad5a965ced753dd9", "score": "0.76387894", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,25) as $value) {\n DB::table('posts')->insert([\n 'title' => $faker->title(),\n 'image' => $faker->imageUrl('public/storage/images', 640, 480, null, false),\n 'description' => $faker->text(),\n 'category_id' => rand(1,5),\n 'user_id' => rand(1,15),\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }\n }", "title": "" }, { "docid": "2484f545498eece99a69d15fb3058fc2", "score": "0.76387566", "text": "public function run()\n {\n // Create fixed statuses\n foreach (array('hotovo', 'rozpracované', 'v poradí') as $status) {\n DB::table('statuses')->insert([\n 'name' => $status,\n ]);\n };\n\n $this->call([\n UsersTableSeeder::class,\n GrantsTableSeeder::class,\n SolventsTableSeeder::class,\n SpectrometersTableSeeder::class,\n LabsTableSeeder::class,\n AnalysesTableSeeder::class,\n SamplesTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "db33a8329f4133fb77121f041bfcf078", "score": "0.7637611", "text": "public function run()\n\t{\n\t\tDB::table('users')->delete();\n\n\t\t$faker = Faker\\Factory::create();\n\t\t\n\t\t$seeds = array(\n\t\t\tarray(\n\t\t\t\t'id' => 1,\n\t\t\t\t'name' => 'admin',\n\t\t\t\t'slug' => 'admin',\n\t\t\t\t'first_name' => 'John',\n\t\t\t\t'last_name' => 'Doe',\n\t\t\t\t'location' => 'Anytown, USA',\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => Hash::make('password'),\n\t\t\t\t'admin' => true\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 2,\n\t\t\t\t'name' => 'username',\n\t\t\t\t'slug' => 'username',\n\t\t\t\t'first_name' => $faker->firstName,\n\t\t\t\t'last_name' => $faker->lastName,\n\t\t\t\t'location' => $faker->city . ', ' . $faker->country,\n\t\t\t\t'email' => '[email protected]',\n\t\t\t\t'password' => Hash::make('password'),\n\t\t\t\t'admin' => false\n\t\t\t)\n\t\t);\n\n\t\tDB::table('users')->insert($seeds);\n\n\t\t$users = factory(App\\User::class, 8)->create();\n }", "title": "" }, { "docid": "a94882201bbeb65b0ddb261fe6987a0a", "score": "0.76362485", "text": "public function run()\n { \n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 2\n ]);\n User::create([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret'),\n 'role' => 1\n ]);\n User::create([\n 'name' => 'Infinety Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'role' => 1\n ]);\n // \\App\\Models\\User::factory(10)->create();\n Categorias::factory(20)->create();\n Productos::factory(100)->create();\n }", "title": "" }, { "docid": "d63961b4949c2a17bd2ffc48673c0ad3", "score": "0.763493", "text": "public function run()\n {\n factory(App\\User::class, 50)->create();\n\n factory(App\\Team::class, 10)->create();\n\n App\\Role::insert([\n ['id' => 1, 'title' => 'developer'],\n ['id' => 2, 'title' => 'junior developer'],\n ['id' => 3, 'title' => 'quality assurance'],\n ['id' => 4, 'title' => 'project manager'],\n ['id' => 5, 'title' => 'team leader']\n ]);\n }", "title": "" }, { "docid": "4ae83842aaa0c70b457171306e60ba4a", "score": "0.7630802", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $user=factory(\\App\\User::class)->create();\n factory(\\App\\Course::class,6)->create(['user_id'=>$user->id])->each(function($course){\n factory(\\App\\Episode::class,rand(5,20))->make()->each(function($episode,$key) use ($course){\n $episode->number=$key+1;\n $course->episodes()->save($episode);\n });\n });\n }", "title": "" }, { "docid": "09a6cf87bc1f7ee46aa35dd6a863c3f3", "score": "0.7628901", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n DB::table('companies')->insert([\n 'ar_name' => 'نبذة تعريفية عن الشركة',\n 'ar_profile' => 'نبذة',\n 'en_name' => 'A brief about the company',\n 'en_profile' => 'Details',\n 'projectSuccessful' => '1',\n 'yearsOfExperienced' => '2',\n 'professionalExpert' => '3',\n 'happyCustomers' => '4',\n ]);\n factory(\\App\\User::class, 1)->create();\n factory(\\App\\Account::class, 1)->create();\n factory(\\App\\Affair::class, 1)->create();\n factory(\\App\\System::class, 1)->create();\n factory(\\App\\Pharmacy::class, 1)->create();\n factory(\\App\\Support::class, 1)->create();\n // $this->call(CompaniesSeeder::class);\n }", "title": "" }, { "docid": "576a34543681e3fe684e1e40febacb80", "score": "0.7628569", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // $user = \\App\\Models\\User::factory()\n // ->has(\\App\\Models\\Article::factory()->count(10))\n // ->create();\n\n $posts = Article::factory()\n ->count(10)\n ->for(User::factory()->state([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]))\n ->create();\n\n // \\App\\Models\\Article::factory(10)->create();\n \\App\\Models\\Tag::factory(20)->create();\n $tags = Tag::all();\n Article::all()->each(function ($article) use ($tags) { \n $article->tags()->attach(\n $tags->random(rand(1, 3))->pluck('id')->toArray()); \n });\n }", "title": "" }, { "docid": "d2507ab89d2d83f52c957a1a22b5f496", "score": "0.76283425", "text": "public function run()\n {\n $faker = Factory::create();\n\n GrupoEquipo::truncate();\n Equipo::truncate();\n\n foreach(range(1, 5) as $i) {\n GrupoEquipo::create([\n 'zona_id' => $i,\n 'name' => $faker->unique()->name,\n 'description' => $faker->paragraph\n ]);\n foreach(range(1, 10) as $i) {\n Equipo::create([\n 'grupo_equipo_id' => mt_rand(1, 5),\n 'name' => $faker->unique()->name,\n 'marca' => $faker->name,\n 'tipo' => $faker->name,\n 'tarifa' => $faker->randomFloat($nbMaxDecimals = 5, $min = 0, $max = 400)\n ]);\n }\n }\n }", "title": "" }, { "docid": "0ec002cddee037e0013565674e9189ca", "score": "0.76273686", "text": "public function run()\n {\n $this->call([\n BlogStatusSeeder::class,\n CategorySeeder::class,\n SiteConfigSeeder::class,\n ]);\n User::factory(1)->create();\n\n Blog::factory(100)->create();\n\n BlogView::factory(200)->create();\n\n BlogComment::factory(200)->create();\n\n ContactMessage::factory(15)->create();\n }", "title": "" }, { "docid": "3c41de562e9a6d240427b1bd3d7ddd73", "score": "0.76248515", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Master User',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n\n $faker = Faker\\Factory::create();\n\n \tfor ($i=0; $i < 9; $i++) { \n\t \tDB::table('posts')->insert([\n\t 'title' => $faker->sentence($nbWords = 4, $variableNbWords = true) , \n\t 'body' => $faker->text,\n\t 'created_at' => date(\"Y-m-d h:i:s\"),\n\t 'updated_at' => date(\"Y-m-d h:i:s\"),\n\t 'author' => 'Master User',\n\t 'thumbnail' => 'blog_pic.png',\n\t 'user_id' => 1\n\t ]);\n\n \t}\n }", "title": "" }, { "docid": "fb3e6d03992e991fc3469db9d336e1d0", "score": "0.7623802", "text": "public function run()\n {\n $faker = Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Fruit::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n for ($i = 1; $i <= 20; $i++) {\n Fruit::create([\n 'nom' => $faker->name,\n 'pays_origin' => $faker->name,\n 'price' => mt_rand(1, 1000)\n ]);\n }\n }", "title": "" } ]
10d06aa4df6eab9e80cac831bd8a146c
Read data from database
[ { "docid": "9dcab033fb8570fe070e49dd1e59cb34", "score": "0.0", "text": "public function registerUserAndSaveToDb($name, $email, $password) {\n $sqlInsert = \"INSERT INTO users (name, email, password) VALUES ('$name','$email','$password')\";\n\n// if ($result->num_rows > 0) {\n//// \n// while ($row = $result->fetch_assoc()) {\n// echo '<p></p>'.$row[\"name\"];\n// }\n// }\n\n $result = 2;\n if ($this->conn->query($sqlInsert) === true) {\n// echo '<h2>User created successfullys</h2>';\n $result = 1;\n echo json_encode(array('message' => 'User registered successgully ', 'status' => '1'));\n } else {\n// echo '<h2>Error inserting user </h2>' . $this->conn->error;\n// echo json_encode($cat_arr);\n echo json_encode(array('message' => 'User not registered ', 'status' => '2'));\n }\n return $result;\n }", "title": "" } ]
[ { "docid": "88886e2a3db30e898fcfe11d87544df8", "score": "0.75778687", "text": "function readFromDatabase() {\n $query = 'SELECT ikarmapos, ikarmaneg FROM '.sql_table('item').' WHERE inumber=' . $this->itemid;\n $res = sql_query($query);\n $obj = sql_fetch_object($res);\n\n $this->karmapos = $obj->ikarmapos;\n $this->karmaneg = $obj->ikarmaneg;\n $this->inforead = 1;\n }", "title": "" }, { "docid": "bfa3b8d1a91da1d55effade8bd832e18", "score": "0.7366677", "text": "public function readDataFromDb(){\r\n $sql = \"SELECT id,name FROM .$this->table\";\r\n $result = $this->conn->query($sql);\r\n \r\n// if ($result->num_rows > 0) {\r\n//// \r\n// while ($row = $result->fetch_assoc()) {\r\n// echo '<p></p>'.$row[\"name\"];\r\n// }\r\n// }\r\n \r\n return $result;\r\n }", "title": "" }, { "docid": "64604328e2d73c1db76c78efd25e0180", "score": "0.73365706", "text": "public function read() {\r\n $qry = \"SELECT * FROM \".$this->table_name.\" ORDER BY id\";\r\n $st=$this->conn->prepare($qry);\r\n $st->execute();\r\n return $st;\r\n }", "title": "" }, { "docid": "6ed3d7cadafb815c927525ca9febba88", "score": "0.72401315", "text": "function read(){\n //select all data\n $query = \"SELECT\n *\n FROM\n \" . $this->table_name ; \n\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "86749892248e03d97da663f8a0541a4d", "score": "0.7111113", "text": "public function read()\n {\n $data = array();\n $sql = \"SELECT * FROM news_article\"; // Mengambil data dari table news_article\n $stmt = $this->conn->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n foreach ($result as $row) {\n $data[] = $row;\n }\n return $data;\n }", "title": "" }, { "docid": "f2eddc91e09d0ba284ecd1daedb8964d", "score": "0.7093272", "text": "public function read(){\n\t\t// select all query\n\t $query = \"SELECT FIRST 10 * FROM \" . $this->table_name;\n\t \t\n\t // prepare query statement\n\t $stmt = $this->conn->prepare($query);\n\t \n\t // execute query\n\t $stmt->execute();\n\n\t return $this->get($stmt);\n\t}", "title": "" }, { "docid": "e2eb638628555cc2174f9e735a920a3a", "score": "0.70897007", "text": "function read(){\n $query = \"SELECT * FROM \" . $this->table_name;\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "e2eb638628555cc2174f9e735a920a3a", "score": "0.70897007", "text": "function read(){\n $query = \"SELECT * FROM \" . $this->table_name;\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "a0f544dc908c36a07c228128368c2444", "score": "0.7064676", "text": "abstract public function readFromDb($id);", "title": "" }, { "docid": "8081dc01d04273030862572f6bbdb67b", "score": "0.70421094", "text": "public function databaseRead() {\n $db = mysqli_connect($this->ini['databasehost'], $this->ini['databaseusername'], $this->ini['databasepassword'], $this->ini['databasename']);\n $sql = \"SELECT * FROM $this->databaseTableOrFileName\";\n $result = mysqli_query($db, $sql);\n mysqli_close($db);\n if (!$result) {\n trigger_error(\"database query failed: \", E_USER_ERROR);\n }\n\n $this->localTable = array();\n while ($rowAssociativeArray = $result->fetch_assoc()) {\n $rowEntity = clone $this->itemToClone;\n $rowEntity->populateFromDatabaseTableAssociativeArray($rowAssociativeArray);\n array_push($this->localTable, $rowEntity);\n }\n }", "title": "" }, { "docid": "7c9832e802aeb359a89b7f2ec152b385", "score": "0.7022878", "text": "public function read() {\r\n\r\n //query\r\n $query = 'SELECT * FROM ' .$this->table;\r\n\r\n //prepare statement\r\n $stmt = $this->conn->prepare($query);\r\n\r\n //execute\r\n $stmt->execute();\r\n\r\n return $stmt;\r\n \r\n }", "title": "" }, { "docid": "e7fca629f2a5551f35ef32cb266d37c1", "score": "0.70153105", "text": "public function read(){\r\n\t\t\r\n\t\t$this->obj = new Crud1();\r\n\r\n\t\t// INNER JOIN for taking the users data along with user role name \r\n\r\n\t\t$this->data = $this->obj->get_data(\"select users.username, users.id,users.email , users.password, roles.name from users INNER JOIN roles ON users.roles = roles.id \");\r\n\t\t\r\n\t\treturn $this->data;\r\n\t}", "title": "" }, { "docid": "c7cff97c4fabf377da91e4323be4cd19", "score": "0.69717914", "text": "function _read_all() {\n $table = array();\n $this->dbh = dba_open($this->dbfile, \"r\");\n $key = dba_firstkey($this->dbh);\n while ($key) {\n $serialized_data = dba_fetch($key, $this->dbh);\n $this->data = unserialize($serialized_data);\n $table[$key]['email'] = $this->data['email'];\n $table[$key]['fname'] = $this->data['fname'];\n $table[$key]['lname'] = $this->data['lname'];\n $key = dba_nextkey($this->dbh);\n }\n dba_close($this->dbh);\n return $table;\n }", "title": "" }, { "docid": "73b0649c06a5602b9e737a609f48b6a5", "score": "0.6896404", "text": "public function read()\n {\n $db_query = \"SELECT *FROM \" . $this->table_name . \" ORDER BY id ASC\";\n $statement = $this->connection->query($db_query);\n $statement->fetch(PDO::FETCH_ASSOC);\n $statement->execute();\n\n return $statement;\n }", "title": "" }, { "docid": "69526c40efdca20ad5fa43bf86570c3a", "score": "0.68877846", "text": "function read()\n {\n $this->business_id = htmlspecialchars(strip_tags($this->business_id));\n \n $query = \"SELECT Business_ID, Machine_ID, Machine_Name\n FROM \". $this->table_name .\"\n WHERE Business_ID = '\". $this->business_id .\"'\n ORDER BY Machine_Name\";\n \n // prepare it\n $stmt = $this->conn->prepare($query);\n \n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "b4fca0e80e3f3217805ce1731ad60cff", "score": "0.68696487", "text": "protected function fillDataFromDb()\n {\n $tableName = $this->table->getName();\n $keys = $this->getKeysForSaveQuery();\n\n $quotedTableName = static::quote($tableName);\n $where = static::conditionsToSqlWhere($keys);\n\n if (!empty($where)) {\n $where = 'WHERE ' . $where;\n }\n\n $sql = \"\n SELECT *\n FROM $quotedTableName\n $where\n LIMIT 1\n \";\n\n $result = $this->_dbr->getRow($sql);\n\n static::assertDbResult($result);\n\n $this->data = $result;\n }", "title": "" }, { "docid": "e0ffe1de59174ae4953b518924b1025e", "score": "0.6865131", "text": "public function Read($data){\n\t\t$filteredArray = $this->Filter($data, array( $this->primary_key_name => 'required'));\n\t\t\n\t\t$invalidArray = $this->Validate($filteredArray['data'], array( $this->primary_key_name => 'required'));\n\t\tif( count($invalidArray) > 0){\n\t\t\tResponse::Respond(false, null, 'Primary key data was invalid!', 500);\n\t\t}\n\n\n\t\t$primary_value = $filteredArray['data'][$this->primary_key_name];\n\n\n\t\t$dbres = CRUD::GetRow($this->table_name, $this->primary_key_name, $primary_value);\n\t\tif($dbres != null){\n\t\t\t$res = Response::CreateSuccessTemplate($dbres, 'Success');\n\t\t\tResponse::RespondJSON($res, 200);\n\t\t}\n\t\telse{\n\t\t\t$res = Response::CreateErrorTemplate(null, 'Not found');\n\t\t\tResponse::RespondJSON($res, 500);\n\t\t}\n\t}", "title": "" }, { "docid": "ccdecc1ce46c328a71407c30d5220eb2", "score": "0.68457294", "text": "public function read_all()\n {\n // DB query\n $sql = \"SELECT * FROM springtest20.\" . $this->table . \";\";\n $result = mysqli_query($this->conn, $sql);\n return $result;\n }", "title": "" }, { "docid": "d4e9d7cfe1e00111ac8bd3a98c00a01e", "score": "0.68167585", "text": "public function read()\n {\n /**\n * @the data array\n */\n $data = array();\n \n //prepare the query using PDOStatment\n $stmt = $this->conn->prepare(\"SELECT * FROM \" . $this->tableName . \" WHERE user_delete=:userdelete\");\n\n $this->userDelete = \"not deleted\";\n //Bind Parameters using PDO Statment\n $stmt->bindParam(\":userdelete\",$this->userDelete);\n\n //execute the PDOStatment\n $stmt->execute();\n\n //fetchAll PDO Associative data from the PDOStatement which executes previously\n $result=$stmt->fetchAll(PDO::FETCH_ASSOC);\n\n //stores the $result data to the $data array\n foreach($result as $row)\n {\n $data[]=$row;\n }\n return $data;\n }", "title": "" }, { "docid": "f009ca5878c0bfe1f5f6b3943de25209", "score": "0.6806981", "text": "function readDatabase() { return $this->_database; }", "title": "" }, { "docid": "e257a618e12628952319039211881d5a", "score": "0.67884004", "text": "public function readall(){\r\t\t$query=\"select * from `\".$this->table_name.\"`\";\r\t\t$result=mysqli_query($this->conn,$query);\r\t\treturn $result;\r\t}", "title": "" }, { "docid": "cdbdb5c7ed35f82af2f4e4563aa7e967", "score": "0.6748871", "text": "public function readAll()\n {\n //Se guarda la consulta sql\n $sql = 'SELECT id_inventario, public.inventario.nombre as nombre_producto, precio, public.inventario.descripcion, descuento, stock, autor, imagen, public.proveedor.nombre, tipo_producto, nombre_marca\n FROM public.inventario\n INNER JOIN public.tipo_producto USING(id_tipo_producto) \n INNER JOIN public.proveedor USING(id_proveedor) \n INNER JOIN public.marca USING(id_marca) \n ORDER BY public.inventario.nombre';\n //Se guarda un array con los parametros de la consulta(vacío)\n $params = null;\n //Se retorna la ejecución del método \"getRow\"\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "c17823592c88c3952de7e3839e87ff6e", "score": "0.6744204", "text": "function readDataBase($sql) {\n\t\t$database = mamboDatabase::getInstance();\n\t\t$database->setQuery( $sql );\n\t\tif (!$database->loadObject($this)) $this->id = 0;\n\t}", "title": "" }, { "docid": "e5d2b3b5a6f7c7fa5292f020af5b54c6", "score": "0.67352486", "text": "function readDataBase($sql) {\r\n\t\t$database = mamboDatabase::getInstance();\r\n\t\t$database->setQuery( $sql );\r\n\t\tif (!$database->loadObject($this)) $this->id = 0;\r\n\t}", "title": "" }, { "docid": "fc484bb5f36752613ca2e0e43ad97821", "score": "0.67340744", "text": "public function ReadAll() {\n\t\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\t t1.id_mensagem,\n\t\t\t\t\t t1.id_usuario,\n\t\t\t\t\t t1.destinatario_mensagem,\n\t\t\t\t\t t1.assunto_mensagem,\n\t\t\t\t\t t1.conteudo_mensagem,\n\t\t\t\t\t t1.hora_mensagem,\n\t\t\t\t\t t1.data_mensagem\n\t\t\t\tFROM\n\t\t\t\t\tmensagem AS t1\n\t\t\t\tORDER BY data_mensagem DESC, hora_mensagem DESC\n\n\n\t\t\t\";\n\n\n\t\t\t$DB = new DB();\n\t\t\t$DB->open();\n\t\t\t$Data = $DB->fetchData($sql);\n\t\t\t$realData;\n\t\t\tif($Data ==NULL){\n\t\t\t\t$realData = $Data;\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\tforeach($Data as $itemData){\n\t\t\t\t\tif(is_bool($itemData)) continue;\n\t\t\t\t\telse{\n\t\t\t\t\t\t$realData[] = $itemData;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$DB->close();\n\t\t\treturn $realData;\n\t\t}", "title": "" }, { "docid": "43cd01661ff62f108a3659f74dfa6948", "score": "0.6716856", "text": "public function read()\n {\n //$query = 'SELECT id, name, created_at FROM ' . $this->table . ' ORDER BY created_at DESC';\n $query = (new Select(['id','nm:name','created_at']))\n ->from(['category'])\n ->orderby(['created_at'])\n ->query;\n\n //$stmt = $this->conn->prepare($query); \n //$stmt->execute();\n //return $stmt;\n return $this->doPrepExecGetStms($this->conn, $query);\n\n }", "title": "" }, { "docid": "d9c920919d7eb25d54355e0a0de1d2b9", "score": "0.6709749", "text": "function read(){\n \n // select all query\n $query = \"SELECT tar.`id`, tar.`empresa_id`, tar.`nombre`, tar.`numero`, tar.`tipo_tarjeta_id`, \n tt.`nombre` as tipo_tarjeta, tar.`marca_tarjeta_id`, \n mt.`nombre` as marca_tarjeta, tar.`cuenta_id`, cue.`bnco_id`, ban.`nombre` as banco\n FROM `tarjetas` as tar\n JOIN `tipos_tarjetas` as tt ON (tar.`tipo_tarjeta_id` = tt.`id`)\n JOIN `marcas_tarjetas` as mt ON (tar.`marca_tarjeta_id` = mt.`id`)\n JOIN `cuentas` as cue ON (tar.`cuenta_id` = cue.`id`)\n JOIN `bancos` as ban ON (cue.`bnco_id` = ban.`id`)\n WHERE tar.`empresa_id` = 1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "b118ce0635953ca4343f0548bba2949c", "score": "0.6703165", "text": "public function read(){\r\n\t\t\trequire 'connection.php';\r\n\t\t\t$query=\"SELECT * FROM courier ORDER BY courier_id\";\r\n\t\t\t$result=mysqli_query($conn,$query);\r\n\t\t\treturn $result;\r\n\t\t}", "title": "" }, { "docid": "e2e5998d9b6c1206bd7ddfdfacf9d26d", "score": "0.6702507", "text": "function read(){\n \n // select all query\n $query = \"SELECT cue.`id`, cue.`empresa_id`, cue.`nombre`, cue.`tipo_fuente`, \n fc.`nombre` as fuente_cuenta, cue.`bnco_numero`, cue.`bnco_id`, \n ban.`nombre` as banco, cue.`bnco_tipo_cuenta`, tc.`nombre` as tipo_cuenta, \n cue.`bnco_saldo_inicial`, cue.`email` \n FROM `cuentas` as cue \n JOIN `fuente_cuentas` as fc ON (cue.`tipo_fuente` = fc.`id`) \n JOIN `bancos` as ban ON (cue.`bnco_id` = ban.`id`) \n JOIN `tipo_cuentas` as tc ON (tc.`id` = cue.`bnco_tipo_cuenta`)\n WHERE cue.`empresa_id` = 1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "5431a1f2694e00e8baa98a45d509a96f", "score": "0.6702264", "text": "public function read()\n {\n $query = \"SELECT * FROM \" . $this->tableName;\n $stmt = $this->conn->prepare($query);\n\n /*\n * bool -> Indicates if statement was executed successfully.\n * rowCount -> Indicates if any rows were returned by query.\n * stmt -> Used to fetch rows as array in read.php endpoint.\n */\n if ($stmt->execute())\n {\n return [\"bool\" => true, \"rowCount\" => $stmt->rowCount(), \"stmt\" => $stmt];\n }\n\n return [\"bool\" => false, \"rowCount\" => null, \"stmt\" => null];\n }", "title": "" }, { "docid": "4b8c3c702e0c9c5eda3204ef1d6f3109", "score": "0.669692", "text": "public function read()\n {\n $query=\"SELECT id, name, username, email, password FROM \". $this->table_name;\n $stmt=$this->conn->prepare($query);\n\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "3aaa720612fda95e28be07e25e8c18ea", "score": "0.66928923", "text": "private function getDataFromDb()\n {\n $sqlGlobalParamRequest = <<<SQL\nselect paramdef.*, paramv.val as value, paramv.type as usefor \nfrom paramdef, paramv \nwhere paramdef.isuser = 'Y' and paramdef.name = paramv.name and paramv.type = 'G';\nSQL;\n\n $sqlUserParamRequest = <<<SQL\nselect paramdef.*, paramv.val as value, paramv.type as usefor \nfrom paramdef, paramv \nwhere paramdef.isuser = 'Y' and paramdef.name = paramv.name and paramv.type = 'U%d';\nSQL;\n\n $sqlUserParamRequest = sprintf($sqlUserParamRequest, $this->user->id);\n $this->outputGlobalParamResult = [];\n $this->outputUserParamResult = [];\n\n DbManager::query($sqlGlobalParamRequest, $this->outputGlobalParamResult);\n DbManager::query($sqlUserParamRequest, $this->outputUserParamResult);\n }", "title": "" }, { "docid": "18cd8fe4ae620b9657073437b15ad43e", "score": "0.66903406", "text": "function read() {\n // query to get column\n $query = \"SELECT id, todo_item, is_done, date_added\n\t\t\t\t FROM \" . $this->table_name . \" \n\t\t\t\t ORDER BY id\";\n // query\n $run_query = $this->conn->prepare($query);\n \n\t\t// execute query\n $run_query->execute();\n return $run_query;\n }", "title": "" }, { "docid": "c6a5a66848529537c0f20cfeaedca546", "score": "0.6690121", "text": "public function read() {\n // create query\n $query = 'SELECT * FROM ' . $this->table . ' ORDER BY register_date ASC';\n\n // create prepare statement\n $stmt = $this->conn->prepare($query);\n\n //execute statement\n $stmt->execute();\n\n return $stmt;\n }", "title": "" }, { "docid": "2646f2cc9f01ff88f06985f6cb7ebe9a", "score": "0.66900074", "text": "public function read()\n\t{\n\t\t$sql = \"SELECT * FROM barang ORDER BY kode\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "8a8906cf5208d0aa8da73523a880c2f5", "score": "0.66875863", "text": "public function readAll() {\n\n $db = db_connect();\n $statement = $db->prepare(\"select * from Reminder\n \");\n $statement->execute();\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n return $rows;\n }", "title": "" }, { "docid": "9795f7fb8fc36de8d2c017f3329e1c2c", "score": "0.6684066", "text": "public function read() {\n $query = \"SELECT * FROM identitas ORDER BY ID_KTP\";\n return mysqli_query($this->link->conn, $query);\n }", "title": "" }, { "docid": "ddc7afb5f330e1aab8510ee431de6ee1", "score": "0.6682479", "text": "function read(){\n \n // select all query\n $query = \"SELECT em.`id` as id, per.`id` as persona_id, per.`nombre`, per.`apellido`, \n per.`tipo_documento`, per.`num_documento`, per.`direccion`, per.`email`, \n per.`convencional`,\n per.`celular`, per.`opcional`,\n em.`clave`, em.`empleado`\n FROM `empleados` as em\n JOIN `personas` as per ON (per.`id` = em.`persona_id`)\n WHERE per.`empresa_id` = 1 AND em.`clave` != 'NULL'\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "959b33f20ad9001fc99f8aa9f94ef030", "score": "0.66676974", "text": "function read(){\n\t\t$sql=\"SELECT * FROM users\";\n\t\t$tabla=$this->link->query($sql);\n\t\treturn $tabla;\n\t}", "title": "" }, { "docid": "77df7967bdaab5fc80997bf6f6248f58", "score": "0.664301", "text": "public function readAll()\n {\n $sql = 'SELECT id_inventario, fecha_ingreso, r.stock, r.nombre_producto, e.nombres_usuario\n FROM inventario \n Inner join productos r\n on Inventario.id_producto = r.id_producto\n Inner join usuarios e\n on Inventario.id_usuario = e.id_usuario\n ORDER BY fecha_ingreso';\n $params = null;\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "f767ea91436c07959d4b4abcc9616747", "score": "0.66388726", "text": "public function readAll(){\n $query = \"SELECT id_user, name, user_name FROM users;\";\n $statement = $this->cdb->prepare($query);\n $statement->execute();\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\n return $rows; \n }", "title": "" }, { "docid": "99b5aed3fbc9023c27e131e1c66aaaa4", "score": "0.6635906", "text": "function DBRead($tabela, $parametros = null, $campos = '*'){\n\t\t\n\t\t// $tabela = DBEscape($tabela);\n\t\t// $parametros = DBEscape($parametros);\n\t\t\n\t\t$query = \"SELECT $campos FROM $tabela $parametros \";\n\t\t$result = Query($query);\n\n\t\tif(!mysqli_num_rows($result))\n\t\t\treturn $result;\n\t\telse{\n\t\t\t//retorna array com todos os resultados\n\t\t\twhile ($res = mysqli_fetch_assoc($result)){\n\t\t\t\t$data[] = $res;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t}", "title": "" }, { "docid": "566abc96bdad158ddf3518ba11d8411e", "score": "0.66311216", "text": "private function getData() {\r\n $pdo = $this->dbConn();\r\n $stmt = $pdo->prepare(\"SELECT * FROM data\");\r\n $stmt->execute();\r\n $data = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n return $data;\r\n }", "title": "" }, { "docid": "eb4c48f07bba93674a0be11d65daf283", "score": "0.6617823", "text": "function read(){\n \n // select all query\n $query = \"SELECT * FROM `personas` WHERE `empresa_id` = 1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "1e387364c8cf8784d58c8797070b172b", "score": "0.66164166", "text": "function getData()\n\t{\n\t\tglobal $_gTables;\n\t\n\t\t$db = \\Db::getInstance();\n\t\t$sql = \"SELECT a.*\n\t\t\t\tFROM $_gTables[PLATNOSCI_BANKI] a\n\t\t\t\tWHERE a.id = '\".(int)$this->id.\"'\";\n\n\t\t$row = $db->GetRow( $sql );\t\n\t\treturn $row;\n\t\t\n\t}", "title": "" }, { "docid": "6bf61e41d0a03a438c6ce2be45db0da9", "score": "0.6590042", "text": "function read(){\n \n // select all query\n $query = \"SELECT * FROM `facturas` WHERE `empresa_id` = 1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "6bf61e41d0a03a438c6ce2be45db0da9", "score": "0.6590042", "text": "function read(){\n \n // select all query\n $query = \"SELECT * FROM `facturas` WHERE `empresa_id` = 1\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "a5266ef044ec34d1b2ea551edd5c89d0", "score": "0.6584101", "text": "public function getDataFromDb() \n { \n try {\n $dbResult = $this->dbObj->query(\"SELECT * FROM tb_hotels\");\n $i = 0;\n $resultSet = array();\n foreach ($dbResult as $row) {\n $resultSet[$i] = $row;\n $i++;\n }\n return $resultSet;\n } catch (PDOException $e) {\n echo 'DBError: ' . $e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "0d0eb61e2c8eb0bf08e164549534f015", "score": "0.65515625", "text": "public function read($db_data)\n\t{\n\t\tforeach ($db_data as $key => $value) {\n\t\t\t${\"$key\"} = $value;\n\t\t}\n\t\t\n\t\tif ( (array) $columns !== $columns ) { \n\t\t $c = $columns;\n\t\t} else { \n\t\t $c = implode(\", \", $columns);\n\t\t}\n\t\t\n\t\t$sql = \"SELECT \".$c.\" FROM \".$datatable;\n\t\tif(!empty($param) && !empty($val)){\n\t\t\t$sql .= \" WHERE \".$param.\" = '\".$val.\"'\";\n\t\t}\n\t\t$result = $this->mysqli->query($sql);\n\t\t\n\t\tif ($result->num_rows > 0) {\n\t\t while($r = $result->fetch_assoc()) {\n\t\t $rows[] = $r;\n\t\t }\n\t\t\treturn json_encode($rows);\n\t\t} else {\n\t\t\treturn json_encode($result);\n\t\t}\n\t\t$result->close(); \n\t}", "title": "" }, { "docid": "9694d428c29632822c72c74e621cd1de", "score": "0.65191627", "text": "public function getData ( MySql $db ) {\n return $this->load( $db );\n }", "title": "" }, { "docid": "014afb47949314c84f8b06c64fd39887", "score": "0.6505252", "text": "public function read(){\n $c=\"select * from fechas order by nombre\";\n $stmt=$this->llave->prepare($c);\n try{\n $stmt->execute();\n }catch(PDOException $ex){\n die(\"Error!!! \".$ex);\n }\n $filas=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $filas;\n }", "title": "" }, { "docid": "ee5312e3732d13196ef406468084ad56", "score": "0.65014714", "text": "public function read() {\n\n $query = 'SELECT \n id,\n task,\n todo_id\n FROM \n ' . $this->table;\n\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n\n return $stmt;\n\n }", "title": "" }, { "docid": "94ab6f0213f08f8bcc1dde974abaa825", "score": "0.6500855", "text": "public function read($id) {\n\t\t \n\t\t$db = db_connect();\n $statement = $db->prepare(\"select * from Reminder\n WHERE id = :id;\n \");\n $statement->bindValue(':id', $id);\n $statement->execute();\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n\t\t\n\t\treturn $rows;\n }", "title": "" }, { "docid": "b203381980c8d9b42b88ed429cf820c7", "score": "0.6498591", "text": "public function read()\n {\n $query = 'SELECT * FROM appointements WHERE appointement_id = :appointement_id';\n // prepare statement\n $stmt = $this->conn->prepare($query);\n // execute statement\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "05f3ff6d86ddcc395c03ed791ad23e79", "score": "0.64944637", "text": "public function loadDataFromDB()\n {\n return null;\n }", "title": "" }, { "docid": "c41bc3e388209163b2d8c59eca207714", "score": "0.6491055", "text": "Public function get_data()\n\t{\n\t\treturn $this->db->get($this->dbtable)->result();\n\t}", "title": "" }, { "docid": "bf73715696afab4ff6bc684bd81af3a4", "score": "0.6484305", "text": "private function readData() {\n\t\t\tif (!$this->Project) return false;\n\t\t\treturn $GLOBALS['DBHelper']->readProjectDataFromColumn(\n\t\t\t\t$this->Project->id,\n\t\t\t\t$this->Type, \n\t\t\t);\n\t\t}", "title": "" }, { "docid": "06c0d033220c817bba3900068d925382", "score": "0.6476161", "text": "public function read() {\n $campos = \"id,title,category,author,`date`\"; \n $data = parent::get_all($campos, null, null);\n return $data;\n }", "title": "" }, { "docid": "910690a596a1773d680d97401b72b41d", "score": "0.6463643", "text": "public function read()\n {\n $query =\"SELECT \n * \n FROM\n \".$this->table.\" \n ORDER BY\n id DESC\";\n //prepare statement\n $stmt =$this->conn->prepare($query);\n $stmt->execute();\n return $stmt; \n }", "title": "" }, { "docid": "d67b7cee644af5800bfd34d2678ac942", "score": "0.645213", "text": "public function readItem()\n {\n $query = \"SELECT\n name, description, price, category_id\n FROM\n {$this->tableName}\n WHERE\n id = ?\n LIMIT\n 0,1\";\n $stmt = $this->connection->prepare($query);\n $stmt->bindParam(1, $this->id);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->name = $row['name'];\n $this->description = $row['description'];\n $this->price = $row['price'];\n $this->category_id = $row['category_id'];\n }", "title": "" }, { "docid": "619c80034fc12a040904100eaec139ff", "score": "0.6439661", "text": "public function get_data()\n {\n return $this->retrieve('SELECT 1+1;');\n }", "title": "" }, { "docid": "6d8c278023295f5b04ddea2b21cea505", "score": "0.64204496", "text": "function ReadAll(){\n \n $pdo = MIDAS_DataBase::Connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $sql = \"SELECT * FROM ges_inbody ORDER BY inb_fecha DESC\";\n \n $query = $pdo->prepare($sql);\n $query->execute();\n \n $results = $query->fetchALL(PDO::FETCH_BOTH);\n \n MIDAS_DataBase::Disconnect();\n return $results; \n }", "title": "" }, { "docid": "351d6ecdb2d4a42234aa920f7ed72a2d", "score": "0.64050186", "text": "function ReadAll(){\n\n $pdo = MIDAS_DataBase::Connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $sql = \"SELECT * FROM ges_proveedores ORDER BY pro_codigo DESC\";\n\n $query = $pdo->prepare($sql);\n $query->execute();\n\n $results = $query->fetchALL(PDO::FETCH_BOTH);\n\n MIDAS_DataBase::Disconnect();\n return $results;\n }", "title": "" }, { "docid": "8bc024bcac258c0fc8075a35afd613fd", "score": "0.6401563", "text": "function testReadEmployee(){\n $db = new DB();\n $result = $db->read(\"employee\", \"id=1 OR id=2\");\n foreach ($result as $row){\n echo $row[\"first_name\"].\"<br>\";\n echo $row[\"last_name\"].\"<br>\";\n echo $row[\"eid_number\"].\"<br>\";\n echo $row[\"email\"].\"<br>\";\n }\n}", "title": "" }, { "docid": "5749a4781cd7508f238d5ae5c3920f8f", "score": "0.63988954", "text": "public function ReadAll() {\n\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\t t1.id_ferias,\n\t\t\t\t\t t1.ano_ferias,\n\t\t\t\t\t t1.id_afastamento\n\t\t\t\tFROM\n\t\t\t\t\tferias AS t1\n\t\t\t\tORDER BY t1.ano_ferias\t\n\t\t\t\t\n\n\t\t\t\";\n\t\t\n\t\t$DB = new DB ();\n\t\t$DB->open ();\n\t\t$Data = $DB->fetchData ( $sql );\n\t\t$realData;\n\t\tif ($Data == NULL) {\n\t\t\t$realData = $Data;\n\t\t} else {\n\t\t\t\n\t\t\tforeach ( $Data as $itemData ) {\n\t\t\t\tif (is_bool ( $itemData ))\n\t\t\t\t\tcontinue;\n\t\t\t\telse {\n\t\t\t\t\t$realData [] = $itemData;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$DB->close ();\n\t\treturn $realData;\n\t}", "title": "" }, { "docid": "221c94a0bad913c01b5fb423bc982959", "score": "0.6394728", "text": "public function data() {\n\t\t\t$sql = sprintf(\"SELECT * FROM information WHERE id=1\");\n\t\t\t$data = $this->mysqli->complex_query($sql);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "b0ceefdbe03b7ab6c5888a328d6726fe", "score": "0.638706", "text": "public function getStuffFromDb(){\n //On fait la connexion avec la fonction getAll() de la classe Database\n return $this->db->getAll(\"myTable\");\n }", "title": "" }, { "docid": "473dfd796b6fabefa9b61aa79382beb8", "score": "0.6387031", "text": "public function read(){\n $query = 'SELECT c.name as category_name, \n p.id,\n p.category_name,\n p.title,\n p.body,\n p.author,\n p.created_at\n FROM\n '.\n $this->table. 'p LEFT JOIN c ON p.category_id = c.id ORDER BY p.created_at DESC';\n\n // prepate statement\n $stmt = $this->conn->prepate($query);\n\n //execute statement\n $stmt->execute();\n\n return $stmt;\n }", "title": "" }, { "docid": "8d6530cb66a3c6b97d3e2e7276c956e3", "score": "0.63653", "text": "function read()\n\t{\n\t require( \"mysql.php\" );\n $sql = \"SELECT * FROM `GuestBook`\";\n\n \t $sth = $dbh->query($sql);\n \t foreach( $sth as $tmp )\n\t {\n\t\techo htmlspecialchars( \"[ \" . $tmp['timestamp'] . \" ] \" . $tmp['name'] . \" : \" . $tmp['msg'] ) . '<br />' ;\n\t }\n\t //$fp=fopen(\"room.txt\",\"r+\");\n\t //while ( $content = fgets($fp) ) \n\t //{\n\t\t//echo nl2br(htmlspecialchars($content));\n\t //}\n\t //fclose($fp);\n\t}", "title": "" }, { "docid": "c8e9907d71c030bda8bcb2b30c065c1a", "score": "0.63621897", "text": "public function readAll(){\r\n\t\t\t$req = \"SELECT recette.idRec, recette.nom AS lib, descriptif, difficulte, prix, nbPersonnes, \r\n\t\t\t\t\tdureePreparation, dureeCuisson, dureeTotale, qteCalories, qteProteines, qteGlucides, qteLipides, \r\n\t\t\t\t\tutilisateur.nom, utilisateur.prenom, illustration.adresse\r\n\t\t\t\t\tFROM recette \r\n\t\t\t\t\tINNER JOIN utilisateur\r\n\t\t\t\t\tON recette.idUtil = utilisateur.idUtil\r\n\t\t\t\t\tINNER JOIN illustration\r\n\t\t\t\t\tON recette.idRec = illustration.idRec\r\n\t\t\t\t\tORDER BY recette.nom ASC\";\r\n\t\t\t$curseur=$this->cx->query($req);\r\n\t\t\treturn $curseur;\r\n\t\t}", "title": "" }, { "docid": "8c5402116f03c25d6e20e1eb500c19e1", "score": "0.63616145", "text": "protected function loadData(){\n\t\treturn TActiveRecord::finder($this->GetDataType())->findAll();\n\t}", "title": "" }, { "docid": "c10829fd8b65a73cb0320a7ce677a9dd", "score": "0.63409215", "text": "function read(){\n \n // select all query\n $query = \"SELECT * FROM \" . $this->table_name . \" LEFT JOIN scouts ON scouting_data.scout_id=scouts.scout_id\" . \n \" WHERE match_id=:match_id AND team_number=:team_no\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n $tmpMatchId = htmlspecialchars(strip_tags($this->match_id));\n $tmpTeamNo = htmlspecialchars(strip_tags($this->team_no));\n\n // bind values\n $stmt->bindValue(\":match_id\", $tmpMatchId, PDO::PARAM_INT);\n $stmt->bindValue(\":team_no\", $tmpTeamNo, PDO::PARAM_INT);\n \n // execute query\n $stmt->execute();\n \n return $stmt;\n}", "title": "" }, { "docid": "2f4d45b8932bd6588adef5ac088c1ab2", "score": "0.6331796", "text": "public function read(){\n $c=\"select * from usuarios order by nombre\";\n $stmt=$this->llave->prepare($c);\n try{\n $stmt->execute();\n }catch(PDOException $ex){\n die(\"Error al recuperar los usuarios!!! $ex\");\n }\n $filas=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $filas;\n }", "title": "" }, { "docid": "f6035ba0ab31693bb2b137b962021ba2", "score": "0.6329282", "text": "public function readOne()\n {\n //Se guarda la consulta sql\n $sql = 'SELECT id_inventario, public.inventario.nombre as nombre_producto, precio, public.inventario.descripcion as descripcion, descuento, stock, autor, imagen,id_proveedor, public.proveedor.nombre as proveedor, id_tipo_producto, tipo_producto,id_marca, nombre_marca\n FROM public.inventario\n INNER JOIN public.tipo_producto USING(id_tipo_producto) \n INNER JOIN public.proveedor USING(id_proveedor) \n INNER JOIN public.marca USING(id_marca)\n WHERE id_inventario = ?';\n //Se guarda un array con los parametros de la consulta\n $params = array($this->id);\n //Se retorna la ejecución del método \"getRow\"\n return Database::getRow($sql, $params);\n }", "title": "" }, { "docid": "42f92adf15f4fa9ef67cbf3a56a2dce1", "score": "0.63202715", "text": "function readOne(){\n\n\t\t$query = \"SELECT * FROM \" . $this->table_name . \" WHERE id=? LIMIT 0,1\";\n\n\t\t$stmt = $this->conn->prepare( $query );\n\t\t$stmt->bindParam(1, $this->id);\n\t\t$stmt->execute();\n\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t$this->id = $row['id']; \n\t\t$this->juz = $row['juz']; \n\t\t$this->sr = $row['surah']; \n\t}", "title": "" }, { "docid": "98764908bff06cab52a80a90a7b44855", "score": "0.63038856", "text": "public function readAll();", "title": "" }, { "docid": "e7170f7f5b7f51dd36b6d2f6f01e3b20", "score": "0.63002425", "text": "public function read(){\n $stmt = $this->conn->prepare(\"SELECT * FROM posts \");\n $stmt->execute();\n return $stmt->fetchAll(); \n //$stmt->fetch(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "f594a4022a9bbdcc8a160519f92ba7df", "score": "0.6296096", "text": "public function testReadAllFromDatabase() {\n\n\t\t$this->db->fetchAll('pundits');\n\t\t$data = $this->db->get_last_result();\n\n\t\tforeach ($data as $pundit){\n\t\t\t$this->assertArrayHasKey( 'firstname', $pundit );\n\t\t\t$this->assertArrayHasKey( 'surname', $pundit );\n\t\t}\n\n\t\t$this->assertCount(5, $data);\n\t}", "title": "" }, { "docid": "92caafa63a3be013cc4bc05686f6ea9c", "score": "0.6279214", "text": "public function readAll()\n\t{\n\t\treturn $this->dao->readAll();\n\t}", "title": "" }, { "docid": "443a1df85f2bc0ccefe9ef3859d3f83a", "score": "0.6270388", "text": "public function readAll()\n\t{\n try {\n $stmt = $this->db->prepare(\"\n SELECT * \n FROM `deal`\");\n $stmt->execute();\n $all = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return ($all);\n } catch(PDOException $e){\n\t\t print \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t include \"view/errorPage.php\";\n\t exit;\n }\n\t}", "title": "" }, { "docid": "8d044ee7bbece6de6c1f03daa7c65868", "score": "0.62495524", "text": "function readAll()\n {\n $query = \"SELECT *\n FROM \" . $this->table_name . \"\n ORDER BY slider_id ASC\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n // return values\n return $stmt;\n }", "title": "" }, { "docid": "40a6514c53d95d43baf70763796eb531", "score": "0.62424904", "text": "function _read_user() {\n $email = $_SESSION['user'];\n $this->dbh = dba_open($this->dbfile, \"r\");\n if (dba_exists($email, $this->dbh)) {\n $serialized_data = dba_fetch($email, $this->dbh);\n $this->data = unserialize($serialized_data);\n }\n dba_close($this->dbh);\n }", "title": "" }, { "docid": "12db2a46f32b5ad419d6615c455143c9", "score": "0.6228599", "text": "public function readOne()\n {\n $sql = 'SELECT id_inventario, fecha_ingreso, r.stock, r.nombre_producto, e.nombres_usuario\n FROM inventario \n Inner join productos r\n on Inventario.id_producto = r.id_producto\n Inner join usuarios e\n on Inventario.id_usuario = e.id_usuario \n WHERE id_inventario = ?';\n $params = array($this->id);\n return Database::getRow($sql, $params);\n }", "title": "" }, { "docid": "0d104f748dd4f2c20dd255f41c0ee494", "score": "0.6226987", "text": "public function LoadData() {\r\n // Read file lines\r\n include '../../inc/connection.php';\r\n $jobid = $_POST['jobid'];\r\n $query3 = \"SELECT service_name,charge FROM reserved_services WHERE job_id = $jobid\";\r\n $result_set3 = mysqli_query($connection,$query3);\r\n return $result_set3;\r\n }", "title": "" }, { "docid": "ffb63e2662cd5effa1c61017480bc724", "score": "0.6217745", "text": "function db_backend_read($db, $id)\n\t{\n\t\t$sql = '\n\t\t\tSELECT\n\t\t\t\t`data`, `syntax`, `ttl`, `crypto`\n\t\t\tFROM\n\t\t\t\tpastes\n\t\t\tWHERE\n\t\t\t\tid = ?\n\t\t\tLIMIT\n\t\t\t\t1\n\t\t\t';\n\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bind_param('i', $id);\n\t\t$stmt->execute();\n\n\t\t$res = $stmt->get_result();\n\n\t\treturn $res->fetch_array(MYSQLI_ASSOC);\n\t}", "title": "" }, { "docid": "a3fd57e12bbc4dc1cc5d60c4e6d26d9f", "score": "0.62146646", "text": "public function doRead()\n\t{\n\t\t/**\n\t\t * @var $ilDB ilDB\n\t\t */\n\t\tglobal $ilDB;\n\n\t\t$res = $ilDB->query('SELECT * FROM rep_robj_xgdo_data WHERE obj_id = ' . $ilDB->quote($this->getId(), 'integer'));\n\t\twhile($row = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$this->setDocType($row['doc_type']);\n\t\t\t$this->setDocUrl($row['doc_url']);\n\t\t\t$this->setEditDocUrl($row['edit_doc_url']);\n\t\t}\n\t}", "title": "" }, { "docid": "f375bbec8f9b7e683a28624385e892af", "score": "0.6206459", "text": "function get_data(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM field_reservation\" ;\n\t\n\t\t$query = $this->ffm->query($sql);\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "77aecb3f2eba23c175b604d7878ebd55", "score": "0.6192079", "text": "public function readData(){\n return json_encode($this->dataSource->readData());\n }", "title": "" }, { "docid": "061c5b518278d38f21ef9b7e11ea96e9", "score": "0.61896175", "text": "public function readById($id)\n {\n // select query\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id='$id'\";\n \n // execute query statement\n $stmt = $this->conn->select($query);\n \n return $stmt;\n }", "title": "" }, { "docid": "ef15ca5b42aa7b28fddd19af38168a16", "score": "0.6175696", "text": "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM office WHERE office_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "title": "" }, { "docid": "0fca7dc9505e1970681170f2d202a9ca", "score": "0.61665225", "text": "public function query(): DataReaderInterface;", "title": "" }, { "docid": "c6809f8a8f42a4d0f56a81a96ac3d5a3", "score": "0.6162852", "text": "public function read() {\r\n \r\n $sql = \"SELECT notes.title, notes.note, notes.id \r\n FROM notes, users\r\n WHERE notes.user_id = users.id AND users.id = :userid;\";\r\n \r\n $pdo = $this->db->connect()->prepare($sql);\r\n $pdo->bindParam(\":userid\", $_SESSION['userid']);\r\n $pdo->execute();\r\n $notes = $pdo->fetchAll();\r\n \r\n $data['table_of_notes'] = \"\r\n <table class=''>\r\n <thead>\r\n <tr>\r\n <th class=''>Title</th>\r\n <th class=''>Note</th>\r\n <th class=''>Update</th>\r\n <th class=''>Delete</th>\r\n </tr>\r\n </thead>\r\n <tbody>\";\r\n foreach($notes as $note) {\r\n \r\n $data['table_of_notes'] = $data['table_of_notes'] . \"\r\n <tr>\r\n <td class=''>\" . $note['title'] . \"</td>\r\n <td class=''>\" . $note['note'] . \"</td>\r\n <td class=''><a href='\" . URLROOT .\"/Pages/home/update/\" . $note['id'] . \"'>Update</a></td>\r\n <td class=''><a href='\" . URLROOT .\"/Pages/home/delete/\" . $note['id'] . \"'>Delete</a></td>\r\n </tr>\r\n \";\r\n \r\n }\r\n $data['table_of_notes'] = $data['table_of_notes'] . \"\r\n </tbody>\r\n </table>\";\r\n return $data;\r\n }", "title": "" }, { "docid": "0df5c34a490ddb8075d5b0fe16ac3c4c", "score": "0.6161689", "text": "function doRead() {\n\t\tglobal $ilDB;\n\t\t\n\t\t$set = $ilDB->queryF(\"SELECT * FROM rep_robj_xrev_revobj WHERE id=%s\",\n\t\t\t\t\t\t\t\t\tarray(\"integer\"),\n\t\t\t\t\t\t\t\t\tarray($this->getId())\n\t\t\t\t );\n\t\twhile ($rec = $ilDB->fetchAssoc($set)) {\n\t\t\t$this->obj_id = $rec[\"obj_id\"];\n\t\t\t$this->group_id = $rec[\"group_id\"];\n\t\t}\n\t\t\n\t\t$this->syncQuestionDB();\n\t}", "title": "" }, { "docid": "065f3edf5ccf8a732fa7219fb8498ac9", "score": "0.6155194", "text": "public function fetchData();", "title": "" }, { "docid": "94efcee22ced6ee0e469989218e3841e", "score": "0.61398757", "text": "private static function GetData ($query)\n\t\t{\n\t\t\t$db = new Database();\n\t\t\treturn $db->ExecuteQuery($query, true);\n\t\t}", "title": "" }, { "docid": "e90f2f9a9575cff5b313a70054f97f47", "score": "0.612496", "text": "public function getDataBaseRecord($query) { \n\t\t$sql = $query; \n\t\t$queryRecords = pg_query($this->conn, $sql) or die(\"error to fetch data\");\n\t\t$data = pg_fetch_all($queryRecords);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a68c32b05e4dcd1a88c478d0cf9b3235", "score": "0.61248505", "text": "public function readall(){\r\t\t\t$query=\"select * from `\".$this->table_name .\"` where `addon_service_id` = \".$this->addon_service_id;\r\t\t\t$result=mysqli_query($this->conn,$query);\t\t\t\r\t\t\treturn $result;\r\t\t}", "title": "" }, { "docid": "7159d16889a35f8e662598fd227b0ae4", "score": "0.61184305", "text": "function getAllDataBase(){\n try{\n $query = $this->_dataBase->prepare('SELECT id,titre,note FROM blocnote');\n $query->execute();\n $result = $query->fetchAll();\n $query->closeCursor();\n return $result;\n } catch (Exception $e) {\n return [false];\n } \n }", "title": "" }, { "docid": "216ddb18ad154e7cf78031a53feb3ac9", "score": "0.6116523", "text": "private function loadRubricData() {\n\t\t$query = \"SELECT * FROM rubriek WHERE id = ?\";\n\t\t\n\t\t$result = DatabaseConnector::executeQuery($query, array($this->id));\n\t\t\n\t\t//$this->id = $result[0]['id'];\n\t\t$this->name = $result[0]['naam'];\n\t\t$this->description = $result[0]['omschrijving'];\n\t}", "title": "" }, { "docid": "8c926438c9a63a6fdf1a3880afe177c4", "score": "0.610675", "text": "public function getRows() {\n\t\t// En primera instancia no utilizamos joins\n\t\t// El límite también esta desactivado porque aún no se ha implementado en el driver\n\t\t$sql = 'SELECT '.$this->getFieldsAndId().' '.$this->join_fields.' FROM '.SC.$this->table.SC;\n\t\t\n\t\t$sql .= $this->getJoins().' '.$this->join_tables;\n\t\t\n\t\t// Implementando sistema de where\n\t\tif($this->where != '') {\n\t\t\t$sql .= $this->where;\n\t\t}\n\n\t\t// Verificamos si hay una cláusula de order\n\t\tif($this->order != '')\n\t\t{\n\t\t\t$sql .= ' ORDER BY '.$this->order.' ';\n\t\t}\n\n\t\t// Implementando nuevo sistema\n\t\ttry {\n\t\t\t// Evaluamos si se agregaron variables a la consulta\t\t\t\n\t\t\tif(!empty($this->vars)) {\n\t\t\t\t$result = $this->manager->getQuery($sql)->setLimit($this->limit, $this->offset)->addParams($this->vars)->getResult();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$result = $this->manager->query($sql, $this->limit, $this->offset);\n\t\t\t}\n\t\t}\n\t\tcatch(QueryException $e) {\n\t\t\tthrow new ReadException($e->getMessage());\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "329187d18be21dbd73cb1c291fb6366e", "score": "0.61032593", "text": "public function readRegistro(){\n\n\t\ttry {\n\t\t\t\n\t\t\t$query = \"select r.id_registro, m.marca, t.tipo, c.clase, r.talla, r.descripcion from registro r inner join marca m on m.id_marca = r.id_marca inner join tipo t on t.id_tipo = r.id_tipo inner join clase c on c.id_clase = r.id_clase order by r.id_registro\";\n\n\t\t\t$statement = $this->cnx->prepare($query);\n\t\t\t$statement->execute();\n\n\t\t\treturn $statement->fetchAll(PDO::FETCH_OBJ);\n\n\t\t} catch (Exception $e) {\n\n\t\t\tdie($e->getMessage());\n\n\t\t}\n\n\t}", "title": "" } ]
4a3d7ce1e249cad1b4d304b15286d154
Find the post on media post id
[ { "docid": "d1837b9d0675929c8491da0b5b572729", "score": "0.0", "text": "public static function findById(Model $media) : ?OffloadedMedia\n {\n\n // Apply caching based on media post_modified timestamp\n $timestamp = $media->post_modified->timestamp;\n return Cache::rememberForever($media->ID.\"_media.offloaded.{$timestamp}\", function () use ($media) {\n return static::find($media->ID);\n });\n }", "title": "" } ]
[ { "docid": "10ed6193512869e8516efcf15bc7aedf", "score": "0.7622739", "text": "public function getPostByMediaId($media_id) {\n $post_obj = null;\n $media_id = new \\MongoId($media_id);\n $result = $this->createQueryBuilder('post')\n ->field('media.$id')->equals($media_id)\n ->getQuery()\n ->execute()\n ->toArray('false');\n foreach ($result as $res) {\n $post_obj = $res;\n }\n return $post_obj;\n }", "title": "" }, { "docid": "38d7fcdca4fe6b50561b5a970f84f883", "score": "0.7553424", "text": "public static function findOne($mediaId) {\n\n //Get media url to test if exist\n $attachment = get_post($mediaId);\n return Rootpress::getEntityFromWPPost($attachment);\n\n\t}", "title": "" }, { "docid": "f59bbb16836ab530e3473b12cc20efec", "score": "0.7113977", "text": "public function find($id)\n {\n return get_post($id);\n }", "title": "" }, { "docid": "06dcec08e7cf0a3f865b386c0c2c00eb", "score": "0.67462575", "text": "public static function find($postId)\n {\n return self::any()->where('p', (int)$postId)->first();\n }", "title": "" }, { "docid": "93a03649159e808562b8339056fd842c", "score": "0.66358227", "text": "function bubblecast_get_video_id_from_post($post) {\n $matches = array();\n $matched = preg_match(\"/\\\\[bubblecast\\\\s*id=([^\\\\s\\\\]]+)\\\\s*.*\\\\s*\\\\]/\", $post->post_content, $matches);\n if ($matched > 0) {\n return $matches[1];\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "cbc9f7b9d7c9861611c62f9cb274cd45", "score": "0.653828", "text": "public function findPostById($id)\n {\n $post = $this->user->post()->with('user','categories', 'region', 'seller', 'post_of_types',\n 'status_of_posts', 'directions','post_availability_status')->find($id);\n return $post;\n }", "title": "" }, { "docid": "d77bd89cefdd102b83f910fcc4838361", "score": "0.6516862", "text": "static public function findSingle ($id) {\n $media = self::qAll()->where('M.id', $id)->get();\n return self::fillMediaFields($media)[0];\n }", "title": "" }, { "docid": "775b3adfabc6290f637a886387019761", "score": "0.64928466", "text": "private function _getPostById($id) {\r\n for ($i = 0; $i < count($this->posts); $i++) {\r\n if ($this->posts[$i]->getId() == $id) {\r\n return $this->posts[$i];\r\n }\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "d4a1c7791c73ec713cfee694aaf81234", "score": "0.6314601", "text": "public function findPost($id)\n {\n //\n $post = Post::find($id);\n\n return $this->response(200, ['post' => $post], $post ? __('Get post successful') : __('Not found'));\n }", "title": "" }, { "docid": "9f8255dd1a044e63b4f156f699e012ee", "score": "0.6302428", "text": "public function findPost($id)\n {\n /**\n * model access\n * */\n $bdd = $this->bdd;\n $query = \"SELECT * FROM posts WHERE PostId =:id\";\n\n $req = $bdd->prepare($query);\n $req->bindValue(':id', $id , PDO::PARAM_INT);\n $req->execute();\n $row= $req->fetch(PDO::FETCH_ASSOC);\n\n $post = new Post();\n $post->setPostId($row['PostId']);\n $post->setAuthor($row['Author']);\n $post->setCreationDate($row['CreationDate']);\n $post->setModificationDate($row['ModificationDate']);\n $post->setTitle($row['Title']);\n $post->setContent($row['PostContent']);\n $post->setPosition(( ($row['Position'])));\n\n return $post;\n }", "title": "" }, { "docid": "3b2bb8fc1bfb2eb918ddbdbe4f70aa9a", "score": "0.628628", "text": "function wp_search_in_post_content($imageURL) {\n\tglobal $wpdb;\n\tif ($imageURL != \"\") {\n\t\t$query = \"SELECT ID FROM $wpdb->posts WHERE (post_content like '%\".$imageURL.\"%' AND post_type = 'post') LIMIT 1\";\n\t\t$post_id = $wpdb->get_var($query);\n\t\treturn $post_id;\n\t}\n\treturn -1;\n}", "title": "" }, { "docid": "b64c1372d5091058797e6d51c8956f2d", "score": "0.6239512", "text": "public function media()\n {\n return $this->hasMany(PostMedia::class, 'post_id', 'id');\n }", "title": "" }, { "docid": "644a7090c9f73bbacd87ae30a0f849ca", "score": "0.62314147", "text": "function getPost($post_id)\n {\n $post_id = intval($post_id);\n if ( !$post_id )\n {\n return NULL;\n }\n\n return get_post($post_id);\n }", "title": "" }, { "docid": "9ee96a94e50da6fba690f4e6afb90bd7", "score": "0.621623", "text": "public static function find($id) {\n\t\treturn Context::current()->modelForPostID($id);\n\t}", "title": "" }, { "docid": "c5292a82b2fe2f676e549f0700a9e7ec", "score": "0.6192699", "text": "public function find($post)\n {\n $postM = Post::where('id', $post)->first();\n if (!$postM) {\n // call external api\n $response = $this->apiClient->getData(\n 'posts',\n $post,\n null\n );\n $postM = $response['body'];\n }\n\n if ($postM) return PostResource::make($postM)->resolve();\n return response()->json(['error' => 'post not found'], 404);\n }", "title": "" }, { "docid": "675d3dbf5cfa8e04f5c6eb307d4fcb01", "score": "0.61795425", "text": "function fetch_post($post_id) {\r\n return DB::table('post')\r\n ->where('post_id', '=', $post_id)\r\n ->first();\r\n}", "title": "" }, { "docid": "83ebf5441cdca01c9b6e41aefe1b688c", "score": "0.61784536", "text": "public function getPost($id)\n {\n if(is_numeric($id))\n {\n return $post = Post::find($id);\n } else {\n return $post = Post::where('slug', '=', $id)->first();\n }\n }", "title": "" }, { "docid": "b828e1a73ca2864721d5c1200a101bd9", "score": "0.61681485", "text": "public function postOfId(PostId $id)\n {\n return $this->em->getRepository($this->class)->findOneBy([\n 'id' => $id->toString()\n ]);\n }", "title": "" }, { "docid": "ac8c548fac89f09f67adca38158055cf", "score": "0.6135659", "text": "public function get_medium_post(){\n \t$medium_post = null;\n \tif ($this->_medium_data){\n \t\tforeach($this->_medium_data as $post){\n \t\t\tif ($post['url']==$this->_medium_url){\n \t\t\t\t$medium_post = $post;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tif (!$medium_post)\n \t\treturn \"Medium post not found\";\n \treturn $medium_post;\n }", "title": "" }, { "docid": "b1b43d9cb674144f106d1e850e087b38", "score": "0.6129399", "text": "public function get_post( $ext_ID );", "title": "" }, { "docid": "849de69efed0ccf0417f1b4334f85a06", "score": "0.6108589", "text": "function get_post_by_google_id($id) {\n $posts = get_posts(array(\n 'numberposts' => -1,\n 'post_type' => 'company',\n 'meta_key' => 'bd_google_id',\n 'meta_value' => $id\n ));\n if (count($posts) > 0) {\n return $posts[0];\n }\n return null;\n}", "title": "" }, { "docid": "cfd377ddd69038670f20172d79cafac1", "score": "0.60990214", "text": "function getPost($id) {\n\t\tif(($data = $this->mcache->get('forums_post_'.$id)) === FALSE) {\n\t\t\t$data = $this->mongo->db->forum_posts->findOne(array('_id' => new MongoId($id)));\n\t\t\t$this->mcache->set('forums_post_'.$id, $data, $this->config->item('forums_cache'));\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a4c786301ac97522b894f6f93d2199c0", "score": "0.6043246", "text": "public static function getMediabyId($id) {\r\n if(is_numeric($id)){\r\n \treturn Doctrine::getTable ( 'ProductsMedia' )->find($id, Doctrine_Core::HYDRATE_ARRAY);\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "26ad9f1bdecd222f4ce96776ad2bf372", "score": "0.6042048", "text": "public function getSinglePostForNavigation($id)\n {\n return Post::select('id','title','slug','urdu')->whereId($id)->first();\n }", "title": "" }, { "docid": "a4f321736a396ba2d68dc793be2e2160", "score": "0.6021414", "text": "public static function find_featured_media( &$post ) {\n\n\t\tif ( class_exists( 'WPCOM_JSON_API_Read_Endpoint' ) ) {\n\t\t\treturn WPCOM_JSON_API_Read_Endpoint::find_featured_worthy_media( (array) $post );\n\t\t} else {\n\t\t\treturn (object) array();\n\t\t}\n\n\t}", "title": "" }, { "docid": "25b9663817e9f4008ab9571ac86002a2", "score": "0.6012925", "text": "public function showPost(){\n $post_id = (int) $_GET['post'];\n if( $post_id){ \n $post = $this->ARTICLES_DB->find( $post_id);\n return $post ? $post : false;\n\n }else{\n\n return false;\n }\n \n }", "title": "" }, { "docid": "324a3c0ce6413e548299fe6f0d4f087c", "score": "0.6012031", "text": "function post($id){\r\n $sql = \"SELECT * FROM posts WHERE id ='$id'\";\r\n return first($sql);\r\n}", "title": "" }, { "docid": "4082397611700c230cb8fb02238905a2", "score": "0.6001796", "text": "public static function get_post_by_url() {\n check_admin_referer(self::$metabox_nonce, 'nonce');\n\n if(isset($_POST['link'])) {\n $link = sanitize_text_field($_POST['link']);\n\n // Get post id by url\n $post_id = url_to_postid($link);\n\n if($post_id > 0) {\n $data = [\n 'title' => get_the_title($post_id),\n 'poster' => strval(get_the_post_thumbnail_url($post_id)),\n 'attachment' => get_post_thumbnail_id($post_id)\n ];\n\n wp_send_json_success($data);\n }\n }\n\n wp_send_json_error();\n }", "title": "" }, { "docid": "e066a5c5fb59bb3d87ac31bf88019346", "score": "0.5995323", "text": "protected function get_object_by_id( $post_id ) {\r\n\t\treturn $this->get_object( $post_id );\r\n\t}", "title": "" }, { "docid": "212c640c2ed687de34f7d2a04e357b5f", "score": "0.59793776", "text": "public function getPost($post_id)\n\t{\n\t\t$stmt = $this->db->prepare(\"\n\t\t\tSELECT\n\t\t\t\tp.id, p.title, p.content, p.created_at, p.updated_at, p.url, p.post_image, p.status, p.views, p.author_id,\n\t\t\t\tu.displayname, u.fullname, u.avatar\n\t\t\tFROM post p\n\t\t\tJOIN user u ON u.id = p.author_id\n\t\t\tWHERE p.id = :post_id\n\t\t\tLIMIT 1\n\t\t\");\n\t\t$stmt->bindValue('post_id', $post_id);\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\t}", "title": "" }, { "docid": "ac4506067e2275c994a4e48374d9f5b8", "score": "0.59695816", "text": "function duplicate_post_get_post($id) {\n\tglobal $wpdb;\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\n\tif ($post->post_type == \"revision\"){\n\t\t$id = $post->post_parent;\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\n\t}\n\treturn $post[0];\n}", "title": "" }, { "docid": "cebe19f7b7824bceaf5b723b945c3509", "score": "0.5966065", "text": "public function GetPost($id) {\n $connect = $this->connect();\n $query = \"SELECT * FROM post WHERE (BINARY post_id = '$id')\";\n $result = mysqli_query($connect, $query);\n $row = mysqli_fetch_array($result);\n $post = new Post($row['post_id'], $row['title'], $row[\"post_content\"], $row[\"post_time\"], $row[\"post_image\"]);\n return $post;\n }", "title": "" }, { "docid": "4c4432d093890048bdd69a49aeacbb25", "score": "0.5964267", "text": "public function getPost($id)\n\t{\n\t\treturn $this->postRepository->findById($id);\n\t}", "title": "" }, { "docid": "860e1697fbdf827bdb8c14b58f22fa4d", "score": "0.5950259", "text": "private static function getMedia($id)\n\t{\n\t\treturn Model::factory('Media')->find_one($id);\n\t}", "title": "" }, { "docid": "536dcf0e9fc1e3bd9a0d08fb25d6c6ca", "score": "0.59406173", "text": "public function find($id)\n\t{\n\t\treturn PostType::findOrFail($id);\n\t}", "title": "" }, { "docid": "092e42312e5c7cd0f237d44f20daff35", "score": "0.59401965", "text": "public function getPost()\n {\n return $this->hasOne(Post::class, ['id' => 'post_id']);\n }", "title": "" }, { "docid": "96d2317f2e0a5d75d25ece6977e36176", "score": "0.5939438", "text": "function getPost($id) {\n\t\t\t$response = $this->call(\"posts/details.json\",array(\"post\" => $id));\n\t\t\tif ($response !== false) {\n\t\t\t\t$this->cachePush(\"post\".$response->id);\n\t\t\t\treturn new BigTreeDisqusPost($response,$this);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bab5fa0c4ad7fe331f4435935065e7eb", "score": "0.5926821", "text": "public function show($id)\n {\n return $this->post->find($id);\n }", "title": "" }, { "docid": "d1fec82038b48d1ae276a99f72817b03", "score": "0.5922732", "text": "function rt_get_attachment_id_from_src ($image_src) { \r\n\t\tglobal $wpdb; \r\n\t\t$query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\r\n\t\t$id = $wpdb->get_var($query);\r\n\t\treturn $id; \r\n}", "title": "" }, { "docid": "959d4d749896b4213a3953658b474a9c", "score": "0.5918787", "text": "protected function get_post($postid) {\n return \\mod_forumng_post::get_from_id($postid, \\mod_forumng::CLONE_DIRECT, false, false, 0, true);\n }", "title": "" }, { "docid": "7c86b34ac84f5cbbef15be986bc43308", "score": "0.5902319", "text": "public function findById(int $postId): ?\\Gazelle\\ForumPost {\n $key = sprintf(self::ID_KEY, $postId);\n $id = self::$cache->get_value($key);\n if ($id === false) {\n $id = self::$db->scalar(\"\n SELECT ID FROM forums_posts WHERE ID = ?\n \", $postId\n );\n if (!is_null($id)) {\n self::$cache->cache_value($key, $id, 7200);\n }\n }\n return $id ? new \\Gazelle\\ForumPost($id) : null;\n }", "title": "" }, { "docid": "1fcfdc9b73f818d6ef438e148525be92", "score": "0.5894014", "text": "public function article_by_id($aid){\n $this->db->reconnect();\n $query = $this->db->query(\n \"SELECT * FROM posts WHERE publish=1 AND id=\"\n .$this->db->escape($aid));\n if ($query->num_rows() > 0){\n return $query->result()[0];\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "7766c612ebb884fbcb4f416aa4665e5f", "score": "0.58752227", "text": "public function findById($id)\n {\n return FaqPost::findOrFail($id);\n }", "title": "" }, { "docid": "72162ac3bff52a5a01fa1296bd63817b", "score": "0.5835217", "text": "function GetPostById($idPost)\r\n{\r\n $db = connectDb();\r\n $sql = \"SELECT * \"\r\n . \"FROM Post \"\r\n . \"WHERE idPost = :idPost\";\r\n $request = $db->prepare($sql);\r\n $request->execute(array(\r\n \"idPost\" => $idPost,\r\n ));\r\n return $request->fetch(PDO::FETCH_ASSOC);\r\n}", "title": "" }, { "docid": "398de2967aea599d015e0bb3682fb7ea", "score": "0.5830799", "text": "public function show($id)\n {\n $media = Media::orderBy('id', 'desc')->where('postId',$id)->get();\n\n $post[] = Post::find($id);\n $idsToNames = $this->HandelIds($post);\n return view('Admin.posts.show',compact('post','idsToNames','media'));\n }", "title": "" }, { "docid": "e55d82ad541cb4e0efc74d95c0a4a9b0", "score": "0.58220565", "text": "public function post($id)\n\t{\n\t\t$stmt = $this->pdo->prepare(\"SELECT posts.id, posts.brand AS postBrand, posts.model as postModel, posts.spotter, posts.images, posts.city, posts.country, posts.created_at, posts.views, posts.total_votes, brand.brand, model.model, users.username \n\t\t\tFROM posts \n\t\t\tLEFT JOIN brand ON posts.brand = brand.id \n\t\t\tLEFT JOIN model ON posts.model = model.id \n\t\t\tLEFT JOIN users ON posts.spotter = users.id \n\t\t\tWHERE posts.id = :id\");\n\t\t$stmt->bindValue(\":id\", $id, PDO::PARAM_INT);\n\t\t$stmt->execute();\n\t\treturn $stmt->fetch(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "460dff7045599907088ac29b18dfff8b", "score": "0.580273", "text": "private function get_or_upload_attachment( $post_id, $url ) {\n\t\t$url = str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $url );\n\t\t$image_id = $this->get_attachment_id_from_url( $url );\n\n\t\tif ( $image_id ) {\n\t\t\treturn $image_id;\n\t\t} else {\n\t\t\t$media = media_sideload_image( $url, $post_id );\n\n\t\t\t$attachments = get_posts( array(\n\t\t\t\t\t\t\t'numberposts' => '1',\n\t\t\t\t\t\t\t'post_parent' => $post_id,\n\t\t\t\t\t\t\t'post_type' => 'attachment',\n\t\t\t\t\t\t\t'post_mime_type' => 'image',\n\t\t\t\t\t\t\t'orderby' => 'post_date',\n\t\t\t\t\t\t\t'order' => 'DESC',\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( count( $attachments ) > 0 ) {\n\t\t\t\treturn $attachments[0]->ID;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "460dff7045599907088ac29b18dfff8b", "score": "0.580273", "text": "private function get_or_upload_attachment( $post_id, $url ) {\n\t\t$url = str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $url );\n\t\t$image_id = $this->get_attachment_id_from_url( $url );\n\n\t\tif ( $image_id ) {\n\t\t\treturn $image_id;\n\t\t} else {\n\t\t\t$media = media_sideload_image( $url, $post_id );\n\n\t\t\t$attachments = get_posts( array(\n\t\t\t\t\t\t\t'numberposts' => '1',\n\t\t\t\t\t\t\t'post_parent' => $post_id,\n\t\t\t\t\t\t\t'post_type' => 'attachment',\n\t\t\t\t\t\t\t'post_mime_type' => 'image',\n\t\t\t\t\t\t\t'orderby' => 'post_date',\n\t\t\t\t\t\t\t'order' => 'DESC',\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( count( $attachments ) > 0 ) {\n\t\t\t\treturn $attachments[0]->ID;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0d9ecfa6adde308addff25e029111a91", "score": "0.5797092", "text": "public function show($id)\n {\n return Post::find($id);\n \n }", "title": "" }, { "docid": "d5add8dffca4d4fe03aabdf7f321b051", "score": "0.5794277", "text": "public function show($id)\n {\n return Post::findOrFail($id);\n }", "title": "" }, { "docid": "4799ed3dabe27bc39b23966ddbaff924", "score": "0.57914823", "text": "public static function get_media($set, $post_id=null){\r\n\t\tif(is_null($post_id)) $post_id = get_the_ID();\r\n\t\t$data = self::get_meta($set, $post_id);\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "a7a91729472d8ad2d4cce658727e2d13", "score": "0.57805634", "text": "public function getPost() {\n\t\treturn $this->hasOne('Post', array('id' => 'comment_id'));\n\t\t\t//->where('t1.comment_table = '.Workflow::MODULE_BLOG); //,'comment_table'=>'tbl_post'\n\t}", "title": "" }, { "docid": "0a41ff9c08709cc90381cd815f184bc0", "score": "0.5777748", "text": "function select_post_for_id($id) {\n\t\tglobal $pdo;\n\t\t$sql = \"SELECT * FROM artigos WHERE id = :id\";\n\t\t$sql = $pdo->prepare($sql);\n\t\t$sql->bindValue(':id', $id);\n\t\t$sql->execute();\n\n\t\t//Verifica se existe algo cadastrado\n\t\tif($sql->rowCount() > 0) {\n\t\t\t//fetch() para pegar apenas um resultado\n\t\t\treturn $sql->fetch(\\PDO::FETCH_ASSOC);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "820ccb80d4998d92b4aeecbfcbc4db83", "score": "0.5774367", "text": "public function getMediaContent()\n {\n return $this->hasOne(ContentMedia::className(), ['id' => 'content_id']);\n //->where('content_type = :type', [':type' => $this->className()]);\n }", "title": "" }, { "docid": "b5d76948500723430f589a9dd8fd3d83", "score": "0.5773844", "text": "public function getPost($postId)\n {\n \t$post = Post::findorFail($postId);\n $follows = (auth()->user()) ? auth()->user()->following->contains($post->user_id) : false;\n \treturn view('posts.show', compact('post','follows'));\n }", "title": "" }, { "docid": "9b3cef16fb6cfb33c9b64cdde736af62", "score": "0.576475", "text": "function get_attachment_id_from_src($image_src) {\n global $wpdb;\n $query = \"SELECT ID FROM {$wpdb->posts} WHERE guid='$image_src'\";\n $id = $wpdb->get_var($query);\n return $id;\n}", "title": "" }, { "docid": "6150423b3bc1b05ad70f1533bafae1ac", "score": "0.57642514", "text": "function viewPostById($id){\n\t\tglobal $con;\n\t\t$id = clean_data($id);\n\t\t$query = $con->prepare(\"SELECT * FROM tbl_posts WHERE id=?\");\n\t\t$query->bind_param('i', $id);\n\t\t$query->execute();\n\t\t$result = $query->get_result();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a6f8aff221d2a552e8be77870fc2f2f0", "score": "0.57491726", "text": "public function findFeaturedImagePost($postId)\n {\n $thumbNailPost = null;\n\n $thumbNailId = get_post_thumbnail_id($postId);\n if ($thumbNailId !== null) {\n $thumbNailPost = $this->find($thumbNailId);\n }\n \n return $thumbNailPost;\n }", "title": "" }, { "docid": "e774fdfab815db773239cb86c12d9c52", "score": "0.5743308", "text": "function uncode_get_gallery_attached_media( $post_id ) {\n\t$post_gallery_media_id = get_post_meta( $post_id, '_uncode_gallery_media', true );\n\n\t$media_exists = $post_gallery_media_id && is_string( get_post_status( $post_gallery_media_id ) ) ? $post_gallery_media_id : false;\n\n\treturn $media_exists;\n}", "title": "" }, { "docid": "5bfd4c6ae20362310176144e66d54778", "score": "0.57346874", "text": "public function show(Post $post)\n {\n $postSelect = [\"id\", \"title\", \"user_id\", 'category_id', \"image\"];\n $withList = [\n 'user' => function ($query) {\n $query->select(['id', 'name']);\n },\n 'category' => function ($query) {\n $query->select(['id', 'name'])->with(\"properties\");\n },\n 'properties' => function ($query) {\n $query->select([\"title\", \"code\"]);\n },\n \"medias\"\n ];\n $query = Post::with($withList)->select($postSelect);\n $post = $query->findOrFail($post->id);\n if (!empty($post->properties)) {\n foreach ($post->properties as $property) {\n $property->title = __($property->title);\n $value = $property->pivot->value;\n $property->value = $value;\n unset($property->pivot);\n }\n }\n if (!empty($post->category)) {\n if (!empty($post->category->name)) {\n $post->category->name = __($post->category->name);\n }\n if (!empty($post->category->properties)) {\n foreach ($post->category->properties as $property) {\n $property->title = __($property->title);\n $property->required = $property->pivot->required;\n if ($property->extra_settings) {\n $property->extra_settings = json_decode($property->extra_settings);\n }\n unset($property->pivot);\n }\n }\n }\n return $post;\n }", "title": "" }, { "docid": "0f174cd834f09a08b49deb106bdd38d3", "score": "0.5729988", "text": "function getPost($post_id=null) {\n\n\t\treturn $this->httpGet($this->_baseUrl.'posts/'.$post_id);\n\n\t}", "title": "" }, { "docid": "ff5006b9da40c8e3146505b3ba4de194", "score": "0.5725991", "text": "public function grabMedia($id)\n {\n return $this->mediaDao->findMediaById($id, $this->sanitizer);\n }", "title": "" }, { "docid": "1d0d7f5314278310a89ec2f8ae10e333", "score": "0.5718315", "text": "public function show($post)\n {\n $post = Post::find($post);\n \n if($post){\n return $post;\n } else {\n return response([\n 'message'=>'Post was not found!', \n ],404);\n }\n }", "title": "" }, { "docid": "a6979d9e3453678bcb6cebd0f439b00d", "score": "0.57142985", "text": "function get_media_url($media_id) {\r\n $attachment = wp_get_attachment_image_src($media_id, \"full\");\r\n $attachment_url = $attachment[0];\r\n return $attachment_url;\r\n}", "title": "" }, { "docid": "2f9af75de22260ce98881d3c715c4166", "score": "0.5705948", "text": "public function show($id)\n {\n return postComment::findOrFail($id);\n }", "title": "" }, { "docid": "03eb7dbb78bb2c7cf5ab658bd06ea8a5", "score": "0.5689501", "text": "function cc_get_attachment ($id) {\n\tglobal $wpdb;\n \treturn $wpdb->get_row(\"SELECT guid AS uri, post_content AS descr FROM $wpdb->posts WHERE post_parent=$id AND post_status='inherit';\");\n}", "title": "" }, { "docid": "484f9ffc13480e40c7e2aedf7391374a", "score": "0.5682435", "text": "function get_post(){\n global $db;\n $req = $db->query(\"\n SELECT \tposts.id,\n posts.title,\n posts.image,\n posts.content,\n posts.date_post,\n posts.posted,\n admins.name\n FROM posts\n JOIN admins\n ON posts.writer = admins.email\n WHERE posts.id ='{$_GET['id']}'\n \");\n $result = $req->fetchObject();\n return $result;\n}", "title": "" }, { "docid": "7da2ed6f2a367334964361cd7a6a6ac0", "score": "0.56714517", "text": "public static function findUrlFromId($mediaId) {\n return wp_get_attachment_url($mediaId);\n }", "title": "" }, { "docid": "9837628a13b5f9986da3580c5d1aa433", "score": "0.56532115", "text": "public function show($id)\n {\n return Post::find($id);\n }", "title": "" }, { "docid": "233e342c54792870a384507f747aa76c", "score": "0.5651774", "text": "public function getCommentPostByIdPost($id_post)\n {\n try{\n $commentPosts = $this -> commentPostService -> getCommentPostByIdPost($id_post);\n // dd( $commentPosts -> first() );\n\n if($commentPosts -> first() != null){\n return response() -> json([\n 'status' => true,\n 'code' => 200,\n 'CommentPosts' => $commentPosts,\n ]);\n }else{\n return response() -> json([\n 'status' => false,\n 'code' => 404,\n 'message' => \"Not Found\"\n ]);\n }\n\n }catch(\\Exception $e){\n return response() -> json([\n 'status' => false,\n 'code' => 404,\n 'message' => $e->getMessage(),\n ]);\n }\n\n\n\n }", "title": "" }, { "docid": "2b14f446ac9ea6537623a88d887f4756", "score": "0.5647977", "text": "protected function findInstance($post = false) {\n $id = $this->decideIdSource($post);\n\n $instance = null;\n if (!empty($id)) {\n /** @var \\Skully\\App\\Models\\BaseModel $instanceBean */\n $instanceBean = R::findOne($this->model(), \"where id = ?\", array($id));\n if (!empty($instanceBean)) {\n $instance = $instanceBean->box();\n }\n else {\n return null;\n }\n }\n else {\n if (!in_array($this->getCurrentAction(), array('edit', 'update', 'delete', 'destroy'))) {\n $instance = $this->app->createModel($this->model());\n }\n }\n return $instance;\n }", "title": "" }, { "docid": "755e68e4d33bc2ac458fe42aaafc06ec", "score": "0.5644522", "text": "public function fetchSinglePost($post, $mobile) {\n\t\t\t$id = $post['id'];\n\n\t\t\t$sql = 'SELECT c.name AS category_name, p.id, p.category_id, p.title, p.body, p.author, p.created_at\n FROM\n posts p \n LEFT JOIN\n categories c ON p.category_id = c.id \n WHERE p.id = :id';\n\n \t$result = $this->conn->prepare($sql);\n\n \t$result->bindParam('id', $id);\n \t$result->execute();\n\n \tif($result->rowCount() > 0){\n \t\t$post = $result->fetchAll(PDO::FETCH_ASSOC);\n \t\techo json_encode(array('status'=>'success', 'post'=>$post));\n \t\tdie;\n \t}else{\n \t\techo json_encode(array('status'=>'success', 'post'=>'empty'));\n \t\tdie;\n \t}\n\t\t}", "title": "" }, { "docid": "215ee782150ffa2479832f5f58596316", "score": "0.564101", "text": "function getChannelIdByPost_id($conn,$post_id){\n\t\t$query=\"select ChannelId from Posts where Id='$post_id'\";\n\t\t$res = $conn->query($query);\n\t\t$row = $res->fetch(PDO::FETCH_ASSOC);\n\t\treturn $row['ChannelId'];\n\t}", "title": "" }, { "docid": "37fd1ab1aedc432a73a6d2df2c46f818", "score": "0.563784", "text": "function bubblecast_get_video_ids_from_post($post) {\n $matches = array();\n $matched = preg_match_all(\"/\\\\[bubblecast\\\\s*id=([^\\\\s\\\\]]+)\\\\s*.*\\\\s*\\\\]/\", $post->post_content, $matches);\n if ($matched > 0) {\n \t$ids = array();\n \tforeach ($matches[1] as $match) {\n \t\t$ids[] = $match;\n \t}\n return $ids;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "ea56c54e12c69e8b137d34360e83cf86", "score": "0.5637367", "text": "public function getContentOwnerId($post_id){\n return Posts::where('id' , '=', $post_id)->first()->user_id;\n }", "title": "" }, { "docid": "b55744276fb9b382fcc0036d65256e19", "score": "0.5632486", "text": "function find_post_id_url($post_id)\n{\n\t$max=intval(get_option('forum_posts_per_page'));\n\n\t$id=$GLOBALS['FORUM_DB']->query_value_null_ok('f_posts','p_topic_id',array('id'=>$post_id));\n\tif (is_null($id)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\n\t// What page is it on?\n\t$before=$GLOBALS['FORUM_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_posts WHERE id<'.strval((integer)$post_id).' AND '.ocf_get_topic_where($id));\n\t$start=intval(floor(floatval($before)/floatval($max)))*$max;\n\n\t// Now redirect accordingly\n\t$map=array('page'=>'topicview','type'=>NULL,'id'=>$id,'start'=>($start==0)?NULL:$start);\n\tforeach ($_GET as $key=>$val)\n\t\tif ((substr($key,0,3)=='kfs') || (in_array($key,array('start','max')))) $map[$key]=$val;\n\t$_redirect=build_url($map,'_SELF',NULL,true);\n\t$redirect=$_redirect->evaluate();\n\t$redirect.='#post_'.strval($post_id);\n\n\treturn $redirect;\n}", "title": "" }, { "docid": "711a2f177511faa921ef5029da9fec53", "score": "0.5632283", "text": "function duplicate_post_get_page($id) {\n\tglobal $wpdb;\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\n\tif ($post->post_type == \"revision\"){\n\t\t$id = $post->post_parent;\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\n\t}\n\treturn $post[0];\n}", "title": "" }, { "docid": "ecd9ea61d6058a7db0d6a77e9ba968d2", "score": "0.56318367", "text": "public function getPostDetails($postId) {\r\n $queries = array(\r\n 'detailsQuery' => GraphObjectFactory::DETAILS_QUERY . 'WHERE post_id=\"' . $postId . '\"',\r\n 'imageQuery' => GraphObjectFactory::IMAGE_QUERY . 'WHERE object_id IN (SELECT attachment FROM #detailsQuery)',\r\n 'userQuery' => GraphObjectFactory::USER_QUERY . 'WHERE uid IN (SELECT actor_id FROM #detailsQuery)',\r\n 'commentsQuery' => GraphObjectFactory::COMMENT_QUERY . 'WHERE post_id IN (SELECT post_id FROM #detailsQuery) ORDER BY time ASC',\r\n 'commentUserQuery' => GraphObjectFactory::USER_QUERY . 'WHERE uid IN (SELECT fromid FROM #commentsQuery)',\r\n 'commentImageQuery' => GraphObjectFactory::IMAGE_QUERY . 'WHERE object_id IN (SELECT attachment FROM #commentsQuery)'\r\n );\r\n\r\n // Run the query.\r\n $response = $this->graphApiClient->api(array(\r\n 'method' => 'fql.multiquery',\r\n 'queries' => $queries\r\n ));\r\n\r\n // Check to ensure that post data was actually returned.\r\n // This is done by checking for post_id in the fql_result_set.\r\n if (!isset($response[0]['fql_result_set'][0]['post_id'])) {\r\n $e = new Exception('Sorry, but this post couldn\\'t be loaded. It may have been deleted.');\r\n echo $e->getMessage();\r\n throw $e;\r\n }\r\n\r\n try {\r\n $raw = $response[0]['fql_result_set'][0];\r\n\r\n // Collect the returned data.\r\n $post = new Post();\r\n\r\n // post_id,message,actor_id,permalink,like_info,share_info,comment_info,tagged_ids,attachment,created_time\r\n $post->setId($raw['post_id']);\r\n $post->setMessage($raw['message']);\r\n $post->setPermalink($raw['permalink']);\r\n $post->setUserLikes($raw['like_info']['user_likes']);\r\n $post->setUpdatedTime($raw['updated_time']);\r\n $post->setCreatedTime($raw['created_time']);\r\n $post->setActor((new UserFactory())->createUser($response[3]['fql_result_set'][0]));\r\n } catch (Exception $ex) {\r\n echo 'Sorry, but this post couldn\\'t be loaded. It may have been deleted.';\r\n http_response_code(500);\r\n }\r\n\r\n if (strlen($post->getMessage()) > 0) {\r\n // Replace new line characters with <br/>\r\n $post->setMessage(nl2br($post->getMessage()));\r\n }\r\n\r\n // Extract image data for the post.\r\n $imgFactory = new ImageObjectFactory($response[2]['fql_result_set']);\r\n $post->setImageObjects($imgFactory->getImageObjectsFromFQL($raw, false));\r\n\r\n // Extract link data.\r\n $post->setLinkData((new LinkDataFactory())->getLinkDataFromFQL($raw));\r\n\r\n // Determine type of post.\r\n $post->setType($this->getPostType($post));\r\n\r\n // Parse comment data and set it.\r\n $post->setComments((new CommentFactory())->getCommentsFromFQL($response[1]['fql_result_set'], $response[5]['fql_result_set'], $response[4]['fql_result_set']));\r\n\r\n return $post;\r\n }", "title": "" }, { "docid": "bb5d2f93e08f2bbbc1a6496fd4f2e97a", "score": "0.56307817", "text": "public function showPostSingle(Post $post)\n {\n return $this->postService->showPostSingle($post);\n }", "title": "" }, { "docid": "99067b3a66e2fa21fd35a48cbc6336c1", "score": "0.5629743", "text": "public function getUserPostById($post_id){\n\t\t\t$db \t\t= new Database();\n\t\t\t$res \t\t= $db->fetchContentById(0, 'thread_id', $post_id, 'threads');\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "e3d3add23b3c70f77b37b4ae311542d1", "score": "0.56293565", "text": "function media_from_id( $id, $size = 'full' ) {\n\t$image_attributes = wp_get_attachment_image_src( $id, $size );\n\tif ( ! $image_attributes ) {\n\t\treturn false;\n\t}\n\n\treturn $image_attributes[0];\n}", "title": "" }, { "docid": "e6e1a019e46b9b73fd2e6d92d9dd7808", "score": "0.5627956", "text": "public function show(Post $post, $id)\n {\n $show = $post->find($id);\n $result['status'] = 1;\n $result['msg'] = 'success';\n $result['object'] = $show;\n return $result;\n }", "title": "" }, { "docid": "dc11c014bd512a9ae5d8751c0f8027ec", "score": "0.5626233", "text": "function eZMedia( $id=\"\" )\r\n {\r\n $this->PhotographerID = 0;\r\n $this->NewMedia = false;\r\n if ( $id != \"\" )\r\n {\r\n $this->ID = $id;\r\n $this->get( $this->ID );\r\n }\r\n }", "title": "" }, { "docid": "17b79c7b3e7668fe30bb4b09b9a4cf64", "score": "0.56247604", "text": "public function getPost($id){\n \tif($this->_apc && apc_exists($this->apc_blog_post . $id)){\n \t\treturn apc_fetch($this->apc_blog_post . $id);\n \t}else{ \t\t\n\t \ttry {\n\t \t\t$sql = \"SELECT P.id as id, P.timestamp as date, P.content as content, U.username as author, P.title as title FROM blog_post P, user U WHERE P.id = :id AND U.id = P.userid LIMIT 1\";\n\t\t \t$stmt = $this->_db->prepare($sql);\n\t\t $stmt->execute(array( 'id' => $id));\n\t\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t $error = $stmt->errorInfo();\n\t\t\t throw new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir un post sp&eacute;cifi&eacute;.\");\n\t\t\t }\n\t\t\t\t$data = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\tif(empty($data)){\n\t\t\t\t\tthrow new NullObjectException();\n\t\t\t\t}\n\t\t $post = new BlogPost($data);\n\t\t $post->setComments($this->getListCommentPost($id));\n\t\t if($this->_apc){\n\t\t \tapc_store($this->apc_blog_post . $id, $post, 86000);\n\t\t }\n\t\t \treturn $post;\n\t \t}catch(PDOException $e){\n\t \tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir un post sp&eacute;cifi&eacute;.\");\n\t }\t\n \t}\n }", "title": "" }, { "docid": "ac44b7e42368c8898f50b059724ac724", "score": "0.5617814", "text": "public function getById($postId)\n {\n return $this->post->find($postId);\n }", "title": "" }, { "docid": "54db275f75f2ed3dc44662dc92da436d", "score": "0.5607702", "text": "public function findById(int $id, bool $countView = false): ?Post\n {\n $post = Post::where('id', $id)->first();\n\n if($post && $countView) {\n $post->views++;\n $post->save();\n }\n\n return $post;\n }", "title": "" }, { "docid": "95d4af5e293c76934aba78240e3e78e9", "score": "0.56075644", "text": "public function publish_post($postid) {\n\t\tif (has_post_thumbnail($postid)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// No thumbnail so search the media library for something.\n\n\t\t// Start with searching through the tags first. This is to\n\t\t// allow a post to use a more specific image. For both tags and\n\t\t// categories, sort the slugs and pick the first one that finds\n\t\t// an image.\n\t\t$the_tags = get_the_tags($postid);\n\t\t$tags = array();\n\t\tif (!empty($the_tags)) {\n\t\t\tforeach ($the_tags as $t) {\n\t\t\t\t$tags[] = $t->slug;\n\t\t\t}\n\t\t}\n\n\t\t$image_id = $this->check_slugs($postid, 'tag', $tags);\n\t\tif (is_int($image_id)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$the_cats = get_the_category($postid);\n\t\t$categories = array();\n\t\tforeach ($the_cats as $cat) {\n\t\t\t$categories[] = $cat->slug;\n\t\t}\n\n\t\t$image_id = $this->check_slugs($postid, 'category', $categories);\n\t\tif (is_int($image_id)) {\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "92b9fb8cc9bc370aac0cce7ac90031f9", "score": "0.55990446", "text": "public function getPostById($id)\n {\n $post = Post::findOrFail($id);\n return $post;\n }", "title": "" }, { "docid": "0af7e38ba3d8a74d7371b694e5d29d94", "score": "0.5587284", "text": "function cmdeals_get_deals_to_duplicate($id) {\n\tglobal $wpdb;\n\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\n\tif ($post->post_type == \"revision\"){\n\t\t$id = $post->post_parent;\n\t\t$post = $wpdb->get_results(\"SELECT * FROM $wpdb->posts WHERE ID=$id\");\n\t}\n\treturn $post[0];\n}", "title": "" }, { "docid": "a5416165b68114c6b977c4a223d4bfe2", "score": "0.5585654", "text": "public function find($id)\r\n {\r\n if(!$id){\r\n return $id;\r\n };\r\n $sql = \"SELECT * FROM posts where id=?;\";\r\n\r\n $conn = Database::getBdd();\r\n $stmt = $conn->prepare($sql);\r\n echo mysqli_error($conn);\r\n \r\n $stmt->bind_param(\r\n \"i\", // tells you what type the vars will be (check php docs for more info)\r\n $id\r\n );\r\n $stmt->execute();\r\n return $stmt->get_result();\r\n }", "title": "" }, { "docid": "e957d90377ba615df8a9eeaf42c5beeb", "score": "0.55851483", "text": "public function getPost($id) {\n\n $result = $this->connection->selectAssociativeValues(\"SELECT * FROM blog_news WHERE id=$id\");\n\n if ($result == null)\n return null;\n $result = $result[0];\n\n return new Post(intval($result['id']), $result['body'], $result['subject'], intval($result['author']), $result['releasedate']);\n }", "title": "" }, { "docid": "e2c884c186f28d237fb561e1a30249e1", "score": "0.5581531", "text": "function get_post_by_id($id)\r\n{\r\n // $connection = new PDO(\"mysql:host=localhost;dbname=$bdd\", $user, $password);\r\n $connection = open_database_connection();\r\n\r\n $query = 'SELECT created_at, title, body FROM posts WHERE id=:id';\r\n $statement = $connection->prepare($query);\r\n $statement->bindValue(':id', $id, PDO::PARAM_INT);\r\n $statement->execute();\r\n\r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n\r\n close_database_connection($connection);\r\n\r\n return $row;\r\n}", "title": "" }, { "docid": "07c6ac87fb69f63777015e4390c7cfc5", "score": "0.55805695", "text": "function getMedia($id){\n\t$image = new Image();\n\t$image->get($id, true);\n\n\t$image = null;\n}", "title": "" }, { "docid": "5b73581574682791fd2d4828da9b2011", "score": "0.5574468", "text": "public function isPostExist($id){\n\t\t\t$params = [\n\t\t\t\t'id' => $id];\n\t\t\treturn $this->db->column('SELECT id FROM posts WHERE id = :id',$params);\n\t\t}", "title": "" }, { "docid": "61747d261db4960a93d3581adf471114", "score": "0.5565538", "text": "function goarch_get_attachment_id_by_url($image_src)\n{\n global $wpdb;\n $id = $wpdb->get_var($wpdb->prepare(\"SELECT ID FROM $wpdb->posts WHERE guid = %s\", $image_src));\n return (!empty($id)) ? $id : NULL;\n}", "title": "" }, { "docid": "d8c3041d22aa22b75bf73b2d4670f9e6", "score": "0.55651075", "text": "public function getPostDetail($postId)\n {\n $favoritePosts = Favorite::getFavoritesPostsIds(Auth::id());\n $post = Post::select('posts.*','users.name as author')\n ->with('comments')\n ->join('users','posts.user_id','users.id')\n ->where('posts.id',$postId)\n ->first();\n if ($post){\n return ResponseHelper::successResponse(__('common.data_returned_successfully'),['post' => $post,'favorites' => $favoritePosts]);\n }else{\n return ResponseHelper::errorResponse(__('common.data_returned_successfully'),404);\n }\n }", "title": "" }, { "docid": "bc4f18eb097242f6529c0c9dbccc74c7", "score": "0.55600196", "text": "public function getPostById() {\n $post = array();\n\n $post = $this->model->getPostById($_POST['id']);\n $post['author'] = $this->model->getAuthorById($post['id_user']);\n $post['likes'] = $this->model->getPostLikes($post['id_post']);\n $post['comments'] = $this->model->getPostComments($post['id_post']);\n\n foreach($post['comments'] as $key => $value) {\n $post['comments'][$key]['author'] = $this->model->getAuthorById($value['id_user']);\n }\n $post['views'] = $this->model->getPostViews($post['id_post']);\n $this->model->updateViewCount($post['id_post']);\n if (isset($_SESSION[\"id_user\"])) {\n $post['like'] = $this->model->getLike($_SESSION[\"id_user\"], $post[\"id_post\"]);\n }\n\n echo json_encode($post);\n exit ;\n }", "title": "" }, { "docid": "7cdbeaacfa9c287107ec30ab950f8dd8", "score": "0.5557428", "text": "public static function findOne($pageId) {\n $page = get_post($pageId);\n return Rootpress::getEntityFromWPPost($page);\n }", "title": "" }, { "docid": "02082ef42f0d634b0e78c921681319a3", "score": "0.5550477", "text": "function findPostBySlug($slug)\n{\n\n $name = trim($slug, '/');\n\n if (strpos($name, '/')) {\n $parts = explode('/', $name);\n $name = array_pop($parts);\n }\n\n $posts = get_posts([\n 'name' => $name,\n 'post_type' => 'any',\n 'post_status' => 'published',\n ]);\n\n if (count($posts) > 0) {\n return $posts[0];\n }\n\n return null;\n}", "title": "" }, { "docid": "993a7bae5ce3b64d952cc3528dbfa470", "score": "0.55447507", "text": "public function getPostById($id) {\n\t\t$id = $this->db->real_escape_string($id);\n\n\t\t$sql = \"\n\t\t\tSELECT `posts`.*, `users`.`name` as owner FROM `posts`\n\t\t\tINNER JOIN `users` ON\n\t\t\t`users`.`id`=`posts`.`user_id`\n\t\t\tWHERE `posts`.`id`='{$id}'\n\t\t\";\n\n\t\t$sql = $this->db->query($sql);\n\n\n\t\treturn $sql->fetch_object();\n\t}", "title": "" }, { "docid": "1dfed01ecfd5edba48b3df4d749811a4", "score": "0.5538848", "text": "function get_post($k){\n #get the post object\n $this->post = $this->bucket->get($k);\n $this->comments = $this->post->link(\"comments\")->run();\n #eager load the album data\n #$this->albums = $this->artist->link(\"albums\")->run();\n\n return $this->post->getData();\n }", "title": "" } ]
6b9c658380f64990ba40ae3222a5ad4c
/ Date : 03/08/2016 This function return a flash session value of a key
[ { "docid": "01999fdff7cb99862b7b81d102bfacc3", "score": "0.69073", "text": "function get_flash($key=''){\n\t\tif($key == ''){\n\t\t\tdie(\"Enter valid parameter\");\n\t\t}\n\t\t$ci = &get_instance();\n\t\t$ci->load->library('session');\n\t\treturn $ci->session->flashdata($key);\n\t}", "title": "" } ]
[ { "docid": "e0bd3583d003e7c4661b19fab379b753", "score": "0.7304019", "text": "public function getFlash($key)\n {\n return $_SESSION[self::FLASH_KEY][$key]['value'] ?? false;\n }", "title": "" }, { "docid": "096c7a060cd2107b2fa2d1bcdca42fc4", "score": "0.7259112", "text": "function get($key)\n {\n return $_SESSION[$key];\n }", "title": "" }, { "docid": "ae1f4b4d3748d648aa0cd8f9a5cea517", "score": "0.7245639", "text": "public function get($key){\r\n $session_key = array_search($key,$this->flashSessions);\r\n if(is_int($session_key)){\r\n $session = $_SESSION[$key];\r\n unset($_SESSION[$key]);\r\n unset($this->flashSessions[$session_key]);\r\n } else {\r\n if(isset($_SESSION[$key]))\r\n $session = $_SESSION[$key];\r\n }\r\n return isset($session) ? $session : false;\r\n }", "title": "" }, { "docid": "0932de9b4d0f2a01065b1a0a21dcd4c7", "score": "0.7136465", "text": "public function getSessionCookieKey();", "title": "" }, { "docid": "91afdaac04a46bea32c36fdb02c9c688", "score": "0.71176875", "text": "public function get( $Key ) { return $_SESSION[$Key]; }", "title": "" }, { "docid": "041ed258ca4740177ba8de2a3f81c4c2", "score": "0.6981874", "text": "protected function get($key) {\n\t\tif (!isset($this->sessionData[$key])) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $this->sessionData[$key];\n\t}", "title": "" }, { "docid": "0aaf41743774701710675fe92ac36907", "score": "0.6899355", "text": "public function get($key)\n {\n return $this->CI->session->userdata($this->sessionPrefix.$key);\n }", "title": "" }, { "docid": "16da96b6036fd0db88745c99eb5f6015", "score": "0.68225074", "text": "public static function get($key) {\n\t\tif (isset($_SESSION[$key])) {\n\t\t\treturn $_SESSION[$key];\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "e390ab8485a003977d84d883233b6e98", "score": "0.6748843", "text": "function getFlashMessage($key) {\n $C = & get_instance();\n if ($C->session->userdata('flash_' . $key)) {\n $msg = $C->session->userdata('flash_' . $key);\n $C->session->unset_userdata('flash_' . $key);\n }\n return @$msg;\n}", "title": "" }, { "docid": "c891b5f7d42fd66d037e0187e8d8c067", "score": "0.67445713", "text": "function get_value()\n {\n return app::unserialize64($_SESSION['form_value']);\n }", "title": "" }, { "docid": "829bec97a23886a7fe9d2183d3ba370e", "score": "0.67185277", "text": "private static function getKeyFromSession()\n {\n $sessionmanager = self::getSessionManager();\n if (!$sessionmanager) return false;\n else return $sessionmanager->globalStackVar(\"atkstore_key\");\n }", "title": "" }, { "docid": "86f048c3b921a11b7748400bb3fc1d11", "score": "0.6716259", "text": "private function getSessionValue()\n {\n return Processor::getInternalSessionValue(static::CSRF_PREFIX . $this->getFor());\n }", "title": "" }, { "docid": "09306e9cd805ab686d58734612563ed7", "score": "0.6712165", "text": "function data($key) {\n\t\t$key = $this->sessionKey($key);\n\t\tif ($this->Session->check($key)) {\n\t\t\treturn $this->Session->read($key);\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "8d680ddd7ec530feeac688827636f853", "score": "0.6707692", "text": "public function getFlash(string $key);", "title": "" }, { "docid": "aa242ad81b1fa0da270834cd7857e764", "score": "0.6657035", "text": "function getSessionValue($keyIndex)\n{ \n $sessionValue = NULL;\n if(is_array($keyIndex)) {\n $sessionValue = array();\n foreach ($keyIndex as $key => $value) {\n $sessionValue[$value] = $_SESSION[$key]; \n }\n } else {\n $sessionValue = $_SESSION[$keyIndex]; \n } \n \n return $sessionValue;\n}", "title": "" }, { "docid": "47331372718515e63b5fe9fa2b890aac", "score": "0.6653619", "text": "private function _get_key() {\n\t\t# Allow session overriding for methods that cannot send the correct cookie (i.e. Flash)\n\t\tif(isset($_POST['_e_override_session']))\n\t\t\t$_COOKIE[EVOLUTION_SESSION_COOKIE] = $_POST['_e_override_session'];\n\t\t\t\n\t\tif(!isset($_COOKIE[EVOLUTION_SESSION_COOKIE])) return false;\n\t\t$key = $_COOKIE[EVOLUTION_SESSION_COOKIE];\n\t\tif(strlen($key) == 32) return $key;\n\t\telse return false;\n\t}", "title": "" }, { "docid": "116ebc42bb7213ef7d4f997c88b6779f", "score": "0.6650672", "text": "public function getSessionKey(){\n\t\tglobal $TSFE;\n\t\treturn \t$TSFE->fe_user->getKey('ses','tx_tqslideshow');\n\t}", "title": "" }, { "docid": "98796c386a49289724ca0e939790d02b", "score": "0.6639741", "text": "public function Get($key){\n\t\treturn $_SESSION;\n\t}", "title": "" }, { "docid": "bdaba03955ae18ba91ee4c2b57706e3a", "score": "0.6636917", "text": "public function get($key) {\n return $this->CI->session->userdata($key);\n }", "title": "" }, { "docid": "0fa9727264f77a5d3b06501f058db7b3", "score": "0.66362107", "text": "function get_flash($id)\r\n{\r\n $data = session_get($id);\r\n if ($data) $data = unserialize($data);\r\n session_forget($id);\r\n return $data;\r\n}", "title": "" }, { "docid": "9d4451f68b6afad2d317c0fddd3c8669", "score": "0.66344213", "text": "function get_from_session($key)\n{\n\tif (isset($_SESSION[$key])) {\n\t\treturn $_SESSION[$key];\n\t} else { \n return false;\n }\n}", "title": "" }, { "docid": "0c80d87fdd322e6e3544afef499618c9", "score": "0.65930825", "text": "public static function getFromSession($key) {\n\t\t\treturn Session::getInstance()->getValue($key);\n\t\t}", "title": "" }, { "docid": "3534320926652ea0faa94696a0294605", "score": "0.6580879", "text": "function getValue($var_name){\n return $_SESSION[$var_name];\n }", "title": "" }, { "docid": "ba1657b4ecd9275a6a195cd15cccd80a", "score": "0.6570407", "text": "public function read($key){\n //en verifie si la session existe\n if (isset($this->_session[$key])) {\n return $_SESSION[$key];\n }else{\n throw new Exception(\"La session n'existe pas \");\n return false;\n \n }\n\n}", "title": "" }, { "docid": "d7ae8dfc09c4a668c41daa0331abb4c1", "score": "0.65667933", "text": "function session_flash($key, $value)\n{\n if (!session_has('_flash_data')) {\n session_set('_flash_data', []);\n }\n\n $_SESSION['_flash_data'][$key] = $value;\n\n session_set($key, $value);\n\n return $value;\n}", "title": "" }, { "docid": "2aef888388bdb8434f465caf6e426e38", "score": "0.6557044", "text": "public function getFlash($key) {\n\t\treturn $this->started && isset($_SESSION[$this->flashSessionKey][$key])\n\t\t\t? $_SESSION[$this->flashSessionKey][$key]\n\t\t\t: null;\n\t}", "title": "" }, { "docid": "227a0bf97cb3adbc4322a9b07233e3a7", "score": "0.6552464", "text": "public static function Get($key)\n {\n if(isset($_SESSION[$key]))\n return $_SESSION[$key];\n }", "title": "" }, { "docid": "88f2d37c56f586fca32bb9d3c90f2c11", "score": "0.65300626", "text": "public function get( $key )\r\n {\r\n if ( ! isset($_SESSION[$key]) ) return null;\r\n return $_SESSION[$key];\r\n }", "title": "" }, { "docid": "7ac3ad85306b32b75c834c6c42197fe5", "score": "0.6518", "text": "function get()\n {\n $value = $this->session->get($this->key);\n return $value === false ? null : base64_decode($value);\n }", "title": "" }, { "docid": "a213812f75d2a425a20ad68870386e3f", "score": "0.6510742", "text": "public function get( $key ) {\r\n\t\t$key = sanitize_key( $key );\r\n\t\treturn isset( $this->session[ $key ] ) ? maybe_unserialize( $this->session[ $key ] ) : false;\r\n\t}", "title": "" }, { "docid": "5fea1c4b0c1aac1d50fe0d7d4fa32bec", "score": "0.65062034", "text": "public function get($strKey) {\r\n\t\tif(!$this->isStarted()) throw new ServletException(\"Session not started!\");\r\n\t\tif(!isset($_SESSION[$strKey])) throw new ServletException(\"Session parameter not found!\");\r\n\t\treturn $_SESSION[$strKey];\r\n\t}", "title": "" }, { "docid": "bafa8e1b8a42011a2db4b0b5d4580043", "score": "0.65059334", "text": "public static function get($key)\n {\n $self = strtok(Request::server('REQUEST_URI'),'?');\n \n //var_export($_POST);\n \n //echo \"\\n\\n\";\n //var_export(Session::get('rapyd.'.$self.\".back_post.\".$key)); \n //die;\n\n return Session::get('rapyd.'.$self.\".back_post.\".$key, Input::get($key));\n \n }", "title": "" }, { "docid": "52137409b9586fd22229c6288c38642e", "score": "0.64967775", "text": "public static function get($key) {\n\t\tif(array_key_exists($key,$_SESSION)) {\n\t\t\treturn $_SESSION[$key];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "501966dfa14cb95010afb01c7244186c", "score": "0.6478182", "text": "public function getSessionKey()\n {\n return $this->get(self::_SESSION_KEY);\n }", "title": "" }, { "docid": "7788838ebe25521f9efacbdf433312a0", "score": "0.64590704", "text": "public function flashdata(?string $key = null)\n {\n return $this->session->getFlashdata($key);\n }", "title": "" }, { "docid": "680749a29b4c8a3e950c4aad401a3fae", "score": "0.6454495", "text": "public function getValue($key) {\n return $this->coreSession->getValue($key);\n }", "title": "" }, { "docid": "0d9189d63c54489d745b28cb1279780e", "score": "0.6448891", "text": "function getSessionKey() { \n\t return $this->api->sessionKey;\n\t}", "title": "" }, { "docid": "b7ff0ec6d0901d1aa0282a4e086c3d6d", "score": "0.6437476", "text": "public function get(string $key)\n {\n //$this->init();\n if(!isset($_SESSION[$this->name]))\n {\n return false;\n }\n\n if (!array_key_exists($key, $_SESSION[$this->name]))\n {\n return false;\n }\n\n return unserialize($_SESSION[$this->name][$key]);\n }", "title": "" }, { "docid": "6c74a46810f1b04034e4b4c5d56540f2", "score": "0.6420913", "text": "public function get($key)\n {\n return $_SESSION[$key]?? false;\n }", "title": "" }, { "docid": "f49d5cca6cbdb57226a311c27964dc40", "score": "0.64162487", "text": "public static function getFlashMsg($key){\n\t\t$session = Yaf_Session::getInstance ();\n\t\t$key = '__flash_'.$key;\n\t\t$msg = $session->__get($key);\n\t\t$session->del($key);\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "ad3bdeca9d568c4e703b0934ac8e057c", "score": "0.63845587", "text": "public function getSessionKey()\n {\n return $this->session_key;\n }", "title": "" }, { "docid": "122dd1de2fd8c5849c12eb57ba8ca63f", "score": "0.6378992", "text": "public function value()\n\t{\n\t\treturn $this->app->input->cookie->get($this->params->name);\n\t}", "title": "" }, { "docid": "2d3466f7f1487c378f4f9697d2614dc7", "score": "0.63484704", "text": "public static function get($key) {\n\t\treturn static::has($key) ? $_SESSION[$key] : null;\n\t}", "title": "" }, { "docid": "4fa83c71ac3c7ba9e470b6b2a61d4225", "score": "0.63294667", "text": "public function getSessionKey() {\n\t\treturn $this->sessionKey;\n\t}", "title": "" }, { "docid": "b621584237f43179669e2da858ecca3b", "score": "0.6318908", "text": "static function get($key, $default = null) {\n if(isset($_SESSION[$key])) {\n return $_SESSION[$key];\n } else {\n return $default;\n }\n}", "title": "" }, { "docid": "36d52157b5b0e2b52b6caeb0ee043e4e", "score": "0.63163286", "text": "public static function getVar(string $key)\n {\n if( isset( $_SESSION[ $key ]))\n {\n return $_SESSION[ $key ];\n } \n }", "title": "" }, { "docid": "9291be3cb34141a319cb3646d783be71", "score": "0.63061446", "text": "public function get($key)\n {\n return !empty($_SESSION[$key]) ? $_SESSION[$key] : null;\n }", "title": "" }, { "docid": "372d32ef930a425fd915a941178bc50a", "score": "0.6268994", "text": "public function getFlashMessage(string $key) {\n if (Cux::getInstance()->hasComponent(\"session\")) {\n if (($messages = Cux::getInstance()->session->get($this->flashMessageKey)) != false && isset($messages[$key])) {\n $ret = $messages[$key];\n $messages[$key] = false;\n unset($messages[$key]);\n Cux::getInstance()->session->set($this->flashMessageKey, $messages);\n return $ret;\n }\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "19a699db4a38b78ccac660c20f925b03", "score": "0.6261701", "text": "public function get(string $key)\n {\n return $_SESSION[$key] ?? null;\n }", "title": "" }, { "docid": "b1e73104d5a94293b470a3477c1299aa", "score": "0.6260663", "text": "public static function get($key)\n\t{\n\t\tif ( !isset($_SESSION[$key]) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $_SESSION[$key];\n\t}", "title": "" }, { "docid": "987e8bde18dad50803501dbd0bcbf8d2", "score": "0.6258567", "text": "protected function getTokenFromSession(): string\n {\n return $this->session->get($this->key());\n }", "title": "" }, { "docid": "80df538b6dd503861b1aaa88f9bd2ecf", "score": "0.6235014", "text": "public static function get($key)\n {\n if (isset($_SESSION[$key])) {\n return $_SESSION[$key];\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "72b4266bc930cf79a5b6557d959eacbd", "score": "0.623055", "text": "public function flashdata($key = NULL)\n\t{\n\t\tif (isset($key))\n\t\t{\n\t\t\treturn (isset($_SESSION['__ci_vars'], $_SESSION['__ci_vars'][$key], $_SESSION[$key]) && ! is_int($_SESSION['__ci_vars'][$key]))\n\t\t\t\t? $_SESSION[$key]\n\t\t\t\t: NULL;\n\t\t}\n\n\t\t$flashdata = array();\n\n\t\tif ( ! empty($_SESSION['__ci_vars']))\n\t\t{\n\t\t\tforeach ($_SESSION['__ci_vars'] as $key => &$value)\n\t\t\t{\n\t\t\t\tis_int($value) OR $flashdata[$key] = $_SESSION[$key];\n\t\t\t}\n\t\t}\n\n\t\treturn $flashdata;\n\t}", "title": "" }, { "docid": "3eb2d8e9d3d83f024631d88c92945e80", "score": "0.6223154", "text": "protected function getSessionKey()\n\t{\n\t\treturn $this->config->get('alerts::session_key');\n\t}", "title": "" }, { "docid": "7219d4c0df952c479cf3bc3cebd19371", "score": "0.6222757", "text": "public function getSessionKey()\n\t{\n\t\treturn $this->config->get('notify.session_key');\n\t}", "title": "" }, { "docid": "8b3deff644b15a8e240cc8ca176f49b5", "score": "0.62104774", "text": "public function flash($key,$value){\r\n array_push($this->flashSessions, $key);\r\n $this->set($key, $value);\r\n }", "title": "" }, { "docid": "10b610384f13a905c0e3ba1eef143503", "score": "0.61938345", "text": "public function getSessionKey()\n {\n return $this->sessionKey;\n }", "title": "" }, { "docid": "444d90b7ab6de840f89c45bc37f44097", "score": "0.6188683", "text": "public function getFlash(string $key)\n {\n $key = $this->flashKey($key);\n\n $value = $this->get($key);\n\n $this->delete($key);\n\n return $value;\n }", "title": "" }, { "docid": "9c9399689a3207cdeeceab6d86d1839d", "score": "0.6188064", "text": "public function getSession( $key );", "title": "" }, { "docid": "88c4f8b2cde169963731a6a297833a16", "score": "0.61843956", "text": "public function getSessionValue($name)\n {\n if (isset($_SESSION[$name]))\n {\n return $_SESSION[$name];\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "ef0345672d96dfc1da15422c875920a4", "score": "0.6171953", "text": "public static function get($name){\r\r\n\t\treturn $_SESSION[$name];\r\r\n\t}", "title": "" }, { "docid": "0cbf259a161385e5b7f6b20da383bda1", "score": "0.616552", "text": "public function get($key)\n {\n return self::exists($key) ? $_SESSION[$key] : null;\n }", "title": "" }, { "docid": "f0ac554b3e3a65ddddf416fbfca1033c", "score": "0.6150608", "text": "public function get(string $key, string $default = null): ?string {\n\t\treturn array_key_exists($key, $this->session) ? $this->session[$key] : $default;\n\t}", "title": "" }, { "docid": "5ffe2d2cacf4af102adbfcd5ad454685", "score": "0.61458266", "text": "static function getSessionIdentifier():?String{\n if (!key_exists(Authentication::KEY_SESSION_IDENTIFIER,$_SESSION)) {\n return null;\n }\n return $_SESSION[Authentication::KEY_SESSION_IDENTIFIER];\n }", "title": "" }, { "docid": "e1918b258eb28431dd5866ea6f124ce5", "score": "0.61364776", "text": "public function getSessionCookie(): string;", "title": "" }, { "docid": "cd9be5e79a7ed07ec2383e688fe64b39", "score": "0.61290884", "text": "public function getFlash($key, $alt = null)\n {\n $this->resumeSession();\n return isset($_SESSION[SessionManager::FLASH_NOW][$this->name][$key])\n ? $_SESSION[SessionManager::FLASH_NOW][$this->name][$key]\n : $alt;\n }", "title": "" }, { "docid": "808fa7db5baba6cfcd952bf51616f52a", "score": "0.6126008", "text": "public static function get(?string $key = null): mixed {\n\t\tif (!isset($_SESSION['data'])) {\n\t\t\t$_SESSION['data'] = array();\n\t\t}\n\n\t\tif ($key) {\n\t\t\treturn $_SESSION['data'][$key] ?? '';\n\t\t}\n\n\t\treturn $_SESSION['data'];\n\t}", "title": "" }, { "docid": "90ee6a5c20947392b25d884447c5e245", "score": "0.61180216", "text": "protected function &getValue($key)\n {\n if ($this->keyExists($key)) {\n return $_SESSION[$key];\n }\n return null;\n }", "title": "" }, { "docid": "3f9c51e2e2d6c4017d3e19f9b21b7818", "score": "0.6116118", "text": "public function get($key)\n\t{\n\t\treturn (isset($_SESSION[$key])) ? unserialize(Hash::undo($_SESSION[$key])) : false;\n\t}", "title": "" }, { "docid": "6e90337f9d6befac3e89072b3d5836b7", "score": "0.6105358", "text": "function flash(?string $key = null, ?string $default = null)\n{\n $value = session($key, $default);\n\n if ($key !== null) {\n unset($_SESSION[$key]);\n }\n\n return $value;\n}", "title": "" }, { "docid": "30fb26af8246189f44f48a1ee96ec8b2", "score": "0.61020803", "text": "public function getAuthenticationSessionKey(): string;", "title": "" }, { "docid": "dad47f923d25eb6acf72287d1ac1f691", "score": "0.60968393", "text": "protected function session ($key = '', $value = null) \r\n\t{\r\n\t\treturn Hush_Util::session($key, $value);\r\n\t}", "title": "" }, { "docid": "9f03e6b464f6de3e65ec7775a4fe685b", "score": "0.6085183", "text": "public function get_ses($key){\n return isset( $_SESSION[$key] ) ? $_SESSION[$key] : null;\n }", "title": "" }, { "docid": "c986d6a3d92740233a6009bf19e5a4d5", "score": "0.6076187", "text": "function get(string $key, $default = null)\n {\n if (array_key_exists($key, $this->session)) {\n return $this->session[$key];\n }\n return $default;\n }", "title": "" }, { "docid": "f5e1f2f5acd189fb29bb6c57080cc0b7", "score": "0.6073111", "text": "private function _getSessionValue(&$pageContent,$js = true){\n\t\tif($js)\n\t\t\t$match = preg_match_all('#refresh\\s*\\(\\s*\\'(.*)\\'\\s*,\\s*\\'(.*)\\'\\s*\\)#', $pageContent, $matches);//quick & dirty\n\t\telse\n\t\t\t$match = preg_match_all('#name\\s*=\\s*\\\"(.*)\\\"\\s.*\"captcha\"\\s*value\\s*=\\s*\"\\s*(.*)\\s*\"#', $pageContent, $matches);//quick & dirty\n\t\t\t\n\t\t\t\n\t\tif($match === 1 && empty($matches[1]) && empty($matches[2])){\n\t\t\tthrow new Exception('Unable to get the session key/value.');\n\t\t}\n\t\t\n\t\t$this->session = array(trim($matches[1][0]),trim($matches[2][0]));//quick & dirty\n\t}", "title": "" }, { "docid": "314933d8acf842b9f8149f5f944c6e3f", "score": "0.6069558", "text": "public function __get($key) {\n return (isset($_SESSION[$key])) ? $_SESSION[$key] : null;\n }", "title": "" }, { "docid": "3bf13afbb25f9cefd4753c4db938bb54", "score": "0.6065278", "text": "function get_session($key=''){\n\t\tif($key == '' || $key == ''){\n\t\t\tdie(\"Enter valid parameter\");\n\t\t}\n\t\t$ci = &get_instance();\n\t\t$ci->load->library('session');\n\t\tif($ci->session->has_userdata($key)){\n\t\t\treturn $ci->session->userdata($key);\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "8d9922ead0ace61a606c9eb16f092b91", "score": "0.60609114", "text": "public static function GetFlash() {\n\t\t$flash = $_SESSION['flash'];\n\t\tunset ($_SESSION['flash']);\n\t\treturn $flash;\n\t}", "title": "" }, { "docid": "185a126b5a806ade9c174a656055fd35", "score": "0.60594636", "text": "private function getSessionKey()\n\t{\n\t\treturn __CLASS__ . '_' . $this->sessPrefix;\n\t}", "title": "" }, { "docid": "c067f13300a76c802a9f230cbabdc60b", "score": "0.60519004", "text": "public static function get($key,$defaultValue,$delete){\n return Yii::app()->user->getFlash($key,$defaultValue,$delete);\n }", "title": "" }, { "docid": "09a3f68d10e4dd082afff6799981564b", "score": "0.60446775", "text": "private function _get($key, $default) {\n\t\treturn isset($_SESSION['app'][$key]) && isset($this->sessions[$key]) ? $this->sessions[$key] : $default;\n\t}", "title": "" }, { "docid": "a053af6a6c1f8bb00c180d41b7307d88", "score": "0.604389", "text": "protected function getSessionKey()\n\t{\n\t\treturn self::SESSION_VAR_PREFIX . Yii::app()->getId() . '.' . $this->getController()->getUniqueId() . '.' . $this->getId();\n\t}", "title": "" }, { "docid": "906cc96b045add0f8e4ef8a44a4f7385", "score": "0.60349613", "text": "function getFromSession($var){\r\n\t\treturn $_SESSION[$var];\r\n\r\n\t}", "title": "" }, { "docid": "7aaeab4656d3bd48a9e62ea9401db106", "score": "0.6033752", "text": "public function getValue (){\n\t\treturn $_COOKIE[$this->cookiename];\n\t}", "title": "" }, { "docid": "71d6c404bd7693da21b68b4cbbd0cde4", "score": "0.60325134", "text": "public static function get_flash() {\n\t\t$output = '';\n\t\t$key = self::get_user_identifier();\n\t\tif (isset(self::$data['flash'][$key])) {\n\t\t\t$output = self::$data['flash'][$key];\n\t\t\tunset( self::$data['flash'][$key] );\n\t\t\tupdate_option(self::db_key, self::$data);\n\t\t\treturn html_entity_decode($output);\n\t\t}\n\t}", "title": "" }, { "docid": "5a6c865437ad1eae2824ec6c60c6ff11", "score": "0.603058", "text": "static function tokenValue()//value to be used in form\n {\n \tif(!isset($_SESSION[\"rvalue\"]))\n \t\t$_SESSION[\"rvalue\"]=self::randomToken();\n \treturn $_SESSION[\"rvalue\"];\n }", "title": "" }, { "docid": "4baab708699da0bf85cb28ab119122a6", "score": "0.60085523", "text": "public function getData($key)\n\t{\n\t\t$this->checkIfSessionIDisSet();\n\t\t\n\t\t//check before retrieving data, if the session has expired.\n\t\tif ($this->inactivityTimeout() || $this->expireTimeout()) {\n\t\t\tthrow new SessionExpired('Session::getData()',\"This session has expired.\",StandardException::FATAL_LVL);\n\t\t}\n\n\t\t$this->updateLastActivity();\n\t\t$db = DbManager::getConnexion('internals/users_manager');\n\n\t\t$result = $db->SQL('SELECT `SSD_KEY`, `SSD_VALUE` FROM `'._UFO_RBAC_SCHEMA_.'`.`'.$db->manageCase('T_SESSION_DATA_SSD').'` WHERE `SESSION_ID` = ? and `SSD_KEY` = ?', array($this->session, $key));\n\t\t\n\t\tif( isset($result[0]))\n\t\t return $result[0]['SSD_VALUE'];\n\t\telse \n\t\t return null;\n\t}", "title": "" }, { "docid": "1582d251bf4c4fd57b8d67020208dba1", "score": "0.600433", "text": "public static function get($key, $defaultValue = null, $delete = false)\n {\n return Yii::$app->session->getFlash($key, $defaultValue = null, $delete = false);\n }", "title": "" }, { "docid": "0dd612a3594f62ab1f872845d442a0b8", "score": "0.60010356", "text": "public function get()\r\n {\r\n return Session::get($this->session_var, Config::get(\"multilanguage::lang_options.default\") );\r\n }", "title": "" }, { "docid": "6667f6cbe5ddaa8fc827fef4085d7a33", "score": "0.59833914", "text": "public function get_value(): string\n {\n return $_COOKIE[$this->name];\n }", "title": "" }, { "docid": "35b3cc004a316b734e541b5fb96d58f4", "score": "0.59756017", "text": "public function flashdata($key = NULL)\n\t{\n\t\tif(isset($key)){\n\t\t\treturn $this->userdata(self::FLASHDATA_KEY . self::FLASHDATA_OLD . $key);\n\t\t}\n\n\t\t// Get our flashdata items from userdata\n\t\t$out = array();\n\t\tforeach ($this->userdata() as $key => $val) {\n\t\t\tif(strpos($key, self::FLASHDATA_KEY . self::FLASHDATA_OLD) !== FALSE){\n\t\t\t\t$key = str_replace(self::FLASHDATA_KEY . self::FLASHDATA_OLD, '', $key);\n\t\t\t\t$out[$key] = $val;\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "facfe4d0cc3cab76a8c3f17eace03ee3", "score": "0.59722227", "text": "public function read($key)\n {\n return $this->_sessionContainer->get($key);\n }", "title": "" }, { "docid": "c3f22973f3f9fa4c9c8259b98114d132", "score": "0.59698945", "text": "function flash_message($key, $value)\r\n{\r\n //check if the session_start() method is called already\r\n if (session_status() == PHP_SESSION_NONE) {\r\n session_start();\r\n }\r\n $_SESSION[$key] = $value;\r\n}", "title": "" }, { "docid": "b287d5cafadaf7574b555436a6bfdd5a", "score": "0.5969359", "text": "public function getFromSession(string $key)\n {\n return $_SESSION[$key] ?? null;\n }", "title": "" }, { "docid": "01e7992c2bb9576add15c06fd3b21e79", "score": "0.5965799", "text": "public function get($session)\n {\n\n\n return $_SESSION[$session];\n\n }", "title": "" }, { "docid": "2a521164470323729757c263331aee5e", "score": "0.59612364", "text": "static function getSession($name){\n \n return $_SESSION[$name];\n }", "title": "" }, { "docid": "f29d79c9e3ecf05fb96ca3abc1320639", "score": "0.5947941", "text": "private function get_sess_var ( $key ) {\n return self::get_context_sess_var( $this->name, $key);\n }", "title": "" }, { "docid": "e66eb55fb7181085d0e07c78a3cefec0", "score": "0.5941503", "text": "public function getTmdSession($name, $key)\n {\n $session = Mage::getSingleton('core/session')->getData($name);\n if (is_array($session)) {\n if (array_key_exists($key, $session)) {\n return $session[$key];\n } else {\n return null;\n }\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "519ef949918aa8a219640b97ece3faac", "score": "0.5933349", "text": "function get($name){\n\t\t\treturn HTTP_Session2::get($name);\n\t\t}", "title": "" }, { "docid": "375f9a45eb4cf4fcbf9a8a3239cafba0", "score": "0.59302974", "text": "public static function getByKey($key) {\n\t\t$result = DataBase::query(\n\t\t\t\"SELECT session.id \". \n\t\t\t\"FROM \".DataBase::formTableName('Premanager', 'Sessions').\" AS session \".\n\t\t\t\"WHERE session.key = '\".DataBase::escape($key).\"'\");\n\t\tif ($result->next()) {\n\t\t\treturn self::createFromID($result->get('id'));\n\t\t}\n\t\treturn null;\n\t}", "title": "" } ]
1215f5519403d5935df426ff6ed8299f
Checks if dependency exists
[ { "docid": "4dc89ae4c9be76a1f26ddefd0ea7977f", "score": "0.0", "text": "public function exists(string $interfaceName): bool;", "title": "" } ]
[ { "docid": "62179f16dee50b75e50d7842b4d68405", "score": "0.7592567", "text": "public function hasDependency(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "2f706db420254e5299b10f6cd1d9611b", "score": "0.69444823", "text": "protected function isCollisionDependenciesInstalled(): bool\n {\n return class_exists(CollisionTestCommand::class);\n }", "title": "" }, { "docid": "de292f073d83904b6e5fa1743f64d042", "score": "0.68939537", "text": "public function has_dependencies() {\n return !empty($this->dependencies);\n }", "title": "" }, { "docid": "bec7ac41d30add84e80b659ecc92c2f2", "score": "0.6848558", "text": "public static function check_dependencies()\n\t\t{\n\n\t\t\t// - Use function_exists() to check whether a function of that plugin has been loaded.\n\t\t\t// - Use class_exists() to check whether a class defined by that plugin exists.\n\t\t\t// - Use is_defined() to check whether a constant of that plugin has been defined.\n\t\t\t// - Use is_plugin_active(). However this is not recommended because it requires a plugin base path, which obviously\n\t\t\t// changes based on the folder name of the dependent plugin (which the user can set to anything). So this cannot\n\t\t\t// be used as reliably as the first two ways.\n\n\t\t\t//REF: http://solislab.com/blog/plugin-activation-checklist\n\t\t\t// thanks Gary Cao (https://profiles.wordpress.org/garyc40)!\n\n\t\t\t// sample\n\t\t\t//if (!class_exists('SweetnessClass'))\n\t\t\t//\ttrigger_error('Sorry! No candies for you...', E_USER_ERROR);\n\t\t}", "title": "" }, { "docid": "28fc21a3cb6353ca3cd6a468feaec5fa", "score": "0.6795565", "text": "public function has($name) {\n return isset($this->dependencies[$name]);\n }", "title": "" }, { "docid": "c215a25de02497d8fd92aebb6346e94e", "score": "0.67929727", "text": "public function hasDependencyOn(string $fqn) : bool;", "title": "" }, { "docid": "57534c48aeb0af3b4ea9f56ee71b5f9b", "score": "0.6775759", "text": "private function checkDependencies()\r\n {\r\n if (empty(shell_exec(\"which zip\"))) {\r\n throw new Exception(\"Missing required zip dependency (apt-get install zip)\");\r\n }\r\n }", "title": "" }, { "docid": "a3ec9aa50c94e65ca3cc17b86675b051", "score": "0.6636314", "text": "public function requireDependencies()\n\t{\n\t\tif ($this->areDependenciesMissing())\n\t\t{\n\t\t\t$url = UrlHelper::getUrl('analytics/install');\n\t\t\tcraft()->request->redirect($url);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "08840055eb7c71cf6a322f95d110e850", "score": "0.6597177", "text": "private function is_dependency($table) {\n $dependencies = $this->dependencies;\n\n return isset($dependencies[$table]);\n }", "title": "" }, { "docid": "1f7a4d4caf979cdabf5a064e6d1ebf55", "score": "0.64903337", "text": "public static function checkDependencies() {\n\t\tif (function_exists('curl_init')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn array('curl');\n\t\t}\n\t}", "title": "" }, { "docid": "aa4ed3c0d07c02fb41a1aabf8e8b7cc0", "score": "0.64782614", "text": "private function checkDependencies()\n {\n if (!function_exists('curl_init') || !function_exists('curl_setopt')) {\n throw new DripException(\"cURL support is required, but can't be found.\", 1);\n }\n\n return true;\n }", "title": "" }, { "docid": "d9b7ab61f2fd6909788ee105742f6e5f", "score": "0.64758724", "text": "private function areDependenciesMissing()\n\t{\n\t\t$missingDependencies = $this->getMissingDependencies();\n\n\t\tif(count($missingDependencies) > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0bb9998e6a58151a78e8c20a8d59c845", "score": "0.6468368", "text": "public function missingDependencies();", "title": "" }, { "docid": "b67054aa5b1b94c233c045cafd981400", "score": "0.6378604", "text": "public function mustExist(): bool;", "title": "" }, { "docid": "1f40e50048d003e8d25c71f63fb86b38", "score": "0.6346192", "text": "private function determine_action_dependencies_present() {\n // TODO: diff the depends and define maps\n return true;\n }", "title": "" }, { "docid": "d60c1e4eca5c4bae0b4d6f41a80261a9", "score": "0.629653", "text": "public function _dependenciesSatisfied(){\n $result = true;\n if(!file_exists(AK_BASE_DIR.DS.'app'.DS.'controllers'.DS.'admin')){\n echo \"\\nEditam need admin_plugin to be installed first.\\nYou can add admin_plugin by running './script/plugin install admin'\\n\";\n $result = false;\n }\n \n return $result;\n }", "title": "" }, { "docid": "0095b482e56506639dcbe19414c18581", "score": "0.6291978", "text": "public function check ()\r\n\t{\r\n\t\t$hash = \"\";\r\n\t\t$vars = $this->vars();\r\n\t\t\r\n\t\tforeach($this->steps as $i=> $step)\r\n\t\t{\r\n\t\t\techo \"Depend step: $i\" . PHP_EOL;\r\n\t\t\t$check = $step->depend($vars);\r\n\t\t\tif($check === false) return $this->_check = false;\r\n\t\t\t\telse if (is_object($check) && get_class($check)=='InstallError') return $this->_check = $check;\r\n\t\t\t$hash .= spl_object_hash($step);\r\n\t\t}\r\n\t\t$hash = md5($hash);\r\n\t\treturn $this->_check = $hash;\r\n\t}", "title": "" }, { "docid": "ae2a948922bfa459a42ae89badc215bb", "score": "0.62593406", "text": "public function HasDependency(object $targetDependency) : bool\r\n {\r\n $result = false;\r\n\r\n foreach ($this->Dependencies as $dependency)\r\n {\r\n if ($targetDependency->FileName == $dependency->FileName)\r\n {\r\n $result = true;\r\n }\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "191861e68ac2d4745c891b85cb2d5c8c", "score": "0.6254093", "text": "function cakespec_checkDependencies() {\n $pass = true;\n $depErrors = array();\n if ( !function_exists('json_decode') ) {\n $pass = false;\n $depErrors[] = 'json_decode function not present, install PHP json extension';\n }\n\n if ( !exec('which git') ) {\n $pass = false;\n $depErrors[] = \"git not installed: \\n try sudo apt-get install git\\n or sudo yum install git\";\n }\n\n if ( !exec('which svn') ) {\n $pass = false;\n $depErrors[] = \"svn not installed: \\n try sudo apt-get install subversion\\n or sudo yum install subversion\";\n }\n\n if ( $pass === false ) {\n echo \"CakeSpec dependencies not found\\n\";\n foreach( $depErrors as $error ) {\n echo \" \" . $error . \"\\n\";\n }\n exit(1);\n }\n return $pass; \n}", "title": "" }, { "docid": "86beb6ddc7c9f71eac65286fb8ae1f54", "score": "0.62234306", "text": "private function checkRequirements()\n {\n if (!function_exists('finfo_buffer')) {\n throw new MissingDependencyException('PHP Fileinfo extension must be installed/enabled to use Notadd Image.');\n }\n }", "title": "" }, { "docid": "48719ecab25fe4d98c89be896ba05fa1", "score": "0.62181306", "text": "public function add_dependency_check()\n {\n add_action(\n 'plugins_loaded',\n function () {\n if (! class_exists('\\WPGraphQL')) {\n add_action(\n 'admin_notices',\n function () {\n ?>\n <div class=\"error notice\">\n <p>\n <?php\n esc_html__(\n 'WPGraphQL must be installed and activated for \"WPGraphQL CORS\" to work',\n 'wp-graphql-cors'\n );\n ?>\n </p>\n </div>\n <?php\n }\n );\n }\n }\n );\n }", "title": "" }, { "docid": "5dd677f893c2e00664fb108719dc61d0", "score": "0.6170848", "text": "public function getAllowMissingDependencies() : bool\n {\n return $this->allowMissingDependencies;\n }", "title": "" }, { "docid": "2bc1e5aa99e42bdb4b1b9b53594855cb", "score": "0.6108433", "text": "public function checkDependencies(ExtensionInfo $info) {\n if (!isset($info->dependencies))\n return true;\n $valid = true;\n $missing = array(\n 'app' => null,\n 'extensions' => array(),\n 'php' => array()\n );\n foreach ($info->dependencies as $extension) {\n if (!$this->checkExtensionDependency($extension)) {\n $valid = false;\n $missing['extensions'][] = $extension;\n }\n }\n foreach ($info->phpDependencies as $phpExtension) {\n if (!extension_loaded($phpExtension)) {\n $valid = false;\n $missing['php'][] = $phpExtension;\n }\n }\n if (isset($info->appName) and $this->app->name != $info->appName) {\n $valid = false;\n $missing['app'] = $info->appName;\n }\n else if (isset($info->appVersion) and !$this->compareVersion($this->app->version, $info->appVersion)) {\n $valid = false;\n $missing['app'] = $info->appVersion;\n }\n if ($valid)\n return true;\n return $missing;\n }", "title": "" }, { "docid": "9a0ca64398c475a3665e325320db88bf", "score": "0.6101614", "text": "public function checkIsInstalled()\n {\n return class_exists('Maatwebsite\\Usher\\UsherServiceProvider')\n && class_exists('Mitch\\LaravelDoctrine\\LaravelDoctrineServiceProvider');\n }", "title": "" }, { "docid": "251a7e93b3068df44dc7b01519b77d77", "score": "0.6085573", "text": "function checkDependencies($dependencies = array()){\n $not_found = array();\n foreach($dependencies as $dependent){\n $found = false;\n $query = \"SELECT id FROM $this->table_name WHERE id_name = '\".$dependent['id_name'].\"'\";\n $matches = $this->getList($query);\n if(0 != sizeof($matches)){\n foreach($matches as $match){\n if($this->is_right_version_greater(explode('.', $match->version), explode('.', $dependent['version']))){\n $found = true;\n break;\n }//fi\n }//rof\n }//fi\n if(!$found){\n $not_found[] = $dependent['id_name'];\n }//fi\n }//rof\n return $not_found;\n }", "title": "" }, { "docid": "6282c669c04ab2810bc5789d9c51f3f8", "score": "0.6029596", "text": "public function offsetExists($key)\n {\n return array_key_exists($key, $this->deps);\n }", "title": "" }, { "docid": "a8da6df1b2cf295ae3ea3fe5f827dcec", "score": "0.60123485", "text": "private function checkDependencies()\n {\n $result = true;\n if (!function_exists('curl_init')) {\n $result = false;\n $this->_errors[] = $this->l('Alma requires the CURL PHP extension.', 'alma');\n }\n\n if (!function_exists('json_decode')) {\n $result = false;\n $this->_errors[] = $this->l('Alma requires the JSON PHP extension.', 'alma');\n }\n\n $opensslException = $this->l('Alma requires OpenSSL >= 1.0.1', 'alma');\n if (!defined('OPENSSL_VERSION_TEXT')) {\n $result = false;\n $this->_errors[] = $opensslException;\n }\n\n preg_match('/^(?:Libre|Open)SSL ([\\d.]+)/', OPENSSL_VERSION_TEXT, $matches);\n if (empty($matches[1])) {\n $result = false;\n $this->_errors[] = $opensslException;\n }\n\n if (!version_compare($matches[1], '1.0.1', '>=')) {\n $result = false;\n $this->_errors[] = $opensslException;\n }\n\n return $result;\n }", "title": "" }, { "docid": "23a3e907c2f00265708692e5469b5585", "score": "0.59858716", "text": "final public function isAvailable()\n {\n return file_exists($this->composerBin);\n }", "title": "" }, { "docid": "dc4b3fb4cbf5aac6e2de4e6bdeae6baa", "score": "0.5974486", "text": "protected function checkComposerDependencies() {\n $app_root = $this->kernel->getAppRoot();\n $composer_lock = is_file($app_root . '/composer.lock') ? $app_root . '/composer.lock' : $app_root . '/../composer.lock';\n if (is_file($composer_lock)) {\n $check_result = $this->composerCheck->check($composer_lock);\n $vulnerabilities = $check_result->__toString();\n $format = $check_result->getFormat();\n if ($format == 'json') {\n $this->issues = json_decode($vulnerabilities);\n }\n return;\n }\n $this->issues = [];\n }", "title": "" }, { "docid": "d9c415540246469b9c49ee793684ae55", "score": "0.58219945", "text": "public static function isExist() { }", "title": "" }, { "docid": "8884498b9ffeee7e4c00f78fbcd8a2f4", "score": "0.5782823", "text": "public function isAvailable()\n {\n return null !== $this->npmPath();\n }", "title": "" }, { "docid": "f104082848f66a69af1e0ca60ca271ab", "score": "0.5768598", "text": "protected function checkDeps($dependencyName) {\n return ($this->checkDependency($dependencyName) && ($this->uciGet(\"BessideNG.module.installed\")));\n }", "title": "" }, { "docid": "502d1c451b5398ffc96c4d6203b8666b", "score": "0.5757285", "text": "public function shouldRunDependencies(?string $script = null): bool\n\t{\n\t\t// I don't want to change this behaviour, so we sidestep it by using the getKey function directly instead.\n\t\t$command = $this->getKey(\".scripts.$script\");\n\n\t\tif(!empty($command) && is_string($command) && strpos($command, self::no_deps) !== false) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "280d93210722a250039a80c2350383d1", "score": "0.57416373", "text": "protected function _checkDependencies()\n {\n\n $fail_messages = [];\n $tmp_dir = sys_get_temp_dir();\n $bourbon_tmp_dir = $this->getTempDirectory();\n\n /*\n * Dependency checks\n */\n $php_version_check = version_compare(PHP_VERSION, static::MIN_PHP_VERSION, '<');\n $tmp_dir_check = (!is_readable($tmp_dir) OR !is_dir($tmp_dir) OR !is_writable($tmp_dir));\n $bourbon_tmp_dir_check = (!is_readable($bourbon_tmp_dir) OR !is_dir($bourbon_tmp_dir) OR !is_writable($bourbon_tmp_dir));\n $json_check = !function_exists('\\\\json_encode');\n $curl_check = !extension_loaded('curl');\n $finfo_check = !class_exists('\\\\finfo');\n\n /*\n * Failure messages for above checks\n */\n $messages =\n [\n 'php_version_check' => 'PHP ' . static::MIN_PHP_VERSION . ' or greater',\n 'tmp_dir_check' => 'A writable temporary directory on the server',\n 'bourbon_tmp_dir_check' => 'A writable temporary directory at ' . $bourbon_tmp_dir,\n 'json_check' => 'The PHP json library',\n 'curl_check' => 'The PHP curl library',\n 'finfo_check' => 'The fileinfo (finfo) library'\n ];\n\n /*\n * Determine which messages to display\n */\n foreach ($messages as $name => $message)\n {\n\n if ($$name)\n {\n $fail_messages[] = $message;\n }\n\n }\n\n if (count($fail_messages))\n {\n die('<p>Bourbon requires the following in order to run:</p><ul><li>' . implode('</li><li>', $fail_messages) . '</li></ul>');\n }\n\n }", "title": "" }, { "docid": "c6869f00db47f461bf1527dad56631d0", "score": "0.5738166", "text": "public function dependsOnModule(string $module) : bool;", "title": "" }, { "docid": "71eaf19e3985c74f6e9c7576fd2029e0", "score": "0.5727833", "text": "private function checkRequirements() {\n foreach ($this->requirements as $requirement) {\n if (! is_plugin_active($requirement[1])) {\n $message = sprintf('Missing plugin: %s', $requirement[0]);\n wp_die($message);\n }\n }\n }", "title": "" }, { "docid": "ef9f451e8f7d1626e29f2aca38b1fe42", "score": "0.5726233", "text": "public static function has($name)\n {\n\n return isset(self::$instances[$name]) || isset(self::$dependencies[$name]);\n }", "title": "" }, { "docid": "ee8428a354cc13cdbd7aacc64b9386be", "score": "0.5725847", "text": "public function library_exists($name)\n\t{\n\t\treturn isset($this->registered_libraries[$name]);\n\t}", "title": "" }, { "docid": "4017ed644b70e6464350f1856eead454", "score": "0.57151526", "text": "function test_scripts_exist() {\n\t\tglobal $wp_scripts;\n\n\t\t// Get plugin absolute path.\n\t\t$plugin_dirname = dirname( dirname( __FILE__ ) );\n\n\t\t// get handles that attempted to register.\n\t\t$scripts = BU_Javascript_Library::$scripts;\n\n\t\t// loop through handles.\n\t\tforeach ( $scripts as $handle => $registered ) {\n\t\t\t// get the WP_Dependency.\n\t\t\t$dependency = $wp_scripts->registered[ $handle ];\n\t\t\t// find the dependency relative path to the plugin directory.\n\t\t\t$dependency_path_relative_to_plugin_dirname = substr( $dependency->src, ( strpos( $dependency->src, basename( $plugin_dirname ) ) + strlen( basename( $plugin_dirname ) ) ) );\n\t\t\t// get the dependency absolute path.\n\t\t\t$dependency_path = $plugin_dirname . $dependency_path_relative_to_plugin_dirname;\n\t\t\t// assert the file exists.\n\t\t\t$this->assertFileExists( $dependency_path, \"The file {$handle} does not exist\" );\n\t\t}\n\t}", "title": "" }, { "docid": "c70fe1b3a3c27996d4ab5478a1e92d19", "score": "0.57139415", "text": "private function _doesPdoExist()\n {\n if (!extension_loaded('PDO') || !extension_loaded('pdo_sqlite')) {\n $this->fail('PDO and pdo_sqlite extensions must be installed');\n }\n }", "title": "" }, { "docid": "fbda057b95338da01c6333ce88f70929", "score": "0.56982553", "text": "public function repositoryExists();", "title": "" }, { "docid": "b0b1b55074f5a974b047e041674f8ac3", "score": "0.5687423", "text": "public static function dep_exists ($name, $dir = null)\n {\n if (!$dir)\n $dir = $name;\n\n $active_plugins = apply_filters('active_plugins', get_option( 'active_plugins' ));\n\n if (in_array($dir .'/'. $name .'.php', $active_plugins))\n return true;\n\n return false;\n }", "title": "" }, { "docid": "dcc0995cfddff41db3289408bb2e804c", "score": "0.5683242", "text": "public function checkPluginRequirements()\n\t{\n\t\tif(!$this->areDependenciesMissing())\n\t\t{\n\t\t\tif($this->isOauthProviderConfigured())\n\t\t\t{\n $plugin = craft()->plugins->getPlugin('analytics');\n $settings = $plugin->getSettings();\n\n if($settings['forceConnect'] === true)\n {\n return false;\n }\n else\n {\n if($this->isTokenSet())\n {\n if($this->isGoogleAnalyticsAccountConfigured())\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "bdd7598070a7b40a5162a6e68b8d98c0", "score": "0.5676008", "text": "function gloggi_dependencies() {\n if( ! function_exists('gloggi_dependencies_satisfied') )\n echo '<div class=\"error\"><p>' . __( 'Fehler: Das Gloggi-Theme ben&ouml;tigt das Gloggi-Plugin um zu funktionieren!', 'gloggi' ) . '</p></div>';\n}", "title": "" }, { "docid": "b3456dd9bedb0654eee2f9166c60c4d9", "score": "0.5675971", "text": "function plugin_services_check_prerequisites() {\n\n $version = rtrim(GLPI_VERSION, '-dev');\n if (version_compare($version, '9.3', 'lt')) {\n echo \"This plugin requires GLPI 9.3\";\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "dfc676824bb6c86cd0ecf5048afa0389", "score": "0.56757903", "text": "public function exist_package_file()\n {\n if (file_exists($this->package_path)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9e27ee160a42f5ad4206e3cb8d3e84f5", "score": "0.56710404", "text": "private function check_dependencies() {\n\t\t// do nothing if class bbPress exists\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\tif ( !is_plugin_active( 'siteorigin-panels/siteorigin-panels.php' ) ) {\n\t\t\ttrigger_error( 'This plugin requires <a href=\"https://wordpress.org/plugins/siteorigin-panels/\">Page Builder by SiteOrigin</a>. Please install and activate Page Builder by SiteOrigin before activating this plugin.', E_USER_ERROR );\n\t\t}\n\t}", "title": "" }, { "docid": "2a0e00104d7a14d140e76b249273739d", "score": "0.56652963", "text": "public function checkIfInstalled()\n {\n return file_exists(array_first(config('scaffy.scaffy_install'))) === true;\n }", "title": "" }, { "docid": "1812a5e5b180a51ff55188961c9804cb", "score": "0.5649643", "text": "private function checkForDependencyLoop($dependencyArray){\n\t\tforeach($dependencyArray[\"slaves\"] as $slaveKey=>$slavePlugin){\n\t\t\t$exists = $this->checkIfPluginExistsInDependencyChain($dependencyArray, $slaveKey);\n\t\t\tif($exists === true){\n\t\t\t\tthrow new RuntimeException(\"Dependency loop detected! - \" . print_r($slavePlugin, true));\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d32858b09bd67dd86de1dce32e10de48", "score": "0.5637635", "text": "static function isLoaded($composer) {\n if (is_string($composer)) {\n if (file_exists($composer)) {\n $composer = json_decode(file_get_contents($composer));\n if (!$composer)\n throw new \\Exception(\"bad composer.json file\");\n }\n else {\n throw new \\Exception(\"no composer.json file\");\n }\n }\n $packages = self::getInstalledPackages();\n return (isset($packages[$composer->name]));\n }", "title": "" }, { "docid": "859efaf4347b833f42f00ac60ba501ac", "score": "0.56283295", "text": "static public function isMageDependant();", "title": "" }, { "docid": "ec59e64dffabce50bfcd728bc9ca6919", "score": "0.562262", "text": "function checkDependAreDeployedForPackage($packagecodename=\"example\")\n\t{\n\t\t$reqdepend=$this->db->query(\"select * from `package` where deployed='0' and nomcodepackage in (select nomcodedepend from `package_depends_on` where nomcodepackage='\".$packagecodename.\"')\");\n\t\tif($resdepend=$this->db->fetch_array($reqdepend))\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "788d68a563df5400494b8b558e2e8927", "score": "0.561495", "text": "public function has($id)\n {\n return $this->dependencyInjector->has($id);\n }", "title": "" }, { "docid": "24c2ff83538d8def36d231a2e853a348", "score": "0.5602215", "text": "protected function _checkDependencies() {\n $this->results['dependencies']['msg'] = '<p>'.$this->install->lexicon['test_dependencies'].' ';\n\n /* check for zlib */\n if (!extension_loaded('zlib')) {\n $s = '<span class=\"notok\">'.$this->install->lexicon['failed'].'</span>';\n $s .= '<div class=\"notes\"><p>'.$this->install->lexicon['test_dependencies_fail_zlib'].'</p></div>';\n $s .= '</p>';\n $this->results['dependencies']['msg'] = $s;\n $this->results['dependencies']['class'] = 'testFailed';\n } else {\n $this->results['dependencies']['msg'] .= '<span class=\"ok\">'.$this->install->lexicon['ok'].'</span></p>';\n $this->results['dependencies']['class'] = 'testPassed';\n }\n\n /* check for SimpleXML */\n $this->results['simplexml']['msg'] = '<p>'.$this->install->lexicon['test_simplexml'].' ';\n if (!function_exists('simplexml_load_string')) {\n $this->results['simplexml']['msg'] = '<span class=\"ok\">'.$this->install->lexicon['ok'].'</span></p>';\n $this->results['simplexml']['msg'] .= '<div class=\"notes\"><h3>'.$this->install->lexicon['test_simplexml_nf'].'</h3><p>'.$this->install->lexicon['test_simplexml_nf_msg'].'</p></div>';\n $this->results['simplexml']['class'] = 'testWarn';\n } else {\n $this->results['simplexml']['msg'] .= '<span class=\"ok\">'.$this->install->lexicon['ok'].'</span></p>';\n $this->results['simplexml']['class'] = 'testPassed';\n }\n }", "title": "" }, { "docid": "a07f5f5272d1878cedcee4286c882d96", "score": "0.55753756", "text": "public function isAvailable(): bool\n {\n return class_exists(Constraint::class);\n }", "title": "" }, { "docid": "8b2d4d9bc94adb62753f37fc2ecd144e", "score": "0.55715615", "text": "public function test_deleteLibraryDependencies_non_existent_library() {\n global $DB;\n\n $this->resetAfterTest();\n\n $generator = $this->getDataGenerator()->get_plugin_generator('core_h5p');\n\n // Generate h5p related data.\n $data = $generator->generate_h5p_data();\n // The data of the library 'Library1'.\n $library1 = $data->lib1->data;\n\n // Get the dependencies of 'Library1'.\n $dependencies = $DB->get_records('h5p_library_dependencies', ['libraryid' => $library1->id]);\n // The 'Library1' should have 3 dependencies ('Library2', 'Library3', 'Library4').\n $this->assertCount(3, $dependencies);\n\n // Delete the dependencies of a non-existent library.\n $this->framework->deleteLibraryDependencies(0);\n\n $dependencies = $DB->get_records('h5p_library_dependencies', ['libraryid' => $library1->id]);\n // The 'Library1' should have 3 dependencies.\n $this->assertCount(3, $dependencies);\n }", "title": "" }, { "docid": "dd5ea2988b1830bbf33eff2ce47703c9", "score": "0.55610144", "text": "public static function checkSoftware()\n {\n return function_exists('curl_version');\n }", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.5541969", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.5541969", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.5541969", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.5541969", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.5541969", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.5541969", "text": "public function exists(): bool;", "title": "" }, { "docid": "494ad13eaea7134ddd765e28a7885569", "score": "0.5535311", "text": "function uncode_check_for_dependency( $plugin ) {\n\treturn in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || uncode_check_for_network_dependency( $plugin );\n}", "title": "" }, { "docid": "cfd52c75b3a6608cb72eb8b278f2adf9", "score": "0.5526971", "text": "public function hasLibraries() {\n return !empty($this->libraries());\n }", "title": "" }, { "docid": "5cb7b9955ca8411c0f17bbb9a4def9d4", "score": "0.5524878", "text": "public function checkExists()\n\t{\n\t\treturn JFile::exists(JPATH_SITE . '/components/com_community/libraries/core.php');\n\t}", "title": "" }, { "docid": "b23ac4eb432c2194e2f84f9e9a3e6fc2", "score": "0.55192363", "text": "protected function HasPackage() {\n\treturn !is_null($this->GetPackageID());\n }", "title": "" }, { "docid": "e8de58174a6182fa0ffdba7857d30714", "score": "0.54759496", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM account_taxes WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested account (\". $this->id .\") does not exist - possibly the account has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "375763e994e6d5802a86716f773b0406", "score": "0.54732853", "text": "function hasreq($require) { return isset($require[\"php\"]); }", "title": "" }, { "docid": "4050899eecb003dfc5fdf29135a05a79", "score": "0.5470151", "text": "function module_exists( $key ) {\n\t\treturn isset( $this->modules[ $key ] );\n\t}", "title": "" }, { "docid": "15799c2f037c642d3895627a889d4913", "score": "0.54622954", "text": "function not_already_installed()\n{\n\tglobal $found_secret_file, $pdo_dsn;\n\tif ($found_secret_file && isset ($pdo_dsn))\n\t{\n\t\techo 'Your configuration file exists and seems to hold necessary data already.<br>';\n\t\treturn FALSE;\n\t}\n\telse\n\t{\n\t\techo 'There seem to be no existing installation here, I am going to setup one now.<br>';\n\t\treturn TRUE;\n\t}\n}", "title": "" }, { "docid": "ca0e2aa2cbf091abc837ca86d88ff62f", "score": "0.54601276", "text": "private function isAlreadyInstalled() : bool\n {\n $public = new SplFileInfo(self::PROJECT_ROOT . '/public');\n $src = new SplFileInfo(self::PROJECT_ROOT . '/src');\n\n return $public->isDir() && $src->isDir();\n }", "title": "" }, { "docid": "ab870e2ce914107341fb9e984aa1810c", "score": "0.5458394", "text": "public function hasPackage(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "abffe18faa08112184fbe13b095cb627", "score": "0.5432343", "text": "function init() {\n\t\t$pass = true;\n\t\t// only do full check if we need dependancies\n\t\tif ($this->resolved) {\n\t\t\treturn $pass;\n\t\t}\n\t\t$this->getNeeded();\n\t\tif (!empty($this->needed)) {\n\t\t\tfor ($x=0; $x < IL_EXTENSIONS_MAX_COUNT; $x++) {\n\t\t\t\t$remove = array();\n\t\t\t\t$pass = true; // default to pass until a problem is encountered\n\n\t\t\t\t// iterate through all dependancies, checking that they are provided in $data and version is acceptable\n\t\t\t\tforeach ($this->needed as $package => $version) {\n\t\t\t\t\tif (!$this->compare($package, $version)) {\n\t\t\t\t\t\t$this->setError('DEP_VERSION_NOT_MET', $package);\n\t\t\t\t\t\t$remove[] = $package;\n\t\t\t\t\t\t$pass = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no problem found, stop!\n\t\t\t\tif ($pass) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// else, remove packages that depend on the missing dependancies\n\t\t\t\t$packages = $this->data;\n\t\t\t\tforeach ($packages as $name => $pkg) {\n\t\t\t\t\tif (isset($pkg['depends'])) {\n\t\t\t\t\t\t$deps = array_keys($pkg['depends']);\n\t\t\t\t\t\t$inter = array_intersect($deps, $remove);\n\t\t\t\t\t\tif (!empty($inter)) {\n\t\t\t\t\t\t\t$this->setError('DEP_PKG_MISSING_DEP', $name);\n\t\t\t\t\t\t\t$this->setActive($name, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->reset($packages);\n\t\t\t\t$this->getNeeded();\n\t\t\t}\n\t\t}\n\n\t\t// finally, check that we have necessary meta-packages\n\t\tif ($pass) {\n\t\t\t$pass = $this->addCoreMeta();\n\t\t}\n\t\telse {\n\t\t\t$this->setError('DEP_CHECK_EXCEED_COUNT');\n\t\t}\n\n\t\t// if everything passes, set the resolved field for everything to true to bypass this later\n\t\tif ($pass) {\n\t\t\t$this->setResolved(true);\n\t\t}\n\n\t\treturn $pass;\n\t}", "title": "" }, { "docid": "f37576605e2b4958481faabbbf42b41d", "score": "0.54141784", "text": "function isSupplyOrderPaymentReferenceExist($paymentref)\n\t{\n\t\ttry {\n\t\t\t$query = \"SELECT * FROM tblsupplyorderpayment WHERE paymentref = '\".$paymentref.\"'\";\n\t\t\t//return $query;\n\t\t\tglobal $dbh;\n\t\t $rs = $dbh->pdoQuery($query)->results();\n\t\t $count = count($rs);\n\n\t\t if($count > 0){\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\treturn false;\n\t\t\t//return $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "337d1a63c36d1c3ec6f462c3a504c9f9", "score": "0.5396852", "text": "public function testExists()\n {\n $this->assertTrue($this->repository->exists('FIRST'));\n $this->assertFalse($this->repository->exists('NOT FOUND'));\n }", "title": "" }, { "docid": "5ce78fbc079b174845db26ebd59c89d2", "score": "0.5381631", "text": "public function repositoryExists()\n {\n return $this->repository->repositoryExists();\n }", "title": "" }, { "docid": "790a4a3402baef526c70fa02da54d5b8", "score": "0.53784025", "text": "function test_stylesheets_exist() {\n\t\tglobal $wp_styles;\n\n\t\t// Get plugin absolute path.\n\t\t$plugin_dirname = dirname( dirname( __FILE__ ) );\n\n\t\t// get handles that attempted to register.\n\t\t$styles = BU_Javascript_Library::$styles;\n\n\t\t// loop through handles.\n\t\tforeach ( $styles as $handle => $registered ) {\n\t\t\t// get the WP_Dependency.\n\t\t\t$dependency = $wp_styles->registered[ $handle ];\n\t\t\t// find the dependency relative path to the plugin directory.\n\t\t\t$dependency_path_relative_to_plugin_dirname = substr( $dependency->src, ( strpos( $dependency->src, basename( $plugin_dirname ) ) + strlen( basename( $plugin_dirname ) ) ) );\n\t\t\t// get the dependency absolute path.\n\t\t\t$dependency_path = $plugin_dirname . $dependency_path_relative_to_plugin_dirname;\n\t\t\t// assert the file exists.\n\t\t\t$this->assertFileExists( $dependency_path, \"The file {$handle} does not exist\" );\n\t\t}\n\t}", "title": "" }, { "docid": "1ce3a02f06ecb105ad9284953d612efe", "score": "0.53772986", "text": "function isPresent();", "title": "" }, { "docid": "1353ad7deb9c906d525960b43ab29893", "score": "0.536091", "text": "public function exists() : bool {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "ba9179e3bfd2c9ee5f8e858ab23bd3f1", "score": "0.53539664", "text": "public function has(): bool;", "title": "" }, { "docid": "ba9179e3bfd2c9ee5f8e858ab23bd3f1", "score": "0.53539664", "text": "public function has(): bool;", "title": "" }, { "docid": "90a2ea0202c6f056c18e4bfbbb32849d", "score": "0.5350619", "text": "abstract public function isExists();", "title": "" }, { "docid": "95b564de05a16cd8f2e132778c173dba", "score": "0.53502035", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM account_ap WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested invoice (\". $this->id .\") does not exist - possibly the invoice has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "2ac664358f85022b9247d2077505f19a", "score": "0.5350102", "text": "protected function checkRequirements() {\n }", "title": "" }, { "docid": "4a34135ca57c6aa5949f0bac78cdac9d", "score": "0.5343119", "text": "public function isExists();", "title": "" }, { "docid": "845db0422df282cef259e460c18ec266", "score": "0.5341133", "text": "function checkYii()\n {\n $path = FileUtil::normalizePath(UsniAdaptor::app()->getModule('install')->basePath . DIRECTORY_SEPARATOR . 'requirements.php');\n return $this->check($path);\n }", "title": "" }, { "docid": "a2b24ea4b2e411602f122a0396c8fca1", "score": "0.53358585", "text": "public function hasInjector()\n {\n return !empty($this->extensionType);\n }", "title": "" }, { "docid": "d01ea3804d49c132e3a950d58b4615dd", "score": "0.5334141", "text": "public function hasModule($name);", "title": "" }, { "docid": "50c22e6298b98e721f06aa33b55dfd78", "score": "0.53325325", "text": "public function upgradeCheck()\n {\n $module = $this->getNormalizedModuleName();\n if (!isset($GLOBALS['beanList'][$module])) {\n // don't upgrade non-deployed search defs\n return false;\n }\n $target = $this->getNewFileName($this->viewtype);\n if(file_exists($target)) {\n // if we already have the target, skip the upgrade\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "7355726e4d975746c9fdd80fd34d3877", "score": "0.5331631", "text": "public function repositoryExists()\n {\n $schema = $this->getEntities()->getConnection()->getSchemaManager();\n $tables = array_filter($schema->listTables(), function($value) {\n return $value->getName() === 'migrations';\n });\n\n return !empty($tables);\n }", "title": "" }, { "docid": "4bdeb08ffe7eef0c13b1c5fa11221f5a", "score": "0.53291625", "text": "protected function hasNpm()\n\t{\n\t\t$npm = shell_exec('npm -v');\n\n\t\treturn starts_with($npm, '1.');\n\t}", "title": "" }, { "docid": "68467bbcfb019b969076b751bbfbf39c", "score": "0.53235364", "text": "protected function _exists(){ }", "title": "" }, { "docid": "68467bbcfb019b969076b751bbfbf39c", "score": "0.53235364", "text": "protected function _exists(){ }", "title": "" }, { "docid": "75ef41bbcde7545a085667d7df7b00bb", "score": "0.53214943", "text": "function foodpress_exists(){\n\t\t$_active_plugins = get_option( 'active_plugins' );\n\n\t\tif(!empty($_active_plugins)){\n\t\t\t$_fpInstalled = false;\n\t\t\tforeach($_active_plugins as $plugin){\n\t\t\t\t// check if foodpress is in activated plugins list\n\t\t\t\tif(strpos( $plugin, 'foodpress.php') !== false){\n\t\t\t\t\t$_fpInstalled= true;\n\t\t\t\t\t$fpSlug = explode('/', $plugin);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!empty($fpSlug) && $_fpInstalled){\n\t\t\t\t$url = FP_PATH. '/classes/class-fp-addons.php';\n\n\t\t\t\treturn (file_exists($url))? $url: false;\n\t\t\t}else{ \treturn false;\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "16c2cfde4cd7fc1aebffeb71559a2bb9", "score": "0.532099", "text": "function checkFileExists($url) {\n return true;\n }", "title": "" }, { "docid": "141516c8f8398e7b281fc987a17db1ba", "score": "0.5314052", "text": "public function isDependantPackage(PackageInterface $package, $includeDevDependencies = null) {\n if (null === $includeDevDependencies) {\n $includeDevDependencies = false;\n }\n\n foreach ($package->getRequires() as $link) {\n if ('peertopark/composer-grunt-bridge' === $link->getTarget()) {\n return true;\n }\n }\n\n if ($includeDevDependencies) {\n foreach ($package->getDevRequires() as $link) {\n if ('peertopark/composer-grunt-bridge' === $link->getTarget()) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "791effa69f8170d68b48501b8931dd14", "score": "0.53118914", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM account_quotes WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested quote (\". $this->id .\") does not exist - possibly the quote has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "aa6594ec271c19f1155e5c7468c42c7c", "score": "0.5308434", "text": "public function exists() {\n\t\treturn file_exists($this->src);\n\t}", "title": "" }, { "docid": "5e0b40f3a15427001e0ff11af1dd3d93", "score": "0.53068644", "text": "function checkInstallation()\r\n\t{\r\n\r\n\t\t// As explained below this checks whether the installation of this\r\n\t\t// feature has already taken place. If that is not the case, we call install below\r\n\t\t// Also check out the below example for a db check for the table that is created\r\n\t\t// within the install function.\r\n\r\n\t\t$database = &JFactory::getDBO();\r\n\r\n\t\tglobal $mainframe;\r\n\r\n\t\t$tables\t= array();\r\n\t\t$tables\t= $database->getTableList();\r\n\r\n\t\treturn in_array($mainframe->getCfg( 'dbprefix' ).\"_acctexp_mi_sampletable\", $tables);\r\n\t}", "title": "" }, { "docid": "8ed6e202a87656db2ac4fe465583e559", "score": "0.53055155", "text": "public function hasInstallProgress() {\n $log = $this->config->get('oxygen.mod-marketplace.install.log');\n $progress = $this->config->get('oxygen.mod-marketplace.install.progress');\n if(!$this->files->exists($log) || !$this->files->exists($progress)) {\n return false;\n } else {\n return true;\n }\n }", "title": "" } ]
83cc59d7350cadaa753ee264326e3146
print "go CHECKs !!!";
[ { "docid": "f3f2baec297ae3bb62c43e35bd14c2e6", "score": "0.0", "text": "private function checkS() {\n $this->sesId = isset($_COOKIE[\"suid\"]) ? $_COOKIE[\"suid\"] : '';\n $this->userId = isset($_POST[\"logn\"]) ? $_POST[\"logn\"] : '';\n $PASS = isset($_POST[\"pass\"]) ? $_POST[\"pass\"] : '';\n $LOGOUT = isset($_POST[\"logout\"]) ? $_POST[\"logout\"] : '';\n global $pdo;\n//print \"name=\".$this->userId.\"; pass=\".$PASS.\"; ses_id=\".$this->sesId;\n if($LOGOUT == 'go' and !empty($this->sesId)) {\n $stmt = $pdo->prepare(\"UPDATE users set sid='' WHERE sid=?\");\n $stmt->execute([$this->sesId]);\n setcookie(\"suid\", '');\n $this->sesId = '';\n return false;\n } elseif ( !empty($this->sesId) ) {\n $stmt = $pdo->prepare(\"SELECT * FROM users WHERE sid=?\");\n $stmt->execute([$this->sesId]);\n $userobj = $stmt -> fetch(PDO::FETCH_ASSOC);\n if($userobj) {\n $this->userId = $userobj['login'];\n return true;\n } else {\n $this->sesId = '';\n $this->userLog = '';\n setcookie(\"suid\", '');\n return false;\n }\n } elseif ( !empty($this->userId) and !empty($PASS) ) {\n//print \"go CHECK name+pass!!!\";\n $stmt = $pdo->prepare(\"select * FROM users WHERE login=? and pass=md5(?)\");\n $stmt->execute([$this->userId, $PASS]);\n $userobj = $stmt -> fetch(PDO::FETCH_ASSOC);\n if($userobj)\n {\n $this->sesId = RandomString(10);\n $stmt = $pdo->prepare(\"UPDATE users set sid=? WHERE login=? and id=?\");\n $stmt->execute([$this->sesId, $this->userId, $userobj['id'] ]);\n setcookie(\"suid\", $this->sesId);\n return true;\n }\n }\n }", "title": "" } ]
[ { "docid": "9730249fd5c96f6fdb4f5a9ca96fd2d8", "score": "0.69938725", "text": "final function what_is_good(){\n\t\t\t\t\n\t\t\t\techo \"</br>running is good</br>\";\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "e63a5104b233407392099974d351a3d1", "score": "0.6823131", "text": "function check() {\r\n }", "title": "" }, { "docid": "3210bce3e1607b1e5ff42eeda155ae26", "score": "0.6720529", "text": "function check()\n {\n \treturn true;\n }", "title": "" }, { "docid": "ebf7b0501f5c0098e2d160159da4a693", "score": "0.64921486", "text": "function check()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6a86dc8deadcd7435ff09401e66049ff", "score": "0.6468361", "text": "function check()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "f97ebe6a5eeb7f5d435615ca8c7803fb", "score": "0.64296496", "text": "public function testChecking()\n {\n echo \"hi\";exit;\n }", "title": "" }, { "docid": "dfb7a637f9d4895cb8b58800ed17f187", "score": "0.64215887", "text": "function check() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ec80bfc9ccad2186070bdccf76df45f2", "score": "0.6383493", "text": "function println($msg) {\n\techo \"-> \".$msg.\"<br>\"; \n}", "title": "" }, { "docid": "e5b90e5b367dc6a72548f5d0838ddfbe", "score": "0.6269157", "text": "function pass() {\n\tensure(true);\n}", "title": "" }, { "docid": "da6d213292134e204c2dbeec4b75745b", "score": "0.61896926", "text": "public static function check(){ }", "title": "" }, { "docid": "c6b717cdf1a8dc5b8bb08916c0be888b", "score": "0.6163474", "text": "public function check(): void;", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.6072813", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.6072813", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.6072813", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.6072813", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.6072813", "text": "public function check();", "title": "" }, { "docid": "f7ac58055b944af9f0079009e5460a41", "score": "0.5974539", "text": "function verify_problem(){\r\n\t\t//no other code needed here\r\n\t}", "title": "" }, { "docid": "4a2f23d692ffd5ace86a007334ca6651", "score": "0.5932088", "text": "public function check()\n {\n }", "title": "" }, { "docid": "4a2f23d692ffd5ace86a007334ca6651", "score": "0.5932088", "text": "public function check()\n {\n }", "title": "" }, { "docid": "7cc5cd1fbac500288a31b783cd2db653", "score": "0.58965975", "text": "public function Check()\r\n\t\t{\r\n\t\t}", "title": "" }, { "docid": "7e30bc74b50091fafaeea340762ec1d0", "score": "0.5891659", "text": "public function check()\n {\n return 1;\n }", "title": "" }, { "docid": "f6d63a5cc397bc89b40e13a7fd0781c9", "score": "0.5880486", "text": "public function test() {\n $this->testRightInputs();\n // Try hiting with the wrong inputs\n $this->testFalseInputs();\n TestGeneral::printLines($this->result);\n }", "title": "" }, { "docid": "cea8ac9caa5f1e30454f4bbd83d8ddb7", "score": "0.586882", "text": "function quickCheck($tidbit){\n\tif(!$tidbit){\n\t\treturn ' :ERROR';\n\t}else {\n\t\treturn $tidbit;\n\t}\n}", "title": "" }, { "docid": "ad0e9c44e8cd1c913d7788eb36705348", "score": "0.5844096", "text": "function devCheck() {\n\t}", "title": "" }, { "docid": "59c6cbd716221c061912f285590b3e40", "score": "0.5833898", "text": "public function test()\n\t{\n\t\techo \"We are undergoing maintenance. We apologise for the inconvenience.\";\t\t\t\t\t\t\t\n\t\tdie();\n\t}", "title": "" }, { "docid": "83454e2668385381f571492441c0ce56", "score": "0.5791038", "text": "private function check(){\n return true;\n }", "title": "" }, { "docid": "7c90a9e036bc0f3deab5e662e212e8c3", "score": "0.5747195", "text": "public function check(): int\n {\n $this->logger->info(<<<\"EOF\"\n _ _\n ___| | _(_)_ __ ___\n / _ \\ |/ / | '_ \\ / _ \\\n | __/ <| | | | | (_) |\n \\___|_|\\_\\_|_| |_|\\___/\n ____ _ _ ____ ____ _ _\n | _ \\| | | | _ \\ / ___| |__ ___ ___| | _____ _ __\n | |_) | |_| | |_) | | | | '_ \\ / _ \\/ __| |/ / _ \\ '__|\n | __/| _ | __/ | |___| | | | __/ (__| < __/ |\n |_| |_| |_|_| \\____|_| |_|\\___|\\___|_|\\_\\___|_|\n\nEOF\n );\n\n $this->logger->info(sprintf('> PHP version: %s', PHP_VERSION));\n\n $this->checkExtensions();\n $this->checkIniConfig();\n\n $this->logger->info('');\n\n if ($this->exitStatus === 0) {\n $this->logger->success('Good job, all checks are ok!');\n } else {\n $this->logger->failure('Please fix issues ;).');\n }\n\n return $this->exitStatus;\n }", "title": "" }, { "docid": "0699836ff29bdfae4a07e395f5047a9f", "score": "0.5741256", "text": "function main()\t{\r\n\t}", "title": "" }, { "docid": "2b013f545e317634aca16aaede43b93f", "score": "0.57402784", "text": "function check()\n {\n /* Call common method to give check the hook */\n $message= \"\";\n\n return ($message);\n }", "title": "" }, { "docid": "06618d6a9e8dffa36b9098f158a1b336", "score": "0.57348835", "text": "public function check()\r\n {\r\n echo \"номер счета\";\r\n }", "title": "" }, { "docid": "8307af7a49d3e90b2a21471aaa1e3864", "score": "0.5727128", "text": "function printTestResult($passCond) {\r\n\r\n echo $passCond ? \"pass\" : \"fail\";\r\n echo \"<br>\\n\";\r\n }", "title": "" }, { "docid": "ca32d05389cf5aff32baea4d4206355c", "score": "0.5714008", "text": "function prdebug ($text) {\n //echo \"<p>\" . $text .'</p>';\n echo \"\";\n}", "title": "" }, { "docid": "7e9a6e88353e74179c9932eba2574034", "score": "0.5711558", "text": "function main() {\n\t}", "title": "" }, { "docid": "c3a0509fb972ad708f6acafa5dd1cfea", "score": "0.5706932", "text": "function makesFish(){\n\t\t\t\tprint 'makes better fish';\n\t\t\t}", "title": "" }, { "docid": "41e72bb96b198b81799c3d2a8506afcd", "score": "0.563525", "text": "static function allGood() {\n\t\tNotify::message('All Tests Passed');\n\t}", "title": "" }, { "docid": "bcb606d946bee762933620bbf4a08be0", "score": "0.56339824", "text": "function fail($errorMsg) {\n print $errorMsg;\n exit;\n}", "title": "" }, { "docid": "ac8fc9fe8e449e9d681ff95017a43ae1", "score": "0.55988497", "text": "function test()\n {\n $p1= \"Foo\";\n $p2= \"Bar\";\n if($p1 === 'Baz')\n { die(\"Terminate Script\"); }\n return $p1.\" \".$p2;\n }", "title": "" }, { "docid": "cb7a4c98055e1fcf506af0915bce4287", "score": "0.55876327", "text": "public function checkSung()\n {\n }", "title": "" }, { "docid": "f0135877e66ca7e96ecfccce5a8a900a", "score": "0.55749965", "text": "public function check(): string;", "title": "" }, { "docid": "7713e4bca6e28e27d42c3d3d37a5c6b6", "score": "0.556999", "text": "function testOutput()\n\t{\n\t}", "title": "" }, { "docid": "e299a39897f6ba7b1b6a2383c8435811", "score": "0.55560374", "text": "function my_assert_handler($file, $line, $code, $desc = null)\n{\n //echo \"Assertion failed at $file:$line: $code\";\n $string = \"Assertion failed at $file:$line: $code\";\n $log = fopen('../../logs/spelling_assertions.php.log', 'w');\n fwrite($log, $string.\"\\n\");\n if ($desc) {\n //echo \": $desc\";\n fwrite($log, $desc.\"\\n\");\n }\n echo \"\\n\";\n}", "title": "" }, { "docid": "131a6ea321e399f26e73e5988e9e3dda", "score": "0.5550729", "text": "abstract protected function doCheck();", "title": "" }, { "docid": "f45e8f0dd85587815284a31ca9fbb9bf", "score": "0.5533284", "text": "function my_assert_handler($file, $line, $code, $desc = null)\r\n{\r\n echo \"Assertion failed at $file:$line: $code\";\r\n if ($desc) {\r\n echo \": $desc\";\r\n }\r\n echo \"\\n\";\r\n}", "title": "" }, { "docid": "78fc5729be4bf89b5ca8bf6d8f42f72f", "score": "0.55239975", "text": "function invalid($string) {\n echo $string;\n exit;\n}", "title": "" }, { "docid": "42332525bacd379b7bc13e41fc67293b", "score": "0.54979306", "text": "function verify()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "42332525bacd379b7bc13e41fc67293b", "score": "0.54979306", "text": "function verify()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "f9bbf52e60f362374c983231e194d86b", "score": "0.5497031", "text": "function CheckScript() \n{\n\techo '<correct>Script avalible</correct>'.\"<br>\\n\";\n\t\n\t$sRequestUrl = ''; \n\t$sOutContent = '';\n\t\n\t$sRequestUrl = __STATISTIC_URL__.'?check-work=1';\n\t\n\tGetContents($sRequestUrl, $sOutContent);\n\t\n\t\n\tif($sOutContent === false || strlen($sOutContent) == 0)\n\t{\n\t\techo '<server_answer>NO_ANSWER</server_answer>';\n\t} else\n\t{\n\t\techo $sOutContent.\"\\n\";\n\t}\n\texit();\n}", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.54933774", "text": "abstract public function check();", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.54933774", "text": "abstract public function check();", "title": "" }, { "docid": "06f7b8702602597c8e40bc47126fcc6e", "score": "0.5473984", "text": "function ping() {\n if (verifySignature()) {\n echo \"{success: 1, message: 'Success: your settings are correct.'}\";\n } else {\n echo \"{success: 0, message: 'Error: we could not verify the signature. Check your settings.'}\";\n }\n \n}", "title": "" }, { "docid": "16392fd7c5bfe741b82c21b21da3d62d", "score": "0.5464492", "text": "protected function check() \n {\n \n }", "title": "" }, { "docid": "4770b130739636d5831a1af04df28d41", "score": "0.5430639", "text": "function set_msg($msg){\n\tglobal $warnings;\n\tglobal $debug;\n\n\t$warnings .= $msg.\"<br>\";\n\tif( $debug ) {\n\t\tset_error(__FILE__,__LINE__, $msg );\n\t}\n\techo \"haswarning = 1;\";\n}", "title": "" }, { "docid": "5251260f3ea1b6fcc33563e05df2bb2e", "score": "0.5429622", "text": "function dcb_callback($script, $line, $message) {\n echo \"<h1>Condition failed!</h1><br />\n Script: <strong>$script</strong><br />\n Line: <strong>$line</strong><br />\n Condition: <br /><pre>$message</pre>\";\n}", "title": "" }, { "docid": "64b904213d6418390591117fdcad31d2", "score": "0.54287773", "text": "abstract function check();", "title": "" }, { "docid": "8a72ee20076f7182e4e4becf8fc87d69", "score": "0.54246646", "text": "function bugger($msg) {\n\t// Used for testing.\n\t// Comment out to stop debug messages.\n\techo($msg);\n}", "title": "" }, { "docid": "a4d1a79479da2481972ee58674706d20", "score": "0.5406291", "text": "function printErrorImmediate($message)\n{\n\techo $message . \"\\n\";\n\texit(1);\n}", "title": "" }, { "docid": "8bff060b1d0f5032b1ce0a77617b68e4", "score": "0.53887707", "text": "public function excute();", "title": "" }, { "docid": "a165f96dc36792108aa997b309806316", "score": "0.53848875", "text": "public function performOtherChecks()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d389f37ac4a86b58a1533908afe38e61", "score": "0.5371976", "text": "abstract protected function perform_check();", "title": "" }, { "docid": "16e8c76262c3866d9b6233e2873a2f9b", "score": "0.5371717", "text": "function assert_callback( $script, $line, $message ) {\n echo \"Assert Error : {$script} : line {$line} : {$message}\\n\";\n exit;\n}", "title": "" }, { "docid": "7af6077a6b9f7f2f208dc5f801bd9194", "score": "0.53542763", "text": "function my_assert_handler($file, $line, $code, $desc = null) {\r\n\t\t echo \"PASS: Assertion stopped at line $line. As expected, error is\";\r\n\t\t if ($desc) {\r\n\t\t echo \": $desc\";\r\n\t\t \t}\r\n\t \techo \"\\n\";\r\n\t\t}", "title": "" }, { "docid": "4a4b8a0d73afce982a3c8877a8e7e426", "score": "0.53495216", "text": "function compileError($text,$level=1){\r\n\tswitch($level){\r\n\t\tcase\"0\":\r\n\t\t\tprint '<font color=\"red\">&nbsp;&nbsp;Error: </font>'.$text.'<br>';\r\n\t\tbreak;\r\n\t\tcase\"1\":\r\n\t\t\tprint '<font color=\"#996600\">&nbsp;&nbsp;Warning: </font>'.$text.'<br>';\r\n\t\tbreak;\r\n\t\tcase\"2\":\r\n\t\t\tprint $text.'<br>';\r\n\t\tbreak;\r\n\t}\r\n\tif($GLOBALS['allIsFine']>$level)$GLOBALS['allIsFine'] = $level;\r\n}", "title": "" }, { "docid": "709f11bab87781f9b808da418c6074eb", "score": "0.5346737", "text": "function my_assert_handler($file, $line, $code, $desc = null)\n{\n echo \"Assertion failed at $file:$line: $code\";\n if ($desc) {\n echo \": $desc\";\n }\n echo \"\\n\"\n}", "title": "" }, { "docid": "06d39d521e104b1439754ecff05ff0a8", "score": "0.53451616", "text": "function verbose($message) {\n if ($GLOBALS['verbose'])\n echo $message.\"\\n\";\n}", "title": "" }, { "docid": "866b8a4ff6fbaf87de0ecafac723f09e", "score": "0.5343619", "text": "function sae_debug($str = NULL)\n{\n\tif(!$str)return false;\n\telse\n\t{\n\t\techo $str.'<br>';\n\t}\n}", "title": "" }, { "docid": "7425f6992e85cb7426d344d736a81968", "score": "0.5342915", "text": "function xdebug_break(): bool {}", "title": "" }, { "docid": "658eb73e1c41e779158be65b0783a264", "score": "0.5326068", "text": "function error($msg) {\n echo $msg.\"\\n\";\n exit(1);\n}", "title": "" }, { "docid": "0d1265889b4e64297940f4f0ef2754c3", "score": "0.5325819", "text": "function bailout($message)\n{\n die($message.\"\\n\");\n}", "title": "" }, { "docid": "5953ecf70482e5f5a8cdeb1593cce6ec", "score": "0.53249294", "text": "public function onlyCheck();", "title": "" }, { "docid": "80d9172fada23a6d8872dbe4244a2ca6", "score": "0.53247976", "text": "function verify()\n {\n \n }", "title": "" }, { "docid": "064250eee0e7e6becec305ee10e4f018", "score": "0.532329", "text": "public function run(){\r\n\t\techo @MY::$FATAL;\r\n\t}", "title": "" }, { "docid": "6a43685a2b0d4ab079eb024d39119313", "score": "0.529999", "text": "public function check($name)\n {\n return 'Hello '.$name;\n }", "title": "" }, { "docid": "6029b4d648d3f0645064a53e484eed89", "score": "0.5299186", "text": "public function check_competence() {\n\n \n\t\t}", "title": "" }, { "docid": "5e2dce6e00744342efe0c5fcb9bde8d2", "score": "0.52978057", "text": "function teste(){\n\treturn TRUE;\n}", "title": "" }, { "docid": "19b1b734b59da6b62a31aae1f9557c46", "score": "0.5295305", "text": "function debugger($msg,$val)\n{\n\t#print \"$msg\\n\";\n}", "title": "" }, { "docid": "4626859b9222ed15149b9f23cd89d09d", "score": "0.5294128", "text": "function stepdie()\r\n{\r\n\tglobal $noerror;\r\n\t\r\n\tif ($noerror == 0) {\r\n\t\techo \"</textarea>\r\n\t\t</form></body></html>\";\r\n\t}\r\n}", "title": "" }, { "docid": "155cab3515624289efc23ccd44668e74", "score": "0.5289382", "text": "protected function early_checks()\n {\n }", "title": "" }, { "docid": "a92d5dc671d6429839c027b8877665c2", "score": "0.52738243", "text": "final protected function pass () {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1e18cd74d663b0421f2a7942471c4fb5", "score": "0.5270266", "text": "function report()\n\t{\n\n\t return false;\n\t}", "title": "" }, { "docid": "776b36d8edb713c425c85d22f86457b3", "score": "0.52688795", "text": "function checkcount() {}", "title": "" }, { "docid": "3e7cd53aebd0a3467beb44af0a68c48d", "score": "0.52682525", "text": "function phpdbg_break_next(){}", "title": "" }, { "docid": "81221023bc719ce5719cc929d62825cf", "score": "0.52668315", "text": "function printHelp()\n {\n echo \"usage: FIXME!\\n\";\n }", "title": "" }, { "docid": "7485442eb3e5a888f09bdc82c3b44d25", "score": "0.5262387", "text": "function checkGameSave(){\n\n }", "title": "" }, { "docid": "1d664768ddf9c1d5b2ccc550dbf15685", "score": "0.52613777", "text": "function test ($assertion, $message = null)\n{\n echo (@assert($assertion) ? 'pass ' : 'fail ') . $message . \"\\n\";\n}", "title": "" }, { "docid": "7e639b0ea9375c07503b96cc75a2301a", "score": "0.52611315", "text": "function qprint($string){\n\t\tif (!QUIET_MODE){\n\t\t\tprint $string.PHP_EOL;\n\t\t}\t\n\t}", "title": "" }, { "docid": "171e3bf78864820d39f6246689da8939", "score": "0.52603793", "text": "function verbose($s) { \n print \"debug: $s\\n\"; \n}", "title": "" }, { "docid": "fcc5c0f991aa36d5a8c6934ed989d9d3", "score": "0.5255736", "text": "function showPage($message) {\n print $message;\n exit;\n}", "title": "" }, { "docid": "534538e9844c2a7732d90b9bfd9f793a", "score": "0.5241801", "text": "public function do()\n {\n echo 111;\n }", "title": "" }, { "docid": "bf10d4fbf00fe2e6c8ea3dad03b9b8b4", "score": "0.5236828", "text": "abstract protected function check();", "title": "" }, { "docid": "5e0249934c74baa8338f77d6b7ae42cd", "score": "0.52319807", "text": "function ex_todo_pass() {\n\t\tpass(\"example todo in subroutine\");\n\t}", "title": "" }, { "docid": "5cbff937bc459e599f99d08316cef2b3", "score": "0.522929", "text": "function printSuccess($message)\n{\n echo \"\\033[42mSuccess: $message \\033[0m\\n\";\n}", "title": "" }, { "docid": "d5e72e40ab391721ab3b7a105151501e", "score": "0.52262694", "text": "function qwp_ops_pre_check(&$msg) {\n global $MODULE, $OP;\n\n}", "title": "" }, { "docid": "57542c902053cc3b7b89d07f20e3cefd", "score": "0.52214223", "text": "function test($passcode, $attempt, $expected) {\n $output = golf($passcode, $attempt);\n echo \"Passcode: $passcode, Attempt: $attempt, Output: \" . ($output === true ? \"true\" : \"false\");\n if ($output === $expected) {\n echo \" - Pass!\\n\";\n } else {\n echo \" - FAIL!\\n\";\n die(\"Invalid Solution!\\n\");\n }\n}", "title": "" }, { "docid": "84a73de6deac6031636afadc3e4dd569", "score": "0.52098477", "text": "function debug() {\n\tstatic $tests;\n\t$tests ++;\n\tfor ($i = 0; $i < (6 - strlen($tests)); $i ++)$tests = '0' . $tests;\n\n\tif (!isset($_SERVER['SHELL'])) {\n\t\t$header = '<br /><pre>[T::' . $tests . '] &nbsp;&nbsp;' . \"\\n\";\n\t\t$footer = ' &nbsp;&nbsp;</pre>' . \"\\n\";\n\t} else {\n\t\t$header = null;\n\t\t$footer = \"\\n\";\n\t}\n\n\t$args=func_get_args();\n\tforeach($args as $var){\n\t\tif (is_array($var) || is_object($var)) {\n\t\t\techo $header;\n\t\t\tprint_r($var);\n\t\t\techo $footer;\n\t\t}elseif(is_bool($var)) {\n\t\t\tif ($var === true)$var = 'TRUE';\n\t\t\telse $var = 'FALSE';\n\t\t\techo $header . (string) $var . $footer;\n\t\t}else echo $header . $var . $footer;\n\t}\n}", "title": "" }, { "docid": "3cf5923908aba35022ef4953ec5b437a", "score": "0.5209058", "text": "function something() {\n \n Correction(3, 4);\n \n chdir('Python27/Punit/jasmine/');\n\n$output1 = shell_exec('jasmine-node spec/C3Q1_spec.js --junitreport');\necho strlen($output1);\necho $output1;\n\nif (strpos($output1, \"0 failures\") !== FALSE) {\n echo '<blockquote id=\"hint\" style=\"background: #33cc33; color:white; border-left: 2px solid #33aa33\"><i>Hint:</i><br/>Congratulations! Your answer is correct.</blockquote>';\n return TRUE;\n }\n\n // check if it's a syntax error. If so, tell them to have a look at the ACE editor\n if (strpos($output1, \"SyntaxError\") == TRUE) {\n echo '<blockquote id=\"hint\" style=\"background: #c33; color:white;\"><i>Hint:</i></br>You have a syntax error please check the editor for mistakes.</blockquote>';\n return TRUE;\n }\n \n if (strpos($output1, \"ReferenceError\") == TRUE) {\n echo '<blockquote id=\"hint\" style=\"background: #c33; color:white;\"><i>Hint:</i><br/>You have an undefined variable or function please use the var or function tag. Is your function named the correct name?</blockquote>';\n return TRUE;\n }\n \n if (strpos($output1, \"TypeError\") == TRUE) {\n echo '<blockquote id=\"hint\" style=\"background: #c33; color:white;\"><i>Hint:</i><br/>You have not answered the question please write an answer with the correct function or variable name.</blockquote>';\n return TRUE;\n }\n\n if (strlen($output1) > 0){\n //echo '<script>alert(\"Hint I have written\");</script>';\n \n echo '<script src=\"../js/hint.js\"></script>' . '<script>returnHint(\"Python27/Punit/jasmine/reports/TEST-MathUtils.xml\");</script>';\n }\n else {\n // general wrong hint\n\t\t echo '<script>alert(\"else general hint\");</script>';\n echo '<blockquote id=\"hint\" style=\"background: #c33; color:white;\"><i>Sorry:</i><br/>Your answer is wrong. Try again.</blockquote>';\n\t\t \n\t\t }\n}", "title": "" }, { "docid": "148f5da533d703f60467a049f06fb7a7", "score": "0.5203863", "text": "function testCompiler() {\r\n\t//echo \"Compiler hook!\";\r\n}", "title": "" }, { "docid": "88da0cf71996a0033fc6571593326ee9", "score": "0.5201151", "text": "function hr() {\r\n\t\t$this->stdout('---------------------------------------------------------------');\r\n\t}", "title": "" }, { "docid": "4f25c015be03a7ffd223cc7dab5330ed", "score": "0.5197464", "text": "function automaticJudge($fileName)\n\t{\n\t\t\t$r=-1;\n\t\t\tif (cppCompiler($fileName)==false){\n\t//\t\t\techo \"Compilation Error\";\n\t\t\t\t\t$r= 2;\n\t\t\t}\n\t\t\tif ($r==-1){\n\t\t\t\texecuteFile(\"clientexecutable.o\");\n\t\t\t\tif ( validateFiles(\"codevalidation/out.out\",\"codevalidation/correctoutput.out\")==true){\n\t\t//\t\t\t\techo \"Correct solution\";\n\t\t\t\t\t\t$r= 0;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\t$r= 1;\n\t\t\t\t//\t\techo\"wrong answer\";\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $r ; \n//\t\t\tunlink(\"codevalidation/clientexecutable.o\");\n//\t\t\tunlink(\"codevalidation/out.out\");\n//\t\t\tshell_exec(\"rm clientexecutable.o\");\n\t//\t\tshell_exec(\"rm out.out\");\n\t}", "title": "" }, { "docid": "0d791e65628470820f860933e4204b30", "score": "0.5195728", "text": "function nagios_check($module, $check) {\n $function = $module . '_nagios_check_' . $check;\n if (function_exists($function)) {\n $nagios_data = $function();\n }\n else {\n $function = $module . '_nagios_check';\n $nagios_data = $function($check);\n }\n $key = key($nagios_data);\n $status = nagios_status();\n $message = $key . ' ' . $status[$nagios_data[$key]['status']] . ' - ' . $nagios_data[$key]['text'];\n if ($nagios_data[$key]['type'] == 'perf') {\n $message .= '|' . $key . '=' . $nagios_data[$key]['text'];\n }\n // We want to exit with the correct exit status so Nagios knows the outcome\n // of our drush nagios check so set DRUSH_EXECUTION_COMPLETED to true.\n drush_set_context('DRUSH_EXECUTION_COMPLETED', TRUE);\n drush_print($message);\n exit((int) $nagios_data[$key]['status']);\n}", "title": "" }, { "docid": "86436a8275b4a49ee7ae7ae575358dde", "score": "0.51931494", "text": "public function action_check_area()\n {\n\t\t\techo '1';\n }", "title": "" }, { "docid": "64cf448b4d810ec987d6f26905fd7c7e", "score": "0.5192897", "text": "function println($str) {\n echo \"$str\\n\";\n}", "title": "" } ]
35915d9f30d76e548c2d539853631955
bust Allows you to bust the cache of a Set. Note because of delayed instantiation that you can create the set, and bust it, without ever touching the DB.
[ { "docid": "c19b8876a715b22febb1b42826ffbb2d", "score": "0.6025672", "text": "public function bust()\n {\n return cache()->delete($this->_key);\n }", "title": "" } ]
[ { "docid": "cd4613fac379db4b2ce51d7c316899b8", "score": "0.5595583", "text": "private function _loadSet()\n {\n // Only continue if we don't have a set currently:\n if ($this->_set === NULL) {\n // First attempt to load this set from the cache -> maybe ...\n if ($this->_timeout !== self::NOCACHE) {\n $cache = cache();\n $set = $cache->get($this->_key);\n if ($set !== FALSE) {\n $this->_set = $set;\n return; // Short circuit, we are done\n }\n }\n\n // Else, either we didn't want cache, or it wasn't in cache, either way:\n\n // Get it from the database:\n if (is_array($this->_query)) {\n $result = db($this->_pool)->boundQuery($this->_query[0], $this->_query[1]);\n } else {\n $result = db($this->_pool)->query($this->_query);\n }\n\n // Figure out our data now:\n if (!$result) {\n $this->_set = array();\n } else {\n $this->_set = $result->fetchAll(PDO::FETCH_COLUMN);\n }\n\n // And force this into the cache IF WE ARE CACHING:\n if ($this->_timeout !== self::NOCACHE) {\n $cache->set($this->_key, $this->_set, $this->_timeout);\n }\n }\n }", "title": "" }, { "docid": "4db8bb448ed9ad2b861c441257078fd5", "score": "0.51882976", "text": "public function getCacheBusting()\n {\n if (isset($this->cacheBusting)) {\n return $this->cacheBusting;\n }\n\n return true;\n }", "title": "" }, { "docid": "c4b97ce1fb148767e69fb71bed5e2cb3", "score": "0.5174205", "text": "public function clean() {\n if (!$items = $this->getStats('items')) {\n return;\n }\n $memcache = $this->getMemcache();\n foreach ($items['items'] as $key => $item) {\n $dump = $memcache->getStats('cachedump', $key, $item['number'] * 2);\n foreach (array_keys($dump) as $ckey) {\n $memcache->get($ckey);\n }\n }\n $this->stats = null;\n }", "title": "" }, { "docid": "02a05b61b0aed8a1eeb61cf5c4de5277", "score": "0.5137221", "text": "public function isBusting()\n {\n return $this->getCacheBusting();\n }", "title": "" }, { "docid": "e3971242f9bcf4f83deb96d902765ef6", "score": "0.50852513", "text": "public function BreakCache() {\r\n $this->badges = null;\r\n $this->osm = null;\r\n if ($this->scouts)\r\n foreach ($this->scouts as $scout) $scout->BreakCache();\r\n $this->scouts = null;\r\n $this->section = null;\r\n }", "title": "" }, { "docid": "74f73825af93dbcbf0c591a04f638e82", "score": "0.50798005", "text": "public function clean_cache();", "title": "" }, { "docid": "136515e93926fc325bc518fdad5f8439", "score": "0.5000523", "text": "protected function bustCache()\n {\n Cache::forget(static::SESSION_ID_CACHE_KEY);\n Cache::forget(static::AUTH_CACHE_KEY);\n Cache::forget(static::LOGIN_CACHE_KEY);\n }", "title": "" }, { "docid": "6f10eae7c194999db23b8b9103edfc68", "score": "0.49871504", "text": "function rocket_clean_supercacher() {\n\tif ( isset( $GLOBALS['sg_cachepress_supercacher'] ) && is_a( $GLOBALS['sg_cachepress_supercacher'], 'SG_CachePress_Supercacher' ) ) {\n\t\t$GLOBALS['sg_cachepress_supercacher']->purge_cache();\n\t}\n}", "title": "" }, { "docid": "fed942a2ae9aa9d4ee1e71e717f5f267", "score": "0.49724635", "text": "public function purge()\n\t{\n\t\t/*\n\t\t * This is an empty implementation so that cacheing capability is not\n\t\t * required, but may be implemented.\n\t\t */\n\t}", "title": "" }, { "docid": "aaed70c19e037b2ecdbadcfed0ea3698", "score": "0.49310842", "text": "public function cleanByRegistry() {\n\tif ('1' == $this->serverRegistry->get('clear_cache')) {\n\t parent::clean(Zend_Cache::CLEANING_MODE_ALL);\n\t $this->serverRegistry->set('clear_cache', '0');\n\t}\n\n\treturn $this;\n }", "title": "" }, { "docid": "5843124181772defdd8713c3db5b82e7", "score": "0.4906819", "text": "public function warmUpCache()\n {\n if ($this->cache) {\n $this->clearCache();\n $this->getLocalizations();\n }\n }", "title": "" }, { "docid": "41d1d8ac0b8f787acef1212a0ab11fb5", "score": "0.4883633", "text": "public function clear(){\n\t\tforeach ($this->getRegularKeys() as $key => $sets){\n\t\t$this->__SETS[$key] = null;\n\t\t}\n\t}", "title": "" }, { "docid": "4cd01e64df3697db76d571843bd54fa0", "score": "0.48793855", "text": "protected function garbageCollection() {\n $cache_lifetime = variable_get('cache_lifetime', 0);\n\n // Clean-up the per-user cache expiration session data, so that the session\n // handler can properly clean-up the session data for anonymous users.\n if (isset($_SESSION['cache_expiration'])) {\n $expire = REQUEST_TIME - $cache_lifetime;\n foreach ($_SESSION['cache_expiration'] as $bin => $timestamp) {\n if ($timestamp < $expire) {\n unset($_SESSION['cache_expiration'][$bin]);\n }\n }\n if (!$_SESSION['cache_expiration']) {\n unset($_SESSION['cache_expiration']);\n }\n }\n\n // Garbage collection of temporary items is only necessary when enforcing\n // a minimum cache lifetime.\n if (!$cache_lifetime) {\n return;\n }\n // When cache lifetime is in force, avoid running garbage collection too\n // often since this will remove temporary cache items indiscriminately.\n $cache_flush = variable_get('cache_flush_' . $this->bin, 0);\n if ($cache_flush && ($cache_flush + $cache_lifetime <= REQUEST_TIME)) {\n // Reset the variable immediately to prevent a meltdown in heavy load situations.\n variable_set('cache_flush_' . $this->bin, 0);\n // Time to flush old cache data\n db_delete($this->bin)\n ->condition('expire', CACHE_PERMANENT, '<>')\n ->condition('expire', $cache_flush, '<=')\n ->execute();\n }\n }", "title": "" }, { "docid": "7834acd21f405790514aeefcadba9594", "score": "0.48571634", "text": "public function flush ()\n {\n apc_clear_cache();\n return $this;\n }", "title": "" }, { "docid": "7afe37a4a8c7710a2bf460fcb4a8a364", "score": "0.483897", "text": "public function testClean_All()\n\t{\n\t $this->Cache->set('test', \"abcdef\");\n\t $this->Cache->set('apple', array('red', 'tree', 'juice'));\n\t if (!$this->Cache->has('test')) $this->markTestSkipped(\"Setting of the data failed\");\n\t \n\t $this->Cache->clean(Cache::ALL);\n\t $this->assertFalse($this->Cache->has('test'), 'test');\n\t $this->assertFalse($this->Cache->has('apple'), 'apple');\n\t}", "title": "" }, { "docid": "84d08a1e761fce69028d239c31700d27", "score": "0.48177102", "text": "public function BreakCache() {\r\n if ($this->events) {\r\n foreach ($this->events as $event) $event->BreakCache();\r\n $this->events = null;\r\n }\r\n $this->osm = null;\r\n if ($this->scouts) {\r\n foreach ($this->scouts as $scout) $scout->BreakCache();\r\n $this->scouts = null;\r\n }\r\n if ($this->terms) {\r\n foreach ($this->terms as $term) $term->BreakCache();\r\n $this->terms = null;\r\n }\r\n }", "title": "" }, { "docid": "394fd7e635d62e01520177609dd2b4cf", "score": "0.4791673", "text": "public function clearClean()\n {\n $this->_cleanEntities = array();\n return $this;\n }", "title": "" }, { "docid": "f9bab91bfaab33439091677c13decab1", "score": "0.47878423", "text": "public function flush_cache() {\n $this->_reset_run(array(\n 'ar_cache_select' => array(),\n 'ar_cache_from' => array(),\n 'ar_cache_join' => array(),\n 'ar_cache_where' => array(),\n 'ar_cache_like' => array(),\n 'ar_cache_groupby' => array(),\n 'ar_cache_having' => array(),\n 'ar_cache_orderby' => array(),\n 'ar_cache_set' => array(),\n 'ar_cache_exists' => array(),\n 'ar_cache_no_escape' => array()\n ));\n }", "title": "" }, { "docid": "81e7205df8004adfc9efa406eaf50237", "score": "0.476633", "text": "public function clear(): Set\n {\n $this->A = [];\n\n return $this;\n }", "title": "" }, { "docid": "045e83217a947b26d1c6ce0558129158", "score": "0.47657463", "text": "public function flush(): void\r\n\t{\r\n\t\t$remove = [];\r\n\r\n\t\tforeach ($this->tags as $tag)\r\n\t\t{\r\n\t\t\t$tagKey = $this->keyRaw('tag', $tag, 'keys');\r\n\t\t\t$members = $this->cache->smembers($tagKey);\r\n\t\t\t$members[] = $tagKey; // Also remove the set as well.\r\n\r\n\t\t\t$remove = array_merge($remove, $members);\r\n\t\t}\r\n\r\n\t\tforeach ($remove as $key)\r\n\t\t\t$this->cache->del($key);\r\n\t}", "title": "" }, { "docid": "f9f05594b41b051b6ebdd3d0366c039a", "score": "0.47602436", "text": "public function clear()\n {\n // $this->memcache->flush();\n return $this;\n }", "title": "" }, { "docid": "6a659d45c381a92416a49b9190de4d7c", "score": "0.47601756", "text": "public function flush_cache();", "title": "" }, { "docid": "f3e471f17a87fe738912184c962fb3e7", "score": "0.47376776", "text": "public function clearCache() {\n\t\t$this->blacklistCache = null;\n\t}", "title": "" }, { "docid": "9b8cb6c936238cdd93750575912bc9d0", "score": "0.47262302", "text": "public function clean()\n {\n Mage::app()->cleanCache($this->_cacheTags);\n }", "title": "" }, { "docid": "5a664c710e79bba1e30927c8b5e73796", "score": "0.4726226", "text": "public function flush() : Cache\n {\n $this->items = [];\n\n return $this;\n }", "title": "" }, { "docid": "376d8dc5a96efbdf3691f66fd465da24", "score": "0.46950787", "text": "function drush_cache_clear_all($cid = NULL, $bin = 'default', $wildcard = FALSE) {\n if (!isset($cid) && !isset($bin)) {\n foreach (drush_cache_get_bins() as $bin) {\n _drush_cache_get_object($bin)->clear();\n }\n return;\n }\n return _drush_cache_get_object($bin)->clear($cid, $wildcard);\n}", "title": "" }, { "docid": "8dfb5391126bee34601546eb64816612", "score": "0.4679043", "text": "public function flushMemcached() {\r\n \r\n if (!empty($this->mckey)) {\r\n $this->Memcached->delete(\"railpage:locos.class_id=\" . $this->id);\r\n $this->Memcached->delete(\"railpage:locos.class_id=\" . $this->slug);\r\n $this->Redis->delete(sprintf(self::CACHE_KEY, $this->id));\r\n $this->Redis->delete(sprintf(self::CACHE_KEY, $this->slug));\r\n }\r\n \r\n return $this;\r\n \r\n }", "title": "" }, { "docid": "89798ffdab80e2cb51bcbd7587a02eb2", "score": "0.46426517", "text": "public function toSet(): Set\n {\n return Set::new($this);\n }", "title": "" }, { "docid": "7f38e3d5c9882eab5e54f959930b4d1d", "score": "0.46417177", "text": "function bp_core_clear_cache() {\r\n\tglobal $cache_path, $cache_filename;\r\n\r\n\tif ( function_exists( 'prune_super_cache' ) ) {\r\n\t\tdo_action( 'bp_core_clear_cache' );\r\n\r\n\t\treturn prune_super_cache( $cache_path, true );\r\n\t}\r\n}", "title": "" }, { "docid": "fd865d7b8dcbbb023d17d9a9793818d9", "score": "0.46353033", "text": "public function removeAll() {\n if (!$items = $this->getStats('items')) {\n return;\n }\n $memcache = $this->getMemcache();\n foreach ($items['items'] as $key => $item) {\n $dump = $memcache->getStats('cachedump', $key, $item['number'] * 2);\n foreach (array_keys($dump) as $ckey) {\n $memcache->delete($ckey);\n }\n }\n $this->stats = null;\n }", "title": "" }, { "docid": "5ba7c0c194b7de19475b20482ce7df60", "score": "0.46218508", "text": "public static function purgeAll()\n {\n $staticMugoVarnish = new StaticCacheMugoVarnish();\n $staticMugoVarnish->generateCache(true);\n }", "title": "" }, { "docid": "630f42a1e9a5ead1655a944a03d2fec1", "score": "0.46214536", "text": "function flushCache() {\n\t}", "title": "" }, { "docid": "d0675df90c5679eba67b133c1dbcd0c8", "score": "0.4618954", "text": "abstract public function clearCache();", "title": "" }, { "docid": "87f8312dc33fa0cb537c996dab4df647", "score": "0.46175826", "text": "function cache_clear_all($cid = NULL, $bin = NULL, $wildcard = FALSE) {\n if (!isset($cid) && !isset($bin)) {\n // Clear the block cache first, so stale data will\n // not end up in the page cache.\n if (module_exists('block')) {\n cache_clear_all(NULL, 'cache_block');\n }\n cache_clear_all(NULL, 'cache_page');\n return;\n }\n return _cache_get_object($bin)->clear($cid, $wildcard);\n}", "title": "" }, { "docid": "23ff3e3908397bb0c6d3962e31d32480", "score": "0.46164036", "text": "public function gc() {\n\t\t\t$expired = $this->find('toGc');\n\t\t\tforeach ($expired as $block) {\n\t\t\t\t$this->unblock($block[$this->alias]['id']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "1d51fb99680baa772c73410e545ff9a7", "score": "0.46126598", "text": "public function maybeByPassCache() {\n // Wordpress on debug mode\n if ((defined('WP_DEBUG') && WP_DEBUG)\n || (defined('VTCORE_CLEAR_CACHE') && VTCORE_CLEAR_CACHE)) {\n\n $this->clearCache();\n }\n\n return $this;\n }", "title": "" }, { "docid": "f357de4150c21f34fa9f4b0c1d86428d", "score": "0.46017718", "text": "public function flushCache()\n\t{\n\t\tif (!$this->dirty_caches) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tforeach ($this->dirty_caches as $c) {\n\t\t\t\t$insert_cache = array(\n\t\t\t\t\t'name' => $c->getName(),\n\t\t\t\t\t'usergroup_key' => $c->getUsergroupKey(),\n\t\t\t\t\t'usergroup_ids' => implode(',', $c->getUsergroupIds()),\n\t\t\t\t\t'perms' => serialize($c->getPerms())\n\t\t\t\t);\n\n\t\t\t\tApp::getDb()->replace('permissions_cache', $insert_cache);\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\t$info = \\DeskPRO\\Kernel\\KernelErrorHandler::getExceptionInfo($e);\n\t\t\t\\DeskPRO\\Kernel\\KernelErrorHandler::logErrorInfo($info);\n\t\t}\n\n\t\t$this->dirty_caches = array();\n\t}", "title": "" }, { "docid": "cdfe206b2b1a577ca5a8b6ead3d67698", "score": "0.45999852", "text": "public function BreakCache() {\r\n $this->osm = null;\r\n $this->section = null;\r\n $this->badgeWork = array();\r\n }", "title": "" }, { "docid": "33fd45e2c991ad462af8ad3b18330586", "score": "0.45984116", "text": "public function merge(self $set): self;", "title": "" }, { "docid": "5f3fe0ad8cc8b8f05db89a2818eba165", "score": "0.45925927", "text": "public function remove($x): Set\n {\n unset($this->A[$this->getKey($x)]);\n\n return $this;\n }", "title": "" }, { "docid": "017132ff1ae986f58ccc2885c2b9e548", "score": "0.45855936", "text": "public function cleanModelCache()\n {\n $tags = $this->getCacheTags();\n if ($tags !== false) {\n Mage::app()->cleanCache($tags);\n }\n return $this;\n }", "title": "" }, { "docid": "46eab46acca6878823b8ecdc2761e782", "score": "0.45846388", "text": "public static function clear_cache() {\n\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t//delete all setlist transient\n\t\t\t$cache_del = \"DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_%\".SLP_PVW_PLUGIN_SHORTCODE.\"_getsetlist_%'\";\n\t\t\t\n\t\t\t$wpdb->query( $cache_del );\n\t\t\n\t\t}", "title": "" }, { "docid": "f504b491f475fccd2bf9f990f91049e8", "score": "0.458328", "text": "public static function flush()\n {\n Injector::inst()->get(CacheInterface::class . '.NewRelic')->clear();\n }", "title": "" }, { "docid": "e6e6d1eb13c196e06c95dcf762406ad0", "score": "0.45769113", "text": "public static function purge()\n {\n self::$_registry = array();\n self::$_units = array();\n }", "title": "" }, { "docid": "b6945ce067b278981d1588d90f8f78aa", "score": "0.45747775", "text": "public function clearAll() {\n\t\t$this->cache->clearAll($this->category);\n\t}", "title": "" }, { "docid": "8a643208fbe39c3ed9294e3a6ec76360", "score": "0.45710972", "text": "public function cleanModelCache()\n {\n $tags = $this->getCacheIdTagsWithCategories();\n if ($tags !== false) {\n Mage::app()->cleanCache($tags);\n }\n return $this;\n }", "title": "" }, { "docid": "e55e8f627ec61c5e44c38f6f70d4a466", "score": "0.45618913", "text": "public function flush_cats() {\n\t\t// Like, beat it. Dig?\n\t\tdelete_transient( 'all_the_cool_cats' );\n\t}", "title": "" }, { "docid": "26694be79794f160ef783a7503ca7170", "score": "0.45551637", "text": "public function clear() {\n\t\t$this->_currCache = array();\n\t}", "title": "" }, { "docid": "0f84ca3787fc962623f15120b28aee3d", "score": "0.45514137", "text": "protected function sanitize()\n {\n $sanitized = sanitizer()->make(\n $this->all(),\n $this->sanitizerRules()\n );\n\n $this->replace($sanitized);\n }", "title": "" }, { "docid": "a88f2773abe96994eed8791267f34cb4", "score": "0.45511016", "text": "public static function wpfc_toolbar_clean_cache() {\n\n\t\tif ( self::can_user_clean_wpfc_cache() ) {\n\t\t\tBF_Booster_Cache::flush_cache();\n\t\t}\n\t}", "title": "" }, { "docid": "ce9531ff6fd42618f22e442e557cfd8c", "score": "0.45469728", "text": "public function purge(){\n\t\t\tforeach( $this->data['seomatic'] as $key => $val ){\n\n\t\t\t\tunset( $this->data['seomatic'][ $key ] );\n\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f3687eb128b0f0d61870f946b52bcb19", "score": "0.45440856", "text": "public static function flushCache()\n {\n static::$snakeCache = [];\n static::$camelCache = [];\n static::$studlyCache = [];\n }", "title": "" }, { "docid": "d636fecffed4e3e39761a62eb4773066", "score": "0.45419765", "text": "public function clear(): self {\r\n\r\n apcu_clear_cache();\r\n return $this;\r\n }", "title": "" }, { "docid": "2f51a20f6b9d97f4415a1a05deadffd8", "score": "0.45299327", "text": "function clean_bounties() {\n\t// ability to extend bounties\n}", "title": "" }, { "docid": "598c5d5981c7effe1d9c5ceae38ffe7b", "score": "0.45259982", "text": "final public function unload()\n {\n // clean some things when object is reused\n $this->_data = array();\n $this->_modified = array();\n $this->_setLoaded(false);\n\n return $this;\n }", "title": "" }, { "docid": "f77f613ff3d2d1870973092ee8ae40d8", "score": "0.45241204", "text": "public function clearDirty()\n {\n $this->_dirtyEntities = array();\n return $this;\n }", "title": "" }, { "docid": "56e386f3a80912b00891c133417137c4", "score": "0.45230287", "text": "function rocket_clear_cache_after_varnish_http_purge() {\n\tif ( class_exists( 'VarnishPurger' ) && isset( $_GET['vhp_flush_all'] ) && current_user_can( 'manage_options' ) && check_admin_referer( 'vhp-flush-all' ) ) {\n\t\t// Clear all caching files.\n\t\trocket_clean_domain();\n\n\t\t// Preload cache.\n\t\trun_rocket_preload_cache( 'cache-preload' );\n\t}\n}", "title": "" }, { "docid": "ca05199560595dfe04f194388f16213c", "score": "0.4519399", "text": "public function runGarbageCollection()\n\t{\n\t\tforeach ($this->keys as $key)\n\t\t{\n\t\t\tif (!$key->isValid())\n\t\t\t{\n\t\t\t\t$this->offsetUnset($key);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9eb9b03034f47803a7b4c822652ec75f", "score": "0.45031238", "text": "public function toSet(): Set;", "title": "" }, { "docid": "a452d16f00a69038a32d20013b874b6d", "score": "0.4498275", "text": "public function clearAll()\n {\n $this->cachedObjects = array();\n }", "title": "" }, { "docid": "f4a9362f775f94571a14dfbdfef85fcf", "score": "0.44886118", "text": "public function purge(){\n $meta = @xcache_get($this->name);\n if($meta){\n if(is_writeable($meta['target'])){\n unlink($meta['target']);\n }\n xcache_unset($this->name);\n }\n }", "title": "" }, { "docid": "5062a2a18788996b3636e04f0f75ea36", "score": "0.44859043", "text": "function _mbbasetheme_category_transient_flusher() {\n\t// Like, beat it. Dig?\n\tdelete_transient( 'all_the_cool_cats' );\n}", "title": "" }, { "docid": "20eb081c352429b31f4805955e0c4f2d", "score": "0.4482419", "text": "public function sanitize() {\n foreach($this->collection as $item) {\n $item->sanitize();\n }\n }", "title": "" }, { "docid": "4d602a6b17b8f4ddd15b7d3dba677079", "score": "0.44823664", "text": "public function saveWithoutPurging();", "title": "" }, { "docid": "0c6a134f15620d8c24f85944752ac558", "score": "0.44821468", "text": "public function to_set() {\n return Crankshaft::Set($this);\n }", "title": "" }, { "docid": "61bfd8db24cdff9e25ac1ac9233e223a", "score": "0.44796312", "text": "public static function availableChildrenOnlySets(): Collection\n {\n $stored_sets = collect(StoredSetReference::all()->keyBy('key')->all());\n $all_sets = SetReference::all();\n\n return $all_sets\n ->merge($stored_sets);\n }", "title": "" }, { "docid": "8b11dfa6a296874fccddc15bfd9c40b8", "score": "0.4476941", "text": "public function clean()\n {\n $database = JFactory::getDbo();\n \n $query = $database->getQuery(true);\n $query\n ->delete($database->qn('#__jspace_cache'))\n ->where($database->qn('catid').'='.(int)$this->category->id);\n \n $database->setQuery($query);\n $database->execute();\n }", "title": "" }, { "docid": "e25f1bf3657c5057c971aa20506b80f8", "score": "0.44718382", "text": "public static function flush()\n {\n self::inst()->getCache()->clear();\n }", "title": "" }, { "docid": "c37ed121d1e7ead38f4592116a0ffc48", "score": "0.44663548", "text": "public function cleanCache()\n {\n $this->instances = null;\n $this->instancesById = null;\n }", "title": "" }, { "docid": "18224077b6d79188843aa6dbccb3bb90", "score": "0.44644704", "text": "public function clear()\n {\n $this->memcache->flush();\n }", "title": "" }, { "docid": "d8aee2bb8be29d9377aec3984a80ffa3", "score": "0.4464036", "text": "public function clearCache()\n {\n $this->loaded = false;\n $this->all = array();\n }", "title": "" }, { "docid": "b7b9f074cf906db52f53894b63fe6f7d", "score": "0.44636023", "text": "public function flushCache()\n {\n $this->_cache = array();\n }", "title": "" }, { "docid": "015199a976bb918a6b5ad7fa9d0ccbda", "score": "0.44598886", "text": "public function deleted(Set $set)\n {\n $sets = Set::where('catalog_item_id', $set->catalog_item_id)->get();\n\n $brickset = new BrickSetSearch();\n\n $brickset->setCollectionQuantity(\n $set->catalogItem->brickset_id,\n [\n 'userHash' => getEnv('MURSTEN_TRACK_USER_HASH'),\n 'qtyOwned' => $sets->count(),\n ]\n );\n }", "title": "" }, { "docid": "3a730d83f23a43a19cb877eefd276b18", "score": "0.44569224", "text": "public function purgeAll() {\r\n\t\tif(is_null($this->memcachedObject)) {\r\n\t\t\tif(!$this->connection())\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\telseif($this->noConnection)\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t$this->memcachedObject->flush();\r\n\t}", "title": "" }, { "docid": "2b6d5097793003583fbc690475427a72", "score": "0.44481334", "text": "public function prefetchClear() {\n\t\tparent::clear();\n\t}", "title": "" }, { "docid": "5f97bae09c158e2960db39c9da4d89cc", "score": "0.44419843", "text": "function cache_clean() {\n if (!TP_ENABLE_CACHE) {\n return;\n }\n if ($this->memcache_working) {\n $this->memcache->flush();\n } elseif (function_exists('apc_clear_cache')) {\n apc_clear_cache('user');\n } elseif (function_exists('apc_clear_cache')) {\n apc_clear_cache();\n } elseif (function_exists('xcache_unset_by_prefix')) {\n @xcache_unset_by_prefix();\n }\n //TODO - clean on eaccelerator is not so clean...\n }", "title": "" }, { "docid": "435af244bfb1ae02b0ca94373b738e50", "score": "0.44408175", "text": "function markClean()\n {\n Local_Domain_ObjectWatcher::addClean($this);\n }", "title": "" }, { "docid": "72aaeb73122cf1724cd420158b6729fc", "score": "0.4440034", "text": "public function hMSet()\n {\n $this->cache->removeItem('user:1');\n $this->cache->hMSet('user:1', array('name' => 'test', 'value' => 2000));\n $this->cache->hIncrBy('user:1', 'value', 100);\n $this->assertEqual($this->cache->hMGet('user:1', ['value'])['value'], 2100, \"I expect that the value is equal to '2100'\");\n }", "title": "" }, { "docid": "8d24b0e94caedf34da4db0d773fb36f8", "score": "0.44289535", "text": "function rocket_clear_cache_after_pressidium() {\n\tif ( isset( $_POST['purge-all'] ) && current_user_can( 'manage_options' ) && defined( 'WP_NINUKIS_WP_NAME' ) && check_admin_referer( WP_NINUKIS_WP_NAME . '-caching' ) ) {\n\t\t// Clear all caching files.\n\t\trocket_clean_domain();\n\n\t\t// Preload cache.\n\t\trun_rocket_preload_cache( 'cache-preload' );\n\t}\n}", "title": "" }, { "docid": "5b335e954e1b75e02a209b7984862330", "score": "0.4428214", "text": "public function get_clean_cache_hits() { return $this->clean_cache_hits; }", "title": "" }, { "docid": "b10619ce54f6803e20eaafcdd45516e6", "score": "0.4427807", "text": "static function purgeCache()\n\t{\n\t\t$stash = self::getCache();\n\t\treturn $stash->purge();\n\t}", "title": "" }, { "docid": "198ca68369c0174e190d4384ef52de48", "score": "0.44263166", "text": "function restruxure_category_transient_flusher() {\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn false;\n\t}\n\t// Like, beat it. Dig?\n\tdelete_transient( 'restruxure_categories' );\n}", "title": "" }, { "docid": "907cff25f261e6f8312731548e1f7be8", "score": "0.44227213", "text": "static function maintenance(){\n\t\t$rows = Db::rows('select identity, bt.reason, b.time_expire\n\t\t\tfrom ban b\n\t\t\t\tleft join ban_type bt on b.type_id_ = bt.id\n\t\t\twhere (b.time_expire >= '.Db::quote(i()->Time()).' or time_expire is null)');\n\t\t$identityBans = Arrays::compileSubsOnKey($rows,'identity');\n\t\tforeach($identityBans as $identity => $bans){\n\t\t\t$putBans = array();\n\t\t\tforeach($bans as $ban){\n\t\t\t\t$putBans[] = Arrays::extract(array('reason','time_expire'),$ban);\n\t\t\t}\n\t\t\tCache::set('bans-'.$identity,serialize($putBans));\n\t\t}\n\t}", "title": "" }, { "docid": "7f7a05828e27a660a9a005e38a6e37d1", "score": "0.4410166", "text": "public function flush()\n\t\t{\n\t\t\t$this->memcache->flush();\n\t\t}", "title": "" }, { "docid": "e7aeb765b5d224bfc62a1a45a2137eb0", "score": "0.44096798", "text": "function FastXSL_ShmCache() {\n\t\t$this->FastXSL_Base();\n\t}", "title": "" }, { "docid": "3f28e12411d636eb74e74484e75ef3f4", "score": "0.44080323", "text": "protected function purge(): void {\n array_filter($this->cache(), fn($f): bool => (($f->getMTime() + $this->defaultTTL) < time()) ? $f->unlink() : false);\n }", "title": "" }, { "docid": "b114b13c1877410febca52141ee4b2dd", "score": "0.4407483", "text": "public function testPreCacheWipe()\n {\n cache_set($this->thingy, $this->thingy, $this->bin);\n $this->assertEquals($this->thingy,\n cache_get($this->thingy, $this->bin)->data, 'Cache item fetched successfully'\n );\n }", "title": "" }, { "docid": "55b02d0d947e2b4636032db5e5fd20cb", "score": "0.44072515", "text": "public static function clear()\n {\n Cache::flush();\n self::clearInternal();\n }", "title": "" }, { "docid": "432985046fe490e9ca580e1d2067ce74", "score": "0.44069904", "text": "public function maybe_create_memcache_dropin() {\n\t\tif ( Options::is_enabled( 'siteground_optimizer_enable_memcached' ) ) {\n\t\t\t$memcached = new Memcache();\n\t\t\t$memcached->remove_memcached_dropin();\n\t\t\t$memcached->create_memcached_dropin();\n\t\t}\n\t}", "title": "" }, { "docid": "c278ed4ef665fd5b52323be212dac24a", "score": "0.44058535", "text": "public function clean()\n {\n $this->cache->clean();\n }", "title": "" }, { "docid": "00b4ae2c822985185e5d6baba7ca4a75", "score": "0.4403137", "text": "public function set_stupidly_fast($set = \\false)\n {\n }", "title": "" }, { "docid": "a64a32dfd803e657477a5cd105f2a08c", "score": "0.44006756", "text": "protected function _collectGarbage()\n {\n // Clean up expired keys from tag id set and global id set\n\n if ($this->_useLua) {\n $sArgs = array(self::PREFIX_KEY, self::SET_TAGS, self::SET_IDS, self::PREFIX_TAG_IDS, ($this->_notMatchingTags ? 1 : 0));\n $allTags = (array) $this->_redis->sMembers(self::SET_TAGS);\n $tagsCount = count($allTags);\n $counter = 0;\n $tagsBatch = array();\n foreach ($allTags as $tag) {\n $tagsBatch[] = $tag;\n $counter++;\n if (count($tagsBatch) == 10 || $counter == $tagsCount) {\n if (! $this->_redis->evalSha(self::LUA_GC_SH1, $tagsBatch, $sArgs)) {\n $script =\n \"local tagKeys = {} \".\n \"local expired = {} \".\n \"local expiredCount = 0 \".\n \"local notExpiredCount = 0 \".\n \"for _, tagName in ipairs(KEYS) do \".\n \"tagKeys = redis.call('SMEMBERS', ARGV[4]..tagName) \".\n \"for __, keyName in ipairs(tagKeys) do \".\n \"if (redis.call('EXISTS', ARGV[1]..keyName) == 0) then \".\n \"expiredCount = expiredCount + 1 \".\n \"expired[expiredCount] = keyName \".\n /* Redis Lua scripts have a hard limit of 8000 parameters per command */\n \"if (expiredCount == 7990) then \".\n \"redis.call('SREM', ARGV[4]..tagName, unpack(expired)) \".\n \"if (ARGV[5] == '1') then \".\n \"redis.call('SREM', ARGV[3], unpack(expired)) \".\n \"end \".\n \"expiredCount = 0 \".\n \"expired = {} \".\n \"end \".\n \"else \".\n \"notExpiredCount = notExpiredCount + 1 \".\n \"end \".\n \"end \".\n \"if (expiredCount > 0) then \".\n \"redis.call('SREM', ARGV[4]..tagName, unpack(expired)) \".\n \"if (ARGV[5] == '1') then \".\n \"redis.call('SREM', ARGV[3], unpack(expired)) \".\n \"end \".\n \"end \".\n \"if (notExpiredCount == 0) then \".\n \"redis.call ('UNLINK', ARGV[4]..tagName) \".\n \"redis.call ('SREM', ARGV[2], tagName) \".\n \"end \".\n \"expired = {} \".\n \"expiredCount = 0 \".\n \"notExpiredCount = 0 \".\n \"end \".\n \"return true\";\n $this->_redis->eval($script, $tagsBatch, $sArgs);\n }\n $tagsBatch = array();\n /* Give Redis some time to handle other requests */\n usleep(20000);\n }\n }\n return;\n }\n\n $exists = array();\n $tags = (array) $this->_redis->sMembers(self::SET_TAGS);\n foreach ($tags as $tag) {\n // Get list of expired ids for each tag\n $tagMembers = $this->_redis->sMembers(self::PREFIX_TAG_IDS . $tag);\n $numTagMembers = count($tagMembers);\n $expired = array();\n $numExpired = $numNotExpired = 0;\n if ($numTagMembers) {\n while ($id = array_pop($tagMembers)) {\n if (! isset($exists[$id])) {\n $exists[$id] = $this->_redis->exists(self::PREFIX_KEY.$id);\n }\n if ($exists[$id]) {\n $numNotExpired++;\n } else {\n $numExpired++;\n $expired[] = $id;\n\n // Remove incrementally to reduce memory usage\n if (count($expired) % 100 == 0 && $numNotExpired > 0) {\n $this->_redis->sRem(self::PREFIX_TAG_IDS . $tag, $expired);\n if ($this->_notMatchingTags) { // Clean up expired ids from ids set\n $this->_redis->sRem(self::SET_IDS, $expired);\n }\n $expired = array();\n }\n }\n }\n if (! count($expired)) {\n continue;\n }\n }\n\n // Remove empty tags or completely expired tags\n if ($numExpired == $numTagMembers) {\n $this->_redis->unlink(self::PREFIX_TAG_IDS . $tag);\n $this->_redis->sRem(self::SET_TAGS, $tag);\n }\n // Clean up expired ids from tag ids set\n elseif (count($expired)) {\n $this->_redis->sRem(self::PREFIX_TAG_IDS . $tag, $expired);\n if ($this->_notMatchingTags) { // Clean up expired ids from ids set\n $this->_redis->sRem(self::SET_IDS, $expired);\n }\n }\n unset($expired);\n }\n\n // TODO\n // Clean up global list of ids for ids with no tag\n// if ($this->_notMatchingTags) {\n// }\n }", "title": "" }, { "docid": "912f4eb924152abff25916006c092369", "score": "0.4397973", "text": "public function flush()\r\n {\r\n $this->memcache->flush();\r\n }", "title": "" }, { "docid": "f7e49627d7b97e80c6c4eba10f778f38", "score": "0.43935513", "text": "public function collect(): void\n {\n foreach ($this->garbageCollection as $item) {\n if (file_exists($item)) {\n unlink($item);\n }\n }\n\n $this->garbageCollection = [];\n }", "title": "" }, { "docid": "672553f71c4f4c436f8af49761838566", "score": "0.43896726", "text": "function contain_memory_leaks() {\n\t\tglobal $wpdb, $wp_object_cache;\n\t\t$wpdb->queries = [];\n\t\tif ( ! is_object( $wp_object_cache ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$wp_object_cache->group_ops = [];\n\t\t$wp_object_cache->stats = [];\n\t\t$wp_object_cache->memcache_debug = [];\n\t\t$wp_object_cache->cache = [];\n\t\tif ( method_exists( $wp_object_cache, '__remoteset' ) ) {\n\t\t\t$wp_object_cache->__remoteset();\n\t\t}\n\t}", "title": "" }, { "docid": "cc40e628b0014d3d3f805d169b25230b", "score": "0.4388204", "text": "static function flushPool() {\n\t\tKnownWords::$_instancePool = array();\n\t}", "title": "" }, { "docid": "627ee34da7539e68470bfc88894d7a71", "score": "0.438416", "text": "protected function cleanMemcache()\n {\n }", "title": "" }, { "docid": "cfa61f5612776c8336caf00bc6a27806", "score": "0.43835637", "text": "protected function cleanCache() {\n // construct criteria for deleting\n $dbCriteria = new CDbCriteria();\n // only delete outdated entries\n $dbCriteria->compare('timestamp', '<' . (time() - $this->m_timeout));\n $dbCriteria->compare('service_id', '=' . $this->m_service_id);\n\n // finally delete all matching entries\n WebserviceCache::model()->deleteAll($dbCriteria);\n }", "title": "" }, { "docid": "4ad9c94082d41096934e95b3bdc24549", "score": "0.4382883", "text": "public function clearCache()\n {\n $this->_instances = array();\n }", "title": "" }, { "docid": "da0bc98183f780eddd568a62b32b3a64", "score": "0.43822157", "text": "function clean_category_cache($id)\n{\n}", "title": "" } ]
a9358848fb8209f5d0ae7dc90553baf9
Escapes a value for use within a DB query. WARNING If the original value is of enumerable type, the index is NEVER escaped.
[ { "docid": "3d83c01439f8dece705c2e7315905c60", "score": "0.60579103", "text": "public static function escape($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escape($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn mysql_real_escape_string($val);\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "7534efbe8bf6d0990b0ec9535f753d67", "score": "0.7087518", "text": "public static function escape($value) {}", "title": "" }, { "docid": "ed3b485801434a73e2e038284d33ef19", "score": "0.6940702", "text": "public function escape($value);", "title": "" }, { "docid": "ed3b485801434a73e2e038284d33ef19", "score": "0.6940702", "text": "public function escape($value);", "title": "" }, { "docid": "9401c5f13c146f99d8c9c84dd08d8c96", "score": "0.6668369", "text": "public function escapeValue($value): string {\n\t\treturn $this->sqlAdapter->escapeValue($value);\n\t}", "title": "" }, { "docid": "9009cd125e0cd36e1f08ae46b654a055", "score": "0.6507329", "text": "public static function escape($value) {\n return slDatabaseManager::getConnection()->escape($value);\n }", "title": "" }, { "docid": "14c696378ecdc4bd2907c56850e9d329", "score": "0.64457715", "text": "public function escape($value)\n {\n // SQL standard is to use single-quotes for all values\n return \"'$value'\";\n }", "title": "" }, { "docid": "6153461e540b40eca5ba73d35b5efca1", "score": "0.63352925", "text": "function escape($value) {\n\t\treturn $this->mysql_client->escape_string($value);\n\t}", "title": "" }, { "docid": "7840b1264d5836a64bbf64fcadcdd38d", "score": "0.6240032", "text": "public abstract function escapeString($value);", "title": "" }, { "docid": "949f8edf9d5c88dadd67f8c000464c2f", "score": "0.62309533", "text": "public function escapeString($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\t$id = $this->getObjectIdentifier($value, 'id');\n\t\t\t$properties = (new Reflection_Class(get_class($value)))->getAnnotedProperties(\n\t\t\t\tStore_Annotation::ANNOTATION, Store_Annotation::FALSE\n\t\t\t);\n\t\t\tif ($properties) {\n\t\t\t\t$value = clone $value;\n\t\t\t\tforeach (array_keys($properties) as $property_name) {\n\t\t\t\t\tunset($value->$property_name);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$value = is_numeric($id) ? $id : serialize($value);\n\t\t}\n\t\treturn $this->connection->escape_string($value);\n\t}", "title": "" }, { "docid": "53704ff4877affec6e0e83a3ecd074ca", "score": "0.61920017", "text": "protected function escapeString($value)\n {\n return $this->entityManager->getConnection()->quote($value);\n }", "title": "" }, { "docid": "fd1a8b5055d19c61b01a141dfc412a64", "score": "0.6184961", "text": "abstract public function escapeString($value);", "title": "" }, { "docid": "3a0c36e669160dcd271b0b440674a1e8", "score": "0.6166946", "text": "public function escape($value)\n {\n return $this->mysqli->escape_string($value);\n }", "title": "" }, { "docid": "503649d988b8199004bd5479cb9cf73e", "score": "0.61420727", "text": "public function escape($value) {\n $connection = $this -> connect();\n return $connection -> real_escape_string(trim($value));\n }", "title": "" }, { "docid": "f06c09049ca7d1ff1d1184c64313b9ce", "score": "0.6114", "text": "public function escape($value)\n\t{\n\t //$this->ping();\n\t $this->_connection OR $this->connect();\n\n\t if (($value = $this->_connection->real_escape_string((string) $value)) === false) {\n\t throw new DatabaseException($this->_connection->error, $this->_connection->errno);\n\t }\n\n\t // SQL standard is to use single-quotes for all values\n\t\treturn \"'$value'\";\n\t}", "title": "" }, { "docid": "da34e27d3d42ee6f37dde2419bd68a55", "score": "0.6066852", "text": "public function escape($value)\n\t{\n\t\tif(is_int($value))\n\t\t\treturn $value;\n\t\telse if(is_float($value))\n\t\t\treturn str_replace(',', '.', ''.$value);\n\t\telse\n\t\t\treturn $this->escapeString($value);\n\t}", "title": "" }, { "docid": "9f15c79697613b6c7a444fed034e23ba", "score": "0.6057176", "text": "protected function escape( $value )\n\t{\n\t\treturn e( $value );\n\t}", "title": "" }, { "docid": "98e925f3551f7440c3b14126776294c2", "score": "0.60202783", "text": "public function escape($value) {\n\t\treturn ($this->connection)\n\t\t\t? pg_escape_string($this->connection, $value)\n\t\t\t: pg_escape_string($value);\n\t}", "title": "" }, { "docid": "67a9e7ce5693ef2fd53494356dabb710", "score": "0.6002801", "text": "protected function escape($value): string\n {\n $value = strtr(\n $value,\n [\n '%' => '\\%',\n '_' => '\\_',\n '\\\\' => '\\\\\\\\',\n ]\n );\n\n return '%' . $value . '%';\n }", "title": "" }, { "docid": "0201afcec2601bea7805af2052aa7c16", "score": "0.59715337", "text": "public function escape($value)\n\t{\n\t\tswitch(gettype($value))\n\t\t{\n\t\t\tcase 'NULL':\n\t\t\t\t$value = 'NULL';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'boolean':\n\t\t\t\t$value = $this->escapeBoolean($value);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'integer':\n\t\t\tcase 'double':\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$value = '\\''.$this->escapeStr($value).'\\'';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "0910a8d8c28de2f44de99e6cef74a0ca", "score": "0.5927075", "text": "function dbEscapeArray($array) {\n\treturn(array_map(\"dbEscape\",$array));\n}", "title": "" }, { "docid": "1828492f81beab044169ed87878402a0", "score": "0.58782035", "text": "protected static function _escape($value) {\n if (!is_string($value)) {\n return $value;\n }\n\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }", "title": "" }, { "docid": "e64b9109d6d0cd56d490c7012d32dd39", "score": "0.58727586", "text": "static public function SQLFix( $value )\r\n\t{\r\n\t\treturn @addslashes( $value );\r\n\t}", "title": "" }, { "docid": "ac9ef68c428e5163b76293892d94e9db", "score": "0.58646005", "text": "function escape($v, $html = FALSE) {\n\tglobal $cfg;\n\n\t// Handle arrays recursively\n\tif (is_array($v)) {\n\t\tforeach ($v AS $k => $aval) {\n\t\t\t$v[$k] = escape($aval, $html);\n\t\t}\n\n\t\treturn $v;\n\t}\n\n\treturn tw_isloaded('sql') && !$html\n\t\t\t? mysqli_real_escape_string($cfg['sql']['con'], $v)\n\t\t\t: htmlspecialchars($v, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "e793acf5490f884357fbfb506c692a12", "score": "0.58384585", "text": "protected function _escape($value){\n // если magic_quotes_gpc включена - используем stripslashes\n if (get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n // Если переменная - число, то экранировать её не нужно\n // если нет - то окружем её кавычками, и экранируем\n if (!is_numeric($value) && (strtoupper($value) !== 'NULL') ) {\n $value = \"'\" . mysql_real_escape_string($value) . \"'\";\n }\n return $value;\n }", "title": "" }, { "docid": "81a40e8953138879b2f9fd828a530b37", "score": "0.581148", "text": "public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape($value);\n\n\t\treturn parent::quote_literal($value);\n\t}", "title": "" }, { "docid": "2cbb03b3e8fb659e39f863ab94884749", "score": "0.579396", "text": "public function escape_value($value){\n if($this->real_escape_string_e){\n if($this->magic_quotes_a){\n $value = stripcslashes($value);\n }\n $value = mysql_real_escape_string($value);\n }\n if(!$this->magic_quotes_a){\n $value = addslashes($value);\n }\n return $value;\n }", "title": "" }, { "docid": "029ec34f2db59643e4b281003875d387", "score": "0.5756087", "text": "public function escapeValue($value)\n {\n if ($value instanceof DateTime) {\n return $this->escapeDateTime($value);\n }\n\n if ($value instanceof Expression) {\n return (string)$value;\n }\n\n $type = is_object($value) ? get_class($value) : gettype($value);\n $method = [ $this, 'escape' . ucfirst($type) ];\n\n if (is_callable($method)) {\n return call_user_func($method, $value);\n } else {\n throw new NotScalar('$value has to be scalar data type. ' . gettype($value) . ' given');\n }\n }", "title": "" }, { "docid": "c5a5ddc866e4d23b36873494c3c4011a", "score": "0.5753028", "text": "public function escape_value($value) {\n\n\t\t if($this->real_escape_string) { // PHP v4.3.0 or higher\n\t\t// undo any magic quote effects so mysql_real_escape_string can do the work\n\t\tif($this->magic_quotes_active) { $value = stripslashes($value); }\n\t\t\t$value = mysqli_real_escape_string($this->connection, $value);\n\t\t} else { // before PHP v4.3.0\n\t\t// If magic quotes aren't already on then add slases manually\n\t\tif(!$this->magic_quotes_active) { $value = addslashes($value); }\n\t\t// if magic quotes are active, then teh slashes already exist\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "812f3bf13ca996034e38d197f5ca3780", "score": "0.5730038", "text": "public function quote($value){\n $connection = $this -> connect();\n return pg_escape_literal($value);\n }", "title": "" }, { "docid": "f518a63d1556876cae69a38af2d3e899", "score": "0.5717923", "text": "public function escapeString(string $value): string;", "title": "" }, { "docid": "bca4b55d07a106c164ff9d327f8c5c13", "score": "0.5693134", "text": "public function escape($value, array $options = array()) {\n\t$defaults = array('escape' => true);\n\t$options += $defaults;\n\n\tif ($options['escape'] === false)\n\t return $value;\n\n\tif (is_array($value))\n\t return array_map(array($this, __FUNCTION__), $value);\n\n\treturn htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }", "title": "" }, { "docid": "d1bc949423b54ab5a1c5fdc250d6fa14", "score": "0.5691128", "text": "public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape_literal($value);\n\n\t\treturn parent::quote_literal($value);\n\t}", "title": "" }, { "docid": "ce6192e9110eab44717d9d458581b0da", "score": "0.56901157", "text": "function escape($data){\n\t\tif(is_array($data)){\n\t\t\tforeach((array) $data as $k => $v){\n\t\t\t\tif (is_array($v))\n\t\t\t\t\t$data[$k] = $this->escape($v);\n\t\t\t\telse\n\t\t\t\t\t$data[$k] = mysql_escape_string($v);\n\t\t\t}\n\t\t} else {\n\t\t\t$data = mysql_escape_string($data);\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4b2743551736d3f0726c24d094f8aa05", "score": "0.568617", "text": "public function Escape($value)\n {\n $this->connect();\n if($value===null)\n {\n $value='NULL';\n } else if(!is_numeric($value))\n {\n $value=\"'\".mysqli_real_escape_string(self::$_link, $value).\"'\";\n }\n return $value;\n }", "title": "" }, { "docid": "b6fe7b82393a957863d504df47777251", "score": "0.5684145", "text": "public static function safe($value)\n {\n if (is_array($value)) {\n foreach ($value as &$item) {\n $item = self::safe($item);\n }\n return $value;\n } else {\n if (is_scalar($value)) {\n return htmlspecialchars('' . $value, ENT_QUOTES);\n }\n }\n return \"TYPE ERROR \" . gettype($value);\n }", "title": "" }, { "docid": "938ca8269775291346649a06317ab7ab", "score": "0.56685203", "text": "public function quote($value)\n {\n if (is_array($value)) {\n $result = [];\n foreach ($value as $single) {\n $result[] = $this->quote($single);\n }\n return sprintf(\n '(%s)',\n implode(', ', $result)\n );\n } else {\n return $this->pdo->quote($value);\n }\n }", "title": "" }, { "docid": "babda2ecbdda38456d47227a95e83f1d", "score": "0.5656142", "text": "public function escape(mixed $value): string\n {\n return htmlspecialchars($value, ENT_QUOTES);\n }", "title": "" }, { "docid": "17594327201b4057f386501efbaf20b2", "score": "0.56344676", "text": "public function filter($value) {\n if (!is_scalar($value)) {\n return $value;\n }\n\n return htmlspecialchars($value, ENT_QUOTES);\n }", "title": "" }, { "docid": "d9fa43734471268520ea213a7d3d5a66", "score": "0.56339467", "text": "public function quote( $val )\n {\n if( is_array( $val ) ) {\n foreach( $val as &$v ) {\n $v = $this->quote( $v );\n }\n }\n elseif( isset( $this->pdoObj ) ) {\n $val = $this->pdoObj->quote( $val );\n }\n else {\n $val = \"'\" . addslashes( $val ) . \"'\";\n }\n return $val;\n }", "title": "" }, { "docid": "ed5c0d06a34f8635d44db231d4dd8531", "score": "0.5630035", "text": "public function escapeLikeValue($value, $options = array()) {\n $value = str_replace('\\\\', '\\\\\\\\', $value);\n\n $from = array();\n $to = array();\n if (empty($options['allow_symbol_mask'])) {\n $from[] = '_';\n $to[] = '\\_';\n }\n if (empty($options['allow_string_mask'])) {\n $from[] = '%';\n $to[] = '\\%';\n }\n if ($from) {\n $value = str_replace($from, $to, $value);\n }\n\n if (isset($options['position'])) {\n switch ($options['position']) {\n case 'any':\n $value = '%' . $value . '%';\n break;\n case 'start':\n $value = $value . '%';\n break;\n case 'end':\n $value = '%' . $value;\n break;\n }\n }\n return $value;\n }", "title": "" }, { "docid": "68fa63d6167497f8beca5a301c85936d", "score": "0.562504", "text": "static public function quote($value)\n {\n if ($value instanceof K_Db_Expr) {\n return $value->__toString();\n }\n\n if (is_array($value)) {\n foreach ($value as &$val) {\n $val = self::quote($val);\n }\n return implode(', ', $value);\n }\n\n return self::_quote($value);\n }", "title": "" }, { "docid": "37b6d9da3d8bf912d1272fa2ef55e5de", "score": "0.55800545", "text": "function mysql_escape(&$value)\r\n\t{\r\n\t\t$value = mysql_real_escape_string($value);\r\n\t}", "title": "" }, { "docid": "75b51632a8517fe447c4faebebcb02a2", "score": "0.5577374", "text": "public function setSafeValue($value)\n {\n return htmlspecialchars(stripslashes($value));\n }", "title": "" }, { "docid": "3a0c9f4756d103381c357e6231533c7d", "score": "0.5563639", "text": "function escape( $val ) {\r\n\r\n\t\tif( !$this->connected )\r\n\t\t\t$this->connect();\r\n\r\n return $this->socket->real_escape_string($val);\r\n\r\n\t}", "title": "" }, { "docid": "2de32e40da8a4a3af6a940c4854c14ce", "score": "0.55498606", "text": "protected function quote_escaped()\n {\n }", "title": "" }, { "docid": "8279f8dd1ce631a0bc361a6b6641f990", "score": "0.5547216", "text": "protected function _quote($value) {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "title": "" }, { "docid": "73b474bda2cf66d41310c19fad0db746", "score": "0.55441236", "text": "public function escape($stringValue);", "title": "" }, { "docid": "c589279b4b46736dc1b6431012962cb1", "score": "0.5517652", "text": "public function setEscape($value)\n {\n $this->escape = $value;\n\n return $this;\n }", "title": "" }, { "docid": "9c3002b90f6682115222cbb1f180d021", "score": "0.5512793", "text": "function escape($value) {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}", "title": "" }, { "docid": "3e6b1ed1173a8c84ac790ec6e325776f", "score": "0.55086374", "text": "static protected function _quote($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }", "title": "" }, { "docid": "d2dfaafe5eac7e5189b4a49ed7509b62", "score": "0.5471209", "text": "function InjectSlashes($value) {\r\n if (is_array($value)) {\r\n reset($value);\r\n while (list($key, $val) = each($value))\r\n $value[$key] = InjectSlashes($val);\r\n return $value;\r\n }\r\n return addslashes($value);\r\n}", "title": "" }, { "docid": "6a15c297ae6ec336a363c8e4c954e7ed", "score": "0.5466574", "text": "public static function quote($value)\n {\n return QueryParser::quote($value);\n }", "title": "" }, { "docid": "a1b74fdefde829e7260de2fe5178199a", "score": "0.5460498", "text": "public function insertEscaped(...$field_values);", "title": "" }, { "docid": "6bab5640dbf883b6d5ec8de6741982d3", "score": "0.5440847", "text": "public function pdoQuoteValue($value)\n\t{\n\t\t$pdo = $this->getPdo();\n\t\treturn $pdo->quote($value);\n\t}", "title": "" }, { "docid": "13b8bec4822c7ba15816b2f8df3d0e78", "score": "0.54282993", "text": "public function quote($value) {\n $connection = $this -> connect();\n return \"'\" . $connection -> real_escape_string($value) . \"'\";\n }", "title": "" }, { "docid": "914fe2443f99c179f2564094e6b5a461", "score": "0.54261094", "text": "public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}", "title": "" }, { "docid": "af5d161cd2eb3f8700cdafd4b4a07b4b", "score": "0.5419136", "text": "public static function escapeQuote($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escapeQuote($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn '\"'.self::escape($val).'\"';\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}", "title": "" }, { "docid": "524f51e147d0baff0b70139a1841dfee", "score": "0.5405743", "text": "static public function SQLUnfix( $value )\r\n\t{\r\n\t\treturn @stripslashes( $value );\r\n\t}", "title": "" }, { "docid": "b583c124bb29b29b3a820b6cfbd027e1", "score": "0.5404839", "text": "public function quote($value) {\n\t\treturn $this -> getAdapter() -> quote($value);\n\t}", "title": "" }, { "docid": "2ea2e125585731bd1ec7fe55aaeeefac", "score": "0.5399984", "text": "public function quote($value) {\n $connection = $this->connect();\n return \"'\" . $connection->real_escape_string($value) . \"'\";\n }", "title": "" }, { "docid": "c96dec48fb96c650cafabadb1ae5a198", "score": "0.53882134", "text": "public function filter($value)\n {\n if (!is_scalar($value) AND !is_array($value)) {\n return $value;\n }\n\n $pattern = '#' . preg_quote($this->getSearchSeparator(), '#') . '#';\n return preg_replace($pattern, $this->getReplacementSeparator(), $value);\n }", "title": "" }, { "docid": "46cf7487f0c16b401965f6cd1973907f", "score": "0.5385654", "text": "private function htmlspecialcarfy(&$value) {\r\n $value = htmlspecialchars($value);\r\n }", "title": "" }, { "docid": "4b15f1b82f0e251c51cde3a324583aa4", "score": "0.53725684", "text": "public function _escape($data)\n {\n }", "title": "" }, { "docid": "ea20323352ee1de88e202186e3c61888", "score": "0.53705615", "text": "public function _real_escape($data)\n {\n }", "title": "" }, { "docid": "4ec4e3ffca6eda38eaf4c4840abb9b75", "score": "0.53656894", "text": "public function quote($value) {\n\t\t$connection = $this -> connect();\n\t\treturn \"'\" . $connection -> real_escape_string($value) . \"'\";\n\t}", "title": "" }, { "docid": "5fc55e09cf0f92b6a7e4588925d4516e", "score": "0.5362676", "text": "public function escape($var)\r\n {\r\n if (is_string($var)) {\r\n return parent::escape($var);\r\n }\r\n\r\n if (is_array($var)) {\r\n foreach ($var as $key => $val) {\r\n $var[$key] = $this->escape($val);\r\n }\r\n }\r\n\r\n return $var;\r\n }", "title": "" }, { "docid": "b05aa1c1fb0ee0b79e172607a44c8bd1", "score": "0.5345849", "text": "function escapeString( $value )\r\n\t{\r\n die(\"method \" . __METHOD__ . \" is not implemented\" . Diagnostics::trace());\r\n\t}", "title": "" }, { "docid": "f1829e23549e3859407efbd6bae28293", "score": "0.53422177", "text": "function db_driver_escape($data)\n{\n global $_db;\n\n return '\\'' . str_replace('\\'', '\\'\\'', $data) . '\\'';\n}", "title": "" }, { "docid": "3aed82df6bdc5bc037b3c37e4535a9dc", "score": "0.533461", "text": "public function raw($value)\n {\n return new Query\\Expression ( $value );\n }", "title": "" }, { "docid": "e4bf23bff07bf047d3e354efaf1f8f4c", "score": "0.53336906", "text": "static function quote($value)\n\t{\n\t\treturn \"'\" . str_replace(\"'\", \"\\\\'\", $value) . \"'\";\n\t}", "title": "" }, { "docid": "354737dd048bbd913d3186e42cd03cdf", "score": "0.53303313", "text": "public function escapeIdentifier(string $value): string;", "title": "" }, { "docid": "2e2520ed4a25424c6bf34173d0f56ef0", "score": "0.5327475", "text": "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "title": "" }, { "docid": "2f32312d6e5ed404eb58abc7334e79e4", "score": "0.5319478", "text": "static protected function escape($value, $charset = 'utf-8'){\r\n\t\tif (!is_string($value)){\r\n\t\t\treturn $value;\r\n\t\t}\r\n\t\treturn htmlspecialchars($value, ENT_QUOTES, $charset);\r\n\t}", "title": "" }, { "docid": "3d7ea011622c516d5016643219d7cbed", "score": "0.53170633", "text": "function esc($value)\n{\n return htmlentities($value);\n}", "title": "" }, { "docid": "06f45513e33452050340725cfad05d93", "score": "0.5306259", "text": "public function quote($value)\n\t{\n\t\treturn $this->c->quote($value);\n\t}", "title": "" }, { "docid": "d1bc15987a5a1c3b99ed002c696624cb", "score": "0.5302843", "text": "public function escape()\n {\n return strval($this);\n }", "title": "" }, { "docid": "269f4017d1d86c5acc42fec7ff9c0c84", "score": "0.5298185", "text": "function esc(String $value)\n{\n\t// bring the global db connect object into function\n\tglobal $conn;\n\n\t$val = trim($value); // remove empty space sorrounding string\n\t$data = stripslashes($val);\n\t$data = htmlspecialchars($data);\n\t$val = mysqli_real_escape_string($conn, $value);\n\n\treturn $data;\n}", "title": "" }, { "docid": "96637f9fa13c1d6f6c31758b1dfcdc52", "score": "0.527492", "text": "public function quote($value)\n\t{\n\t\tif ($value === NULL)\n\t\t{\n\t\t\treturn 'NULL';\n\t\t}\n\t\telseif ($value === TRUE)\n\t\t{\n\t\t\treturn \"'1'\";\n\t\t}\n\t\telseif ($value === FALSE)\n\t\t{\n\t\t\treturn \"'0'\";\n\t\t}\n\t\telseif ($value instanceof Expression)\n\t\t{\n\t\t\t// Use the raw expression\n\t\t\treturn $value->value();\n\t\t}\n\t\telseif ($value instanceof Query)\n\t\t{\n\t\t\treturn '('.$value->compile($this).') ';\n\t\t}\n\t\telseif (is_int($value))\n\t\t{\n\t\t\treturn (int) $value;\n\t\t}\n\t\telseif (is_float($value))\n\t\t{\n\t\t\t// Convert to non-locale aware float to prevent possible commas\n\t\t\treturn sprintf('%F', $value);\n\t\t}\n\t\telseif (is_array($value))\n\t\t{\n\t\t\t// Supports MVA attributes\n\t\t\treturn '('.implode(',', $this->quoteArr($value)).')';\n\t\t}\n\n\t\treturn $this->escape($value);\n\t}", "title": "" }, { "docid": "4eb492282b99b276c9d7768dc9f8b618", "score": "0.5272173", "text": "private function quote( )\n {\n if ( @ count( $this->data_buffer ) == 0 )\n return;\n foreach ( $this->data_buffer as $key => $val )\n {\n if ( in_array( $key, $this->string_fields ))\n $this->data_buffer[$key] = @\"'\".mysql_real_escape_string($val,underQL::$db_handle).\"'\";\n else\n $this->data_buffer[$key] = $val;\n }\n }", "title": "" }, { "docid": "0ed07408112787d56b45c26190b3ee85", "score": "0.52562517", "text": "function dbEscape($dados){\n \t\t$conn = dbConnect();\n \t\tif(!is_array($dados)){\n \t\t\t$dados = mysqli_real_escape_string($conn, $dados);\t\t\t//\tInsere contra-barras nas strings\n \t\t}else{\n \t\t\t$array = $dados;\n \t\t\tforeach ($array as $keys => $values) {\n \t\t\t\t$keys \t= mysqli_real_escape_string($conn, $keys);\t\t//\tLimpa as chaves\n \t\t\t\t$values\t= mysqli_real_escape_string($conn, $values);\t//\tLimpa os valores\n \t\t\t\t$dados[$keys] = $values;\t\t\t\t\t\t\t\t//\tConstrói novamente o array\n \t\t\t}\n \t\t}\n \t\tdbClose($conn);\n \t\treturn $dados;\n \t}", "title": "" }, { "docid": "9f33bf42b96f2c9f3737124010206698", "score": "0.5253927", "text": "function dbEscape($dados){\n\t\t\n\t\t$link = dbconectar();\n\t\t\n\t\tif(!is_array($dados))\n\t\t\t$dados = mysqli_real_escape_string($link, $dados);\n\t\telse{\n\t\t\t$arr = $dados;\n\t\t\tforeach($arr as $key=>$value){\n\t\t\t\t$key = mysqli_real_escape_string($link, $key);\n\t\t\t\t$value = mysqli_real_escape_string($link, $value);\n\t\t\t\t\n\t\t\t\t$dados[$key] = $value;\n\t\t\t}\n\t\t}\n\t\tdbdesconectar($link);\n\t\treturn $dados;\n\t}", "title": "" }, { "docid": "de491d1cd79e2db1d16c2fce830aaffa", "score": "0.5240949", "text": "function mysql_escape_mimic($inp)\n {\n if(is_array($inp))\n return array_map(__METHOD__, $inp);\n if(!empty($inp) && is_string($inp)) {\n return str_replace(array('\\\\', \"\\0\", \"\\n\", \"\\r\", \"'\", '\"', \"\\x1a\"), array('\\\\\\\\', '\\\\0', '\\\\n', '\\\\r', \"\\\\'\", '\\\\\"', '\\\\Z'), $inp);\n }\n return $inp;\n }", "title": "" }, { "docid": "369ce77f545de3838a7df89105957cf8", "score": "0.52398217", "text": "function escape ($val, $charset = 'UTF-8') {\n\treturn htmlspecialchars ($val, ENT_QUOTES, $charset);\n}", "title": "" }, { "docid": "c4231e2eb50f37fd82ea86ee1c718c0f", "score": "0.52397037", "text": "function esc(String $value){\n global $conn;\n $val = trim($value); // remove empty space sorrounding string\n $val = mysqli_real_escape_string($conn, $value);\n return $val;\n }", "title": "" }, { "docid": "c903c3398668ab1e42471b7f9cd84f11", "score": "0.5234116", "text": "public function raw($value)\n {\n return new Query\\Expression($value);\n }", "title": "" }, { "docid": "d0cb4ddb97d0251089401cd3e9594bfd", "score": "0.5230726", "text": "protected function _quote ($value)\n {\n if (is_int($value) || is_float($value))\n {\n return $value;\n }\n\n $this->_connect();\n\n return $this->_connection->quote($value);\n }", "title": "" }, { "docid": "473e5cbdb6d85c609360418d207e0050", "score": "0.5229127", "text": "function mysql_escape_mimic($inp) {\r\n if(is_array($inp))\r\n return array_map(__METHOD__, $inp);\r\n if(!empty($inp) && is_string($inp)) {\r\n return str_replace(array('\\\\', \"\\0\", \"\\n\", \"\\r\", \"'\", '\"', \"\\x1a\"), array('\\\\\\\\', '\\\\0', '\\\\n', '\\\\r', \"\\\\'\", '\\\\\"', '\\\\Z'), $inp);\r\n }\r\n return $inp;\r\n }", "title": "" }, { "docid": "a1d1e7d12335e2951c7d7f6c6f297e5a", "score": "0.52155995", "text": "function add_quote($value) {\n\t\treturn '\"' . addslashes($value) . '\"';\n\t}", "title": "" }, { "docid": "7ee9755171b1f6336af4d080e610c78a", "score": "0.52081907", "text": "function quote($value, $type)\n {\n return $this->dbc->quoteSmart($value);\n }", "title": "" }, { "docid": "e49f1f428e1ee84c2ee95acc18e18191", "score": "0.5198514", "text": "function array_sanitize (&$item) {\n\t\tif (is_string ($item)) {\n\t\t\t$item = htmlentities (mysqli_real_escape_string ($GLOBALS['con'], $item),ENT_NOQUOTES,\"utf-8\");\n\t\t}\n\t}", "title": "" }, { "docid": "8e28e686988d445ea7fed9eda1f6c6dd", "score": "0.51975137", "text": "function html_escape($v) {\n\treturn escape($v, TRUE);\n}", "title": "" }, { "docid": "d56273ba56b7641c1be869e7f460f225", "score": "0.5196427", "text": "function esc(String $value){\n\t// bring the global db connect object into function\n\tglobal $connection;\n\t// remove empty space sorrounding string\n\t$val = trim($value); \n\t$val = mysqli_real_escape_string($connection, $value);\n\treturn $val;\n}", "title": "" }, { "docid": "47f1a1d4090483c59723e49a53bd7afe", "score": "0.5196356", "text": "public function escapeField($string);", "title": "" }, { "docid": "f1f3e440531771963b1c7b95fba64c53", "score": "0.5188363", "text": "public function quote($value) {\n $new_value = $this->db->quote($value);\n if (($value!=='' || $value!==NULL) && !$new_value) {\n $value = \"'\" . str_replace(\"'\", \"''\", $value) . \"'\";\n }\n else {\n $value = $new_value;\n }\n return $value;\n }", "title": "" }, { "docid": "767b0929d3c984a7db6ccc46ca28e7ba", "score": "0.5186506", "text": "public function escape($data)\n {\n }", "title": "" }, { "docid": "850b25967c824423f583673a75495521", "score": "0.5184228", "text": "public function quote($value)\n {\n if ($value === null)\n {\n return 'null';\n }\n elseif ($value === true)\n {\n return \"'1'\";\n }\n elseif ($value === false)\n {\n return \"'0'\";\n }\n elseif (is_object($value))\n {\n // 未使用,因为query并没有分开到db_query类去\n //if ($value instanceof db_query)\n //{\n //// Create a sub-query\n //return '('.$value->compile($this).')';\n //}\n if ($value instanceof db_expression)\n {\n // Use a raw expression\n return $value->value();\n }\n else\n {\n // Convert the object to a string\n return $this->quote((string) $value);\n }\n }\n elseif (is_array($value))\n {\n return '('.implode(', ', array_map(array($this, __FUNCTION__), $value)).')';\n }\n elseif (is_int($value))\n {\n return \"'{$value}'\";\n }\n elseif (is_float($value))\n {\n // Convert to non-locale aware float to prevent possible commas\n //return sprintf('%F', $value);\n return $value;\n }\n\n return $this->escape($value);\n }", "title": "" }, { "docid": "1a18e90e8379688e24c19c4da937c92e", "score": "0.5178486", "text": "function db_escape($input)\n{\n\tglobal $db;\n\treturn $db->real_escape_string($input);\n}", "title": "" }, { "docid": "aba34e7e4817b1ac20e094fb891e233d", "score": "0.5176458", "text": "protected function escapeValue(string $value, bool $forceQuote): string\n {\n if (empty($value)) {\n return '';\n }\n\n // Quote the values if\n // it contains white-space or the following characters: \" \\ = : . $\n // or simply force quote is enabled\n if (preg_match('/\\s|\"|\\\\\\\\|=|:|\\.|#|\\$/u', $value) || $forceQuote) {\n // Replace backslashes with even more backslashes so when writing we can have escaped backslashes\n // damn.. that rhymes\n $value = str_replace('\\\\', '\\\\\\\\\\\\\\\\', $value);\n // Wrap the\n $value = '\"' . addcslashes($value, '\"') . '\"';\n }\n\n return $value;\n }", "title": "" }, { "docid": "553c06010fa446d969028dc122e4108a", "score": "0.51681834", "text": "abstract protected function _escape($s);", "title": "" }, { "docid": "d79eb762d0626db9fc9986533f7df48e", "score": "0.5163796", "text": "function checkRealEscapeString($value);", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "fa12d91e9349fafc5fadd2869e01afe7", "score": "0.81538695", "text": "public function show(Resource $resource) {\n //\n }", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "c32c82f3c9f666d7ebd6a4a17c715dde", "score": "0.71033037", "text": "public function show(App\\Resource $resource){\n return $resource;\n }", "title": "" }, { "docid": "63ed4e18ae3ec83b0374866b78fa0cb2", "score": "0.69621414", "text": "public function show(Resources $resources)\n {\n //\n }", "title": "" }, { "docid": "028815e256d04884fbfd1abcd49553a0", "score": "0.6881821", "text": "public function show(ResourceInterface $resource)\n\t{\n if(Auth::user()->can('show', $resource)) {\n $variables = [];\n $variables['extends'] = Config::get('roles::extends');\n $variables['resource'] = $resource;\n $response = View::make('roles::resource.show', $variables);\n } else {\n $errors = new MessageBag();\n $errors->add('error', trans('roles::resource.show permission denied'));\n $response = Redirect::back()->withErrors($errors);\n }\n\n return $response;\n\t}", "title": "" }, { "docid": "72eb4a0f938598778f7d1bb6c9a7c01a", "score": "0.6460539", "text": "public function show(Res $res)\n {\n //\n }", "title": "" }, { "docid": "f9c75fc80c4e08207bdf6a688293bd30", "score": "0.64507407", "text": "public function actionDisplay() {\n global $mainframe, $user;\n if (!$user->isSuperAdmin()) {\n YiiMessage::raseNotice(\"Your account not have permission to visit page\");\n $this->redirect(Router::buildLink(\"cpanel\"));\n }\n $this->addIconToolbar(\"New\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'new')), \"new\");\n $this->addIconToolbar(\"Edit\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'edit')), \"edit\", 1, 1, \"Please select a item from the list to edit\"); \n $this->addIconToolbar(\"Publish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'publish')), \"publish\");\n $this->addIconToolbar(\"Unpublish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'unpublish')), \"unpublish\");\n $this->addIconToolbar(\"Delete\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'remove')), \"trash\", 1, 1, \"Please select a item from the list to Remove\"); \n $this->addBarTitle(\"Resource <small>[tree]</small>\", \"user\"); \n \n $model = Resource::getInstance();\n $items = $model->getItems();\n \n $this->render('default', array('items'=>$items));\n }", "title": "" }, { "docid": "9a30795d980babc94eaea5f358f9a346", "score": "0.6348493", "text": "public function view($id = null) {\n $resource = $this->resources[$id];\n $this->set(array('resource' => $resource, '_serialize' => 'resource'));\n }", "title": "" }, { "docid": "2fcca60eabc9fa263815bdb0af23227b", "score": "0.6310235", "text": "public function show($title)\n {\n $searchTerm = DB::table('searches')->where('query', '* '.$title)->first();\n if (isset($searchTerm)) $accesses = $searchTerm->accesses;\n $resource = Resource::where('title', '=', $title)->first();\n if (isset($resource)){\n return view('resources.show')\n ->with('title', $resource->title)\n ->with('body', $resource->body)\n ->with('accesses', $accesses); \n }\n else return \"resource not found\";\n }", "title": "" }, { "docid": "d88de1aa779e246b7fddebd9a98ba96d", "score": "0.6300392", "text": "public function resource($resource);", "title": "" }, { "docid": "5ff14c79a9b59fe32898fb8081a44d38", "score": "0.62861", "text": "public function show($id)\n {\n //abort('404');\n //$resource = Resource::find($id);\n\n // To throw an exception\n //$resource = Resource::findOrFail($id);\n $resource = Resource::find($id);\n if ( ! $resource) {\n // I think findOPrFail is equivalent\n abort(404); # @TODO Check what happens here and compare with the findOrFail\n }\n //dd($resource);\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "3b18817b82995fa8322e3e648666dc69", "score": "0.62845415", "text": "public function show() {\n\t\tstatus_header(200);\n\t\t\n\t\tparent::show();\n\t}", "title": "" }, { "docid": "ba5a2c7902e0156425e3dea1470df9a3", "score": "0.6231386", "text": "public function show($id)\n {\n return \"This is show controller resource showing ID: \". $id;\n }", "title": "" }, { "docid": "9f4baef36bbd297dd8826a3cf4c65825", "score": "0.6228845", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n $model = $resource;\n\n return view('backend.resources.show', compact('resource', 'model'));\n }", "title": "" }, { "docid": "6bca27d0e9ea5eb6ef16196ace65c00a", "score": "0.6185019", "text": "public function show($resource) {\n $id = $this->getUserIdByResource($resource);\n return $id ? $this->user->find($id) : $this->noSuchUserResponse();\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155763", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "7ee4932d24e9f896454c46b5725bca09", "score": "0.61360765", "text": "public function resourceAction ()\n { \n $this->setRefer(); // Set auth referer\n \n $this->view->params = $this->_request->getParams(); // Pass params to view\n \n $resourceid = $this->_request->getParam('id'); // Get Article ID from params\n \n if (isset($resourceid)) : // If resource ID set continue\n \n\t\t // Setup Registry\n \t $registry = Zend_Registry::getInstance();\n \t\n \t // Get Article data\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('r' => 'resources'))\n\t\t\t\t \t\t ->join(array('c' => 'resources_categories'),'r.resource_category = c.rcat_id',array('c.rcat_title'))\n\t\t\t\t \t\t ->join(array('t' => 'resources_types'),'t.rtype_id = r.resource_type')\n\t\t\t\t \t\t ->join(array('b' => 'resources_brands'),'b.rbrand_id = r.resource_brand',array('b.rbrand_title','b.rbrand_id'))\n\t\t\t\t \t\t ->where('r.resource_status = ?','published')\n\t\t\t\t \t \t ->where('r.resource_id = ?',$resourceid)\n \t\t\t\t\t ->limit(1,0);\n\n \t // Set the data array\n\t\t $resourceArray = $registry->db->fetchall($select);\n\t\t\n\t\t if (count($resourceArray)) : // If resource exists\n\n // Pass Resource to View \n\t\t $this->view->resourceArray = $resourceArray[0];\n \n else : // Else redirect to 404 Error\n \n \t $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n \n $this->view->comment = NULL; // Reset the comment value\n \n if($this->_request->isPost()) // If form has been posted\n {\n if ($this->view->authenticated) // The user is authenticated\n {\n $options = array();\n\n $filters = array(\n \t\t\t'content' => array('StringTrim', 'StripTags')\n );\n\n $validators = array(\n 'content' => array(\n \t\t'presence' => 'required',\n \t\t'NotEmpty',\n \t\t\t'messages' => array(array( Zend_Validate_NotEmpty::IS_EMPTY => \"You did not enter a comment\"))\n ),\n );\n\n $input = new Zend_Filter_Input($filters, $validators, $_POST, $options);\n \n // setup database\n \t $registry = Zend_Registry::getInstance();\n\n if ($input->isValid()) // If the form input validates\n {\n // Set moderation variable\n if($this->view->resourceArray['resource_moderate'] == 'Y') :\n $approved = 'N';\n else :\n $approved = 'Y';\n endif;\n \n // Create our data array\n $data = array(\n \t'comment_type' => 'R',\n \t\t\t\t\t\t'comment_slave' => $this->view->resourceArray['resource_id'],\n \t\t\t\t\t\t'comment_approved' => $approved,\n \t\t\t'comment_content'\t=> $input->content,\n \t\t\t'comment_user'\t => $this->view->user->user_id,\n \t\t\t'comment_date'\t\t=> new Zend_Db_Expr('NOW()')\n );\n\n // Insert data into database\n $registry->db->insert('comments', $data);\n \n } else { // If input is invalid\n $this->view->messages = $input->getMessages(); // Pass Messages to view\n $this->view->comment = $_POST['content']; // Set value of message to match input\n }\n }\n }\n \n // Get Comments\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('c' => 'comments'),array('c.*'))\n\t\t\t\t \t\t ->join(array('u' => 'users'),'c.comment_user = u.user_id',array('u.user_alias','u.user_role'))\n\t\t\t\t \t\t ->where('comment_approved = ?','Y')\n\t\t\t\t \t\t ->where('comment_type = ?','R')\n\t\t\t\t \t\t ->where('comment_slave = ?',$resourceid)\n \t\t\t\t\t ->order('c.comment_date ASC');\n\n \t // Pass the comments to view\n\t\t $this->view->commentsArray = $registry->db->fetchall($select);\n\t\t\n\t\telse : // Else if Article ID not set redirect to 404 Error\n \n $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n }", "title": "" }, { "docid": "947c1c8f23ecc67503ddd9aaa8d0c053", "score": "0.6131235", "text": "public abstract function display(Response $response);", "title": "" }, { "docid": "d48eea5127e3c179d902a8be0b6f8468", "score": "0.6094903", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n if (is_null($resource)) {\n return redirect()->route('resources.index');\n }\n return view(\n 'resources.show',\n ['resource' => $resource]\n );\n }", "title": "" }, { "docid": "15870f022600bd008a2dda714833e3a8", "score": "0.60690975", "text": "public function display() {\n\n\t\t$this->displayRequest();\n\t\tprint '<br /><br />';\n\t\t$this->displayResponse();\n\t}", "title": "" }, { "docid": "2c4681f3d2ea72046a4a8fbabafd2fda", "score": "0.60642564", "text": "public function viewResource($slug)\n {\n if ($resource = Resource::findBySlug($slug)) {\n // No se utiliza el metodo each() por que se trata de un solo recurso, no es necesario hacer un recorrido.\n $resource->category;\n $resource->tags;\n $resource->book;\n\n $ay_tags = $resource->tags;\n\n $actual_link = 'http://'.$_SERVER['HTTP_HOST'].'/resources/'.$slug;\n\n return view('front.resource')\n ->with('resource', $resource)\n ->with('ay_tags', $ay_tags)\n ->with('actual_link', $actual_link);\n }\n else {\n abort(404);\n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "d091fe2536049092c575a390aa36ed46", "score": "0.5972", "text": "public function display()\n {\n switch ($this->platform->getPost('section')) {\n case 'download':\n $this->downloadAction();\n break;\n \n case 'remove_backup':\n $this->deleteBackupsAction();\n break;\n \n case 'backup_note':\n $this->updateBackupNoteAction();\n break;\n \n case 'restore_db':\n $this->restoreDbAction();\n break;\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "53013b6882d008888ea7afca1b751f49", "score": "0.5934595", "text": "function render_individual_resource_page($v, $url){\n\tglobal $wpdb;\n\n\t// specify the template file to use\n\t$v->template = 'resource';\n\n\t// include the helper\n\trequire_once('helper.php');\n\n\t// create a resource object\n\t$resource = new en_Resource();\n\n\t// determine the slug, load it into the object\n\t$uri = $_SERVER['REQUEST_URI'];\n\t$slug = substr($uri, 11);\n\t$end = strrpos($slug, '/');\n\t$end = ($end ? $end : strrpos($slug, '.'));\n\tif($end){\n\t\t$slug = substr($slug, 0, $end);\n\t}\n\t$resource->slug = $slug;\n\n\t// load the resource data from the database\n\t$resource->load();\n\n\t// check that such a resource exists\n\t$v->body = '';\n\t$v->title = 'No resource Found';\n\tif($resource->name != '' && $resource->status == 'publish'){\n\t\t// load the name\n\t\t$v->title = $resource->name;\n\t}\n\n\t$_SESSION['en_resource'] = $resource;\n}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0d00cd39f55015604f557b3b7ebf1eca", "score": "0.5876515", "text": "public function show($id)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\treturn view('resources.show')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "62de9bb9e8014b878862d1b3e9dfd27c", "score": "0.5865432", "text": "public function showResourcesPage()\n {\n $mTitle = $this->_mTitle;\n $title = trans(\"admin.resources\");\n $data = ['mTitle', 'title'];\n return view('home.resources')\n ->with(compact($data)); \n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.5860501", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "e1c49860e31b5bc5d738e44a442665de", "score": "0.58473253", "text": "public function displayAction()\n\t{\t// Look up policy with the given url parameters\n\t\t$policy = $this->db->getPolicy($this->_getParam('page'));\n\t\t$this->view->policy = $policy;\n\t}", "title": "" }, { "docid": "5a5e25617e1019b0143435d1dcee143b", "score": "0.58304006", "text": "public function edit(Resource $resource) {\n $resource = Resource::find($resource->id);\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "4de642a6f69c75724da5f78bd193b43e", "score": "0.57721317", "text": "public function display($name)\n {\n echo $this->fetch($name);\n }", "title": "" }, { "docid": "34a8fc606e2e5031dcfc0be2c4eda232", "score": "0.5769309", "text": "function resource($resource_id)\n\t{\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t# Check that it exists (in case of URL editing in the browser)\n\t\tif ($q -> num_rows() == 0) \n\t\t{ \n\t\t\t$data['title'] = \"No such resource\"; $data['heading'] = \"Resource not found\"; \n\t\t\t$data['error'] = \"There is no resource with the ID $resource_id. Tough mazoomas.\n\t\t\t\t\t\t\t\tPlease choose another resource to edit.\"; \n\t\t\t$data['message'] = \"\";\n\t\t\t$this -> load -> view('resourcedb/database_error_view', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resource_title = $q -> row() -> title;\n\t\t\t$data['title'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['heading'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['resource__id'] = $resource_id; \n\t\t\t\n\t\t\t# Get the user ID to save as record editor\n\t\t\t$user_id = $this->ion_auth->user()->row()-> id;\n\t\t\t# Set messages for the view file\n\t\t\t$data['title'] = 'Global health repository: edit resource';\n\t\t\t$data['heading'] = 'Edit resource';\n\t\t\t# Set user message and error as blanks, to prevent PHP warning if one or t'other isn't set\n\t\t\t$data['message'] = \"\"; $data['error'] = \"\";\n\t\t\t\n\t\t\t# Populate form elements.\n\t\t\t# Get full resource record first \n\t\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\n\t\t\t# -- SUBJECTS ---\n\t\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t\t# by existing resources\n\t\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t\t$old_subjects_ary = array();\n\t\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t\t}\n\t\t\t# Pass currently attached subjects to the view page\n\t\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\t\t\n\t\t\t\n\t\t\t# -- ORIGINS --\n\t\t\t$data['origins_query'] = $this -> ResourceDB_model -> get_origins();\n\n\t\t\t# -- RESOURCE TYPES ---\n\t\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types();\n\t\t\t\n\t\t\t# -- TAGS --\n\t\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t\t$old_tags_ary = array();\n\t\t\tforeach ($tags_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t\t}\n\t\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\t\n\t\t\t# ==== FORM VALIDATION ======\n\t\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t\t# validation rules, hence a rul for all elements below. See CI Forum thread at:\n\t\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t\t# sqare brackets, as just checking for the title existing would always \n\t\t\t# return true - we need to check that the edited title exists or not. \n\t\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean|callback_title_check[$resource_title]\");\n\t\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\t\n\t\t\t\n\t\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t\t# (re)populate with user data\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t\t$this -> load -> view('resourcedb/editview', $data);\n\n\t\t\t}\n\t\t\t# If form validates, update record\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Get form values for fields in RESOURCE table\n\t\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t\t# DATETIME data type\n\t\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\t\n\t\t\t\t$record_data = array (\n\t\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t\t'creator' => $_POST['creator'], \n\t\t\t\t\t\t\t\t'source' => $_POST['source'], \n\t\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t\t'metadata_created' => $now, \n\t\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t\t'notes' => $_POST['notes']\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\n\t\t\t\t# Run update query in model\n\t\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\t\n\t\t\t\t# TAGS\n\t\t\t\t# First, get tag(s) user's inserted. Get cleaned field text...\n\t\t\t\t$tags = $this -> security -> xss_clean($_POST['tags']);\n\t\t\t\t# ...then split string by the semicolon delimiter...\n\t\t\t\t$tags_ary = explode(';', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from reource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> keyword_num;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t\t\n\t\t\t\t# SUBJECTS\n\t\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t\t# empty array so as not to generate a runtime error\n\t\t\t\tif (isset($_POST['subjects']))\n\t\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\t\telse\n\t\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t\t{\n\t\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t# Set messages etc for the result page\n\t\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t\t# Load results page with data array\n\t\t\t\t$this->load->view('resourcedb/edit_result_view', $data);\n\t\t\t} // end if validates\n\t\t} // end else \n\t\t\n\t}", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "428d435450a183e9f2b1cf67fe4ca1ee", "score": "0.5746211", "text": "public function showAction($id)\n {\n }", "title": "" }, { "docid": "25fef2b3e221da4874ce751e7620e1b8", "score": "0.57376534", "text": "public function show($id)\n {\t\n\t\t//\n \n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "dbfb7ac40503919a18ba680b317c5bcf", "score": "0.57300025", "text": "function show()\r\n\t{\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "6ec9b736dc660b1af85b3d3e6b5c2891", "score": "0.5728069", "text": "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FklFranklinBundle:Intervention')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Intervention entity.');\n }\n\n return $this->render('FklFranklinBundle:Intervention:show.html.twig', array(\n 'entity' => $entity,\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": "c422e600117f23ecb3e910d02cd71439", "score": "0.5719182", "text": "public function show($id)\n\t{ \n\t\t//\n\t}", "title": "" }, { "docid": "7464e9c5980c37f2e71c965980844f2f", "score": "0.57157016", "text": "public function display() {\r\n \r\n function pec_display($pecio, $template_path_c) {\r\n \tinclude($template_path_c);\r\n }\r\n \r\n \t// here we need to get the canonicalized template path, so that we can include it with `include()`\r\n $template_path_c = $this->template_resource->get('template')->get_directory_path();\r\n \r\n // that's the \"normal\" path to the template directory\r\n $template_path = $this->template_resource->get('template')->get_directory_path(false);\r\n \r\n $this->template_resource->set('template_path', $template_path);\r\n $this->template_resource->set('template_path_c', $template_path_c);\r\n \r\n $pecio = $this->template_resource;\r\n pec_display($pecio, $template_path_c . $this->template_file);\r\n }", "title": "" }, { "docid": "39d7fb3e638fbdb7af4616a9e66a7c1e", "score": "0.571459", "text": "public function display() {\n $id = $_GET['value'];\n $product = $this->productManager->findOne($id);\n $page = 'product';\n require('./View/default.php');\n }", "title": "" }, { "docid": "e5b68899adbea6a73109d8e4dd1a0aad", "score": "0.5703109", "text": "public function showAction() {\r\n // Load View template\r\n $actorModel = new ActorModel(\"actors\");\r\n $actor = $actorModel->getActor(\"id\");\r\n include CURR_VIEW_PATH . \"actors\". DS . \"show.php\";\r\n // actorDB/application/views/actors/show.php;\r\n }", "title": "" }, { "docid": "fa1c2eb41c95d94a4e3d5fbf93d1fb39", "score": "0.5700314", "text": "public function show($id)\n\t{\n\t\t$user = Sentry::getUser();\n\t\t$request = $user->requests()->with('file')->where('id', $id)->first();\n\n\t\tif (! $request) return App::abort(404, \"Request resource [$id] not found.\");\n\n\t\t$file = $request->file()->first();\n\n\t\t$this->layout->content = View::make('my.requests.show')\n\t\t\t\t\t\t\t\t\t->with('user', $user)\n\t\t\t\t\t\t\t\t\t->with('request', $request)\n\t\t\t\t\t\t\t\t\t->with('file', $file);\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "7580b6a8a70ffcf0c85b9c5fd2d164c8", "score": "0.56878597", "text": "public function show($id)\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "8fb8368b4d32374cf0802714864ca045", "score": "0.5686805", "text": "public function show(Spec $spec)\n {\n //\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
33adab5f81b710a32f09f78237934d87
the main index page for administrators
[ { "docid": "ace1431b808acb93e03761f1f61d6e74", "score": "0.0", "text": "public function index() {\r\n\t\t$credit = Smsir::credit();\r\n\t\t$smsir_logs = SmsirLogs::orderBy('id','DESC')->paginate(config('smsir.in-page'));\r\n\t\treturn view('smsir::index',compact('credit','smsir_logs'));\r\n\t}", "title": "" } ]
[ { "docid": "29c13eb938529121fb95b68e6df3087e", "score": "0.8228007", "text": "public function action_index()\n\t{\n\t\tif ( ! Auth::instance()->logged_in('admin'))\n\t\t\tthrow new HTTP_Exception_403();\n\t\t\n\t\t// show admin page\n\t\t$companies = ORM::factory('company')->find_all();\n\t\t$this->template->content = View::factory('admin/admin')->bind('companies', $companies);\n\t\t\n\t}", "title": "" }, { "docid": "8fd1c98c23a44303e53b893c17b10385", "score": "0.81703895", "text": "public function indexAction()\n {\n $this->view->title = 'Li-No | Admin Index';\n $this->_forward('login', 'auth');\n }", "title": "" }, { "docid": "f426fe20e95da51098f36ddde119b9d6", "score": "0.8139002", "text": "public function action_index() {\r\n\r\n\t$main_content = View::forge(\"account/simpleauth\");\r\n $main_sidebar = View::forge(\"vlog/sidebar\");\r\n\r\n\t$this->template->page_content = $main_content;\r\n $this->template->page_sidebar = $main_sidebar;\r\n }", "title": "" }, { "docid": "d040b53df3fa8724cbcb4f90efd2931a", "score": "0.8117521", "text": "public function actionAdministration()\n\t{\n\t $this->render('index');\n\t}", "title": "" }, { "docid": "0c237a75e991c5e4655ee2646c84985a", "score": "0.8032407", "text": "public function action_index()\n\t{\n\t\tglobal $context, $modSettings;\n\n\t\t// Make sure the administrator has a valid session...\n\t\tvalidateSession();\n\n\t\t// Load the language and templates....\n\t\tTxt::load('Admin');\n\t\ttheme()->getTemplates()->load('Admin');\n\t\tloadCSSFile('admin.css');\n\t\tloadJavascriptFile('admin.js', array(), 'admin_script');\n\n\t\t// The Admin functions require Jquery UI ....\n\t\t$modSettings['jquery_include_ui'] = true;\n\n\t\t// No indexing evil stuff.\n\t\t$context['robot_no_index'] = true;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\n\t\t// Actually create the menu!\n\t\t$admin_include_data = $this->loadMenu();\n\t\t$this->buildLinktree($admin_include_data);\n\n\t\tcallMenu($admin_include_data);\n\t}", "title": "" }, { "docid": "720fba36c86ca843107255583cc68f22", "score": "0.802659", "text": "public function admin_index() {\n\n\t\t\t/*get all data from table \"modules\"*/\n\t\t\t$modules=$this->Module->find(\"all\");\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Gestion\");\n\t\t\t$this->set(\"legend\", \"Modules manager\");\n\t\t\t$this->set(\"modules\", $modules);\n\t\t\t}", "title": "" }, { "docid": "0633c8c982761fedd0ac9e8dd67d5732", "score": "0.80146056", "text": "public function indexAction()\r\n {\r\n echo 'User admin index';\r\n }", "title": "" }, { "docid": "f740f4a1e42d683ee4143d3169e4eede", "score": "0.79980665", "text": "public function index()\n\t{\n\t\tView::render('admin');\n\t}", "title": "" }, { "docid": "b93091d26281c8e9af6bd6fd5b46bd27", "score": "0.79376084", "text": "public function index()\n\t{\n\t\t$this->template\n\t\t\t->title('')\n\t\t\t->build('admin/index');\n\t}", "title": "" }, { "docid": "3ab141e3224232775b7f6ee2b30066f3", "score": "0.7920242", "text": "public function index()\n {\n if($_SESSION['Auth']['User']['typeUser'] == 'candidat')\n $this->redirect(['controller'=>'candidat','action' => 'accueil']);\n if($_SESSION['Auth']['User']['typeUser'] == 'chercheur')\n $this->redirect(['controller'=>'chercheur','action' => 'accueil']);\n\n $this->viewBuilder()->layout('adminLayout');\n\n $administrateur = $this->paginate($this->Administrateur);\n\n $this->set(compact('administrateur'));\n $this->set('_serialize', ['administrateur']);\n }", "title": "" }, { "docid": "07f9d46aa6c49c9a84bb6cf6d97bc8f7", "score": "0.789417", "text": "public function admin_index()\n {\n $this->set('title_for_layout', __('Dashboard'));\n\n $user = $this->Session->read('Auth.User');\n if (isset($user) === false) {\n $this->redirect(\n array(\n 'controller' => 'users',\n 'action' => 'login',\n 'admin' => true,\n )\n );\n }\n\n $this->SiStayConnected->readData();\n $this->set(compact('user'));\n\n }", "title": "" }, { "docid": "9f659059d8990ad0f0367e9c1457e3e4", "score": "0.78760076", "text": "public function indexAction(){\n \t\t\n \t\tif(!$this->_acl->isAllowed('skip_maintenance'))\n \t\t header('Location: /index.php/lynx/login');\n \t\telse\n \t\t $this->_template->content = 'Welcome!';\n \t\t \n \t\t$this->_template->title('Admin');\n \t}", "title": "" }, { "docid": "7bb1e089ba2c6988ae33f19adaf21df5", "score": "0.7867195", "text": "public function admin_index() {\n\t\t$this->layout=\"admindefault\";\n\t\t$this->adminsessionchecked();\n\t\t$this->User->recursive = 0;\n\t\t$this->Paginator->settings=array(\n\t\t\t'conditions'=>array(\n\t\t\t\t'User.is_deleted'=>'0'\n\t\t\t)\n\t\t);\n\t\t$this->set('users', $this->Paginator->paginate());\n\t\t//$this->set('allowedimage',$this->allowedimageType);\n\t}", "title": "" }, { "docid": "96b47e6ccfe1e454145282b0f5408439", "score": "0.78655934", "text": "public function index()\n {\n $this->data['noCabinetOrAdmin'] = true;\n\n $this->isUser();\n\n $this->render('index');\n }", "title": "" }, { "docid": "81af066b66f5dc7297051bc5d3e9b4b4", "score": "0.7818908", "text": "public function index(){\n\t\t$this->Layout('Management');\n\t\t\n\t}", "title": "" }, { "docid": "08e8bf38e8868d8eb849c009e40cae23", "score": "0.78119063", "text": "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "title": "" }, { "docid": "0f10cf1feb9501806314f79ef1724bd3", "score": "0.7764434", "text": "public function index()\n {\n $number_of_items = $this->calculate->getTotalOfItemsAdmin();\n if (null != $this->request->ifParameter(\"id\")) {\n $items_current_page = $this->request->getParameter(\"id\");\n } else {\n $items_current_page = 1;\n }\n $items = $this->item->getItemsForAdmin($items_current_page);\n $page_previous_items = $items_current_page - 1;\n $page_next_items = $items_current_page + 1;\n $number_of_items_pages = $this->calculate->getNumberOfPagesOfExtAdmin();\n $this->generateadminView(array(\n 'items' => $items,\n 'number_of_items' => $number_of_items,\n 'items_current_page' => $items_current_page,\n 'page_previous_items' => $page_previous_items,\n 'page_next_items' => $page_next_items,\n 'number_of_items_pages' => $number_of_items_pages\n ));\n }", "title": "" }, { "docid": "ed253801dc6a9d1eb96d361e725faea7", "score": "0.77633446", "text": "public function actionIndex() {\n // renders the view file 'protected/views/site/index.php'\n // using the default layout 'protected/views/layouts/main.php'\n //echo \"admin/admin/index\";exit;\n //var_dump(Yii::app()->user->isRoot);exit;\n $this->render('index');\n }", "title": "" }, { "docid": "b2a971d0b4fb5cffdb8f5c946e729fcd", "score": "0.77551097", "text": "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "title": "" }, { "docid": "78d83605d158176e1f4ea188da0c206d", "score": "0.7729362", "text": "function index()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //login check\n $this->__commonClient_LoggedInCheck();\n\n //uri - action segment\n $action = $this->uri->segment(3);\n\n //default page titles\n $this->data['vars']['main_title'] = '';\n $this->data['vars']['main_title_icon'] = '';\n\n $this->data['vars']['sub_title'] = $this->data['lang']['lang_users'];\n $this->data['vars']['sub_title_icon'] = '<i class=\"icon-group\"></i>';\n\n //re-route to correct method\n switch ($action) {\n\n case 'view':\n $this->__clientUsers();\n break;\n\n case 'add-user':\n $this->__addUser();\n break;\n\n case 'edit-modal':\n $this->__editUserModal();\n break;\n\n default:\n $this->__clientUsers();\n\n }\n\n //load view\n $this->__flmView('admin/main');\n\n }", "title": "" }, { "docid": "e05599fab9c6de9a131a62033dddbf9b", "score": "0.7700123", "text": "function indexAction(){\n \n $this->_templateObj->loadTemplate();\n $this->_viewObj->title = \"<title>Tadmin - index/index </title>\";\n $this->_viewObj->render('index/index', true);\n\n }", "title": "" }, { "docid": "e81c34492d2bdfca8070c073f08266d6", "score": "0.7693896", "text": "public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}", "title": "" }, { "docid": "b0da8c7862dac4828a3b5fd47649d5ac", "score": "0.7689568", "text": "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\tif (Yii::app()->user->isGuest) {\n\t\t\t$this->render('index');\n\t\t} else {\n\t\t\t$this->redirect($this->createUrl('descargas/admin'));\n\t\t}\n\t}", "title": "" }, { "docid": "d939f6d55e17720fbb31e16dce362a63", "score": "0.7679671", "text": "public function index()\n {\n $this->global['pageTitle'] = '系统管理';\n\n $this->userListing();\n }", "title": "" }, { "docid": "a85354e8469daa2f18149dc043bf530c", "score": "0.7679115", "text": "public function getIndexAdmin()\n {\n if (!$this->di->get(\"session\")->has(\"account\")) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $title = \"Admin\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n $user = new User();\n\n $username = $this->di->get(\"session\")->get(\"account\");\n $user->username = $username;\n $user->setDb($this->di->get(\"db\"));\n $user->find(\"username\", $username);\n\n $allUsers = new User();\n $allUsers->setDb($this->di->get(\"db\"));\n\n $data = [\n \"users\" => $allUsers->findAll(),\n ];\n\n $view->add(\"user/adminIndex\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }", "title": "" }, { "docid": "481ddde181cbc20b17c772aba59d8f36", "score": "0.76764053", "text": "function index() {\n\t\t\tif (!isset($_SESSION['admin'])) {\n\t\t\t\tView::render(\"admin\" . DS . \"login\");\n\t\t\t}else {\n\t\t\t\theader(\"Location: ../contenido/principal/\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4122e23c3bf1521f0f19b23c2c995e57", "score": "0.76639026", "text": "function admin_index()\n\t{\n\t \n\t}", "title": "" }, { "docid": "55093e90cb0014c85d99590baf9c6837", "score": "0.7661649", "text": "public function page_default_administration()\n\t{\n\t\tFsb::$tpl->set_file('adm_index.html');\n\n\t\t// Les 5 derniers logs administratifs\n\t\t$logs = Log::read(Log::ADMIN, 5);\n\t\tforeach ($logs['rows'] AS $log)\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('log', array(\n\t\t\t\t'STR' =>\t$log['errstr'],\n\t\t\t\t'INFO' =>\tsprintf(Fsb::$session->lang('adm_list_log_info'), htmlspecialchars($log['u_nickname']), Fsb::$session->print_date($log['log_time'])),\n\t\t\t));\n\t\t}\n\n\t\t// On affiche tous les comptes ?\n\t\t$show_all = (Http::request('show_all')) ? true : false;\n\n\t\t// Liste des comptes en attente de validation\n\t\t$sql = 'SELECT u_id, u_nickname, u_joined, u_register_ip\n\t\t\t\tFROM ' . SQL_PREFIX . 'users\n\t\t\t\tWHERE u_activated = 0\n\t\t\t\t\tAND u_confirm_hash = \\'.\\'\n\t\t\t\t\tAND u_id <> ' . VISITOR_ID . '\n\t\t\t\tORDER BY u_joined DESC\n\t\t\t\t' . (($show_all) ? '' : 'LIMIT 5');\n\t\t$result = Fsb::$db->query($sql);\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('wait', array(\n\t\t\t\t'NICKNAME' =>\t\thtmlspecialchars($row['u_nickname']),\n\t\t\t\t'JOINED_IP' =>\t\tsprintf(Fsb::$session->lang('adm_joined_ip'), Fsb::$session->print_date($row['u_joined']), $row['u_register_ip']),\n\n\t\t\t\t'U_EDIT' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=user&amp;id=' . $row['u_id']),\n\t\t\t\t'U_VALIDATE' =>\t\tsid('index.' . PHPEXT . '?mode=validate&amp;id=' . $row['u_id']),\n\t\t\t));\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// Liste des membres en ligne\n\t\t$sql = 'SELECT s.s_id, s.s_ip, s.s_page, s.s_user_agent, u.u_nickname, u.u_color, u.u_activate_hidden, b.bot_id, b.bot_name\n\t\t\tFROM ' . SQL_PREFIX . 'sessions s\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\tON u.u_id = s.s_id\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'bots b\n\t\t\t\tON s.s_bot = b.bot_id\n\t\t\tWHERE s.s_time > ' . intval(CURRENT_TIME - 300) . '\n\t\t\tORDER BY u.u_auth DESC, u.u_nickname, s.s_id';\n\t\t$result = Fsb::$db->query($sql);\n\t\t$id_array = array();\n\t\t$ip_array = array();\n\t\t$f_idx = $t_idx = $p_idx = array();\n\t\t$logged = array('users' => array(), 'visitors' => array());\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!is_null($row['bot_id']) || $row['s_id'] == VISITOR_ID)\n\t\t\t{\n\t\t\t\tif (in_array($row['s_ip'], $ip_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$ip_array[] = $row['s_ip'];\n\t\t\t\t$type = 'visitors';\n\n\t\t\t\t// Les bots ont leur propre couleur\n\t\t\t\tif (!is_null($row['bot_id']))\n\t\t\t\t{\n\t\t\t\t\t$row['u_color'] = 'class=\"bot\"';\n\t\t\t\t\t$row['u_nickname'] = $row['bot_name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (in_array($row['s_id'], $id_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$id_array[] = $row['s_id'];\n\t\t\t\t$type = 'users';\n\t\t\t}\n\n\t\t\t// Position du membre sur le forum\n\t\t\t$id = null;\n\t\t\t$method = 'forums';\n\t\t\tif (strpos($row['s_page'], 'admin/') !== false)\n\t\t\t{\n\t\t\t\t$location = Fsb::$session->lang('adm_location_adm');\n\t\t\t\t$url = 'admin/index.' . PHPEXT;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$page = basename($row['s_page']);\n\t\t\t\t$url = '';\n\t\t\t\t$location = '';\n\t\t\t\tif (preg_match('#^index\\.' . PHPEXT . '\\?p=([a-z0-9_]+)(&.*?)*$#', $page, $match) || preg_match('#^(forum|topic|sujet)-([0-9]+)-([0-9]+)\\.html$#i', $page, $match))\n\t\t\t\t{\n\t\t\t\t\t$url = $match[0];\n\t\t\t\t\tswitch ($match[1])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'forum' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_forum');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreg_match('#f_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\tcase 'sujet' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_topic');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t\t$t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (preg_match('#t_id=([0-9]+)#', $page, $match))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tpreg_match('#p_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'post' :\n\t\t\t\t\t\t\tpreg_match('#mode=([a-z_]+)#', $page, $mode);\n\t\t\t\t\t\t\tpreg_match('#id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\tswitch ($mode[1])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_new');\n\t\t\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'reply' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_reply');\n\t\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_edit');\n\t\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'mp' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_mp_write');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_add' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event_edit');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tif (Fsb::$session->lang('adm_location_' . $match[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_' . $match[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$location)\n\t\t\t\t{\n\t\t\t\t\t$location = Fsb::$session->lang('adm_location_index');\n\t\t\t\t\t$url = 'index.' . PHPEXT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$logged[$type][] = array(\n\t\t\t\t'nickname' =>\t\tHtml::nickname($row['u_nickname'], $row['s_id'], $row['u_color']),\n\t\t\t\t'agent' =>\t\t\t$row['s_user_agent'],\n\t\t\t\t'ip' =>\t\t\t\t$row['s_ip'],\n\t\t\t\t'location' =>\t\t$location,\n\t\t\t\t'url' =>\t\t\tsid(ROOT . $url),\n\t\t\t\t'method' =>\t\t\t$method,\n\t\t\t\t'id' =>\t\t\t\t$id,\n\t\t\t);\n\n\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// On recupere une liste des forums pour connaitre la position du membre sur le forum\n\t\t$forums = array();\n\t\tif ($f_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE f.f_id IN (' . implode(', ', $f_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$forums = Fsb::$db->rows($result, 'assoc', 'f_id');\n\t\t}\n\n\t\t// On recupere une liste des sujets pour connaitre la position du membre sur le forum\n\t\t$topics = array();\n\t\tif ($t_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE t.t_id IN (' . implode(', ', $t_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$topics = Fsb::$db->rows($result, 'assoc', 't_id');\n\t\t}\n\n\t\t// On recupere une liste des messages pour connaitre la position du membre sur le forum\n\t\t$posts = array();\n\t\tif ($p_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, p.p_id, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = p.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE p.p_id IN (' . implode(', ', $p_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$posts = Fsb::$db->rows($result, 'assoc', 'p_id');\n\t\t}\n\n\t\t// On affiche les membres en ligne\n\t\tforeach ($logged AS $type => $list)\n\t\t{\n\t\t\tif ($list)\n\t\t\t{\n\t\t\t\tFsb::$tpl->set_blocks('logged', array(\n\t\t\t\t\t'TITLE' =>\t\tFsb::$session->lang('adm_list_logged_' . $type),\n\t\t\t\t));\n\n\t\t\t\tforeach ($list AS $u)\n\t\t\t\t{\n\t\t\t\t\t// On definit si on cherche la liste des forums dans $forums ou $topics\n\t\t\t\t\t$m = $u['method'];\n\t\t\t\t\t$data_exists = ($u['id'] && isset(${$m}[$u['id']])) ? true : false;\n\t\t\t\t\t$topic_exists = ($data_exists && isset(${$m}[$u['id']]['t_title'])) ? true : false;\n\n\t\t\t\t\tFsb::$tpl->set_blocks('logged.u', array(\n\t\t\t\t\t\t'NICKNAME' =>\t\t$u['nickname'],\n\t\t\t\t\t\t'AGENT' =>\t\t\t$u['agent'],\n\t\t\t\t\t\t'IP' =>\t\t\t\t$u['ip'],\n\t\t\t\t\t\t'LOCATION' =>\t\t$u['location'],\n\t\t\t\t\t\t'URL' =>\t\t\t$u['url'],\n\t\t\t\t\t\t'CAT_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['cat_name'] : null,\n\t\t\t\t\t\t'FORUM_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['f_name'] : null,\n\t\t\t\t\t\t'TOPIC_NAME' =>\t\t($topic_exists) ? Parser::title(${$m}[$u['id']]['t_title']) : '',\n\t\t\t\t\t\t'U_CAT' =>\t\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=index&amp;cat=' . ${$m}[$u['id']]['cat_id']) : null,\n\t\t\t\t\t\t'U_FORUM' =>\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=forum&amp;f_id=' . ${$m}[$u['id']]['f_id']) : null,\n\t\t\t\t\t\t'U_TOPIC' =>\t\t($topic_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=topic&amp;t_id=' . ${$m}[$u['id']]['t_id']) : null,\n\t\t\t\t\t\t'U_IP' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=ip&amp;ip=' . $u['ip']),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// On verifie si le SDK n'a pas ete desactive\n\t\tif(intval(Fsb::$cfg->get('disable_sdk')))\n\t\t{\n\t\t\tFsb::$tpl->set_switch('sdk_disabled');\n\t\t}\n\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'FSB_SUPPORT' =>\t\t'http://www.fire-soft-board.com',\n\t\t\t'FSB_LANG_SUPPORT' =>\tFsb::$session->lang('fsb_lang_support'),\n\t\t\t'NEW_VERSION' =>\t\t(!is_last_version(Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version'))) ? sprintf(Fsb::$session->lang('adm_fsb_new_version'), Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version')) : null,\n\t\t\t'SHOW_ALL' =>\t\t\t$show_all,\n\t\t\t'ROOT_SUPPORT' => \t\tsprintf(Fsb::$session->lang('adm_root_support_active_explain'), 'index.' . PHPEXT . '?p=mods_manager'),\n\n\t\t\t'U_SHOW_ALL' =>\t\t\tsid('index.' . PHPEXT . '?show_all=true'),\n\t\t\t'U_CHECK_VERSION' =>\tsid('index.' . PHPEXT . '?mode=version'),\n\t\t));\n\t}", "title": "" }, { "docid": "5eea5ed54c0f5cff9256c6eb3b050ad4", "score": "0.76610124", "text": "public function indexAction(): void\n {\n echo 'User admin index';\n }", "title": "" }, { "docid": "016e0fa660a5557d278addfa6059fa7a", "score": "0.7645725", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Admin panel'));\n $this->siteDesc = __('Admin panel');\n }", "title": "" }, { "docid": "67cf3f35d426eb6d9745fd43a8554f8a", "score": "0.7642605", "text": "public function index()\n {\n if ($_SESSION['userData']['rol'] == \"Administrador\") {\n $this->vista->index();\n } else {\n header('Location: ' . base_url() . 'dashboard');\n }\n }", "title": "" }, { "docid": "626348406e6bc9ad8000e90a0d16abd9", "score": "0.76391274", "text": "public function admin() {\r\n $ruta = new Ruta($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allrut = $ruta->getAll();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Ruta/admin\", array(\"allrut\" => $allrut));\r\n \r\n }", "title": "" }, { "docid": "bd2c883debfbf5835cebc460cc2ebfff", "score": "0.7590326", "text": "public function indexAdminAction(){\n $this->denyAccessUnlessGranted('ROLE_ADMIN', 'Vous n\\'avez pas accès à cette page' );\n return $this->render('LSIMarketBundle:admin:index.html.twig');\n }", "title": "" }, { "docid": "ff615a713cf5cdfb085175cd69de68fa", "score": "0.7578699", "text": "function index() {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$this->setupTemplate();\n\t\t$templateMgr->display('management/tools/index.tpl');\n\t}", "title": "" }, { "docid": "7af618e0b79ddc1745c2dcbe280e29d3", "score": "0.75683254", "text": "public function admin_index()\n\t{\n\t\t$this->paginate['Role']['order'] = 'Role.id Desc';\n\t\t$this->set('roles', $this->paginate('Role'));\n\t}", "title": "" }, { "docid": "07d26ad663180827afc284af6a7351d8", "score": "0.7565992", "text": "public function admincp_index(){\n\t\tpermission_force_check('r');\n\t\t$default_func = 'created';\n\t\t$default_sort = 'DESC';\n\t\t$data = array(\n\t\t\t'module'=>$this->module,\n\t\t\t'module_name'=>$this->session->userdata('Name_Module'),\n\t\t\t'default_func'=>$default_func,\n\t\t\t'default_sort'=>$default_sort\n\t\t);\n\t\t$this->template->write_view('content','BACKEND/index',$data);\n\t\t$this->template->render();\n\t}", "title": "" }, { "docid": "c0e63134ad062dd6ffc4b85d1079a321", "score": "0.75533575", "text": "public function indexAction() \n\t\t{\n\t\t\t$this->requireUserType(array(CT_User::Directie));\n\t\t\t$this->lijstAction();\n\t\t}", "title": "" }, { "docid": "2c9c2447a8fa9a4ab85d6714f3581c9d", "score": "0.75515515", "text": "public function indexAdmin()\n {\n $nodos = $this->mdlnodo->consultarnodos();\n require APP . 'view/_templates/headeradminodos.php';\n require APP . 'view/proyecto/admin/index.php';\n\t\t require APP . 'view/_footer/footeradminnodos.php';\n }", "title": "" }, { "docid": "e8e9a9cb7c33419610a11385db452238", "score": "0.75419897", "text": "public function admin_index() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array(\n 'User.username' => 'asc',\n ) ,\n 'conditions' => array(\n 'User.status' => 1,\n ),\n );\n $users = $this->paginate('User');\n $this->set(compact('users'));\n }", "title": "" }, { "docid": "d605f37d29bed1287584d0a7984886bd", "score": "0.75382054", "text": "public function index()\n {\n $this->View->render('admin/index', array(\n 'users' => UserModel::getPublicProfilesOfAllUsers())\n );\n }", "title": "" }, { "docid": "f4a11bd430e479a76b3c67f3494d4d3e", "score": "0.753342", "text": "public function index()\n {\n $menu = $this->getMenuItems();\n $user = $this->getService('session')->user;\n\n return $this->render('Admin/index.twig', compact('menu', 'user'));\n }", "title": "" }, { "docid": "8b5bd285e62f9b66031e3068be0bbc63", "score": "0.75315225", "text": "public function index() {\n $user_id = $this->session->userdata('user_id');\n $this->data['dataHeader'] = $this->users->get_allData($user_id);\n\n $this->data['page_title'] = 'Administrator Dashboard';\n $this->data['total_users'] = count($this->users->get_all());\n $this->data['total_groups'] = count($this->group_model->get_all());\n\n $this->template->set_master_template('template.php');\n $this->template->write_view('header', 'backend/header', $this->data);\n $this->template->write_view('sidebar', 'backend/sidebar', NULL);\n $this->template->write_view('content', 'simple_page', $this->data);\n $this->template->write_view('footer', 'backend/footer', '', TRUE);\n $this->template->render();\n }", "title": "" }, { "docid": "d18cec114ba2825efca543ba0d6bd660", "score": "0.75248456", "text": "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render(\n\t\t\t'index',\n\t\t\tarray(\n\t\t\t\t'isAdmin' => !Yii::app()->user->isGuest\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "8436aa5902306289ef4aa397666ddd3b", "score": "0.7517392", "text": "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "bdf965bf2da1e97410a32bb46c54a6e8", "score": "0.75135505", "text": "public function actionIndex() {\n \n $this->redirect('admin');\n \n\t}", "title": "" }, { "docid": "eb3e5a3fa212c1d864fd679dc598e48e", "score": "0.74970764", "text": "public function indexAction()\n {\n $data['users'] = User::getAll();\n View::render('Admin/Template/header.php');\n View::render('Admin/Users/list.php', $data);\n View::render('Admin/Template/footer.php');\n }", "title": "" }, { "docid": "07d26aed99beca25f042eca8f7ebf72a", "score": "0.749543", "text": "public function index() {\n if(!$this->user){\n die('Members Only <a href=\"/users/login\">Login</a>');\n } \n echo \"This is the index page\";\n }", "title": "" }, { "docid": "63599103c2dd53226f964dbef85ab4b4", "score": "0.7483593", "text": "public function admin_index() {\n\t\t\t$this->layout = \"default2\";\n\t\t\t$users = $this->User->find('all', array(\n\t\t\t\t'fields'=>array('id', 'username', 'mail', 'groups_id')\n\t\t\t\t)\n\t\t\t);\n\t \t\t$this->set(compact('users'));\n\t\t}", "title": "" }, { "docid": "f840a0405d90ffd19db81e03572607f6", "score": "0.7474811", "text": "public function indexAction ()\n {\n $this->_pageTitle = ['Admin Console'];\n }", "title": "" }, { "docid": "56bf2f20f8bfa55ec40dad4cd28e7591", "score": "0.74738425", "text": "public function admin_index(){\n\n\n\t\t\t// On liste toutes les utilisateurs\n\t\t\t$users = $this->User->find('all');\n\n\t\t\tif(!empty($users)){\n\t\t\t\t// Si on a des bacs, on liste les bacs\n\t\t\t\t$this->set(compact('users'));\n\t\t\t\t\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f380f4427dd02271b5e4f7c9ff1463cb", "score": "0.74710923", "text": "public function admin() {\r\n $Conductor = new Conductor($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allCon = $Conductor->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Conductor/admin\", array(\"allCon\" => $allCon));\r\n \r\n }", "title": "" }, { "docid": "9daeb69f9ea94fbebc5076eade567024", "score": "0.7464153", "text": "public function admincp_index(){\n\t\tmodules::run('admincp/chk_perm',$this->session->userdata('ID_Module'),'r',0);\n\t\t$default_func = 'created';\n\t\t$default_sort = 'DESC';\n\t\t$data = array(\n\t\t\t'module'=>$this->module,\n\t\t\t'module_name'=>$this->session->userdata('Name_Module'),\n\t\t\t'default_func'=>$default_func,\n\t\t\t'default_sort'=>$default_sort\n\t\t);\n\t\t$this->template->write_view('content','BACKEND/index',$data);\n\t\t$this->template->render();\n\t}", "title": "" }, { "docid": "1d22bfb4cde6eff8883e2fb041d7de8c", "score": "0.7462662", "text": "function admin_index() {\n\n\t\t$this->User->recursive = 0;\n\n\t\t/**\n\t\t * Put all users in \"users\".\n\t\t * $users will be available in the view.\n\t\t */\n\t\t$this->set('users', $this->paginate());\n\n\t}", "title": "" }, { "docid": "e8ce17cf47f682b7c7e0a121adab9677", "score": "0.7454578", "text": "public function admincp_index() {\n $toolBar = array('addNew', 'show', 'hide', 'delete');\n getToolbar($this->module, $toolBar);\n \n $default_func = 'created';\n $default_sort = 'DESC';\n $data = array(\n 'module' => $this->module,\n 'default_func' => $default_func,\n 'default_sort' => $default_sort\n );\n $this->template->write_view('content', 'BACKEND/index', $data);\n $this->template->render();\n }", "title": "" }, { "docid": "14214b1f5b8e036e4782d5a3b10617d9", "score": "0.74526507", "text": "public function IndexAction(){\n\t\techo Views::header();\n\t\techo Views::head();\n\t\t\n\t\techo 'This is account page.';\n\t\t\n\t\techo Views::footer();\n\t}", "title": "" }, { "docid": "422e09134f4cc0b8b0cd3febe05680a6", "score": "0.7450867", "text": "public function adminIndexAction()\r\n {\r\n $pages=$this->getDoctrine()->getRepository(\"AppBundle:Page\")->findAll();\r\n $view=array('pages' => $pages,\r\n );\r\n return $this->render('page/adminIndex.html.twig', $view);\r\n }", "title": "" }, { "docid": "bb357153919f4a057fc132968c1a9656", "score": "0.7446054", "text": "public function adminindex() {\n $current_page = 'Admin';\n $content = \"<div class='alert alert-success'>The content of Admin Section</div>\";\n \n \n $menu = $this->buildmenu();//building a dynamic menu\n return view('pages.admin')->with('current_page', $current_page)\n ->with('page_content', $content)\n ->with('pages', $menu);\n }", "title": "" }, { "docid": "482991acf58368ac4c0525374a3733a7", "score": "0.74427676", "text": "public function index() {\n $this->ograniczDostepTylkoDlaAdmina();\n $db = $this->registry->db; \n $login = isset($_SESSION['user']) ? $_SESSION['user'] : '';\n if ($db::isUserInRole($login, 'admin')) {\n $this->registry->template->results = $db::getTypyUrzadzenList();\n }\n //else\n //{\n //$thisd ->registry->template->results = $db::getUrzadeniaListByLogin($login); \n //}\n $this->registry->template->show('typy_urzadzen/typy_urzadzen_index');\n }", "title": "" }, { "docid": "ad869b3728868b8b4823a8389006d07e", "score": "0.74385804", "text": "function index(){\n set_theme();\n A(\"Taskadmin/Fun\")->islogin();//检测是否登录\n $access = I('get.access','000000');\n A(\"Api/Fun\")->isAccess($access);//判断菜单权限\n $this->display();\n }", "title": "" }, { "docid": "b7c69f215af89af919139a8b27c19489", "score": "0.743833", "text": "public function index() {\r\n $this->logger->info(\"Action Index \");\r\n $this->template->display('listsettings');\r\n }", "title": "" }, { "docid": "96979ce0406932c1c8733ea7dcfd673f", "score": "0.7436634", "text": "public function admincp_index(){\n\t\tmodules::run('admincp/chk_perm',$this->session->userdata('ID_Module'),'r',0);\n\t\t$default_func = 'status';\n\t\t$default_sort = 'ASC';\n\t\t$data = array(\n\t\t\t'module'=>$this->module,\n\t\t\t'module_name'=>$this->session->userdata('Name_Module'),\n\t\t\t'default_func'=>$default_func,\n\t\t\t'default_sort'=>$default_sort\n\t\t);\n\t\t$this->template->write_view('content','index',$data);\n\t\t$this->template->render();\n\t}", "title": "" }, { "docid": "e6da2b9c930a23048edb866572570fb7", "score": "0.74309933", "text": "public function index()\n\t{\n\n\t\treturn view('admin.index');\n\t}", "title": "" }, { "docid": "00c63f763cc0d4df088bde5df98a3357", "score": "0.742196", "text": "public function index( ){\n\t\tif( Auth::check() ){\n\t\t\treturn View::make('admin.index');\n\t\t} else {\n\t\t\treturn Redirect::route('login');\n\t\t}\n\t\t// return View::make( 'welcome' );\n\t}", "title": "" }, { "docid": "558e4466b049e43d3f1b21e2e7f534ab", "score": "0.74157155", "text": "public function index()\n\t{\n\t\treturn view('admin/admin/admin')\n\t\t\t->with('title', 'Manage');\n\t}", "title": "" }, { "docid": "58f2deaf68bb29c3f4fa404ad79c6996", "score": "0.74105746", "text": "public function main()\n {\n // check if user logged if not redirect to login page.\n if(Session::logged() == NULL){\n header(\"location: /\" . ROOT . 'login');\n }\n // if logged only administrator with role owner or manager have access to administration page.\n else if(Session::logged()['role'] == 'manager' || Session::logged()['role'] == 'owner'){\n // creating administration page.\n\n $data = NULL;\n $p = new Page(\"Administration Page\");\n $p->setComponent(\"htmlAdministrator.php\", $data);\n $p->addCss(\"administrator.css\");\n $p->addJs('administrator.js');\n $p->dumpView();\n }\n // not owner or manager trying access to administrator page, redirect to school page.\n else{\n header(\"location: /\" . ROOT . 'school');\n }\n }", "title": "" }, { "docid": "31b759f4b8da9cc48bf5aae341fdfefc", "score": "0.740196", "text": "public function admin_index() \n\t{\n\t\t$results = $this->paginate();\n\n\t\t// Set\n\t\t$this->set(\n\t\t\tarray(\n\t\t\t\t'title_for_layout' \t=> 'Notícias',\n\t\t\t\t'action'\t\t\t=> 'add',\n\t\t\t\t'button'\t\t\t=> 'Adicionar Notícia',\n\t\t\t\t'class'\t\t\t\t=> 'success',\n\t\t\t\t'is_save'\t\t\t=> false,\n\t\t\t\t'results'\t\t\t=> $results\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "84e14045130215e14653344a3de4d50c", "score": "0.7400186", "text": "public function admincp_index()\n {\n modules::run('admincp/chk_perm', $this->session->userdata('ID_Module'), 'r', 0);\n $default_func = 'order_num';\n $default_sort = 'ASC';\n $data = array(\n 'module' => $this->module,\n 'module_name' => $this->session->userdata('Name_Module'),\n 'default_func' => $default_func,\n 'default_sort' => $default_sort\n );\n\n $this->template->write_view('content', 'BACKEND/index', $data);\n $this->template->render();\n }", "title": "" }, { "docid": "b0b8c46d50dc1f4f7f0264f102dfd15a", "score": "0.7382306", "text": "public function index()\n {\n Auth::check();\n $admins = Admin::all();\n return view(\"ControlPanel.admin.index\")->with([\n \"admins\" => $admins\n ]);\n }", "title": "" }, { "docid": "6b676ddfeadc7efdd66098229c0341db", "score": "0.7382052", "text": "public function index()\n {\n return view('admin.pages.admin_index');\n }", "title": "" }, { "docid": "6b2aa4a0e0dd9d762d7d67e2d4445630", "score": "0.7381636", "text": "public function index() {\n\t\t// add page title\n\t\t$this->output->append_title('users');\n\t\t// add breadcrumbs\n\t\t\n\t\t$this->breadcrumb->populate(array(\n\t\t\t'Dashboard' => parent::$module.'/dashboard',\n\t\t\t'users'\n\t\t));\n\t\t\n\t\t$data = array();\n\t\t// load view\n\t\t$this->load->view(parent::$module.'/index',$data);\n\t}", "title": "" }, { "docid": "8b658f9750d6c13b95026203360da884", "score": "0.737174", "text": "public function indexAction() {\n $page = intval($this->getInput('page'));\n $perpage = $this->perpage;\n\n list($total, $users) = Admin_Service_User::getList($page, $perpage);\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $groups = Common::resetKey($groups, 'groupid');\n\n\n \n $this->assign('users', $users);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'] . '/?'));\n $this->assign(\"meunOn\", \"sys_user\");\n }", "title": "" }, { "docid": "d30438c7817168acd0e488c49a19ddf9", "score": "0.7371328", "text": "function index()\n {\n\t$data = $this->page_settings('default', NULL, NULL, 'Users', 'users');\n\t$this->templates->backend($data);\n }", "title": "" }, { "docid": "2ec9817116008134e98ae7f231378a59", "score": "0.7369355", "text": "public function admin_index(){\n \n $this->set(\"title_for_layout\",\"Manage Satellite Groups\");\n \n // Load all configured groups\n $this->set('groups', $this->Group->find('all'));\n }", "title": "" }, { "docid": "e86ac4bef8791738a415ec03659b06f0", "score": "0.736565", "text": "public function actionIndex()\n\t{\n\t\t// do stuff that's not the main content?\n\t}", "title": "" }, { "docid": "339132c1f227e299edd5e4c8b474e5e9", "score": "0.73639154", "text": "public function index()\n\t{\n\t\t\n\t\tif(!$this->set_data->is_logged_in())\n\t\t{\n\t\t\t\n\t\t\t$this->layout->view('user/login_page');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tredirect('user/data_fetch');\n\t\t}\n\t}", "title": "" }, { "docid": "9fe75d3521d30feabd49b3169e01152d", "score": "0.7363514", "text": "public function indexAction()\n {\n\t\techo 'Module Admin IndexController indexAction';\n\t\t\n }", "title": "" }, { "docid": "f14db3c93df7860bf498d1c36c95f69d", "score": "0.73635024", "text": "public function admincp_index() {\n $toolBar = array('addNew', 'delete');\n getToolbar($this->module, $toolBar);\n\n $default_func = 'updated';\n $default_sort = 'DESC';\n $data = array(\n 'module' => $this->module,\n 'default_func' => $default_func,\n 'default_sort' => $default_sort\n );\n $this->template->write_view('content', 'BACKEND/index', $data);\n $this->template->render();\n }", "title": "" }, { "docid": "bdb539743e7e2f8763ca2ec5fd02b456", "score": "0.7360458", "text": "public function actionIndex() {\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->layout = '//layouts/admin_iframe_main';\n\t\t$this->render('index');\n\t\t//$this->_actionManageBasicSiteInfo ();\n\t}", "title": "" }, { "docid": "546b63d88c64b63c5cc7be72098baa8d", "score": "0.7349828", "text": "public static function adminPage(){\n\t\tif(!self::isAdmin()){\n\t\t\theader(\"Location: index.php\");\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "f398f81c8a3967d2e524b6a4f9b4aa16", "score": "0.73402643", "text": "protected function indexAction() {}", "title": "" }, { "docid": "5513f8b3a24edba92beee75fcdc58b39", "score": "0.7338078", "text": "public function index() {\n\t\t\n\t\tif($this->secureCheck()){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t$navBar = $this->navBar();\n\n\t\t$this->generateView ( array (\n\t\t\t\t'navBar' => $navBar\n\t\t) );\n\t}", "title": "" }, { "docid": "63256ebc83afa264977de47400b72036", "score": "0.7333884", "text": "public function index()\n\t{\n\t\t$this->load->view('admin/index');\n\t}", "title": "" }, { "docid": "a9ded23791b4b52bf076100ff7f28463", "score": "0.73330516", "text": "public function index()\n {\n //return View::make('admin.user.index');\n }", "title": "" }, { "docid": "8910894424d0f0b08f236d24712ab980", "score": "0.7332276", "text": "public function indexAction() {\n\t\t// TODO Auto-generated AdminController::indexAction() default action\n\t}", "title": "" }, { "docid": "2d0fb34a9102787d1fc4815015f9a7db", "score": "0.7326859", "text": "public function adminPanel() {\n $posts = $this->postManager->getPosts();\n $comments = $this->commentManager->getFlaggedComments();\n $view = new View(\"Administration\");\n $view->generate(array('posts' => $posts, 'comments' => $comments));\n }", "title": "" }, { "docid": "e3bf7d0996a3a3003313b4a56c272369", "score": "0.73256636", "text": "public function index()\n {\n if(isset($_SESSION['user_id'])):\n $this->id = $_SESSION['user_id'];\n else:\n $this->id = 0;\n endif;\n $this->_user->listar_permisos($this->id,ACCESS_VIEW);\n $this->_view->titulo = 'ADMIN | Listado de usuarios';\n $this->_view->user = $this->_user->findAll('user');\n $this->_view->loadView('index','admin');\n\n }", "title": "" }, { "docid": "72825b1791f7d4e3c9b18624c0a93210", "score": "0.7322429", "text": "public function index(){\n\t\t$this->vista('inc/header');\n\t\t$this->vista('inc/navegacion');\n\t\t$this->vista('paginas/login');\n\t\t$this->vista('inc/footer');\n\t}", "title": "" }, { "docid": "464918328f55d23dd9b9abad8a95900f", "score": "0.7317421", "text": "public function index() {\n\t\t$this->display('index');\n\t}", "title": "" }, { "docid": "51d3d57b2f3e9841f58f3a1618b45fc9", "score": "0.73173815", "text": "public function index()\n {\n if(Gate::denies('EDIT_USERS')){\n abort(403);\n }\n\n $this->title = 'Менеджер прав пользователей';\n\n $roles = $this->getRoles();\n $permitions = $this->getPermitions();\n \n $this->content = view(config('settings.theme') . '.admin.permitions_content', compact('roles', 'permitions'))->render();\n \n return $this->renderOutput();\n }", "title": "" }, { "docid": "3fc611982a35bccb8ad4dfab046085e8", "score": "0.7315691", "text": "public function indexAction() {\n if (in_array(0, $this->_rolesUser) || in_array(1, $this->_rolesUser)) $this->_redirect(\"/admintool/index/go\");\n \n // traductores\n if (in_array(2, $this->_rolesUser)) $this->_redirect(\"/admintool/index/translate\"); \n }", "title": "" }, { "docid": "44544ca1c22888107a4b6f89465eed07", "score": "0.73124284", "text": "public function index()\n {\n $data['user'] = $this->user_model->getAllUser();\n $this->load->view('templates/header-admin');\n $this->load->view('admin/data-user', $data);\n $this->load->view('templates/footer-admin');\n }", "title": "" }, { "docid": "85d43d314aba17db7479151c45438a88", "score": "0.7311256", "text": "public function index(){\n return view('pages.admin.index');\n }", "title": "" }, { "docid": "51bf1d5684b4647e2b9619101904bf29", "score": "0.73079264", "text": "public function index()\n {\n return view('advancedban::admin.index');\n }", "title": "" }, { "docid": "b7635ab4989df4ea7d2e7d4308296820", "score": "0.7304652", "text": "public function index()\n {\n $admin = User::paginate(10);\n\n return view('thuthuy.pages.admin.index', compact('admin'));\n }", "title": "" }, { "docid": "1bcac6550ff3e7449cc566599e9bd478", "score": "0.7300177", "text": "function admin_index()\n {\n if(!$this->Session->check('Admin'))\n {\n $this->redirect('/admin/login');\n }\n\n\n }", "title": "" }, { "docid": "f2af31aa714bec3d1050f5430afad110", "score": "0.72925097", "text": "public function index()\n {\n $data=Admin::where(\"super_admin\",0)->paginate(10);\n\n return view('admin.admins.index',['items'=>$data]);\n }", "title": "" }, { "docid": "7c6c1c3561b3fd1cf5081a3eca9a8774", "score": "0.7291636", "text": "public function indexAction()\n\t{\n\t\t// Get the current configuration and\n\t\t// show a form for editing it\n\t\t$this->view->config = $this->adminService->getSystemConfig();\n\t\t$this->renderView('admin/config.php');\n\t}", "title": "" }, { "docid": "94582593befd910c796186f5d67da4f7", "score": "0.7291119", "text": "function index()\n {\n $params['limit'] = RECORDS_PER_PAGE;\n $params['offset'] = ($this->input->get('per_page')) ? $this->input->get('per_page') : 0;\n\n $config = $this->config->item('pagination');\n $config['base_url'] = site_url('user_admin/index?');\n $config['total_rows'] = $this->User_admin_model->get_all_user_admin_count();\n $this->pagination->initialize($config);\n\n $data['user_admin'] = $this->User_admin_model->get_all_user_admin($params);\n\n $data['_view'] = 'user_admin/index';\n $this->load->view('layouts/main',$data);\n }", "title": "" }, { "docid": "7e689c56329402cfd35f8f792daa7b24", "score": "0.7289114", "text": "public function actionIndexAdmin()\n {\n $searchModel = new AdminSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "86f124caaf8885df7092887da5e01efc", "score": "0.72877944", "text": "public function actionIndex()\n {\n \techo 'Permission Denied.';\n \texit;\n return $this->render('index');\n }", "title": "" }, { "docid": "f3b7831a8bcc729f1c596f770264a679", "score": "0.728022", "text": "public function index()\n {\n $this->updateTitle('Database Users');\n $this->getEssentials();\n $this->loadView();\n }", "title": "" } ]
fb9ed399f5faab5bdcbac7adc9d42b10
/ Function to show option page
[ { "docid": "3fb9b0aca4f2e992585bac9e5e22e303", "score": "0.0", "text": "function doms_foreign_rates_options()\n{\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n?>\n <div class=\"wrap\">\n <h1><?php _e('Foreign Rates Options', 'doms-rates'); ?></h1>\n <p><?php _e('Here you can set the options to Foreign Rates to show', 'doms-rates'); ?></p>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields('doms-foreign-rates-group'); ?>\n <?php do_settings_sections('options-general.php?page=doms-foreign-rates'); ?>\n <?php submit_button(); ?>\n </form>\n </div>\n<?php\n}", "title": "" } ]
[ { "docid": "2bb1a454788367b1c5efea9499ff1216", "score": "0.83984405", "text": "function display_options_page(){\n\t\t\tinclude(dirname(__FILE__).'/views/options.php');\n\t\t}", "title": "" }, { "docid": "9667c762124fa016e228aa7fdacb2d92", "score": "0.7873587", "text": "public function optionPage()\n {\n require_once(__DIR__.'/AdminOptionPage.class.php');\n require_once(__DIR__.'/Persistance.class.php');\n require_once(__DIR__.'/Api.class.php');\n $persistance = new \\gwa\\huddle\\Persistance($this->_rootdir.'/_data/data.json');\n $api = new \\gwa\\huddle\\Api('NewsroomGore-tex', 'http://gwadev.de/HuddleRedirect');\n $optionpage = new AdminOptionPage(\n $this->_get,\n $this->getTwig(),\n $this->getPersistance(),\n $this->getApi(),\n $this->_rootdir\n );\n echo $optionpage->render();\n }", "title": "" }, { "docid": "e768e8053fbcabf9c806d8b6385f7a15", "score": "0.7813938", "text": "public function display_options_page()\n {\n include_once 'partials/mojo-sp-admin-display.php';\n }", "title": "" }, { "docid": "e2853fe85295a0f1109d7296970737fc", "score": "0.7624555", "text": "function OptionsPage() {\n include 'options-page.php';\n }", "title": "" }, { "docid": "48b9897a6ba25caf778b1e7b6f43a52f", "score": "0.7470549", "text": "function showOptions() {\n\t\t$session = new SessionManager();\n\t\t$session->sessionLoad();\n\t\t$error = \"\";\n\t\tif( isset($_GET[\"error\"]) ){\n\t\t\t$error = $_GET[\"error\"];\n\t\t}\n\t\t\n\t\t$userID = $session->userId;\n\t\t$pictureModel = new PictureModel();\n\t\t$rows = $pictureModel->getByWhere(\"f_userID\", $userID);\n\t\t$userView = new View(\"view/editUser.php\");\n\t\t$this->setSessionVarsToView($userView, $session);\n\t\t$userView->config_error = $error;\n\t\t$userView->data = $rows;\n\t\t$userView->display();\n\t}", "title": "" }, { "docid": "90b43d5097edb34f13db3ab4b5c5c29c", "score": "0.73218286", "text": "public function get_options_page() \n\t{\n\t\t$page_title \t\t= $this->page_title;\n\t\t$page_key \t\t\t= $this->options_page_key;\n\t\t$options_group \t= $this->options_group;\n\n\t\t// grab the settings template\n\t\t$views_dir = NU_PATH . 'views/';\n $tpl_path = $views_dir . 'settings.php';\n\n\t\tinclude( $tpl_path );\n\t}", "title": "" }, { "docid": "05651449c3d7fa2675f54bfeaf12dd04", "score": "0.72992235", "text": "public function show( Option $option )\n {\n //\n }", "title": "" }, { "docid": "e4e960ce3618e680c75938600cc705df", "score": "0.7245338", "text": "public function load_options_page()\n {\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n\n $this->load_view('options-page.php');\n\n }", "title": "" }, { "docid": "59aa3268f336db23212b56cb337db9c1", "score": "0.7238259", "text": "public function show(Option $option)\n {\n //\n }", "title": "" }, { "docid": "59aa3268f336db23212b56cb337db9c1", "score": "0.7238259", "text": "public function show(Option $option)\n {\n //\n }", "title": "" }, { "docid": "59aa3268f336db23212b56cb337db9c1", "score": "0.7238259", "text": "public function show(Option $option)\n {\n //\n }", "title": "" }, { "docid": "a18549ad77128268529fab50bb38ee84", "score": "0.71811146", "text": "function loadOptionPanel(){\n require(THEME_FRAMEWORK.'helpers/optionsgenerator.php');\n new optionsGenerator($_GET['page']);\n }", "title": "" }, { "docid": "ff05fdca86fe2d4f29419ecd20692de2", "score": "0.7156549", "text": "public static function display_options_page() // display the page\n\t\t{\n\t\t\t?>\n\t\t\t<div class=\"wrap\"> \n\t\t\t\t<!-- screen_icon(); //deprecated -->\n\t\t\t\t<h2>My Theme Options</h2>\n\t\t\t\t<!-- enctype=\"multipart/form-data\" --- ability to upload data to any php <form> -->\n\t\t\t\t<?php // this will test if the inputted value is already added to WP\n\t\t\t\t\t$o = get_option('mq_plugin_options');\n\t\t\t\t\techo '<pre>get_option'; print_r($o); echo '</pre>';\n\t\t\t\t?>\n\t\t\t\t <!--https://stackoverflow.com/questions/4526273/what-does-enctype-multipart-form-data-mean-->\n\t\t\t\t<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\"> \n\t\t\t\t\t<?php settings_fields('mq_plugin_options');// WP adds hidden <inputs> for security\n\t\t\t\t\tdo_settings_sections(__FILE__); \t//filter all functions & where to display the fields\n\t\t\t\t\t?>\n\t\t\t\t\t<p class=\"submit\"> <!-- style submit by WP -->\n\t\t\t\t\t\t<input name=\"submit\" type=\"submit\" class=\"button-primary\" value=\"Save Changes\" />\n\t\t\t\t\t\t<!-- tip: Browse/Inspect WP admin pages to get the CSS Styles or other element attributes -->\n\t\t\t\t\t</p>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "e809370a0557c99599bf6db2ff362593", "score": "0.7111507", "text": "public function options() {\r\n \techo '<div class=\"wrap\">';\r\n \techo '<h2>' . $this->page_title . '</h2>';\r\n \ttry {\r\n \t $this->form();\r\n \t} catch (Exception $e) {\r\n \t echo $e->getMessage();\r\n \t}\r\n \techo '</div> <!-- end .wrap -->';\r\n }", "title": "" }, { "docid": "593cc819c36a674f8229b72e43e988c9", "score": "0.7097155", "text": "function options_page() {\n\t\tload_plugin_textdomain('custom-query-string');\n\t\t$this->request = isset($_REQUEST['cqs']) ? $_REQUEST['cqs'] : false;\n\n\t\tif ( !$this->request ) {\n\t\t\t$this->display_options_page();\n\t\t} elseif ((isset($this->request['add']) && $this->request['add']) ||\n (isset($this->request['addCategory']) && $this->request['addCategory'])) {\n\t\t\t$this->add_options();\n\t\t\t$this->display_options_page(true);\n\t\t}\n\t\telseif (isset($this->request['deleteChecked']) && $this->request['deleteChecked']) {\n\t\t\t$this->delete_options();\n\t\t\t$this->display_options_page(true);\n\t\t}\n\t\telse {\n\t\t\t$this->display_options_page();\n\t\t}\n\t}", "title": "" }, { "docid": "ea5dbd1ecb3d95b378363bd767a1c251", "score": "0.7091329", "text": "private function show_page(){\r\n\t\tif($this->show_form){\n\t\t\tvw_ips::form($this->fields);\n\t\t}\n\t\t\r\n\t}", "title": "" }, { "docid": "9536478e9c28c60ab7e9c46d961f564f", "score": "0.70798767", "text": "function options_page() {\n global $pagenow;\n // load admin page\n include( COURSE_SEQUENCE_PLUGIN_DIR . '/views/editor.php' );\n }", "title": "" }, { "docid": "683fd0302fabad400a535216cfc911a6", "score": "0.70694625", "text": "function ieu_options_page_view()\n {\n if ( !current_user_can('manage_options') ) return;\n\n include IEU_PLUGIN_ABS_FOLDER . '/admin/ieu_options_view.php';\n }", "title": "" }, { "docid": "dc7c488fe3c137eddf1274d4b99ed9c2", "score": "0.70057255", "text": "public function show(Goption $goption)\n {\n //\n }", "title": "" }, { "docid": "535a02eab98808f6ea618b4bd15e0384", "score": "0.6871207", "text": "function acf_add_options_page() {}", "title": "" }, { "docid": "6ed589876abc8c448267b3a6544b21e0", "score": "0.6848332", "text": "public function options_page() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( __( 'You do not have sufficient priveleges to access this page.', 'flexo-archives' ) );\n\t\t}\n\n\t\t// form submitted\n\t\t$options = $this->get_opts();\n\t\t$newoptions = $this->get_opts();\n\n\t\tif ( ! empty( $_POST['flexo-submit'] ) &&\n\t\t\tcheck_admin_referer( 'flexo-archives-options-page' ) ) {\n\t\t\t$newoptions[ $this->opt_animate ] = isset( $_POST['flexo-animate'] );\n\t\t\t$newoptions[ $this->opt_nofollow ] = isset( $_POST['flexo-nofollow'] );\n\t\t\t$newoptions[ $this->opt_month_desc ] = isset( $_POST['flexo-monthdesc'] );\n\t\t\t$newoptions[ $this->opt_yrtotal ] = isset( $_POST['flexo-yrtotal'] );\n\t\t\t$newoptions[ $this->opt_collapse_decades ] = isset( $_POST['flexo-decades'] );\n\t\t}\n\n\t\t// save if options changed\n\t\tif ( $options !== $newoptions ) {\n\t\t\t$options = $newoptions;\n\t\t\t$this->set_opts( $newoptions );\n\t\t}\n\n\t\t$animate = $this->animation_enabled() ? 'checked=\"checked\"' : '';\n\t\t$total = $this->yearly_total_enabled() ? 'checked=\"checked\"' : '';\n\t\t$nofollow = $this->nofollow_enabled() ? 'checked=\"checked\"' : '';\n\t\t$monthdesc = $this->month_order() === 'DESC' ? 'checked=\"checked\"' : '';\n\t\t$decades = $this->collapse_decades() ? 'checked=\"checked\"' : '';\n\n\t\t?>\n<div class=\"wrap\">\n\t<h2><?php _e( 'Advanced Flexo Archives Options', 'flexo-archives' ); ?></h2>\n\t<!-- <div class=\"narrow\"> -->\n\t<div id=\"flexo-admin-form\">\n\t<form name=\"flexo-options-form\" method=\"post\" action=\"\">\n\t\t<?php wp_nonce_field( 'flexo-archives-options-page' ); ?>\n\t<fieldset>\n\t\t<legend><?php _e( 'Global Options', 'flexo-archives' ); ?></legend>\n\t\t<p><label for=\"flexo-animate\"><input type=\"checkbox\" class=\"checkbox\" id=\"flexo-animate\" name=\"flexo-animate\" <?php echo $animate; ?>/> <?php _e( 'animate collapsing and expanding lists', 'flexo-archives' ); ?></label></p>\n\t\t<p><label for=\"flexo-nofollow\"><input type=\"checkbox\" class=\"checkbox\" id=\"flexo-nofollow\" name=\"flexo-nofollow\" <?php echo $nofollow; ?>/> <?php _e( 'add rel=\"nofollow\" to links', 'flexo-archives' ); ?></label></p>\n\t\t<p><label for=\"flexo-monthdesc\"><input type=\"checkbox\" class=\"checkbox\" id=\"flexo-monthdesc\" name=\"flexo-monthdesc\" <?php echo $monthdesc; ?>/> <?php _e( 'sort months in descending order', 'flexo-archives' ); ?></label></p>\n\t\t<p><label for=\"flexo-yrtotal\"><input type=\"checkbox\" class=\"checkbox\" id=\"flexo-yrtotal\" name=\"flexo-yrtotal\" <?php echo $total; ?>/> <?php _e( 'show yearly post totals in lists', 'flexo-archives' ); ?></label></p>\n\t\t<p><label for=\"flexo-decades\"><input type=\"checkbox\" class=\"checkbox\" id=\"flexo-decades\" name=\"flexo-decades\" <?php echo $decades; ?>/> <?php _e( 'collapse complete decades', 'flexo-acrhives' ); ?></label></p>\n\t</fieldset>\n\n\t<input type=\"submit\" name=\"flexo-submit\" class=\"button-primary\" value=\"<?php _e( 'Submit', 'flexo-archives' ); ?>\"/>\n\t</form>\n\t</div>\n</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "4a0cc511b908def94c45537f383ff858", "score": "0.6845547", "text": "function wp_options_page() {\n\t\t$form = ( count($this->_config_form) > 0 ) ? $this->_config_form : $this->_config;\n\t\t$this->_load_praized();\n\t\trequire_once($this->_includes . '/php/config.php');\n\t}", "title": "" }, { "docid": "b9ffa1d1039aa2e9ce1966669b1d32a0", "score": "0.6769986", "text": "function show() {\n if ($this->type == \"form\") {\n return $this->show_form();\n }\n else if ($this->type == \"list\") {\n return $this->show_results();\n }\n else {\n return $this->show_form();\n }\n }", "title": "" }, { "docid": "086f66e3b5778bd9157b40316a9c5005", "score": "0.6766195", "text": "function mt_options_page() {\n echo \"<h2>Test Options</h2>\";\n}", "title": "" }, { "docid": "6f99839e9ce73719005fd60bd84333d2", "score": "0.6762932", "text": "public function displayOptions()\n {\n $data = $_POST;\n $listing = geoListing::getListing($data['listing']);\n $urlToListing = $listing->getFullUrl();\n\n $tpl = new geoTemplate('addon', 'sharing');\n $tpl->assign('listing_url', urlencode($urlToListing));\n $tpl->assign('title', $listing->title); //already urlencoded in the database, and needs to stay that way\n $tpl->assign('description', urlencode(strip_tags(geoString::fromDB($listing->description))));\n $tpl->assign('msgs', geoAddon::getText('geo_addons', 'sharing'));\n $html = $tpl->fetch('methods/reddit_options.tpl');\n return $html;\n }", "title": "" }, { "docid": "688ff3899d560854b08933ab0ef1efe2", "score": "0.6760528", "text": "function add_options_page(){\n\t\t\tadd_options_page('Hold Your Horses Comments', 'Hold Your Horses', 'administrator', basename(__FILE__), array($this,'display_options_page'));\n\t\t}", "title": "" }, { "docid": "f66c119e6d647c8af7d71b35a502e862", "score": "0.67340624", "text": "function rad_options_page(){\n\tadd_options_page( 'Company Information', 'Company Info', 'manage_options', \n\t\t'company-info', 'rad_options_content' );\n}", "title": "" }, { "docid": "a86d9374790718ddde1898a0be09e679", "score": "0.6731974", "text": "public function generate_page() {\n\t\t$this->register_capabilities();\n\n\t\trequire_once DUPLICATE_POST_PATH . 'src/admin/views/options.php';\n\t}", "title": "" }, { "docid": "a624f10a13704d301aa8d9b8ee25a6a1", "score": "0.673121", "text": "public function page_options() {\n\n\t\tinclude( plugin_dir_path( __FILE__ ) . 'partials/job-search-admin-page-settings.php' );\n\n\t}", "title": "" }, { "docid": "87f66eb2f9e62168746ed78e37e39bb7", "score": "0.6712698", "text": "function AddOptionPage(){\n\t\tadd_options_page( FV_FCK_NAME, FV_FCK_NAME, 'activate_plugins', 'fv_wysiwyg', array( &$this, 'OptionsMenuPage' ) );\n\t}", "title": "" }, { "docid": "766941f91c16fcde91da27438c27e6c1", "score": "0.6711919", "text": "public function index()\n {\n return view('admin.options.options')->with('options', Option::get());\n }", "title": "" }, { "docid": "7f8fa7a92d234c68f2dca3489b55dd08", "score": "0.6655922", "text": "function sampleoptions_add_page_fn() {\n// add optiont to main settings panel\n add_menu_page('Handle Data', 'HandleData', 'manage_options', __FILE__, 'options_page_fn');\n\n}", "title": "" }, { "docid": "3d8ca5dcf832edc0c82a774aca027fbb", "score": "0.6638004", "text": "function ds_ap_options_page () {\r\n\tinclude ( 'artpal-options.php' );\r\n}", "title": "" }, { "docid": "0fe379b80b1e8832a4bb3c7384ec48d1", "score": "0.65999246", "text": "function BP_addOptionsPage() {\r\n\t\tadd_options_page('Op&ccedil;&otilde;es do Buscap&eacute; Tracker', 'Buscap&eacute; Tracker', 'manage_options', basename(__FILE__), 'BP_optionsPanel');\r\n}", "title": "" }, { "docid": "3e2102fe4831042f390f336f9079126f", "score": "0.6580377", "text": "function fdls_do_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>fdls Options</h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('fdls_options'); ?>\n\t\t\t<?php $options = get_option('fdls'); ?>\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tr valign=\"top\"><th scope=\"row\">Classes ou ids (css) à cacher</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"fdls[hideclass]\" value=\"<?php echo $options['hideclass']; ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t</div>\n\t<?php\t\n}", "title": "" }, { "docid": "990b339085aef13b005b81e450e0bc99", "score": "0.6570678", "text": "public function prnt()\n {\n $this->display(\n\n $this->opt()\n\n );\n }", "title": "" }, { "docid": "b5315808ae84f21005e82f9f296d530c", "score": "0.65612006", "text": "public function plugin_options_page( ) {\n\n\t\t\t$tab = isset( $_GET['tab'] ) ? sanitize_key( $_GET['tab'] ) : $this->default_tab_key;\n\t\t\tif ( isset( $_GET['settings-updated'] ) ) {\t\t\n\t\t\t\tdo_action( 'tabbed_settings_after_update' );\n\t\t\t}\n\t\t\t\n\t\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<?php $this->plugin_options_tabs( ); ?>\n\t\t\t\t<?php $this->get_form_action( $tab ); ?>\t\t\n\t\t\t\t\t<?php do_settings_sections( $tab ); ?>\n\t\t\t\t\t<?php submit_button( ); ?>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "c9d5a693d15453bfbbdb056743aae4c8", "score": "0.6557252", "text": "public function show($id)\n\t{\n\t \n $option = ProgramOption::find($id);\n\n if( is_null($option) ) {\n Session::flash('action_success', false);\n Session::flash('action_message', 'The specified program option does not exist.');\n return Redirect::action('AdminOptionController@index');\n }\n\n return View::make('admin.option.show')->with('option', $option);\n\n\t}", "title": "" }, { "docid": "75d87bed5907c48a193b163e61d68c39", "score": "0.6532607", "text": "public function admin_options()\n {\n echo '<h3>' . __('Oplata.com', 'kdc') . '</h3>';\n echo '<p>' . __('Payment gateway') . '</p>';\n echo '<table class=\"form-table\">';\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n echo '</table>';\n }", "title": "" }, { "docid": "2eb17e733b257747d9a3e8f64f2dead4", "score": "0.6532576", "text": "function screen_options(){\n $page = ( isset($_GET['page']) ) ? esc_attr($_GET['page']) : false;\n if( 'debug_log' != $page )\n return;\n\n $current_screen = get_current_screen();\n\n //define options\n $per_page_field = 'per_page';\n $per_page_option = $current_screen->id . '_' . $per_page_field;\n\n //Save options that were applied\n if( isset($_REQUEST['wp_screen_options']) && isset($_REQUEST['wp_screen_options']['value']) ){\n update_option( $per_page_option, esc_html($_REQUEST['wp_screen_options']['value']) );\n }\n\n //prepare options for display\n\n //if per page option is not set, use default\n $per_page_val = get_option($per_page_option, 50);\n $args = array('label' => __('Messages', 'simple-debug'), 'default' => $per_page_val );\n\n //display options\n add_screen_option($per_page_field, $args);\n $_per_page = get_option('backup_files_per_page');\n\n //create custom list table class to display data\n $this->debug_log_table = new Debug_log_List_Table;\n\t\t\n }", "title": "" }, { "docid": "5d93e8a065a547c042ac0ebd27858acc", "score": "0.65318036", "text": "function displaySettingMenu() {\n\t\t/* 页名称,菜单名称,访问级别,菜单别名,点击该菜单时的回调函数(用以显示设置页面) */\n\t\tadd_options_page('Set AllonComment', 'Set AllonComment', 'administrator', 'allon_comment', array(&$this, 'displayAllonCommentSetPage'));\n\t}", "title": "" }, { "docid": "f754c54571d129009addd4851c2d0089", "score": "0.6529005", "text": "protected function showShopSettings() {\n\n\t}", "title": "" }, { "docid": "3ba91d576cbd0d772dd4daa53335708f", "score": "0.6523643", "text": "public function index()\n {\n $option = Option::find(1);\n return view('admin.option.edit', compact('option') );\n }", "title": "" }, { "docid": "eef326f95f7024e21dbb847c9783009e", "score": "0.65206325", "text": "public function Show(){\n\t\t\tswitch($this->opcion){\n\t\t\t\tcase \"about\": $this->ShowAbout();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"proc\": $this->ShowProcs();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"profs\": $this->ShowProfs();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"news\": $this->ShowNews();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"util\": $this->ShowUtils();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"contact\": $this->ShowContact();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"usr\": $this->ShowUsr();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: $this->ShowAbout();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "eb47c1b7e95d364a7570389ddfaea037", "score": "0.65189105", "text": "public function show() {\r\n $this -> select_data();\r\n\r\n }", "title": "" }, { "docid": "722c5af81a0bd71cbf3f939592c740f0", "score": "0.65122503", "text": "public function add_options_page() { \r\n add_submenu_page( 'listeo-fields-and-form', 'Fields', 'Fields', 'manage_options', 'listeo-fields-builder', array( $this, 'output' )); \r\n }", "title": "" }, { "docid": "c0851d25ad72c88ff6fb76aa4fc5753c", "score": "0.6502163", "text": "public function admin_options() {\n echo '<h3>'.__('Tpaga Web Checkout', 'tpaga').'</h3>';\n echo '<table class=\"form-table\">';\n $this -> generate_settings_html();\n echo '</table>';\n }", "title": "" }, { "docid": "aef5fb3745ad294e92f9f48d16b89eed", "score": "0.6501648", "text": "function nfl_teams_list_options_page() {\n add_menu_page(\n 'NFL Team List Settings',\n 'NFL Team List',\n 'manage_options',\n 'nfl_teams_list',\n array( $this, 'nfl_teams_list_options_page_html')\n );\n }", "title": "" }, { "docid": "f9f62359570d96b563a3a6002c45923b", "score": "0.649942", "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": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.64955133", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0b54543f8b7bf20bd8132185f61bb8eb", "score": "0.6493635", "text": "public function show(QuestionOption $questionOption)\n {\n //\n }", "title": "" }, { "docid": "55670322ced35e29f8a8035bea5e19be", "score": "0.6484749", "text": "public function options() {\n\t\t$this->view->pagetitle = 'Options | Welcome to Operation Braveheart';\n\t\t// get an array of additional stylesheets\n\t\t$this->view->styles = $this->model->setStylesheet(array('news', 'profile'));\n\t\t// get an array of additional JavaScripts\n\t\t$this->view->scripts = $this->model->setScripts(array('jquery.profile'));\n\t\t$this->view->heading = 'Edit Options';\n\t\t// set the large content image\n\t\t$this->view->imgclass = 'profilelrgimg';\n\t\t$this->view->adminimg = 'options.png';\n\t\t$this->view->alt = 'Edit website options';\n\t\t\n\t\t// display the breadcrumbs\n\t\t$nav_array = array(array(\"url\" => URL, \"name\" => \"Home\"),\n\t\t\t\t\t\t array(\"url\" => URL . \"profile\", \"name\" => \"User Profile\"),\n\t\t\t\t\t\t array(\"url\" => URL . \"editoptions\", \"name\" => \"Edit Options\")\n\t\t);\n\n\t\t$this->view->crumbs = $this->model->breadcrumbs($nav_array);\n\t\t\n\t\t// get the user's option from the database\n\t\t$json = json_decode($this->model->getOptions(), true);\n\n\t\t// populate the form with the user's options\n\t\t$this->view->email_admin = $json[0]['email_admin'];\n\t\t$this->view->email_other = $json[0]['email_other'];\n\t\t$this->view->autosubscribe = $json[0]['autosubscribe'];\n\t\t$this->view->pm_disabled = $json[0]['pm_disabled'];\n\t\t$this->view->pm_admin = $json[0]['pm_admin'];\n\t\t$this->view->new_prvt_msg = $json[0]['new_prvt_msg'];\n\t\t$this->view->save_sent_msgs = $json[0]['save_sent_msgs'];\t\t\t\n\t\t\n\t\t// render the html\n\t\t$this->view->render('header');\n $this->view->render('profile/options');\n $this->view->render('footer');\n\t}", "title": "" }, { "docid": "f78bf285d1b6c79a11a430cfbfd21606", "score": "0.64841706", "text": "public function optionAction() \r\n\t{ \r\n\t $post_string = \"options_AUF72F23.html?agent=INV123456\";\r\n\t\t$station = $this->curlRequest($post_string);\r\n\t}", "title": "" }, { "docid": "7508528ccbc47a879f9dcd67537a05e3", "score": "0.64835894", "text": "public function addOptionPage() {\n $new = true;\n $questions = Questions::all();\n $action = route('addOption');\n return view('editPages.edit_option', ['questions' => $questions, 'new' => $new, 'action' => $action]);\n }", "title": "" }, { "docid": "73eecc36227a5794e604fb88d0a06656", "score": "0.6482781", "text": "public function show(AdoptionStatus $adoptionStatus)\n {\n //\n }", "title": "" }, { "docid": "3b3f48e817bdf4ded415e419f11beacf", "score": "0.6467021", "text": "public function options() {\r\n Auth::checkAuthentication();\r\n //if is teacher, direct to options\r\n //else direct to Studentoptions\r\n $isTeacher = AccountModel::isTeacher(Session::get('user_role'));\r\n if($isTeacher){\r\n $this->View->render('login/options');\r\n }\r\n else {\r\n $this->View->render('login/studentOptions');\r\n }\r\n \r\n }", "title": "" }, { "docid": "db2c324700abe1dd722a652e944b29fc", "score": "0.64563775", "text": "public function index()\n {\n $option = Option::find(1);\n $templates = Template::all();\n return view('admin.option.index', compact('option', 'templates'));\n }", "title": "" }, { "docid": "9365ca207807625f84e512b4b93ea4c5", "score": "0.64544785", "text": "function dictionary_box_options_page() {\r\n\tadd_options_page('Dictionary Box Options', 'Dictionary Box', 10, 'dictionary-box/options.php');\r\n}", "title": "" }, { "docid": "1b6a9c0b5e634e4477da4772b829fa84", "score": "0.64487636", "text": "public function index()\n {\n $options = Option::paginate(10);\n\n return view('option.index', compact(\n 'options'\n ));\n }", "title": "" }, { "docid": "9702d1db4b7f2031095ff164f320671d", "score": "0.6448658", "text": "public function showAction()\n {\n if (!current_user_can(\\OmegaCommerce\\Model\\Menu::OMEGA_COMMERCE_CAPABILITY)) {\n wp_die(__('You do not have sufficient permissions to access this page.'));\n }\n\n // Render the settings template\n require_once(sprintf(\"%ssrc/view/templates/settings.php\", WP_OMEGA_COMMERCE_PLUGIN_PATH));\n }", "title": "" }, { "docid": "2d538db499b0e984c433a3fe4496a7bd", "score": "0.64425504", "text": "public function hookPublicItemsShow() {\n echo '<p>' . get_option('text_test') . '</p>';\n }", "title": "" }, { "docid": "86e174d2246b62b0de5d30f2cae1638e", "score": "0.6427719", "text": "public function admin_options() {\n\t\t\t?>\n\t\t\t<h3><?php _e('Pagamento Digital', 'woothemes'); ?></h3>\n\t\t\t<p><?php _e('Opção para pagamento através do Pagamento Digital', 'woothemes'); ?></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "ff88b4b5f889a8188f245ef8d1ec2393", "score": "0.64253134", "text": "public function show(Optionpolltype $optionpolltype)\n {\n //\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.6423303", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "33e478a49c40220af78f4a37adb98a7a", "score": "0.64188814", "text": "function oerc_addOptionsPage() {\n # The directory where this plugin was installed\n $plugindir = dirname(__FILE__);\n add_options_page(\"OER Commons Search Options\", \"OERC Search\", 10, __FILE__, \"oerc_loadOptionsPage\");\n}", "title": "" }, { "docid": "dc5e46bbdc954061be0a5615463143dc", "score": "0.64164585", "text": "public function optionPageTemplate()\n {\n wp_enqueue_script('postbox');\n\n global $modularityOptions;\n $modularityOptions = get_option($this->slug);\n\n // Load template file\n require_once MODULARITY_TEMPLATE_PATH . 'options/modularity-options.php';\n }", "title": "" }, { "docid": "ad1ad1feefae4a57564e5b7929650f8f", "score": "0.64161885", "text": "function show_action()\n {\n $this->requireRoot();\n\n Navigation::activateItem('/admin/config/' . self::NAVIGATION_ID);\n\n $parameters = array(\n 'plugin' => $this\n , 'settings' => $this->getSettings()\n , 'active' => $this->isChildPluginActivated()\n );\n\n $factory = new Flexi_TemplateFactory(__DIR__ . '/templates');\n echo $factory->render('show', $parameters, $GLOBALS['template_factory']->open('layouts/base'));\n }", "title": "" }, { "docid": "3e899ba7655c8570dad0511695d0ac7e", "score": "0.6408248", "text": "function admin_options() {\n\t\t?>\n\t\t<h3><?php _e('NetCents Widget','ncgw2'); ?></h3>\n \t<table class=\"form-table\">\n \t\t<?php $this->generate_settings_html(); ?>\n\t\t</table> <?php\n }", "title": "" }, { "docid": "2874c46411ada28a90ce106fa4f94082", "score": "0.6399535", "text": "function pmprogr_admin_add_page() {\r\n\tadd_options_page( 'PMPro GetResponse Options', 'PMPro GetResponse', 'manage_options', 'pmprogr_options', 'pmprogr_options_page' );\r\n}", "title": "" }, { "docid": "76d4511819a681af412dbb0c95bd2b62", "score": "0.63940465", "text": "public function index()\n {\n return view('subscription::sections.options.index');\n }", "title": "" }, { "docid": "b0efbc3d42d252f4ffd6392cb1ebd820", "score": "0.6387616", "text": "function sub_menu_page_option() {\n}", "title": "" }, { "docid": "1fc9c28ee5c8cb256b9b543191da79d9", "score": "0.6370901", "text": "function cd_options_page_section_callback() { \r\n\t\techo 'Find the exact employee that you are looking for.';\r\n\t}", "title": "" }, { "docid": "492d4e477f6d32fa804374a81db03195", "score": "0.6366635", "text": "public function printPageLinksInfo() {\n print 'Create and select the page that you will use for these options:';\n }", "title": "" }, { "docid": "0980e4bc134e779750525f09d5edc231", "score": "0.63663673", "text": "public function display() {\r\n\t\tif ( empty( $this->settings['options'] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif ( $this->settings['options'] == array() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->echoOptionHeader();\r\n\r\n\t\t// Get the correct value, since we are accepting indices in the default setting\r\n\t\t$value = $this->getValue();\r\n\r\n\t\t// print the palettes\r\n\t\tforeach ( $this->settings['options'] as $key => $colorSet ) {\r\n\t\t\tprintf( '<label id=\"%s\"><input id=\"%s\" type=\"radio\" name=\"%s\" value=\"%s\" %s/> <span>',\r\n\t\t\t\t$this->getID() . $key,\r\n\t\t\t\t$this->getID() . $key,\r\n\t\t\t\t$this->getID(),\r\n\t\t\t\tesc_attr( $key ),\r\n\t\t\t\t$value == $colorSet ? 'checked=\"checked\"' : '' // can't use checked with arrays\r\n\t\t\t);\r\n\t\t\tif ( ! is_array( $colorSet ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ( $colorSet as $color ) {\r\n\t\t\t\techo \"<span style='background: {$color}'></span>\";\r\n\t\t\t}\r\n\t\t\techo '</span></label>';\r\n\t\t}\r\n\r\n\t\t$this->echoOptionFooter();\r\n\t}", "title": "" }, { "docid": "4020a0afeb47a1e2e09d522194cc5c1e", "score": "0.6363895", "text": "public function options_page() {\n\t\tparent::options_page();\n\n\t\t$smartcrawl_options = Smartcrawl_Settings::get_options();\n\t\t$arguments = array(\n\t\t\t'post_types' => array(),\n\t\t\t'taxonomies' => array(),\n\t\t\t'engines' => array(\n\t\t\t\t'ping-google' => __( 'Google', 'wds' ),\n\t\t\t\t'ping-bing' => __( 'Bing', 'wds' ),\n\t\t\t),\n\t\t\t'checkbox_options' => array(\n\t\t\t\t'yes' => __( 'Yes', 'wds' ),\n\t\t\t),\n\t\t\t'verification_pages' => array(\n\t\t\t\t'' => __( 'All pages', 'wds' ),\n\t\t\t\t'home' => __( 'Home page', 'wds' ),\n\t\t\t),\n\t\t);\n\n\t\tforeach ( $this->_get_post_types_options() as $opt => $post_type ) {\n\t\t\t$arguments['post_types'][ $opt ] = $post_type;\n\t\t}\n\t\tforeach ( $this->_get_taxonomies_options() as $opt => $taxonomy ) {\n\t\t\t$arguments['taxonomies'][ $opt ] = $taxonomy;\n\t\t}\n\n\t\t$arguments['smartcrawl_buddypress'] = $this->_get_buddyress_template_values();\n\n\t\t$arguments['active_tab'] = $this->_get_active_tab( 'tab_sitemap' );\n\n\t\t$extra_urls = Smartcrawl_Sitemap_Utils::get_extra_urls();\n\t\tif ( is_array( $extra_urls ) ) {\n\t\t\t$arguments['extra_urls'] = ! empty( $extra_urls )\n\t\t\t\t? implode( \"\\n\", $extra_urls )\n\t\t\t\t: '';\n\t\t}\n\n\t\t$ignore_urls = Smartcrawl_Sitemap_Utils::get_ignore_urls();\n\t\tif ( is_array( $ignore_urls ) ) {\n\t\t\t$arguments['ignore_urls'] = ! empty( $ignore_urls )\n\t\t\t\t? implode( \"\\n\", $ignore_urls )\n\t\t\t\t: '';\n\t\t}\n\n\t\t$ignore_post_ids = Smartcrawl_Sitemap_Utils::get_ignore_ids();\n\t\tif ( is_array( $ignore_post_ids ) ) {\n\t\t\t$arguments['ignore_post_ids'] = ! empty( $ignore_post_ids )\n\t\t\t\t? implode( ',', $ignore_post_ids )\n\t\t\t\t: '';\n\t\t}\n\n\t\t$arguments['automatically_switched'] = (boolean) Smartcrawl_Sitemap_Utils::get_sitemap_option( 'sitemap-split-automatically' );\n\t\t$arguments['total_post_count'] = (int) Smartcrawl_Sitemap_Utils::get_sitemap_option( 'sitemap-post-count' );\n\n\t\twp_enqueue_script( Smartcrawl_Controller_Assets::SITEMAPS_PAGE_JS );\n\t\t$this->_render_page( 'sitemap/sitemap-settings', $arguments );\n\t}", "title": "" }, { "docid": "dd60101da3bd77fd73bc2562d370c891", "score": "0.63607526", "text": "public function display() {\r\n\t\t$this->echoOptionHeader( true );\r\n\r\n\t\techo '<fieldset>';\r\n\r\n\t\tforeach ( $this->settings['options'] as $value => $label ) {\r\n\t\t\tprintf('<label for=\"%s\"><input id=\"%s\" type=\"radio\" name=\"%s\" value=\"%s\" %s/> %s</label><br>',\r\n\t\t\t\t$this->getID() . $value,\r\n\t\t\t\t$this->getID() . $value,\r\n\t\t\t\t$this->getID(),\r\n\t\t\t\tesc_attr( $value ),\r\n\t\t\t\tchecked( $this->getValue(), $value, false ),\r\n\t\t\t\t$label\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\techo '</fieldset>';\r\n\r\n\t\t$this->echoOptionFooter( false );\r\n\t}", "title": "" }, { "docid": "a9742c848089fc5a48ebb0764c3567c2", "score": "0.63588965", "text": "static function add_options_page() {\n\t\t$type = 'Post';\n\t\tif (isset(static::$labels['singular'])) {\n\t\t\t$type = static::$labels['singular'];\n\t\t}\n\n\t\t$options_page_title = sprintf('%s Options', $type);\n\t\t$options_post_id = sprintf('%s-options', static::$name);\n\t\t$options_parent_slug = sprintf('edit.php?post_type=%s', static::$name);\n\n\t\tSkeletorThemeOptions::add_skeletor_options_page(\n\t\t\t$options_page_title,\n\t\t\tstatic::$options_field_group,\n\t\t\t$options_post_id,\n\t\t\t$options_parent_slug,\n\t\t\tstatic::$options_capability\n\t\t);\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.63515246", "text": "public function show(){}", "title": "" }, { "docid": "d1592aae617e6554ac895ad735409d71", "score": "0.63506615", "text": "function page_link_chooser_script()\n{\n\t// Check we are allowed here\n\tif (!has_zone_access(get_member(),'adminzone'))\n\t\taccess_denied('ZONE_ACCESS');\n\n\trequire_lang('menus');\n\n\trequire_javascript('javascript_ajax');\n\trequire_javascript('javascript_tree_list');\n\trequire_javascript('javascript_more');\n\n\tglobal $EXTRA_HEAD;\n\tif (!isset($EXTRA_HEAD)) $EXTRA_HEAD=new ocp_tempcode();\n\t$EXTRA_HEAD->attach('<meta name=\"robots\" content=\"noindex\" />'); // XHTMLXHTML\n\n\t// Display\n\t$content=do_template('PAGE_LINK_CHOOSER',array('NAME'=>'tree_list'));\n\t$echo=do_template('STYLED_HTML_WRAP',array('TITLE'=>do_lang_tempcode('CHOOSE'),'CONTENT'=>$content));\n\t$echo->handle_symbol_preprocessing();\n\t$echo->evaluate_echo();\n}", "title": "" }, { "docid": "7299709ceb4f23519952643ee613c47f", "score": "0.63418823", "text": "public function howToUsePage() {\n //Retrieve the list of Procedures sorted by name ASC\n $procedures = Utils::getProceduresForDropdown();\n $policies = Utils::getInsurancePoliciesForDropdown();\n\n $this->returnedData['data']['filters']['policies'] = $policies;\n\n $this->returnedData['success'] = true;\n $this->returnedData['data']['procedures'] = $procedures;\n\n //For Live environment just show the work in progress page\n if(env('APP_ENV') == 'live')\n return view('pages.workInProgress', $this->returnedData);\n return view('pages.howtousepage', $this->returnedData);\n }", "title": "" }, { "docid": "6557f9d0279f0e889d4703a27cfeeef8", "score": "0.63418156", "text": "function showPage() {\n\t\t$this->display ( $this->templatefile );\n\t}", "title": "" }, { "docid": "568701b6e0addfe38e21e950278571aa", "score": "0.6325316", "text": "function show_settings(){\n\t\tif( count( $this->setttings_parameters[0]['parameters'] ) == 0 ){ return false; }\n\t\t\n\t\t?>\n\t\t<div class=\"wrap tw-bs4\">\n\t\t\n\t\t<h2><?php echo $this->setttings_parameters[0]['form_title']; ?></h2>\n\t\t<hr/>\n\t\t<?php \n\t\t\techo $this->message;\n\t\t?>\n\t\t\n\t\t<?php if( $this->setttings_parameters[0]['is_form'] ): ?>\n\t\t\t<form class=\"form-horizontal\" method=\"post\" action=\"\">\n\t\t<?php endif; ?>\n\n\t\t<?php \n\t\twp_nonce_field( $this->setttings_prefix.'save_settings_action', $this->setttings_prefix.'save_settings_field' ); \n\t\t$config = get_option( $this->setttings_prefix.'_options'); \n\t\t \n\t\t?> \n\t\t<fieldset>\n\n\t\t\t<?php \n\t\t\tforeach( $this->setttings_parameters as $single_page ){\t\n\t\t\t\tforeach( $single_page['parameters'] as $key=>$value ){\t\n\t\t\t\t\t$interface_element = new formElementsClass( $value['type'], $value, $config[$value['name']] );\n\t\t\t\t\techo $interface_element->get_code();\t \n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</fieldset> \n\t\t\n\t\t<?php if( $this->setttings_parameters[0]['is_form'] ): ?>\n\t\t</form>\n\t\t<?php endif; ?>\n\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "59ca71edf70c5c8fe49f46e12a3bf41f", "score": "0.63229096", "text": "public function dp_setup_settings_page(){\n\n\t\t// get current settings from the database\n\t\t$settings = $this->get_settings();\n\t\t// create a pagenam id array to feed into the dr\n\t\t$pages = $this->get_page_id_list();\n\n\t\techo '<div class=\"wrap\">';\n\t\techo '<h2>DoPress Settings</h2>';\n\t\techo '<form name=\"dopress-settings\"> ';\n\t\tsettings_fields( 'dopress-settings-group' );\n\t\techo '<select name=\"page-id\">';\n\t\tforeach ($pages as $page) {\n\t\t\t//echo '<option '.selected($page->ID) .'value=\"'..'\"> </option>';\n\t\t}\n\t\tvar_dump($pages);\n\t\techo '</select>';\n\t\techo '</form> ';\n\t\techo '</div>';\n\n\t}", "title": "" }, { "docid": "b6dd1365af247f80ee8a22705111fa87", "score": "0.63134867", "text": "public function BMo_Expo_Admin_show_page() {\n\n\t\t\t?> \n\t\t\t<div class=\"wrap\">\n\t <div class=\"icon32\" id=\"icon-options-general\"></div> \n\t\t\t <h2>BMo Expo</h2> \n\t <div id=\"poststuff\">\n\t \t<div id=\"post-body\" class=\"metabox-holder columns-2\">\n\t\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t\t<?php do_meta_boxes(BMO_EXPO_PLUGINNAME,'normal', NULL); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"postbox-container-1\" class=\"postbox-container\">\n\t \t\t\t<?php do_meta_boxes(BMO_EXPO_PLUGINNAME, 'side', NULL); ?>\n\t </div>\n\t <div id=\"postbox-container-2\" class=\"postbox-container\" >\n\t\t\t\t\t\t <?php do_meta_boxes(BMO_EXPO_PLUGINNAME,'advanced',NULL); ?>\n\t </div>\n\t\t\t\t</div>\t\n\t </div>\n\t\n\t\t\t</div>\n\t <div class=\"clear\"></div>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "9292e744557cb4186414e3ff3ac8c71d", "score": "0.6312733", "text": "function show_pressabl_admin_options() {\n\t// Add various options for admin page\n\t$page = add_theme_page(\n\t\t'Extras',\n\t\t'Extras',\n\t\t'administrator',\n\t\t'pressabl_admin_features_page',\n\t\t'pressabl_admin_features'\n\t);\n\tadd_action( \"admin_print_styles-$page\", 'pressabl_admin_features_styles' ); // Add styles\n\n\t$page = add_theme_page(\n\t\t'Template Help',\n\t\t'Template Help',\n\t\t'administrator',\n\t\t'pressabl_admin_help_page',\n\t\t'pressabl_admin_help'\n\t);\n\tadd_action( \"admin_print_styles-$page\", 'pressabl_admin_features_styles' ); // Add styles\n\n\t// Register Settings\n\tregister_setting(\n\t\t'pressabl-admin-features', // Option group\n\t\t'pressabl_admin_features', // Option name\n\t\t'pressabl_admin_features_validate' // Validation callback\n\t);\n\n}", "title": "" }, { "docid": "c0eadc5ce213df3b1ed9f9fb4c3502f7", "score": "0.6312209", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $option_s = $em->getRepository('AppBundle:Option_')->findAll();\n\n return $this->render('admin/option_/index.html.twig', array(\n 'option_s' => $option_s,\n ));\n }", "title": "" }, { "docid": "75ea73755024536cc64cee8ba5439688", "score": "0.6300774", "text": "function build_option_pages()\n\t{\n\t\tif (!current_user_can(LIST_ALERTS_CAPABILITY))\n\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\n\t\t// Init the class\n\t\t$page = $_GET['page'];\t\t\n\t\t$bwp_option_page = new BWP_OPTION_PAGE($page);\n\n\t\t$options = array();\n\t\t$dynamic_options = array();\n\n\t\t// Remove all submit buttons\n\t\tadd_filter('bwp_option_submit_button', create_function('', 'return \"\";'));\n\t\t// Remove donation box\n\t\tremove_action('bwp_option_action_before_form', array($this, 'show_donation'), 12);\n\nif (!empty($page))\n{\n\tif ($page == 'mrdummy')\n\t{\n\t\t$bwp_option_page->set_current_tab(1);\n\n\t\t$form = array(\n\t\t\t'items'\t\t\t=> array('heading'),\n\t\t\t'item_labels'\t=> array\n\t\t\t(\n\t\t\t\t__('Listing Alerts Statistics', 'list-alerts')\n\t\t\t),\n\t\t\t'item_names'\t=> array('h1'),\n\t\t\t'heading'\t\t=> array(\n\t\t\t\t'h1'\t=> __('Placeholder for future features', 'list-alerts')\n\t\t\t),\n\t\t\t'container'\t=> array(\n\t\t\t\t'h4' => __('After you activate this plugin, all sitemaps should be available right away. The next step is to submit the sitemapindex to major search engines. You only need the <strong>sitemapindex</strong> and nothing else, those search engines will automatically recognize other included sitemaps.', 'list-alerts')\n\t\t\t)\n\t\t);\n\n\t\t// Assign the form and option array\n\t\t$bwp_option_page->init($form, array(), $this->form_tabs);\n\t\t// Build the option page\n\t\techo $bwp_option_page->generate_html_form();\n\t}\n\telse if ($page == LIST_ALERTS_USERS)\n\t{\n\t\t$bwp_option_page->set_current_tab(1);\n\t\t// Assign the form and option array\n\t\t$bwp_option_page->init(array('items' => array(), 'item_labels' => array(), 'item_names' => array()), array(), $this->form_tabs);\n\t\t// Build the option page\n\t\tadd_action('bwp_option_action_before_form', array($this, 'admin_show_users'));\n\t\techo $bwp_option_page->generate_html_form();\n\t}\n}\n\n\t}", "title": "" }, { "docid": "b39247f532b2582ca3c99d0a26ba4887", "score": "0.62994903", "text": "function data_retriever_admin_menu_option()\n{\n add_menu_page(\n 'Settings for Data Retriever',\n 'Data Retriever',\n 'manage_options',\n 'data-retriever-settings',\n 'data_retriever_settings_page',\n '',\n 200\n );\n}", "title": "" }, { "docid": "779f81348ddcffa11e6462b5051ce7fb", "score": "0.6298597", "text": "function boj_myplugin_option_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2>My plugin</h2>\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<?php settings_fields('boj_myplugin_options'); ?>\n\t\t\t<?php do_settings_sections('boj_myplugin'); ?>\n\t\t\t<input name=\"Submit\" type=\"submit\" value=\"Save Changes\" />\n\t\t</form>\n\t</div>\n\t<?php\n}", "title": "" }, { "docid": "4b874eb748ff02877f5e54f9bb2cbafa", "score": "0.62952214", "text": "public function options_page() {\n\t\tadd_menu_page(\n\t\t\t'Admin Editor Options',\n\t\t\t'Admin Editor',\n\t\t\t'manage_options',\n\t\t\t'admin_editor',\n\t\t\tarray( $this, 'admin_editor_options_page_html' )\n\t\t);\n }", "title": "" }, { "docid": "b1696d7d5dbf324b750ed9d77a5d0d30", "score": "0.62943083", "text": "public function add_options_page() {\n\t\t$this->options_page = add_submenu_page(\n\t\t\t'options-general.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}", "title": "" }, { "docid": "94673ba6c16e9de53ca0adce8d02fef2", "score": "0.62923306", "text": "public function create_admin_page()\r\n {\r\n $this->options = get_option('delivery_pay_settings');\r\n ?>\r\n <div class=\"wrap\">\r\n <form method=\"post\" action=\"options.php\">\r\n <?php\r\n // This prints out all hidden setting fields\r\n settings_fields('delivery_pay_base_settings');\r\n do_settings_sections('delivery_pay_setting_admin');\r\n submit_button();\r\n ?>\r\n </form>\r\n </div>\r\n <?php\r\n\r\n }", "title": "" }, { "docid": "ae5b2d3730b056111788d2643ac3f894", "score": "0.6282272", "text": "function admin_page() {\n\t\t\tglobal $wp_version;\n\n\t\t\trequire 'wppe-options.php';\n\t\t}", "title": "" }, { "docid": "0210e7c92bc5cf60601926ed16d50adb", "score": "0.62741464", "text": "private function SetShowPage()\n\t{\n\t\t$this->pObjResponse->SetTitle('Todo Page');\n\t\t$strBody = '';\n\t\t\n\t\t$objView = new TodoView;\n\t\t$strBody .= $objView->GetPage();\n\t\t$this->pObjResponse->SetBody($strBody);\n\t\t\n\t\t$this->pObjResponse->SetTemplate('tp-todo.php');\n\t\t\n\t}", "title": "" }, { "docid": "68acad898dfaf4f08201fe0c22f25513", "score": "0.62728256", "text": "function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_quiz' => 'ACP/quiz' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'winners':\n\t\t\t\t$this->winners();\n\t\t\t\tbreak;\n\t\t\tcase 'questions':\n\t\t\t\t$this->questions();\n\t\t\t\tbreak;\n\t\t\tcase 'questions2':\n\t\t\t\t$this->questions2();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "ac4abcdc56cb8e985cc81a8b59da7fff", "score": "0.6269333", "text": "function faster_insert_option() {\r\n\t\tadd_options_page(__('Faster Image Insert - User Options','faster-image-insert'), 'Faster Image Insert', 8, __FILE__, 'faster_insert_option_detail');\r\n\t}", "title": "" }, { "docid": "84fe3e2aaed054d4613e7e9419ce0b72", "score": "0.6254526", "text": "function http_get_display_settings_page() {\n\n\t// check if user is allowed access\n\tif ( ! current_user_can( 'manage_options' ) ) return;\n\n\t?>\n\n\t<style>\n\t\tpre {\n\t\t\twidth: 95%; overflow: auto; margin: 20px 0; padding: 20px;\n\t\t\tcolor: #fff; background-color: #424242;\n\t\t}\n\t</style>\n\n\t<div class=\"wrap\">\n\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\n\t\t<?php echo http_get_response(); ?>\n\n\t</div>\n\n<?php\n\n}", "title": "" }, { "docid": "00e8c64b6b98b0d0d34d72c7b108677e", "score": "0.6252808", "text": "function showPageContent() {}", "title": "" }, { "docid": "09fb43e2d91599bc0167786157cf4dbf", "score": "0.6252599", "text": "public function load_settings_page() {\n\t\t// check user capabilities.\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You do not have sufficient permissions to access this page.' ) );\n\t\t}\n\n\t\tinclude_once( 'partials/sf-modify-wp-query-admin-display.php' );\n\t}", "title": "" }, { "docid": "b6b847c819b64527dc44bf45e6ead37e", "score": "0.62498444", "text": "public function markup_settings_page()\n {\n if (current_user_can(static::REQUIRED_CAPABILITY)) {\n\n /** @var \\Plugin_Name\\App\\Model\\Admin\\AdminSettings $AdminSettingsModel */\n $AdminSettingsModel = $this->loadModel('Admin/AdminSettings', 'Plugin_Name\\App');\n\n\n return print $this->view->render(\n 'admin/page-settings/page-settings.php',\n [\n 'page_title' => Plugin_Name::PLUGIN_NAME,\n 'settings_name' => $AdminSettingsModel->getPluginSettingsOptionKey(),\n ]\n );\n } else {\n wp_die(__('Access denied.')); // WPCS: XSS OK.\n }\n }", "title": "" }, { "docid": "bab701acbc76b4075e19dcec7391488f", "score": "0.6242347", "text": "public function admin_options() {\n echo '<h3>' . __('Hubtel Payment Gateway', 'hubtel_payment_gateway') . '</h3>';\n echo '<p>' . __('Hubtel Payment is most popular payment gateway for online shopping in Ghana.') . '</p>';\n echo '<table class=\"form-table\">';\n $this->generate_settings_html();\n echo '</table>';\n }", "title": "" } ]
9dc9bbc1bf8ed62c6ac0a7c7f1211731
This is the link to the new page
[ { "docid": "544f9f3f7be254bdd90c91478278183a", "score": "0.0", "text": "public function getPrimaryLink() {\n\t $link = $this->getPageLink( $this->event->getTitle(), null, true );\n return $link;\n }", "title": "" } ]
[ { "docid": "26086c056e9f8a1259559d696f6f1cb9", "score": "0.7192288", "text": "function newPage() {\n\t\t\t$this->AddPage();\n\t\t}", "title": "" }, { "docid": "3f32b7885f9b47b5641f78deeb241173", "score": "0.6852824", "text": "function wpu_newposts_link() {\n\techo get_wpu_newposts_link();\n}", "title": "" }, { "docid": "582867ae0a8ec0fbe97fd9603dd37379", "score": "0.6720194", "text": "function createNewPage(){\n parent::doOpenLink();\n parent::doLogin();\n parent::doCreateNewPageTemporary();\n }", "title": "" }, { "docid": "12e21ab9883ae246b14ec5868c24c42b", "score": "0.6584341", "text": "function add_new_uri() {\n\t\t$request = get_admin_url() . \"admin.php?page=new-workshop\";\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "33ef0373f8e1bbd8be715163be33147b", "score": "0.65795505", "text": "public function clickNewReservationLink()\n {\n $I = $this;\n $I->amOnPage(FormosHomePage::$URL);\n $I->waitForElementVisible(FormosHomePage::$newRevervationLink, 30);\n $I->click(FormosHomePage::$newRevervationLink);\n $I->waitForElementVisible(ReservationPage::$tableIDField, 30);\n }", "title": "" }, { "docid": "4292e483df9f51f753e010e7660d1c71", "score": "0.65573615", "text": "function new_article_link() {\n\tif($_REQUEST['LOCALE_META_KEYWORDS']!=null && $_REQUEST['LOCALE_META_KEYWORDS']!='') {\n\t\t$newarticlelink = '<h2><a href=\"./cmseditarticle?locale='.$_REQUEST['locale'].'&new=1\">Add Article +</a></h2>';\n\t\techo $newarticlelink;\n\t}\n}", "title": "" }, { "docid": "569c461090f6c14078df413d7249a381", "score": "0.6464187", "text": "public function hrefGenerator() {\n $link = \"\";\n\n if (isset($_GET[self::$urlCreateTask]) || isset($_GET[self::$editTask])) {\n $link = '<a href =\"' . self::$urlTaskList . '\">Back to tasks</a>';\n } else {\n $link = '<a href =\"?' . self::$urlCreateTask . '\">Create new task</a>';\n }\n return $link;\n }", "title": "" }, { "docid": "88841a3caaa74dce2a779f33807c7ec7", "score": "0.6454866", "text": "public function getCreateLink()\n {\n $link = Globals::getRouter()->assemble(array('dataType' => 'sujet', 'forumId' => $this->forumId), $this->_createRoute, true);\n return $link;\n }", "title": "" }, { "docid": "8b94df7110908ad0010a019508c660cc", "score": "0.6454804", "text": "function newpage($newpage) {\n$host = $_SERVER['HTTP_HOST'];\n $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\\\');\n\n header(\"Location: http://$host$uri/$newpage\");\n exit;\n}", "title": "" }, { "docid": "82e5eab07f733553ffe5a31a8a849ac8", "score": "0.64410716", "text": "public function create()\n {\n //加载添加友情链接页面\n return view('/admin/Link/create');\n }", "title": "" }, { "docid": "928ae4284e96eaeb2f35e6a691f7dca3", "score": "0.64259243", "text": "function action()\n {\n return common_local_url('newpoll');\n }", "title": "" }, { "docid": "de07193a95d1f08bb5521d38c121a10a", "score": "0.6393152", "text": "public function newAction() {\n\t\tZend_Session::namespaceUnset('landlords_insurance_quote');\n\t\t$this->_helper->redirector->gotoUrl('/landlords/insurance-quote/step1');\n\t}", "title": "" }, { "docid": "12ec696fe2d9664a4deb4c5612c449f8", "score": "0.63910973", "text": "public function create()\n {\n //\n return view('Admin.Link.add');\n }", "title": "" }, { "docid": "f2ce02712c7f6cac2e02d685c56e29aa", "score": "0.63786393", "text": "public function doNew()\n {\n $this->render('new');\n }", "title": "" }, { "docid": "c916e2b3b560e61cb13f9beb9f369ffe", "score": "0.6362442", "text": "function CreateAccountLink() {\n return $this->URLSegment . '/createaccount';\n }", "title": "" }, { "docid": "7261ee6c79f1e1e530a5f6c4969b3584", "score": "0.6349117", "text": "public function create()\n {\n return view('admin.link.create');\n }", "title": "" }, { "docid": "7261ee6c79f1e1e530a5f6c4969b3584", "score": "0.6349117", "text": "public function create()\n {\n return view('admin.link.create');\n }", "title": "" }, { "docid": "eb814e6688474fca5fa410b629b36021", "score": "0.6328461", "text": "public function redirectLink();", "title": "" }, { "docid": "45ade0ad1e1b6b3849b41fa129d00e40", "score": "0.63125104", "text": "public function create()\n {\n return view('admin.link.add');\n }", "title": "" }, { "docid": "45ade0ad1e1b6b3849b41fa129d00e40", "score": "0.63125104", "text": "public function create()\n {\n return view('admin.link.add');\n }", "title": "" }, { "docid": "de8ea659e9517dad9b075abbffb4c9ad", "score": "0.6274083", "text": "public function link() {\r\n\t\treturn \"<a href=\\\"\" . $this->url () . \"\\\">\" . $this->title . \"</a>\";\r\n\t}", "title": "" }, { "docid": "691bd4c698b2a72dff56e4fbebe67cd6", "score": "0.6272509", "text": "public function getNewUrl();", "title": "" }, { "docid": "4d76e336a3941ef1f03b68e1a3c49b53", "score": "0.62709016", "text": "function get_wpu_newposts_link() {\n\tglobal $phpbbForum, $phpEx;\n\tif( $phpbbForum->user_logged_in() ) {\n\t\treturn '<a href=\"'. $phpbbForum->append_sid($phpbbForum->get_board_url() . 'search.'.$phpEx.'?search_id=newposts') . '\"><strong>' . get_wpu_newposts() .\"</strong>&nbsp;\". __('posts since last visit', 'wp-united') . \"</a>\";\n\t}\n}", "title": "" }, { "docid": "7f89f60f2d9dc4ab37be0f2e562fb068", "score": "0.6261662", "text": "public function create()\n {\n\t\treturn view('links.create');\n }", "title": "" }, { "docid": "20a6475b5da05218364d8bbc290c8a2f", "score": "0.62586504", "text": "protected function getUriWizardNew() {\n\t\t$idParameter = '';\n\t\tif (GeneralUtility::_GP(Parameter::PID)) {\n\t\t\t$idParameter = sprintf('id=%s&', GeneralUtility::_GP(Parameter::PID));\n\t\t}\n\t\t$uri = sprintf('db_new.php?%sreturnUrl=%s',\n\t\t\t$idParameter,\n\t\t\trawurlencode($this->getModuleLoader()->getModuleUrl())\n\t\t);\n\t\treturn $uri;\n\t}", "title": "" }, { "docid": "22e9e7036febe3b6d3189361a2946a74", "score": "0.62517756", "text": "public function create()\n {\n\n return view('admin.link.create');\n }", "title": "" }, { "docid": "d14dd5370255adf11722d1fb88b4c31d", "score": "0.6246339", "text": "private function toPage()\n {\n $this->redirect(REGISTER_URI, $this->data);\n }", "title": "" }, { "docid": "fbdf2c1cb2237e180ce56c56319bb106", "score": "0.6223079", "text": "public function createIndexLink()\n {\n global $global;\n\n $link = $global->instance['fb_page_url'] . \"?sk=app_\" . $global->instance['fb_app_id'] ;\n\n return $link;\n }", "title": "" }, { "docid": "4a63d4792c9d7ba00bd22c903baea148", "score": "0.61995417", "text": "public function addPage(){\n\t\n\t\t$data\t= JRequest::get( 'post', '' );\n\t\t\n\t\t$model\t= $this->getModel( 'brochure' );\n\t\t$save\t= $model->addPage( $data );\n\t\t\n\t\t$this->setRedirect( 'index.php?option=com_zbrochure&view=brochure&id='.(int)$save->bro_id.'#page-'.$save->bro_page_order, JText::_( 'NEW_PAGE_ADDED' ) );\n\t\n\t}", "title": "" }, { "docid": "7adb098eb45bac7d6381f0b7d53b393a", "score": "0.6176712", "text": "public function create()\n {\n $nb=$this->nb;\n $url=$_SERVER['HTTP_REFERER'];\n\n return view('pages.UTE.create',[\n\n 'nb'=>$nb,\n 'url'=>$url\n\n ]);\n }", "title": "" }, { "docid": "6e4390107400efbe730a0ecfbfb80803", "score": "0.61668813", "text": "public function create()\n {\n return view('admin.modules.websiteLink.create');\n }", "title": "" }, { "docid": "dfce83749da2bc9e898f3bb1ba46141a", "score": "0.61635214", "text": "public function newAction()\n {\n return $this->render('choir/new.html.twig');\n }", "title": "" }, { "docid": "0b1017b656975ab213c6a49064a2c6ad", "score": "0.61579585", "text": "public function newpage()\n {\n $this->load->view('adminTemplate/header');\n $this->load->view('adminTemplate/Payment/newpage');\n $this->load->view('adminTemplate/footer');\n }", "title": "" }, { "docid": "b7c34fbbf06a3b202417b275277ef7f4", "score": "0.6154909", "text": "public function reports_menu_link()\n\t{\n\t\t$fusionsystem = new View(\"ivr_api/ivr-link\");\n\t\t$fusionsystem->render(TRUE);\n\t}", "title": "" }, { "docid": "183fc7b690facede92e7f8fbe694c32f", "score": "0.61527216", "text": "public function newpage()\n {\n $this->load->view('adminTemplate/header');\n $this->load->view('adminTemplate/Category/newpage');\n $this->load->view('adminTemplate/footer');\n }", "title": "" }, { "docid": "74bd820a6cde8614a22f878bc74155dc", "score": "0.6149412", "text": "protected function getNewUri() {\n\t\treturn sprintf('alt_doc.php?returnUrl=%s&edit[%s][%s]=new',\n\t\t\trawurlencode($this->getModuleLoader()->getModuleUrl()),\n\t\t\trawurlencode($this->getModuleLoader()->getDataType()),\n\t\t\t$this->getStoragePid()\n\t\t);\n\t}", "title": "" }, { "docid": "78730098f2deb900a2a6de725d391a47", "score": "0.61418724", "text": "public function create()\n {\n return view(\"link.create\"); //create.blade.php\n }", "title": "" }, { "docid": "b7e14519f5e45ddb0cf295a3c3e2d546", "score": "0.61140597", "text": "function snax_render_legal_page_link() {\n\t?>\n\t<?php if ( snax_get_legal_page_id() ) : ?>\n\t\t<a class=\"snax-legal-link\" href=\"<?php echo esc_url( snax_get_legal_page_url() ); ?>\"\n\t\t target=\"_blank\"><?php esc_html_e( 'Learn more', 'snax' ); ?></a>\n\t<?php endif; ?>\n\t<?php\n}", "title": "" }, { "docid": "07c631b9a3c135a83f84a2b93fe9857e", "score": "0.6082747", "text": "function newFormBookmark()\n\t{\n\t\t$form = $this->initFormBookmark();\n\t\t$html1 = $form->getHTML();\n\t\t$html2 = '';\n\t\tif(!$_REQUEST[\"bm_link\"])\n\t\t{\n\t\t\t$form2 = $this->initImportBookmarksForm();\n\t\t\t$html2 = \"<br />\" . $form2->getHTML();\n\t\t}\n\t\t$this->tpl->setVariable(\"ADM_CONTENT\", $html1 . $html2);\n\t}", "title": "" }, { "docid": "8f045608414c754f8b922e0175c91245", "score": "0.60782105", "text": "public function create()\n {\n $parent = DB::table('links')->get();\n return view('addLink', ['parent' => $parent]);\n }", "title": "" }, { "docid": "b8fd0a7b1921330a81c298f822b3c5cb", "score": "0.60695994", "text": "public function newAction() {\r\n View::render('Signup/new.php');\r\n }", "title": "" }, { "docid": "6b6e6d003546af7a89e6e6d80181dc92", "score": "0.60690403", "text": "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_hostcommand_add_list', array('content' => $content));\n }", "title": "" }, { "docid": "904ec0d8a22c206338132c3741cfa83d", "score": "0.60672444", "text": "public function newAction()\n {\n // the same form is used to create and edit\n $this->_forward('edit');\n }", "title": "" }, { "docid": "6454ece2fb1e43756de5a8e81e89e616", "score": "0.60604084", "text": "public function newAction()\n\t{\n\t\t$this->_forward('edit');\n\t}", "title": "" }, { "docid": "ad660cf1200e56b7cb6ff901cd181807", "score": "0.6057657", "text": "function displayCreateButton(){\r\n echo \"<a href='create.php' class='btn btn-success' style='margin-bottom:20px;'>Create New</a>\";\r\n\r\n }", "title": "" }, { "docid": "1ae76d9e06c2e58ba33fea80bd35f1ca", "score": "0.6048242", "text": "public function create()\n {\n return view('linky::admin.page.create');\n }", "title": "" }, { "docid": "caea75bb6176c9a5e2f33775172f2fa2", "score": "0.60358644", "text": "public function create()\n {\n return view('links.create');\n }", "title": "" }, { "docid": "caea75bb6176c9a5e2f33775172f2fa2", "score": "0.60358644", "text": "public function create()\n {\n return view('links.create');\n }", "title": "" }, { "docid": "caea75bb6176c9a5e2f33775172f2fa2", "score": "0.60358644", "text": "public function create()\n {\n return view('links.create');\n }", "title": "" }, { "docid": "b455518a6b0afb64371f505c4728a594", "score": "0.6024543", "text": "public function Link(){\n\t\t$link = \"\";\n\t\tif($page = SessionsHolder::get()->First()) {\n\t\t\t$link = $page->Link('?Location=').$this->ID;\n\t\t}\n\n\t\treturn $link;\n\t}", "title": "" }, { "docid": "beb9389a2232a633376e40178a55cb8b", "score": "0.60210145", "text": "public function open_permalink() {\n\t\tprintf(\n\t\t\t'<a href=\"%1$s\" title=\"%2$s\">',\n\t\t\tesc_url( get_permalink( $this->get_data( 'post_id' ) ) ),\n\t\t\tesc_attr( get_the_title( $this->get_data( 'post_id' ) ) )\n\t\t);\n\t}", "title": "" }, { "docid": "338a9286385ca0627b2b18579b7d1bc6", "score": "0.6016239", "text": "public function create()\n\t{\n $link = new Link;\n $link->url = request()->url;\n $link->save();\n\n //create the code for new entry\n $link->code = base_convert($link->id, 10, 36);\n $link->save();\n\n return \"Here's your new url code: \" . $link->code;\n\n\t}", "title": "" }, { "docid": "0546d6113d2bf74e988a96d006d9a7c2", "score": "0.60134554", "text": "public function success_page_link() {\n\t\t\treturn apply_filters( 'jet-theme-wizard/success-redirect-url', $this->get_page_link( 'success' ) );\n\t\t}", "title": "" }, { "docid": "0ab5f54e7dd7639bc12f7141bd02da26", "score": "0.60062003", "text": "public function addPage()\n {\n }", "title": "" }, { "docid": "4286606cea9d812c4194cf6c102b2e49", "score": "0.59990424", "text": "function GenerateLink($pageName, $link){\n\t$returnString = \"<a href='\" . $link . \"'>\" . $pageName . \"</a>\";\n\treturn $returnString;\n}", "title": "" }, { "docid": "ab8694125d6d931d2f5c3660c0814a1b", "score": "0.5980203", "text": "public function newAction()\n {\n\n return $this->doNew();\n }", "title": "" }, { "docid": "00baf4674e3091ae25100ff226a6d1f2", "score": "0.5973659", "text": "function goToSubmitPage(){\n\t\tif (isset($_POST['new'])){\n\t\t\theader('Location: http://cs.okstate.edu/~mwhelan/Submit_User.html');\n\t\t}\n\t}", "title": "" }, { "docid": "749cdd3a2a6152f3b6a524ba4500f151", "score": "0.59517074", "text": "public function get_add_page()\n {\n return view('admin.add_page');\n }", "title": "" }, { "docid": "9b102fc94a521d491d5b0995022bda98", "score": "0.5944238", "text": "public function newAction()\n {\n $this->_forward('edit');\n }", "title": "" }, { "docid": "9b102fc94a521d491d5b0995022bda98", "score": "0.5944238", "text": "public function newAction()\n {\n $this->_forward('edit');\n }", "title": "" }, { "docid": "9b102fc94a521d491d5b0995022bda98", "score": "0.5944238", "text": "public function newAction()\n {\n $this->_forward('edit');\n }", "title": "" }, { "docid": "9b102fc94a521d491d5b0995022bda98", "score": "0.5944238", "text": "public function newAction()\n {\n $this->_forward('edit');\n }", "title": "" }, { "docid": "9b102fc94a521d491d5b0995022bda98", "score": "0.5944238", "text": "public function newAction()\n {\n $this->_forward('edit');\n }", "title": "" }, { "docid": "b78e755e7b551a6ad89d93ce89c4c42f", "score": "0.5916152", "text": "public function create()\n {\n $this->authorize('update', Link::class);\n return view('links.create');\n }", "title": "" }, { "docid": "038440192900a8fe4fdfe70d0b7741f6", "score": "0.59131116", "text": "public function create()\n {\n return View::make('admin.links.create')\n ->with('link', new Link);\n }", "title": "" }, { "docid": "a8b24aadee767710aeed2518dd845b0b", "score": "0.5912458", "text": "public function renderLink(){\n if($this->isLoggedIn){\n return '';\n }\n if(isset($_GET['register']) == true){\n return '<a href=\"?\">Back to login</a>';\n }\n return '<a href='. self::$registerurl .'>Register a new user</a>';\n }", "title": "" }, { "docid": "02a47f84cc964bdcec79f6653b26cedf", "score": "0.58869773", "text": "public function newAction()\n {\n $entity = new HeaderLink();\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "b7bd026deba925e359158202bd62df4b", "score": "0.58840954", "text": "public function get_link() {\r\n\r\n\t\treturn add_query_arg(\r\n\t\t\t'page',\r\n\t\t\tArea::SLUG . '-' . $this->slug,\r\n\t\t\tadmin_url( 'admin.php' )\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "c3d9c26040b3cc6f5d65a6e3d2f32e1b", "score": "0.5878463", "text": "public function create()\n {\n //tidak perlu, karena tidak membuka page create yang baru\n }", "title": "" }, { "docid": "fa7488bef5047dcaeee2e4759df47dc6", "score": "0.5875678", "text": "public function newpage()\n {\n $this->load->view('sellerTemplate/layout/header');\n $this->load->view('sellerTemplate/Payment/newpage');\n $this->load->view('sellerTemplate/layout/footer');\n }", "title": "" }, { "docid": "7f7f8208482e92f1ea6b3386c950969f", "score": "0.5868749", "text": "public function getCreatenew()\n {\n return View::make('page.createnew');\n }", "title": "" }, { "docid": "f07aae6a54be3181b2985fbfba35f6a0", "score": "0.5843539", "text": "public function create()\n {\n return view('links.add', [\n []\n ]);\n }", "title": "" }, { "docid": "59361f0f70bdb5933ce2b115d0a2f2ae", "score": "0.5841513", "text": "function myMenuAddLink (&$page, $linktarget, $linkname, $targetmenu, $classinfo='' )\n {\n $link = '<a href=\"'.$linktarget.'\">'.$linkname.'</a>';\n $addlink = \"<li $classinfo>\".$link.\"</li>\\n\";\n $textcontent = $addlink;\n \n $page->replaceVarNext($targetmenu, $textcontent);\n }", "title": "" }, { "docid": "8bac2ae910e322069c3a7e8942c39d82", "score": "0.58364296", "text": "public function render() {\n\n\t\t// General New button\n\t\tif ($this->getModuleLoader()->copeWithPageTree()) {\n\n\t\t\t// Wizard \"new\", typo3/db_new.php\n\t\t\t$output = sprintf('<a href=\"%s\" title=\"%s\" class=\"btn-new-top\">%s</a>',\n\t\t\t\t$this->getUriWizardNew(),\n\t\t\t\t$this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:newRecordGeneral'),\n\t\t\t\tIconUtility::getSpriteIcon('actions-document-new')\n\t\t\t);\n\n\t\t\t// Add an icon right to the wizard \"new\".\n\t\t\t$currentDataType = $this->getModuleLoader()->getDataType();\n\t\t\t$spriteForCurrentDataType = IconUtility::mapRecordTypeToSpriteIconName($currentDataType, array());\n\n\t\t\t$output .= sprintf(' <a href=\"%s\" title=\"%s\" class=\"btn-new-top\">%s</a>',\n\t\t\t\t$this->getNewUri(),\n\t\t\t\t$this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:newRecordGeneral'),\n\t\t\t\tIconUtility::getSpriteIcon($spriteForCurrentDataType) // temporary code. Find a better solution GUI-wise. Perhaps a dropdown menu with multiple \"add\" variants.\n\t\t\t);\n\n\t\t} else {\n\n\t\t\t// New button only for the current data type.\n\t\t\t$output = sprintf('<a href=\"%s\" title=\"%s\" class=\"btn-new-top\">%s</a>',\n\t\t\t\t$this->getNewUri(),\n\t\t\t\t$this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:newRecordGeneral'),\n\t\t\t\tIconUtility::getSpriteIcon('actions-document-new')\n\t\t\t);\n\t\t}\n\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "ef70c0454fdc5fbe25f99d89ad0542af", "score": "0.58309793", "text": "public function linkHome() {\n return \"https://www.film2serial.ir/\";\n }", "title": "" }, { "docid": "62ece114794f5dafb7d19c92b004ca80", "score": "0.58304", "text": "public function nextPageUrl();", "title": "" }, { "docid": "1a47a8a0905422cd5596025c1bb23f66", "score": "0.58240443", "text": "function getCreateEventUrl() {\n\t\t$calendarModuleModel = Vtiger_Module_Model::getInstance('Calendar');\n\t\treturn $calendarModuleModel->getCreateEventRecordUrl().'&link='.$this->getId();\n\t}", "title": "" }, { "docid": "1b5c72997cd1fd27530b7a623d175276", "score": "0.5824019", "text": "public function newAction()\n {\n $this->loadLayout()\n ->_setActiveMenu('system/brontosoftware_connector')\n ->renderLayout();\n }", "title": "" }, { "docid": "805081f62b30fd8364557f5e5af96cdd", "score": "0.5820335", "text": "function panel_Add($ret_link, $ret_string){\r\n\t\t\techo '<p class=\"add\"><a href=\"'.$ret_link.'\" title=\"Add\"><strong>Click here</strong></a>&nbsp;'.$ret_string.'</p>';\r\n\t\t}", "title": "" }, { "docid": "ac079b9682745629d2343cada7fac4a2", "score": "0.5819609", "text": "public function Links() { \n $this->Menu();\n \n $ne = CNeurosis::Instance();\n \n $url = 'developer/links';\n $current = $ne->request->CreateUrl($url);\n\n $ne->request->cleanUrl = false;\n $ne->request->querystringUrl = false;\n $default = $ne->request->CreateUrl($url);\n \n $ne->request->cleanUrl = true;\n $clean = $ne->request->CreateUrl($url);\n \n $ne->request->cleanUrl = false;\n $ne->request->querystringUrl = true; \n $querystring = $ne->request->CreateUrl($url);\n \n $ne->data['main'] .= <<<EOD\n<h2>CRequest::CreateUrl()</h2>\n<p>Here is a list of urls created using above method with various settings. All links should lead to\nthis same page.</p>\n<ul>\n<li><a href='$current'>This is the current setting</a>\n<li><a href='$default'>This would be the default url</a>\n<li><a href='$clean'>This should be a clean url</a>\n<li><a href='$querystring'>This should be a querystring like url</a>\n</ul>\n<p>Enables various and flexible url-strategy.</p>\nEOD;\n }", "title": "" }, { "docid": "e5ee31e72d8f0353f22320881abba849", "score": "0.58185405", "text": "protected function BackLink()\n {\n $params = array('site'=>$this->site->GetID());\n if ($this->page->Exists())\n {\n $params['selected'] = $this->page->GetID();\n }\n else if ($this->previous)\n {\n $params['selected'] = $this->previous->GetID();\n }\n else if ($this->parent)\n {\n $params['selected'] = $this->parent->GetID();\n }\n return BackendRouter::ModuleUrl(new PageTree(), $params);\n }", "title": "" }, { "docid": "a9b863939b0b2ea6b9a37d600b343e5d", "score": "0.5794554", "text": "public function getNewPageRoute()\n {\n return $this->newPageRoute;\n }", "title": "" }, { "docid": "b2cb18e73833b94ab20ab76c12a5842e", "score": "0.5783885", "text": "public function getAddPage()\n\t\t{\n\t\t\treturn View::make('admin.pages_add');\n\t\t}", "title": "" }, { "docid": "b157e2c4ae86f13a15f4d710efe20823", "score": "0.5783868", "text": "public function get_page_link($page)\r\n\t\t{\r\n\t\t\treturn \"<a title=\\\"Seite $page\\\" href=\\\"$this->url&amp;pageid=\".($page-1).\"\\\">$page</a>\";\r\n\t\t}", "title": "" }, { "docid": "27c985d476eb6a6d88c5c55bfd1adee0", "score": "0.5775026", "text": "public function actionNew() {\n view()->addLocation(app_path() . '/modules/customers/core/views');\n return view('new');\n }", "title": "" }, { "docid": "fc3cd349e48fb62ceba31139bb47184a", "score": "0.5774727", "text": "public function getLink()\n {\n return 'https://ukm.no/wp-admin/user/admin.php?page=UKMmarketing&action=some&forslag=' . $this->getId();\n }", "title": "" }, { "docid": "b7269ace2cf2459f8e80c5a0f9eecc08", "score": "0.5772332", "text": "public function getCreateRecordUrl()\n\t{\n\t\treturn 'index.php?module=' . $this->getName() . '&parent=' . $this->getParentName() . '&view=Edit';\n\t}", "title": "" }, { "docid": "fda88644de7de4539db222e4f485540b", "score": "0.57615113", "text": "public function newAction()\n {\n View::renderTemplate('Signup/new.html.twig');\n }", "title": "" }, { "docid": "0dd518bd2dddb16de7d6c70b7f743104", "score": "0.57476205", "text": "public function New(){\n $data['page_title']= \"Approvals | New\";\n $data['style_files'][] = '';\n $data['js_files'][] = '<script> var DEFAULT_ACTION = \"new\"; </script>';\n $data['js_files'][] = '<script src=\"'.base_url().'/assets/js/pages/custom/approvals/inbox.js\"></script>';\n \n echo view(\"templates/header\",$data);\n echo view(\"approvals/approvals_inbox\",$data);\n echo view(\"templates/footer\",$data);\n\n }", "title": "" }, { "docid": "6e9835bb327540af8cdc973aab5ae822", "score": "0.5743531", "text": "public function newAction() {\n return $this->_forward('edit');\n }", "title": "" }, { "docid": "bc3ac379388c8b0b5125faf5cdd3c473", "score": "0.57433105", "text": "public function submit()\n {\n $this->validate(['original' => 'required|url','isforsingleuse' => 'boolean']);\n\n $this->authorizeCreatingLink();\n\n auth()->user()->links()->create([\n 'original' => $this->original,\n 'shortened' => $this->generateShortLink(),\n 'is_for_single_use_only' => $this->isforsingleuse,\n 'is_expired' => $this->isExpired\n ]);\n\n $this->emit('linkCreated');\n $this->original = '';\n }", "title": "" }, { "docid": "fea4caefaf8e89f202fb4a9eee8aea2b", "score": "0.5723012", "text": "function openRandomPage(){\n parent::doOpenLink();\n parent::doLogin();\n parent::doAccessRandomPage();\n parent::doEditPage();\n }", "title": "" }, { "docid": "258f566bf66fa58b3342c7849d2448bd", "score": "0.5721238", "text": "public function new_method()\n {\n return view('new');\n }", "title": "" }, { "docid": "921974bd7aa6292dab45965c1cc7aa65", "score": "0.57195", "text": "public function addJobPage()\n {\n View::renderTwigTemplate('/JobPostings/add_new_job.html');\n }", "title": "" }, { "docid": "5cc6f5d770fc959525be7bce29da2b62", "score": "0.5717789", "text": "public function create()\n {\n return view('admin.friendlinks.add');\n }", "title": "" }, { "docid": "a70ac8b9dda55064be211ecc5f078ea3", "score": "0.57174325", "text": "protected function buildNewSurveyUrl(): string\n {\n $urlParameters = [\n 'edit[tx_pxasurvey_domain_model_survey][' . $this->pid . ']' => 'new',\n 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')\n ];\n $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);\n\n return (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);\n }", "title": "" }, { "docid": "6e3f0d8b5bd779c97985b8e4b99dfb7e", "score": "0.57163215", "text": "public function Link() {\n\t\treturn self::$url_segment .'/';\n\t}", "title": "" }, { "docid": "a5f1eb6b37a0c4f1e2f2f544f18bbe94", "score": "0.57154745", "text": "public function create()\n\t{\n\t\treturn view('urls.create');\n\t}", "title": "" }, { "docid": "d71377bf94d8b4fc28155204b2017ad5", "score": "0.5709831", "text": "function topage($location, $showlink=0) {\n\n\tif ($showlink)\n\t\techo \"<a href=\\\"$location\".(strpos($location,\"?\") ? time() : \"\").\"\\\"><center>>>>>>>>>>> Selesai..! <<<<<<<<<<</center></a>\\n\";\n\telse {\n\t\techo \"<script language=\\\"javascript\\\">\\n\";\n\t\techo \"document.location=\\\"$location\".(strpos($location,\"?\")==strlen($location)-1 ? time() : \"\").\"\\\"\\n\";\n\t\techo \"</script>\\n\";\n\t}\n}", "title": "" }, { "docid": "a71eac4bd230160080c004a752918734", "score": "0.5707767", "text": "function btn_add_pdf($uri, $name) {\n return anchor($uri, \"<i class='fa fa-file'></i> \".$name, \"class='btn-cs btn-sm-cs' style='text-decoration: none;' role='button' target='_blank'\");\n}", "title": "" }, { "docid": "3da3f89e2c4330a13f5dd61666a17ae3", "score": "0.5703906", "text": "public function create()\n {\n return view('url.create');\n }", "title": "" } ]
e47c27113683020f394af87dc34aff84
Convert theme instance to array.
[ { "docid": "512b57c96d7b3e888f31e02a795b1e8a", "score": "0.5869277", "text": "public function toArray()\n {\n return [\n 'name' => $this->name,\n 'type' => $this->type,\n 'description' => $this->description,\n 'author' => $this->author,\n 'enabled' => $this->enabled,\n 'path' => $this->path,\n 'assets' => $this->assets,\n 'files' => $this->files,\n ];\n }", "title": "" } ]
[ { "docid": "288f024ef31eb2e35c48a9389488bed7", "score": "0.74945384", "text": "public function toArray()\n {\n $data = parent::toArray();\n\n if (empty($data)) {\n return array();\n }\n $data = array_merge($data, $this->themeToArray());\n\n if ($this->width) {\n $data['width'] = $this->width;\n }\n if (false === $this->cards) {\n $data['cards'] = 'false';\n }\n if (false === $this->conversation) {\n $data['conversation'] = 'false';\n }\n if (static::ALIGN_NONE !== $this->align) {\n $data['align'] = $this->align;\n }\n\n return $data;\n }", "title": "" }, { "docid": "2e7faa03cae42c48c20b63fba242387c", "score": "0.64155364", "text": "public function getThemeData(): ?array {\n if (!$this->themeData) {\n $themeKey = $this->siteMeta->getActiveTheme()->getKey();\n try {\n $this->themeData = $this->themesApi->get($themeKey);\n } catch (\\Throwable $e) {\n // Prevent infinite loops.\n // Our error handling page uses the theme when possible.\n // As a result we absolutely CANNOT ever allow the this function to bubble up an error.\n // If it did then we we get cascading OOM errors.\n trigger_error(\"Could not load data for theme key $themeKey.\");\n $this->themeFetchError = $e;\n $this->themeData = null;\n }\n }\n\n return $this->themeData;\n }", "title": "" }, { "docid": "a1c935ef7e2aa4c8fe758ab82428b8a8", "score": "0.63560444", "text": "public function toArray() {\n\n // Initialize the output.\n $output = [];\n\n // Set the position.\n ArrayUtility::set($output, \"position\", $this->position, [null]);\n\n // Set the relative to.\n ArrayUtility::set($output, \"relativeTo\", $this->relativeTo, [null]);\n\n // Set the theme.\n ArrayUtility::set($output, \"theme\", $this->theme, [null]);\n\n // Return the output.\n return $output;\n }", "title": "" }, { "docid": "138f96d9941b1b4a1de185e45f025c71", "score": "0.6192058", "text": "public function toArray() {\n\n // Initialize the output.\n $output = [];\n\n // Set the color.\n ArrayUtility::set($output, \"color\", $this->color, [null]);\n\n // Set the size.\n ArrayUtility::set($output, \"size\", $this->size, [null]);\n\n // Return the output.\n return $output;\n }", "title": "" }, { "docid": "b346a756141d841ae3418b84954a404f", "score": "0.61814946", "text": "public static function toArray() {\n return [\n 'env' => self::env()\n , 'version' => self::version()\n ];\n }", "title": "" }, { "docid": "1860825c0381440d2c8b221b502129b3", "score": "0.6173537", "text": "public function getAsArray() {\n return [\n 'name' => $this->name,\n 'pluralName' => $this->pluralName,\n 'icon' => $this->icon\n ];\n }", "title": "" }, { "docid": "c341f8d6cdc0a3d0b19df57c3b47ad07", "score": "0.6166133", "text": "public function toArray(){\n\t\t\treturn array();\n\t\t}", "title": "" }, { "docid": "41932b69fa6b327d8064da25245ed18d", "score": "0.61142784", "text": "protected static function _getThemes() {\n\t\t$Folder = new Folder(self::themePath());\n\n\t\t$return = array();\n\t\tforeach (current($Folder->read()) as $theme) {\n\t\t\t$return[$theme] = Inflector::humanize(Inflector::underscore($theme));\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "8ff03cb9883c87a2ddc0bf205e3ce4d2", "score": "0.6113908", "text": "public function getAllPostAsArray()\n\t{\t\n\t\treturn array('post_id' => $this->post_id,\n\t\t\t\t\t 'theme_id' => $this->theme_id,\n\t\t\t\t\t 'title' => $this->title,\n\t\t\t\t\t 'text' => $this->text,\n\t\t\t\t\t 'date_created' => $this->date_created,\t\t\t\t\n\t\t\t);\n\t}", "title": "" }, { "docid": "ffae95f67624993c3354cb155c9b6fc5", "score": "0.61099845", "text": "public static function toArray()\n {\n $class = get_called_class();\n if (!array_key_exists($class, static::$cache))\n {\n $reflection = new \\ReflectionClass($class);\n static::$cache[$class] = $reflection->getConstants();\n }\n\n return static::$cache[$class];\n }", "title": "" }, { "docid": "111daacbd4bbc4c23e4083ae8e839419", "score": "0.6104814", "text": "public function toArray(){\n $array = parent::toArray();\n\n return $array;\n }", "title": "" }, { "docid": "95d4c5548a22928d900a1daa32a96294", "score": "0.6104722", "text": "public function toArray(): array\n {\n return $this->_settings;\n }", "title": "" }, { "docid": "8879f1e0e03f15da0da3a33545063685", "score": "0.6071415", "text": "public function to_array()\n {\n return array(\n 'type' => $this->get_type(),\n 'url' => $this->get_url(),\n 'title' => $this->get_title(),\n 'description' => $this->get_description(),\n 'date' => $this->get_date(),\n 'author_id' => $this->get_author_id(),\n 'thumb_id' => $this->get_thumb_id(),\n );\n }", "title": "" }, { "docid": "b1b87b1e550c9b49fe8732b36048973a", "score": "0.6063542", "text": "public function toArray()\n {\n return $this->cache?? [\n 'type' => self::$type,\n 'title' => $this->title,\n 'icon' => $this->icon,\n 'value' => $this->value,\n 'values' => $this->values,\n 'range' => $this->range,\n 'ranges' => $this->ranges(),\n 'showLatest' => $this->showLatestValue,\n ];\n }", "title": "" }, { "docid": "f254c95c2d1ccf2a0218f38995eab206", "score": "0.60377604", "text": "private function getThemes()\n {\n // Get list of all themes.\n $themes = apply_filters('browse_themes', Theme::getAllThemes());\n\n // Change value from object to the title of the theme.\n foreach ($themes as $dir => $theme) {\n $title = empty($theme->title) ? $dir : $theme->title;\n $themes[$dir] = $title;\n }\n\n // Return themes with default first option of the Current Public Theme.\n return array('' => __('Current Public Theme')) + $themes;\n }", "title": "" }, { "docid": "8636c990ef5234246571a75f25b57e3f", "score": "0.60181415", "text": "public function get(string $themeKey): array {\n $this->permission();\n $out = $this->themeResultSchema('out');\n\n $themeWithAssets = $this->themeModel->getThemeWithAssets($themeKey);\n $result = $out->validate($themeWithAssets);\n return $result;\n }", "title": "" }, { "docid": "2ee1be4fa74d51a10432064898927f2b", "score": "0.6008358", "text": "public function getArray(): array\n {\n return [$this->red, $this->green, $this->blue, round($this->alpha / 255, 2)];\n }", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.60065657", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005982", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.600571", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6005642", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6004829", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6004829", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.6004829", "text": "public function toArray() {}", "title": "" }, { "docid": "d0d9297db505ab994da6204195a9efc2", "score": "0.59892154", "text": "public static function getThemeConfig($theme)\n {\n if (is_string($theme)) {\n $theme = self::getThemeByName($theme);\n }\n\n if ($theme === null) {\n return [];\n }\n\n $theme->beforeActivate();\n\n return [\n 'components' => [\n 'view' => [\n 'theme' => [\n 'name' => $theme->name,\n 'basePath' => $theme->getBasePath(),\n 'publishResources' => $theme->publishResources,\n ],\n ],\n 'mailer' => [\n 'view' => [\n 'theme' => [\n 'name' => $theme->name,\n 'basePath' => $theme->getBasePath(),\n 'publishResources' => $theme->publishResources,\n ]\n ]\n ]\n ]\n ];\n }", "title": "" }, { "docid": "ee674db7db75270fe7ba8d1b7d58297a", "score": "0.5979965", "text": "public function getTheme();", "title": "" }, { "docid": "e4d907f280c3531c61a4d88962850e16", "score": "0.59642154", "text": "public static function from_class(): array;", "title": "" }, { "docid": "d5ecacb9aede02e27529d00bcb560535", "score": "0.59467494", "text": "public function getThemeImplementations();", "title": "" }, { "docid": "8e06da8e6d2de988e5aba2b519c0b7c7", "score": "0.5937756", "text": "public function toArray(): array\n {\n return [\n 'type' => 'dimSelector',\n 'dimension' => $this->dimension,\n 'value' => $this->value,\n ];\n }", "title": "" }, { "docid": "21f2aa362215e8b869fb4fc026d902e5", "score": "0.59371215", "text": "public function toArray()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "21f2aa362215e8b869fb4fc026d902e5", "score": "0.59371215", "text": "public function toArray()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "21f2aa362215e8b869fb4fc026d902e5", "score": "0.59371215", "text": "public function toArray()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "49465aa7d61ffca1b8cd93baa22dd416", "score": "0.5933653", "text": "public function to_array() {\n\t\treturn get_object_public_vars ( $this );\n\t}", "title": "" }, { "docid": "4d45f36450d560a9e179c9c3e834d86f", "score": "0.5918473", "text": "public function toArray(){\n return [$this->hue, $this->saturation, $this->value];\n }", "title": "" }, { "docid": "88de4a40f9da710a5eecb61808aa2727", "score": "0.5915862", "text": "public function to_array() {\n\t\treturn get_object_vars( $this );\n\t}", "title": "" }, { "docid": "5aed607849398619881c926ecdfe1a6a", "score": "0.5909157", "text": "public function toArray()\n {\n $a = array();\n if ($this->lang) {\n $a[\"lang\"] = $this->lang;\n }\n if ($this->value) {\n $a[\"value\"] = $this->value;\n }\n return $a;\n }", "title": "" }, { "docid": "0af15877dcf27c7afc3956fac1adb7aa", "score": "0.59054667", "text": "public function toArray()\n {\n $data = parent::toArray();\n if (isset($this->selectors)) {\n $data['selectors'] = !is_null($this->selectors)\n ? array_reduce(\n array_keys($this->selectors),\n function ($items, $key) {\n $items[$key] =\n $this->selectors[$key] instanceof Arrayable\n ? $this->selectors[$key]->toArray()\n : $this->selectors[$key];\n return $items;\n },\n []\n )\n : $this->selectors;\n }\n if (isset($this->backgroundColor)) {\n $data['backgroundColor'] =\n $this->backgroundColor instanceof Arrayable\n ? $this->backgroundColor->toArray()\n : $this->backgroundColor;\n }\n if (isset($this->divider)) {\n $data['divider'] =\n $this->divider instanceof Arrayable\n ? $this->divider->toArray()\n : $this->divider;\n }\n if (isset($this->minimumWidth)) {\n $data['minimumWidth'] =\n $this->minimumWidth instanceof Arrayable\n ? $this->minimumWidth->toArray()\n : $this->minimumWidth;\n }\n if (isset($this->width)) {\n $data['width'] = $this->width;\n }\n return $data;\n }", "title": "" }, { "docid": "fe1ff28ee78023b37f1b385f62f7f67f", "score": "0.59037805", "text": "function getThemes()\r\n\t{\r\n\t\tforeach($this->themes as $thema){\r\n\t\t $out[$thema->name] = $thema->prefix;\r\n\t\t}\r\n\t\treturn $out;\r\n\t}", "title": "" }, { "docid": "4ee305d41cca9a13300862d94fd94cf7", "score": "0.5893655", "text": "public function to_array() {\n }", "title": "" }, { "docid": "21aa43991ec7e0d88e2605b3b1eeec5a", "score": "0.58904237", "text": "public function getTheme()\n {\n }", "title": "" }, { "docid": "22a6a4cc4665cc11c48ccfb22a2f5ffa", "score": "0.5890213", "text": "public function toArray()\n {\n return parent::toArray();\n }", "title": "" }, { "docid": "b8a7e767730ae5dc844dbe5eb8b70791", "score": "0.587491", "text": "public function toArray(): array\n {\n return [\n 'name' => $this->name,\n 'text' => $this->text,\n 'type' => $this->type,\n 'value' => $this->value,\n 'style' => $this->style,\n 'confirm' => $this->confirmation,\n ];\n }", "title": "" }, { "docid": "4907870ccf13ab5ade12fbd27b720d21", "score": "0.5871844", "text": "public function toArray()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "f8343bc3b2b368b7a457c185e067e941", "score": "0.5864996", "text": "public function convert()\n\t{\n\t\t$themes = new STDClass();\n //Create settings object\n\t\tforeach ($this->all() as $id=>$value ){\n\t\t\t$record = $this->getByKey($value->key);\n\t\t\t$themes->$record['key'] = $record['value'];\n\t\t}\n\t\treturn $themes;\n\t}", "title": "" }, { "docid": "9af22fc467b04e07cb2c00a487e4ae05", "score": "0.58581114", "text": "function toArray( ) {\n return (array) $this;\n }", "title": "" }, { "docid": "3d8ad06601a7506c63e3f22a5fac7a7b", "score": "0.5851626", "text": "public function as_array()\n\t{\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "2868cff4307de3b9b37a102da46f489c", "score": "0.5837209", "text": "public function toArray() {\n return $this->_settings;\n }", "title": "" }, { "docid": "0a83ea72e02219fccc266b01a46e2f71", "score": "0.58265364", "text": "public function toArray()\n {\n return $this->array;\n }", "title": "" }, { "docid": "364e48f27f834732c874598e114adab9", "score": "0.58262956", "text": "public function toArray(): array\n {\n return array(\n 'available' => $this->available,\n 'month_date' => $this->month_date,\n 'data' => $this->data\n );\n }", "title": "" }, { "docid": "446dca17a74db552731920d46ae00a53", "score": "0.58219147", "text": "public function asArray()\n {\n return $this->doConfig();\n }", "title": "" }, { "docid": "89a0ee06e01a5bfa7e55355905ea1efc", "score": "0.58162886", "text": "public function toArray()\r\n {\r\n return $this->array;\r\n }", "title": "" }, { "docid": "ee4ad863103a12532fbcea1635b14561", "score": "0.58138484", "text": "public function toArray()\n {\n $layouts = [];\n foreach ($this->layouts as $key => $layout) {\n $layouts[$key] = !is_null($layout) ? $layout->toArray() : null;\n }\n return $layouts;\n }", "title": "" }, { "docid": "cdaecd28adc508042b5c45c6b8bad533", "score": "0.58104", "text": "public function toArray(): array\n {\n return [\n 'type' => $this->type,\n 'details' => $this->details,\n 'provider_object' => $this->provider_object,\n 'object' => $this->object,\n ];\n }", "title": "" }, { "docid": "b75ea78b325646ef8f1139f68fb9a8f0", "score": "0.5805608", "text": "public function toArray() {\n\t\treturn array(\n\t\t\t'pagetype' => $this->pageType,\n\t\t\t'basepath' => $this->basepath\n\t\t);\n\t}", "title": "" }, { "docid": "c1278bf8908f0e17cdd1f053246f6fb3", "score": "0.58016706", "text": "public function toArray()\n {\n $data = [];\n if (isset($this->type)) {\n $data['type'] = $this->type;\n }\n return $data;\n }", "title": "" }, { "docid": "c1278bf8908f0e17cdd1f053246f6fb3", "score": "0.58016706", "text": "public function toArray()\n {\n $data = [];\n if (isset($this->type)) {\n $data['type'] = $this->type;\n }\n return $data;\n }", "title": "" }, { "docid": "0723262a432aa6210fd0584093604b69", "score": "0.57927173", "text": "public function theme() { return $this->_theme; }", "title": "" }, { "docid": "2b0a9026ff555d6087b7732fd0a929e5", "score": "0.57868415", "text": "public function toArray() {\n \n return $this->getArrayCopy();\n\n }", "title": "" }, { "docid": "b0d03b368d54bf97d3f3ccd1a621d122", "score": "0.57836026", "text": "public function toArray()\n {\n return array(\n 'content' => $this->getContent(),\n 'type' => $this->getType()\n );\n }", "title": "" }, { "docid": "75f622ef000b61ed2de77a0777c45ca1", "score": "0.578241", "text": "public function toArray(): array\n {\n return (array) array_merge([\n 'id' => $this->getId(),\n 'version' => $this->getVersion(),\n 'path' => $this->getPath(),\n 'icon' => $this->getIcon(),\n 'hasAssets' => $this->hasAssets(),\n 'hasMigrations' => $this->hasMigrations(),\n 'extensionDependencyIds' => $this->getExtensionDependencyIds(),\n 'optionalDependencyIds' => $this->getOptionalDependencyIds(),\n 'links' => $this->getLinks(),\n ], $this->composerJson);\n }", "title": "" }, { "docid": "a9bc2b41be7af1633a8a907c799a4ce8", "score": "0.5780726", "text": "public function toArray(): array\n {\n return [\n 'managed' => $this->managed,\n 'new_leads' => $this->newLeads,\n 'touched' => $this->touched,\n 'converted' => $this->converted,\n 'meetings' => $this->meetings,\n 'revenue' => $this->revenue,\n 'chart' => $this->chart,\n 'tags' => $this->tags,\n 'staff' => $this->staff,\n ];\n }", "title": "" }, { "docid": "28642b4a2441bfbef4ecf1f883bdf759", "score": "0.5778358", "text": "public function toArray(): array\n {\n //Instantiate the reflection object\n $oReflector = new ReflectionClass(get_class($this));\n\n // return placeholder\n $data = [];\n\n foreach ($oReflector->getProperties() as $property) {\n if ($property->isPublic() || $property->isProtected()) {\n $data[$property->getName()] = $this->{$property->getName()};\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "70c5001a1466885957f3a487c08e5cd4", "score": "0.5775457", "text": "public function toArray()\n {\n return $this->getArrayCopy();\n }", "title": "" }, { "docid": "34f5777f254387f69b1ce9ba18a10c63", "score": "0.57722825", "text": "public function to_array(){\n\t\t\t$datos=get_object_vars($this);\n\t\t\treturn $datos;\n\t\t}", "title": "" }, { "docid": "0a9eef7cacd85759a0db9efa92a5ec71", "score": "0.5771534", "text": "public function getTabsAsArray()\n {\n if (null === $this->_tabs) {\n $configFields = Mage::getSingleton('adminhtml/config');\n foreach ((array)$configFields->getTabs()->children() as $tab) {\n $helperName = $configFields->getAttributeModule($tab);\n $this->_tabs[$tab->getName()] = Mage::helper($helperName)->__((string)$tab->label);\n }\n }\n return $this->_tabs;\n }", "title": "" }, { "docid": "8d628cbd9825b6572fe3fd8c13a598f4", "score": "0.5763398", "text": "public function toArray()\n {\n return [\n 'type' => get_class($this),\n 'value' => $this->getValue(),\n ];\n }", "title": "" }, { "docid": "1b7859c8d271a4cfec26e9392f3ce473", "score": "0.5762009", "text": "public function toArray()\n\t{\n\t\t$arr = parent::toArray();\n\n\t\t$arr['limit'] = $this->limit;\n\t\t$arr['height'] = $this->height;\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "b69bebcb746a6f588900ebf155468e58", "score": "0.5761129", "text": "public function toArray()\n {\n return array(\n self::STATICAL => Mage::helper('mhidalgo_staticversion')->__('Static'),\n self::DYNAMIC => Mage::helper('mhidalgo_staticversion')->__('Dynamic'),\n );\n }", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.57552725", "text": "public function toArray();", "title": "" } ]
6212ba04e6adfe1cebffd82252f55ca0
Prepares themes for JavaScript.
[ { "docid": "2067a1f7b51844787607840b355ba921", "score": "0.8029887", "text": "function wp_prepare_themes_for_js($themes = \\null)\n {\n }", "title": "" } ]
[ { "docid": "dbcc7ca638ecb69e6210a9e34f3a6eba", "score": "0.67317414", "text": "function <%= themeslug %>_scripts() {\n\twp_enqueue_style( '<%= themeslug %>-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'presentation', get_stylesheet_directory_uri() . '/assets/javascripts/presentation.js', array('jquery'));\n}", "title": "" }, { "docid": "dc01805103529a971b5f2a2ba7df4911", "score": "0.6644345", "text": "public function init_globals() {\n\t\t\t$current_theme = wp_get_theme();\n\t\t\t$this->theme_name = strtolower( preg_replace( '#[^a-zA-Z]#', '', $current_theme->get( 'Name' ) ) );\n\t\t\t$this->envato_username = apply_filters( $this->theme_name . '_theme_setup_wizard_username', 'purethemes' );\n\t\t\t$this->oauth_script = apply_filters( $this->theme_name . '_theme_setup_wizard_oauth_script', 'http://purethemes.net/envato/api/server-script.php' );\n\t\t\t$this->page_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_page_slug', $this->theme_name . '-setup' );\n\t\t\t$this->parent_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_parent_slug', '' );\n\n\t\t\t// create an images/styleX/ folder for each style here.\n\t\t\t/*$this->site_styles = array(\n 'style1' => 'Style 1',\n 'style2' => 'Style 2',\n );\n*/\n\t\t\t//If we have parent slug - set correct url\n\t\t\tif ( $this->parent_slug !== '' ) {\n\t\t\t\t$this->page_url = 'admin.php?page=' . $this->page_slug;\n\t\t\t} else {\n\t\t\t\t$this->page_url = 'themes.php?page=' . $this->page_slug;\n\t\t\t}\n\t\t\t$this->page_url = apply_filters( $this->theme_name . '_theme_setup_wizard_page_url', $this->page_url );\n\n\t\t\t//set relative plugin path url\n\t\t\t$this->plugin_path = trailingslashit( $this->cleanFilePath( dirname( __FILE__ ) ) );\n\t\t\t$relative_url = str_replace( $this->cleanFilePath( get_template_directory() ), '', $this->plugin_path );\n\t\t\t$this->plugin_url = trailingslashit( get_template_directory_uri().'/envato_setup/' );\n\t\t}", "title": "" }, { "docid": "309493192c137a4466cda5fac548b800", "score": "0.6629094", "text": "function _add_scripts() {\n\t\t\tif (is_admin()) return;\n\t\t\twp_enqueue_script('modernizr', get_stylesheet_directory_uri() .'/bower_components/modernizer/modernizr.js', array(), '2.8.2');\n\t\t\twp_enqueue_script('theme.app', get_stylesheet_directory_uri() .'/js/min/app.min.js', array('jquery','modernizr'), '0.1.0', true);\n\t\t\twp_localize_script('theme.app', 'theme', $this->_add_js_vars()); // Call _add_js_vars() to add PHP variables to frontend\n\t\t}", "title": "" }, { "docid": "582da1970b085fd0b6786b2e19e4a0f4", "score": "0.6592413", "text": "public function init_globals() {\n\t\t\t$current_theme = wp_get_theme();\n\t\t\t$this->theme_name = strtolower( preg_replace( '#[^a-zA-Z]#', '', $current_theme->get( 'Name' ) ) );\n\t\t\t$this->envato_username = apply_filters( $this->theme_name . '_theme_setup_wizard_username', 'dtbaker' );\n\t\t\t$this->oauth_script = apply_filters( $this->theme_name . '_theme_setup_wizard_oauth_script', 'http://dtbaker.net/files/envato/wptoken/server-script.php' );\n\t\t\t$this->page_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_page_slug', $this->theme_name . '-setup' );\n\t\t\t$this->parent_slug = apply_filters( $this->theme_name . '_theme_setup_wizard_parent_slug', '' );\n\n\t\t\t// create an images/styleX/ folder for each style here.\n\t\t\t$this->site_styles = array(\n 'style1' => 'Style 1',\n 'style2' => 'Style 2',\n );\n\n\t\t\t//If we have parent slug - set correct url\n\t\t\tif ( $this->parent_slug !== '' ) {\n\t\t\t\t$this->page_url = 'admin.php?page=' . $this->page_slug;\n\t\t\t} else {\n\t\t\t\t$this->page_url = 'themes.php?page=' . $this->page_slug;\n\t\t\t}\n\t\t\t$this->page_url = apply_filters( $this->theme_name . '_theme_setup_wizard_page_url', $this->page_url );\n\n\t\t\t//set relative plugin path url\n\t\t\t$this->plugin_path = trailingslashit( $this->cleanFilePath( dirname( __FILE__ ) ) );\n\t\t\t$relative_url = str_replace( $this->cleanFilePath( get_template_directory() ), '', $this->plugin_path );\n\t\t\t$this->plugin_url = trailingslashit( get_template_directory_uri() . $relative_url );\n\t\t}", "title": "" }, { "docid": "97e70e9b21d02e04f2e4a5053a0c3f40", "score": "0.6585629", "text": "function prelude_theme_scripts() {\n // CSS\n wp_enqueue_style('prelude-css', get_template_directory_uri() . '/assets/css/theme.min.css' );\n\n // JS\n wp_enqueue_script('prelude-js', get_template_directory_uri() . '/assets/js/theme.min.js', array(), '', true );\n }", "title": "" }, { "docid": "0d218d849f3fa4a3a7d4263fa2369ac4", "score": "0.657954", "text": "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "title": "" }, { "docid": "d3500344da2ef2eeacd987714ceb52c0", "score": "0.6569554", "text": "function massively_theme_assets() {\n\n\t\t$var = '1.0.0';\n\n\t\t/* CSS */\n\t\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), '', $var );\n\t\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), '', $var );\n\t\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), '', $var );\n\t\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), '', $var );\n\t\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), '', $var );\n\t\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), '', $var );\n\t\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), '', $var );\n\t\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\n\t}", "title": "" }, { "docid": "5a3fa78108d5a3ece126c330d03444da", "score": "0.6542186", "text": "function theme_scripts_and_styles() {\n if (!is_admin()) {\n global $wp_scripts;\n wp_deregister_script('jquery');\n foreach($wp_scripts->registered as $handle => $script) {\n $wp_scripts->add_data($handle, 'group', 1);\n }\n\n theme_scripts::register();\n theme_styles::register();\n\n // comment reply script for threaded comments\n if ( is_singular() && comments_open() && (get_option('thread_comments') == 1)) {\n wp_enqueue_script('comment-reply');\n }\n\n theme_styles::enqueue();\n theme_scripts::enqueue();\n }\n}", "title": "" }, { "docid": "1f52ccff3cf236279df2e841be37a719", "score": "0.6500821", "text": "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "4fd30b8afa88ea0c1dc355fad194f13a", "score": "0.6497814", "text": "public function themeScripts()\n {\n wp_deregister_style('open-sans');\n wp_register_style('open-sans', false);\n wp_deregister_script('jquery');\n wp_deregister_script('jquery-migrate');\n\n if (get_option('jquery.stellar.js') == '1'|| !get_option('skrollr_js')) {\n wp_enqueue_script('stellar', get_template_directory_uri() . '/js/jquery.stellar.js', array('jquery' ), '1.0.0', true);\n }\n\n if (get_option('smoothscroll_js') == '1'|| !get_option('smoothscroll_js')) {\n wp_enqueue_script('smoothscroll', get_template_directory_uri() . '/js/SmoothScroll.js', array('jquery' ), '1.0.0', true);\n }\n\n // prepare data to be send to javascript, before script.js\n wp_register_script('script', get_template_directory_uri() . '/js/script.js', array('jquery'), '1.0.0', true);\n\n wp_register_script('jquery', get_template_directory_uri().'/js/jquery-1.11.3.min.js', array(), '1.0.0', false);\n wp_localize_script('script', 'MAPS_API_KEY', MAPS_API_KEY);\n wp_localize_script('script', 'MAPS_COLORS_JSON', get_option('googlemapsjson'));\n wp_enqueue_script('script');\n\n if (get_option('bootstrap_css') == '1' || !get_option('bootstrap_css')) {\n wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.min.css', array(), '1.0', 'all');\n }\n \n if (get_option('font_awesome') == '1' || !get_option('font_awesome')) {\n wp_enqueue_style('font-awesome', get_template_directory_uri().'/css/font-awesome.min.css', array(), '1.0', 'all');\n }\n \n if (get_option('animate_css') == '1' || !get_option('animate_css')) {\n wp_enqueue_style('animate', get_template_directory_uri().'/css/animate.min.css', array(), '1.0', 'all');\n }\n\n if (get_option('jquery') == '1'|| !get_option('jquery')) {\n wp_enqueue_script('jquery');\n wp_enqueue_script('jquery-migrate', get_template_directory_uri().'/js/jquery-migrate-1.2.1.min.js', array(), '1.0.0', false);\n }\n \n if (get_option('bootstrap_js') == '1'|| !get_option('bootstrap_js')) {\n wp_enqueue_script('bootstrap', get_template_directory_uri().'/js/bootstrap.min.js', array('jquery'), '1.0.0', false);\n }\n \n if (get_option('wow_js') == '1'|| !get_option('wow_js')) {\n wp_enqueue_script('wow', get_template_directory_uri() . '/js/wow.min.js', array('jquery' , 'bootstrap'), '1.0.0', true);\n }\n\n \n \n }", "title": "" }, { "docid": "fe5c9f2a5a826b00e69d3165de6366ce", "score": "0.64953125", "text": "function _appthemes_register_theme_scripts() {\n\n\t// Minimize prod or show expanded in dev.\n\t$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\trequire_once APP_THEME_FRAMEWORK_DIR . '/js/localization.php';\n\n\twp_register_script( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/jquery.colorbox{$min}.js\", array( 'jquery' ), '1.6.1' );\n\twp_register_style( 'colorbox', APP_THEME_FRAMEWORK_URI . \"/js/colorbox/colorbox{$min}.css\", false, '1.6.1' );\n\twp_register_style( 'font-awesome', APP_THEME_FRAMEWORK_URI . \"/lib/font-awesome/css/font-awesome{$min}.css\", false, '4.7.0' );\n\n\twp_register_script( 'footable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable{$min}.js\", array( 'jquery' ), '2.0.3' );\n\twp_register_script( 'footable-grid', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.grid{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-sort', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.sort{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-filter', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.filter{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-striping', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.striping{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-paginate', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.paginate{$min}.js\", array( 'footable' ), '2.0.3' );\n\twp_register_script( 'footable-bookmarkable', APP_THEME_FRAMEWORK_URI . \"/js/footable/jquery.footable.bookmarkable{$min}.js\", array( 'footable' ), '2.0.3' );\n\n\t_appthemes_localize_theme_scripts();\n}", "title": "" }, { "docid": "0931cc754c558670d6aae6c2b5f98ef4", "score": "0.646426", "text": "function tmm_theme_wp_head() {\n TMM_OptionsHelper::register_scripts_and_styles();\n //***\n TMM_OptionsHelper::enqueue_style('theme_style');\n TMM_OptionsHelper::enqueue_style('skeleton');\n TMM_OptionsHelper::enqueue_style('layout');\n TMM_OptionsHelper::enqueue_style('font_awesome');\n TMM_OptionsHelper::enqueue_style('animation');\n \n \n TMM_OptionsHelper::enqueue_style('custom1');\n TMM_OptionsHelper::enqueue_style('custom2'); \n \n \n TMM_OptionsHelper::enqueue_style('fancybox');\n TMM_OptionsHelper::enqueue_style('epic_slider');\n TMM_OptionsHelper::enqueue_style('epic_slider_responsive');\n wp_enqueue_style(\"tmm_flexslider_css\", TMM_Ext_Sliders::get_application_uri() . '/items/flex/css/styles.css');\n //***\n wp_enqueue_script('jquery');\n wp_enqueue_script('thememakers_js', TMM_THEME_URI . '/js/thememakers.js', array('jquery'));\n wp_enqueue_script('modernizr', TMM_THEME_URI . '/js/jquery.modernizr.js', array('jquery'));\n}", "title": "" }, { "docid": "d0e6ab178e04ce91c657fec29c4da03b", "score": "0.6430037", "text": "function theme_js() {\n\t\n\t\tglobal $wp_scripts;\n\t\n\t\twp_register_script( 'html5_shiv', get_template_directory_uri() . '/js/html5shiv.js', '', '', false );\n\t\twp_register_script( 'respond_js', get_template_directory_uri() . '/js/respond.min.js', '', '', false );\n\t\n\t\t$wp_scripts->add_data( 'html5_shiv', 'conditional', 'lt IE 9' );\n\t\t$wp_scripts->add_data( 'respond_js', 'conditional', 'lt IE 9' );\n\t\n\t\twp_enqueue_script( 'bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'theme_js', get_template_directory_uri() . '/js/theme.js', array('jquery', 'bootstrap_js'), '', true );\n\t\tif(is_rtl()){\n\t\t wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min-rtl.css',false,'3.3.7','all');\n\t\t}else{\n\t\t wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css',false,'3.1.1','all');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8d34274dcbde56936006d6e4bc647064", "score": "0.6408857", "text": "public function setup_theme()\n {\n }", "title": "" }, { "docid": "aa56a52a549a13dcedf14939ce0e116d", "score": "0.63999236", "text": "function hola_elementor_scripts_styles() {\n\t\t$enqueue_basic_style = apply_filters_deprecated( 'elementor_hola_theme_enqueue_style', [ true ], '2.0', 'hola_elementor_enqueue_style' );\n\t\t$min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\n\t\tif ( apply_filters( 'hola_elementor_enqueue_style', $enqueue_basic_style ) ) {\n\t\t\twp_enqueue_style(\n\t\t\t\t'hola-elementor',\n\t\t\t\tget_template_directory_uri() . '/style' . $min_suffix . '.css',\n\t\t\t\t[],\n\t\t\t\tHOLA_ELEMENTOR_VERSION\n\t\t\t);\n\t\t}\n\t\t\n\t\tif ( get_option( 'webp' ) ) {\n\t\t\twp_enqueue_script(\n\t\t\t\t'hola_elementor_webp_polyfill',\n\t\t\t\tget_template_directory_uri() . '/assets/js/mod/' . 'webp-injector.min.js',\n\t\t\t\t[],\n\t\t\t\tHOLA_ELEMENTOR_VERSION,\n\t\t\t\ttrue //in footer\n\t\t\t);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "ac0c9888a83989bfe648ccce377e8b89", "score": "0.63870645", "text": "function okay_scripts_styles() {\n\t\n\t//Main Stylesheet\n\twp_enqueue_style( 'slate_style', get_stylesheet_uri() );\n\t\n\t//Media Queries\n\twp_enqueue_style( 'slate_media_queries', get_template_directory_uri() . \"/media-queries.css\" );\n\t\n\t//Dark Stylesheet\n\tif ( get_option('okay_theme_customizer_color_scheme') == 'dark' ) {\n\t\twp_enqueue_style( 'slate_style_dark', get_template_directory_uri() . \"/style-dark.css\");\n\t}\n\t\n\t//Add Flexslider Styles\n\twp_enqueue_style( 'flex_css', get_template_directory_uri() . '/includes/js/flex/flexslider.css', array(), '0.1', 'screen' ); \n\t\n\t//Font Awesome CSS\n\twp_enqueue_style( 'font_awesome_css', get_template_directory_uri() . \"/includes/fonts/fontawesome/font-awesome.css\", array(), '0.1', 'screen' ); //Google \t\t\n\t//Merriweather Font\n\twp_enqueue_style('google_merriweather', 'http://fonts.googleapis.com/css?family=Merriweather:400,700');\n\t\n\t//Register jQuery\n\twp_enqueue_script('jquery');\n\t\n\t//Custom JS\n\twp_enqueue_script('custom_js', get_template_directory_uri() . '/includes/js/custom/custom.js', false, false , true);\n\twp_localize_script('custom_js', 'custom_js_vars', array(\n\t\t\t'flexslider_auto' => get_option('okay_theme_customizer_slider_auto')\n\t\t)\n\t);\n \n //Flex\n wp_enqueue_script('flex_js', get_template_directory_uri() . '/includes/js/flex/jquery.flexslider.js', false, false , true);\n \n //Tabs\n wp_enqueue_script('tabs_js', get_template_directory_uri() . '/includes/js/tabs/jquery.tabs.min.js', false, false , true);\n \n //Fitvid\n wp_enqueue_script('fitvid_js', get_template_directory_uri() . '/includes/js/fitvid/jquery.fitvids.js', false, false , true);\n \n \t//Mobile Menu\n\twp_enqueue_script('mobile_js', get_template_directory_uri() . '/includes/js/menu/jquery.mobilemenu.js', false, false , true);\n\t\n}", "title": "" }, { "docid": "ce266848106624cf665c234da9366b82", "score": "0.6380031", "text": "public function wp_print_footer_scripts() {\n\n\t\tif ( empty( $this->themes ) || ! wp_script_is( 'holder', 'done' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<script type=text/javascript>\n\t\t\t<?php foreach ( $this->themes as $name => $theme ) : $theme = json_encode( array_filter( $theme ) ); ?>\n\t\t\tHolder.addTheme( \"<?php echo esc_js( $name ) ?>\", <?php echo $theme ?> );\n\t\t\t<?php endforeach; ?>\n\t\t</script>\n\t<?php\n\t}", "title": "" }, { "docid": "1c14f8740d614835c81b21b4e28d7211", "score": "0.63676393", "text": "function theme_scripts() {\n\twp_enqueue_style( 'theme-style', get_stylesheet_uri(), array(), _S_VERSION );\n\t// wp_style_add_data( 'theme-style', 'rtl', 'replace' );\n\n\twp_enqueue_script( 'lib-jquery', get_template_directory_uri() . '/lib/jquery-3.3.1.min.js', array(), _S_VERSION, true );\n\twp_enqueue_script( 'common-script', get_template_directory_uri() . '/assets/js/script.js', array(), _S_VERSION, true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "9d930ca61ef4041fbde968c6d4e342cd", "score": "0.63465154", "text": "public function setup_theme()\n\t{\n\t\trequire_once( THEME_ROOT . 'functions/theme.reset.php' );\n\t\t\n\t\t//load the custom image resize script to resize on the fly\n\t\trequire_once( THEME_ROOT . 'functions/plugin.image.resize.php' );\n\n\t\t//load custom classes for post types, taxonomies etc. \n\t\trequire_once( THEME_ROOT . 'functions/theme.post-types.class.php' );\n\t\trequire_once( THEME_ROOT . 'functions/theme.taxonomies.class.php' );\n\t\trequire_once( THEME_ROOT . 'functions/theme.columns.class.php' );\n\t\trequire_once( THEME_ROOT . 'functions/theme.routing.class.php' );\n\t\t\n\t\t\n\t\t//get data modals ready to be used on pages\n\t\trequire_once( THEME_ROOT . 'functions/data.post-type.class.php' );\n\t\t\n\t}", "title": "" }, { "docid": "95d7409f4e324a25d00d709a90d6e384", "score": "0.6337737", "text": "function bizni_theme_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri().'/assets/css/bootstrap.min.css');\n\twp_enqueue_style( 'font-awesome', get_template_directory_uri().'/assets/css/font-awesome.min.css');\n\twp_enqueue_style( 'animate', get_template_directory_uri().'/assets/css/animate.min.css');\n\twp_enqueue_style( 'imagehover', get_template_directory_uri().'/assets/css/imagehover.min.css');\n\twp_enqueue_style( 'normalize', get_template_directory_uri().'/assets/css/normalize.css');\n\twp_enqueue_style( 'carousel', get_template_directory_uri().'/assets/css/owl.carousel.min.css');\n\twp_enqueue_style( 'transitions', get_template_directory_uri().'/assets/css/owl.transitions.css');\n\twp_enqueue_style( 'magnific', get_template_directory_uri().'/assets/css/magnific-popup.css');\n\twp_enqueue_style( 'style', get_template_directory_uri().'/assets/css/style.css');\n\twp_enqueue_style( 'site-style', get_template_directory_uri().'/assets/css/style.css');\n\twp_enqueue_style( 'responsive', get_template_directory_uri().'/assets/css/responsive.css');\n\twp_enqueue_style( 'switcher-1', get_template_directory_uri().'/assets/css/skin/switcher.css');\n\n\t// Skin Css\n\twp_enqueue_style( 'skin-orange', get_template_directory_uri().'/assets/css/skin/orange.css');\n\twp_enqueue_style( 'skin-green', get_template_directory_uri().'/assets/css/skin/green.css');\n\twp_enqueue_style( 'skin-yellow', get_template_directory_uri().'/assets/css/skin/yellow.css');\n\twp_enqueue_style( 'skin-wood', get_template_directory_uri().'/assets/css/skin/wood.css');\n\twp_enqueue_style( 'skin-asbestos', get_template_directory_uri().'/assets/css/skin/asbestos.css');\n\twp_enqueue_style( 'skin-alizarin', get_template_directory_uri().'/assets/css/skin/alizarin.css');\n\twp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n\n\t// Theme scripts files\n\twp_enqueue_script('jquery');\n\twp_enqueue_script( 'bootstrap', get_template_directory_uri().'/assets/js/bootstrap.min.js', array('jquery'), time(), true );\n\twp_enqueue_script( 'carousel', get_template_directory_uri().'/assets/js/owl.carousel.min.js', array('jquery'), time(), true );\n\twp_enqueue_script( 'mixitup', get_template_directory_uri().'/assets/js/jquery.mixitup.js', array('jquery'), time(), true );\n\twp_enqueue_script( 'magnific', get_template_directory_uri().'/assets/js/jquery.magnific-popup.min.js', array('jquery'), time(), true );\n\twp_enqueue_script( 'waypoints', get_template_directory_uri().'/assets/js/jquery.waypoints.min.js', array('jquery'), time(), true );\n\twp_enqueue_script( 'ajaxchimp', get_template_directory_uri().'/assets/js/jquery.ajaxchimp.min.js', array('jquery'), time(), true );\n\twp_enqueue_script( 'main_script', get_template_directory_uri().'/assets/js/main_script.js', array('jquery'), time(), true );\n\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "3a49dbefb7f81a9a56136a326a0055cf", "score": "0.63320243", "text": "public function loadStylesAndScripts() {\n\t\tglobal $upload_url;\n\n\t\tif ( !$this->is_admin ) {\n\t\t\t// Add minified css of all themes or the selected theme css\n\t\t\tif ( ( !empty( $this->settings->themes['themes'] ) && $this->settings->themes['themes'] == 'true' ) && file_exists( $upload_url['basedir'] . '/good-old-gallery-themes.css') ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery-themes', $upload_url['baseurl'] . '/good-old-gallery-themes.css' );\n\t\t\t}\n\t\t\t// Add selected themes css\n\t\t\telse if ( !empty( $this->settings->themes['default'] ) && empty( $this->settings->themes['all'] ) ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery-theme', $this->settings->themes['theme']['url'] . '/' . $this->settings->themes['default'] );\n\t\t\t}\n\n\t\t\t// Include selected slider plugin files\n\t\t\tif ( !empty( $this->settings->settings['plugin'] ) ) {\n\t\t\t\tforeach ( $this->settings->plugin['setup']['files'] as $file ) {\n\t\t\t\t\twp_enqueue_script( 'slider', GOG_PLUGIN_URL . 'plugins/' . $this->settings->settings['plugin'] . '/' . $file, array( 'jquery' ), '', FALSE );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Includ default good-old-gallery.css\n\t\t\tif ( $this->settings->themes['default_css'] == 'true' ) {\n\t\t\t\twp_enqueue_style( 'good-old-gallery', GOG_PLUGIN_URL . 'assets/css/good-old-gallery.css' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8ca8ed9763923ccd802261637252ce74", "score": "0.63306683", "text": "function load_dev_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dev/style.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dev/header.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dev/footer.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dev/single.js', array( 'jquery' ), null, true );\n }\n}", "title": "" }, { "docid": "8c6721ae39d4114cdb1ac2b8a80f8af1", "score": "0.63117737", "text": "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }", "title": "" }, { "docid": "24d6a0a838bf3ad4c2978ca6182f38f5", "score": "0.63036925", "text": "function _maybe_update_themes()\n {\n }", "title": "" }, { "docid": "515207d8e7969d67928bbddb082749d3", "score": "0.6290641", "text": "function starter_theme_scripts() {\n\t////JQUERY UI//\n\twp_enqueue_style( 'jquery-ui', get_template_directory_uri() .'/css/jquery-ui.css',false,'1.1','all');\n\twp_enqueue_style( 'jquery-ui.theme', get_template_directory_uri() .'/css/jquery-ui.theme.css',false,'1.1','all');\n\twp_enqueue_style( 'jquery-ui.structure', get_template_directory_uri() .'/css/jquery-ui.structure.css',false,'1.1','all');\t\t\n\n\twp_register_script( 'jquery-ui', 'https://code.jquery.com/ui/1.12.1/jquery-ui.js', null, null, true );\n\t////JQUERY UI//\n\n\t//STYLE//\n\twp_enqueue_style( 'starter-theme-style', get_template_directory_uri() .'/css/style.css',false,'1.1','all');\n\t//STYLE//\n\n\t//MARQUEE//\n\twp_enqueue_script( 'marquee', get_template_directory_uri() . '/js/marquee3k.js', array ( 'jquery' ), 1.1, true);\n\t//MARQUEE//\n\n\t//COOKIE//\n\twp_enqueue_script( 'cookie', get_template_directory_uri() . '/js/jquery.ihavecookies.js', array ( 'jquery' ), 1.1, true);\n\t//COOKIE//\n\n\t//LATERAL MENU//\n\twp_enqueue_script( 'lateral_menu', get_template_directory_uri() . '/js/lateral_menu_collapse.js', array ( 'jquery' ), 1.1, true);\n\t//LATERAL MENU//\n\n\t////FLEXBOXGRID//\n\twp_register_style( 'flexboxgrid', 'https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css' );\n\twp_enqueue_style('flexboxgrid');\n\t////FLEXBOXGRID//\n\n\t////FANCYBOX//\n\twp_register_style( 'fancybox-css', 'https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.css' );\n\twp_enqueue_style('fancybox-css');\n\t\n\twp_register_script( 'fancybox-js', 'https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.js', null, null, true );\n\t\twp_enqueue_script('fancybox-js');\n\t////FANCYBOX//\n\n\t////FULLPAGE//\n\twp_register_style( 'swiper-css', 'https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css' );\n\twp_enqueue_style('swiper-css');\n\twp_register_script( 'swiper-js', 'https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/js/swiper.min.js', null, null, true );\n\t\twp_enqueue_script('swiper-js');\n\t////FULLPAGE//\n\t\n\t////ACCORDION//\n\twp_enqueue_script( 'accordion', get_template_directory_uri() . '/js/accordion.js', array ( 'jquery' ), 1.1, true);\n\t////ACCORDION//\n\n\n\n\n\twp_enqueue_script( 'starter-theme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );\n\n\twp_enqueue_script( 'starter-theme-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "709e7c3c2cc39f15a63d04ab233d07e6", "score": "0.629053", "text": "function starter_scripts() {\n\twp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css?family=Cairo:400,600,700&display=swap', array(), null, 'screen' );\n\twp_enqueue_style( 'starter-style', get_theme_file_uri( 'dist/bundle.css' ), array(), filemtime( get_theme_file_path( 'dist/bundle.css' ) ), 'screen' );\n\twp_enqueue_script( 'starter-script', get_theme_file_uri( 'dist/bundle.js' ), array(), filemtime( get_theme_file_path( 'dist/bundle.js' ) ), true );\n\n\twp_localize_script(\n\t\t'starter-script',\n\t\t'WPglobals',\n\t\tarray(\n\t\t\t'siteurl' => get_template_directory_uri(),\n\t\t\t'homeurl' => get_home_url(),\n\t\t)\n\t);\n}", "title": "" }, { "docid": "57ca48740321115bc336043dcc84c0d0", "score": "0.6287189", "text": "function keitaro_theme_scripts() {\n\n\t// Futura PT font from Typekit\n\twp_enqueue_script( 'futura-pt', get_stylesheet_directory_uri() . '/assets/js/futura-pt.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/futura-pt.min.js' ), true );\n\n\t// Main keitaro_theme stylesheet\n\twp_enqueue_style( 'keitaro-theme', get_stylesheet_uri(), null, filemtime( get_stylesheet_directory() . '/style.css' ) );\n\n\t// jQuery\n\twp_enqueue_script( 'jquery' );\n\n\t// Bootstrap JS modules\n\twp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri() . '/assets/js/bootstrap.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/bootstrap.min.js' ), true );\n\n\t// Custom JS minified\n\twp_enqueue_script( 'custom-js', get_stylesheet_directory_uri() . '/assets/js/custom.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/custom.min.js' ), true );\n\n\t// Prism.js - load only for pages, posts and custom post types\n\tif ( is_singular() && ! is_page() ) :\n\t\t// Main keitaro_theme stylesheet\n\t\twp_enqueue_style( 'prism-css', get_stylesheet_directory_uri() . '/assets/css/prism-okaidia.css', null, filemtime( get_stylesheet_directory() . '/assets/css/prism-okaidia.css' ) );\n\t\twp_enqueue_style( 'prism-toolbar-css', get_stylesheet_directory_uri() . '/assets/css/prism-toolbar.css', null, filemtime( get_stylesheet_directory() . '/assets/css/prism-toolbar.css' ) );\n\t\twp_enqueue_script( 'clipboard-js', get_stylesheet_directory_uri() . '/assets/js/clipboard.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/clipboard.min.js' ), true );\n\t\twp_enqueue_script( 'prism-js', get_stylesheet_directory_uri() . '/assets/js/prism.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/prism.min.js' ), true );\n\t\twp_enqueue_script( 'prism-toolbar-js', get_stylesheet_directory_uri() . '/assets/js/prism-toolbar.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/prism-toolbar.min.js' ), true );\n\t\twp_enqueue_script( 'prism-clipboard-js', get_stylesheet_directory_uri() . '/assets/js/prism-copy-to-clipboard.min.js', null, filemtime( get_stylesheet_directory() . '/assets/js/prism-copy-to-clipboard.min.js' ), true );\n\tendif;\n\n}", "title": "" }, { "docid": "360fc3f9700613c10f4a3db9e9a46ef9", "score": "0.6287018", "text": "function gp_setup(){\r\n wp_enqueue_style('style', get_stylesheet_uri(), NULL, microtime(), 'all');\r\n wp_enqueue_script('main', get_theme_file_uri('/js/main.js'), NULL, microtime(), true);\r\n}", "title": "" }, { "docid": "f138325175d9a386ab6c6d770485f692", "score": "0.62867296", "text": "function okay_scripts_styles() {\n\n\t//--------------------- // Stylesheets // ---------------------//\n\n\t//Main Stylesheet\n\twp_enqueue_style( 'sketch_style', get_stylesheet_uri() );\n\n\t//Media Queries\n\twp_enqueue_style( 'sketch_media_queries', get_template_directory_uri() . \"/includes/styles/media-queries.css\" );\n\n\t//Dark Stylesheet\n\tif ( get_option('okay_theme_customizer_color_scheme') == 'dark' ) {\n\t\twp_enqueue_style( 'sketch_style_dark', get_template_directory_uri() . \"/includes/styles/dark.css\");\n\t}\n\n\t//Flexslider CSS\n\twp_enqueue_style( 'fancybox_css', get_template_directory_uri() . \"/includes/js/flexslider/flexslider.css\" );\n\n\t//--------------------- // Scripts // ---------------------//\n\n\t//Register jQuery\n\twp_enqueue_script('jquery');\n\n\t//Custom JS\n\twp_enqueue_script('custom_js', get_template_directory_uri() . '/includes/js/custom/custom.js', false, false , false);\n\n\t//Localize Script\n\twp_localize_script('custom_js', 'custom_js_vars', array(\n\t\t'template_uri' => get_template_directory_uri(),\n\t\t'portfolio_sort' => get_option('okay_theme_customizer_enable_portfolio_sort'),\n\t\t)\n\t);\n\n\tif ( get_option('okay_theme_customizer_enable_portfolio_sort') == 'enabled' ) {\n\t\t//Quicksand Easing\n\t\twp_enqueue_script('easing_js', get_template_directory_uri() . '/includes/js/quicksand/jquery.easing.1.3.js', false, false , true);\n\n\t\t//Quicksand Script\n\t\twp_enqueue_script('quicksand_js', get_template_directory_uri() . '/includes/js/quicksand/quicksand.js', false, false , true);\n\t}\n\n\t//jQuery BBQ\n \twp_enqueue_script('bbq_js', get_template_directory_uri() . '/includes/js/bbq/jquery-bbq.min.js', array('jquery'), false , false);\n\n\t//Flexslider Script\n\twp_enqueue_script('flexslider_js', get_template_directory_uri() . '/includes/js/flexslider/jquery.flexslider-min.js', false, false , true);\n\n\t//Waypoints Script\n\twp_enqueue_script('waypoints_js', get_template_directory_uri() . '/includes/js/waypoints/waypoints.min.js', false, false , true);\n\n\t//Mobile Menu\n\twp_enqueue_script('menu_js', get_template_directory_uri() . '/includes/js/menu/jquery.mobilemenu.js', false, false , true);\n\n\t//FidVid\n\twp_enqueue_script('fitvid_js', get_template_directory_uri() . '/includes/js/fitvid/jquery.fitvids.js', false, false);\n\n\t//--------------------- // Fonts // ---------------------//\n\n\twp_enqueue_style('google_coda', 'http://fonts.googleapis.com/css?family=Coda:400');\n wp_enqueue_style('google_open', 'http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,300');\n}", "title": "" }, { "docid": "a90265a67e689dc89b68dad1340db7cf", "score": "0.6285072", "text": "function theme_scripts_and_styles() {\n if (!is_admin()) {\n // Disable gutenberg built-in styles\n// wp_dequeue_style('wp-block-library');\n\n // Styles\n wp_enqueue_style('main', get_template_directory_uri() . '/assets/css/main.css', null, null); // 2rd priority\n wp_enqueue_style('style', get_template_directory_uri() . '/style.css', null, null); // 1st priority\n\n // JavaScripts\n wp_enqueue_script('jquery');\n wp_enqueue_script('main', get_template_directory_uri() . '/assets/js/main.js', null, null, true); // This should go first\n }\n}", "title": "" }, { "docid": "5711872da0443e67b4f20762ba70cc20", "score": "0.62838435", "text": "function adding_theme_scripts()\r\n{\r\n // Fontawesome\r\n wp_enqueue_style('Fontawesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');\r\n // Main\r\n wp_enqueue_style('portfolio-main', get_template_directory_uri() . '/css/style.css', array(), wp_get_theme()->get('Version'));\r\n\r\n /* ---- Java Script Files ---- */\r\n wp_enqueue_script('jquery');\r\n wp_register_script('main-js', get_theme_file_uri('/js/main.js'), array('jquery'), wp_get_theme()->get('Version'), true);\r\n wp_enqueue_script('main-js');\r\n}", "title": "" }, { "docid": "d0150f53fe77045ea70ae1a59e433ab3", "score": "0.62816334", "text": "function theme_name_scripts() {\r\n //wp_enqueue_style( 'fonts', '//cloud.webtype.com/css/1b7cfdf0-9828-4ed8-b99b-ccab8b975185.css');\r\n\twp_enqueue_style( 'fonts', '//fast.fonts.net/cssapi/e64835e4-ce1a-486d-8414-bc9d3ec7ae11.css');\r\n\twp_enqueue_style( 'main-style', get_stylesheet_uri(), array(), strval(filemtime(get_template_directory().\"/style.css\")) );\r\n\twp_enqueue_script( 'main-script', get_template_directory_uri() . '/script.js', array('jquery'), '1.0.0', true );\r\n\twp_enqueue_script( 'touchswipe', get_template_directory_uri() . '/inc/jquery.touchSwipe.min.js', array('jquery'), '1.0.0', true );\r\n}", "title": "" }, { "docid": "f8d21c8a5e6a1f514235f1718a5c4130", "score": "0.6280511", "text": "function now_scripts_styles() {\n\n\t$defaults = now_get_defaults();\n\n\t// Add Genericons font.\n\twp_enqueue_style( 'now-genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), NOW_VERSION );\n\n\t$font_url = now_get_font_url();\n\tif ( ! empty( $font_url ) )\n\t\twp_enqueue_style( 'now-fonts', esc_url_raw( $font_url ), array(), NOW_VERSION );\n\n\t// Loads our main stylesheet.\n\twp_enqueue_style( 'now-style', get_stylesheet_uri(), array(), NOW_VERSION );\n\n\t// Adds JavaScript for handing the navigation menu hide-and-show behavior.\n\twp_enqueue_script( 'now-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), NOW_VERSION, true );\n}", "title": "" }, { "docid": "8ed8a4b6fd819c82e3876a1823572249", "score": "0.6279989", "text": "function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}", "title": "" }, { "docid": "93a1f6016a765484f3ea167e5ef80909", "score": "0.6270611", "text": "public function init() {\n // Load our custom CSS stylesheet\n $this->addStyle('stylesheet', 'styles/style.css');\n\n // Load jQuery from a local copy.\n // Based on the default theme\n $min = Config::getVar('general', 'enable_minified') ? '.min' : '';\n $request = Application::getRequest();\n // Use OJS's built-in jQuery files\n $jquery = $request->getBaseUrl() . '/lib/pkp/lib/components/jquery/jquery' . $min . '.js';\n $jqueryUI = $request->getBaseUrl() . '/lib/pkp/lib/components/jquery-ui/jquery-ui' . $min . '.js';\n\n // Use an empty `baseUrl` argument to prevent the theme from looking for\n // the files within the theme directory\n $this->addScript('jQuery', $jquery, array('baseUrl' => ''));\n $this->addScript('jQueryUI', $jqueryUI, array('baseUrl' => ''));\n $this->addScript('jQueryTagIt', $request->getBaseUrl() . '/lib/pkp/js/lib/jquery/plugins/jquery.tag-it.js', array('baseUrl' => ''));\n\n // Load custom JavaScript for this theme\n $this->addScript('okayNav', 'js/vendor/jquery.okayNav-min.js');\n $this->addScript('global', 'js/script.js');\n $this->addScript('default', 'js/main.js');\n }", "title": "" }, { "docid": "4594d88b3b8200eff0a12eec866bc1ef", "score": "0.62673944", "text": "function fabthemes_scripts() {\n\n\twp_enqueue_style( 'animate', get_template_directory_uri() . '/css/animate.css' );\n\twp_enqueue_style( 'boostrap-grid', get_template_directory_uri() . '/css/bootstrap-grid.css' );\n\twp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.css' );\n\twp_enqueue_style( 'owl-carousel', get_template_directory_uri() . '/owl-carousel/owl.carousel.css' );\n\twp_enqueue_style( 'owl-theme', get_template_directory_uri() . '/owl-carousel/owl.theme.css' );\t\n\twp_enqueue_style( 'fabthemes-style', get_stylesheet_uri() );\n\twp_enqueue_style( 'theme', get_template_directory_uri() . '/theme.css' );\n\twp_enqueue_style( 'responsive', get_template_directory_uri() . '/css/responsive.css' );\n\twp_enqueue_style( 'custom', get_template_directory_uri() . '/css/custom.php' );\n\n\twp_enqueue_script( 'jquery');\n\twp_enqueue_script( 'owl-carousel', get_template_directory_uri() . '/owl-carousel/owl.carousel.js', array(), '20120206', true );\n\twp_enqueue_script( 'tinynav', get_template_directory_uri() . '/js/tinynav.js', array(), '20120206', true );\t\n\twp_enqueue_script( 'effects', get_template_directory_uri() . '/js/effects.js', array(), '20120206', true );\t\n\twp_enqueue_script( 'fabthemes-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\twp_enqueue_script( 'fabthemes-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n}", "title": "" }, { "docid": "ca8ad1039624b7c13a4c68b00d299907", "score": "0.6262181", "text": "function mu_themes_in_use(){$this->__construct();}", "title": "" }, { "docid": "6efb86cf4551c143c689b47670c5951b", "score": "0.62555254", "text": "function add_theme_scripts() {\n\n wp_enqueue_style( 'style', get_stylesheet_uri());\n wp_enqueue_style( 'font-awesome-css', get_template_directory_uri().'/stylesheets/font-awesome.min.css'); \n wp_enqueue_style( 'bootstrap-css', get_template_directory_uri().'/stylesheets/bootstrap.min.css'); \n wp_enqueue_style( 'carousel-css', get_template_directory_uri().'/stylesheets/owl.carousel.css'); \n wp_enqueue_style( 'mmenu-css', get_template_directory_uri().'/stylesheets/jquery.mmenu.all.css');\n wp_enqueue_style( 'global-css', get_template_directory_uri().'/stylesheets/global.css');\n wp_enqueue_style( 'device-css', get_template_directory_uri().'/stylesheets/device.css');\n \n //js\n //wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'jquery-lib-js', get_template_directory_uri().'/javascripts/jquery-3.2.1.min.js');\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri().'/javascripts/bootstrap.min.js');\n wp_enqueue_script( 'mmenu-js', get_template_directory_uri().'/javascripts/jquery.mmenu.min.all.js');\n wp_enqueue_script( 'carousel-js', get_template_directory_uri().'/javascripts/owl.carousel.js');\n //wp_enqueue_script( 'masonry-js', get_template_directory_uri().'/javascripts/masonry.pkgd.min.js');\n wp_enqueue_script( 'global-js', get_template_directory_uri().'/javascripts/global.js');\n \n}", "title": "" }, { "docid": "60fd9410aea4b314714a051e78cd1f26", "score": "0.6250153", "text": "function theme_scripts(){\r\n\r\nglobal $wp_scripts;\r\n\r\nwp_register_script('html5-shiv'\r\n,'https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js', \r\narray(), '3.7.3', false );\r\n\r\nwp_register_script('respond-js'\r\n,'https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js', \r\narray(), '1.4.2', false );\r\n\r\n$wp_scripts->add_data('html5-shiv','conditional' , 'lt IE 9');\r\n$wp_scripts->add_data('respond-js','conditional' , 'lt IE 9');\r\n\r\nwp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js' ,\r\narray('jquery'), '3.3.7', true );\r\n\r\nwp_enqueue_script('theme-js', get_template_directory_uri() . '/js/theme.js' ,\r\narray('jquery'), '1.0.0', true );\r\n\r\n}", "title": "" }, { "docid": "90e9acc5218efa4d526bfafa6f13ff4f", "score": "0.6249037", "text": "public function theme_scripts() {\n\t\t/* wp_enqueue_script(\n\t\t\t'flexdatalist',\n\t\t\t'https://cdnjs.cloudflare.com/ajax/libs/jquery-flexdatalist/2.2.4/jquery.flexdatalist.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t); */\n\t\twp_enqueue_script(\n\t\t\t'owl-carousel',\n\t\t\tTHEME_URL . '/assets/owl-carousel/owl.carousel.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'handlebars',\n\t\t\tTHEME_URL . '/assets/js/handlebars.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'jquery-ui',\n\t\t\tTHEME_URL . '/assets/js/jquery-ui.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n 'simplebar',\n 'https://cdn.jsdelivr.net/npm/[email protected]/dist/simplebar.min.js',\n [],\n 'auto',\n true\n );\n\t\twp_enqueue_script(\n\t\t\t'mcustomscrollbar',\n\t\t\tTHEME_URL . '/assets/js/jquery.mCustomScrollbar.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'navigo',\n\t\t\tTHEME_URL . '/assets/js/navigo.min.js',\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'submit-feedback',\n\t\t\tTHEME_URL . '/assets/js/submit-feedback.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'submit-contact',\n\t\t\tTHEME_URL . '/assets/js/submit-contact.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\t// phpcs:ignore -- load in header, after jQuery.\n\t\twp_enqueue_script(\n\t\t\t'tracking',\n\t\t\tTHEME_URL . '/assets/js/tracking.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto'\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'theme',\n\t\t\tTHEME_URL . '/assets/js/theme.js',\n\t\t\t[ 'jquery', 'mediaelement', 'submit-feedback' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\t/* wp_enqueue_script(\n\t\t\t'search',\n\t\t\tTHEME_URL . '/assets/js/search.js',\n\t\t\t[ 'flexdatalist' ],\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t); */\n\t\t$error_messages = [\n\t\t\t'required' => __( 'This field is required. Please be sure to check.', 'asvz' ),\n\t\t\t'email' => __( 'Your E-mail address appears to be invalid. Please be sure to check.', 'asvz' ),\n\t\t\t'number' => __( 'You can enter only numbers in this field.', 'asvz' ),\n\t\t\t'maxLength' => __( 'Maximum {count} characters allowed!', 'asvz' ),\n\t\t\t'minLength' => __( 'Minimum {count} characters allowed!', 'asvz' ),\n\t\t\t'maxChecked' => __( 'Maximum {count} options allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'minChecked' => __( 'Please select minimum {count} options.', 'asvz' ),\n\t\t\t'maxSelected' => __( 'Maximum {count} selection allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'minSelected' => __( 'Minimum {count} selection allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'notEqual' => __( 'Fields do not match. Please be sure to check.', 'asvz' ),\n\t\t\t'different' => __( 'Fields cannot be the same as each other', 'asvz' ),\n\t\t\t'creditCard' => __( 'Invalid credit card number. Please be sure to check.', 'asvz' ),\n\t\t];\n\n\t\t/* $menu_items = [\n\t\t\t'categories' => [\n\t\t\t\t'text' => get_field( 'menu__categories__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__categories__icon', 'option' ),\n\t\t\t],\n\t\t\t'materials' => [\n\t\t\t\t'text' => get_field( 'menu__materials__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__materials__icon', 'option' ),\n\t\t\t],\n\t\t\t'tips' => [\n\t\t\t\t'text' => get_field( 'menu__tips__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__tips__icon', 'option' ),\n\t\t\t],\n\t\t\t'faq' => [\n\t\t\t\t'text' => get_field( 'menu__faq__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__faq__icon', 'option' ),\n\t\t\t],\n\t\t\t'contact' => [\n\t\t\t\t'text' => get_field( 'menu__contact__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__contact__icon', 'option' ),\n\t\t\t],\n\t\t]; */\n\n\t\t/* $type_icons = [\n\t\t\t'category' => get_field( 'type_icon__category', 'option' ),\n\t\t\t'task' => get_field( 'type_icon__task', 'option' ),\n\t\t\t'step' => get_field( 'type_icon__step', 'option' ),\n\t\t\t'material' => get_field( 'type_icon__material', 'option' ),\n\t\t\t'faq' => get_field( 'type_icon__faq', 'option' ),\n\t\t]; */\n\n\t\t/* foreach ( $type_icons as $key => $value ) {\n\t\t\tif ( $type_icons[ $key ] ) {\n\t\t\t\t$type_icons[ $key ] = $type_icons[ $key ]['sizes']['thumbnail'];\n\t\t\t}\n\t\t} */\n\n\t\t$asvz_objects = [\n\t\t\t'themeUrl' => THEME_URL,\n\t\t\t/*'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n\t\t\t'nonces' => [\n\t\t\t\t'submit_feedback' => wp_create_nonce( 'ASVZ_Submit_Feedback' ),\n\t\t\t\t'submit_contact' => wp_create_nonce( 'ASVZ_Submit_Contact' ),\n\t\t\t],\n\t\t\t'categories' => Category::all(),\n\t\t\t'materials' => Material::all(),\n\t\t\t'tasks' => Task::all(),\n\t\t\t'steps' => Step::all(),\n\t\t\t'faqs' => Faq::all(),\n\t\t\t'pages' => [\n\t\t\t\t'welcome' => [\n\t\t\t\t\t'title' => get_field( 'welcome_page__title', 'option' ),\n\t\t\t\t\t'subtitle' => get_field( 'welcome_page__subtitle', 'option' ),\n\t\t\t\t\t'thumbnail' => get_field( 'welcome_page__thumbnail', 'option' ),\n\t\t\t\t\t'description' => get_field( 'welcome_page__description', 'option' ),\n\t\t\t\t\t'cta_button' => [\n\t\t\t\t\t\t'text' => get_field( 'welcome_page__cta_button__text', 'option' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'feedback_form' => [\n\t\t\t\t'intro' => get_field( 'cleaning_feedback__intro', 'option' ),\n\t\t\t\t'title' => get_field( 'cleaning_feedback__title', 'option' ),\n\t\t\t\t'subtitle' => get_field( 'cleaning_feedback__subtitle', 'option' ),\n\t\t\t\t'placeholder' => get_field( 'cleaning_feedback__placeholder', 'option' ),\n\t\t\t\t'messages' => [\n\t\t\t\t\t'success' => get_field( 'cleaning_feedback__success_message', 'option' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'contact_form' => [\n\t\t\t\t'labels' => [\n\t\t\t\t\t'name' => get_field( 'cleaning_contact__label__name', 'option' ),\n\t\t\t\t\t'email' => get_field( 'cleaning_contact__label__email', 'option' ),\n\t\t\t\t\t'subject' => get_field( 'cleaning_contact__label__subject', 'option' ),\n\t\t\t\t\t'body' => get_field( 'cleaning_contact__label__body', 'option' ),\n\t\t\t\t\t'button' => get_field( 'cleaning_contact__label__button', 'option' ),\n\t\t\t\t],\n\t\t\t\t'placeholders' => [\n\t\t\t\t\t'name' => get_field( 'cleaning_contact__placeholder__name', 'option' ),\n\t\t\t\t\t'email' => get_field( 'cleaning_contact__placeholder__email', 'option' ),\n\t\t\t\t\t'subject' => get_field( 'cleaning_contact__placeholder__subject', 'option' ),\n\t\t\t\t\t'body' => get_field( 'cleaning_contact__placeholder__body', 'option' ),\n\t\t\t\t],\n\t\t\t\t'messages' => [\n\t\t\t\t\t'success' => [\n\t\t\t\t\t\t'title' => get_field( 'cleaning_contact__success_message__title', 'option' ),\n\t\t\t\t\t\t'description' => get_field( 'cleaning_contact__success_message__description', 'option' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'menu_items' => $menu_items,\n\t\t\t'page_titles' => [\n\t\t\t\t'categories' => __( 'Categorieën', 'asvz' ),\n\t\t\t\t'products' => __( 'Producten', 'asvz' ),\n\t\t\t\t'tasks' => __( 'Takenlijst', 'asvz' ),\n\t\t\t\t'tips' => __( 'Tips', 'asvz' ),\n\t\t\t\t'contact' => __( 'Contact', 'asvz' ),\n\t\t\t\t'faq' => __( 'Veelgestelde vragen', 'asvz' ),\n\t\t\t],\n\t\t\t'general_labels' => [\n\t\t\t\t'menu_header' => __( 'Poets!', 'asvz' ),\n\t\t\t\t'powered_by' => __( 'Powered By ASVZ', 'asvz' ),\n\t\t\t\t'search_placeholder' => __( 'Search keyword...', 'asvz' ),\n\t\t\t\t'tips_title' => __( 'Poets tips', 'asvz' ),\n\t\t\t\t'material_needed' => __( 'Bekijk hier wat je allemaal nodig hebt', 'asvz' ),\n\t\t\t\t'menu_header' => __( '', 'asvz' ),\n\t\t\t\t'completed_material' => __( 'Your material is complete!', 'asvz' ),\n\t\t\t],\n\t\t\t'popup' => [\n\t\t\t\t'trigger' => [\n\t\t\t\t\t'tips_icon' => get_field( 'tips_popup__trigger_icon', 'option' ),\n\t\t\t\t\t'wizard_icon' => get_field( 'wizard_popup__trigger_icon', 'option' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'type_icons' => $type_icons,*/\n\t\t];\n\n\t\twp_localize_script(\n\t\t\t'theme',\n\t\t\t'asvzObj',\n\t\t\t$asvz_objects\n\t\t);\n\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "0c68c7907ad42330fc21b8efa46fd09c", "score": "0.6247243", "text": "function pm_hope_scripts_styles() {\n\t\t\t\n\t\tglobal $wp_styles;\n\t\tglobal $post;\n\t\n\t\t// Adds JavaScript to pages with the comment form to support sites with threaded comments (when in use).\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) )\n\t\t\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\n\t\t\t//Adds JavaScript for handling the navigation menu hide-and-show behavior.\n\t\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/vendor/bootstrap.min.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'modrnizer', get_template_directory_uri() . '/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js', array(\"jquery\"), '1.0', false );\n\t\t\twp_enqueue_script( 'froogaloop', get_template_directory_uri() . '/js/froogaloop2.min.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'fitvids', get_template_directory_uri() . '/js/jquery.fitvids.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'superfish', get_template_directory_uri() . '/js/superfish/superfish.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'hoverIntent', get_template_directory_uri() . '/js/superfish/hoverIntent.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'hovertile', get_template_directory_uri() . '/js/hovertile.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'tinynav', get_template_directory_uri() . '/js/tinynav.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'easing', get_template_directory_uri() . '/js/jquery.easing-1.3.js', array(\"jquery\"), '1.0', true );\n\t\t\t\n\t\t\tif( is_single() ){\n\t\t\t\t//Flexslider\n\t\t\t\twp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/flexslider/jquery.flexslider.js', array(\"jquery\"), '1.0', true );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(is_home() || is_front_page()){\n\t\t\t\t//Load pulse slider\n\t\t\t\twp_enqueue_script( 'pulseslider', get_template_directory_uri() . '/js/pulse/jquery.PMSlider.js', array('jquery'), '1.0', true );\n\t\t\t\twp_enqueue_style( 'pulseslider-css', get_template_directory_uri() . '/js/pulse/pm-slider.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t}\n\t\t\t\t\t\n\t\t\t//load owl carousel\n\t\t\tif( pm_ln_has_shortcode('sponsorsCarousel') || is_archive() || pm_ln_is_plugin_active( 'js_composer/js_composer.php' ) ) {\n\t\t\t\twp_enqueue_style( 'pulsar-owl-carousel', get_template_directory_uri() . '/js/owl-carousel/owl.carousel.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\twp_enqueue_script( 'pulsar-owl-carousel-js', get_template_directory_uri() . '/js/owl-carousel/owl.carousel.js', array(\"jquery\"), '1.0', true );\n\t\t\t}\n\t\t\t\n\t\t\t$enableRetina = get_theme_mod('enableRetina','off');\n\t\t\tif($enableRetina === 'on'){\n\t\t\t\twp_enqueue_script( 'retina', get_template_directory_uri() . '/js/retina.js', array(\"jquery\"), '1.0', true );\n\t\t\t}\n\t\t\t\n\t\t\t//Ajax email\t\t\n\t\t\tif(is_active_widget( '', '', 'pm_quickcontact_widget')) {\n\t\t\t\twp_enqueue_script( 'pulsar-ajaxemail', get_template_directory_uri() . '/js/ajax-quick-contact/ajax-quick-email.js', array(\"jquery\"), '1.0', true );\t\n\t\t\t}\n\t\t\t\n\t\t\t//PrettyPhoto - use for galleries if needed\n\t\t\tif('post_galleries' == get_post_type() || is_page_template('template-gallery.php') || pm_ln_is_plugin_active( 'js_composer/js_composer.php' ) ){\n\t\t\t\twp_enqueue_script( 'pulsar-prettyphoto', get_template_directory_uri() . '/js/prettyphoto/js/jquery.prettyPhoto.js', array(\"jquery\"), '1.0', true );\n\t\t\t\twp_enqueue_script( 'pulsar-prettyphoto', get_template_directory_uri() . '/js/jquery-migrate-1.2.1.min.js', array(\"jquery\"), '1.0', true );\n\t\t\t\twp_enqueue_style( 'pulsar-prettyPhoto', get_template_directory_uri() . '/js/prettyphoto/css/prettyPhoto.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t}\n\t\t\t\n\t\t\t//Micro Themes plug-ins\n\t\t\twp_enqueue_script( 'pulsar-hoverPanel', get_template_directory_uri() . '/js/jquery.hoverPanel.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'pulsar-tooltip', get_template_directory_uri() . '/js/jquery.tooltip.js', array(\"jquery\"), '1.0', true );\n\t\t\t\n\t\t\t//Load countdown on event page only - specific for HOPE Theme\n\t\t\tif('post_events' == get_post_type()){\n\t\t\t\twp_enqueue_script( 'pulsar-countdown', get_template_directory_uri() . '/js/countdown/js/jquery.ccountdown.js', array(\"jquery\"), '1.0', true );\n\t\t\t\twp_enqueue_script( 'pulsar-knob', get_template_directory_uri() . '/js/countdown/js/jquery.knob.js', array(\"jquery\"), '1.0', true );\n\t\t\t\twp_enqueue_script( 'pulsar-countdowninit', get_template_directory_uri() . '/js/countdown/js/init.js', array(\"jquery\"), '1.0', true );\n\t\t\t}\n\t\t\t\n\t\t\tif( pm_ln_has_shortcode('googleMap') || pm_ln_is_plugin_active( 'js_composer/js_composer.php' ) ) {\n\t\t\t\t\n\t\t\t\t$googleAPIKey = get_theme_mod('googleAPIKey');\n\t\t\t\t\n\t\t\t\t//Google maps shortcode support\n\t\t\t\twp_register_script('googlemaps', ('//maps.google.com/maps/api/js?key='.$googleAPIKey.''), false, null, true);\n\t\t\t\twp_enqueue_script('googlemaps');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\n\t\t\tif(is_page_template('template-organizers.php') || is_page_template('template-events.php') || is_page_template('template-gallery.php')){\n\t\t\t\t\n\t\t\t\t//load isotope\n\t\t\t\twp_enqueue_style( 'pulsar-isotope-css', get_template_directory_uri() . '/js/isotope/isotope.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\t//wp_enqueue_script( 'pulsar-isotope', get_template_directory_uri() . '/js/isotope/jquery.isotope.min.js', array(\"jquery\"), '1.0', true );\n\t\t\t\twp_enqueue_script( 'pulsar-isotope', get_template_directory_uri() . '/js/isotope/isotope.pkgd.min.js', array(\"jquery\"), '1.0', true );\n\t\t\t\t\n\t\t\t\t//Load Ajax loader - Still need to create this\n\t\t\t\twp_enqueue_script( 'jcustom', true );\n\t\t\t\t$array = array( \n\t\t\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t\t\t'nonce' => wp_create_nonce('pulsar_ajax'),\n\t\t\t\t\t'loading' => esc_attr__('Loading...', 'localization')\n\t\t\t\t);\n\t\t\t\twp_localize_script( 'jcustom', 'pulsarajax', $array );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Main scripts\n\t\t\twp_enqueue_script( 'pulsar-main', get_template_directory_uri() . '/js/main.js', array(\"jquery\"), '1.0', true );\n\t\t\twp_enqueue_script( 'pulsar-init', get_template_directory_uri() . '/js/init.js', array(\"jquery\"), '1.0', true );\n\t\t\t\n\t\t\t//Load theme color selector (for sampling purposes)\n\t\t\t$colorSampler = get_theme_mod('colorSampler', 'off');\n\t\t\tif( $colorSampler == 'on' ){\n\t\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-mouse' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-draggable' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-widget ' );\n\t\t\t\twp_enqueue_script( 'pulsar-color', get_template_directory_uri() . '/js/iris/color.min.js', array(), '1.0', true );\n\t\t\t\twp_enqueue_script( 'pulsar-iris', get_template_directory_uri() . '/js/iris/iris.min.js', array(), '1.0', true );\n\t\t\t\twp_enqueue_style( 'pulsar-iris-css', get_template_directory_uri() . '/js/iris/iris.min.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\twp_enqueue_script( 'pulsar-theme-color-selector', get_template_directory_uri() . '/js/theme-sampler/theme-color-selector.js', array(), '1.0', true );\n\t\t\t\twp_enqueue_style( 'pulsar-theme-color-selector-css', get_template_directory_uri() . '/js/theme-sampler/theme-color-selector.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t}\n\t\t\t\n\t\t\t//Load twitter feed\n\t\t\tif(is_active_widget( '', '', 'latest-tweets')) {\n\t\t\t\twp_enqueue_script( 'twitterFetcher', get_template_directory_uri() . '/js/twitter-post-fetcher/twitterFetcher_min.js', array(\"jquery\"), '1.0', true );\n\t\t\t}\n\t\t\t\t\t\n\t\t\t//Loads our main stylesheet.\n\t\t\twp_enqueue_style( 'pulsar-style', get_stylesheet_uri() );\n\t\t\t\n\t\t\twp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap/bootstrap.css', array( 'pulsar-style' ), '20121010' );\n\t\t\twp_enqueue_style( 'main-css', get_template_directory_uri() . '/css/main.css', array( 'pulsar-style' ), '20121010' );\n\t\t\n\t\t\t//Loads other stylesheets.\n\t\t\twp_enqueue_style( 'superfish', get_template_directory_uri() . '/css/superfish/superfish.css', array( 'pulsar-style' ), '20121010' );\n\t\t\twp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/fontawesome/font-awesome.min.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\n\t\t\t\t\n\t\t\t//enable responsiveness\n\t\t\t$enableResponsiveness = get_theme_mod('enableResponsiveness', 'on'); \n\t\t\tif($enableResponsiveness === 'on'){\n\t\t\t\twp_enqueue_style( 'bootstrap-responsive', get_template_directory_uri() . '/css/bootstrap/bootstrap-responsive.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\twp_enqueue_style( 'pulsar-responsive', get_template_directory_uri() . '/css/responsive.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t} else {\n\t\t\t\twp_enqueue_style( 'pulsar-nonresponsive', get_template_directory_uri() . '/css/non-responsive.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif(is_home() || is_front_page()){\n\t\t\t\t//Flexslider\n\t\t\t\twp_enqueue_style( 'flexslider-css', get_template_directory_uri() . '/css/flexslider/flexslider.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(is_single()){\n\t\t\t\t//Flexslider\n\t\t\t\twp_enqueue_style( 'pulsar-flexslider-post', get_template_directory_uri() . '/css/flexslider/flexslider-post.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t}\n\t\t\t\n\t\t\t//Use for sponsor carousel\n\t\t\twp_enqueue_style( 'flexisel-css', get_template_directory_uri() . '/css/flexisel/flexisel.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t\n\t\t\t\n\t\t\t//Load ie9 specific css - use this to fix ie 9 issues\n\t\t\twp_enqueue_style( 'ie-nine-css', get_stylesheet_directory_uri() . '/css/ie9.css', array( 'pulsar-style' ), '20121010' );\n\t\t\t$wp_styles->add_data( 'ie-nine-css', 'conditional', 'IE 9' );\n\t\t\t\n\t\t\t//JS LOCALIZATION\n\t\t\t$js_file = get_template_directory_uri() . '/js/wordpress.js'; \n\t\t\t\n\t\t\t//PrettyPhoto settings\n\t\t\tglobal $hope_options;\n\t\t\t\n\t\t\t$ppAnimationSpeed = $hope_options['ppAnimationSpeed'];\n\t\t\t$ppAutoPlay = $hope_options['ppAutoPlay'];\n\t\t\t//$ppShowTitle = $hope_options['ppShowTitle'];\n\t\t\t$ppColorTheme = $hope_options['ppColorTheme'];\n\t\t\t$ppSlideShowSpeed = $hope_options['ppSlideShowSpeed'];\n\t\t\t\n\t\t\t//Post zoom effect\n\t\t\t$enablePostZoom = get_theme_mod('enablePostZoom', 'on');\n\t\t\t$enablePostHover = get_theme_mod('enablePostHover', 'on');\n\t\t\t$enableEventPostZoom = get_theme_mod('enableEventPostZoom', 'on');\n\t\t\t$enableEventPostHover = get_theme_mod('enableEventPostHover', 'on');\n\t\t\t\n\t\t\t//Micro slider settings\n\t\t\t$enableSlideShow = get_theme_mod('enableSlideShow', 'true');\n\t\t\t$slideLoop = get_theme_mod('slideLoop', 'true');\n\t\t\t$enableControlNav = get_theme_mod('enableControlNav', 'true');\n\t\t\t$pauseOnHover = get_theme_mod('pauseOnHover', 'true');\n\t\t\t$showArrows = get_theme_mod('showArrows', 'true');\n\t\t\t$animtionType = get_theme_mod('animtionType', 'fade');\n\t\t\t$slideShowSpeed = get_theme_mod('slideShowSpeed', 8000);\n\t\t\t$slideSpeed = get_theme_mod('slideSpeed', 500);\n\t\t\t$sliderHeight = get_theme_mod('sliderHeight', 800);\n\t\t\t//$enableFixedHeight = get_theme_mod('enableFixedHeight', 'true');\n\t\t\t\n\t\t\t//Get locale and export for JS\n\t\t\t$getLocale = get_locale();\n\t\t\t$splitLocale = explode(\"_\", $getLocale);\n\t\t\t$currentLocale = $splitLocale[0];\t\t\t\n\t\t\t\n\t\t\t$wordpressOptionsArray = array( \n\t\t\t\t'urlRoot' => home_url(),\n\t\t\t\t'pm_ln_ajax_url' => admin_url('admin-ajax.php'),\n\t\t\t\t'templatePath' => get_template_directory_uri(),\n\t\t\t\t'optContactFormNameError' => esc_attr__('Please enter your name.', 'localization'),\n\t\t\t\t'optContactFormEmailError' => esc_attr__('Please enter a valid email address.', 'localization'),\n\t\t\t\t'optContactFormInquiryError' => esc_attr__('Please enter a message.', 'localization'),\n\t\t\t\t'optFormSuccessMessage' => esc_attr__('Thank you, your inquiry has been received.', 'localization'),\n\t\t\t\t'optFormErrorMessage' => esc_attr__('A system error occurred, please try again.', 'localization'),\n\t\t\t\t'fieldValidation' => esc_html__('Validating form...', 'localization'),\n\t\t\t\t'enablePostZoom' => $enablePostZoom,\n\t\t\t\t'enableEventPostZoom' => $enableEventPostZoom,\n\t\t\t\t'enableEventPostHover' => $enableEventPostHover,\n\t\t\t\t'enablePostHover' => $enablePostHover,\n\t\t\t\t'ppAnimationSpeed' => $ppAnimationSpeed,\n\t\t\t\t'ppAutoPlay' => $ppAutoPlay,\n\t\t\t\t//'ppShowTitle' => $ppShowTitle,\n\t\t\t\t'ppColorTheme' => $ppColorTheme,\n\t\t\t\t'ppSlideShowSpeed' => $ppSlideShowSpeed,\n\t\t\t\t'currentLocale' => $currentLocale,\n\t\t\t\t'enableSlideShow' => $enableSlideShow,\n\t\t\t\t'slideLoop' => $slideLoop,\n\t\t\t\t'enableControlNav' => $enableControlNav,\n\t\t\t\t'animtionType' => $animtionType,\n\t\t\t\t'pauseOnHover' => $pauseOnHover,\n\t\t\t\t'showArrows' => $showArrows,\n\t\t\t\t'slideShowSpeed' => $slideShowSpeed,\n\t\t\t\t'slideSpeed' => $slideSpeed,\n\t\t\t\t'sliderHeight' => $sliderHeight,\n\t\t\t);\n\t\t\t\n\t\t\twp_enqueue_script('wordpressOptions', get_template_directory_uri() . '/js/wordpress.js');\n\t\t\twp_localize_script( 'wordpressOptions', 'wordpressOptionsObject', $wordpressOptionsArray );\n\t\t\t\n\t}", "title": "" }, { "docid": "ef88443340686f0e8d11800b28fee233", "score": "0.62368023", "text": "function theme_scripts() {\r\n\r\n wp_register_script('jqueryui', '//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js'); \r\n wp_enqueue_script('jqueryui');\r\n \r\n\r\n wp_register_script('slick', '//cdn.jsdelivr.net/jquery.slick/1.5.9/slick.min.js'); \r\n wp_enqueue_script('slick');\r\n \r\n wp_register_script('three', '//cdnjs.cloudflare.com/ajax/libs/three.js/r75/three.min.js'); \r\n wp_enqueue_script('three');\r\n\r\n wp_register_script('d3', '//cdnjs.cloudflare.com/ajax/libs/d3/4.2.2/d3.min.js'); \r\n wp_enqueue_script('d3');\r\n wp_register_script('d3-geo', '//d3js.org/d3-geo.v1.min.js'); \r\n wp_enqueue_script('d3-geo');\r\n \r\n wp_register_script('topojson', '//d3js.org/topojson.v2.min.js'); \r\n wp_enqueue_script('topojson');\r\n\r\n wp_register_script('tweenmax', '//cdnjs.cloudflare.com/ajax/libs/gsap/1.18.4/TweenMax.min.js'); \r\n wp_enqueue_script('tweenmax');\r\n \r\n\r\n \r\n //vendor is the stylesheet rendered \r\n wp_register_script('vendor',get_stylesheet_directory_uri() . '/vendor.js', array('jquery')); \r\n wp_enqueue_script('vendor');\r\n\r\n wp_register_script('main',get_stylesheet_directory_uri() . '/main.js', array('jquery'),rand(100000,999999), true); \r\n \r\n wp_enqueue_script('main');\r\n\r\n }", "title": "" }, { "docid": "7f68f00dc5d577b612662eed46a9ce9e", "score": "0.6236053", "text": "protected function prepareTheme(): void\n {\n register_nav_menus([\n 'main' => 'Main Menu',\n 'footer' => 'Footer Menu',\n ]);\n \n add_theme_support('post-thumbnails', get_post_types(['public' => true]));\n }", "title": "" }, { "docid": "d766a373167798da714b435b2065f522", "score": "0.6231935", "text": "function wpi_theme_js() {\n\n global $wp_scripts;\n\n wp_register_script('html5_shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', '', '', false);\n wp_register_script('respond_js', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', '', '', false);\n\n $wp_scripts->add_data('html5_shiv', 'conditional', 'lt IE 9');\n $wp_scripts->add_data('respond_js', 'conditional', 'lt IE 9');\n/**\n * Load javascripts used by the theme\n */\n\n\n\n \n wp_enqueue_script('main_js', get_template_directory_uri(). '/js/main.js', array('jquery'), '', true);\n wp_enqueue_script('bootstrap_js', get_template_directory_uri(). '/js/bootstrap.min.js', array('jquery'), '', true);\n \n \n \n \n\n }", "title": "" }, { "docid": "382e239fbd036811078417ccad33deb1", "score": "0.6225871", "text": "function get_themes()\n {\n }", "title": "" }, { "docid": "369c2b5aa0100f53c8633a01d29f88cb", "score": "0.6220783", "text": "function understrap_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'understrap-styles', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_style( 'enviro_consol_main_nav', get_stylesheet_directory_uri() . '/css/enviro_consol_main_nav.css', array(), $css_version );\n\n\t\twp_enqueue_style( 'enviro_component', get_stylesheet_directory_uri() . '/css/component.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\n\t\t$js_version = $theme_version . '.' . filemtime( get_template_directory() . '/js/theme.min.js' );\n\n\t\t// custom scripts\n\t\twp_enqueue_script( 'custom-main', get_stylesheet_directory_uri() . '/js/main.js', array( 'jquery' ) );\n\n\t\t// wp_enqueue_script( 'modernizr-custom-scripts', get_template_directory_uri() . '/js/modernizr-custom.js' );\n\n\t\twp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . '/js/theme.min.js', array(), $js_version, true );\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "6e56217201323343a546eb8d91d4d2ea", "score": "0.6219027", "text": "function scripts_styles() {\n\n\t\t// No need to process if in admin.\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$main_css_url = $theme_url . '/style.css';\n\t\t$main_css_path = get_template_directory() . '/style.css';\n\t\t$main_css_ver = file_exists( $main_css_path ) ? filemtime( $main_css_path ) : '';\n\n\t\twp_enqueue_style( 'superiocity-style', $main_css_url, null, $main_css_ver );\n\t\twp_deregister_script( 'wp-embed' );\n\t}", "title": "" }, { "docid": "9faae0f3d4d3cf129427fbd830b9d825", "score": "0.6218093", "text": "function webbusiness_scripts() {\n\twp_enqueue_style('webbusiness-style', get_stylesheet_uri());\n\twp_enqueue_style('webbusiness-framework', get_template_directory_uri() . '/css/framework.css');\n\t$style = get_theme_mod(\"style\");\n\tif (!$style || $style == \"default\") {\n\t\t$style = \"dark\";\n\t}\n\t$wp_customize = \"\";\n\tif (isset($_POST[\"wp_customize\"])) $wp_customize = $_POST[\"wp_customize\"];\n\tif ($wp_customize == \"on\") {\n\t\twp_enqueue_style('webbusiness-color-dynamic', get_template_directory_uri() . '/css/dynamic-css-customizer.php');\n\t} else {\n\t\twebbusiness_save_css();\n\t\t$uploads = wp_upload_dir();\n\t\t$uploads_dir = trailingslashit($uploads[\"basedir\"]);\n\t\t$uploads_path = trailingslashit($uploads[\"baseurl\"]);\n\t\tif (file_exists($uploads_dir . \"webbusiness.css\") /* && !$save_custom_css */) {\n\t\t\twp_enqueue_style('webbusiness-color-dynamic', $uploads_path . \"webbusiness.css\");\n\t\t} else {\n\t\t\twp_enqueue_style('webbusiness-color-dynamic', get_template_directory_uri() . '/css/dynamic-css.php');\n\t\t}\n\t}\n\n\twp_enqueue_style('webbusiness-layout', get_template_directory_uri() . '/css/webbusiness.css');\n\t\n\tif (!get_theme_mod(\"googlefonts_link\")) {\n\t\twp_enqueue_style('webbusiness-googlefonts', \"http://fonts.googleapis.com/css?family=Ubuntu\");\n\t}\n\t\n\twp_enqueue_script('webbusiness-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);\n\n\twp_enqueue_script('webbusiness-jquery-cycle', get_template_directory_uri() . '/js/jquery.cycle.all.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-superfish', get_template_directory_uri() . '/js/superfish.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-tinynav', get_template_directory_uri() . '/js/tinynav.min.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-script', get_template_directory_uri() . '/js/script.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-retina', get_template_directory_uri() . '/js/retina-1.1.0.min.js', array(), '20120206', true);\n\twp_enqueue_script('webbusiness-modernizr', get_template_directory_uri() . '/js/modernizr-2.0.6.min.js', array(), '20120206', false);\n\n\tif (is_singular() && comments_open() && get_option('thread_comments')) {\n\t\twp_enqueue_script('comment-reply');\n\t}\n\n\tif (is_singular() && wp_attachment_is_image()) {\n\t\twp_enqueue_script('webbusiness-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20120202');\n\t}\n}", "title": "" }, { "docid": "da1cd90e86475325689bee507e3b782f", "score": "0.6214951", "text": "function recept_theme_register_scripts_and_styles() {\n\t/**\n\t* Styles\n\t*/\n\t// Bootstrap 5\n\twp_enqueue_style('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css', [], '5.0.0-beta3', 'all');\n\n\t// Theme styles\n\twp_enqueue_style('recept_theme', get_parent_theme_file_uri('style.css'), ['bootstrap'], '0.1', 'all');\n\n\t// Print styles\n\twp_enqueue_style('recept_theme-print', get_parent_theme_file_uri('print.css'), ['bootstrap'], '0.1', 'print');\n\n\t/**\n\t * Scripts\n\t */\n\t// Bootstrap 5\n\t wp_enqueue_script('bootstrap', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', [], '5.0.0-beta3', true);\n\n\t// Theme scripts\n\twp_enqueue_script('recept_theme', get_parent_theme_file_uri('assets/js/scripts.js'), ['bootstrap'], '0.1', true);\n}", "title": "" }, { "docid": "1c3f8c75cc3e46f8fa83dc9b6a1a546f", "score": "0.621235", "text": "function mawt_scripts()\n {\n wp_register_style('google-fonts', 'https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap', [], '1.0.0', 'all');\n wp_register_style('bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css', [], '1.0.0', 'all');\n wp_register_style('style', get_stylesheet_uri(), ['bootstrap', 'google-fonts'], '', 'all');\n\n\n //Ejecutando la hoja de estilos\n wp_enqueue_style('google-fonts');\n wp_enqueue_style('bootstrap');\n wp_enqueue_style('style');\n\n //Registrando scripts\n //get_template_directory_uri() -> retorna el path hasta el directorio raiz del tema\n //true -> carga en el footer y false en el header\n wp_register_script('scripts_js', get_template_directory_uri() . '/script.js', ['jquery'], '1.0.0', true);\n\n\n //Ejecutando los scripts\n wp_enqueue_script('jquery'); //cargando jquery por default de wordpress\n wp_enqueue_script('scripts_js');\n }", "title": "" }, { "docid": "b135add7b8b0c84ab0dee1503940a8cf", "score": "0.62118036", "text": "function wt_scripts() {\n\twp_enqueue_style( 'vue-writing-theme-pacifico', 'https://fonts.googleapis.com/css?family=Pacifico', '', null );\n\twp_enqueue_style( 'vue-writing-theme-montserrat', 'https://fonts.googleapis.com/css?family=Montserrat', '', null );\n\twp_enqueue_style( 'vue-writing-theme-styles', get_stylesheet_uri() );\n\n wp_enqueue_script('vue-writing-theme-general',\n get_template_directory_uri() . '/dist/build.js',\n array('jquery'),\n time(),\n true );\n\n\n // wp_localize_script( 'vue-writing-theme-general', 'sitedata', array(\n // 'rest_url' => esc_url_raw( rest_url('wp/v2/' ) ),\n // \t\t)\n // ;\n\n}", "title": "" }, { "docid": "d8029ce401cdc962d7def949baf4f6a8", "score": "0.6206689", "text": "function soup2nuts_scripts_styles() {\n\n if ( !is_admin() ) {\n\n wp_enqueue_style( 'soup2nuts-style', get_template_directory_uri() . \"/assets/css/soup2nuts.css\", array(), VERSION, 'all' );\n\n wp_enqueue_script( 'soup2nuts-head', get_template_directory_uri() . \"/assets/js/head.js\", array(), VERSION, false );\n wp_enqueue_script( 'soup2nuts', get_template_directory_uri() . \"/assets/js/soup2nuts.js\", array(), VERSION, true );\n\n $wpURLs = array(\n 'template_directory_uri' => get_template_directory_uri(),\n 'stylesheet_directory_uri' => get_stylesheet_directory_uri(),\n 'siteurl' => get_option( 'siteurl' ),\n 'wpurl' => get_bloginfo( 'wpurl' ),\n 'url' => get_bloginfo( 'url' ),\n );\n\n wp_localize_script( 'soup2nuts', 'wpURLs', $wpURLs );\n\n }\n }", "title": "" }, { "docid": "4e1bd53d0587a7b4a5b0fb037e263140", "score": "0.6190424", "text": "function forty_theme_assets() {\r\n\r\n\t$var = '1.0.0';\r\n\r\n\t/* CSS */\r\n\twp_enqueue_style( 'font-awesome', get_theme_file_uri('/assets/css/font-awesome.min.css'), null, $var );\r\n\twp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Merriweather:300,700,300italic,700italic|Source+Sans+Pro:900', null, $var );\r\n\twp_enqueue_style( 'main-css', get_theme_file_uri('/assets/css/main.css'), null, $var );\r\n\twp_enqueue_style( 'noscript-css', get_theme_file_uri('/assets/css/noscript.css'), null, $var );\r\n\twp_enqueue_style( 'theme-css', get_stylesheet_uri(), '', $var );\r\n\r\n\t/* JavaScripts */\r\n\twp_enqueue_script( 'jquery' );\r\n\twp_enqueue_script( 'scrollex-js', get_theme_file_uri('/assets/js/jquery.scrollex.min.js'), null, $var );\r\n\twp_enqueue_script( 'scrolly-js', get_theme_file_uri('/assets/js/jquery.scrolly.min.js'), null, $var );\r\n\twp_enqueue_script( 'browser-js', get_theme_file_uri('/assets/js/browser.min.js'), null, $var );\r\n\twp_enqueue_script( 'breakpoints-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), null, $var );\r\n\twp_enqueue_script( 'util-js', get_theme_file_uri('/assets/js/util.js'), null, $var );\r\n\twp_enqueue_script( 'main-js', get_theme_file_uri('/assets/js/main.js'), array('jquery'), $var, true );\r\n\twp_enqueue_script( 'bootstrap-js', get_theme_file_uri('/assets/js/bootstrap.js'), array('jquery'), $var, true );\r\n\r\n\tif( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1) ) {\r\n // Load comment-reply.js (into footer)\r\n wp_enqueue_script( 'comment-reply', 'wp-includes/js/comment-reply', array(), false, true );\r\n }\r\n}", "title": "" }, { "docid": "ba6fcd20f0e0a95ed2248836dbb924eb", "score": "0.61840993", "text": "public function setup() {\n\t\t$theme = wp_get_theme();\n\n\t\tif ( 'OceanWP' == $theme->name || 'oceanwp' == $theme->template ) {\n\t\t\trequire_once( OE_PATH .'/includes/metabox/butterbean/butterbean.php' );\n\t\t\trequire_once( OE_PATH .'/includes/metabox/metabox.php' );\n\t\t\trequire_once( OE_PATH .'/includes/metabox/shortcodes.php' );\n\t\t\trequire_once( OE_PATH .'/includes/metabox/gallery-metabox/gallery-metabox.php' );\n\t\t\trequire_once( OE_PATH .'/includes/shortcodes/shortcodes.php' );\n\t\t\trequire_once( OE_PATH .'/includes/image-resizer.php' );\n\t\t\trequire_once( OE_PATH .'/includes/jsmin.php' );\n\t\t\trequire_once( OE_PATH .'/includes/panel/notice.php' );\n\t\t\trequire_once( OE_PATH .'/includes/walker.php' );\n\t\t\trequire_once( OE_PATH .'/includes/dashboard.php' );\n\t\t\trequire_once( OE_PATH .'/includes/panel/demos.php' );\n\t\t\t\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'scripts' ), 999 );\n\t\t}\n\t}", "title": "" }, { "docid": "4782057d60107b92f4a4de6124d1f506", "score": "0.61824685", "text": "function athemes_scripts() {\n\n\t//Load the fonts\n\t$headings_font = esc_html(get_theme_mod('headings_fonts'));\n\t$body_font = esc_html(get_theme_mod('body_fonts'));\n\tif( $headings_font ) {\n\t\twp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family='. $headings_font );\t\n\t} else {\n\t\twp_enqueue_style( 'athemes-headings-fonts', '//fonts.googleapis.com/css?family=Oswald:300,400,700');\n\t}\t\n\tif( $body_font ) {\n\t\twp_enqueue_style( 'athemes-body-fonts', '//fonts.googleapis.com/css?family='. $body_font );\t\n\t}\n\n\twp_enqueue_style( 'athemes-symbols', get_template_directory_uri() . '/css/athemes-symbols.css' );\n\n\twp_enqueue_style( 'athemes-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\twp_enqueue_style( 'athemes-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'athemes-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-superfish-hoverIntent', get_template_directory_uri() . '/js/hoverIntent.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-superfish', get_template_directory_uri() . '/js/superfish.js', array( 'jquery' ) );\n\twp_enqueue_script( 'athemes-settings', get_template_directory_uri() . '/js/settings.js', array( 'jquery' ) );\n\n\twp_enqueue_script( 'onexajax', get_template_directory_uri(). '/js/onexajax.js', array('jquery'));\n\n\twp_localize_script( 'onexajax', 'OnexAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'security' => wp_create_nonce( 'onex-special-string')));\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "506c694b431f43ce5411cda6211e2bde", "score": "0.6178898", "text": "function load_prod_styles_scripts() {\n // Theme styles\n wp_enqueue_style( 'themename', CHILD_SS_URI . '/assets/dist/style.min.css', false, null, 'all' );\n\n // Header Scripts\n wp_enqueue_script( 'header_scripts', CHILD_SS_URI . '/assets/dist/header.min.js', array(), null, false );\n\n // Footer Scripts\n wp_enqueue_script( 'footer_scripts', CHILD_SS_URI . '/assets/dist/footer.min.js', array( 'jquery' ), null, true );\n\n // Single Scripts\n if ( is_single() ) {\n wp_enqueue_script( 'single_scripts', CHILD_SS_URI . '/assets/dist/single.min.js', array( 'jquery' ), null, true );\n }\n}", "title": "" }, { "docid": "fcee24e398b39d373cc5f424c64c3a2b", "score": "0.61786014", "text": "function _temporary_action__wp_enqueue_scripts() {\n\twp_enqueue_script( THEME_PREFIX . '/critical/_temporary' );\n\twp_enqueue_style( THEME_PREFIX . '/critical/_temporary' );\n}", "title": "" }, { "docid": "27d4d7f4a607badedfcb460ae8e4d39f", "score": "0.61716086", "text": "function thoughts_register_scripts() {\n\twp_register_script( 'modernizr', get_template_directory_uri() . '/assets/js/components/modernizr/modernizr.js', array('jquery'), '1.0');\n wp_enqueue_script( 'modernizr' );\n\n wp_register_script( 'app', get_template_directory_uri() . '/assets/js/app.js', array('jquery', 'modernizr'), '1.0');\n wp_enqueue_script( 'app' );\n \n wp_register_style( 'app', get_template_directory_uri() . '/assets/css/app.css', array('bootstrap', 'bootstrap_theme'), '1.0', 'all' );\n wp_register_style( 'bootstrap', get_template_directory_uri() . '/assets/js/components/bootstrap/dist/css/bootstrap.min.css', array(), '3', 'all' );\n wp_register_style( 'bootstrap_theme', get_template_directory_uri() . '/assets/js/components/bootstrap/dist/css/bootstrap-theme.min.css', array(), '3', 'all' );\n wp_enqueue_style( 'app' );\n}", "title": "" }, { "docid": "5548a4bcf81e1fc93a4a01bfbd34231f", "score": "0.61685914", "text": "function theme_name_scripts() {\n\t\t// wp_enqueue_style( 'style-name', get_stylesheet_uri() );\n\t\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'retina.min', get_template_directory_uri() . '/js/retina.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'isotope.pkgd.min', get_template_directory_uri() . '/js/isotope.pkgd.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.magnific-popup.min', get_template_directory_uri() . '/js/jquery.magnific-popup.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.mousewheel.min', get_template_directory_uri() . '/js/jquery.mousewheel.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.tinycarousel.min', get_template_directory_uri() . '/js/jquery.tinycarousel.min.js', array(), '1.0.0', true );\n\t\twp_enqueue_script( 'jquery.lazylinepainter.min.js', get_template_directory_uri() . '/js/jquery.lazylinepainter.min.js', array(), '1.0.0', true );\n\t\tif ( is_page( 'contact' ) ){ wp_enqueue_script( 'jquery.gmap.min', get_template_directory_uri() . '/js/jquery.gmap.min.js', array(), '1.0.0', true ); }\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array(), '1.0.0', true );\n\t}", "title": "" }, { "docid": "337278f33c6e17ee5124748d01c0eb89", "score": "0.61678964", "text": "function theme_scripts() {\n\t// Theme stylesheet\n\twp_enqueue_style( 'main-styles', get_template_directory_uri() . '/assets/css/main.css' );\n\t// Theme sripts\n\twp_enqueue_script( 'main-scripts', get_theme_file_uri( '/assets/js/scripts.min.js' ), array( 'jquery' ), '1.0', true );\n}", "title": "" }, { "docid": "b3122d5c36f2e7d6d32f97dc5cad8b2e", "score": "0.6167262", "text": "function mk_resources() {\t\t\n\twp_enqueue_style('style', get_stylesheet_uri());\n\twp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-3.1.1.min.js', array(), '20120206', true );\n\twp_enqueue_script( 'custom-script', get_template_directory_uri() . '/js/script.js', array( 'jquery'), '1.1', true );\n}", "title": "" }, { "docid": "273311c3a5ae4986650aed11117dad31", "score": "0.6158278", "text": "function petem_setup()\n{\n wp_enqueue_style('style', get_stylesheet_uri(), NULL, 1.0);\n // wp_enqueue_style('normalize', get_theme_file_uri('/css/normalize.css'), NULL, 1.0);\n wp_enqueue_style('navbar', get_theme_file_uri('/css/navbar.css', NULL, 1.0));\n wp_enqueue_style('landing', get_theme_file_uri('/css/landing.css', NULL, 1.0));\n wp_enqueue_style('bands', get_theme_file_uri('/css/bands.css', NULL, 1.0));\n wp_enqueue_style('shows', get_theme_file_uri('/css/shows.css', NULL, 1.0));\n wp_enqueue_style('commercials', get_theme_file_uri('/css/commercials.css', NULL, 1.0));\n wp_enqueue_style('productions', get_theme_file_uri('/css/productions.css', NULL, 1.0));\n wp_enqueue_script('main', get_theme_file_uri('/js/main.js'), NULL, 1.0, true);\n wp_enqueue_script('prefix-font-awesome', 'https://kit.fontawesome.com/4685121e43.js');\n}", "title": "" }, { "docid": "9e17c0fa36743053347f38bb68f4b742", "score": "0.6158115", "text": "function theme_styles_scripts() {\n wp_enqueue_style('theme-style', get_template_directory_uri() . '/style.css');\n wp_enqueue_script('app-main', get_template_directory_uri() . '/app.bundle.js', null, null, true);\n}", "title": "" }, { "docid": "baa56015b8ee4fb0fbd515580d489219", "score": "0.6155245", "text": "function theme_files() {\n \n wp_register_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n wp_enqueue_style('style');\n\n wp_enqueue_script('jquery');\n\n wp_register_script('app', get_template_directory_uri() . '/dist/app.js', ['jquery'], 1, true);\n wp_enqueue_script('app');\n}", "title": "" }, { "docid": "796d09ed7121fd46043e398898c0dade", "score": "0.6148665", "text": "function landscaper_child_remove_theme_scripts() {\n wp_dequeue_style( 'thelandscaper-main' );\n wp_deregister_style( 'thelandscaper-main' );\n}", "title": "" }, { "docid": "8c0aa9eabb3693cc685c37d053e6dad0", "score": "0.61484706", "text": "function ws_scripts_styles() {\r\n\t$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';\r\n\r\n\t// wp_register_script( 'mixitup', get_template_directory_uri() . '/assets/js/vendor/jquery.mixitup.min.js', array(), WS_VERSION, true );\r\n\twp_register_script( 'angular', get_template_directory_uri() . '/explore/angular.min.js', array(), WS_VERSION, false );\r\n\twp_register_script( 'angular-route', get_template_directory_uri() . '/explore/angular-route.min.js', array(), WS_VERSION, false );\r\n\twp_register_script( 'angular-sanitize', get_template_directory_uri() . '/explore/angular-sanitize.min.js', array(), WS_VERSION, false );\r\n\twp_register_script( 'angular-animate', get_template_directory_uri() . '/explore/angular-animate.min.js', array(), WS_VERSION, false );\r\n\twp_register_script( 'explore', get_template_directory_uri() . '/explore/explore.js', array(), WS_VERSION, true );\r\n\r\n\twp_enqueue_script( 'jquery' );\r\n\r\n\tif ( is_page_template( 'templates/about-offices.php' ) || is_page_template( 'templates/division-capstone.php' ) || is_singular( 'itinerary' ) || is_singular( 'custom-page' ) || is_search() ) {\r\n\t\twp_enqueue_style( 'mapbox-style', 'https://api.tiles.mapbox.com/mapbox.js/v2.2.1/mapbox.css', array(), WS_VERSION );\r\n\t\twp_enqueue_script( 'mapbox', 'https://api.tiles.mapbox.com/mapbox.js/v2.2.1/mapbox.js', array(), WS_VERSION, true );\r\n\t}\r\n\r\n\tif ( is_singular( 'collection' ) ) {\r\n\t\twp_enqueue_script( 'mixitup' );\r\n\t\twp_enqueue_script( 'jquery-ui-core' );\r\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\r\n\t}\r\n\r\n\tif ( is_page_template( 'templates/explore.php' ) ) {\r\n\t\t// wp_enqueue_script( 'mixitup' );\r\n\t\twp_enqueue_script( 'angular' );\r\n\t\twp_enqueue_script( 'angular-route' );\r\n\t\twp_enqueue_script( 'angular-sanitize' );\r\n\t\twp_enqueue_script( 'angular-animate' );\r\n\t\twp_enqueue_script( 'explore' );\r\n\t\twp_localize_script( 'explore',\r\n\t\t\t'WS',\r\n\t\t\tarray(\r\n\t\t\t\t'theme' => get_template_directory_uri(),\r\n\t\t\t\t'explore' => get_template_directory_uri() . '/explore',\r\n\t\t\t\t'exploreApi' => site_url() . '/ws-api/v1/explore'\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n\r\n\t// Custom code to hide the word Protected from protected posts\r\n\tif ( is_singular( 'custom-page') ) {\r\n\t\tfunction the_title_trim($title) {\r\n\t\t\t$title = esc_attr($title);\r\n\t\t\t$findthese = array(\r\n\t\t\t\t'#Protected:#',\r\n\t\t\t\t'#Private:#'\r\n\t\t\t);\r\n\t\t\t$replacewith = array(\r\n\t\t\t\t'', // What to replace \"Protected:\" with\r\n\t\t\t\t'' // What to replace \"Private:\" with\r\n\t\t\t);\r\n\t\t\t$title = preg_replace($findthese, $replacewith, $title);\r\n\t\t\treturn $title;\r\n\t\t}\r\n\t\tadd_filter('the_title', 'the_title_trim');\t\t\r\n\t}\r\n\r\n\twp_enqueue_script( 'jquery-ui-autocomplete' ); // used on form submissions, available on all pages\r\n\t\r\n\tif ( !is_page( 'ie-fallback' ) ) {\r\n\t\twp_enqueue_script( 'ws', get_template_directory_uri() . \"/assets/js/worldstrides{$postfix}.js\", array( 'jquery' ), WS_VERSION, true );\r\n\t\twp_enqueue_style( 'ws', get_template_directory_uri() . \"/assets/css/worldstrides{$postfix}.css\", array(), WS_VERSION );\r\n\t}\r\n\r\n\twp_localize_script( \"ws\",\r\n\t\t'worldstrides_ajax',\r\n\t\tarray(\r\n\t\t\t'ajaxUrl' => admin_url( \"admin-ajax.php\" ), //url for php file that process ajax request to WP\r\n\t\t\t'nonce' => wp_create_nonce( \"worldstrides_ajax_nonce\" ), // this is a unique token to prevent form hijacking\r\n\t\t)\r\n\t);\r\n}", "title": "" }, { "docid": "78778d602a62b901e28114bc4d93decb", "score": "0.6144457", "text": "function su_setup_styles() {\n\n\twp_register_style('theme-styles', THEME_CSS . 'main.min.css', $deps = array(), $ver = SUDOH_VERSION );\n\t\n}", "title": "" }, { "docid": "8d9b9505be4e9007b62cd504a2c2046d", "score": "0.6144337", "text": "function mystartertheme_scripts() {\n\t// wp_enqueue_script( 'mystartertheme-navigation', get_template_directory_uri() . '/dist/js/navigation.js', array(), '20151215', true );\n\t// wp_enqueue_script( 'mystartertheme-skip-link-focus-fix', get_template_directory_uri() . '/dist/js/skip-link-focus-fix.js', array(), '20151215', true );\n\twp_enqueue_script( 'mystartertheme-main', get_template_directory_uri() . '/dist/js/main.js', array(), '20151215', true );\n\t\n\tif (is_user_logged_in() ) {\n\t\t// wp_enqueue_script( 'mystartertheme-admin', get_template_directory_uri() . '/dist/js/admin.js', array(), '20151215', true );\n\t\twp_enqueue_style( 'mystartertheme-admin-style', get_template_directory_uri() . '/dist/css/admin.css' );\n\t}\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "0c4aac26f2e0a3a6a3a0b89f44ba5720", "score": "0.6143637", "text": "function perusecretland_css_js() {\n wp_enqueue_style( 'perusecretland-fonts', get_stylesheet_directory_uri() . '/css/fonts.css');\n wp_enqueue_style( 'perusecretland-responsive', get_stylesheet_directory_uri() . '/css/responsive.css');\n wp_enqueue_style( 'jquery-chosen', get_stylesheet_directory_uri() . '/css/chosen.min.css');\n wp_enqueue_script( 'perusecretland-easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.3.js', array('jquery'));\n wp_enqueue_script( 'jquery-chosen', get_stylesheet_directory_uri() . '/js/chosen.jquery.min.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-footer-scripts', get_stylesheet_directory_uri() . '/js/footer.scripts.js', array('jquery', 'jquery-chosen'), false, true );\n }", "title": "" }, { "docid": "4c6d87bf7afd366ca452f4ae1d176f0a", "score": "0.61435217", "text": "public function enqueue_scripts_styles_front()\n {\n wp_enqueue_style($this->main_style_slug, THEME_URL . $this->main_style, THEME_VERSION);\n\n wp_enqueue_style('theme-jquery-ui-css', '//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css', THEME_VERSION);\n\n wp_enqueue_style('theme-daterangepicker-ui-css', THEME_URL . '/assets/libs/datepicker/daterangepicker.css', THEME_VERSION);\n\n wp_enqueue_style('theme-datetimepicker-ui-css', THEME_URL . '/assets/libs/datetimepicker/build/jquery.datetimepicker.min.css', THEME_VERSION);\n\n wp_enqueue_script('theme-chart-js', 'https://cdn.jsdelivr.net/npm/[email protected]', ['jquery'], THEME_VERSION, true);\n\n wp_enqueue_script('theme-jquery-ui', 'https://code.jquery.com/ui/1.12.1/jquery-ui.js', ['jquery'], THEME_VERSION, true);\n\n wp_enqueue_script('theme-moment-js', 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.1/moment.min.js', ['jquery'], THEME_VERSION, true);\n\n wp_enqueue_script('theme-date-time-picker', THEME_URL . '/assets/libs/datetimepicker/build/jquery.datetimepicker.full.min.js', ['jquery'], THEME_VERSION, true);\n\n wp_enqueue_script('theme-date-range-picker', THEME_URL . '/assets/libs/datepicker/daterangepicker.js', ['jquery'], THEME_VERSION, true);\n\n if (THEME_SPA) {\n wp_enqueue_script($this->main_script_slug, THEME_URL . $this->main_script_spa, ['jquery'], THEME_VERSION, true);\n } else {\n wp_enqueue_script($this->main_script_slug, THEME_URL . $this->main_script, ['jquery'], THEME_VERSION, true);\n }\n\n if (THEME_DEBUG) {\n wp_localize_script($this->main_script_slug, 'theme_debug', 'yes');\n }\n }", "title": "" }, { "docid": "2a7d86c1dc9bedb8fd04ff61ea97fa08", "score": "0.61327314", "text": "function child_theme_setup1() {\n\tadd_action( 'wp_enqueue_scripts', 'child_theme_register_styles' );\n\n\t// Enqueue site styles and scripts\n\tadd_action( 'wp_enqueue_scripts', 'child_theme_enqueue_styles' );\n\tadd_filter( 'hybopress_use_cache', 'child_theme_use_cache' );\n\n}", "title": "" }, { "docid": "c7ec4325cd0ab24f00e13d897eeb5a9d", "score": "0.61296606", "text": "function theme_scripts_and_styles() {\n \n // Styles\n\twp_enqueue_style( 'theme-style', get_stylesheet_uri(), $deps = '', $ver = '0.0.1' );\t\n\t\n\t// Scripts\n wp_enqueue_script( 'theme_header_navigation', get_template_directory_uri().'/scripts/themeHeaderNavigation.js', array( 'jquery' ) );\n if ( is_singular() ) \n wp_enqueue_script( 'comment-reply' );\n\n}", "title": "" }, { "docid": "76310e6e130ec5a3bb6bb453f5d3bab7", "score": "0.6110683", "text": "private function theme_setup() {\n\n\t\t//Remove wordpress defult image sizes\n\t\tadd_filter( 'intermediate_image_sizes_advanced', array($this, 'remove_default_image_sizes'), 10, 1 );\n\n\t\t//Theme init action 'after_switch_theme'\n\t\tadd_action( 'init', array($this, 'theme_activation') );\n\n\t\t//Setup translation options\n\n\t\t//Cleanup Wordpress Head\n\t\tadd_action( 'wp', array($this, 'wp_head_cleanup') );\n\n\t\t//Remove WP version from RSS\n\t\tadd_filter( 'the_generator', array($this, 'remove_rss_version') );\n\n\t\t//Load scripts for non-admin (front end) pages\n\t\tadd_action( 'wp_enqueue_scripts', array($this, 'enqueue_front_end_scripts') );\n\n\t\t//Load styles for front end pages\n\t\tadd_action( 'wp_enqueue_scripts', array($this, 'enqueue_theme_styles') );\n\n\t\t//Set Prso Theme support\n\t\t$this->add_theme_support();\n\n\t\t//Add extra form fields to WP User profile contact methods\n\t\tadd_filter( 'user_contactmethods', array($this, 'add_user_contact_methods'), 10, 1 );\n\n\t\t//Register Prso Theme sidebars\n\t\tadd_action( 'widgets_init', array($this, 'register_sidebars') );\n\n\t\t//Remove <p> tag from around imgs (//css-tricks.com/snippets/wordpress/remove-paragraph-tags-from-around-images/)\n\t\tadd_filter( 'the_content', array($this, 'remove_p_tag_from_images'), 100 );\n\t\tadd_filter( 'widget_text', array($this, 'remove_p_tag_from_images'), 100 );\n\n\t\t//Hack to enable rel='' attr for links - thanks to yoast\n\t\tif( !function_exists('yoast_allow_rel') ) {\n\t\t\tadd_action( 'wp_loaded', array($this, 'yoast_allow_rel') );\n\t\t}\n\n\t\t//Admin specific Actions and Filters\n\t\t$this->admin_area_actions();\n\n\t\t//Add Zurb Foundation grid classes to comments\n\t\tadd_filter( 'comment_class', array($this, 'add_comments_classes') );\n\n\t\t//Overwrite WP default post password form\n\t\tadd_filter( 'the_password_form', array($this, 'custom_post_password_form') );\n\n\t\t//Update WP tag cloud to improve style\n\t\t$this->update_wp_tag_cloud();\n\n\t\t//Enable shortcodes in widgets\n\t\tadd_filter('widget_text', 'do_shortcode');\n\n\t\t//Disable page jump in 'read more' links\n\t\tadd_filter( 'the_content_more_link', array($this, 'remove_more_jump_link') );\n\n\t\t// Remove height/width attributes on images so they can be responsive\n\t\tadd_filter( 'post_thumbnail_html', array($this, 'remove_thumbnail_dimensions'), 10 );\n\t\tadd_filter( 'image_send_to_editor', array($this, 'remove_thumbnail_dimensions'), 10 );\n\n\t\t//Stop wp from marking blog nav as active for all custom post types\n\t\tadd_filter( 'nav_menu_css_class', array($this, 'custom_wp_nav_menu'), 10, 2 );\n\n\t\t//change the standard class that wordpress puts on the active menu item in the nav bar\n\t\tadd_filter( 'wp_nav_menu', array($this, 'current_to_active'), 10, 2 );\n\n\t\t//Deletes empty classes and removes the sub menu class_exists\n\t\tadd_filter( 'wp_nav_menu', array($this, 'strip_empty_classes') );\n\n\t\t//Merges and minifies scripts\n\t\tadd_action( 'wp_print_scripts', array($this, 'merge_scripts') );\n\n\t\t//Merges and minifies stylesheets\n\t\tadd_action( 'wp_print_styles', array($this, 'merge_styles') );\n\n\t\t//Custom prso theme framework pagination\n\t\tadd_action( 'prso_pagination', array($this, 'custom_pagination'), 10, 2 );\n\n\t\t//Add filter to alter the array of classes used by post_class()\n\t\tadd_filter( 'post_class', array($this, 'post_class_filter'), 10, 1 );\n\n\t\t//Call method to setup theme options\n\t\t//add_action( 'init', array($this, 'admin_init_theme_options_redux') );\n\t\tadd_action( 'init', array($this, 'admin_init_theme_options_acf') );\n\n\t\t//Init theme text domain\n\t\tadd_action('after_setup_theme', array($this, 'init_theme_textdomain'));\n\n\t\t//Filter oembed and wrap youtube and vimeo videos in flex video wrappers\n\t\tadd_filter( 'oembed_result', array($this, 'oembed_zurb_video_wrapper'), 10, 3 );\n\n\t\t//Fix chrome admin area bug\n\t\tadd_action('admin_enqueue_scripts', array($this, 'chromefix_inline_css') );\n\n\t\t//Wrap any gforms inline JS so that it executes once DOM has loaded\n\t\tadd_filter( 'gform_cdata_open', array( $this, 'wrap_gform_cdata_open' ) );\n\t\tadd_filter( 'gform_cdata_close', array( $this, 'wrap_gform_cdata_close' ) );\n\n\t}", "title": "" }, { "docid": "2e17b6f4b7876145d57667b849f39a10", "score": "0.6109095", "text": "function airbnb_theme_name_scripts() {\n\tif (is_child_theme()) {\n\t\twp_enqueue_style('jquery-te',get_template_directory_uri().'/css/jquery-te-1.4.0.css');\n\t\twp_enqueue_style('bootstrap-style', get_template_directory_uri().'/bootstrap/css/bootstrap-responsive.css');\n\t} else {\n\t\twp_enqueue_style('jquery-te', get_stylesheet_directory_uri().'/css/jquery-te-1.4.0.css');\n\t\twp_enqueue_style('bootstrap-style', get_stylesheet_directory_uri().'/bootstrap/css/bootstrap-responsive.css');\n\t}\n\n\twp_enqueue_style( 'jquery-ui' );\n\twp_enqueue_style( 'wp-jquery-ui-dialog' );\n\t\n\twp_enqueue_style('wp-jquery-ui-datepicker','//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css');\n\t\n\twp_enqueue_script( 'jquery' );\n\t\n\twp_deregister_script('jquery-ui-core');\n\twp_deregister_script('jquery-ui-datepicker');\n\twp_deregister_script('jquery-ui-dialog');\n\t\n\tif (file_exists(site_url().'/wp-includes/js/jquery/ui/jquery.ui.core.min.js')) {\n\t\twp_enqueue_script('jquery-ui-core',site_url().'/wp-includes/js/jquery/ui/jquery.ui.core.min.js');\n\t} else {\n\t\twp_enqueue_script('jquery-ui-core','//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js');\n\t}\n\t\n\tif (file_exists(dirname(__FILE__).'/../../../wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js')) {\n\t\twp_enqueue_script('jquery-ui-datepicker',site_url().'/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js');\n\t} else {\n\t\t\n\t}\n\t\n\t\n\tif (file_exists(dirname(__FILE__).'/../../../wp-includes/js/jquery/ui/jquery.ui.dialog.min.js')) {\n\t\twp_enqueue_script('jquery-ui-dialog',site_url().'/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js');\n\t} else {\n\t\t//wp_enqueue_script('jquery-ui-datepicker',);\n\t}\n \t\n\twp_enqueue_script('youtube-frame','https://www.youtube.com/iframe_api?ver=1.3.0');\n\n\tif (is_child_theme()) {\n\t\twp_enqueue_script('bootstrap-min',get_template_directory_uri().'/bootstrap/js/bootstrap.min.js');\n\t} else {\n\t\twp_enqueue_script('bootstrap-min',get_stylesheet_directory_uri().'/bootstrap/js/bootstrap.min.js');\n\t}\n}", "title": "" }, { "docid": "87ac06d6451fdbbb9bb2c7b6293dae75", "score": "0.61079407", "text": "function themeName_scripts_styles() {\r\n\r\n\t// Scripts\r\n\twp_enqueue_script( 'themeName', get_stylesheet_directory_uri() .'/inc/assets/js/themeName.js', array(), '1.0' , true );\r\n\r\n\t// Styles\r\n\twp_enqueue_style( 'themeName', get_stylesheet_directory_uri() . '/inc/assets/css/themeName.css' );\r\n\r\n\t// Google Font include example\r\n\t// wp_enqueue_style( 'themeName-font', add_query_arg( 'family', 'Dosis:200,300,400,500,600,700,800', \"//fonts.googleapis.com/css\" ) );\r\n\r\n\t// Livereload for localhost only\r\n\tif ( strpos( home_url(), 'localhost' ) )\r\n\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js' );\r\n}", "title": "" }, { "docid": "20f9ac1ae9a214f62402cbebb14a09c9", "score": "0.6107182", "text": "function wpgrade_scripts_and_styles () {\r\n\twp_register_script('ampersand', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.best-ampersand.min.js');\r\n\twp_register_script('modernizr', get_stylesheet_directory_uri() . '/library/js/plugins/modernizr.js');\r\n\twp_register_script('off-canvas-menu', get_stylesheet_directory_uri() . '/library/js/plugins/off-canvas-menu.js', array('modernizr'), \"\", true);\r\n\twp_register_script('isotope', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.isotope.min.js', array(), \"\", true);\r\n\twp_register_script('infinite-scroll', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.infinitescroll.min.js', array(), \"\", true);\r\n\twp_register_script('fancy-input', get_stylesheet_directory_uri() . '/library/js/plugins/fancyInput.js', array(), \"\", true);\r\n\twp_register_script('magnific-popup', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.magnific-popup.min.js', array(), \"\", true);\r\n\twp_register_script('fake-element', get_stylesheet_directory_uri() . '/library/js/plugins/fake-element.js', array(), \"\", true);\r\n\twp_register_script('nice-scroll', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.nicescroll.min.js', array(), \"\", true);\r\n\t$cacheBusterJS = date(\"YmdHi\", filemtime( get_stylesheet_directory() . '/library/js/plugins/flexslider.js'));\r\n\twp_register_script('flexslider', get_stylesheet_directory_uri() . '/library/js/plugins/flexslider.js', array(), $cacheBusterJS, true);\r\n wp_register_script('froogaloop', get_stylesheet_directory_uri() . '/library/js/plugins/froogaloop.min.js', array(), \"\", true);\r\n wp_register_script('youtube-api', '//www.youtube.com/iframe_api', array(), \"\", false);\r\n wp_register_script('fitvids', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.fitvids.js', array(), \"\", false);\r\n\r\n\t//Circle Shortcode\r\n\twp_register_script('knob', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.knob.js', array(), \"\", true);\r\n\twp_register_script('autoresize', get_stylesheet_directory_uri() . '/library/js/plugins/jquery.autoresize.min.js', array(), \"\", true);\r\n\r\n\t//Google Map for Contact Page\r\n\twp_register_script('gmap-api', get_stylesheet_directory_uri() . '/library/js/plugins/gmap/gmap-api-v3.js', array(), \"\", true);\r\n\twp_register_script('gmap-infobox', get_stylesheet_directory_uri() . '/library/js/plugins/gmap/infobox.js', array(), \"\", true);\r\n\r\n\twp_register_script('mediaelement', get_stylesheet_directory_uri() . '/library/js/plugins/mediaelement-and-player.min.js', array('jquery'), \"\", true);\r\n\t$cacheBusterJS = date(\"YmdHi\", filemtime( get_stylesheet_directory() . '/library/js/main.js'));\r\n\twp_register_script('main-scripts', get_stylesheet_directory_uri() . '/library/js/main.js', array('jquery', 'youtube-api', 'modernizr', 'ampersand', 'off-canvas-menu', 'flexslider', 'fancy-input', 'nice-scroll', 'magnific-popup', 'autoresize', 'knob', 'mediaelement', 'froogaloop', 'fitvids'), $cacheBusterJS, true);\r\n\twp_register_script('portfolio-grid', get_stylesheet_directory_uri() . '/library/js/portfolio-grid.js', array('jquery', 'isotope','infinite-scroll', 'fake-element'), \"\", true);\r\n\twp_register_script('contact-scripts', get_stylesheet_directory_uri() . '/library/js/contact.js', array('jquery', 'gmap-api','gmap-infobox'), \"\", true);\r\n\r\n\twp_enqueue_script('main-scripts');\r\n\twp_enqueue_script('portfolio-grid');\r\n\tif(is_page_template('template-contact.php')) {\r\n\t\twp_enqueue_script('contact-scripts');\r\n\t}\r\n\r\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\r\n\t\twp_enqueue_script( 'comment-reply' );\r\n\t}\r\n\t\r\n\t$cacheBusterCSS = date(\"YmdHi\", filemtime( get_stylesheet_directory() . '/library/css/style.css'));\r\n\twp_enqueue_style('main-style', get_stylesheet_directory_uri() . '/library/css/style.css', array(),$cacheBusterCSS);\r\n\twp_enqueue_style('font-oswald:200', 'http://fonts.googleapis.com/css?family=Open+Sans|Oswald|Lato:300');\r\n\t\r\n global $wpGrade_Options;\r\n\r\n $style_query_string = '?';\r\n if ( $wpGrade_Options->get('main_color') ) {\r\n $main_color = $wpGrade_Options->get('main_color');\r\n $main_color = str_replace('#', '', $main_color);\r\n $style_query_string .= 'color='.$main_color;\r\n }\r\n\r\n if ( $wpGrade_Options->get('use_google_fonts') ) {\r\n add_action('wp_head', 'wpgrade_load_google_fonts');\r\n $fonts_array = array('google_main_font', 'google_second_font', 'google_menu_font', 'google_body_font');\r\n\r\n foreach ( $fonts_array as $font) {\r\n $this_font = get_clean_google_font( $font );\r\n if (!empty($this_font)) {\r\n $key = str_replace('google_', '', $font);\r\n if ( $style_query_string != '?' ) {\r\n $style_query_string .= '&'. $key .'='.$this_font;\r\n } else {\r\n $style_query_string .= $key .'='.$this_font;\r\n }\r\n }\r\n }\r\n }\r\n\tif ( $wpGrade_Options->get('portfolio_text_color') ) {\r\n $port_color = $wpGrade_Options->get('portfolio_text_color');\r\n $port_color = str_replace('#', '', $port_color);\r\n\t\tif ( $style_query_string != '?' ) {\r\n\t\t\t$style_query_string .= '&port_color='.$port_color;\r\n\t\t} else {\r\n $style_query_string .= 'port_color='.$port_color;\r\n }\r\n }\r\n\r\n $custom_css = $wpGrade_Options->get('custom_css');\r\n if ( $custom_css ) {\r\n if ( $style_query_string != '?' ) {\r\n $style_query_string .= '&custom_css='.urlencode( $custom_css );\r\n } else {\r\n $style_query_string .= 'custom_css='.urlencode( $custom_css );\r\n }\r\n }\r\n\r\n wp_register_style('php-style', get_stylesheet_directory_uri() . '/library/custom.css.php'.$style_query_string );\r\n wp_enqueue_style('php-style');\r\n}", "title": "" }, { "docid": "eb2ecc11cf331e007bea9e00235237ed", "score": "0.61024904", "text": "function add_theme_scripts() {\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\twp_enqueue_style( 'blog_grid_layout', plugin_dir_url(__FILE__) . '/css/blg.css', array(), '1.1', 'all');\n\twp_enqueue_style( 'bootstrap4', plugin_dir_url(__FILE__) . '/css/bootstrap.min.css', array(), '1.1', 'all');\n \n//\twp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);\n \n\t if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t }\n }", "title": "" }, { "docid": "4e784402eac1c37f27f02309c2f6a593", "score": "0.6099518", "text": "private function set_styles()\n {\n\n if (count($this->assets_css['global']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN GLOBAL MANDATORY STYLES -->');\n foreach($this->assets_css['global'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n if (isset($this->assets_css['page_style']) && count($this->assets_css['page_style']) > 0)\n {\n $this->template->append_metadata('<!-- BEGIN PAGE STYLES -->');\n foreach($this->assets_css['page_style'] as $asset)\n {\n $this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . '../../themes/public/css/' . $asset . '\" media=\"screen\" />');\n }\n }\n\n // Webkit based browsers\n //$this->template->append_metadata('<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/webkit.css\" media=\"screen\" />');\n\n // Internet Explorer styles\n $this->template->append_metadata('<!--[if IE 6]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie6.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 7]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie7.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie8.css\" media=\"screen\" /><![endif]-->');\n $this->template->append_metadata('<!--[if IE 9]><link rel=\"stylesheet\" type=\"text/css\" href=\"' . $this->config->item('base_url') . 'assets/css/cross_browser/ie9.css\" media=\"screen\" /><![endif]-->');\n }", "title": "" }, { "docid": "bc99234bfc9d1224a96cc4b19ea291f3", "score": "0.6090351", "text": "function robotTheme_theme_scripts() {\n\twp_enqueue_style( 'robotTheme-site-title-font-default', '//fonts.googleapis.com/css?family=Kaushan+Script:400', array(), robotTheme_THEME_VERSION );\n wp_enqueue_style( 'robotTheme-body-font-default', '//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,600,600italic,700,700italic', array(), robotTheme_THEME_VERSION );\n wp_enqueue_style( 'robotTheme-heading-font-default', '//fonts.googleapis.com/css?family=Raleway:500,600,700,100,800,400,300', array(), robotTheme_THEME_VERSION );\n \n if ( get_theme_mod( 'robotTheme-header-layout', 'robotTheme-header-layout-standard' ) == 'robotTheme-header-layout-centered' ) {\n \twp_enqueue_style( 'robotTheme-header-centered', get_template_directory_uri().'/library/css/header-centered.css', array(), robotTheme_THEME_VERSION );\n } else {\n \twp_enqueue_style( 'robotTheme-header-standard', get_template_directory_uri().'/library/css/header-standard.css', array(), robotTheme_THEME_VERSION );\n }\n \n\twp_enqueue_style( 'robotTheme-font-awesome', get_template_directory_uri().'/library/fonts/font-awesome/css/font-awesome.css', array(), '4.2.0' );\n\twp_enqueue_style( 'robotTheme-style', get_stylesheet_uri(), array(), robotTheme_THEME_VERSION );\n\t\n\tif ( robotTheme_is_woocommerce_activated() ) {\t\n \twp_enqueue_style( 'robotTheme-woocommerce-custom', get_template_directory_uri().'/library/css/woocommerce-custom.css', array(), robotTheme_THEME_VERSION );\n\t}\n\n\twp_enqueue_script( 'robotTheme-navigation-js', get_template_directory_uri() . '/library/js/navigation.js', array(), robotTheme_THEME_VERSION, true );\n\twp_enqueue_script( 'robotTheme-caroufredsel-js', get_template_directory_uri() . '/library/js/jquery.carouFredSel-6.2.1-packed.js', array('jquery'), robotTheme_THEME_VERSION, true );\n\t\n\twp_enqueue_script( 'robotTheme-custom-js', get_template_directory_uri() . '/library/js/custom.js', array('jquery'), robotTheme_THEME_VERSION, true );\n\n\twp_enqueue_script( 'robotTheme-skip-link-focus-fix-js', get_template_directory_uri() . '/library/js/skip-link-focus-fix.js', array(), robotTheme_THEME_VERSION, true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "92dec5d3b0ba5d8e0ed4386c0a8f1333", "score": "0.60887444", "text": "function kitpress_scripts () {\n\t// Theme stylesheet\n\twp_enqueue_style('kitpress-style', get_stylesheet_uri());\n\twp_enqueue_script('kitpress-js', get_theme_file_uri('app.js'), array(), null, true);\n}", "title": "" }, { "docid": "3467dce2e2e0b04f2ae50a6f173ffefa", "score": "0.6087408", "text": "function add_theme_scripts() {\n wp_enqueue_style( 'main_style_file', get_stylesheet_uri());\n /********** Including all.min css file ***********/\n wp_enqueue_style( 'minified_file', get_template_directory_uri() .'/css/all.min.css', array(), '1.1', 'all');\n /********** Including style css file ***********/\n wp_enqueue_style( 'style', get_template_directory_uri() .'/css/style.css', array(), '1.1', 'all');\n /********* Including bootstrap file ************/ \n wp_enqueue_style( 'bootstrap_file', get_template_directory_uri() .'/css/bootstrap.min.css', array (),'1.1', 'all'); \n //********* Including script files ************/\n wp_enqueue_script( $handle, get_template_directory_uri().'/js/bootstrap.min.js', array(), '1.1' , true ); \n}", "title": "" }, { "docid": "5a8da3a7207210820589ca3bdeae2508", "score": "0.6087046", "text": "function enqueue_theme_scripts() {\n if ( 'development' === getenv( 'WP_ENV' ) ) {\n $minimalistmadness_template = 'global';\n } else {\n $minimalistmadness_template = 'global.min';\n }\n\n // Disable jQuery (included in all.js and normally on wp-admin)\n if ( ! is_admin() ) wp_deregister_script( 'jquery' );\n if ( ! is_admin() ) wp_deregister_script( 'jquery-core' );\n if ( ! is_admin() ) wp_deregister_script( 'jquery-migrate' );\n\n // Styles.\n wp_enqueue_style( 'styles', get_theme_file_uri( \"css/{$minimalistmadness_template}.css\" ), array(), filemtime( get_theme_file_path( \"css/{$minimalistmadness_template}.css\" ) ) );\n\n // Scripts.\n wp_enqueue_script( 'jquery-core' );\n wp_enqueue_script( 'scripts', get_theme_file_uri( 'js/all.js' ), array(), filemtime( get_theme_file_path( 'js/all.js' ) ), true );\n\n // Required comment-reply script\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n\n wp_localize_script( 'scripts', 'minimalistmadness_screenReaderText', array(\n 'expand' => esc_html__( 'Open child menu', 'minimalistmadness' ),\n 'collapse' => esc_html__( 'Close child menu', 'minimalistmadness' ),\n ) );\n\n wp_localize_script( 'scripts', 'air', array(\n 'nonce' => wp_create_nonce( 'wp_rest' ),\n 'posts_per_page' => 2,\n 'baseurl' => get_rest_url(),\n ) );\n\n wp_localize_script( 'scripts', 'dmrp', array(\n 'id' => get_the_id(),\n 'nonce' => wp_create_nonce( 'dmrp' . get_the_id() ),\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'cookie_timeout' => apply_filters( 'dmrp_cookie_timeout', 3600000 ),\n ) );\n\n // Remove dude-most-read-posts script (included in scripts.js for optimization)\n wp_dequeue_script( 'dmrp' );\n\n}", "title": "" }, { "docid": "686b6167a637b05f7d856b8ccc04014b", "score": "0.60819495", "text": "private static function init_hooks() {\n\t\tself::$initiated = true;\n\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'theme_styles' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array('mptheme_functions', 'mptheme_enqueue') );\n\n\t\t// If a Google Analytics ID is defined, add the code to the head\n\t\tif ( get_option( 'mptheme_google_analytics_id' ) ){\n\t\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'mptheme_google_analytics_code' ) );\n\t\t}\n\n\t\t// If a Facebook Pixel ID is defined, add the code to the head\n\t\tif ( get_option( 'mptheme_facebook_pixel_id' ) ){\n\t\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'mptheme_facebook_pixel_code' ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "6c0675feceeace30448c0a7b0b13499a", "score": "0.6081391", "text": "function themebakerz_scripts() {\n wp_enqueue_style( 'style-themebakerz', get_template_directory_uri() . '/assets/css/main.css', array(), '1.0.0' );\n wp_enqueue_script( 'script-themebakerz', get_template_directory_uri() . '/assets/js/all.js', array('jquery', 'customize-preview'), '1.0.0', true );\n}", "title": "" }, { "docid": "623c443699ca7f2d2fb553ba48c75f06", "score": "0.60800767", "text": "public function enqueue_scripts() {\n wp_enqueue_style( 'theme-docs', get_stylesheet_uri() );\n \n if( file_exists( gutenbergtheme_fonts_url() ) ) {\n wp_enqueue_style( 'gutenbergtheme-fonts', gutenbergtheme_fonts_url() );\n }\n\n if( file_exists( plugin_dir_path(__FILE__) . '/asset-manifest.json' ) ) {\n $assets = json_decode( file_get_contents( plugin_dir_path(__FILE__) . '/asset-manifest.json' ), true );\n \n wp_enqueue_style( 'composer-style', plugin_dir_url(__FILE__) . substr( $assets['main.css'], 1 ) );\n wp_enqueue_script( 'composer-react-script', plugin_dir_url(__FILE__) . substr( $assets['main.js'], 1 ), array(), self::$plugin_version, true );\n } else {\n wp_enqueue_style( 'gutenbergtheme-style', plugin_dir_url(__FILE__) . 'no-js/main.css' );\n wp_enqueue_style( 'gutenbergthemeblocks-style', plugin_dir_url(__FILE__) . 'no-js/blocks.css' );\n }\n }", "title": "" }, { "docid": "037c54e955065ba04e90901fe5d6df48", "score": "0.60769546", "text": "function load_stylesheets(){\n /**/ \n\t\twp_register_style('mobiriseicon', get_template_directory_uri(). '/assets/web/assets/mobirise-icons2/mobirise2.css', '',2.0,'all');\n\t\twp_register_style('tether', get_template_directory_uri(). '/assets/tether/tether.min.css', '',1.0,'all');\n\t\twp_register_style('bootstrap', get_template_directory_uri(). '/assets/bootstrap/css/bootstrap.min.css', '',4.0,'all');\n\t\twp_register_style('bootstrapgrid', get_template_directory_uri(). '/assets/bootstrap/css/bootstrap-grid.min.css', '',4.0,'all');\n\t\twp_register_style('bootstrapreboot', get_template_directory_uri(). '/assets/bootstrap/css/bootstrap-reboot.min.css', '',4.0,'all');\n\t\twp_register_style('dropdown', get_template_directory_uri(). '/assets/dropdown/css/style.css', '',5.1,'all');\n\t\twp_register_style('socicon', get_template_directory_uri(). '/assets/socicon/css/styles.css', '',3.0,'all');\n\t\twp_register_style('themestyle', get_template_directory_uri(). '/assets/theme/css/style.css', '',3.0,'all');\n\t\twp_register_style('addstyle', get_template_directory_uri(). '/assets/mobirise/css/mbr-additional.css', '',3.0,'all');\n\t\twp_register_style('appcss', get_template_directory_uri(). '/assets/css/app.css', '',0.1,'all');\n \n wp_enqueue_style('mobiriseicon');\n wp_enqueue_style('tether');\n wp_enqueue_style('bootstrap');\n wp_enqueue_style('bootstrapgrid');\n wp_enqueue_style('bootstrapreboot');\n wp_enqueue_style('dropdown');\n wp_enqueue_style('socicon');\n wp_enqueue_style('themestyle');\n wp_enqueue_style('addstyle');\n wp_enqueue_style('appcss');\n}", "title": "" }, { "docid": "5d88346b5f88fa377d23bbfdb70127ad", "score": "0.6075153", "text": "function adding_theme_styles_and_scripts(){\n\n //registruojame stilius\n wp_register_style( 'reset.css', ASSETS_URL . 'reset.css', array(), false );\n wp_register_style( 'stylesheet.css', ASSETS_URL . 'fonts/stylesheet.css', array(), false );\n wp_register_style( 'style.css', ASSETS_URL . 'style.css', array(), false );\n wp_register_style( 'icomoon-style.css', ASSETS_URL . 'fonts/icomoon/icomoon-style.css', array(), false );\n wp_register_style( 'styles-dist.css', ASSETS_URL . 'styles-dist.css', array(), false );\n wp_register_style( 'all.css', 'https://use.fontawesome.com/releases/v5.0.12/css/all.css', array(), false );\n wp_register_style( 'boostrap.min.css', 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css', array(), false );\n\n\n\n\n // //registruojame javascript\n wp_register_script( 'app.js', get_template_directory_uri() . '/js/app.js', array(), false, true);\n wp_register_script( 'google_api_key', 'https://maps.googleapis.com/maps/api/js?key=AIzaSyBysEdNbj0M6ukqvcUz6C9cZETj4BbXWNk', array(), false, false);\n wp_register_script( 'maps.js', get_template_directory_uri() .'/js/maps.js', array('google_api_key'), false, true);\n wp_register_script( 'boostrap.min.js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', array('jquery'), false, true);\n // wp_register_script( 'fancybox_js', ASSETS_URL . 'js/jquery.fancybox.pack.js', array('jquery'), false, true);\n // wp_register_script( 'magnific_js', ASSETS_URL . 'js/jquery.magnific-popup.js', array('jquery'), false, true);\n // wp_register_script( 'masonry_js', ASSETS_URL . 'js/jquery.masonry.min.js', array('jquery'), false, true);\n // wp_register_script( 'mixitup_js', ASSETS_URL . 'js/jquery.mixitup.min.js', array('jquery'), false, true);\n // wp_register_script( 'main_js', ASSETS_URL . 'js/main.js', array('jquery','plugins'), false, true);\n // wp_register_script( 'plugins_js', ASSETS_URL . 'js/plugins.js', array('jquery'), false, true);\n\n //uzkrauname stilius\n wp_enqueue_style( 'reset.css' );\n wp_enqueue_style( 'boostrap.min.css' );\n wp_enqueue_style( 'stylesheet.css' );\n wp_enqueue_style( 'style.css' );\n wp_enqueue_style( 'icomoon-style.css' );\n wp_enqueue_style( 'styles-dist.css' );\n wp_enqueue_style( 'all.css' );\n\n\n\n //uzkrauname javascript\n wp_enqueue_script( 'app.js' );\n wp_enqueue_script( 'google_api_key' );\n wp_enqueue_script( 'maps.js' );\n wp_enqueue_script( 'boostrap.min.js' );\n // wp_enqueue_script( 'fancybox_js' );\n // wp_enqueue_script( 'magnific_js' );\n // wp_enqueue_script( 'masonry_js' );\n // wp_enqueue_script( 'mixitup_js' );\n // wp_enqueue_script( 'main_js' );\n // wp_enqueue_script( 'plugins_js' );\n}", "title": "" }, { "docid": "2fb3f397527a86ff7e64b523fda24732", "score": "0.60717326", "text": "function wp_using_themes()\n {\n }", "title": "" }, { "docid": "79889b1630d8f34c6248453822c5d4f6", "score": "0.6070875", "text": "function b_f_load_styles() {\n\t\twp_register_style('styles.bilnea', get_stylesheet_directory_uri().'/style.css', false, b_f_versions());\n\t\twp_register_style('styles.main', get_template_directory_uri().'/styles/styles.main.php', false, b_f_versions());\n\t\twp_register_style('styles.admin', get_template_directory_uri().'/css/internal/styles.admin.css', array('styles.functionality.spectrum'), b_f_versions());\n\n\n\t\t// Hojas de estilos del tema hijo\n\t\twp_register_style('styles.child.main', get_stylesheet_directory_uri().'/css/main.css', false, b_f_versions());\n\t\twp_register_style('styles.child.admin', get_stylesheet_directory_uri().'/css/admin.css', false, b_f_versions());\n\n\t\t// Flipclock\n\t\twp_register_style('styles.flipclock', get_template_directory_uri().'/css/external/styles.counter.flipclock.css', false, b_f_versions('flipclock'));\n\n\t\t// Font Awesome\n\t\twp_register_style('styles.design.fonts.awesome', get_template_directory_uri().'/css/external/styles.design.fonts.awesome.css', false, b_f_versions('font-awesome'));\n\n\t\t// jQuery UI\n\t\twp_register_style('styles.core.jquery.ui', get_template_directory_uri().'/css/external/styles.core.jquery.ui.theme.css', false, b_f_versions('jquery-ui'));\n\t\twp_register_style('styles.core.jquery.ui.theme', get_template_directory_uri().'/css/external/styles.core.jquery.ui.theme.css', false, b_f_versions('jquery-ui'));\n\n\t\t// Select2\n\t\twp_register_style('styles.design.select2', get_template_directory_uri().'/css/external/styles.design.select2.css', false, b_f_versions('select2'));\n\n\t\t// Animate.css\n\t\twp_register_style('styles.design.animate', get_template_directory_uri().'/css/external/styles.design.animate.css', false, b_f_versions('animate-css'));\n\n\t\t// Spectrum\n\t\twp_register_style('styles.functionality.spectrum', get_template_directory_uri().'/css/external/styles.functionality.spectrum.css', false, b_f_versions('spectrum'));\n\n\t}", "title": "" }, { "docid": "a4c0cba95dcf1125f6b918d6f3b321a5", "score": "0.60679674", "text": "function wpdocs_theme_scripts() {\n if ( !is_home() ) {\n wp_enqueue_style( 'avia-styles', get_template_directory_uri() . '/styles-avia.css', array(), null, 'all' );\n } else {\n wp_enqueue_style( 'styles', get_stylesheet_uri(), '', null, 'all' );\n }\n \n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery.min.js', array(), '1.12.4', true );\n wp_enqueue_script( 'swiper', get_template_directory_uri() . '/js/swiper.min.js', array(), '4.2.2', true );\n wp_enqueue_script( 'generaljs', get_template_directory_uri() . '/js/general.js', array(), '1.0.0', true );\n // if ( is_page_template( 'page-actividades.php' ) || is_page_template( 'page-clientes.php' ) || is_page_template( 'page-hybrid-actividades.php' ) ) {\n // wp_enqueue_style( 'swiper-styles', get_template_directory_uri() . '/ui/css/swiper.css', array(), null, 'all' );\n // wp_enqueue_script( 'swiper', get_template_directory_uri() . '/ui/js/swiper.jquery.js', array(), '1.0.0', true );\n // }\n \n}", "title": "" }, { "docid": "f91dee885158a6431d6c3e88bd22ddd3", "score": "0.6058574", "text": "function rp_theme_styles(){\n wp_enqueue_style( 'theme_css', get_template_directory_uri() . '/assets/css/style.css' );\n wp_enqueue_script( 'theme_js', get_template_directory_uri() . '/assets/js/script.js',\n array('jquery'), '', true );\n}", "title": "" }, { "docid": "a00d968b780dd11f9b7d0c726635bdc6", "score": "0.6057798", "text": "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "title": "" }, { "docid": "e7af1336127d98b720133f205fd9aaea", "score": "0.6053257", "text": "function theme_register_scripts() {\n\twp_enqueue_style( 'simple-css', get_stylesheet_uri() );\n\twp_enqueue_script( 'simple-js', get_template_directory_uri() . '/assets/js/main.js', array( 'jquery' ), '1.0', true );\n}", "title": "" }, { "docid": "aefa726165c37367abdb05d2ab50495c", "score": "0.6052953", "text": "public function theme_customisations_setup() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'theme_customisations_css' ), 999 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'theme_customisations_js' ) );\n\t\tadd_filter( 'template_include', array( $this, 'theme_customisations_template' ), 11 );\n\t\tadd_filter( 'wc_get_template', array( $this, 'theme_customisations_wc_get_template' ), 11, 5 );\n\t}", "title": "" }, { "docid": "55ba1b26b7b133de7f4d78a43de9216f", "score": "0.60505545", "text": "function hejtiger_theme_js() {\n\n\twp_enqueue_script( 'modernizr_js' , get_template_directory_uri() . '/dist/js/modernizr.js' , '', '', false );\n\twp_enqueue_script( 'hejtiger_js' , get_template_directory_uri() . '/dist/js/hejtiger.js' , array('jquery'), '', true );\n\twp_enqueue_script( 'main_js' , get_template_directory_uri() . '/dist/js/main.js' , array('jquery'), '', true );\n\t\n}", "title": "" }, { "docid": "507b9b6089589bf4a3aad202127a3072", "score": "0.6046325", "text": "function bootstrapfast_assets() {\n\t\t$the_theme = wp_get_theme();\n\n\t\twp_enqueue_style( 'bootstrapfast-style', asset_path( '/css/themestyle.min.css' ), false, null );\n\n\t\twp_enqueue_script( 'bootstrapfastjs', asset_path( '/js/themes.min.js' ), array(), bootstrapfast_stylesuffix(), true );\n\n}", "title": "" }, { "docid": "21fbc9dcced9f43c7265588e620f60ce", "score": "0.6045513", "text": "public function setup() {\n\t\t$theme = wp_get_theme();\n\n\t\tif ( 'OceanWP' == $theme->name || 'oceanwp' == $theme->template ) {\n\t\t\trequire_once( OIG_PATH . '/admin/class-register-cpt.php' );\n\t\t\trequire_once( OIG_PATH . '/admin/class-instagram-settings.php' );\n\t\t\trequire_once( OIG_PATH . '/admin/class-shortcode-generator.php' );\n\t\t\trequire_once( OIG_PATH . '/includes/class-instagram-api.php' );\n\t\t\trequire_once( OIG_PATH . '/includes/class-instagram-shortcode.php' );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ), 999 );\n\t\t}\n\t}", "title": "" }, { "docid": "bd2df5bfca86f9208cd6494f9169f1db", "score": "0.6044807", "text": "function consult_cs_js(){\n wp_enqueue_style('flaticone', get_template_directory_uri().'/assets/css/flaticon.css', array(), '1.0.0', 'all');\n wp_enqueue_style('google-fonts', get_template_directory_uri().'https://fonts.googleapis.com/css?family=Open+Sans:300i,400,400i,600,700,800%7CMontserrat:200,300,400,500,600,700,800,900');\n wp_enqueue_style('font-awesome', get_template_directory_uri().'/assets/css/font-awesome.min.css', array(), '1.0.0', 'all');\n wp_enqueue_style('animate', get_template_directory_uri().'/assets/css/animate.css', array(), '1.0.0', 'all');\n wp_enqueue_style('text-animation', get_template_directory_uri().'/assets/css/text-animation.css', array(), '1.0.0', 'all');\n wp_enqueue_style('fancybox', get_template_directory_uri().'/assets/css/jquery.fancybox.min.css', array(), '1.0.0', 'all');\n wp_enqueue_style('magnific-popup', get_template_directory_uri().'/assets/css/magnific-popup.min.css', array(), '1.0.0', 'all');\n wp_enqueue_style('owl-carousel', get_template_directory_uri().'/assets/css/owl.carousel.min.css', array(), '1.0.0', 'all');\n wp_enqueue_style('plugin-layers', get_template_directory_uri().'rs-plugin/css/layers.css', array(), '1.0.0', 'all');\n wp_enqueue_style('plugin-settings', get_template_directory_uri().'rs-plugin/css/settings.css', array(), '1.0.0', 'all');\n wp_enqueue_style('bootstrap', get_template_directory_uri().'/assets/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_style('plugins', get_template_directory_uri().'/assets/css/plugins.css', array(), '1.0.0', 'all');\n wp_enqueue_style('icons', get_template_directory_uri().'/assets/css/icons.css', array(), '1.0.0', 'all');\n wp_enqueue_style('menu', get_template_directory_uri().'/assets/css/menu-css.css', array(), '1.0.0', 'all');\n wp_enqueue_style('main', get_template_directory_uri().'/assets/css/main.css', array(), '1.0.0', 'all');\n wp_enqueue_style('responsive', get_template_directory_uri().'/assets/css/responsive.css', array(), '1.0.0', 'all');\n\n\n // wp_enqueue_script('jquery', get_template_directory_uri().'/assets/js/jquery.min.js', array(), '1.0.0', true);\n wp_enqueue_script('modernizr', get_template_directory_uri().'/assets/js/modernizr.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('waypoints', get_template_directory_uri().'/assets/js/waypoints.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('bootstrap', get_template_directory_uri().'/assets/js/bootstrap.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('plugins', get_template_directory_uri().'/assets/js/plugins.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('scrollUp', get_template_directory_uri().'/assets/js/jquery.scrollUp.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('gmaps-api', get_template_directory_uri().'https://maps.googleapis.com/maps/api/js?key=AIzaSyB4RM7zOgOKq6n2fv407hX28xiL-M6vLdY');\n wp_enqueue_script('gmaps', get_template_directory_uri().'/assets/js/gmaps.js', array('jquery'), '1.0.0', false);\n wp_enqueue_script('fancybox', get_template_directory_uri().'/assets/js/jquery.fancybox.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('magnific-popup', get_template_directory_uri().'/assets/js/jquery.magnific-popup.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('isotope', get_template_directory_uri().'/assets/js/isotope.pkgd.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('counterup', get_template_directory_uri().'/assets/js/counterup.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('owl-carousel', get_template_directory_uri().'/assets/js/owl.carousel.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('wow-min', get_template_directory_uri().'/assets/js/wow.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('jquery-lettering', get_template_directory_uri().'/assets/js/jquery.lettering.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('jquery-textillate', get_template_directory_uri().'/assets/js/jquery.textillate.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('mixitup', get_template_directory_uri().'/assets/js/mixitup.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('jquery-chart', get_template_directory_uri().'/assets/js/chart.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('chart-active', get_template_directory_uri().'/assets/js/chart-active.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('themepunch-tools', get_template_directory_uri().'/rs-plugin/js/jquery.themepunch.tools.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('themepunch-revolution', get_template_directory_uri().'/rs-plugin/js/jquery.themepunch.revolution.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-actions', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.actions.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-kenburn', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.kenburn.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-layeranimation', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.layeranimation.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-migration', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.migration.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-navigation', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.navigation.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-parallax', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.parallax.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-slideanims', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.slideanims.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('extension-video', get_template_directory_uri().'/rs-plugin/js/extensions/revolution.extension.video.min.js', array('jquery'), '1.0.0', true);\n wp_enqueue_script('custom', get_template_directory_uri().'/assets/js/custom.js', array('jquery'), '1.0.0', true);\n\n}", "title": "" }, { "docid": "22c39a73c7a2a0f90915c66289542194", "score": "0.604393", "text": "function wktheme_scripts() {\n\t// Deregister Scripts and Styles\n\twp_deregister_script('jquery');\n\tif(!is_admin()){\n\t\twp_deregister_script('wp-embed');\n\t}\n\t\n\t// Register Scripts and Styles\n\twp_register_script('jquery', includes_url('/js/jquery/jquery.js'), false, '', true);\n\twp_register_script('wktheme-script', get_template_directory_uri() . '/js/frontend.js', array(), '', true);\n\t\n\t// Enqueue Scripts and Styles\n\twp_enqueue_style('wktheme-style', get_template_directory_uri().'/stylesheet.css');\n \twp_enqueue_script('jquery');\n\twp_enqueue_script('wktheme-script');\n\t\n\t// Localize main script\n\t$loc_data = array(\n\t\t'ajax_url' => admin_url('admin-ajax.php')\n\t);\n\twp_localize_script('wktheme-script', 'loc', $loc_data);\n\t\n\t// Dequeue Scripts and Styles\n\twp_dequeue_style('validate-engine-css');\n\twp_dequeue_style('boxes');\n\twp_dequeue_style('yoast-seo-adminbar');\n}", "title": "" }, { "docid": "b9527921f8359dea58a3720f90d1454e", "score": "0.60430205", "text": "public function scriptsEtStylesApres()\n\t{\n\t\twp_enqueue_script('moment', $this->urlOutil . 'bower_components/moment/min/moment.min.js');\n\t\twp_enqueue_script('moment-fr', $this->urlOutil . 'bower_components/moment/locale/fr.js');\n\t\twp_enqueue_script('mustache', $this->urlOutil . 'bower_components/mustache.js/mustache.min.js');\n\t\twp_enqueue_script('binette', $this->urlOutil . 'bower_components/binette.js/binette.js');\n\n\t\twp_enqueue_style('EzmlmForum-CSS', $this->urlOutil . 'css/ezmlm-forum-internal.css');\n\n\t\t// code de l'appli Forum\n\t\twp_enqueue_script('AuthAdapter', $this->urlOutil . 'js/AuthAdapter.js');\n\t\twp_enqueue_script('AuthAdapterTB', $this->urlOutil . 'js/auth/AuthAdapterTB.js');\n\t\twp_enqueue_script('EzmlmForum', $this->urlOutil . 'js/EzmlmForum.js');\n\t\twp_enqueue_script('ViewThread', $this->urlOutil . 'js/ViewThread.js');\n\t\twp_enqueue_script('ViewList', $this->urlOutil . 'js/ViewList.js');\n\t}", "title": "" } ]
4d051b429db92b0c19632d84fd2cb194
Load data from database
[ { "docid": "e637c9d047e99abd3e4b6b322f5366b6", "score": "0.0", "text": "public function load($id = null)\n {\n if (!is_null($id))\n $this->data[$this->id_key] = $id;\n\n if (is_null($this->data[$this->id_key]))\n throw new Exception(get_called_class() . '::' . $this->id_key .\n ' is NULL', ymF\\ERROR_MISC);\n\n $pdo = PDOService::getPDO();\n\n $sql = PDOService::prepareSQL(\n \"SELECT %k FROM {$this->table} WHERE {$this->id_key}=%s\",\n $this->data, $this->data[$this->id_key]\n );\n\n // Fetch data\n $this->data = $pdo->query($sql)->fetch(\\PDO::FETCH_ASSOC);\n\n // Reset changes\n $this->resetChanged();\n\n return $this;\n }", "title": "" } ]
[ { "docid": "c81331d5843db3927a05bd2008dbcb03", "score": "0.77766263", "text": "public function loadData();", "title": "" }, { "docid": "eceafd7a9426a30bd5670e1f6c1531a8", "score": "0.7597789", "text": "public function loadData()\n {\n // TODO: load extra data e.g. from DB\n }", "title": "" }, { "docid": "5dd590745da4059ec839a5d72383b2a6", "score": "0.7226223", "text": "public function loadData(){\r\n \t}", "title": "" }, { "docid": "fcbae71eac1138841dc987ab81399095", "score": "0.71412504", "text": "protected abstract function LoadData();", "title": "" }, { "docid": "beb98c975441cd06fcd0cc43216e9144", "score": "0.7107552", "text": "public function load() {\n\t\tif ( !$this->dataLoaded ) {\n\t\t\tif ( !$this->loadFromCache() ) {\n\t\t\t\t$this->loadFromDB();\n\t\t\t\t$this->saveToCache();\n\t\t\t}\n\t\t\t$this->dataLoaded = true;\n\t\t}\n\t}", "title": "" }, { "docid": "c0fb2d26bc827ccfc5b2115a4b2ae508", "score": "0.6986403", "text": "private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}", "title": "" }, { "docid": "83d7eddc563cc6dad4459ebf446ec28e", "score": "0.68874586", "text": "function loadFromDatabase($id)\n\t{\n\t\tglobal $sql;\n\t\t$row = $sql->QueryRow(\"SELECT * FROM $this->tablename WHERE id='$id'\");\n\t\t$this->loadFromRow($row);\n\t}", "title": "" }, { "docid": "13b6a3559337e90afe426330a8ba4805", "score": "0.680233", "text": "protected function _loadDatabase()\n\t{\n\t\tif ( ! $this->db )\n\t\t{\n\t\t\t$this->db = Seezoo::$Importer->database();\n\t\t}\n\t}", "title": "" }, { "docid": "68f136dd7db37741a725c172b5708a45", "score": "0.6801288", "text": "protected function loadData()\n {\n if ($this->data === null) {\n $this->data = $this->_table->fetchAll(\n $this->_where, $this->_order, $this->_count, $this->_offset\n );\n if($this->data instanceof Zend_Db_Table_Rowset_Abstract) {\n $this->data = $this->data->toArray();\n }\n }\n }", "title": "" }, { "docid": "be79388789e6dfc33898542b11dd7ac7", "score": "0.67797905", "text": "public function load()\n {\n $data = get_option($this->get_table());\n if ($data) {\n $this->import($data);\n }\n }", "title": "" }, { "docid": "339cbb4b7e24c9180ff8163ec3bf64a0", "score": "0.67431885", "text": "private function loadDatas()\n\t\t{\n\t\t\t// Versuche\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// ID zu bekommen\n\t\t\t\t$id\t\t\t= $this->GemID;\n\t\t\t\t\n\t\t\t\t// Daten aus Tabelle zu Laden\n\t\t\t\t$result \t= $GLOBALS[\"system\"]->getDatabaseClass()->query(\"SELECT * FROM tblgemeinde WHERE GemID = '$id';\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Daten erhalten\n\t\t\t\t$row\t\t= $GLOBALS[\"system\"]->getDatabaseClass()->fetchRow($result);\n\t\t\t\t\n\t\t\t\t// Und als Klassenvariable laden\n\t\t\t\t$this->Name \t\t\t= $row[1];\n\t\t\t\t$this->Adresse\t\t\t= $row[2];\n\t\t\t\t$this->Telefon\t\t\t= $row[3];\n\t\t\t\t$this->Fax\t\t\t\t= $row[4];\n\t\t\t\t$this->Informationen \t= $row[5];\n\t\t\t\t$this->Kirchenvorstand \t= $row[6];\n\t\t\t\t$this->UeberPLZ\t\t\t= $row[7];\n\t\t\t\t\n\t\t\t\t// Neuugkeitern laden\n\t\t\t\t$this->loadNeuigkeiten();\n\t\t\t}\n\t\t\tcatch(Exception $ex)\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0a1ed3974a15ca5d1f786cc4e94644d1", "score": "0.67357135", "text": "private function load(){\n\t\t$dao = new AlertaDAO();\n\t\t$this->contratos = $dao->getContratos();\n\t}", "title": "" }, { "docid": "b25daf6190d4ce152e7e2c5cc28d6f42", "score": "0.6707428", "text": "protected function load_from_db()\n\t{\n\t\t$this->items = array();\n\t\t\t\n\t\t$data = ORM::factory('badge')->where('badge_status', '=', 'active')->find_all();\n\t\t\n\t\tforeach($data as $badge)\n\t\t{\n\t\t\t$this->items[$badge->id] = $badge;\n\t\t}\n\t}", "title": "" }, { "docid": "aa3729838992658b7a71a5a62ab36283", "score": "0.6634116", "text": "protected function loadData()\n\t{\n\t\t$pk = $this->primaryKey();\n\t\tif (!$this->data[$pk]) return false;\n\t\t$res = $this->db->query(\"\n\t\t\tSELECT *\n\t\t\tFROM `\".$this->tableName().\"`\n\t\t\tWHERE `$pk` = ?\n\t\t\tLIMIT 1\n\t\t\", array($this->data[$pk]))->fetch(PDO::FETCH_ASSOC);\n\n\t\tif ($res)\n\t\t{\n\t\t\t$this->data = $res;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d8bb1e658000a39cd88db2520a0fac8a", "score": "0.6612512", "text": "public function _load()\n {\n $query = false;\n switch ($this->objekt_type) {\n case 'ide':\n $query = new Query(\n \"SELECT * \n FROM `#table`\n WHERE `objekt_type` = '#objekttype'\n AND `objekt_id` = '#objektid'\",\n [\n 'table' => Tekst::TABLE,\n 'objekttype' => $this->objekt_type,\n 'objektid' => $this->objekt_id\n ]\n );\n break;\n }\n\n if ($query) {\n $res = $query->run();\n\n while ($data = Query::fetch($res)) {\n $this->add(new Tekst($data));\n }\n }\n }", "title": "" }, { "docid": "2326ce73b51ae61145ba417f5c129429", "score": "0.66048276", "text": "public function loadAll()\n\t\t{\n\n\t\t\tparent::__construct();\n\n\t\t\t$this->data = $this->db->select(\n\t\t\t\t\"SELECT * FROM `fragrances`\"\n\t\t\t);\n\n\t\t}", "title": "" }, { "docid": "d5220ba56588d30cf8a9a73d27743491", "score": "0.659266", "text": "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM media_mediaboxfiles WHERE mediaboxFiles_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "title": "" }, { "docid": "4decc4cff1b33490fc4a4857adc4695d", "score": "0.65750223", "text": "public function load_DB($id);", "title": "" }, { "docid": "538aa7b6f59191cd544980e80f08bc32", "score": "0.6569874", "text": "protected function loadFromDb()\n\t{\n\t\tforeach ($this->getControls(true) as $control) {\n\t\t\tif (method_exists($control, 'loadFromDb')) {\n\t\t\t\t$control->loadFromDb($this->orm);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4c53e44e1437f11a8dcbe5ab6b79c318", "score": "0.6534533", "text": "abstract public function loadData($data);", "title": "" }, { "docid": "65080828a45a98ef39ccf0074d5a589c", "score": "0.6478345", "text": "function load_data()\n\t{\n\t\tlog_debug(\"inc_gl\", \"Executing load_data()\");\n\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT * FROM account_gl WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif ($sql_obj->num_rows())\n\t\t{\n\t\t\t$sql_obj->fetch_array();\n\n\t\t\t$this->data = $sql_obj->data[0];\n\n\t\t\treturn 1;\n\t\t}\n\n\t\t// failure\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "5b1430098c51734de822c3b10e0df7b1", "score": "0.64612955", "text": "public function loadData() {\n\t\t$account1 = new Account(1, 'Poupança', 1000);\n\t\t$account2 = new Account(2, 'Poupança', 500);\n\t\t$account3 = new Account(3, 'Poupança', 500);\n\n\t\t$account4 = new Account(4, 'Corrente', 1500);\n\t\t$account5 = new Account(5, 'Corrente', 800);\n\t\t$account6 = new Account(6, 'Corrente', 400);\n\n\t\t$this->data['account1'] = $account1;\n\t\t$this->data['account2'] = $account2;\n\t\t$this->data['account3'] = $account3;\n\t\t$this->data['account4'] = $account4;\n\t\t$this->data['account5'] = $account5;\n\t\t$this->data['account6'] = $account6;\n\t}", "title": "" }, { "docid": "1318e0390d32c98aa01cd15592e5cea7", "score": "0.64494056", "text": "final private function _load(): array\n\t{\n\t\t$select = 'SELECT * FROM `' . $this->use_table . '`;';\n\n\t\t$result = $this->database->query($select);\n\n\t\t$res = $this->database->fetchAll($result);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "7a18942e6c1093bbecd72ad1344b1131", "score": "0.6446388", "text": "private function DBLoadAll()\n {\n if(!$this->DBc->DB_Connect('mdm'))\n {\n $this->objR->assign('SOVerror', 'innerHTML', 'Datenbank zur Zeit nicht verf&uuml;gbar.<br />'.mysqli_connect_error());\n return;\n }\n\t$res = $this->DBc->DB_Connection['mdm']->query(\"\n SELECT *\n FROM `realmdbs`;\");\n $this->DBc->DB_Close('mdm');\n\t$this->objR->assign('SOVerror', 'innerHTML', \"<pre>\\n\");\n\t$this->objR->append('SOVerror', 'innerHTML', $res->num_rows.\"\\n\");\n foreach($res as $db)\n\t{\n\t $this->objR->append('SOVerror', 'innerHTML', print_r($db,true).\"\\n\");\n\t}\n\t$this->objR->append('SOVerror', 'innerHTML', '</pre>');\n }", "title": "" }, { "docid": "fb1fdc198fec1393b82bc89cd1f2cd5e", "score": "0.6443922", "text": "private function loadDb()\n {\n if($this->userId){\n $where = ['or', ['user_id' => $this->userId],['session_id' => $this->sessionId]];\n } else {\n $where = ['session_id' => $this->sessionId];\n }\n $rows = (new Query())\n ->select('*')\n ->from($this->table)\n ->where($where)\n ->all();\n $items = [];\n foreach ($rows as $row) {\n $product = $this->params['productClass']::find()\n ->where([\n $this->params['productFieldId'] => $row['product_id'],\n ])\n ->limit(1)\n ->one();\n $offer = $this->params['offerClass']::find()\n ->where([\n $this->params['offerFieldId'] => $row['offer_id'],\n ])\n ->limit(1)\n ->one();\n if ($product) {\n $items[$offer->{$this->params['offerFieldId']}] = new CartItem($product, $offer, $row['quantity'], $this->params);\n }\n }\n return $items;\n }", "title": "" }, { "docid": "672454eb82bf468f3c2c8e798fa22618", "score": "0.64368117", "text": "function load ()\r\n\t{\r\n\t\t$this->load_where();\r\n\t}", "title": "" }, { "docid": "7e97033cdc82e29f0ddd3065eb140d69", "score": "0.6366783", "text": "public function load($data){\n\t\t$this->data = $data;\n }", "title": "" }, { "docid": "bfc3e07a09d45571f7cd75cc9f53e2eb", "score": "0.63441646", "text": "public function LoadRecords()\n {\n \t$this->SetCulture();\n \t$this->professional_types_records = $this->GetProfessionalTypesRecords();\n }", "title": "" }, { "docid": "9fde85e2759dbac4a2e90439379fdf9c", "score": "0.6340124", "text": "public function load($id = null) {\r\n $id = $id === null ? $this->_id : $id;\r\n \r\n $sql = \"\";\r\n $rs = $this->query($sql);\r\n \r\n }", "title": "" }, { "docid": "0efbe69569ea18d98c32c94b7ad2ebcd", "score": "0.63247067", "text": "function load($uid)\n {\n $queryParts = array(\n 'SELECT' => \"*\",\n 'FROM' => $this->tableName,\n 'WHERE' => \"uid='\" . $uid . \"' AND deleted=0\",\n );\n\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n $queryParts['SELECT'],\n $queryParts['FROM'],\n $queryParts['WHERE']\n ) or die(\"ERROR: \" . $this->tableName . \".load(req1): \" . $GLOBALS['TYPO3_DB']->sql_error());\n\n\n $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n if (count($row)>0) {\n $this->data = $row;\n }\n }", "title": "" }, { "docid": "3682c46a30212affd547bb8147ba91e7", "score": "0.6314566", "text": "function load($pid)\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\t\t\r\n\t\tif ($dbh == null) {\r\n\t\t\t$dbh = openDB();\r\n\t\t\tif ($dbh == null)\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ($pid == 0)\r\n\t\t\treturn;\r\n\t\t\t\r\n\t\t$sql = \"\r\n\t\t\tselect Id,\r\n\t\t\t\tName,\r\n\t\t\t\tCreateDate\r\n\t\t\tfrom tbl_Pistol_Club\r\n\t\t\twhere Id = $pid\r\n\t\t\";\r\n\t\t\r\n\t\t$result = mysqli_query($dbh,$sql);\r\n\t\tif ($obj = mysqli_fetch_object($result))\r\n\t\t{\r\n\t\t\t$this->id = $obj->Id;\r\n\t\t\t$this->name = $obj->Name;\r\n\t\t\t$this->createDate = $obj->CreateDate;\r\n\t\t}\r\n\r\n\t\tmysqli_free_result($result);\r\n\t}", "title": "" }, { "docid": "4128ba22e9540b266f52a749eab1e943", "score": "0.6304141", "text": "public function load()\n {\n $res = Database::getInstance()->PDOInstance->query(\"SELECT * FROM note_club WHERE club_id='\" . $this->club_id .\n \"' and school_year='\". $this->school_year .\"'\")\n ->fetchAll(\\PDO::FETCH_ASSOC);\n // complète le this avec les valeurs récupérées\n\n if(!empty($res)) {\n foreach ($res[0] as $key => $val) {\n $this->$key = $val;\n }\n }\n }", "title": "" }, { "docid": "09747161d5526c08c5d97fb8a89a2bea", "score": "0.62892294", "text": "function loadFromDatabaseByUser($id)\n\t{\n\t\tglobal $sql;\n\t\t$id = sql::Escape($id);\n\t\t$row = $sql->QueryRow(\"SELECT * FROM $this->tablename WHERE user='$id'\");\n\t\t$this->loadFromRow($row);\n\t}", "title": "" }, { "docid": "f19c0b7ae91a3a3780823a00e39c9b19", "score": "0.6276917", "text": "public function loadFromDB($query) {\n if (($result = $this->db->query($query)) && $result->num_rows) {\n $this->fillData($result->fetch_assoc());\n } else {\n throw new Exception(\"Could not load data from query\");\n }\n }", "title": "" }, { "docid": "a43da7250106a007cd1f669a060f137e", "score": "0.6275976", "text": "public function loadCoreData($db)\n {\n $db->beginTransaction();\n\n $db->commit();\n }", "title": "" }, { "docid": "6f3565d833fc429cac552e458877fd19", "score": "0.6264075", "text": "public function load_data() {\n return true;\n }", "title": "" }, { "docid": "72b6b664d46770cc0d781afcd71dd721", "score": "0.62508637", "text": "public function loadData() {\n\t\t$u1 = $this->newEntity(User::class, [\n\t\t\t'name' => 'teszt juzer',\n\t\t\t'email' => '[email protected]',\n\t\t\t'phone' => '1234567',\n\t\t\t'password' => '$2a$08$jHZj/wJfcVKlIwr5AvR78euJxYK7Ku5kURNhNx.7.CSIJ3Pq6LEPC',\n\t\t\t'role' => 'ROLE_USER',\n\t\t\t'active' => TRUE,\n\t\t]);\n\t\t\n\t\t$a1 = $this->newEntity(Address::class, [\n\t\t\t'user' => $u1,\n\t\t\t'title' => 'cim1',\n\t\t\t'city' => 'bp',\n\t\t\t'zipCode' => 1234,\n\t\t\t'street' => 'ize u.',\n\t\t\t'houseNumber' => '1',\n\t\t]);\n\t\t$a2 = $this->newEntity(Address::class, [\n\t\t\t'user' => $u1,\n\t\t\t'title' => 'cim2',\n\t\t\t'city' => 'bp',\n\t\t\t'zipCode' => 2345,\n\t\t\t'street' => 'vmi ut',\n\t\t\t'houseNumber' => '2',\n\t\t]);\n\t\t\n\t\t$o1 = $this->newEntity(ShopEntity\\Order::class, [\n\t\t\t'user' => $u1,\n\t\t\t'shippingAddress' => $a1,\n\t\t\t'billingAddress' => $a2,\n\t\t\t'status' => $this->om->find(ShopEntity\\OrderStatus::class, 1),\n\t\t\t'comment' => 'Ez csak egy teszt rendeles',\n\t\t]);\n\t\t$this->newEntity(ShopEntity\\OrderItem::class, [\n\t\t\t'order' => $o1,\n\t\t\t'product' => $this->om->find(ShopEntity\\Product::class, mt_rand(1, 4)),\n\t\t\t'price' => mt_rand(100, 200),\n\t\t\t'count' => mt_rand(3, 10),\n\t\t]);\n\t\t$this->newEntity(ShopEntity\\OrderItem::class, [\n\t\t\t'order' => $o1,\n\t\t\t'product' => $this->om->find(ShopEntity\\Product::class, mt_rand(5, 9)),\n\t\t\t'price' => mt_rand(200, 300),\n\t\t\t'count' => mt_rand(3, 10),\n\t\t]);\n\t\t\n\t\tsleep(2);\n\t\t\n\t\t\n\t\t$o2 = $this->newEntity(ShopEntity\\Order::class, [\n\t\t\t'user' => $u1,\n\t\t\t'shippingAddress' => $a1,\n\t\t\t'status' => $this->om->find(ShopEntity\\OrderStatus::class, 1),\n\t\t\t'comment' => 'Masik teszt rendeles',\n\t\t]);\n\t\t$this->newEntity(ShopEntity\\OrderItem::class, [\n\t\t\t'order' => $o2,\n\t\t\t'product' => $this->om->find(ShopEntity\\Product::class, mt_rand(1, 5)),\n\t\t\t'price' => mt_rand(100, 200),\n\t\t\t'count' => mt_rand(3, 10),\n\t\t]);\n\t\t$this->newEntity(ShopEntity\\OrderItem::class, [\n\t\t\t'order' => $o2,\n\t\t\t'product' => $this->om->find(ShopEntity\\Product::class, mt_rand(6, 9)),\n\t\t\t'price' => mt_rand(200, 300),\n\t\t\t'count' => mt_rand(3, 10),\n\t\t]);\n\t\t\n\t}", "title": "" }, { "docid": "c3368fa77ac106ea807e5f3756349662", "score": "0.62472034", "text": "private function load() {\n\t\tif ($this->locked == false) {\n\t\t\tthrow new \\Exception('\\FSDB\\Table: File in not locked yet');\n\t\t}\n\n\t\t$data = \"\";\n\n\t\twhile (($buffer = fgets($this->handle)) !== false) {\n\t\t\t$data .= $buffer;\n\t\t}\n\n\t\tif (!feof($this->handle)) {\n\t\t\tthrow new \\Exception('\\FSDB\\Table: unexpected fgets() fail');\n\t\t}\n\n\t\t$this->data = json_decode($data, false);\n\t}", "title": "" }, { "docid": "e21c13f5414d97ccce410cfc540f95f2", "score": "0.62440836", "text": "public function load($id) {\n $query = $this->db->get_where($this::DB_TABLE, array(\n $this::DB_TABLE_PK => $id,\n ));\n /**\n * Assign the table value to the object variable value.\n */\n \n if ($query->num_rows() > 0)\n {\n $this->populate($query->row());\n }\n }", "title": "" }, { "docid": "f502c1b51c7b9c44515b5e6013974b0e", "score": "0.62362593", "text": "protected function loadTestDbData()\n {\n $db = Yii::$app->getDb();\n $table = Setting::tableName();\n\n $db->createCommand()->batchInsert($table, ['key', 'value', 'description'], [\n ['min_withdrawal', 100, ''],\n ['min_float', 0.1, ''],\n ['strange_insensitively', 'yes', ''],\n ['SPELL-SPELL_+~@#$', '#!', ''],\n ])->execute();\n }", "title": "" }, { "docid": "c5d189008fcb5f4df83dde710b7e82c5", "score": "0.62130743", "text": "public function load()\n {\n return $this->loadData();\n }", "title": "" }, { "docid": "8f56014b08c24a8e9082fb11977b7766", "score": "0.6198012", "text": "public function loadFromSql($queryRow);", "title": "" }, { "docid": "96f863bd3f00bdc9655782c8321e6363", "score": "0.6185086", "text": "function load_db()\n \t{\n \t\tunset($this->db);\n \t\t$this->db = $this->ci->load->database($this->data_conn,TRUE);\n \t}", "title": "" }, { "docid": "10fdf4516140312209b1a37b27474298", "score": "0.61831033", "text": "function read_from_db($sql)\n {\n $ipinga = \\ipinga\\ipinga::getInstance();\n\n $this->records = array(); // start fresh with an empty list\n try {\n foreach ($ipinga->pdo()->query($sql) as $row) {\n $tbl = new \\ipinga\\table($this->tableName);\n $tbl->loadById($row['id']);\n $this->records[] = $tbl;\n }\n } catch (\\PDOException $e) {\n echo $e->getMessage() . '<br>' . $sql . '<br><hr>';\n }\n }", "title": "" }, { "docid": "a44138078f6736e7c6f8d7ebd5713f1d", "score": "0.61784935", "text": "public function loadFromDB() {\n\t\t$dbr = wfGetDB( DB_PRIMARY );\n\n\t\t$row = $dbr->selectRow(\n\t\t\t'video',\n\t\t\t[\n\t\t\t\t'video_url',\n\t\t\t\t'video_type',\n\t\t\t\t'video_actor',\n\t\t\t\t'video_timestamp'\n\t\t\t],\n\t\t\t[ 'video_name' => $this->name ],\n\t\t\t__METHOD__\n\t\t);\n\n\t\tif ( $row ) {\n\t\t\t$this->url = $row->video_url;\n\t\t\t$this->exists = true;\n\t\t\t$this->type = $row->video_type;\n\t\t\t$this->submitter_actor = $row->video_actor;\n\t\t\t$this->create_date = $row->video_timestamp;\n\t\t}\n\n\t\t# Unconditionally set loaded=true, we don't want the accessors constantly rechecking\n\t\t$this->dataLoaded = true;\n\t}", "title": "" }, { "docid": "93bc8ffa19fd45f5bff139fa62891fbd", "score": "0.61727566", "text": "public function loadData() \n {\n // store posted data\n $userData['UserId'] = $_POST['UserId'];\n\n $getUserData = \"SELECT data FROM userData WHERE userId = \". $userData['UserId'];\n\n $result = $this->dbLink()->query($getUserData);\n\n // if there are results\n if ($result->num_rows > 0)\n {\n // output data of each row\n if($row = $result->fetch_assoc())\n {\n echo $row['data'];\n }\n }\n else\n {\n echo '{}';\n }\n }", "title": "" }, { "docid": "d6e50827542d723075bf66f034071ec4", "score": "0.6170474", "text": "public function load_data()\n\t{\n\t\t$data=[];\n\t\tif($this->stmt){\n\t\t\t$this->rows= $this->stmt->rowCount();\n\t\t}\n\t\tif($this->rows < 1){\n\t\t\treturn [];\n\t\t}\n\t\tif($this->rows == 1){\n\t\t\t$data[0]=$this->stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $data;\n\t\t}\n\t\tif($this->rows > 1){\n\t\t\t$data=$this->stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "377bb65578e754e504b55e553de8c327", "score": "0.6161485", "text": "function db_load_all()\n \t{\n\t if( !is_resource($this->_last_resource) )\n\t {\n\t \treturn FALSE;\n\t }\n\t \n\t $resource = $this->_last_resource;\n\t $return_data = array();\n\t while( $data = $this->db_fetch_assoc($resource) )\n\t {\n\t \t$return_data[] = $data;\n\t }\n\t \n\t return $return_data;\n\t}", "title": "" }, { "docid": "54bf3d91cd133b8bd1177135c8aac611", "score": "0.6140289", "text": "function load(){\n\t\t\tif(isset($this->idItem)){\n\t\t\t\t$sql=\"SELECT * FROM `item` WHERE `id`=\".$this->id;\n\t\t\t\t$db =& database::getInstance();\n\t\t\t\t$ID=$db->execute($sql);\n\t\t\t\tif($r=mysql_fetch_assoc($ID)){\n\t\t\t\t\t//$this->idItem=\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "2432a9c5110117c8f59bdf06a10e872c", "score": "0.61300194", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM jogo WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "feec741451ae11e19ce526e685b7f9ac", "score": "0.6111979", "text": "abstract public function loadData(DataTable_Request $request);", "title": "" }, { "docid": "c65cc743d7a978649f2c5f112e25b94e", "score": "0.6097032", "text": "protected function loadData()\n {\n if ($this->loaded) {\n //Already loaded, nothing to do\n return;\n }\n\n $this->loaded = true;\n\n if (empty($innerKey = $this->parent->getField($this->key(Record::INNER_KEY)))) {\n //Parent not loaded or key is missing\n return;\n }\n\n $selector = $this->odm->selector($this->class)->where([\n $this->key(Record::OUTER_KEY) => $innerKey\n ]);\n\n //First element from selection (in a form of array)\n $this->data = current($selector->limit(1)->getProjection()->toArray());\n }", "title": "" }, { "docid": "37674ba4714c1ff338910ba5a4144bce", "score": "0.6096661", "text": "function loadDB(){\n\t\t$json_db = file_get_contents(\"wordsDB.json\");\n\t\t$json_db = str_replace(\"null\", \"\\\"null\\\"\", $json_db);\n\t\treturn json_decode($json_db, true);\n\t}", "title": "" }, { "docid": "3c0abcf45fcd59337d01852e8ad1045b", "score": "0.60927206", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM rapor_nilai_akhir WHERE id_nilai_akhir = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "73987e97a36ecb0c135eb8fc684898e7", "score": "0.6061162", "text": "function do_load() {\r\n\t\r\n\t\t$sql = \"\r\n\t\t\tSELECT\r\n\t\t\t\tP.person_code,\r\n\t\t\t\tP.forename,\r\n\t\t\t\tP.surname,\r\n\t\t\t\tP.fes_staff_code AS staff_code\r\n\t\t\tFROM\r\n\t\t\t\tusers U\r\n\t\t\t\tINNER JOIN people P ON P.person_code = U.ebs_person_code\r\n\t\t\tWHERE\r\n\t\t\t\tUpper(U.name) = Upper(:username)\r\n\t\t\";\r\n\t\r\n\t\t//Connect and parse the query\r\n\t\t$connection = $this->connect();\r\n\t\t$statement = oci_parse($connection, $sql);\r\n\t\t\r\n\t\t//Trap errors\r\n\t\tif(!$statement) {\r\n\t\t\t$error = oci_error();\r\n\t\t\tdie(\"An error was encountered loading user details for \" . $this->username . \": \" . $error[\"message\"]);\r\n\t\t}\r\n\t\t\r\n\t\t//Bind the user name\r\n\t\toci_bind_by_name($statement, \":username\", $this->username);\r\n\t\t\r\n\t\t//Execute the query\r\n\t\tif(!oci_execute($statement, OCI_DEFAULT)) {\r\n\t\t\t$error = oci_error();\r\n\t\t\tdie(\"An error was encountered executing user details query \" . $this->username . \": \" . $error[\"message\"]);\r\n\t\t}\t\r\n\t\t\r\n\t\t$row = oci_fetch_array($statement, OCI_RETURN_NULLS);\r\n\t\t$this->person_code = $row[\"PERSON_CODE\"];\r\n\t\t$this->forename = $row[\"FORENAME\"];\r\n\t\t$this->surname = $row[\"SURNAME\"];\r\n\t\t$this->staff_code = $row[\"STAFF_CODE\"];\r\n\t\t\r\n\t\toci_close($connection);\r\n\t}", "title": "" }, { "docid": "a94e3cdc82582251d3bb923bcfa6a9b4", "score": "0.60567886", "text": "function load_data()\n\t{\n\t\tlog_debug(\"inc_filters\", \"Executing load_data()\");\n\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT * FROM filters WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif ($sql_obj->num_rows())\n\t\t{\n\t\t\t$sql_obj->fetch_array();\n\n\t\t\t$this->data = $sql_obj->data[0];\n\n\t\t\treturn 1;\n\t\t}\n\n\t\t// failure\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "76b2a4f714f958f8b44e6a812dffb5ae", "score": "0.60539234", "text": "public function load($id){\r\n\t\t$sql = 'SELECT * FROM animal_one WHERE id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->set($id);\r\n\t\treturn $this->getRow($sqlQuery);\r\n\t}", "title": "" }, { "docid": "d673cfbb98bc5ada13916a69593df3ae", "score": "0.60402554", "text": "public function fetch_data();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.603481", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.603481", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.603481", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.603481", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.603481", "text": "public function load();", "title": "" }, { "docid": "b442e4f2982db6efd2b847dd63c52877", "score": "0.6022735", "text": "function loadDatabase()\n {\n //firstly, check whether the provided file exists \n if ( ! file_exists($this->configFile) )\n throw new Exception ('Exception thrown: DB class not found', 1);\n \n include 'DBController.php';\n \n //check if the DBController class has been loaded\n if ( ! class_exists('DBController'))\n throw new Exception ('Exception thrown: DBController class not found', 1);\n \n //call the DB Controller and store the data\n $dbController = new DBController();\n $dbController->storeData($this);\n \n }", "title": "" }, { "docid": "682dd00beed1a7de7791ad459a1920a1", "score": "0.60224074", "text": "function loadData() \n {\n // build sql for gathering data\n $sql = 'SELECT * FROM ';\n $sql .= SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_PAGE;\n $sql .= ' WHERE series_id=\"'.$this->seriesID.'\" AND page_key=\"'.$this->pageKey.'\"';\n \n $this->db->runSQL( $sql );\n \n if ($row = $this->db->retrieveRow() ) {\n \n // get pageID\n $pageID = $row['page_id'];\n \n // load Values into this Page Object\n for( $indx=0; $indx<count($this->fieldList); $indx++ ) {\n \n $fieldName = $this->fieldList[$indx];\n $this->addElement( $fieldName, $row[$fieldName]);\n }\n \n \n // Now get each label key associated with this Page\n $sql = 'SELECT DISTINCT label_key FROM ';\n $sql .= SITE_DB_NAME.'.'.XMLObject_MultilingualManager::DB_TABLE_LABEL;\n $sql .= ' WHERE page_id=\"'.$pageID.'\"';\n \n $this->db->runSQL( $sql );\n \n // for each label key\n while( $row = $this->db->retrieveRow() ) {\n \n // store XML Object into array\n $this->labelsList[] = new XMLObject_Multilingual_Label( $pageID, $row[ 'label_key' ] );\n \n } // next label\n \n \n // Add Each Label entry to this element\n for( $indx=0; $indx<count( $this->labelsList ); $indx++) {\n\n $this->addXmlObject( $this->labelsList[ $indx ] );\n } // next Label\n \n \n } else {\n // else Page entry not found so\n \n // reset pageID\n $pageID = -1;\n \n }\n \n \n }", "title": "" }, { "docid": "64810680f99bbc11169096c38be7443b", "score": "0.6021829", "text": "function load() {\n \t$db = new DB();\n $db->query(\"SELECT * FROM site WHERE address = '\".$this->address.\"'\");\n if($db->numRows() == 0) {\n $db->close();\n\t $this->parent = \"\";\n $this->loaded = 0;\n $this->lock = 0;\n } else {\n $siteinfo = $db->fetchRow();\n $this->lock = $siteinfo[3];\n\t $this->parent = $siteinfo[1];\n $this->sid = $siteinfo[0];\n $db->close();\n $this->loaded = 1;\n }\n }", "title": "" }, { "docid": "350db3f77877f65c8932de4a37a5a6a7", "score": "0.6019988", "text": "function _load()\n {\n if (is_array(self::$data)){\n return;\n }\n \n self::$data=array();\n \n foreach(db::fetchList('select event_name, class_name from ci_event') as $row) {\n if (!array_key_exists(strToLower($row['event_name']),self::$data)) {\n self::$data[strToLower($row['event_name'])]=array();\n }\n self::$data[strToLower($row['event_name'])][] = $row;\n }\n }", "title": "" }, { "docid": "f0dc907ee66f83234f9037963ff44953", "score": "0.600765", "text": "private function loadData(){\n\n //conecta con la bbdd mediante el objeto de conexión\n $db = $this->conectarBD();\n\n //genera la consulta\n $sql = 'SELECT * FROM users WHERE id='.$this->id;\n\n //el objeto de conexión ejecuta la sentencia\n if($result = $db->query($sql)){\n \n //pasa el resultado a la variable row en forma de array asociativo\n $row = $result->fetch_assoc();\n \n //libera la memoria de los resultados sql (ya no los necesita porque están en $row en forma de array)\n $result->free();\n\n //actualiza la propiedades del usuario con los resultados de la consulta\n $this->email = $row[\"email\"];\n $this->pass = $row[\"pass\"];\n\n $return = true;\n\n }else{//si la consulta falla\n\n $this->writeErrorLog($db->error);\n $return = false;\n\n }\n\n //cierra la conexión con la bbdd\n $db->close();\n\n return $return;\n }", "title": "" }, { "docid": "9d6e78e7a227c766f46371a7f4b8b066", "score": "0.60070026", "text": "Protected function read_db(){\n $this->safe_to_execute();\n\n /** Open db in memory */\n $db = file_get_contents($this->db_loc);\n\n // Decode JSON and sve it into an array\n $db = json_decode($db, true);\n \n if(empty($db)) return null;\n else return $db;\n }", "title": "" }, { "docid": "46a7c32bd50542e13e786db7422cdfa4", "score": "0.6005833", "text": "public function load(array $data);", "title": "" }, { "docid": "0409c350a034d73a45bf26494d0cca60", "score": "0.60006106", "text": "public function load() {\n\t\t$pages = $this->db->query(\"SELECT * FROM pages WHERE status = 1\");\n\t\treturn $pages->fetchAll(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "fd66e146dc7db40efb27dce7d5f3d5ac", "score": "0.59952587", "text": "public function load($data){\n\t\t\n\t\t$this->db->select('*')->from($this->table);\n\t\t\n\t\tif(is_array($data)){\n\t\t\t$this->db->where($data);\n\t\t}else{\n\t\t\t$this->db->where($this->primary_key, $data);\n\t\t}\n\t\t\n\t\t$result = $this->db->get_one();\n\n\t\t$this->data = $result;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b199d6eeb3bafdf1695285adfbab82b6", "score": "0.5972121", "text": "private function _load()\r\n {\r\n\r\n // good, got the tables now to preload some info\r\n if(($versioned_fields = $this->db->field_data($this->table.'_versioned')) && ($fields = $this->db->field_data($this->table)))\r\n {\r\n // load the table fields\r\n foreach($fields as $field)\r\n {\r\n $this->fields[$field->Field] = array(\"isversioned\"=>0);\r\n if($field->Key == \"PRI\")\r\n {\r\n $this->table_index = $field->Field;\r\n }\r\n }\r\n \r\n // load the versioned fields\r\n foreach($versioned_fields as $field)\r\n {\r\n if(empty($this->fields[$field->Field]))\r\n {\r\n $this->fields[$field->Field] = array(\"isversioned\"=>1);\r\n } else {\r\n $this->fields[$field->Field][\"isversioned\"] = 1;\r\n }\r\n if($field->Key == \"PRI\")\r\n {\r\n $this->versioned_table_index = $field->Field;\r\n }\r\n }\r\n } else {\r\n throw new Kohana_Exception('versioned_model.tables_not_found', $this->table);\r\n } \r\n \r\n }", "title": "" }, { "docid": "f66da4f6af166bf417886a665769db2b", "score": "0.5964922", "text": "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif ( empty( $this->_data ) )\n\t\t{\n\t\t /*\n\t\t\t$query = '\tSELECT *\n\t\t\t\t\t\tFROM #__joomleague_prediction_member\n\t\t\t\t\t\tWHERE id = ' . (int) $this->_id;\n */\n\n\t\t\t$query\t\t=\t'\tSELECT\ttmb.*,\n\t\t\t\t\t\t\t\t\tu.name AS realname,\n\t\t\t\t\t\t\t\t\tu.username AS username,\n\t\t\t\t\t\t\t\t\tp.name AS predictionname\n\t\t\t\t\t\t\tFROM\t#__joomleague_prediction_member AS tmb\n\t\t\t\t\t\t\tLEFT JOIN #__joomleague_prediction_game AS p ON p.id = tmb.prediction_id\n\t\t\t\t\t\t\tLEFT JOIN #__users AS u ON u.id = tmb.user_id \n WHERE tmb.id = ' . (int) $this->_id\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t;\n $this->_db->setQuery( $query );\n\t\t\t$this->_data = $this->_db->loadObject();\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "32418764206bd8cd2869e941c66fe748", "score": "0.59634167", "text": "public function importDatabase(){\n require_once($this->root.'/dataBase/DataBase.class.php');\n }", "title": "" }, { "docid": "7351bafbde8e251ce08e22f3c3f5656b", "score": "0.5956588", "text": "static function loadFromDb()\r\n\t{\r\n\t\t$regs = Art_Model_Register_Value::fetchAllSimple();\r\n\t\tstatic::setFromArray($regs);\r\n\t}", "title": "" }, { "docid": "71c08100beaf32aaed837a7908e54537", "score": "0.5948335", "text": "function Dominios()\n {\n $this->connection = Application::getDatabaseConnection();\n $this->connection->SetFetchMode(2);\n }", "title": "" }, { "docid": "167ada128684bf7ee36eecec865d91bd", "score": "0.5946175", "text": "protected function loadData()\n {\n global $FD;\n\n // news\n $news_arr = $FD->db()->conn()->query(\n 'SELECT `news_id`, `news_date`, `news_search_update`\n FROM ' . $FD->db()->getPrefix() . 'news\n WHERE `news_active` = 1 AND `news_date` <= ' . $FD->env('time') . '\n ORDER BY `news_search_update` DESC');\n $news_arr = $news_arr->fetchAll(PDO::FETCH_ASSOC);\n foreach ($news_arr as $news) {\n $item = array();\n $item['url'] = url('comments', array('id' => $news['news_id']));\n\n if (!empty($news['news_search_update'])) {\n $item['lastmod'] = date('c', url($news['news_search_update']));\n } else if (!empty($news['news_date'])) {\n $item['lastmod'] = date('c', url($news['news_date']));\n }\n\n array_push($this->items, $item);\n }\n\n // articles\n $articles = $FD->db()->conn()->query(\n 'SELECT `article_id`, `article_url`, `article_date`, `article_search_update`\n FROM ' . $FD->db()->getPrefix() . 'articles\n WHERE `article_date` <= ' . $FD->env('time') . '\n ORDER BY `article_search_update` DESC');\n $articles = $articles->fetchAll(PDO::FETCH_ASSOC);\n foreach ($articles as $article) {\n $item = array();\n if (!empty($article['article_url'])) {\n $item['url'] = url($article['article_url']);\n } else {\n $item['url'] = url('articles', array('id' => $article['article_id']));\n }\n if (!empty($article['article_search_update'])) {\n $item['lastmod'] = date('c', url($article['article_search_update']));\n } else if (!empty($article['article_date'])) {\n $item['lastmod'] = date('c', url($article['article_date']));\n }\n\n array_push($this->items, $item);\n }\n\n // downloads\n $downloads = $FD->db()->conn()->query(\n 'SELECT `dl_id`, `dl_date`, `dl_search_update`\n FROM ' . $FD->db()->getPrefix() . 'dl\n WHERE `dl_open` = 1 AND `dl_date` <= ' . $FD->env('time') . '\n ORDER BY `dl_search_update` DESC');\n $downloads = $downloads->fetchAll(PDO::FETCH_ASSOC);\n foreach ($downloads as $download) {\n $item = array();\n $item['url'] = url('dlfile', array('id' => $download['dl_id']));\n\n if (!empty($download['dl_search_update'])) {\n $item['lastmod'] = date('c', url($download['dl_search_update']));\n } else if (!empty($download['dl_date'])) {\n $item['lastmod'] = date('c', url($download['dl_date']));\n }\n\n array_push($this->items, $item);\n }\n\n }", "title": "" }, { "docid": "5ba3d6c45b1d09d935cbb75f0b008931", "score": "0.5932756", "text": "public function getDataFromDb()\r\n\t{\r\n\t\t$sl = ServiceLocatorLoader::getInstance($this->dbh)->getServiceLocator();\r\n\t\t$loader = $sl->get(\"EntityLoader\");\r\n\t\t$entity = $loader->get($this->object_type, $this->id);\r\n\r\n\t\t// Check to see if object not found\r\n\t\tif (!$entity)\r\n\t\t{\r\n\t\t\t$this->id = \"\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Check to see if object moved\r\n\t\tif ($entity->getId() != $this->id)\r\n\t\t{\r\n\t\t\t// Check if entity actually not found then delete from index before setting the id to null\r\n\t\t\t$this->removeIndex();\r\n\r\n\t\t\t// Set id to whatever loaded entity is\r\n\t\t\t$this->id = $entity->getId();\r\n\t\t}\r\n\r\n\t\t$data = array();\r\n\r\n\t\t$all_fields = $entity->getDefinition()->getFields();\r\n\t\tforeach ($all_fields as $fname=>$fdef)\r\n\t\t{\r\n\t\t\t$data[$fname] = \"\";\r\n\r\n\t\t\tswitch ($fdef->type)\r\n\t\t\t{\r\n\t\t\tcase 'date':\r\n\t\t\t\tif ($entity->getValue($fname))\r\n\t\t\t\t\t$data[$fname] = date(\"Y-m-d\", $entity->getValue($fname));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'timestamp':\r\n\t\t\t\tif ($entity->getValue($fname))\r\n\t\t\t\t\t$data[$fname] = date(\"Y-m-d h:i:s A e\", $entity->getValue($fname));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'bool':\r\n\t\t\t\t$data[$fname] = ($entity->getValue($fname)) ? 't': 'f';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$data[$fname] = $entity->getValue($fname);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// Get fkey vals\r\n\t\t\tif ($entity->getValueNames($fname))\r\n\t\t\t\t$data[$fname . \"_fval\"] = json_encode($entity->getValueNames($fname));\r\n\t\t}\r\n\r\n\t\t// Update cache\r\n\t\t//$this->cache->set($this->dbh->dbname.\"/object/\".$this->object_type.\"/\".$this->id, $data);\r\n\r\n\t\treturn $data;\r\n\r\n\t\t/*\r\n\t\t$dbh = $this->dbh;\r\n\t\t$query = \"select * from \".$this->getObjectTable().\" where id='\".$this->id.\"'\";\r\n\t\t$result = $dbh->Query($query);\r\n\t\tif (!$this->dbh->GetNumberRows($result))\r\n\t\t{\r\n\t\t\t// Object id not found, see if we can find the object in the moved index (maybe it was merged)\r\n\t\t\tif ($this->checkMoved())\r\n\t\t\t{\r\n\t\t\t\t// The id we were looking for did move, checkMoved should update\r\n\t\t\t\t// $this->id so now we can try loading again\r\n\t\t\t\treturn $this->load();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Object id does not exist - clear results and set id to null\r\n\t\t\t\t$this->id = null;\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$ret = $dbh->GetRow($result, 0);\r\n\r\n\t\t// Load data for foreign keys\r\n\t\t$all_fields = $this->def->getFields();\r\n\t\tforeach ($all_fields as $fname=>$fdef)\r\n\t\t{\r\n\t\t\t// Populate values and foreign values for foreign entries if not set\r\n\t\t\tif ($fdef->type == \"fkey\" || $fdef->type == \"object\" || $fdef->type == \"fkey_multi\" || $fdef->type == \"object_multi\")\r\n\t\t\t{\r\n\t\t\t\t$mvals = null;\r\n \r\n\t\t\t\tif (!$ret[$fname . \"_fval\"] || ($ret[$fname . \"_fval\"]=='[]' && $ret[$fname]!='[]' && $ret[$fname]!=''))\r\n\t\t\t\t{\r\n\t\t\t\t\t$mvals = $this->getForeignKeyDataFromDb($fname, $ret[$fname]);\r\n\t\t\t\t\t$ret[$fname . \"_fval\"] = ($mvals) ? json_encode($mvals) : \"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// set values of fkey_multi and object_multi fields as array of id(s)\r\n\t\t\t\tif ($fdef->type == \"fkey_multi\" || $fdef->type == \"object_multi\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//echo \"<pre>$fname before \".var_export($ret[$fname], true).\"</pre>\";\r\n\t\t\t\t\tif ($ret[$fname])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$parts = $this->decodeFval($ret[$fname]);\r\n\t\t\t\t\t\tif ($parts !== false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$ret[$fname] = $parts;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//echo \"<pre>$fname after \".var_export($ret[$fname], true).\"</pre>\";\r\n\r\n\t\t\t\t\t// Was not set in the column, try reading from mvals list that was generated above\r\n\t\t\t\t\tif (!$ret[$fname])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (!$mvals && $ret[$fname . \"_fval\"])\r\n\t\t\t\t\t\t\t$mvals = $this->decodeFval($ret[$fname . \"_fval\"]);\r\n\r\n\t\t\t\t\t\tif ($mvals)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach ($mvals as $id=>$mval)\r\n\t\t\t\t\t\t\t\t$ret[$fname][] = $id;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//echo \"<pre>$fname finally \".var_export($ret[$fname], true).\"</pre>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get object with no subtype - we may want to store this locally eventually\r\n\t\t\t\t// so check to see if the data is not already defined \r\n\t\t\t\tif (!$ret[$fname] && $fdef->type == \"object\" && !$fdef->subtype)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!$mvals && $ret[$fname . \"_fval\"])\r\n\t\t\t\t\t\t$mvals = $this->decodeFval($ret[$fname . \"_fval\"]);\r\n\r\n\t\t\t\t\tif ($mvals)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach ($mvals as $id=>$mval)\r\n\t\t\t\t\t\t\t$ret[$fname] = $id; // There is only one value but it is assoc\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Update cache\r\n\t\t$this->cache->set($this->dbh->dbname.\"/object/\".$this->object_type.\"/\".$this->id, $ret);\r\n\r\n\r\n\t\treturn $ret;\r\n\t\t */\r\n\t}", "title": "" }, { "docid": "6479f3914e9aadc02422d06101ab52aa", "score": "0.5928329", "text": "public function load($id){\r\n\t\t$sql = 'SELECT * FROM animal_eartag WHERE id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->set($id);\r\n\t\treturn $this->getRow($sqlQuery);\r\n\t}", "title": "" }, { "docid": "bda82596cadcc6b2f8fd450e79bceb09", "score": "0.5921544", "text": "abstract protected function get_table_data();", "title": "" }, { "docid": "fd80970ebd1f87811eeaeded06c1721c", "score": "0.5917194", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM periodo WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "1e78d624e83911cf5d3501ee37edc5d0", "score": "0.5905866", "text": "protected function _importData()\n {\n\n \n }", "title": "" }, { "docid": "0d83188985084c3bbb3ff2715e28b4f8", "score": "0.59049994", "text": "public function LoadRecords()\n {\n \t$this->SetCulture();\n \t$this->retailer_types_records = $this->GetRetailerTypesRecords();\n }", "title": "" }, { "docid": "69cbb4dde41935080455b4dff5317eb3", "score": "0.5899637", "text": "function load($id);", "title": "" }, { "docid": "481f997b9c2640c91c9e964f7f40424f", "score": "0.5891894", "text": "abstract protected function loadModels();", "title": "" }, { "docid": "cfa5349e89765dd24897d4086acb13bf", "score": "0.5890606", "text": "abstract public function loadData(): array;", "title": "" }, { "docid": "ff522251cd644839f307568a7afa6956", "score": "0.5890461", "text": "public function load_data() {\n\t\tif ( ! $this->hash ) {\n\t\t\treturn;\n\t\t}\n\t\t$file_path = get_temp_dir() . '/' . $this->hash;\n\t\tif ( ! file_exists( $file_path ) ) {\n\t\t\tthrow new \\Exception( \"No import was found with the identifier &lsquo;$this->hash&rsquo;\" );\n\t\t}\n\n\t\t// Get all rows.\n\t\t$this->data = array();\n\t\t$file = fopen( $file_path, 'r' );\n\t\twhile ( $line = fgetcsv( $file ) ) {\n\t\t\t$this->data[] = $line;\n\t\t}\n\t\tfclose( $file );\n\n\t\t// Extract headers.\n\t\t$this->headers = $this->data[0];\n\t\tunset( $this->data[0] );\n\t}", "title": "" }, { "docid": "3cca606130b05fdbbd6acc24c421418f", "score": "0.5887628", "text": "function loadData(){\n\t\t$this->db = new Database(\"SELECT * FROM classe WHERE IDCLASSE = :classe\", 0, array(\"classe\" => $_GET['id']));\n\t\tif($this->db->query()){\n\t\t\t$this->classe = $this->db->fetch_array();\n\t\t}else\n\t\t\tdie($this->db->getLog(\"error\"));\n\t\t/* Pour les frais officiels */\n\t\t$param = array(\"classe\" => $_GET['id'], \"periode\" => $_SESSION['periode'], \"type\" => \"0\");\n\t\t$query = \"SELECT f.CODE, f.LIBELLE, f.DATEDEBUT, f.DATEFIN, f.MONTANT \n\t\tFROM classe_frais f \n\t\tWHERE f.IDCLASSE = :classe AND f.PERIODE = :periode AND f.TYPE = :type\";\n\t\t$this->db->setQuery($query, $param);\n\t\tif($this->db->query()){\n\t\t\t$this->officiels = $this->db->fetchAll(\"assoc\");\n\t\t}else\n\t\t\tdie($this->db->getLog(\"error\"));\n\t\t/* Pour les frais occasionnels */\n\t\t$param = array(\"classe\" => $_GET['id'], \"periode\" => $_SESSION['periode'], \"type\" => \"1\");\n\t\t$this->db->setQuery($query, $param);\n\t\tif($this->db->query()){\n\t\t\t$this->occasionnels = $this->db->fetchAll(\"assoc\");\n\t\t}else\n\t\t\tdie($this->db->getLog(\"error\"));\n\t\t/* Pour les reductions */\n\t\t$query = \"SELECT r.CODE, r.LIBELLE, f.LIBELLE AS APPLIQUEA, \n\t\t\tIF(r.TYPE = 'pourcentage', CONCAT(r.MONTANT, '%'), r.MONTANT) AS MONTANT \n\t\t\tFROM classe_reduction r \n\t\t\tLEFT JOIN classe_frais f ON (r.IDFRAIS = f.ID) \n\t\t\tWHERE r.IDFRAIS IN \n\t\t\t(SELECT f2.ID FROM classe_frais f2 WHERE f2.IDCLASSE = :classe AND f2.PERIODE = :periode)\";\n\t\t$this->db->setQuery($query, array(\"classe\" => $_GET['id'], \"periode\" => $_SESSION['periode']));\n\t\tif($this->db->query()){\n\t\t\t$this->reduction = $this->db->fetchAll(\"assoc\");\n\t\t}else\n\t\t\tdie($this->db->getLog(\"error\"));\n\t}", "title": "" }, { "docid": "dd82a151022f79620e7eed354104cf39", "score": "0.588617", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM master_guru WHERE id_guru = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "9ad3b2e69c26878c3a60862420649900", "score": "0.588588", "text": "private function load() {\n\t\t\ttry {\n\t\t\t\t// Get and save customer parameters to object\n\t\t\t\t$sql = \"SELECT * FROM customers WHERE customer_id = $this->id;\";\n\t\t\t\t$result = $this->db->query($sql);\n\t\t\t\tif ($result && $result->num_rows == 1) {\n\t\t\t\t\t$row = $result->fetch_assoc();\n\t\t\t\t\t$this->f_name = $row['f_name'];\n\t\t\t\t\t$this->m_name = $row['m_name'];\n\t\t\t\t\t$this->l_name = $row['l_name'];\n\t\t\t\t}\n\n\t\t\t\t// Get and save customer account list to object\n\t\t\t\t$sql = \"SELECT account_id FROM customer_account WHERE customer_id = $this->id;\";\n\t\t\t\t$result = $this->db->query($sql);\n\t\t\t\tif ($result) {\n\t\t\t\t\tunset($this->accounts);\n\t\t\t\t\t$this->accounts = array();\n\t\t\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t\t\tarray_push($this->accounts, $row['account_id']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"There was an error loading the customer: \".$e->getMessage();\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "73580e15fcf4a9dc6f67c3d9f01e6a34", "score": "0.5883195", "text": "public function load()\n {\n $this->data = $this->pdc->executeRequest(\"notes/{$this->note_id}/comments/{$this->id}\", 'get');\n }", "title": "" }, { "docid": "c868535ee59e740c8b4ae84d44dd3bfa", "score": "0.58790106", "text": "public function load($id){\n\t\treturn parent::loadBase($id,$this->table);\n\t}", "title": "" }, { "docid": "5814396d0defce2a4e15a29b4bfe4e82", "score": "0.5878743", "text": "abstract public function load($id);", "title": "" }, { "docid": "221079357d3259c151b50e5010a63479", "score": "0.58707184", "text": "abstract public function load();", "title": "" }, { "docid": "d248f1584be0e4bbe1ea55d490a6069e", "score": "0.5867725", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM cbt_nilai WHERE id_nilai = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->set($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "d1f043a1eb2983e0ea08a24d71bf1d4e", "score": "0.5867067", "text": "function get_alldata() {\n try {\n $this->alldata=$this->conn->query('SELECT id, firstname, lastname, linkedin, email, preferredlanguage FROM student');\n } catch (PDOException $e)\n {\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n }", "title": "" }, { "docid": "b5d15553eea183bac5fee386a501749d", "score": "0.58637685", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM rapor_nilai_harian WHERE id_nilai_harian = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->set($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "84ef5a86060b9b51b2c1c95b557595ce", "score": "0.5857487", "text": "public function retrievesData();", "title": "" }, { "docid": "228a19a91d7750b00969e6a2c8bf96b9", "score": "0.58573854", "text": "abstract protected function loadData($path);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.58522385", "text": "public function load($id);", "title": "" } ]
49ab159c479c2e6c46b6c72561dbe36d
creates a key for a specific feed url (used for creating friendly file names)
[ { "docid": "9bb2aa209b9f348d1b6afd24816010c1", "score": "0.8277597", "text": "private function __create_feed_key($url) { \n\t\treturn preg_replace('/[^a-zA-Z0-9\\.]/', '_', $url) . 'cache';\n\t}", "title": "" } ]
[ { "docid": "3a02bc7f36b21e28aa26ea79d45c9f75", "score": "0.6526553", "text": "private function generateKey($url) {\n return $this->config['key_prefix'] . ':' . md5($url);\n }", "title": "" }, { "docid": "9a64a3c7c37c70b06dd3a3efc712e617", "score": "0.6352875", "text": "protected function generateUniqueKey($url) {\n return base64_encode($url . mt_rand(55, 5555));\n }", "title": "" }, { "docid": "f647bfbf150cff903270ce54d7e02bc5", "score": "0.62536293", "text": "abstract public function getUriKey(): string;", "title": "" }, { "docid": "cf768a3e50cdcc7237a4c7183dc4fcee", "score": "0.6221128", "text": "public static function createKey($url, $key_gen)\n\t{\n\t /* Generate Script identification string */\n\t\t\n\t\t// call user-defined function\n\t\tif(is_callable($key_gen)) {\n\t\t\treturn md5($key_gen($url));\n\t\t}\n\t\t\n $flags = $key_gen;\n \n\t\t$url = parse_url($url);\n\t\t\n\t\t$key = '';\n\t\t\n\t\t// check DOMAIN flag\n\t\tif((USE_DOMAIN & $flags) == USE_DOMAIN)\n\t\t{\n\t\t\t$key .= $url['host'];\n\t\t}\n \n // check PATH flag\n\t\tif((USE_PATH & $flags) == USE_PATH)\n\t\t{\n\t\t\t$key .= $url['path'];\n\t\t}\n\t\t\n\t\t// check GETVARS flag\n\t\tif((USE_GETVARS & $flags) == USE_GETVARS)\n\t\t{\n\t\t\t$key .= '?';\n\t\t\t$key .= (isset($url['query'])) ? $url['query'] : '';\n\t\t}\n\t\t\n\t\t// check SCHEME flag\n\t\tif((USE_SCHEME & $flags) == USE_SCHEME)\n\t\t{\n\t\t\t$key = $url['scheme'].'://'.$key;\n\t\t}\n\t\t\n\t\treturn md5($key);\n\t}", "title": "" }, { "docid": "109d742954297bf3fb6a3f54ea5442e2", "score": "0.6153601", "text": "private function get_key( $url ) {\n\t\treturn apply_filters( 'redirection_cache_key', md5( $url ) . '-' . (string) $this->key . '-' . REDIRECTION_VERSION );\n\t}", "title": "" }, { "docid": "a4fd8f1ffade837ba8780a7ea35defde", "score": "0.6096434", "text": "public function create_cache_key(Request $request)\n\t{\n\t\treturn sha1($request->url());\n\t}", "title": "" }, { "docid": "743aebc3ff3ab7e728baa1e6e7612549", "score": "0.59951335", "text": "function generate_key($ref, $search, $categoryid, $parentid, $type, $isprivate, $order , $summary, $pagenumber, $pagesize)\n\t{\n\t\t$key = $ref . \"\" . $search . \"\" . $categoryid . \"\" . $parentid . \"\" . $type . \"\" . $isprivate;\n\t\tif($order != \"\")\n\t\t\t$key .= $order;\n\t\tif($pagenumber > 0)\n\t\t $key .= $pagenumber;\n\t\t$key .= $summary;\n\t\tif($pagesize > 0)\n\t\t $key .= $pagesize;\n\t\t\n\t\t$key = preg_replace('/[^\\w\\._]+/', '_', $key); // remove illigal characters\n\t return $key;\n\t}", "title": "" }, { "docid": "4d86a1b422e8cc631deb6a786cfc2987", "score": "0.5994207", "text": "public function create_cache_key($uri)\n\t{\n\t\treturn $this->cache_key_prefix.$uri;\n\t}", "title": "" }, { "docid": "ee24594eaf88f7692a3b5a2929091ade", "score": "0.5954623", "text": "public function urlKey(string $value): string\n {\n // Step 1\n $key = $this->generateSimpleString($value);\n\n // Step 2\n // If step 1 fail (the string is used or cannot be used), then the generator\n // must generate a unique random string until it finds a string that can\n // be used as a key\n if ($this->assertStringCanBeUsedAsKey($key) == false) {\n $key = $this->generateRandomString();\n }\n\n return $key;\n }", "title": "" }, { "docid": "489a0dc04704600333c03996c1f055de", "score": "0.589941", "text": "public function set_feedkey($feedkey) {\n $this -> feedkey = $feedkey;\n }", "title": "" }, { "docid": "8f11eada6397154a1985158d62abb69a", "score": "0.5758253", "text": "public static function createKey($key) {\n if (is_array($key)) $key = serialize($key);\n return md5(Cot::$cfg['site_id'].$key);\n }", "title": "" }, { "docid": "856ac215c08ed72737af7f54b329a992", "score": "0.5746799", "text": "protected function generateKey()\n {\n if (!$this->key) {\n $hmac = hash_hmac('md5', $this->url, Config::get('app.key'));\n $this->key = substr($hmac, 0, 16);\n }\n }", "title": "" }, { "docid": "ccbecacf02186bc2ad56b2ac38c6a7ad", "score": "0.57405496", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "aba0cd7bb51ad8b6f98705484db0c057", "score": "0.56218225", "text": "private function createTransientKey($requestUrl, $requestArgs)\n {\n return \"curator_\" . md5(serialize($requestUrl) . serialize($requestArgs));\n }", "title": "" }, { "docid": "23e72f72ac7732960240051d7d5b0e19", "score": "0.5591139", "text": "public function setURLKey($url_key)\n\t{\t\t$this->_url_key = (string) $url_key;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8224db1befd552f564ba5c3f4589cb24", "score": "0.55402786", "text": "public function createKey()\n {\n return 'wgt-'.rand();\n }", "title": "" }, { "docid": "c75553adc1d857f80730d08f4efd2330", "score": "0.5420962", "text": "public function generateUrlName() {\n $url_name = $this->name;\n\n // replace all the non-alphanumeric characters\n $url_name = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $url_name);\n // replace the space with underscore\n $url_name = str_replace(' ', '_', $url_name);\n\n // in order to prevent using same name, add user id at last.\n $this->url_name = $url_name . $this->id;\n\n $this->save();\n }", "title": "" }, { "docid": "61d59f969e0f981acabebc920d0b4566", "score": "0.54096293", "text": "public function getFileUrl($key);", "title": "" }, { "docid": "a692516be284ed98782b23a1be0ce156", "score": "0.53985083", "text": "public function get_unique_request_key() {\n\t\t\treturn md5( $this->args['url'] . wp_json_encode( $this->args['query_args'] ) );\n\t\t}", "title": "" }, { "docid": "3a9ed95efab1fb72ded867bd0fcc6638", "score": "0.5375566", "text": "public function generateTinyurlKeyForUid(int $uid): string\n {\n return $this->urlKeyGenerator->generateTinyurlKeyForUid($uid);\n }", "title": "" }, { "docid": "7747b7b205b492aed0b2fe25e32323a0", "score": "0.5360824", "text": "protected function makeCacheKey(?Period $period = null, bool $unique = false, ?string $collection = null): string\n {\n return CacheKey::fromViewable($this->viewable)->make($period, $unique, $collection);\n }", "title": "" }, { "docid": "1170fc0b56169031f24c9551fdb3ec52", "score": "0.53473204", "text": "private static function getCacheKey(): string\n {\n return 'action:uri:' . Envi::getUri();\n }", "title": "" }, { "docid": "58cf4da6760fbab2531d3710acbd8482", "score": "0.53405464", "text": "public function generateKey()\n {\n // Generate a unique item key based on the current ID and customisations\n $key = base64_encode(\n json_encode(\n $this->Customisations()->map(\"Title\", \"Value\")->toArray()\n )\n );\n return $this->StockID . ':' . $key;\n }", "title": "" }, { "docid": "94bfa55e772e59c189f69ea0582c52c9", "score": "0.53268546", "text": "static public function get_cache_key( $url = '' ) {\n\t\t$parse = wp_parse_url( $url );\n\t\tif ( empty( $parse['path'] ) ) {\n\t\t\t$parse['path'] = '';\n\t\t}\n\t\t$prefix = apply_filters( 'redis_cache_purge/cache_prefix', REDIS_CACHE_PURGE_PREFIX );\n\t\t$cache_key = $prefix . $parse['scheme'] . 'GET' . $parse['host'] . $parse['path'];\n\t\treturn apply_filters( 'redis_cache_purge/cache_key', $cache_key, $url, $prefix );\n\t}", "title": "" }, { "docid": "28c5c966d7aac264bee9f24d368b062c", "score": "0.5305847", "text": "public function generate_key();", "title": "" }, { "docid": "76aa8703c2e266363f983867aa74cab1", "score": "0.5280679", "text": "private function createApiKey()\n {\n return strtr(rtrim(base64_encode(random_bytes(self::UUID_BYTES)), '='), '+/', '-_');\n }", "title": "" }, { "docid": "3a5a07c9fe76653f344800d5c54fe147", "score": "0.52711076", "text": "public function cacheKey();", "title": "" }, { "docid": "f33dd0c2b3e6bbe1b6302d3287fe9215", "score": "0.52557904", "text": "public abstract function create_key(string $seed = null): string;", "title": "" }, { "docid": "4f667db273bbf2e8602971270958cf2d", "score": "0.5247072", "text": "function get_feed_url(){\n $product = $this->options['brafton_domain'];\n $key = $this->options['brafton_api_key'];\n $feed_url = \"http://\" . $product . $key . '/news';\n return $feed_url;\n }", "title": "" }, { "docid": "7d35b4475b167995cb2fee613995b59f", "score": "0.52318", "text": "public function build_key( $key, $group = 'default' ) {\r\n\t\tif ( empty( $group ) ) {\r\n\t\t\t$group = 'default';\r\n\t\t}\r\n\r\n\t\t$salt = defined( 'WP_CACHE_KEY_SALT' ) ? trim( WP_CACHE_KEY_SALT ) : '';\r\n\t\t$prefix = in_array( $group, $this->global_groups ) ? $this->global_prefix : $this->blog_prefix;\r\n\r\n\t\t$key = str_replace( ':', '-', $key );\r\n\t\t$group = str_replace( ':', '-', $group );\r\n\r\n\t\t$prefix = trim( $prefix, '_-:$' );\r\n\r\n\t\treturn \"{$salt}{$prefix}:{$group}:{$key}\";\r\n\t}", "title": "" }, { "docid": "13e91a3ecf33bdd874ba22184b8f7358", "score": "0.5211223", "text": "private function createURL() {\n $this->cache_url = $this->url . \":\" . $this->port .\"/fedora\";\n }", "title": "" }, { "docid": "32bff7c36e13920ff72907b82c455b45", "score": "0.51934975", "text": "function get_syndication_feed_byurl() {\n global $base_url;\n $url = $base_url.'/'.arg(0).'/'.arg(1).'/'. arg(2);\n \n $itg_query = db_select('itg_syndication_feed_url', 'feed');\n $itg_query->fields('feed', array('xml_name'));\n $itg_query->fields('feed', array('created_date'));\n $itg_query->condition('feed.client_feed_url', $url);\n $itg_result = $itg_query->execute()->fetchAll();\n \n if (!empty($itg_result)) {\n foreach ($itg_result as $itg_val) { \n $realpath = file_create_url($itg_val->xml_name); \n $xml_date = date('d/m/Y',$itg_val->created_date);\n // $file_url = $itg_val->xml_name;\n echo 'Click to Download. <a href=\"'.$realpath.'\" download>'.$xml_date.'</a>';\n echo '</br>'; \n }\n }\n exit;\n \n}", "title": "" }, { "docid": "9c52d845383e91ad7656ae8acfc4b532", "score": "0.5188252", "text": "private function genrateUrlToken()\n {\n do {\n $random = bin2hex(random_bytes(10));\n if (strlen($random) > 7) {\n $url = substr($random, 0, 7);\n }\n $respository = $this->em->getRepository(ShortUrl::class);\n $urlInDatabase = $respository->findOneBy([\n 'url_token' => $url,\n ]);\n\n } while ($urlInDatabase);\n\n return $url;\n }", "title": "" }, { "docid": "cb3b8c7303e4c09baafbdb56adb23433", "score": "0.51865315", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->hgallery_id->CurrentValue)) {\n\t\t\t$sUrl .= \"hgallery_id=\" . urlencode($this->hgallery_id->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\tif (!is_null($this->hotel_id->CurrentValue)) {\n\t\t\t$sUrl .= \"&hotel_id=\" . urlencode($this->hotel_id->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "02c91ee843951a41dc800c9d04650c70", "score": "0.5174047", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->user_id->CurrentValue)) {\n\t\t\t$sUrl .= \"user_id=\" . urlencode($this->user_id->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "0f400e351d5b0d45c8f9b8a706912e16", "score": "0.5173805", "text": "public function getIdByKey($key)\n {\n \n return 'wgt-listing-'.$key.($this->refId ? '-'.$this->refId : '');\n\n }", "title": "" }, { "docid": "53d4bef80d05d770ab12e7695ffce4ab", "score": "0.5135512", "text": "public function formatUrlKey($string)\n {\n return $this->filter->translitUrl($string);\n }", "title": "" }, { "docid": "1fcadb41b08c1d679e7f661a7543d700", "score": "0.5131416", "text": "function generate_short_url($url){\r\n $apiKey = 'AIzaSyClrs5lAdHpC9c0CTH06rRSCfcE4opBumI';\r\n\r\n $postData = array('longUrl' => $url);\r\n $jsonData = json_encode($postData);\r\n\r\n $curlObj = curl_init();\r\n\r\n curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url?key='.$apiKey);\r\n curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);\r\n curl_setopt($curlObj, CURLOPT_HEADER, 0);\r\n curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));\r\n curl_setopt($curlObj, CURLOPT_POST, 1);\r\n curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);\r\n\r\n $response = curl_exec($curlObj);\r\n\r\n // Change the response json string to object\r\n $json = json_decode($response);\r\n\r\n curl_close($curlObj);\r\n\r\n return $json->id;\r\n\r\n }", "title": "" }, { "docid": "9b0bfae39156e6a54d66a1a347516417", "score": "0.51259464", "text": "function createurl($title){\n\t$url=str_replace(' ','-',$title);\n\t$utfchars=array(hex2asc(\"C484\"),hex2asc(\"C485\"),hex2asc(\"C486\"),hex2asc(\"C487\"),hex2asc(\"C498\"),hex2asc(\"C499\"),hex2asc(\"C581\"),hex2asc(\"C582\"),hex2asc(\"C583\"),hex2asc(\"C584\"),hex2asc(\"C393\"),hex2asc(\"C3B3\"),hex2asc(\"C59A\"),hex2asc(\"C59B\"),hex2asc(\"C5BB\"),hex2asc(\"C5BC\"),hex2asc(\"C5B9\"),hex2asc(\"C5BA\"));\n\t$normchars=array('a','a','c','c','e','e','l','l','n','n','o','o','s','s','z','z','z','z');\n\t$url=str_replace($utfchars,$normchars,$url);//usuwa ogonki\n\t$url=strtolower(preg_replace('|[^a-z0-9-_.;,\\s]|i','',$url));//usuwa niestandardowe znaki i zmienia na male litery\n\treturn str_replace(' ', \"_\", $url); \n}", "title": "" }, { "docid": "79ab8cf577d40e199648e77fe1d21c1d", "score": "0.5110198", "text": "public function createKey($key)\n {\n return $this->cache->getItem($key);\n }", "title": "" }, { "docid": "23de666c4f36fa3833e1af92e23198ff", "score": "0.51037157", "text": "public function uriKey(): string\n {\n return 'links-per-month';\n }", "title": "" }, { "docid": "694b3177d114f9b8e8d748ff12e321fb", "score": "0.50912374", "text": "protected function generateEntryKey($token, $event, $date)\n {\n return\n $this->normalizeForKey($token) .\n '.' .\n $this->normalizeForKey($event) .\n '.' .\n $this->normalizeForKey($date);\n }", "title": "" }, { "docid": "ef791c0214e1df48e699bdde1e17bc46", "score": "0.5075205", "text": "function createFeed() {\r\n\t}", "title": "" }, { "docid": "868a630801cd0ece02b249c8afaaecce", "score": "0.5073049", "text": "public static function key_from_id($id)\n{\n\t$k='';while($id>64){$k=self::$base[fmod($id,65)].$k;$id=floor($id/65);}return self::$base{$id}.$k;\n}\n\n\n/**\n * Convert a base 65 encoded key to a numeric ID (Reverse URL shortening)\n * \n * @param string $key\n * @return integer\n */\npublic static function id_from_key($key)\n{\n\t$id=0;$key=str_split($key);$c=count($key);foreach($key as$k=>$v)$id+=pow(65,($c-$k-1))*strpos(self::$base,$v);return$id;\n}\n\n}", "title": "" }, { "docid": "6f79f73e052aeeae0a5ed9196b422ff8", "score": "0.5068843", "text": "private function makeKey($key = null)\n {\n if (is_null($key)) {\n throw new Exception('');\n }\n return $this->keyPrefix . $key . date('Y-m-d');\n }", "title": "" }, { "docid": "cf16c8125dbbb26d309bdeb0e121c773", "score": "0.5066974", "text": "public function linkDataCacheKey()\n {\n return 'link_data.'.$this->id;\n }", "title": "" }, { "docid": "61ad8bea4d503ec7b2676f5f9b012372", "score": "0.50644547", "text": "private function get_feed_contents_cache_key( $cpt_id, $institution ) {\n\t\treturn 'user-interest-feeds-' . $cpt_id . '-' . hash( 'sha256', $institution );\n\t}", "title": "" }, { "docid": "2aa83d94dc88b84d1f98be054ef74542", "score": "0.5059275", "text": "private function generateApiKey(){\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "eb92b363820e3257a220bc4aa95e6100", "score": "0.5049419", "text": "function __construct($feedurl){\r\n $this->feed=$feedurl;\r\n \r\n }", "title": "" }, { "docid": "d265c18c4a0003a1d2a2025210e88402", "score": "0.50464296", "text": "private function generateApiKey() {\n\t\treturn md5(uniqid(rand(), true));\n\t}", "title": "" }, { "docid": "d8632975509784808f30d56ee03fb4fe", "score": "0.5045842", "text": "function make_url(string $title): string\n {\n return preg_replace('/[^a-z0-9]+/i', '_', $title);\n }", "title": "" }, { "docid": "acbf0ad29566be72b99ee70c815057c8", "score": "0.50429374", "text": "function createKey($keyLen) {\n $randpwd = \"\";\n for ($i = 0; $i < $keyLen; $i++) {\n $randpwd .= chr(mt_rand(33, 126));\n }\n return $randpwd;\n \n //从配置问价读取\n// $config = new Zend_Config_Ini('../application/configs/key.ini', 'staging');\n// $key = $config->ssn->key;\n// return $key;\n \n}", "title": "" }, { "docid": "d6c0ecd84b42b9db77ac6b5854c3d968", "score": "0.50343883", "text": "private static function _makeKey($keyType, $key, $statistic, $system = null)\n\t{\n\t\tif (is_null($system)) {\n\t\t\t$system = self::$_options['system'];\n\t\t}\n\n\t\treturn 'stats:' . $system . ':' . $keyType . ':' . $key . ':' . $statistic;\n\t}", "title": "" }, { "docid": "435051510e90a1fdc7b73227f84c0e38", "score": "0.50304884", "text": "function buildCacheKey($method, $resource, $url, $headers = array(), $query = array()) {\n return md5($method . $resource . $url . json_encode($query) . json_encode($headers));\n }", "title": "" }, { "docid": "ec053b548506ab821e9e431de6cfcc01", "score": "0.502968", "text": "function cache_filename( $url ){\n\t\treturn dirname(__FILE__) . $this->cache . md5( $url ) . '.txt';\n\t}", "title": "" }, { "docid": "94e9664d123b0620675e5919e9b97405", "score": "0.50247014", "text": "function GenerateURLName($title)\n{\n $name = (string) $title;\n \n $name = str_replace(array('?', '#', '&', \"'\", '\"'), '', $name);\n $name = str_replace('.', '-', $name);\n $name = str_replace(':', ' -', $name);\n $name = str_replace(' ', '_', $name);\n \n return $name;\n}", "title": "" }, { "docid": "db85a50ade130b55d215727f96106d9a", "score": "0.50219727", "text": "public static function createKey($name) {\n return substr(preg_replace('#[^a-z0-9\\_]#i', '_', strtolower(self::KEY_PREFIX . $name)), 0, 64);\n }", "title": "" }, { "docid": "db85a50ade130b55d215727f96106d9a", "score": "0.50219727", "text": "public static function createKey($name) {\n return substr(preg_replace('#[^a-z0-9\\_]#i', '_', strtolower(self::KEY_PREFIX . $name)), 0, 64);\n }", "title": "" }, { "docid": "de30209168194cfdeb59592ad7564b4e", "score": "0.5018837", "text": "function KeyUrl($url, $parm = \"\") {\r\n\t\t$sUrl = $url . \"?\";\r\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\r\n\t\tif (!is_null($this->numero->CurrentValue)) {\r\n\t\t\t$sUrl .= \"numero=\" . urlencode($this->numero->CurrentValue);\r\n\t\t} else {\r\n\t\t\treturn \"javascript:alert(ewLanguage.Phrase('InvalidRecord'));\";\r\n\t\t}\r\n\t\treturn $sUrl;\r\n\t}", "title": "" }, { "docid": "dbb02a73c051ceda679fdb21227492cb", "score": "0.5016654", "text": "function generateApiKey() {\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "31dce0e00980a8507ea80a32914da45f", "score": "0.501605", "text": "private function generateApiKey() {\r\n\t\treturn md5 ( uniqid ( rand (), true ) );\r\n\t}", "title": "" }, { "docid": "9a9ed90daf77ad640070aedb56b61679", "score": "0.5013363", "text": "public function feedUrl(): string;", "title": "" }, { "docid": "f5ebb7904e719defea324ddbebcd8341", "score": "0.5010216", "text": "function KeyUrl($url, $parm = \"\") {\n\t\t$sUrl = $url . \"?\";\n\t\tif ($parm <> \"\") $sUrl .= $parm . \"&\";\n\t\tif (!is_null($this->id_admission->CurrentValue)) {\n\t\t\t$sUrl .= \"id_admission=\" . urlencode($this->id_admission->CurrentValue);\n\t\t} else {\n\t\t\treturn \"javascript:ew_Alert(ewLanguage.Phrase('InvalidRecord'));\";\n\t\t}\n\t\treturn $sUrl;\n\t}", "title": "" }, { "docid": "698009ce8f160a675b8fefab9898ed04", "score": "0.5008954", "text": "public function buildPhotoFeedUrl($feed = 'atom') {\n return \"http://flickr.com/groups/{$this->getId()}/pool/feed?format={$feed}\";\n }", "title": "" }, { "docid": "b6249837cf249216f89ddd005cd6bef3", "score": "0.5000728", "text": "public function uriKey()\n {\n return 'category-published';\n }", "title": "" }, { "docid": "76adc306c5cc7e44eaf87bccff31d000", "score": "0.49985218", "text": "function generate_key() {\n\t\t$keyset = 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/';\n\t\t$key = '';\n\t\tfor ( $i = 0; $i < 32; $i++ ) {\n\t\t\t$key .= substr( $keyset, rand( 0, strlen( $keyset ) -1 ), 1 );\n\t\t}\n\t\treturn $key;\n\t}", "title": "" }, { "docid": "96a81aadfd77bab168094a5eda691d9a", "score": "0.4998248", "text": "public static function formatUrlKey($str)\n {\n $str = Mage::helper('core')->removeAccents($str);\n $urlKey = preg_replace('#[^0-9a-z]+#i', '-', $str);\n $urlKey = strtolower($urlKey);\n $urlKey = trim($urlKey, '-');\n return $urlKey;\n }", "title": "" }, { "docid": "7ece2ede8bd48c4e286eeb72bbf50564", "score": "0.49919462", "text": "public static function key(): string;", "title": "" }, { "docid": "35866efb5f50dfe600dc8a34abe75b7c", "score": "0.49906555", "text": "public function __construct($feedUrl, $appId, $appKey)\n {\n $this->feedUrl = $feedUrl;\n $this->appId = $appId;\n $this->appKey = $appKey;\n }", "title": "" }, { "docid": "b01977c24fd8fa0a73e178c9d1844105", "score": "0.49808484", "text": "private static function createKeyUriImpl(\n string $key,\n string $accountName,\n string $issuer\n ): string {\n $params = ['secret' => $key];\n if (strlen((string)$issuer) > 0) {\n $params['issuer'] = $issuer;\n }\n\n return sprintf(\n 'otpauth://totp/%s?%s',\n rawurlencode(\n strlen((string)$issuer) < 1\n ? $accountName\n : sprintf('%s:%s', $issuer, $accountName)\n ),\n http_build_query($params, '', '&', PHP_QUERY_RFC3986)\n );\n }", "title": "" }, { "docid": "10432fc30db487ce68f82f93bf9b94d1", "score": "0.49807125", "text": "protected function makeConfigKey(string $key): string\n {\n return \"{$this->configFileName}.{$key}\";\n }", "title": "" }, { "docid": "a26728a16ecbdb00dbec958f2b2bbc21", "score": "0.49742317", "text": "private function generateApiKey() {\r\n return md5(uniqid(rand(), true));\r\n }", "title": "" }, { "docid": "fb42db746f7dbeffcf7c62b138a4f2ca", "score": "0.49738827", "text": "protected function generateKey($reference)/*# : string */\n {\n if (is_array($reference)) {\n $reference = $this->flatReference($reference);\n }\n $md5 = md5(serialize($reference));\n return sprintf(\"/%s/%s/%s\", $md5[0], $md5[1], $md5);\n }", "title": "" }, { "docid": "1313fd52dfe3a3fcc711927d21b00af4", "score": "0.497118", "text": "function theme_kml_feed_icon($url, $title, $icon) {\n if ($image = theme('image', $icon, t('Download KML Feed'), $title)) {\n return '<a href=\"'. check_url($url) \n .'\" class=\"feed-icon\">'. $image .'</a>';\n }\n}", "title": "" }, { "docid": "b7ca99a8200c9480db1c146d4eb66a66", "score": "0.49709758", "text": "public function genCacheKey()\n {\n return 'arch.input.'.md5($this->action.$this->query);\n }", "title": "" }, { "docid": "2c0e64868572af7e9cb39e1a93ef297d", "score": "0.49692413", "text": "public function _out_key($pretty=false,$url=false) {\n if($pretty){\n $out = str_replace(CM_KEYMARKER,\"»\",$this->_key);\n if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc.\n if ($out == 'start') //one exception\n return '<a href=\"http://www.dokuwiki.org/config:startpage\">'.$out.'</a>';\n else\n return '<a href=\"http://www.dokuwiki.org/config:'.$out.'\">'.$out.'</a>';\n }\n return $out;\n }else{\n return str_replace(CM_KEYMARKER,\"']['\",$this->_key);\n }\n }", "title": "" }, { "docid": "73ef641ffe588416f08c1cb7864c288d", "score": "0.49686012", "text": "function createRewriteRules() {\n\tglobal $wp_rewrite;\n \n\t// add rewrite tokens\n\t$keytag = '%feed%';\n\t$wp_rewrite->add_rewrite_tag($keytag, '(.+?)', 'feed='.$wp_rewrite->preg_index(1));\n \n\t$keywords_structure = $wp_rewrite->root . \"feed/$keytag/\";\n\t$keywords_rewrite = $wp_rewrite->generate_rewrite_rules($keywords_structure);\n \n\t$wp_rewrite->rules = $keywords_rewrite + $wp_rewrite->rules;\n}", "title": "" }, { "docid": "0abe6ea4bff62456915b24de4084a4a2", "score": "0.496151", "text": "public function getUrl($key) {\n\t\t\n\t\t$url = $this->getUrlBase() . $key;\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.49495783", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.49495783", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.49495783", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "7312ae33b0971b05469d9cd41f1afccc", "score": "0.49495783", "text": "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "5f28ee2ebb639f3b8fa3e272bae5c6ff", "score": "0.4949509", "text": "public function uriKey(): string\n {\n return 'demographics';\n }", "title": "" }, { "docid": "9e68aae390305965b4927d05a21f62a4", "score": "0.49470496", "text": "function itg_syndication_web_url_syndication($data, $file_path, $delivery_mode) {\n if (!empty($file_path)) {\n $query = db_insert('itg_syndication_feed_url');\n $query->fields(array(\n 'xml_name' => $file_path,\n 'client_feed_url' => $delivery_mode, \n 'created_date' => time(),\n 'status' => 1\n )); \n $query->execute();\n }\n}", "title": "" }, { "docid": "f16b09a3cffeca9823b68b0204203923", "score": "0.49303016", "text": "public static function generateCacheKey($key_data, $group=null) {\n\t\treturn new FileSystemCacheKey($key_data,$group);\n\t}", "title": "" }, { "docid": "a023fd6bef3f8980266c04816d1bfcb7", "score": "0.4927274", "text": "protected function generateKey($value) {\n if (array_key_exists('kind', $value) && array_key_exists('name', $value)) {\n return $value['name'] . ':' . $value['kind'];\n }\n if (array_key_exists('name', $value)) {\n return $value['name'];\n }\n return md5(serialize($value));\n }", "title": "" }, { "docid": "a1253defa92021ae736d2f8596195712", "score": "0.49264035", "text": "public function buildKey() {\n $seed = $this->getValidDate();\n return sha1( $seed.$this->ptpauth->getKey(), false );\n }", "title": "" }, { "docid": "3f2f0cc839f48b6c87877bfd00658003", "score": "0.49054614", "text": "public function key()\n {\n return $this->hasOne(Keys::class, 'url_id', 'id');\n }", "title": "" }, { "docid": "5362b42f5c9e9c0c4d886847145abf3d", "score": "0.49044445", "text": "protected function setCacheKey()\n {\n $key = md5(\n 'Molajito-TemplateView-' . serialize($this->parameters->token)\n );\n\n return $key;\n }", "title": "" }, { "docid": "035d5dcebb2723b4a57d243e79c587d4", "score": "0.4888524", "text": "public function generateCacheKey()\n {\n return parent::generateCacheKey();\n }", "title": "" }, { "docid": "cfee2cfc0c7cd86d3645fba52ee62c39", "score": "0.48813716", "text": "public static /*.string.*/ function makeUniqueKey(/*.string.*/ $id) {\n\t\treturn hash(self::HASH_FUNCTION, $_SERVER['REQUEST_TIME'] . $id);\n\t}", "title": "" }, { "docid": "67ff0c50ec77d78d4063ac8b8c8169d0", "score": "0.48772487", "text": "public function newEntry($title, $entry)\n {\n// \t$this->renameOld();\n global $longURL;\n $tStamp = time();\n $path = $longURL . \"entries/\" . $tStamp;\n mkdir($path);\n //file_put_contents($path . \"/\" . $tStamp . \".txt\" , $tStamp); \n file_put_contents($path . \"/\" . \"blog.txt\" , $title .\"\\n\" . $entry); \n }", "title": "" }, { "docid": "61046c96fedd584710feffdc84770385", "score": "0.4870973", "text": "private static function key($type, $value)\n {\n return self::PREFIX . $type . '_' . md5($value);\n }", "title": "" }, { "docid": "1cf4c73844885b770c1af05235889ed8", "score": "0.48705378", "text": "public function buildDiscussFeedUrl($feed = 'atom') {\n return \"http://flickr.com/groups_feed.gne?id={$this->getId()}&format={$feed}\";\n }", "title": "" }, { "docid": "6d364fd827ef79e9a542c0cb92999cd4", "score": "0.4866356", "text": "abstract protected function buildUrl();", "title": "" }, { "docid": "75e2dbeb19993203d81e9f62913bfda1", "score": "0.48637658", "text": "public function getCacheKeyPart();", "title": "" }, { "docid": "b46cf58a6527111abd74d1befafe0f5a", "score": "0.4859861", "text": "protected function getCacheKey(): string\n {\n $tagKeys = '';\n foreach ($this->tags as $tag => $data) {\n $tagKeys .= \"$tag.$data\";\n }\n\n $key = implode(':', [\n $this->request->getHost(),\n trim($this->request->getPathInfo(), '/'),\n $tagKeys,\n ]);\n\n return config('rache.prefix') . '-' . hash('sha256', $key);\n }", "title": "" }, { "docid": "b6cba215f20347358320e277ec61ba48", "score": "0.48570773", "text": "public function generateRandomString()\n {\n $factory = new \\RandomLib\\Factory;\n $generator = $factory->getMediumStrengthGenerator();\n\n $characters = config('urlhub.hash_char');\n $length = config('urlhub.hash_length');\n\n do {\n $urlKey = $generator->generateString($length, $characters);\n } while ($this->assertStringCanBeUsedAsKey($urlKey) == false);\n\n return $urlKey;\n }", "title": "" }, { "docid": "2e1cbfe53192a5fe2f5a1beaabcad29b", "score": "0.48570612", "text": "public function uriKey()\n {\n return 'most-valuable-shops';\n }", "title": "" }, { "docid": "9cc2e008aa13e29ffa17a79e865e96bc", "score": "0.48567876", "text": "static function generate_key()\n {\n $time = microtime(TRUE);\n $random = mt_rand(10000000, 99999999);\n $local = gethostname();\n $combo = uniqid($time . $random . $local, TRUE);\n return sha1($combo);\n }", "title": "" } ]
a86f81196c75434eb84c13831586cf57
call the specified assertion
[ { "docid": "86b23a52c7c9e9bb34fcac6ea5b87bda", "score": "0.5780689", "text": "public static function callAssert( $editPage, $assertName, $negate ) {\n\t\t// unrecognized assert fails, regardless of negation.\n\t\t$pass = false;\n\t\tif ( isset( self::$msAssert[$assertName] ) ) {\n\t\t\tif ( is_bool( self::$msAssert[$assertName] ) ) {\n\t\t\t\t$pass = self::$msAssert[$assertName];\n\t\t\t} elseif ( is_callable( self::$msAssert[$assertName] ) ) {\n\t\t\t\t$pass = call_user_func( self::$msAssert[$assertName], $editPage );\n\t\t\t}\n\n\t\t\tif ( $negate && isset( $pass ) ) {\n\t\t\t\t$pass = !$pass;\n\t\t\t}\n\t\t}\n\t\treturn $pass;\n\t}", "title": "" } ]
[ { "docid": "34c7a6078b0cf6d68db9f3e8dba71942", "score": "0.7251198", "text": "public function assert();", "title": "" }, { "docid": "1d664768ddf9c1d5b2ccc550dbf15685", "score": "0.7079843", "text": "function test ($assertion, $message = null)\n{\n echo (@assert($assertion) ? 'pass ' : 'fail ') . $message . \"\\n\";\n}", "title": "" }, { "docid": "b08d49fdcba69457e055531922fa9f36", "score": "0.69663006", "text": "function assert(/*. mixed .*/ $assertion, /*. Throwable .*/ $exception = NULL){}", "title": "" }, { "docid": "2237694f79d1ec8a568cf252fe0b2fc8", "score": "0.69152796", "text": "function pnAssert($assertion, $file='Unknown', $line='Unknown', $msg='')\r\n{\r\n if ($assertion) {\r\n return;\r\n }\r\n\r\n // Assertion failed - log it\r\n if (!empty($msg)) {\r\n die(\"Assertion failed in $file at line $line - $msg\");\r\n } else {\r\n die(\"Assertion failed in $file at line $line\");\r\n }\r\n}", "title": "" }, { "docid": "89b42a27af4e5ee16c17bf3579b03ac1", "score": "0.6811734", "text": "public function assert(): void;", "title": "" }, { "docid": "06fa1f43f58c57b92f595fa5b18b7bf9", "score": "0.6683323", "text": "function assert(/*. mixed .*/ $assertion, /*. string .*/ $description = NULL){}", "title": "" }, { "docid": "9a5e33ef9b28b3436606f27cc13b2604", "score": "0.63932246", "text": "public function processAssert()\n {\n // TODO mage to MAGETWO-25523\n }", "title": "" }, { "docid": "f45e8f0dd85587815284a31ca9fbb9bf", "score": "0.6228633", "text": "function my_assert_handler($file, $line, $code, $desc = null)\r\n{\r\n echo \"Assertion failed at $file:$line: $code\";\r\n if ($desc) {\r\n echo \": $desc\";\r\n }\r\n echo \"\\n\";\r\n}", "title": "" }, { "docid": "709f11bab87781f9b808da418c6074eb", "score": "0.6195452", "text": "function my_assert_handler($file, $line, $code, $desc = null)\n{\n echo \"Assertion failed at $file:$line: $code\";\n if ($desc) {\n echo \": $desc\";\n }\n echo \"\\n\"\n}", "title": "" }, { "docid": "0329d2076789e65c441c967a45339672", "score": "0.6173163", "text": "public function assertLog($assertion = true, $msg = '') {\n\t\tif($assertion == false) {\n\t\t\t$this->error($msg);\n\t\t}\n\t}", "title": "" }, { "docid": "16e8c76262c3866d9b6233e2873a2f9b", "score": "0.6103207", "text": "function assert_callback( $script, $line, $message ) {\n echo \"Assert Error : {$script} : line {$line} : {$message}\\n\";\n exit;\n}", "title": "" }, { "docid": "a44a6d3c411aa88233bfa90827d313dd", "score": "0.6059169", "text": "public function assert($assertion, ...$args)\n {\n if (method_exists(Assert::class, $assertion)) {\n try {\n Assert::$assertion(...$args);\n } catch (AssertionFailedError $e) {\n $this->formatPushSoftAssertError($e);\n }\n } else {\n throw new \\Exception(\"$assertion is not a valid assertion type!\");\n }\n }", "title": "" }, { "docid": "b5be14cac5d450b76c62323e8326484d", "score": "0.6033095", "text": "function check($value, $msg)\n{\n try {\n assert($value);\n } catch (AssertionError $e) {\n return $msg . \" test failed\\n\";\n }\n\n return $msg . \" test success\\n\";\n}", "title": "" }, { "docid": "7af6077a6b9f7f2f208dc5f801bd9194", "score": "0.6016413", "text": "function my_assert_handler($file, $line, $code, $desc = null) {\r\n\t\t echo \"PASS: Assertion stopped at line $line. As expected, error is\";\r\n\t\t if ($desc) {\r\n\t\t echo \": $desc\";\r\n\t\t \t}\r\n\t \techo \"\\n\";\r\n\t\t}", "title": "" }, { "docid": "9315b462ef804facf5e9114c9f5c2632", "score": "0.59936965", "text": "function rng_assert_handler($file, $line, $code, $desc = null){\n\t\techo \"<hr>Assertion Failed:\n\t\tFile: '$file'<br />\n\t\tLine: '$line'<br />\n\t\tCode: '$code'<br />\";\n\t\tif ($desc) {\n\t\t echo \"Msg. : '$desc'<br />\";\n\t\t} \t\t\n\t\techo \"<hr />\\n\";\n\t }", "title": "" }, { "docid": "cb01834bd0ad96d7e2c779c4168181f0", "score": "0.5900137", "text": "function my_assert_handler($file, $line, $code, $desc = null)\r\n{\r\n if ($desc)\r\n $desc = \": $desc\";\r\n WriteCallStack(\"Assertion failed at $file:$line: $code\");\r\n}", "title": "" }, { "docid": "d4e0c2672249236dd9c23c7db21d3937", "score": "0.5893194", "text": "public function thisIsATest() {\n // Pre-assertion code here.\n // Assertion code here.\n }", "title": "" }, { "docid": "5dd2497c1caf22390bed6b7fc0027ce1", "score": "0.58252466", "text": "public function pass()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "9a7d198e5b280971b5227bb358259e91", "score": "0.5786228", "text": "function testExpect() {\n\t$args = func_get_args();\n\t\\phptestr\\TestScript::tellHost(__FUNCTION__, array('Expected' => $args));\n}", "title": "" }, { "docid": "9e687f05115add0fec2a060075f8dd54", "score": "0.5753768", "text": "static private function _call($name, array $args)\n {\n if (isset(self::$_alias[$name]))\n {\n $name = self::$_alias[$name];\n }\n else\n {\n $name = 'assert' . ucfirst($name);\n }\n\n if (!method_exists(__CLASS__, $name))\n {\n throw new Exception('Unknown assert method:' . $name);\n }\n\n $class = __CLASS__;\n switch (count($args))\n {\n case 0:\n $class::$name();\n break;\n case 1:\n $class::$name($args[0]);\n break;\n case 2:\n $class::$name($args[0], $args[1]);\n break;\n case 3:\n $class::$name($args[0], $args[1], $args[2]);\n break;\n default:\n call_user_func_array(array($class, $name), $args);\n break;\n }\n }", "title": "" }, { "docid": "8ab24d62118f7e1fc4cfc061718a8a49", "score": "0.57297564", "text": "function plan() { global $__Test; $args = func_get_args(); return call_user_func_array(array($__Test,'plan'),$args); }", "title": "" }, { "docid": "49cd8908cc2e020c33c7b89432b80839", "score": "0.56175584", "text": "private function Check_assertion($assertion) {\n\t\t\t$result = $this->verifier->Verify($assertion);\n\n\t\t\tif ($result) {\n\t\t\t\t$email = $result['email'];\n\t\t\t\t// Succeeded\n\t\t\t\t// XXX can we replace this with polymorphism somehow?\n\t\t\t\tif ($this->comments->Is_comment())\n\t\t\t\t\t$this->comments->Handle_comment($email);\n\t\t\t\telse if ($this->registration->Is_registration())\n\t\t\t\t\t$this->registration->Handle_registration($email);\n\t\t\t\telse\n\t\t\t\t\t$this->login->Handle_login($email);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e299a39897f6ba7b1b6a2383c8435811", "score": "0.5592717", "text": "function my_assert_handler($file, $line, $code, $desc = null)\n{\n //echo \"Assertion failed at $file:$line: $code\";\n $string = \"Assertion failed at $file:$line: $code\";\n $log = fopen('../../logs/spelling_assertions.php.log', 'w');\n fwrite($log, $string.\"\\n\");\n if ($desc) {\n //echo \": $desc\";\n fwrite($log, $desc.\"\\n\");\n }\n echo \"\\n\";\n}", "title": "" }, { "docid": "2f9266a98c07c4c77a649e2a911bd003", "score": "0.55130625", "text": "public function testExecute() {\n // to curl easily. However, the method hardly contains any logic as all\n // of that is located in other methods.\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "55de0207554e7b7efb55808d46c86bbd", "score": "0.5503441", "text": "function assertGuest(string $guard = null)\n{\n return test()->assertGuest(...func_get_args());\n}", "title": "" }, { "docid": "88b3d5c75c21da67659593103269f71e", "score": "0.5496824", "text": "public function run()\n {\n factory(App\\Assertion::class, 50)->create();\n }", "title": "" }, { "docid": "52ba38a8741898dab21cc7cd5367c564", "score": "0.5473007", "text": "public function testExample()\n {\n //$this->assertTrue(true);\n $this->visit('/artical/create')\n ->type('Economic problem','title')\n ->type('Artical body','body')->press('add Artical')->seePageIs('/test')->see('php unit testss');\n }", "title": "" }, { "docid": "92c8e62a12e4834a6b9d9876857c88e1", "score": "0.54623395", "text": "public function test() {\n // Call the parent with whatever arguments we got\n $args = func_get_args();\n $retval = call_user_func_array(array(\"parent\", __FUNCTION__), $args);\n\n $failed = $this->test->failed;\n // Check if the failure count has increased\n if ($this->lastFailed != $failed) {\n // Check if it was the test itself that called us\n // or if it was a $this->method() call\n if (xdebug_call_file() == $this->TESTFILE) {\n $line = xdebug_call_line();\n $this->markTest($line, false);\n }\n }\n\n $this->lastFailed = $failed;\n\n return $retval;\n }", "title": "" }, { "docid": "7ab3834c59327058c7f3ddaefcec05fe", "score": "0.54297686", "text": "public function testExample()\n {\n \t$this->assertTrue(true);\n }", "title": "" }, { "docid": "5d7d13ce2bd638970cb67738b27f764f", "score": "0.54094076", "text": "public static function assert($condition, $message = null, $data=NULL, $error_number=NULL) {\n if (!$message) {\n $message =\"User error occurred\";\n }\n parent::assert($condition, $message, $data, $error_number);\n }", "title": "" }, { "docid": "333233f2fd40ae396069c6d26c390867", "score": "0.53959113", "text": "public function testExec()\n {\n $action = Action::factory('tests\\eduluz1976\\unit\\MySampleClass::test1()');\n $response = $action->exec();\n\n $this->assertEquals(date('Ymd') . '_123', $response);\n }", "title": "" }, { "docid": "0a143c776c33eb51b3198087460f5184", "score": "0.5356095", "text": "protected function markTestAsPassed()\n {\n $this->assertTrue(true, 'Test case did not throw an exception and passed.');\n }", "title": "" }, { "docid": "d4055212ab6247a208df64f793a74b60", "score": "0.5355759", "text": "public function testCall() \n\t{\t\n\t\t$this->assertTrue( CCContainer::call( 'user.valid' ) );\n\t}", "title": "" }, { "docid": "e97df27a62cd139c7453b16131b7b6af", "score": "0.5340445", "text": "public function test_is_abandon(){\n $this->assertTrue(True);\n }", "title": "" }, { "docid": "b3e06352653a3e15a8de417f2c65d0e9", "score": "0.5326247", "text": "protected function assertPostConditions() {}", "title": "" }, { "docid": "c263355f15c9c7425f3d93b000e75235", "score": "0.53199947", "text": "public function assertAll()\n {\n if (!empty($this->assertion_failed_errors)) {\n $i = 1;\n $errorsString = \"The following asserts failed:\\n\\n\";\n foreach ($this->assertion_failed_errors as $err) {\n $errorsString .= \"$i) $err\\n\\n\";\n $i++;\n }\n throw new AssertionFailedError(\"Test FAILED\\n\\n$errorsString\");\n }\n }", "title": "" }, { "docid": "b216796a9154293391ea056835b4c8fc", "score": "0.531385", "text": "public function testPlayingWithManyAssertions()\n {\n $this->assertEquals(4, (2 + 2), 'Uh oh! Someone forgot how to add.');\n\n /*\n * The $message is optional. If excluded, a sane default is used.\n * In this case: \"Failed asserting that an array contains $needle.\"\n */\n $this->assertContains(2, [1, 2, 3]);\n\n // For most \"assert<Something>\", there's also an \"assertNot<Something>\"\n $this->assertNotContains(4, [1, 2, 3]);\n\n /*\n * You can test \"Equality\" or \"Identity\" (\"==\" vs. \"===\")\n *\n * So, integer 123 is equal to string '123', but they're not *the same*.\n */\n $this->assertSame(123, 123);\n $this->assertNotSame(123, '123');\n\n // Sometimes, you don't need the $expected either.\n $this->assertTrue(true);\n $this->assertEmpty(null);\n $this->assertFileExists(__FILE__);\n\n /*\n * Using variables in your assertions can help make your tests less brittle.\n *\n * If you need to change your test data, you need only do it in one place,\n * rather than looking through your test to change it everywhere.\n */\n $person = new Person('Michael', 'Moussa');\n $this->assertSame('Michael Moussa', $person->getFullName());\n // vs\n $firstName = 'Michael';\n $lastName = 'Moussa';\n $person = new Person($firstName, $lastName);\n $this->assertSame($firstName . ' ' . $lastName, $person->getFullName());\n\n /*\n * You can \"get away\" with only ever using a single assertion (assertTrue), but using\n * all of them makes your tests more expressive, easier to read, and easier to debug.\n */\n $string = 'foobar';\n $suffix = 'bar';\n $this->assertTrue(substr($string, 0 - strlen($suffix)) === $suffix);\n // vs\n $this->assertStringEndsWith($suffix, $string);\n\n /*\n * There are MANY more assertions. Check them out!\n * http://phpunit.de/manual/current/en/appendixes.assertions.html\n */\n }", "title": "" }, { "docid": "f9ddeafe933ce076d7cd53c753e0911a", "score": "0.5310828", "text": "public function testRun_LogCall() {\n //TODO: Fix - failing on circleCI but not locally\n $this->assertEquals(1, 1);\n//\t\t$account = new Account();\n//\t\t$account->Name = 'Oracle';\n//\t\t$account->create();\n//\n//\t\t$contact = new Contact();\n//\t\t$contact->FirstName = 'John';\n//\t\t$contact->LastName = 'Smithy';\n//\t\t$contact->AccountId = $account->Id;\n//\t\t$contact->create();\n//\n//\t\t$message = TestingUtil::buildMessage(\n//\t\t\t\tTestingUtil::$mainTestUserID,\n//\t\t\t\tarray(\n//\t\t\t\t\t\t'message_body' => 'The call went well',\n//\t\t\t\t\t\t'contact' => 'John Smithy',\n//\t\t\t\t\t\t'company_name' => 'Oracle'\n//\t\t\t\t));\n//\t\t$action = new SalesforceLogCallAction($message);\n//\n// $messageResponseList = $action->run();\n// $this->assertInstanceOf(MessageResponseList::class, $messageResponseList);\n// $this->assertEquals(2, $messageResponseList->count());\n// $this->assertEquals(SayQuestion::getActionId(), $messageResponseList->first()->getActionId());\n// $this->assertEquals(ShowCards::getActionId(), $messageResponseList->getItem(1)->getActionId());\n }", "title": "" }, { "docid": "e01e0f69d5e5c8bfe47ad536d59840c4", "score": "0.52929103", "text": "public static function assertHandler($script, $line, $message)\r\n {\r\n trigger_error('Assertion failed: in '.\"$script, on line $line, $message\",E_USER_WARNING);\r\n }", "title": "" }, { "docid": "4fb5164e98030c480dfc6f422a7cbcd2", "score": "0.5288334", "text": "public function testExample()\n {\n $this->assertEquals(2,1+1);\n }", "title": "" }, { "docid": "5388f8f29502da82fba436d7d3b32918", "score": "0.5278051", "text": "public function test() {\n\t\t//データ生成\n\t\t$data = $this->__defaultData;\n\n\t\t//処理実行\n\t\t$result = $this->FaqQuestionOrder->validateFaqQuestionOrder($data);\n\t\t$this->assertTrue($result);\n\t}", "title": "" }, { "docid": "8485e1e167ed8c49db1924cd4c805848", "score": "0.5263529", "text": "public function testCrceTariffActivatePlan()\n {\n\n }", "title": "" }, { "docid": "6f431a294a77ea9e2a68dc048a9baafd", "score": "0.52601504", "text": "function assertAuthenticated(string $guard = null)\n{\n return test()->assertAuthenticated(...func_get_args());\n}", "title": "" }, { "docid": "e23120eace3029e6b402e9f1a22bb3b2", "score": "0.5259299", "text": "function assert_fails($lambda, $msg = '') {\n $caught = false;\n try {\n $lambda();\n } catch (ztest\\AssertionFailed $e) {\n $caught = true;\n pass();\n }\n if (!$caught) {\n throw new ztest\\AssertionFailed($msg);\n }\n}", "title": "" }, { "docid": "ff631217970de90ce79fb6e7fb987a3a", "score": "0.5242578", "text": "public function testSomethingIsTrue()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "e9d0f43a11fb288570e41d969ebe2c1c", "score": "0.52328587", "text": "function test($operator, $tests)\n{\n foreach ( $tests as $test )\n {\n list( $a, $b, $c ) = $test;\n\n assert(\"{$operator}({$a}, {$b}) == {$c}\");\n // assert('addition(1, 1) == 2');\n // assert('subtraction(1, 1) == 0');\n }\n}", "title": "" }, { "docid": "cfb1c755edf1ff155fbe7fadab5088db", "score": "0.52312386", "text": "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "title": "" }, { "docid": "cfdc7e528a2a0ab9517671ea0e91402a", "score": "0.52241397", "text": "public function testCanary(): void\n {\n // arrange & act & assert\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "dfedf3eeb89d7cdbc151b5e31307fe23", "score": "0.5219554", "text": "public function testExample()\r\n {\r\n $this->assertTrue(true);\r\n }", "title": "" }, { "docid": "7dd1ac66cab8fd057156148c1fc8085d", "score": "0.51795703", "text": "function testAddEvaluation() {\n // ================================\n \n \n // To verify add evalution result Final Game is valid\n // ================================\n \n echo $this->unit->report();\n echo $this->returnResult($this->unit->result()); \n }", "title": "" }, { "docid": "b5c4e0ad0bea7b236be2b4f764734aa1", "score": "0.51706713", "text": "public function test_addSupplementAudit() {\n\n }", "title": "" }, { "docid": "58bdc0d22be2d30b5f97cdca967c55f6", "score": "0.5156674", "text": "function testGetEvaluation() {\n // ================================\n \n \n // To verify add evalution result Final Game is valid\n // ================================\n \n echo $this->unit->report();\n echo $this->returnResult($this->unit->result());\n }", "title": "" }, { "docid": "36a302b3f064692c99cb57ffb84aaf76", "score": "0.513667", "text": "public function testGetContactSubfunctionalExpertise()\n {\n }", "title": "" }, { "docid": "b15f9cba17fc3775cadee24845ab7d56", "score": "0.5132841", "text": "public function assert(Browser $browser)\n {\n parent::assert($browser);\n $browser->assertSee('Kassa afsluiten');\n }", "title": "" }, { "docid": "a738601b52a7f4b1e8c777276e7a5082", "score": "0.5130764", "text": "public function dummy()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "3dfff40275c4e8f3143f64e4b4c580ba", "score": "0.51283824", "text": "public function testResult(): void\n {\n self::assertTrue($this->fixture->isPassed());\n\n $this->fixture->addViolation('Violation1');\n self::assertFalse($this->fixture->isPassed());\n\n $this->fixture->addViolation('Violation2');\n self::assertFalse($this->fixture->isPassed());\n\n $this->fixture->addViolation('Violation3');\n self::assertFalse($this->fixture->isPassed());\n\n self::assertEquals(\n ['Violation1', 'Violation2', 'Violation3'],\n $this->fixture->getViolations(),\n );\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.51266026", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "08fcfd36deb554e28941d7cf0d1a1a24", "score": "0.51249814", "text": "public function __call($name,$args){\n\t\t$expectationName = preg_replace(\"/^(toBe|to|is)/\",\"\",$name) . \"Expectation\";\n\n\t\tif(empty($args)){\n\t\t\t$expObj = new $expectationName();\n\t\t}else{\n\t\t\t$refClass = new ReflectionClass($expectationName);\n\t\t\t$expObj = $refClass->newInstanceArgs($args);\n\t\t}\n\n\t\t$this->desc->assert($expObj,$this->value,$this->message);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ac428d6e269bd1945256dc3ad7baf2e1", "score": "0.51237166", "text": "public function testCrceTariffGetActivePlan()\n {\n\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.51165324", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.51165324", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "f6d63a5cc397bc89b40e13a7fd0781c9", "score": "0.5115037", "text": "public function test() {\n $this->testRightInputs();\n // Try hiting with the wrong inputs\n $this->testFalseInputs();\n TestGeneral::printLines($this->result);\n }", "title": "" }, { "docid": "a98cd4af95b9874256dfb6f687fbba82", "score": "0.5114925", "text": "public function testExample()\n {\n // 期待値\n $expected = 5;\n\n // 実際の値\n $actual = 2 + 3;\n\n // チェック\n //$this->assertTrue(true);\n $this->assertEquals($expected, $actual);\n }", "title": "" }, { "docid": "863000cb15cb58776387588404447190", "score": "0.5112451", "text": "public function atestExecuted() {\n $this->assertFalse(\n self::$contractObject->hasFieldExecutedViewAccess(),\n \"User with ReadOnly role has access to view the Executed field of a published contract.\"\n );\n $this->assertEquals(\n 1,\n self::$contractObject->getFieldExecuted(),\n \"User with ReadOnly role is seeing incorrect Executed values.\"\n );\n $this->assertNull(\n self::$contractObject->viewFieldExecuted(),\n \"User with ReadOnly role is seeing incorrect Executed values.\"\n );\n }", "title": "" }, { "docid": "ec6601193720f128c39216cf6dfb3bd1", "score": "0.5110387", "text": "final protected function assertTrue($result, $message = null) {\n if ($result === true) {\n $this->assertions++;\n return;\n }\n\n $this->failAssertionWithExpectedValue('true', $result, $message);\n }", "title": "" }, { "docid": "18c755cfbe90b9586e2ba58273f6b520", "score": "0.50922394", "text": "public function performAssertion($expected, $actual, $message)\n\t{\n\t\t$expected['oldsub'] = self::translateSubToId($expected['oldsub']);\n\t\t$expected['allsubs'] = self::translateSubToId($expected['allsubs']);\n\n\t\tunset($actual['taxrule_id']);\n\t\tunset($actual['tax_match']);\n\t\tunset($actual['tax_fuzzy']);\n\n\t\tparent::performAssertion($expected, $actual, $message);\n\t}", "title": "" }, { "docid": "7dbedc159aa4e726df91bee0818b6d0c", "score": "0.50885594", "text": "protected function assertPreConditions() {}", "title": "" }, { "docid": "3a1dd580747e637f9699508cb5c168a1", "score": "0.5087446", "text": "public function testConfirm()\n {\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.50868446", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "a9e03e0849cd1bc7924cbb04c04fb074", "score": "0.0", "text": "public function index(Post $post)\n {\n return $post->comments()->with('author')->latest()->get();\n }", "title": "" } ]
[ { "docid": "66dba62b6171d79d179d2efe10c0caba", "score": "0.74747115", "text": "public function index()\n\t{\n\t\t// Paginate resource resutls\n\t\t$results = $this->paginate();\n\n\t\t// If results found add asset to make tables responsive\n\t\t$results->total();\n\n\t\t// Create header links for sorting by column\n\t\t$links = (object) link_to_sort_by($this->resource->getVisibleLabels());\n\n\t\t// Set the route for the return button\n\t\t$returnRouteName = replace_last_segment($this->prefix);\n\n\t\t// Add data to the view\n\t\t$view = view('resource.index', compact(['results', 'links', 'returnRouteName']));\n\n\t\t// Add data to the layout\n\t\t$this->layout->title = $this->resource->plural();\n\t\t$this->layout->subtitle = ($results->lastPage() > 1) ? sprintf(_('Page %d/%d'), $results->currentPage(), $results->lastPage()) : _('Index');\n\n\t\t// Return layout + view\n\t\treturn $this->layout($view);\n\t}", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74559", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74559", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "725058cd65108ac80a78fe0051c949b4", "score": "0.74051094", "text": "public function lists()\n\t{ \n\t\t$input \t = $this->getListRequest();\t\t\n\t\t$resources = $this->resourceRepository->find($input['take'], $input['skip'], $input['sort'], $input['filter']);\n\t\t$total = $this->resourceRepository->count($input['filter']);\n\n\t\treturn $this->makeListResponse($resources, $total);\n\t}", "title": "" }, { "docid": "870d86aa3e5336ed0150f4b1a79d3bc6", "score": "0.7393241", "text": "public function listAction()\n {\n $entityRepository = $this->getRepository();\n $entities = $entityRepository->findAll();\n\n return $this->render(\n $this->getTemplate(__FUNCTION__),\n [\n 'entities' => $entities,\n ]\n );\n\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.73768365", "text": "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "title": "" }, { "docid": "fc2792e1b13ff38e0c9384e5367be91c", "score": "0.7355509", "text": "public function actionList()\n {\n return $this->render('list');\n }", "title": "" }, { "docid": "143d9a58e87ac1f21fc152d696ad25d6", "score": "0.72710556", "text": "public function index()\n {\n $catalog_lists = Catalog::paginate(GlobalEnum::PerPage);\n\n if ($catalog_lists->total()) {\n return $this->ok('', CatalogResource::collection($catalog_lists)->response()->getData(true));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "393e0d0bda703c386c7b465265bed633", "score": "0.71704257", "text": "public function indexAction()\n {\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($filter);\n\n //Api controllers inherit from the shopware_controllers api rest.\n //It extends the enlight_action_controller,but\n //overrides predispatch and postdispatch method through which it defines\n //details regarding views,setting headers and json_encoding the results from the resources\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "915fb596a541fe3490b48ffd04162d2e", "score": "0.7157241", "text": "public function listAction()\n {\n $page = (int) $this->params()->fromRoute('page', 1);\n return $this->forward()->dispatch($this->getRouteIdentifierPrefix(), array('action' => 'index', 'page' => $page));\n }", "title": "" }, { "docid": "6c72516079b466368fa3fffe94f8ae35", "score": "0.7132358", "text": "function index() {\n render(\"list\");\n }", "title": "" }, { "docid": "d9b48afdd79e90cf917b6d111ca6416b", "score": "0.71212447", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(Cache::get('pagination', 10));\n\n return view('resources.index')->with(compact('resources'));\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c92dfed9c6b1a4ac51bf0fb7614258f9", "score": "0.7106149", "text": "public function listAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "90a1f4f6b697ee3ec0f4fa576dd38523", "score": "0.7098513", "text": "public function index()\n {\n return view('resources', ['resources' => Resource::orderBy('name', 'asc')->get(), 'listings' => RentResource::whereDate('start_time', '=', Carbon::today()->toDateString())->orderBy('start_time', 'asc')->get() ]);\n }", "title": "" }, { "docid": "ba6dd0e8295ef2a549fdf27a9cd12661", "score": "0.70087796", "text": "public function listAction()\n\t{\n\t\t$params = ['page' => 'page-catalog-list'];\n\n\t\tforeach( app( 'config' )->get( 'shop.page.catalog-list' ) as $name )\n\t\t{\n\t\t\t$params['aiheader'][$name] = Shop::get( $name )->header();\n\t\t\t$params['aibody'][$name] = Shop::get( $name )->body();\n\t\t}\n\n\t\treturn Response::view( Shop::template( 'catalog.list' ), $params )\n\t\t\t->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) );\n\t}", "title": "" }, { "docid": "79651e14a4b964194c02d9ee700a9ad5", "score": "0.70079595", "text": "public function list(): void\n {\n $list = $this->mysql->select($this->getListQuery());\n $this->page->show($this->getListPageTemplate(), ['list' => $list]);\n }", "title": "" }, { "docid": "5f679e4189acdce779f6ef9e23a350f9", "score": "0.700236", "text": "public function actionList()\n {\n $pagination = $this->setPagination('article');\n \n $list = $pagination['recordList'];\n $pages = $pagination['pages'];\n\n return $this->render('list',['list' => $list,'pages' => $pages]);\n }", "title": "" }, { "docid": "904740a092ed938ccd50ca494c286c30", "score": "0.69705874", "text": "public function list()\r\n\t\t{\r\n\t\t\t// Page title\r\n\t\t\t$this->title = 'Pathways list';\r\n\r\n\t\t\t// Function parameter\r\n\t\t\t$parametros = ( func_num_args() >= 1 ) ? func_get_arg(0) : array();\r\n\r\n\t\t\t// Load models\r\n\t\t\t$settings_model = $this->load_model('settings-model');\r\n\t\t\t$pathway_model = $this->load_model('pathway-model');\r\n\r\n\t\t\t/** Load files from view **/\r\n\r\n\t\t\t// Load the template definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/template_config.php';\r\n\r\n\t\t\t// Load the template head section\r\n\t\t\trequire ABSPATH . '/views/_includes/template_start.php';\r\n\r\n\t\t\t// Load the page initial definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/page_head.php';\r\n\r\n\t\t\t// Load the page itself\r\n\t\t\trequire ABSPATH . '/views/pathway_module/pathway_list-view.php';\r\n\r\n\t\t\t// Load the page footer\r\n\t\t\trequire ABSPATH . '/views/_includes/template_end.php';\r\n\r\n\t\t}", "title": "" }, { "docid": "bc75e71d755fa3c285f90da23f029065", "score": "0.6961202", "text": "public function listingAction()\n {\n /** @var Factory $Factory */\n $Factory = $this->get('factory');\n\n /** @var Product[] $Products */\n $Products = $Factory->getAllProducts();\n\n return $this->render(\n 'ACAShopBundle:Products:list.html.twig',\n array(\n 'Products' => $Products\n )\n );\n }", "title": "" }, { "docid": "bdcd442e256866ea4c741c1ff1cc3685", "score": "0.6940423", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->_display();\n }", "title": "" }, { "docid": "cffe60b04946e2b283ae38e3049adc3f", "score": "0.69368476", "text": "public function listAction()\n {\n if (!$this->service) {\n throw new \\RuntimeException('No CRUD service defined');\n }\n\n $label = (isset($this->label)) ? $this->label : '';\n \n $service = $this->getServiceLocator()->get($this->service);\n\n $this->trigger(CrudEvent::EVENT_LIST_PRE);\n\n $where = $this->parseWhere($this->getRequest());\n $order = $this->params()->fromQuery('order', array());\n\n $perPage = $service::INDEX_LIMIT;\n\n $page = ($this->params()->fromQuery('page', 1) -1);\n \n $list = $service->getList($where, $order, ($page * $perPage), $perPage);\n\n $count = $service->getCount($where);\n\n $this->trigger(CrudEvent::EVENT_LIST_POST, $list);\n\n $currentQuery = $this->params()->fromQuery();\n unset($currentQuery['page']);\n\n return $this->loadView(\n 'zucchi-admin/crud/list', \n array(\n 'resource' => $this->resource,\n 'list' => $list,\n 'count' => $count,\n 'page' => $page+1,\n 'currentQuery' => http_build_query($currentQuery),\n 'pages' => ceil($count/$perPage),\n 'listFields' => $this->listFields,\n 'metadata' => $service->getMetaData(),\n 'where' => $where,\n 'order' => $order,\n 'label' => $label,\n\n )\n );\n }", "title": "" }, { "docid": "d033fdb664b5308858d97fa62eaec1dd", "score": "0.6919906", "text": "public function showResourcesList(array $data);", "title": "" }, { "docid": "26f8fdc71a4939e7422fb301f2c7eb6b", "score": "0.69135225", "text": "public function index()\n {\n $questions = Question::latest()->paginate(10);\n\n return QuestionResource::collection($questions)->additional(['result' => 1, 'message' => 'Retrieved.']);\n }", "title": "" }, { "docid": "9614c14c55791e230f2a0558a1a13ab5", "score": "0.68943536", "text": "public function index() {\n $arrObjResource = Resource::latest()->paginate(self::INT_LIMIT);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "4f3eab1a65aa0d6cf0ac4845abdf26ac", "score": "0.6890335", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "e4d514bd62d1c63ab8647f831833ec4f", "score": "0.68843615", "text": "public function index()\n {\n \n return $this->list();\n \n }", "title": "" }, { "docid": "227cc9dea5d541678d4dfd2730fdac56", "score": "0.687347", "text": "public function index()\n {\n $queryBuilder = QueryBuilder::for(Repository::enabled())\n ->allowedFilters([\n 'name',\n 'license',\n 'description',\n AllowedFilter::exact('author.name'),\n 'author.display_name',\n AllowedFilter::exact('tags.name'),\n 'tags.category.name',\n ])\n ->allowedSorts([\n 'name',\n 'stargazers',\n 'last_push',\n 'author.name',\n ])\n ->defaultSort('-stargazers')\n ->with('author', 'tags', 'tags.category');\n // Paginate if request has a page parameter\n if (request()->has('page')) {\n return RepositoryFullResource::collection($queryBuilder->jsonPaginate(100));\n } else {\n return RepositoryFullResource::collection($queryBuilder->get());\n }\n }", "title": "" }, { "docid": "85415f9379a58cfef9a5550ad415fc13", "score": "0.6871514", "text": "public function index()\n {\n return StatusResource::collection(\n Status::latest()->paginate(10)\n );\n }", "title": "" }, { "docid": "9bdc4409374aa0ca956ab945dfb3719d", "score": "0.68563753", "text": "public function listAction(){\r\n\t\t\t\r\n\t\t\t//$totalItem \t\t\t\t\t= $this->_model->countItem($this->arrParams, null);\r\n\t\t\t//$this->setPagination(array(\"totalItemPerPage\" => 5, \"pageRange\" => 2));\r\n\t\t\t//$this->_view->pagination \t= new Pagination($totalItem, $this->_pagination);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_view->nameCategory \t= $this->_model->getNameCategory($this->arrParams, array(\"task\" => \"get-name-category\"));\r\n\t\t\t$this->_view->_listBook\t\t= $this->_model->infoItem($this->arrParams, null);\r\n\r\n\r\n\t\t\t$this->_view->_title = \"<title>List</title>\";\r\n\t\t\t$this->_view->render(\"book/list\");\r\n\t\t}", "title": "" }, { "docid": "728f8e03f8b5006e5477454a725a1745", "score": "0.6847423", "text": "public function index()\n {\n return response(EntryList::getAll(), 200);\n }", "title": "" }, { "docid": "27835938400657712b507591c21e8655", "score": "0.683678", "text": "public function actionIndex()\n\t{\n\t\t$objects = self::apiRequest();\n\t\t\n\t\t$this->render('index',array(\n\t 'objects'=>$objects,\n\t 'page'=>$this->pNumber\n\t ));\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": "ddc72035c6eee5bda438fcd2d80fe704", "score": "0.68218684", "text": "public function index() {\n\t\t$resources = Resource::with(array('projects' => function($query) {\n\t\t\t$query->orderBy('updated_at','desc');\n\t\t}))->take(10)->get();\n\t\treturn View::make('resource/index', compact('resources'));\n\t}", "title": "" }, { "docid": "d773e5fd60f9ab29f11ae0739ce3ee4a", "score": "0.68212044", "text": "public function index( ) {\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\n\t\t$this->all_rows = $this->model->order($this->get_order())->page($this->this_page,$this->list_limit);\n\t\tif(!$this->all_rows) $this->all_rows=array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "cf0df3ff4d7be7a54e874c2996c82e4e", "score": "0.68184847", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Applications\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all applications allowed access via API\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/applications/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => array('button', 'float_right')))\n\t\t\t\t\t\t\t\t);\n\t\t$this->datagrid->setConfig ( OauthClients::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "7dd3e647ccd9b808f98f8f06413992bc", "score": "0.6815415", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('r_scenarios')->order('r_scenario_id desc');\r\n \r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n \r\n $oMySearchEngine->findWordOn(array('r_scenario_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_scenario_id' => array('operator' => 'eql'),\r\n 'r_scenario_actif' => array('operator' => 'eql'),\r\n 'r_scenario_libelle' => array('operator' => 'like')\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 $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Handle pagination\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\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": "a422edadfd877c23034b14eb7c872f20", "score": "0.680176", "text": "public function index()\n {\n // Get Students\n\n $students = Student::paginate(10); \n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "8fb097585964e814f54986427cb4f2a5", "score": "0.6801259", "text": "public function listAction ()\n {\n\n $this->_helper->viewRenderer->setNoRender(false);\n $this->_helper->viewRenderer->setViewScriptPathSpec(\"server/list.phtml\");\n $this->_helper->serverTester->listAction($this->_serverClass, $this);\n }", "title": "" }, { "docid": "9eac380992aafa51fd5f8cad7dd703c0", "score": "0.6791666", "text": "public function index()\n\t{\n\t\treturn View::make('backoffice.resource.index');\n\t}", "title": "" }, { "docid": "5d12cb46b97d3119f7b5023b68501a38", "score": "0.678868", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $altinvs = $em->getRepository('SGIBundle:Altinv')->findAll();\n\n return $this->render('altinv/list.html.twig', array(\n 'altinvs' => $altinvs,\n ));\n }", "title": "" }, { "docid": "971c5bf5ae183faa04c5c48cbd18c860", "score": "0.67845964", "text": "public function do_list()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/list' );\n\n }", "title": "" }, { "docid": "009c68f22edb5d32fe04a4694c775ca1", "score": "0.67772275", "text": "public function indexAction() {\n $this->render('list', array(\n 'entries' => $this->newsRepository->getAll(array('date' => 'DESC'))\n ));\n }", "title": "" }, { "docid": "f942ddab63eeccb58e9b51ecacb7adee", "score": "0.67770517", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $result) = Resource_Service_Attribute::getList($page, $perpage,array('at_type' => 1,'status' => 1));\n\t\t$this->assign('result', $result);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t}", "title": "" }, { "docid": "1cda64db2e68c557b90cdabeccaba33f", "score": "0.67594475", "text": "public function index()\n {\n //\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "183389798fc3f84d25abd7fc3486c685", "score": "0.67534196", "text": "function index()\n\t\t{\n\t\t\tif($this->AJAXCall)\n\t\t\t\texit;\n\t\t\t\n\t\t\t$this->_generate_listing(false);\n\t\t}", "title": "" }, { "docid": "117edb0c09e0fdcb587db5412ef18996", "score": "0.6751079", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TicketswapUserBundle:Users')->find(1);\n $listings = $em->getRepository('TicketswapListingBundle:Listings')->findBy(['user' => $user]);\n\n return $this->render('listings/index.html.twig', array(\n 'listings' => $listings,\n ));\n }", "title": "" }, { "docid": "a0016ac4bfda3ac0418505813ba2e862", "score": "0.6734381", "text": "public function indexAction()\n {\n if ( ! $this->getUser()) {\n return $this->redirect($this->generateUrl('user_sign_in'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BWBlogBundle:Resource')->findBy(array(\n 'user' => $this->getUser(),\n ), array(\n 'created' => 'DESC',\n ));\n $resources = new ArrayCollection($entities);\n\n return $this->render('BWBlogBundle:Resource:index.html.twig', array(\n 'entities' => $entities,\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "274943ce909ef8e9f446ec40976ee886", "score": "0.6731582", "text": "public function listAction()\n {\n $all = $this->rss->findAll();\n \n $this->theme->setTitle(\"Visa alla RSS-flöden\");\n $this->views->add('rss/list-all', [\n 'feeds' => $all,\n 'title' => \"Visa alla RSS-flöden\",\n ], 'main');\n \n $this->views->add('rss/rss-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "c6af5753a45a23a4039724edd2030d18", "score": "0.6731379", "text": "public function index()\n {\n $data = array(\n 'objects' => $this->instituicaoBo->list_all(),\n 'title' => 'Instituição',\n 'heading' => 'Lista de',\n );\n\n $this->load->view('/instituicao/list_instituicao.html.php', $data);\n }", "title": "" }, { "docid": "ed091402879b52de0ec1b21125fb6df3", "score": "0.67281276", "text": "public function index()\n {\n //Get Products\n $products = Product::paginate(100);\n \n //Return collection of products as resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "0ee391ae331b2e93b8a1c88e428dfb9a", "score": "0.6725677", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $rentals = $em->getRepository('SGIBundle:Rental')->findAll();\n\n return $this->render('rental/list.html.twig', array(\n 'rentals' => $rentals,\n ));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "d89867a60ba15fed734e46000a36620d", "score": "0.6722664", "text": "static function listAction() {\n // Get user files\n $users = self::getUsers();\n\n // Display user ids\n echo '<ul>';\n\n foreach ($users as $user) {\n echo '<li><a href=\"/users/' . $user->USR . '\">' . $user->NAME . ' (' . $user->USR . ')</a></li>';\n }\n\n echo '</ul>';\n }", "title": "" }, { "docid": "b10432984ae1b667b192f3f5d3985a4c", "score": "0.67152315", "text": "public function showList()\n {\n //var_dump($this->post);\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "ff3e5f5bb761df19ee88cd46c9c44f75", "score": "0.6711365", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Partners - '.APP_NAME;\n $this->global['pageMenu'] = 'List Partners';\n $this->global['contentHeader'] = 'List Partners';\n $this->global['contentTitle'] = 'List Partners';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "a82e643c16a81545d59c105f6fd9019e", "score": "0.6710445", "text": "public function index()\n {\n return PlaylistResource::collection(Playlist::with('tracks')->paginate());\n }", "title": "" }, { "docid": "9c3a8017fadc1446e144ef2847a75de3", "score": "0.6704527", "text": "public function index()\n {\n return PlaylistResource::collection(\\App\\Playlist::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "1c6e0baa6678b891bebbc943f9480efa", "score": "0.6700806", "text": "public function indexAction()\r\n\t{\r\n\r\n\t\t$this->_view->_title = ucfirst($this->_controller) . ' Manager :: List';\r\n\r\n\t\t $totalItems = $this->_model->countItems($this->_arrParam);\r\n\t\t $configPagination = ['totalItemsPerPage' => 3, 'pageRange' => 3];\r\n\t\t$this->setPagination($configPagination);\r\n\t\t$this->_view->pagination = new Pagination($totalItems, $this->_pagination);\r\n\t\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->slbGroup = $this->_model->itemInSelectBox($this->_arrParam);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "da46f30f701104b01168396ab42fd3e4", "score": "0.6699936", "text": "public function actionList()\n\t{\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax'\n\t\t]);\n\t}", "title": "" }, { "docid": "8fdc346d2ae73862487e8562ba0d2f8e", "score": "0.6697069", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->book ? $this->book->title . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d92ce07568892bbdbac73cfad06a3cff", "score": "0.66963553", "text": "public function index() {\n $rows = Module::paginate(10);\n return View::make(\"CoreCms::module.listing\")->with(\"models\", $rows);\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695974", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "6302f4af4daf8199c6e51ccba9683ada", "score": "0.6693278", "text": "public function index()\n {\n $flights = Resources::all();\n return view('admin.resource.view', compact('flights'));\n }", "title": "" }, { "docid": "ce01e387a99bc334b00eed748a6952cf", "score": "0.669161", "text": "public function index()\n {\n return $this->respondWithPaginatedCollection(SmartBin::paginate(), $this->smartBinTransformer);\n }", "title": "" }, { "docid": "a852cb19289ccd3ae31b2b0e5320aea1", "score": "0.6691417", "text": "public function index()\n {\n Gate::authorize('view', 'products');\n $product = Product::paginate();\n\n return ProductResource::collection($product);\n }", "title": "" }, { "docid": "d8835f9930d0f9c4f3c53749e67962c3", "score": "0.6685593", "text": "public function listAction() {\n\n // Use the model to get all stored users\n $allUsers = $this->userModel->findAll();\n\n // Creates an array with the information to be displayed\n $userInfo = $this->userInfoBuilder([\n 'update', 'inactivate', 'activate', 'soft-delete', 'undo-delete', 'hard-delete'\n ], $allUsers);\n\n // Display the result in a view\n $this->views->add('user/list-all', [\n 'title' => 'Alla användare',\n 'users' => $userInfo\n ]);\n }", "title": "" }, { "docid": "a656fd3c504977ccfaf035cdddd42150", "score": "0.66812676", "text": "public function listAction() : void {\n $this -> view -> assignMultiple([\n 'server' => $this -> serverRepository -> findAll()\n ]);\n }", "title": "" }, { "docid": "d69e4f0b4187ff68e97b4e7a5d09ad96", "score": "0.6680512", "text": "public function list()\n {\n }", "title": "" }, { "docid": "88a8d702b1375b13dc358eb9e6dfdb8e", "score": "0.66787434", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Tickets list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the tickets.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/tickets/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\n\t\t$this->datagrid->setConfig ( Tickets::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "af48da44bf6d55a059ab53c7dd12c14e", "score": "0.66786623", "text": "public function index()\n {\n $this->authorize('view', $this->repository->modelName());\n\n $resources = $this->repository->filter()->cast();\n\n return $this->responder->ok()->withData($resources)->send();\n }", "title": "" }, { "docid": "a9f952d5e07e7d6d7e049c37f8d2fa2e", "score": "0.667737", "text": "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $contact = new Contact();\n $results = $contact->getContact4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "title": "" }, { "docid": "fcbdc058a31d41050a367e7b15d55776", "score": "0.66733277", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminMongoOdmEvents::PRE_LIST);\n\n $fields = $this->document['list']['fields'];\n $paginator = $this->mongoOdmFindAll($this->document['class'], $this->request->query->get('page', 1), $this->document['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n $this->dispatch(EasyAdminMongoOdmEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n // RESTRICTED_ACTIONS 'delete_form_template' => $this->createDeleteForm($this->document['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<DocumentName>Template', ['list', $this->document['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d25f4e517682766596d2c16eca86c7fa", "score": "0.66732645", "text": "public function index()\n {\n return view('resource.index',['resources'=>Resource::all()]);\n }", "title": "" }, { "docid": "f6d989efb8c8e985bb96c0559d9bde67", "score": "0.667212", "text": "public function index()\n\t{\n $listings = Listing::paginate(3);\n return response( $listings,200);\n\t}", "title": "" }, { "docid": "561ee0fde098e9e4a73a2a5669089034", "score": "0.66712075", "text": "public function index()\n {\n // Get employees\n $employees = Employee::latest()->paginate(5);\n\n // Return employees\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "2a6023a5396366a36aac2f066e03181d", "score": "0.66709393", "text": "public function index()\n {\n $playlists = Playlist::query()\n ->with('author')\n ->latest()\n ->paginate(16);\n return PlaylistResource::collection($playlists);\n }", "title": "" }, { "docid": "f16b067e8febaf73c982ac35e0e11cd0", "score": "0.6658731", "text": "public function index()\n {\n return ActionResource::collection(Action::paginate(5));\n }", "title": "" }, { "docid": "ca2f35e9a4c5b25c7b81f82a26bdc119", "score": "0.66559094", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "36f38270af9227d848d8bfe2fc2fb2f6", "score": "0.66512823", "text": "public function index()\n\t{\n\t\t$resources = $this->repository->getResources();\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.index', compact(['resources', 'menuTab']));\n\t}", "title": "" }, { "docid": "842b9bbe43e49f877c207858fd6dd962", "score": "0.66511077", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Products list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the products.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/products/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Products::grid () )->datagrid ();\n\t}", "title": "" }, { "docid": "7654a7b909673402548e3c1d711a6d3b", "score": "0.6646156", "text": "public function list()\n {\n $data = array(\n 'title' => 'Laporan Vclaim',\n 'class_name' => $this->class,\n 'route_name' => $this->routes\n );\n\n $data['contents'] = 'contents/laporan/' . $this->class . '/index';\n $this->load->view('master', $data);\n\n }", "title": "" }, { "docid": "165ffb7039a9dcc6c1d81e1ca64483e4", "score": "0.66448224", "text": "public function index()\n {\n // Get books\n\t $books = Book::orderBy('created_at', 'desc')->paginate(5);\n\n\t return BookResource::collection($books);\n }", "title": "" }, { "docid": "6aae86ba51583240c8fe0f141159a841", "score": "0.664316", "text": "public function index()\n {\n $accountDetail = AccountDetail::all()->sortBy('id');\n return AccountDetailResource::collection($accountDetail);\n }", "title": "" }, { "docid": "10a2b9d6812eccfed7ddcd2d5f7a7eb0", "score": "0.6640271", "text": "public function index()\n {\n $sub_localization_model = SubLocalization::on();\n $this->addUserFilteringToDataFetch($sub_localization_model, 'name', 'where', ['name', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'description', 'where', ['description', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'localization_id', 'where', ['localization_id', '=']);\n\n return BaseResource::collection($sub_localization_model->get());\n }", "title": "" }, { "docid": "6d76de53bb869e73d429cbb2f319f520", "score": "0.663951", "text": "public function index(Request $request)\n {\n $resources = Resource::where('status', 1);\n\n $request_append = array();\n\n if($request->has('q')) {\n\n $query_string = $request->input('q');\n\n $request_append['q'] = $query_string;\n\n $resources = $resources->where('name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('source_name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('description', 'LIKE', '%' . $query_string . '%');\n }\n\n \n\n $resources = $resources->paginate(env('USER_LIST_PAGINATION_SIZE'))->appends($request_append);\n\n return View('resources.show-resources', compact('resources'));\n }", "title": "" }, { "docid": "d768f601d0b3a2a45a883075e9bd74fa", "score": "0.663936", "text": "public function index()\n {\n $products = Product::latest()->paginate();\n\n return $this->respond(ProductResource::collection($products));\n }", "title": "" }, { "docid": "1863deff5f71e623d3df5630ccdabb09", "score": "0.6633998", "text": "public function indexAction()\n {\n $this->_initAction();\n $this->_title('Items');\n $this->renderLayout();\n }", "title": "" }, { "docid": "701976fee18cc3b85c2b2cb729fee5d7", "score": "0.6633943", "text": "public function display_list(){\r\n\t\t\r\n\t\t$collection = new User_Collection();\r\n\t\t$variables = array(\r\n\t\t\t'collection' => $collection->getPaginated(),\r\n\t\t\t'pagination' => $collection->getPagination(),\r\n\t\t\t'sorters' => $collection->getSortableLinks(),\r\n\t\t);\r\n\t\t\r\n\t\tBackendLayout::get()\r\n\t\t\t->prependTitle('Список пользователей')\r\n\t\t\t->setLinkTags($collection->getLinkTags())\r\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\r\n\t\t\t->render();\r\n\t}", "title": "" }, { "docid": "b2f9c5d65d641e65a8807637650b4e37", "score": "0.6633174", "text": "public function index()\n {\n $limit = 0;\n $list_obj = Collection::where('status', 1)->orderBy('created_at', 'DESC')->paginate($limit);\n return view('admin.collection.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "fbca53bf6960e73cbc1141408c860e37", "score": "0.6629921", "text": "function index()\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->_historialModel->getHistorial();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "fc175898bd7c35e91f0a34b68f176c7f", "score": "0.6628759", "text": "public function listing()\n\t{\n\t\treturn ADMIN_URL.'/list?item='.$this->get_table();\n\t}", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "da5a6a8e08d78cfa23a7671fa0667dac", "score": "0.66259927", "text": "public function listingAction(){\n if (LoginHelper::isAdmin()){\n $this->view->render('doctor/list', Doctor::all());\n }else{\n Router::redirect('home', '<p class=\"alert alert-danger\">You are not authorized</p>');\n }\n }", "title": "" } ]
a39cb5766ad62564fff9c70735633ab1
Operation verifyPaymentMethodAsync Verify payment method
[ { "docid": "9184612077af17593ae6923c75830dfb", "score": "0.7459568", "text": "public function verifyPaymentMethodAsync()\n {\n return $this->verifyPaymentMethodAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "aaa9f43138d581dc5ba8f1c8919a1f5f", "score": "0.7024543", "text": "public function verifyPaymentMethodRequest()\n {\n\n $resourcePath = '/v2/billing/paymentMethod';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "ead4297c53a64fa3712e11bb280da83c", "score": "0.6988778", "text": "protected function verifyPayment()\n {\n $this->refId = @$_GET['tref'];\n $this->transactionSetRefId();\n\n $fields = array(\n 'invoiceUID' => $this->refId()\n );\n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, $this->serverVerifyUrl);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec($ch);\n curl_close($ch);\n\n $response = simplexml_load_string($response);\n if ($response->result == 'False') {\n $this->transactionFailed();\n $this->newLog(0, PasargadException::getError($response->action));\n throw new PasargadException($response->action);\n }\n\n return true;\n }", "title": "" }, { "docid": "882420f6da031cf23ece87ee5c3f4d2d", "score": "0.688269", "text": "protected function verifyPayment()\n\t{\n\t\t$responce = \\Input::all();\n\t\t// echo $inputs['respmsg'];\n\t\tif ($responce['respcode'] == 0) {\n\t\t\t$fields = [\n\t\t\t\t\"digitalreceipt\" => $responce['digitalreceipt'],\n\t\t\t\t\"Tid\" => $responce['terminalid'],\n\t\t\t];\n\t\t\t$result = $this->Post($this->serverVerifyUrl, $fields);\n\t\t\t$result = json_decode($result);\n\t\t\tif (intval($result->ReturnId) >= 1000 && intval($result->ReturnId) == $this->amount) {\n\t\t\t\t$this->trackingCode = $responce['rrn'];\n\t\t\t\t$this->cardNumber = $responce['cardnumber'];\n\t\t\t\t$this->transactionSucceed();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$responce['respcode'] = $result->ReturnId;\n\t\t\t\t$inputs['respmsg'] = $result->Message;\n\t\t\t}\n\t\t}\n\n\t\t$this->transactionFailed();\n\t\t$this->newLog($responce['respcode'], $inputs['respmsg']);\n\t\tthrow new SaderatnewException($responce['respcode']);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1e0de438328cbcdb1f2715a0eee23689", "score": "0.6747793", "text": "protected function verifyPayment()\n\t{\n try {\n\t\t\t$client = new Client();\n\t\t\t$res = $client->request(\"POST\", \"https://api.zarinpal.com/pg/v4/payment/verify.json\", [\n\t\t\t\t\"json\" => [\n\t\t\t\t\t'merchant_id' => $this->config->get('zarinpal.merchant-id'),\n\t\t\t\t\t'amount' => $this->amount,\n\t\t\t\t\t'authority' => $this->refId,\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\t$res = json_decode($res->getBody()->getContents());\n\n } catch(ClientException $e) {\n\t\t\t$res = json_decode($e->getResponse()->getBody()->getContents());\n\n $this->transactionFailed();\n\t\t\t$this->newLog($res->errors->code, $res->errors->message);\n throw $e;\n\n } catch(\\Exception $e) {\n $this->transactionFailed();\n $this->newLog('Error', $e->getMessage());\n throw $e;\n }\n\n\t\tif ($res->data->code != 100) {\n $this->transactionFailed();\n\t\t\t$this->newLog($res->data->code, $res->data->message);\n throw new ZarinpalException($res->data->code, $res->data->message);\n\t\t}\n\n\t\t$this->trackingCode = $res->data->ref_id;\n\t\t$this->cardNumber = $res->data->card_pan;\n\n\t\t$this->transactionSucceed();\n\t\t$this->newLog($res->data->code, self::TRANSACTION_SUCCEED_TEXT);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "93d82ac5064c2740a5156d34232ff01e", "score": "0.67426723", "text": "protected function verifyPayment()\n\t{\n\t\t$params = [\n \"RefNum\" => $this->refId,\n \"MID\" => $this->config->get('gateway.saman.merchant'),\n\t\t];\n\n// $response = $this->client->post('verifyTxnRandomSessionkey/ipg/VerifyTransaction', [\n// 'headers' => [\n// 'Content-Type' => 'application/json',\n// ],\n// 'json' => $params\n// ]);\n $verifyUrl = 'https://sep.shaparak.ir/payments/referencepayment.asmx?WSDL';\n\n $soap = new SoapClient($verifyUrl);\n\n $response = $soap->verifyTransaction($params['RefNum'], $params['MID']);\n\n// $response = json_decode($response->getBody()->getContents());\n\n if ($response <= 0) {\n\t\t\t$this->transactionFailed();\n\t\t\t$this->newLog($response, SamanException::$errors[$response]);\n\t\t\tthrow new SamanException($response);\n\t\t}\n\n\t\t$this->transactionSucceed();\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7c0080c2c292cb3013e673e93f7e623d", "score": "0.6280666", "text": "public function verify() {}", "title": "" }, { "docid": "eb0a978e35be95e0ecf7e18b7a813d46", "score": "0.6238333", "text": "public function trnVerify()\n {\n $crc = md5($this->postData[\"p24_session_id\"] . \"|\" . $this->postData[\"p24_order_id\"] . \"|\" . $this->postData[\"p24_amount\"] . \"|\" . $this->postData[\"p24_currency\"] . \"|\" . $this->salt);\n $this->addValue(\"p24_sign\", $crc);\n $RES = $this->callUrl(\"trnVerify\", $this->postData);\n return $RES;\n }", "title": "" }, { "docid": "2a9ef9ec4614f0e7e967bdcbe0f50783", "score": "0.6196037", "text": "public function verify(): bool;", "title": "" }, { "docid": "d65601a17e3cacd78760d3ee541995f3", "score": "0.6079237", "text": "public function verify_payment()\n {\n return view('product.verify');\n }", "title": "" }, { "docid": "797eb1c0723cbd2654eb67efe6014124", "score": "0.6074503", "text": "protected function verifyPayment()\n {\n try {\n\n /** Get the payment ID before session clear **/\n $payment_id = \\Session::get('paypal_payment_id');\n /** clear the session payment ID **/\n \\Session::forget('paypal_payment_id');\n if (!$this->refId() || !$this->trackingCode()) {\n return false;\n }\n $payment = Payment::get($payment_id, $this->_api_context);\n /** PaymentExecution object includes information necessary **/\n /** to execute a PayPal account payment. **/\n /** The payer_id is added to the request query parameters **/\n /** when the user is redirected from paypal back to your site **/\n $execution = new PaymentExecution();\n $execution->setPayerId($this->refId);\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n /** dd($result);exit; /** DEBUG RESULT, remove it later **/\n if ($result->getState() == 'approved') {\n\n /** it's all right **/\n /** Here Write your database logic like that insert record or value in database if you want **/\n\n// \\Session::put('success','Payment success');\n return true;\n }\n\n return false;\n } catch (\\Exception $e) {\n $this->transactionFailed();\n $this->newLog('PaypalException', $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "f9ca01c886695eb479a35f38802c3171", "score": "0.6052542", "text": "public function simplePaymentVerify() {\r\n $url_parts = parse_url($this->simplePaymentURL);\r\n if (!isset($_GET['tx']) || strlen($_GET['tx']) == 0) {\r\n return $this->error_VerifyPayment_NoTXToken;\r\n }\r\n // read the post from PayPal system and add 'cmd'\r\n $req = 'cmd=_notify-synch&tx=' . $_GET['tx'] . '&at=' . $this->authToken;\r\n $header =\r\n \"POST \".$url_parts['path'].\" HTTP/1.0\\r\\n\"\r\n .\"Content-Type: application/x-www-form-urlencoded\\r\\n\"\r\n .\"Content-Length: \".strlen($req).\"\\r\\n\\r\\n\";\r\n //$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);\r\n // If possible, securely post back to paypal using HTTPS\r\n // Your PHP server will need to be SSL enabled\r\n $fp = @fsockopen ('ssl://'.$url_parts['host'], 443, $errno, $errstr, 30);\r\n if (!$fp) {\r\n return $this->error_VerifyPayment_HTTPError;\r\n }\r\n fputs ($fp, $header . $req);\r\n // read the body data\r\n $res = '';\r\n $headerdone = false;\r\n while (!feof($fp)) {\r\n $line = fgets ($fp, 1024);\r\n if (strcmp($line, \"\\r\\n\") == 0) {\r\n // read the header\r\n $headerdone = true;\r\n }\r\n else if ($headerdone) {\r\n // header has been read. now read the contents\r\n $res .= $line;\r\n }\r\n }\r\n // parse the data\r\n $lines = explode(\"\\n\", $res);\r\n $keyarray = array();\r\n if (strcmp($lines[0], \"SUCCESS\") == 0) {\r\n foreach ($lines as $line) {\r\n $bits = explode(\"=\", $line);\r\n if (count($bits) > 0) {\r\n if (count($bits) > 1) {\r\n $keyarray[urldecode($bits[0])] = urldecode($bits[1]);\r\n }\r\n else {\r\n $keyarray[urldecode($bits[0])] = '';\r\n }\r\n }\r\n }\r\n }\r\n // check that txn_id has not been previously processed\r\n // check that receiver_email is your Primary PayPal email\r\n // check that payment_amount/payment_currency are correct\r\n // process payment\r\n // check that the payment_status = Completed\r\n if (!isset($keyarray['payment_status']) || $keyarray['payment_status'] != 'Completed') {\r\n return $this->error_VerifyPayment_InvalidPaymentStatus;\r\n }\r\n if (!isset($keyarray['txn_id'])) {\r\n return $this->error_VerifyPayment_MissingTXID;\r\n }\r\n $sql =\r\n \"SELECT\\n\"\r\n .\" `ID`\\n\"\r\n .\"FROM\\n\"\r\n .\" `orders`\\n\"\r\n .\"WHERE\\n\"\r\n .\" `gateway_result`='SUCCESS: \".$keyarray['txn_id'].\"'\";\r\n $rec = new Record;\r\n $stuff = $rec->get_records_for_sql($sql);\r\n if (count($stuff) > 1) {\r\n return $this->error_VerifyPayment_DuplicateTXID;\r\n }\r\n // check that the price is the same as what we have recorded\r\n if (!isset($keyarray['mc_gross'])) {\r\n return $this->error_VerifyPayment_MissingGrandTotal;\r\n }\r\n if ($orderID=Cart::pending_order_get_ID()){\r\n $Obj_Order = new Order($orderID);\r\n $record = $Obj_Order->get_record();\r\n if ($record['cost_grand_total'] != $keyarray['mc_gross']) {\r\n return $this->error_VerifyPayment_BadTotal;\r\n }\r\n if (!isset($keyarray['mc_currency']) || $keyarray['mc_currency'] != $this->currencyCode) {\r\n return $this->error_VerifyPayment_InvalidCurrency;\r\n }\r\n $Obj_Order->set_field('gateway_result', 'Simple Payment Verify: '.$keyarray['payment_status'].' txn_id='.$keyarray['txn_id']);\r\n switch($keyarray['payment_status']){\r\n case \"Canceled_Reversal\":\r\n case \"Completed\":\r\n case \"Created\":\r\n case \"Processed\":\r\n if (!$Obj_Order->get_field('paymentApproved')){\r\n do_log(1,__CLASS__.'::'.__FUNCTION__.'()','','Marked as paid - '.$keyarray['invoice']);\r\n $Obj_Order->mark_paid('',false);\r\n }\r\n break;\r\n }\r\n Cart::pending_order_unset_ID();\r\n }\r\n $out =\r\n \"<p><b>Thank you for your payment.</b><br />\\n\"\r\n .\"Order number <a href=\\\"/view_order/?print=2&ID=\".$keyarray['invoice'].\"\\\" rel=\\\"external\\\">\".$keyarray['invoice'].\"</a> has been successfully processed, and a receipt for your purchase has been emailed to you.</p>\\n\";\r\n if (System::has_feature('Event-Ticketing')){\r\n $Obj_Order = new Order($keyarray['invoice']);\r\n $Obj_COD = new Component_Order_Detail;\r\n $Obj_COD->_record = $Obj_Order->load();\r\n $out.= $Obj_COD->draw_print_tickets_link();\r\n }\r\n if (!get_userID()){\r\n return $out;\r\n }\r\n $out.=\r\n \"<p>Your order history is shown below. Click on any order number to view transaction details or print out tickets.</p>\"\r\n .draw_auto_report('your_order_history',1);\r\n return $out;\r\n }", "title": "" }, { "docid": "3e8ecfd7e5cd2ff70f89e4f8daa80700", "score": "0.60162044", "text": "public function postVerify($request);", "title": "" }, { "docid": "4bbf2821b4d9fc118205f41ffe1e9107", "score": "0.59591067", "text": "public function verify($token);", "title": "" }, { "docid": "4bbf2821b4d9fc118205f41ffe1e9107", "score": "0.59591067", "text": "public function verify($token);", "title": "" }, { "docid": "a0422a90f72ddef614ef97c3d47babfb", "score": "0.59279394", "text": "public function checkPayment()\n {\n }", "title": "" }, { "docid": "2509dbb9e35635263067aa38273dc7b5", "score": "0.5898338", "text": "public function verification(Request $request)\n {\n $args = http_build_query(array(\n 'token' => $request->input('trans_token'),\n 'amount' => $request->input('amount')\n ));\n \n $url = \"https://khalti.com/api/v2/payment/verify/\";\n \n # Make the call using API.\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS,$args);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n \n $headers = ['Authorization: Key test_secret_key_2ff879c83221405bad79b372e79b049f'];\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n \n // Response\n $response = curl_exec($ch);\n // dd($response); //see the response from khalti server\n $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n $res = json_decode($response, true);//decode the response\n if(isset($res['idx'])) //check whether there is idx and also the amount in response with your database(I havenot done that)\n {\n //perform your database operation here,,,\n return response()->json([ //returns success to ajax\n 'success' => 'Your Account is succesfully credited.',\n ], 200);\n\n }else{\n\n return response()->json([ //returns failure to ajax\n 'error' => 'Something went Wrong.',\n ], 404);\n }\n \n }", "title": "" }, { "docid": "41724dbb3e4a8c319356f5c28c5587d9", "score": "0.5888214", "text": "public function verifyPaymentMethodAsyncWithHttpInfo()\n {\n $returnType = '\\OpenAPI\\Client\\Model\\WTBillingVerifyPaymentMethodResponse';\n $request = $this->verifyPaymentMethodRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "f698f019b4737d715f6f80f3b487b4f4", "score": "0.5857564", "text": "public function postVerify() {\n \n $user = Auth::user();\n \n $confirmation_code = base64_encode(Hash::make($user->email . str_random(32)));\n \n $user->confirmation_code = $confirmation_code;\n $user->save();\n \n $data = ['user' => $user];\n \n Mail::send('emails.verify', $data, function($message) {\n $user = Auth::user();\n $message->to(\n $user->email,\n $user->email\n )->subject(Lang::get('app.verify_subject'));\n });\n \n return Redirect::to('/')\n ->with('flash_message', Lang::get('app.verify_pending'))\n ->with('flash_severity', 'warning');\n }", "title": "" }, { "docid": "be053dfebfa31812ba636086acfce9a8", "score": "0.58377326", "text": "public function verify() {\n\t\tOauthHelper::log(array(\n\t\t\t'req_sig' => $this->request->signature(),\n\t\t\t'local_sig' => $this->signature(),\n\t\t\t'request' => get_class($this->request)));\n\t\treturn $this->eq($this->request->signature());\n\t}", "title": "" }, { "docid": "bbe1d0b5ba6befa29f2f13aa3ffc3bb5", "score": "0.57904863", "text": "public function verifyPayment()\n\t{\n\t\t$jinput = JFactory::getApplication()->input;\n\t\tif ($jinput->get('ep') == 'execute')\n\t\t{\n\t\t\t$this->executePayment($jinput);\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t$ret = $this->validate();\n\t\t\tif ($ret)\n\t\t\t{\n\t\t\t\t$row = JTable::getInstance('OsMembership', 'Subscriber');\n\t\t\t\t$id = $this->notificationData['custom'];\n\t\t\t\t$transactionId = $this->notificationData['txn_id'];\n\t\t\t\tif ($transactionId && OSMembershipHelper::isTransactionProcessed($transactionId))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$amount = $this->notificationData['mc_gross'];\n\t\t\t\tif ($amount < 0)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$row->load($id);\n\t\t\t\tif ($row->published)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif ($row->gross_amount > $amount)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$this->onPaymentSuccess($row, $transactionId);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "193b6666f4b3c328176240f20c94786b", "score": "0.5776776", "text": "public function postVerify(RequestHttp $request){\n // Rules for server side validations\n $this->validate($request, [\n 'redirect_to' => 'required'\n ]);\n\n $verified_code = str_random(60);\n\n $user = Auth::user();\n\n $user->verified_code = $verified_code;\n $user->save();\n\n //sending email\n Mail::send('emails.verify', array('verified_code' =>$verified_code), function($message) {\n $message->to(Auth::user()->email)\n ->subject($this->subjectVerified);\n });\n\n Session::put('send_verify_manual', 1);\n return redirect(Request::input('redirect_to'))->with(['send_verify_manual_check'=>1]);\n }", "title": "" }, { "docid": "fc77eb97e30cda8a0f337bc7f6055837", "score": "0.5763832", "text": "public function verify($transaction)\n {\n }", "title": "" }, { "docid": "e5f119075d2d93a61d9df60d01039de2", "score": "0.57283354", "text": "public function verify($token){\n $user=User::where('verification_token',$token)->firstOrFail();\n $user->verified=User::USUARIO_VERIFICADO;\n //removemos el token para que no vuelva a ser verificado\n $user->verification_token=null;\n $user->save();\n return $this->showMessage('la cuenta ha sido verificada');\n\n }", "title": "" }, { "docid": "a947503a84481e22b877b64e0570c41f", "score": "0.5723547", "text": "abstract public function verify(): bool;", "title": "" }, { "docid": "554ca05ed79706cf8d382e45cef2ba6f", "score": "0.5714434", "text": "public function onAKPaymentCallback($paymentmethod, $data)\n\t{\n\t\tJLoader::import('joomla.utilities.date');\n\n\t\t// Check if we're supposed to handle this\n\t\tif ($paymentmethod != $this->ppName)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$isValid = true;\n\n\t\t/**\n\t\t * If this URL is accessed via GET we need to return the webhook authorization code which we retrieve from\n\t\t * Viva's API.\n\t\t *\n\t\t * @see https://github.com/VivaPayments/API/wiki/Webhooks#Webhook-Url-Verification\n\t\t */\n\t\t$verb = $_SERVER['REQUEST_METHOD'];\n\n\t\tif ((strtoupper($verb) == 'GET') && (!isset($data['s']) || empty($data['s'])))\n\t\t{\n\t\t\techo $this->httpRequest(\n\t\t\t\t'www.vivapayments.com',\n\t\t\t\t'/api/messages/config/token',\n\t\t\t\tarray(),\n\t\t\t\t'GET',\n\t\t\t\t443);\n\n\t\t\t$this->container->platform->closeApplication();\n\t\t}\n\n\t\t// Load the relevant subscription row\n\t\t$orderCode = $data['s'];\n\t\t$subscription = null;\n\n\t\tif (!empty($orderCode))\n\t\t{\n\t\t\t/** @var Subscriptions $subscription */\n\t\t\t$subscription = $this->container->factory->model('Subscriptions')->tmpInstance();\n\t\t\t$subscription\n\t\t\t\t->find([\n\t\t\t\t\t'processor' => $this->ppName,\n\t\t\t\t\t'state' => 'N',\n\t\t\t\t\t'processor_key' => $orderCode\n\t\t\t\t]);\n\n\t\t\t$id = (int)$subscription->akeebasubs_subscription_id;\n\n\t\t\tif (($subscription->akeebasubs_subscription_id <= 0) || ($subscription->processor_key != $orderCode))\n\t\t\t{\n\t\t\t\t$subscription = null;\n\t\t\t\t$isValid = false;\n\t\t\t}\n\n\t\t\t/** @var Levels $level */\n\t\t\t$level = $subscription->level;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$isValid = false;\n\t\t}\n\n\t\tif (!$isValid)\n\t\t{\n\t\t\t$data['akeebasubs_failure_reason'] = 'The order code is invalid';\n\t\t}\n\n\t\t/** @var Subscriptions $subscription */\n\t\t/** @var Levels $level */\n\n\t\t// TODO Is this actually returned?!\n\t\tif ($isValid && $data['type'] == 'cancel')\n\t\t{\n\t\t\t// Redirect the user to the \"cancel\" page\n\t\t\t$cancelUrl = JRoute::_('index.php?option=com_akeebasubs&view=Message&slug=' . $level->slug . '&task=cancel&subid=' . $subscription->akeebasubs_subscription_id, false);\n\t\t\t$this->container->platform->redirect($cancelUrl);\n\n\t\t\treturn true;\n\t\t}\n\n\t\t// Get all details for transaction by a REST GET\n\t\tif ($isValid)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$transactionResult = $this->httpRequest(\n\t\t\t\t\t$this->getRESTHost(),\n\t\t\t\t\t'/api/transactions/',\n\t\t\t\t\tarray('ordercode' => $orderCode),\n\t\t\t\t\t'GET',\n\t\t\t\t\t$this->getRESTPort());\n\t\t\t}\n\t\t\tcatch (RuntimeException $e)\n\t\t\t{\n\t\t\t\t$transactionResult = (object)[\n\t\t\t\t\t'ErrorCode' => 500,\n\t\t\t\t\t'ErrorText' => $e->getMessage()\n\t\t\t\t];\n\t\t\t}\n\n\t\t\tif ($transactionResult->ErrorCode != 0)\n\t\t\t{\n\t\t\t\t$isValid = false;\n\t\t\t\t$data['akeebasubs_failure_reason'] = $transactionResult->ErrorText;;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$transaction = $transactionResult->Transactions[0];\n\t\t\t}\n\t\t}\n\n\t\t// Check subscription ID\n\t\tif ($isValid)\n\t\t{\n\t\t\tif ($transaction->MerchantTrns != $id)\n\t\t\t{\n\t\t\t\t$isValid = false;\n\t\t\t\t$data['akeebasubs_failure_reason'] = \"Subscription ID doesn't match\";\n\t\t\t}\n\t\t}\n\n\t\t// Check order ID\n\t\tif ($isValid)\n\t\t{\n\t\t\tif ($transaction->Order->OrderCode != $orderCode)\n\t\t\t{\n\t\t\t\t$isValid = false;\n\t\t\t\t$data['akeebasubs_failure_reason'] = \"Order code doesn't match\";\n\t\t\t}\n\t\t}\n\n\t\t// Check that transaction has not been previously processed\n\t\tif ($isValid && !is_null($subscription))\n\t\t{\n\t\t\tif ($subscription->processor_key == $orderCode && in_array($subscription->state, array('C', 'X')))\n\t\t\t{\n\t\t\t\t$isValid = false;\n\t\t\t\t$data['akeebasubs_failure_reason'] = \"I will not process the same transcation twice\";\n\t\t\t}\n\t\t}\n\n\t\t// Check that amount is correct\n\t\t$isPartialRefund = false;\n\n\t\tif ($isValid && !is_null($subscription))\n\t\t{\n\t\t\t$mc_gross = floatval($transaction->Amount);\n\t\t\t$gross = $subscription->gross_amount;\n\n\t\t\tif ($mc_gross > 0)\n\t\t\t{\n\t\t\t\t// A positive value means \"payment\". The prices MUST match!\n\t\t\t\t// Important: NEVER, EVER compare two floating point values for equality.\n\t\t\t\t$isValid = ($gross - $mc_gross) < 0.01;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$isPartialRefund = false;\n\t\t\t\t$temp_mc_gross = -1 * $mc_gross;\n\t\t\t\t$isPartialRefund = ($gross - $temp_mc_gross) > 0.01;\n\t\t\t}\n\n\t\t\tif (!$isValid)\n\t\t\t{\n\t\t\t\t$data['akeebasubs_failure_reason'] = 'Paid amount does not match the subscription amount';\n\t\t\t}\n\t\t}\n\n\t\t// Log the IPN data\n\t\t$this->logIPN($data, $isValid);\n\n\t\t// Fraud attempt? Do nothing more!\n\t\tif (!$isValid)\n\t\t{\n\t\t\t$error_url = 'index.php?option=com_akeebasubs' .\n\t\t\t\t'&view=Level&slug=' . $level->slug;\n\t\t\t$error_url = JRoute::_($error_url, false);\n\t\t\t$this->container->platform->redirect($error_url, 303, $data['akeebasubs_failure_reason'], 'error');\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Payment status\n\t\tswitch ($transaction->StatusId)\n\t\t{\n\t\t\t// Finalized (paid)\n\t\t\tcase 'F':\n\t\t\t// Dispute won (we keep the money)\n\t\t\tcase 'MW':\n\t\t\t\t$newStatus = 'C';\n\t\t\t\tbreak;\n\t\t\t// In progress (awaiting)\n\t\t\tcase 'A':\n\t\t\t\t$newStatus = 'P';\n\t\t\t\tbreak;\n\t\t\t// All other codes per https://github.com/VivaPayments/API/wiki/GetTransactions\n\t\t\tdefault:\n\t\t\t\t$newStatus = 'X';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Update subscription status (this also automatically calls the plugins)\n\t\t$updates = array(\n\t\t\t'akeebasubs_subscription_id' => $id,\n\t\t\t'processor_key' => $orderCode,\n\t\t\t'state' => $newStatus,\n\t\t\t'enabled' => 0\n\t\t);\n\n\t\tif ($newStatus == 'C')\n\t\t{\n\t\t\tself::fixSubscriptionDates($subscription, $updates);\n\t\t}\n\n\t\t$subscription->save($updates);\n\n\t\t// Run the onAKAfterPaymentCallback events\n\t\t$this->container->platform->importPlugin('akeebasubs');\n\t\t$this->container->platform->runPlugins('onAKAfterPaymentCallback', array(\n\t\t\t$subscription\n\t\t));\n\n\t\t// Redirect the user to the \"thank you\" page\n\t\t$thankyouUrl = JRoute::_('index.php?option=com_akeebasubs&view=Message&slug=' . $level->slug . '&task=thankyou&subid=' . $subscription->akeebasubs_subscription_id, false);\n\t\t$this->container->platform->redirect($thankyouUrl);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "028060ce996fd1d5942a5a4768309255", "score": "0.57100505", "text": "public function verify(Request $request): VerifiedPayment\n {\n if ($request->input('Status') !== 'OK') {\n throw new GatewayException(Status::toMessage(Status::NOT_PAID), Status::NOT_PAID);\n }\n\n try {\n $response = $this->client->post(\n $this->makeVerificationURL(),\n [RequestOptions::JSON => $this->makeVerificationData($request)]\n );\n } catch (ClientException | ServerException $exception) {\n GatewayHelper::zarinFails($exception);\n }\n\n $data = ClientHelper::getResponseData($response);\n\n $status = $data['Status'];\n if ($status !== Status::OPERATION_SUCCEED) {\n GatewayHelper::zarinFails($data);\n }\n\n return new VerifiedPayment($data['RefID']);\n }", "title": "" }, { "docid": "6c2f52f5fb4720b6de48d0f8abe9f032", "score": "0.57091856", "text": "public function checkPaymentMethod()\n {\n // If payment methods never checked yet, check and save result\n if (isset($this->attributes['params']) && is_null($this->getParam('hasPaymentMethod'))) {\n $this->getPaymentMethods();\n }\n\n return $this->hasPaymentMethod;\n }", "title": "" }, { "docid": "cdcbec1927c5e96e219570c314d7a0fb", "score": "0.5700518", "text": "public function getPaymentMethod();", "title": "" }, { "docid": "cdcbec1927c5e96e219570c314d7a0fb", "score": "0.5700518", "text": "public function getPaymentMethod();", "title": "" }, { "docid": "cdcbec1927c5e96e219570c314d7a0fb", "score": "0.5700518", "text": "public function getPaymentMethod();", "title": "" }, { "docid": "7f48871922e5123a1f26259f30b4084c", "score": "0.5699624", "text": "public function isVerified();", "title": "" }, { "docid": "7f48871922e5123a1f26259f30b4084c", "score": "0.5699624", "text": "public function isVerified();", "title": "" }, { "docid": "55a97e739829ff86aa97c75dc232e10c", "score": "0.5638251", "text": "protected function verify()\n {\n return true;\n }", "title": "" }, { "docid": "b6f8bffad9141f3ed02cdd25aae124f5", "score": "0.5598283", "text": "public function verify(){\n return $this->dispatch(func_get_args());\n }", "title": "" }, { "docid": "46394db006022e71f185249ff5fa35b7", "score": "0.5584254", "text": "public function checkPaymentAction()\r\n {\r\n if (! $this->_validateFormKey() || ! $this->getRequest()->isAjax()) {\r\n return;\r\n }\r\n\r\n $order = $this->_getActiveOrder();\r\n\r\n /** @var Comaxx_CmPayments_Helper_Api_IdealQR $helper */\r\n $helper = Mage::helper('cmpayments/api_idealQR');\r\n $helper->updatePaymentForOrder($order);\r\n\r\n $result = array(\r\n 'success' => false,\r\n );\r\n\r\n if ($order->getCmpaymentsChargeId()) {\r\n $result = $helper->getResultFromCharge($order);\r\n }\r\n\r\n $this->getResponse()->clearHeaders()->setHeader('Content-type', 'application/json', true);\r\n $this->getResponse()->setBody(json_encode($result));\r\n }", "title": "" }, { "docid": "08c2fab4f18260ac258f01eabb87ca3d", "score": "0.5569611", "text": "public function verify_signature() {\n\n\t}", "title": "" }, { "docid": "b2321528944cce9dda8f276b10b0e3c4", "score": "0.55629814", "text": "public function getVerify($confirmation_code = null) {\n\n if(is_null($confirmation_code)) {\n if(Auth::check()) {\n $user = Auth::user();\n \n if($user->confirmed) {\n return Redirect::to('/')\n ->with('flash_message', Lang::get('app.verify_success'))\n ->with('flash_severity', 'success');\n } else {\n return View::make('verify')\n ->with('user', Auth::user());\n }\n \n } else {\n return Redirect::guest('login');\n }\n }\n \n try {\n $user = User::whereConfirmationCode($confirmation_code)->firstOrFail();\n } catch(Exception $e) {\n return Redirect::to('/')\n ->with('flash_message', Lang::get('app.verify_failed'))\n ->with('flash_severity', 'danger'); \n }\n\n $user->confirmed = 1;\n $user->confirmation_code = null;\n $user->save();\n\n Auth::login($user);\n \n return Redirect::to('/')\n ->with('flash_message', Lang::get('app.verify_success'))\n ->with('flash_severity', 'success');\n }", "title": "" }, { "docid": "fed39d63498622ef3ffc8dffcc48c093", "score": "0.5561874", "text": "public function verify() {\n\t\tif(isset($this->controller->request->query['hub_challenge'])) {\n\t\t\techo $this->controller->request->query['hub_challenge'];\n\t\t\tdie();//This is the ugly bit, we just \n\t\t} else {\n\t\t\t$input = file_get_contents(\"php://input\");\n\t\t\tif(hash_hmac('sha1', $input, Configure::read('Instagram.secret')) == $this->controller->request->header('X-Hub-Signature')) {\n\t\t\t\treturn $this->process($input);\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "af67fe98539b777cb3c903dd85800d3a", "score": "0.55402833", "text": "abstract public function getPaymentMethod();", "title": "" }, { "docid": "af67fe98539b777cb3c903dd85800d3a", "score": "0.55402833", "text": "abstract public function getPaymentMethod();", "title": "" }, { "docid": "5a06e027e7e94097af7fd87a633ccabf", "score": "0.55138886", "text": "public function verify(Request $request)\n {\n $user=User::where('phone',$request->phone)->first();\n if ($user->hasVerifiedPhone()) {\n return response()->json([\n \"status\" => \"success\",\n \"code\" => \"208\",\n ], 208);\n }\n \n $request->validate(['code' => ['required', 'string', 'min:6', 'max:6', 'regex:/([0-9]{6,6})/'],]);\n \n if ($user->verification_code !== $request->code)\n {\n return response()->json([\n \"status\" => \"error\",\n \"code\" => \"201\",\n \"msj\" => \"el codigo es invalido\",\n ]);\n }\n \n $user->markPhoneAsVerified();\n return response()->json([\n \"status\" => \"success\",\n \"code\" => \"200\",\n ]);\n }", "title": "" }, { "docid": "a4ff1173a9b6a16058b5f52b64d1f588", "score": "0.547666", "text": "public function verifyCode(Request $request);", "title": "" }, { "docid": "753201d4b92f55a2f6ec343ea30a755d", "score": "0.54448795", "text": "public function isVerified(){\n\n\t}", "title": "" }, { "docid": "5e4150218be0e869736d468267057508", "score": "0.5434616", "text": "function verify()\n {\n\t\treturn true;\n }", "title": "" }, { "docid": "94105aadffea50c3cdd577be92098929", "score": "0.5428891", "text": "public function verify( $token ){\n $user = User::where(['email_token' => $token])->first();\n\n if(!$user){\n return response([\n 'message' => 'User not found.'\n ], 404);\n }\n\n //TODO: if exists then we verify the email\n $user->verified_email = true;\n $user->email_token = null;\n $user->save();\n return response([\n 'message' => 'Thank you your email is verified.'\n ], 200);\n }", "title": "" }, { "docid": "6e24e47e79fe19549b74126626ffe7de", "score": "0.54158264", "text": "public function verifyCode(Request $request) \n {\n $userphoneNumber = $request['mobile_phone_number'];\n $userprovidedcode = $request['verification_code'];\n $formatedphonenumber = PhoneNumber::make($userphoneNumber, 'NG')->formatE164();\n \n /* Get credentials from .env */ \n \n try {\n\n $auth_token = getenv(\"TWILIO_AUTH_TOKEN\");\n $account_sid = getenv(\"TWILIO_ACCOUNT_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n\n $twilio = new Client($account_sid, $auth_token); \n $verification_check = $twilio->verify->v2->services($twilio_verify_sid)\n ->verificationChecks\n ->create($userprovidedcode, [\"to\" => $formatedphonenumber]);\n \n if ($verification_check->status == 'approved') { //or if status === 'approved'\n $request->user()->markPhoneAsVerified(); // Return back to function that called. Log to admin.\n }\n\n } catch (TwilioException $e) {//catch errors or failed send and log to admin\n echo \"Error: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "d6ef85c61f5d5cd9e5ee72315f13ab5b", "score": "0.5414213", "text": "public function receive()\n {\n $form = $this->Controller->request->data;\n if (empty($form)) {\n return false;\n }\n\n $pay = array();\n $pay['result'] = $form['resultCode'];\n $pay['ref_num'] = @$form['referenceId'];\n $pay['user_id'] = $this->Controller->Auth->user('id');\n $pay['pay_date'] = Jalali::dateTime();\n $pay['type'] = 'آنلاین - بانک تجارت';\n $pay['status'] = 0;\n //Save info into table\n $this->Controller->Payment->id = $form['paymentId'];\n $payInfo = $this->Controller->Payment->find('first', array(\n 'conditions' => array('id' => $form['paymentId']),\n 'contain' => false,\n ));\n if (empty($payInfo)) {\n return false;\n }\n // This request is payed\n if ($payInfo['Payment']['status']) {\n return true;\n }\n $this->Controller->Payment->save($pay);\n\n //Read info from table\n $payInfo = $this->Controller->Payment->read(null);\n\n // Construct this variables \n $verify = false;\n $error = null;\n $msg = null;\n\n $res = false;\n\n // if every thing is OK call this method\n if ($payInfo['Payment']['result'] == '100') {\n // verify\n $res = $this->verify($payInfo['Payment']['ref_num']);\n // error in calling web method\n if ($res > 0) {\n if ($res == $payInfo['Payment']['price']) {\n //Save verify\n $this->Controller->Payment->save(array('status' => 1));\n $msg = 'تراکنش با موفقیت انجام شد';\n $msg .= '<br />کد پیگیری : ' . $payInfo['Payment']['ref_num'];\n $verify = true;\n }\n\n } else {\n $verify = false;\n $msg = 'تراکنش با موفقیت انجام نشد';\n $error = $this->errorVerify[$res] . '<br /> کد پیگیری : ' . $payInfo['Payment']['ref_num'];\n }\n } else {\n $verify = false;\n $msg = 'تراکنش با موفقیت انجام نشد';\n $error = 'اشکال در تائید پرداخت ';\n $error .= $this->errorResponse[$payInfo['Payment']['result']];\n }\n\n // Delete this row if hasn't pay\n if (!$verify) {\n $this->Controller->Payment->delete();\n }\n\n return compact('verify', 'error', 'msg');\n }", "title": "" }, { "docid": "18713ca21cad53f7fc7564b9d0ad43c7", "score": "0.5405616", "text": "private function SignatureVerify($_signature,$_paymentId,$_orderId)\n{\n try\n {\n // Create an object of razorpay class\n $api = new Api($this->razorpayId, $this->razorpayKey);\n $attributes = array('razorpay_signature' => $_signature, 'razorpay_payment_id' => $_paymentId , 'razorpay_order_id' => $_orderId);\n $order = $api->utility->verifyPaymentSignature($attributes);\n return true;\n }\n catch(\\Exception $e)\n {\n // If Signature is not correct its give a excetption so we use try catch\n return false;\n }\n}", "title": "" }, { "docid": "11b9630a5827244a9b2f2babf46499c0", "score": "0.53769404", "text": "public function testVerifyingCreditCard()\n {\n $response = Patient::Proof($this->person());\n\n $person = [\n 'personMeta' => [\n 'firstName' => $response->personMeta->firstName,\n 'lastName' => $response->personMeta->lastName,\n 'ssn4' => $response->personMeta->ssn4,\n 'dob' => $response->personMeta->dob\n ],\n 'creditCard' => [\n 'cardNumber' => '4111111111111111',\n 'cvv' => '382',\n 'expireYear' => '2019',\n 'expireMonth' => '09'\n ]\n ];\n\n $response = Patient::VerifyCreditCard($person, function($provision, $id) {\n // if we get here we'll have an id\n $this->assertNotNull($id);\n });\n }", "title": "" }, { "docid": "23976be1eb23dc8e826fa212b3db6583", "score": "0.53739876", "text": "function verify() {\n\t\tif($_GET['hub_verify_token'] == md5($_GET['hub_mode'].$this->password)) {\n\t\t\techo $_GET['hub_challenge'];\n\t\t}\n\t}", "title": "" }, { "docid": "a63e265bbe8d96cce7bfa46cc25781a8", "score": "0.53684396", "text": "public function testCheckoutFlow($paymentMethod)\n {\n try {\n $model = new Payment();\n $cart = Cart::getCart();\n $model->cart_id = $cart->id;\n $model->transaction_id = \\uniqid();\n $model->payment_method = $paymentMethod;\n $model->status = Payment::STATUS_COMPLETE;\n $model->save();\n return $this->completeCheckout($model);\n } catch (\\Exception $e) {\n Yii::error($e->getMessage(), __METHOD__);\n }\n }", "title": "" }, { "docid": "2ce7083110becfbd81aa42a1a2d1eccc", "score": "0.5357689", "text": "public function verifyUser(Request $request){\n $user_id = $request->input('user_id');\n $token = $request->input('token');\n\n $user = User::findOrFail($user_id);\n\n if($user->verify_token == $token){\n\n $user->verified = true;\n $user->save();\n\n $response = ['congratulations! verification successful'];\n return response(['message'=> $response], 200);\n }\n\n $error = ['invalid token, resend verification mail ?'];\n return response(['error'=> $error], 500);\n }", "title": "" }, { "docid": "a3c5e93e35b3e6707afca7f46e41ae74", "score": "0.5355992", "text": "function uc_veritrans_vtweb_payment_complete($order) {\n\n // Display an error if settings haven't been configured.\n $server_key = variable_get('uc_veritrans_server_key', '');\n if (empty($server_key)) {\n drupal_set_message(t('Veritrans payment method configuration isnt complete. Please check Veritrans Server Key.'), 'error');\n return FALSE;\n }\n\n // Set payment mode\n Veritrans_Config::$serverKey = variable_get('uc_veritrans_server_key', '');\n $payment_mode = variable_get('uc_veritrans_payment_mode', 'TEST');\n if ($payment_mode == 'TEST') {\n Veritrans_Config::$isProduction = FALSE;\n }\n else {\n Veritrans_Config::$isProduction = TRUE;\n }\n\n // Set 3DS setting\n $payment_mode = variable_get('uc_veritrans_3ds_mode', 'ON');\n if ($payment_mode == 'ON') {\n Veritrans_Config::$is3ds = TRUE;\n }\n else {\n Veritrans_Config::$is3ds = FALSE;\n }\n\n // build enabled payment method param\n // $list_enable_payments = array();\n // if (variable_get('uc_veritrans_pm_credit_card', TRUE) == TRUE)\n // $list_enable_payments[] = \"credit_card\";\n // if (variable_get('uc_veritrans_pm_bank_transfer', TRUE) == TRUE)\n // $list_enable_payments[] = \"bank_transfer\";\n // if (variable_get('uc_veritrans_pm_mandir_bill', TRUE) == TRUE)\n // $list_enable_payments[] = \"echannel\";\n // if (variable_get('uc_veritrans_pm_mandiri_clickpay', TRUE) == TRUE)\n // $list_enable_payments[] = \"mandiri_clickpay\";\n // if (variable_get('uc_veritrans_pm_cimb_clicks', TRUE) == TRUE)\n // $list_enable_payments[] = \"cimb_clicks\";\n // if (variable_get('uc_veritrans_pm_bri_epay', TRUE) == TRUE)\n // $list_enable_payments[] = \"bri_epay\";\n // if (variable_get('uc_veritrans_pm_telkomsel_cash', TRUE) == TRUE)\n // $list_enable_payments[] = \"telkomsel_cash\";\n // if (variable_get('uc_veritrans_pm_xl_tunai', TRUE) == TRUE)\n // $list_enable_payments[] = \"xl_tunai\";\n // if (variable_get('uc_veritrans_pm_indomaret', TRUE) == TRUE)\n // $list_enable_payments[] = \"cstore\";\n // if (variable_get('uc_veritrans_pm_mandiri_ecash', TRUE) == TRUE)\n // $list_enable_payments[] = \"mandiri_ecash\";\n\n // build item details param\n $items_details = array();\n foreach ($order->products as $item_id => $line_item) {\n $item = array();\n $item['id'] = $item_id;\n $item['quantity'] = $line_item->qty;\n $item['price'] = $line_item->price;\n $item['name'] = $line_item->title;\n $items_details[] = $item;\n }\n\n // set redirection urls param\n // $finish_redirect_url = variable_get('uc_veritrans_finish_redirect_url', 'vt_web/success');\n // $unfinish_redirect_url = variable_get('uc_veritrans_unfinish_redirect_url', 'vt_web/unfinish');\n // $error_redirect_url = variable_get('uc_veritrans_error_redirect_url', 'vt_web/error');\n\n // build vtweb param\n $params = array(\n \"vtweb\" => array(\n 'credit_card_3d_secure' => variable_get('uc_veritrans_3ds_mode', 'ON') == 'ON' ? TRUE : FALSE,\n 'finish_redirect_url' => url($finish_redirect_url, array('absolute' => TRUE)),\n 'unfinish_redirect_url' => url($unfinish_redirect_url, array('absolute' => TRUE)),\n 'error_redirect_url' => url($error_redirect_url, array('absolute' => TRUE)),\n ),\n 'transaction_details' => array(\n 'order_id' => $order->order_id,\n 'gross_amount' => $order->order_total,\n ),\n 'item_details' => $items_details,\n 'customer_details' => array(\n 'first_name' => $order->billing_first_name,\n 'last_name' => $order->billing_last_name,\n 'email' => $order->primary_email,\n 'phone' => $order->billing_phone,\n 'billing_address' => array(\n 'first_name' => $order->billing_first_name,\n 'last_name' => $order->billing_last_name,\n 'address' => $order->billing_street1 . ' ' . $order->billing_street2,\n 'city' => $order->billing_city,\n 'postal_code' => $order->billing_postal_code,\n 'country_code' => convert_country_code($order->billing_country),\n 'phone' => $order->billing_phone,\n ),\n ),\n );\n\n try {\n // submit order\n uc_cart_complete_sale($order);\n\n // update order status to pending\n uc_order_update_status($order->order_id, 'veritrans_pending');\n\n // Get vtweb URL using param\n $path = Veritrans_VtWeb::getRedirectionUrl($params);\n\n // Redirect to url\n drupal_goto($path);\n }\n catch (Exception $e) {\n drupal_set_message(check_plain($e->getMessage()), 'error');\n return t('Something went wrong.');\n }\n}", "title": "" }, { "docid": "4163539919dccde0264a6c2f5180dd96", "score": "0.53503346", "text": "function gw_validate_payment()\n\t{\n\t\t//--------------------------------------\n\t\t// INIT\n\t\t//--------------------------------------\n\t\t\n\t\t//--------------------------------------\n\t\t// Debug...\n\t\t//--------------------------------------\n\t\t\n\t\tif ( GW_TEST_MODE_ON )\n\t\t{\n\t\t\tif ( ! is_array( $_POST ) or ! count( $_POST ) )\n\t\t\t{\n\t\t\t\t$_POST = $_GET;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//--------------------------------------\n\t\t// URLS\n\t\t//--------------------------------------\n\t\t\n\t\t$urls = array( 'curl_full' => 'https://www.nochex.com/nochex.dll/apc/apc',\n\t\t\t\t\t 'sock_url' => 'ssl://www.nochex.com',\n\t\t\t\t\t 'sock_path' => '/nochex.dll/apc/apc' );\n\t\t\t\t\t \n\t\tforeach ($_POST as $key => $val)\n\t\t{\n\t\t\t$post_back[] = $key . '=' . urlencode (stripslashes($val));\n\t\t}\n\t\t\n\t\t$post_back_str = implode('&', $post_back);\t\t\t\t\t \n\t\t\t\t\t \n\t\t//--------------------------------------\n\t\t// Throw back to NoChex to verify\n\t\t//--------------------------------------\n\t\t\n\t\t$state = $this->core_post_back( $urls, $post_back_str, 443 );\n\t\t\n\t\t//--------------------------------------\n\t\t// Check...\n\t\t//--------------------------------------\n\t\t\n\t\t$state = $state == 'AUTHORISED' ? 'AUTHORISED' : 'INVALID';\n\t\t\n\t\tif ( $state != 'AUTHORISED' AND ! GW_TEST_MODE_ON )\n\t\t{\n\t\t\t$this->error = 'not_valid';\n\t\t\treturn array( 'verified' => FALSE );\n\t\t}\n\t\t\n\t\t//--------------------------------------\n\t\t// Populate return array\n\t\t//--------------------------------------\n\t\t\n\t\tlist( $purchase_package_id, $member_id, $cur_sub_id, ) = explode( 'x', trim($_POST['order_id']) );\n\t\t\n\t $return = array( 'currency_code' => 'GBP',\n\t\t\t\t\t\t 'payment_amount' => $_POST['amount'],\n\t\t\t\t\t\t 'member_unique_id' => intval($member_id),\n\t\t\t\t\t\t 'purchase_package_id'=> intval($purchase_package_id),\n\t\t\t\t\t\t 'current_package_id' => intval($cur_sub_id),\n\t\t\t\t\t\t 'verified' => TRUE,\n\t\t\t\t\t\t 'verification'\t\t => $this->ipsclass->input['verification'],\n\t\t\t\t\t\t 'subscription_id' => '0-'.intval($member_id),\n\t\t\t\t\t\t 'transaction_id' => $_POST['transaction_id'] );\n\t\t\n\t\t//--------------------------------------\n\t\t// Sort out payment status\n\t\t//--------------------------------------\n\t\t\n\t\t$return['payment_status'] = 'ONEOFF';\n\t\t\n\t\t//--------------------------------------\n\t\t// Pass back to handler\n\t\t//--------------------------------------\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "ac05bdb47ccc60a5525b5cd05e62498a", "score": "0.5348778", "text": "public function isVerifyPeer();", "title": "" }, { "docid": "99f33361f9f63de17de7ed34b8f5c6b8", "score": "0.534819", "text": "public function testV1RetrievePayment()\n {\n\n }", "title": "" }, { "docid": "a5eb8e94cea623de836a59d12b4e9aa0", "score": "0.5327356", "text": "public function setPaymentMethod($paymentMethod);", "title": "" }, { "docid": "e04be066de7aa238e8dc922245216f65", "score": "0.5301486", "text": "public function verify($serialNumber, $message, $signature);", "title": "" }, { "docid": "6df6a1c653160473e3959605bb2e6f83", "score": "0.52933174", "text": "public function hasVerifiedAccount();", "title": "" }, { "docid": "f9b067f23c576c1834f0e6a9f435cf47", "score": "0.52892405", "text": "public function getPaymentStatus()\n {\n $payment_id = Session::get('paypal_payment_id');\n /** clear the session payment ID **/\n Session::forget('paypal_payment_id');\n if (empty(Input::get('PayerID')) || empty(Input::get('token'))) {\n\n \\Session::put('error', 'Payment failed');\n return Redirect::route('profile');\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n /**Execute the payment **/\n $result = $payment->execute($execution, $this->_api_context);\n if ($result->getState() == 'approved') {\n\n\n if (auth()->check() && auth()->user()->UserType == 2) {\n $broker = BrokerInformation::where(\"UserID\", auth()->id())->update([\n \"SubscriptionID\" => intval(Session::get('subscription', 1)),\n \"SubscriptionStart\" => date('Y-m-d G:i:s'),\n ]);\n }\n\n \\Session::put('success', 'Payment success');\n return Redirect::route('profile');\n \n }\n \n \\Session::put('error', 'Payment failed');\n return Redirect::route('/');\n }", "title": "" }, { "docid": "14f7e6a8ef808b6e891c5f031dd6c119", "score": "0.5285982", "text": "public function paymentVerification()\n {\n $enrollments = \\App\\Enrollment::where('transaction_code', '')->where('status_id', '2')->orderBy('id','DESC')->get();\n\n foreach ($enrollments as $enrollment) {\n $updated_at = \\Carbon\\Carbon::createFromFormat('Y-m-d H:i:s', $enrollment->updated_at);\n $diff = $updated_at->diffInSeconds(\\Carbon\\Carbon::now());\n\n if($diff > 172800){\n \n //if($enrollment->event->getEndEnrollment()->isFuture()){\n \n $newSystemStatus = \\App\\Status::where('code', 'cancelled')->first();\n\n if($newSystemStatus){\n $enrollment->status_id = $newSystemStatus->id;\n $enrollment->save();\n\n $data = [\n 'email' => $enrollment->participant->email,\n 'event' => $enrollment->event->name,\n 'date' => $enrollment->event->getEventDate(),\n 'time' => $enrollment->event->getEventTime(),\n 'status' => $enrollment->name,\n 'description' => $enrollment->status()->get()->first()->description\n ];\n\n // $result = \\Mail::send('emails.enrollment', $data, function ($message) use ($data) {\n // $message->subject('Inscrição Cancelada')\n // ->to($data['email'])\n // ->sender(env('MAIL_USERNAME'));\n // });\n\n echo \"Enrollment Verified\";\n echo \"<br>\";\n }\n //}\n\n }\n }\n\n exit;\n\n }", "title": "" }, { "docid": "0731b43580f03d1015281d884ca75ee1", "score": "0.5280902", "text": "public function checkPayment(){\n if(defined('PLUGIN_OPTIONS') && isset($_POST['trans_id']) && isset($_POST['id_get'])){\n $registry = core\\registry::singleton();\n $api = $registry->get('payment','paylineApi');\n $trans_id = $_POST['trans_id'];\n $id_get = $_POST['id_get'];\n $result =\\payline\\payline::get($api,$trans_id,$id_get);\n if($result == 1) {\n //payment was successful;\n $orm = db\\orm::singleton();\n if ($orm->count('payment_transactions', 'sid=?', [PLUGIN_OPTIONS]) != 0){\n $transaction = $orm->findOne('payment_transactions', 'sid=?', [PLUGIN_OPTIONS]);\n $transaction->date = time();\n $transaction->trans_id = $trans_id;\n $transaction->id_get = $id_get;\n $transaction->state = 1;\n $orm->store($transaction);\n //run plugin module function\n if(method_exists('\\\\addon\\\\plugin\\\\' . $transaction->plugin . '\\\\module',$transaction->action))\n call_user_func(array('\\\\addon\\\\plugin\\\\' . $transaction->plugin . '\\\\module',$transaction->action),$transaction->sid);\n }\n //jump to show succesfull message\n return core\\router::jump(['payment','successMsg',$transaction->sid]);\n }\n }\n //jump to error page\n return core\\router::jump(['payment','failPaymentMsg']);\n }", "title": "" }, { "docid": "1ed4b77ae6d0792f78594e044b238d6b", "score": "0.5280316", "text": "public function getAccountForVerification();", "title": "" }, { "docid": "7569b6743cde202dca706ca1c8a9615a", "score": "0.5271266", "text": "public static function verifycode()\n {\n return Sms::proveVerifycode('login','13333339558','$code');\n }", "title": "" }, { "docid": "bbc8da4a38afa07f8c38ba6bda4617a6", "score": "0.52673405", "text": "abstract public function verify($data, $signature);", "title": "" }, { "docid": "08dd1b77b37702874ef455d02a490195", "score": "0.526373", "text": "public function getVerificationAlgorithm();", "title": "" }, { "docid": "1f0e4a5440e79c92810761fc5b819d8c", "score": "0.52591884", "text": "public function getPaymentMethod(): ?string;", "title": "" }, { "docid": "391c71038ab9599f218cac2388210ffe", "score": "0.5253078", "text": "public function getPaymentStatus(){\n // Get the payment ID before session clear\n $payment_id = session('paypal_payment_id');\n // clear the session payment ID\n Session::forget('paypal_payment_id');\n $payerID = Input::get('PayerID');\n $token = Input::get('token');\n if (empty($payerID) || empty($token)) {\n return Redirect::route('original.route')\n ->with('error', 'Payment failed');\n }\n\n $payment = Payment::get($payment_id, $this->_api_context);\n\n // PaymentExecution object includes information necessary\n // to execute a PayPal account payment.\n // The payer_id is added to the request query parameters\n // when the user is redirected from paypal back to our site\n $execution = new PaymentExecution();\n $execution->setPayerId(Input::get('PayerID'));\n\n //Execute the payment\n $result = $payment->execute($execution, $this->_api_context);\n\n// echo '<pre>';print_r($result);echo '</pre>';exit; // DEBUG RESULT, remove it later\n\n if ($result->getState() == 'approved') { // payment made\n Session::forget('payment_step1');\n return redirect('signup/thank_you')\n ->with('payment_success', 'Payment success');\n }\n return redirect('signup/thank_you')\n ->with('payment_error', 'Payment failed');\n }", "title": "" }, { "docid": "406464f067f25c4ac2c02a84c0651279", "score": "0.5247793", "text": "public function verify()\n\t{\n\t\t$data = array();\n\t\t$data['menu_header'] = $this->menu_model->get_tree((array('MenuID'=>1, 'ParentID'=>null,'Status'=>'Enabled')),1);\n\t\t$data['Title'] = \"Verify Imei Request\";\n\t\t$data['imeimethods'] = $this->method_model->get_where(array('Status'=> 'Enabled'));\n\t\t$data['template'] = \"member/imei/verifyrequest\";\n\t\t$id = $this->session->userdata('MemberID');\n\t\t$data['credit'] = $this->credit_model->get_credit($id);\n\t\tif($data['credit'][0]['credit'] == \"\" )\n\t\t{\n\t\t\t$data['credit'][0]['credit'] = 0;\n\t\t}\n\t\t$this->load->view('mastertemplate',$data);\n\t}", "title": "" }, { "docid": "a8e4c1ea7023b69d78457dd903642f27", "score": "0.52396005", "text": "protected function userPayment()\n {\n $this->authority = @$_GET['Authority'];\n $status = @$_GET['Status'];\n\n if ($status == 'OK') {\n\t\t\treturn true;\n }\n\n\t $this->transactionFailed();\n\t\t$this->newLog(\"Error\", \"NOK\");\n\t throw new ZarinpalException(\"Error\");\n }", "title": "" }, { "docid": "98d260ff54ec88a411ab9e51a466bf9b", "score": "0.52392685", "text": "public function verify(Request $request)\n {\n $user = User::findOrFail($request['id']);\n\n $verified = true;\n if (! hash_equals((string) $request['id'],\n (string) $user->getKey())) {\n $verified = false;\n }\n\n// if (! hash_equals((string) $request['hash'],\n// sha1($user->getEmailForVerification()))) {\n// $verified = false;\n// }\n\n if (! $user->hasVerifiedEmail()) {\n if ($verified){\n $user->markEmailAsVerified();\n\n event(new Verified($user));\n }\n }\n\n return response()->json('Email verified!');\n }", "title": "" }, { "docid": "5702bd7176dc61eb8e01622ff34cbfd4", "score": "0.5236767", "text": "public function verify($token)\n {\n $user = User::where('email_token',$token)->first();\n $user->verified = 1;\n if($user->save()){\n $this->createDefaults($user->id);\n return view('emailconfirm',['user'=>$user]);\n }\n }", "title": "" }, { "docid": "22000a71bc65a20fa3f6a75112315e9a", "score": "0.52342886", "text": "public function verifyOTPweb(Request $request){\n $number = $request->user()->telephone_number;\n $request->validate(\n [\n 'code' => 'required'\n ]);\n //dd($request->code);\n $unique_secret = md5('12345678');\n $result = Otp::digits(8)->expiry(30)->check($request->code, $unique_secret); // -> true\n //dd($result);\n \n if($result == true)\n { \n //throw new \\Exception(\"Error Processing Request \". $result);\n User::where('telephone_number', $number)\n ->update(['is_verified' => 1\n ]);\n\n return back()->with(\"success\", \"Numero de telephone verifie !!\");\n }\n else{\n return back()->with(\"danger\", \"Verifiez et recopiez exactement le code recu !!\");\n }\n \n }", "title": "" }, { "docid": "56be1b868ecaea7adc701fb2050c71ee", "score": "0.5231759", "text": "public function setVerify($verify)\n {\n $this->verify = $verify;\n }", "title": "" }, { "docid": "01fffe0f95fae524410e4d6351e0542d", "score": "0.52274776", "text": "public function verify(string $vatNumber);", "title": "" }, { "docid": "3f79ea91127cfab868100ba7c21ca8ed", "score": "0.52225417", "text": "public function getPaymentStatus($tokenPay, Request $request)\n\t{\n\t\t// $payment_id = \\Session::get('paypal_payment_id');\n\t\t$paymentBack = PaymentMethod::where('token', '=', $tokenPay)->first();\n\t\t$recharge = Recharge::where('id', $paymentBack->recharge_id)->first();\n\n\t\t// return response(['data' => $paymentBack], 200);\n\n\t\t// clear the session payment ID\n\t\t// \\Session::forget('paypal_payment_id');\n\n\t\t$payerId = $request->PayerID;\n\t\t$token = $request->token;\n\n\t\t//if (empty(\\Input::get('PayerID')) || empty(\\Input::get('token'))) {\n\t\tif (empty($payerId) || empty($token)) {\n\n\t\t\t\t$recharge->status = \"Cancel\";\n\t\t\t\t$recharge->save();\n\n\t\t\t\treturn Redirect::to(env('APP_CLIENT', 'https://turecarguita.com').'/dashboard/failed');\n\t\t\t\t// return Redirect::to(\"http://localhost:8080/dashboard/failed\");\n\n\t\t\t// return \\Redirect::route('home')\n\t\t\t// \t->with('message', 'Hubo un problema al intentar pagar con Paypal');\n\t\t}\n\n\t\t$payment = Payment::get($paymentBack->paypal_payment_id, $this->_api_context);\n\n\t\t// PaymentExecution object includes information necessary\n\t\t// to execute a PayPal account payment.\n\t\t// The payer_id is added to the request query parameters\n\t\t// when the user is redirected from paypal back to your site\n\t\t$execution = new PaymentExecution();\n\t\t$execution->setPayerId($payerId);\n\n\t\t//Execute the payment\n\t\t$result = $payment->execute($execution, $this->_api_context);\n\n\t\t//echo '<pre>';print_r($result);echo '</pre>';exit; // DEBUG RESULT, remove it later\n\n\t\tif ($result->getState() == 'approved') { // payment made\n\t\t\t// Registrar el pedido --- ok\n\t\t\t// Registrar el Detalle del pedido --- ok\n\t\t\t// Eliminar carrito\n\t\t\t// Enviar correo a user\n\t\t\t// Enviar correo a admin\n\t\t\t// Redireccionar\n\n\t\t\t$offer = Offer::where('id', $recharge->offer_id)->first();\n\t\t\t$contactRecharges = ContactRecharge::where('recharge_id', $paymentBack->recharge_id)->get();\n\n\t\t\t$now = Date('Y-m-d');\n\n\t\t\tif($now < $offer->date_ini && $offer->ads == 1) {\n\t\t\t\t\t$recharge->status = 'Scheduled';\n\t\t\t\t\t$recharge->save();\n\n\t\t\t\t\t// programacion success\n\t\t\t\t\treturn Redirect::to(env('APP_CLIENT', 'https://turecarguita.com').'/dashboard/success');\n\t\t\t\t\t// return Redirect::to(\"http://localhost:8080/dashboard/success\");\n\t\t\t}\n\n\t\t\t$user = User::find($recharge->user_id);\n\n\t\t\t// call ding\n\t\t\tforeach ($contactRecharges as $contactRecharge) {\n\n\t\t\t\t\t$user->accumulated += $recharge->price_pay * 0.01;\n\t\t\t\t\t$user->save();\n\n\t\t\t\t\tif ($recharge->type == \"Cell\") {\n\t\t\t\t\t\t\t$status = $this->dingSendTransfer($contactRecharge->phone, $recharge->recharge_amount, $contactRecharge->id, \"CU_CU_TopUp\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$status = $this->dingSendTransfer($contactRecharge->email, $recharge->recharge_amount, $contactRecharge->id, \"CU_NU_TopUp\");\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($status == true) {\n\t\t\t\t//\n\t\t\t\t$recharge->status = \"Accepted\";\n\t\t\t\t$recharge->save();\n\t\t\t\t$paymentBack->is_payment = 1;\n\t\t\t\t$paymentBack->save();\n\t\t\t\t// $urlBack = Setting::first()->server_client;\n\t\t\t\t// return Redirect::to($urlBack.\"dashboard/success\");\n\t\t\t\treturn Redirect::to(env('APP_CLIENT', 'https://turecarguita.com').'/dashboard/success');\n\t\t\t\t// return Redirect::to(\"http://localhost:8080/dashboard/success\");\n\t\t\t} else {\n\t\t\t\t//\n\t\t\t\t$recharge->status = \"Denied\";\n\t\t\t\t$recharge->save();\n\t\t\t\t// $urlBack = Setting::first()->server_client;\n\t\t\t\t// return Redirect::to($urlBack.\"dashboard/failedDing\");\n\t\t\t\treturn Redirect::to(env('APP_CLIENT', 'https://turecarguita.com').'/dashboard/failedDing');\n\t\t\t\t// return Redirect::to(\"http://localhost:8080/dashboard/failedDing\");\n\t\t\t}\n\n\t\t\t// $this->saveOrder(\\Session::get('cart'));\n\n\t\t\t// \\Session::forget('cart');\n\n\n\t\t\t// return \\Redirect::route('home')\n\t\t\t// \t->with('message', 'Compra realizada de forma correcta');\n\t\t}\n\n\t\treturn Redirect::to(env('APP_CLIENT', 'https://turecarguita.com').'/dashboard/failed');\n\t\t// return Redirect::to(\"http://localhost:8080/dashboard/failed\");\n\t\t// return \\Redirect::route('home')\n\t\t// \t->with('message', 'La compra fue cancelada');\n\t}", "title": "" }, { "docid": "0cf2a55344b803e22120ebb5ac24f8ff", "score": "0.5219961", "text": "public function testVerifySuccess($transaction)\n {\n $glade = new GladePay;\n\n $verification = $glade->verify($transaction[\"txnRef\"]);\n\n $this->assertIsArray($verification);\n\n $this->assertArrayHasKey('message', $verification, $message = 'returned array has no such key');\n $this->assertArrayHasKey('txnRef', $verification, $message = 'returned array has no such key');\n $this->assertArrayHasKey('txnStatus', $verification, $message = 'returned array has no such key');\n $this->assertArrayHasKey('payment_method', $verification, $message = 'returned array has no such key');\n $this->assertArrayHasKey('bank_message', $verification, $message = 'returned array has no such key');\n\n $this->assertEquals(200, $verification['status']);\n }", "title": "" }, { "docid": "0be71433f1a61f497ff02c1fb8f6a8ad", "score": "0.52174664", "text": "public function verify()\n\t {\n\t \treturn FormHandler::verify($this);\n\t }", "title": "" }, { "docid": "f44557440fa375c7124724b5e14dd006", "score": "0.5213203", "text": "public function verify()\n {\n\n $num_args = func_num_args();\n $arg = (sizeof(func_get_args()) > 0) ? func_get_args()[0] : ''; // used in pre-production\n\n if ($num_args === 0 || $num_args === 1 && in_array($arg, VALID_URIS))\n {\n $uri = $arg;\n $has_token = false;\n $encrypted_token = $this->get_token_from_header();\n\n if (!is_array($encrypted_token))\n {\n $encrypted_token = $error_message;\n return $error_message;\n }\n\n $encrypted_token = $encrypted_token['response_value']['token'];\n }\n elseif ($num_args === 1 && !in_array($arg, VALID_URIS))\n {\n $encrypted_token = $arg;\n }\n\n $private_key = $this->get_private_key();\n\n if (!$private_key)\n {\n return 'Invalid private key.';\n }\n\n $public_key = $this->get_public_key($private_key);\n\n if (!$public_key)\n {\n return \"Public key couldn't be generated.\";\n }\n\n $decrypted_token = $this->decrypt_token($encrypted_token, $public_key['key']);\n\n if (!$decrypted_token)\n {\n return openssl_error_string();\n }\n\n if (!stristr($decrypted_token, '.'))\n {\n return \"Token doesn't contain expected delimiter.\";\n }\n\n if (count(explode('.', $decrypted_token)) !== 3)\n {\n return \"Token doesn't contain expected structure.\";\n }\n\n // split and decode token structure\n list($header, $payload, $signature) = explode('.', $decrypted_token);\n $decoded_header = $this->decode_token_structure($header);\n $decoded_payload = $this->decode_token_structure($payload);\n\n if ($decoded_payload['iss'] !== ISSUER)\n {\n return \"Token doesn't contain expected issuer.\";\n }\n\n $token_type = 'authentication';\n $token_model = new JWTModel();\n $jti = filter_var($decoded_payload['jti'], FILTER_SANITIZE_STRING);\n $stored_token = $token_model->find_by_jti($token_type, $jti);\n\n if (!$stored_token)\n {\n return 'Invalid token ID.';\n }\n\n $jwt = filter_var($encrypted_token, FILTER_SANITIZE_STRING);\n\n if ($token_model->find_by_token('blacklist', $jwt))\n {\n return 'Token was found in the blacklist.';\n }\n\n if (!$token_model->find_by_token($token_type, $jwt))\n {\n return 'Invalid token.';\n }\n\n if (isset($has_token) && !$has_token)\n {\n $user_id = filter_var($decoded_payload['id_user'], FILTER_SANITIZE_STRING);\n\n if (!$token_model->find_by_user($token_type, $user_id))\n {\n return 'Invalid user ID.';\n }\n }\n\n $now = date('Y-m-d H:i:s');\n\n // this condition is not working: $stored_token['created_at'] > $now\n if ($decoded_payload['iat'] > time())\n {\n return 'Token was issued in the future.';\n }\n\n if ($decoded_payload['exp'] < time() || $stored_token['expires_at'] < $now)\n {\n if (isset($uri) && $uri === 'refresh_token')\n {\n if (!$this->refresh_token())\n {\n return \"Token couldn't be refreshed.\";\n }\n }\n\n $revoked_tokens = $this->revoke_tokens($token_model, $stored_token['jti'], $stored_token['token'], $stored_token['users_id']);\n\n if ($revoked_tokens !== true)\n {\n $error_message = $revoked_tokens;\n return $error_message;\n }\n\n return 'Authentication token expired. Please, login again.';\n }\n\n $signature = $this->verify_signature(\"$header.$payload\", $this->base64_decode_url($signature), $public_key['key'], $decoded_header['alg']);\n\n if (!$signature)\n {\n return \"Token's signature couldn't be verified.\";\n }\n\n return $this->response_handler('valid_authentication_token', true);\n }", "title": "" }, { "docid": "6995c5845ea14a0000a953d0918b9069", "score": "0.5203528", "text": "public function isVerified()\n {\n $params = [\n 'body' => ['cmd' => '_notify-validate'] + $this->request->all(),\n 'timeout' => 60,\n 'httpversion' => '1.1',\n 'compress' => false,\n 'decompress' => false,\n 'user-agent' => $this->settingRepository->userAgent(),\n ];\n\n try {\n list($code, $body) = $this->remotePost($this->settingRepository->paypalUrl(), $params);\n } catch (Exception $exc) {\n $this->logger->error($exc);\n\n $code = 0;\n $body = '';\n }\n\n if ($code >= 200 && $code < 300 && stripos($body, self::STATUS_VERIFIED) !== false) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "36ad02010d0db58da7a42aa2fb86db29", "score": "0.5193935", "text": "public function verify(object $transaction);", "title": "" }, { "docid": "4591f90f71ab4c562fe1b4062edee254", "score": "0.51902324", "text": "public function __phpunit_verify() {\n return $this->mock->__phpunit_verify();\n\n }", "title": "" }, { "docid": "057a0c3599f99b25863059fe08c82d70", "score": "0.5188675", "text": "public function verify_post()\n {\n $this->response([\n \"status\" => true,\n \"message\" => \"success.\"\n ]);\n \n }", "title": "" }, { "docid": "47c545d471ea23bfb8cbcd91241ccbb3", "score": "0.51498616", "text": "public function receive()\n {\n $form = $this->Controller->request->data;\n if (empty($form)) {\n return false;\n }\n\n $pay = array();\n $pay['result'] = $form['resultCode'];\n $pay['ref_num'] = @$form['referenceId'];\n $pay['user_id'] = $this->Controller->Auth->user('id');\n $pay['pay_date'] = Jalali::dateTime();\n $pay['type'] = 'آنلاین - تست';\n $pay['status'] = 0;\n //Save info into table\n $this->Controller->Payment->id = $form['paymentId'];\n $payInfo = $this->Controller->Payment->find('first', array(\n 'conditions' => array('id' => $form['paymentId']),\n 'contain' => false,\n ));\n if (empty($payInfo)) {\n return false;\n }\n // This request is payed\n if ($payInfo['Payment']['status']) {\n return true;\n }\n $this->Controller->Payment->save($pay);\n\n //Read info from table\n $payInfo = $this->Controller->Payment->read(null);\n\n // Construct this variables \n $verify = false;\n $error = null;\n $msg = null;\n\n $res = false;\n\n // if every thing is OK call this method\n if ($payInfo['Payment']['result'] == '100') {\n //Save verify\n $this->Controller->Payment->save(array('status' => 1));\n $msg = 'تراکنش با موفقیت انجام شد';\n $msg .= '<br />کد پیگیری : ' . $payInfo['Payment']['ref_num'];\n $verify = true;\n } else {\n $verify = false;\n $msg = 'تراکنش با موفقیت انجام نشد';\n $error = 'اشکال در تائید پرداخت ';\n $error .= $this->errorResponse[$payInfo['Payment']['result']];\n }\n // Delete this row if hasn't pay\n if (!$verify) {\n $this->Controller->Payment->delete();\n }\n return compact('verify', 'error', 'msg');\n }", "title": "" }, { "docid": "8588f6a6af3dc432070b81b6d2e9ab22", "score": "0.5145948", "text": "public function verify($email_verification_token) {\n $user = User::where('email_verification_token', $email_verification_token)->first();\n\n // Verify them\n $user->verified = 1;\n $user->save();\n\n // Redirect to dashboard\n return redirect(url('/members/dashboard/'));\n }", "title": "" }, { "docid": "edaf4cc78be924da82c905cc4d8d8575", "score": "0.51450557", "text": "public function isVerified() {\n return $this->response == \"VERIFIED\";\n }", "title": "" }, { "docid": "d56157aa55f936bd2fb308ea4c1172df", "score": "0.5138343", "text": "public function paypalPaymentMethodIsValid()\n {\n return (bool) $this->getPaypalPaymentStatus();\n }", "title": "" }, { "docid": "34fa1c1ab92734f008e325f80e55d2df", "score": "0.5137395", "text": "function paypalexpress_verifypayment($params, $extraFields = null){\n\n\t//funciton should return an array of result with status = success/fail, invoiceid, amount paid, transaction id if any \n\t$result = array(\"status\" => \"fail\",\"invoiceid\" => \"\",\"paid\" => 0,\"transactionid\" => \"\");\n\n\t\t$postfields = array();\n\t\tif(empty($extraFields)){\n\t\t$postfields['TOKEN'] = $_SESSION['paypalexpress']['token'];\t\n\t}else{\n\t\t$postfields['TOKEN'] = $extraFields['token'];\n\t}\n\t\n\n\t\n\n\t$results = paypalexpress_api_call( $params, \"GetExpressCheckoutDetails\", $postfields );\n\t$ack = strtoupper( $results['ACK'] );\n\n\tif ($ack == \"SUCCESS\" || $ack == \"SUCCESSWITHWARNING\") {\n\n\n\t\t$postfields['PAYMENTREQUEST_0_PAYMENTACTION'] = \"SALE\";\n\t\t$postfields['PAYMENTREQUEST_0_AMT'] = $results['PAYMENTREQUEST_0_AMT'];\n\t\t$postfields['PAYMENTREQUEST_0_CURRENCYCODE'] = $results['PAYMENTREQUEST_0_CURRENCYCODE'];\n\t\t$postfields['IPADDRESS'] = $_SERVER['SERVER_NAME'];\n\n\t\t\tif(empty($extraFields)){\n\t\t\t$postfields['PAYERID'] = $results['PAYERID'];\n\t\t\t}else{\n\t\t\t$postfields['PAYERID'] = $extraFields['payerid'];\n\t\t\t}\n\n\t\t\n\t\t$results2 = paypalexpress_api_call( $params, \"DoExpressCheckoutPayment\", $postfields );\n\t\t$ack2 = strtoupper( $results2['ACK'] );\n\t\t\n\t\tif($ack2 == \"SUCCESS\" || $ack2 == \"SUCCESSWITHWARNING\"){\n\n\t\t\t$txn_id = $results2['PAYMENTINFO_0_TRANSACTIONID'];\n\t\t\t$transactionType = $results2['PAYMENTINFO_0_TRANSACTIONTYPE'];\n\t\t\t$paymentType = $results2['PAYMENTINFO_0_PAYMENTTYPE'];\n\t\t\t$orderTime = $results2['PAYMENTINFO_0_ORDERTIME'];\n\t\t\t$amt = $results2['PAYMENTINFO_0_AMT'];\n\t\t\t$currencyCode = $results2['PAYMENTINFO_0_CURRENCYCODE'];\n\t\t\t$feeAmt = $results2['PAYMENTINFO_0_FEEAMT'];\n\t\t\t$settleAmt = $results2['PAYMENTINFO_0_SETTLEAMT'];\n\t\t\t$taxAmt = $results2['PAYMENTINFO_0_TAXAMT'];\n\t\t\t$exchangeRate = $results2['PAYMENTINFO_0_EXCHANGERATE'];\n\t\t\t$paymentStatus = $results2['PAYMENTINFO_0_PAYMENTSTATUS'];\n\t\t\t$invoiceid = $params['invoiceid'];\n\n\t\t\tif ($paymentStatus == \"Completed\") {\n\n\t\t\t$result = array(\"status\" => \"success\",\"invoiceid\" => $invoiceid,\"paid\" => $amt,\"transactionid\" => $txn_id);\n\t\t\treturn $result;\n\t\t\t}else{\n\n\t\t\t\treturn $result;\n\t\t\t}\n\n\t\t}else{\n\n\t\t\treturn $results2;\n\n\t\t}\n\t}else{\n\t\t\t$r = array(\"Error\" => \"GetExpressCheckoutDetails\", \"result\" => $results);\n\t\t\treturn $results;\n\n\t\t}\n\n\n}", "title": "" }, { "docid": "fb779ff036ba8a9adedb66bdfbcf841f", "score": "0.51365757", "text": "public function isPayment();", "title": "" }, { "docid": "25cb1e997cdf40435cdede3c0b13d1b7", "score": "0.51354665", "text": "function verifyAccount($t) {\n $token = $t;\n \n $candidate_token = Candidate::where('verify_token',$token)->get();\n \n if($candidate_token->count()>0)\n {\n Candidate::where('verify_token',$token)->update(['verified'=>1]);\n $msg=1;\n }\n else\n $msg=0;\n return view('icamp19.inc.mailVerificationPage')->with('msg',$msg);\n }", "title": "" }, { "docid": "b8c087fb873c8db16f0a094f9a6c7bc2", "score": "0.5132165", "text": "public function isVerified()\n {\n return $this->getState() == Payment::STATE_VERIFIED;\n }", "title": "" }, { "docid": "c6a9bdb03365c2243d8fa75dd429a47f", "score": "0.5130085", "text": "function verifiCode(){\n\t\ttry{\n\t\t\t$response = $this->setResponse($data = array(),$city=null);\n\t\t\techo $_SESSION['mv'];\n\t\t\tif(isset($_SESSION['ev']) && isset($_SESSION['mv'])){\n\t\t\t\tif(isset($_GET['mv'])){\n\t\t\t\t\tif($_SESSION['mv'] != $_GET['mv']){\n\t\t\t\t\t\tthrow new Exception(\"Mobile Verification Failed. Please try again.\");\n\t\t\t\t\t}\n\t\t\t\t\t$response['mobilestatus'] = \"success\";\n\t\t\t\t\t$response['data']['user_mobile'] = $_SESSION['user_mobile'];\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$response['mobilestatus'] = \"pending\";\n\t\t\t\t}\n\t\t\t\tif(isset($_GET['ev'])){\n\t\t\t\t\tif($_SESSION['ev'] != $_GET['ev']){\n\t\t\t\t\t\tthrow new Exception(\"Email Verification Failed. Please try again.\");\n\t\t\t\t\t}\n\t\t\t\t\t$response['emailstatus'] = \"success\";\n\t\t\t\t\t$response['data']['user_email'] = $_SESSION['user_email'];\n\t\t\t\t\t$response['ev'] = $_GET['ev'];\n\t\t\t\t}else{\n\t\t\t\t\t$response['emailstatus'] = \"pending\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$response[\"status\"] = \"success\";\n\t\t\t$response[\"message\"] = \"Code Verification done successfully\";\n\t\t}catch(Exception $e){\n $response = $this->setResponse($data = array(),$city=null);\n $response[\"status\"] = \"error\";\n $response[\"message\"] = $e->getMessage();\n }\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "6adb56156ea8ca42aa75ab2c366e1def", "score": "0.51162106", "text": "public function forgotPasswordVerify()\n {\n if( (isset($_POST['user_email'])) && (isset($_POST['random_code'])) ){\n //get user from email\n $user = $this->CommonModel->getRecord('user_master', array('user_email'=>$_POST['user_email'],'random_code' => $_POST['random_code'],'is_verified'=>1));\n\n if($user->num_rows() == 0){\n //error user not found\n $this->response_array['vanshavali_response']['code'] = 204;\n $this->response_array['vanshavali_response']['message'] = \"User Verification Failure.Try Later\";\n }\n else{\n $user = $user->row_array();\n $this->response_array['vanshavali_response']['code'] = 200;\n $this->response_array['vanshavali_response']['message'] = \"User Forgot Password Code Correct\";\n }\n\n }else{\n $this->response_array['vanshavali_response']['code'] = 400;\n $this->response_array['vanshavali_response']['message'] = \"Error 400 . bad Request\";\n }\n echo json_encode($this->response_array);\n exit;\n }", "title": "" }, { "docid": "a8347ebfd617e7555a34bbda6502dd7d", "score": "0.51115966", "text": "public function verify_request( $data ) {\n\t\t$result = false;\n\n\t\t$signature = Pronamic_WP_Pay_Buckaroo_Security::get_signature( $data );\n\n\t\t$signature_check = Pronamic_WP_Pay_Buckaroo_Security::create_signature( $data, $this->get_secret_key() );\n\n\t\tif ( strcasecmp( $signature, $signature_check ) === 0 ) {\n\t\t\t$data = array_change_key_case( $data, CASE_LOWER );\n\n\t\t\t$result = filter_var_array( $data, array(\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::PAYMENT => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::PAYMENT_METHOD => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::STATUS_CODE => FILTER_VALIDATE_INT,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::STATUS_CODE_DETAIL => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::STATUS_MESSAGE => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::INVOICE_NUMBER => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::AMOUNT => FILTER_VALIDATE_FLOAT,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::CURRENCY => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::TIMESTAMP => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_ISSUER => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_NAME => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_IBAN => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::SERVICE_IDEAL_CONSUMER_BIC => FILTER_SANITIZE_STRING,\n\t\t\t\tPronamic_WP_Pay_Buckaroo_Parameters::TRANSACTIONS => FILTER_SANITIZE_STRING,\n\t\t\t) );\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8113a3b9dcb3eb8c534c214cc0cffd05", "score": "0.5111204", "text": "public function getPaymentMethodId();", "title": "" }, { "docid": "c1c2abed1f459582b8fe61c33971cfe4", "score": "0.51027495", "text": "public function identity_verification(Request $request){\n if(session()->get('registration_id')){\n if ($request->isMethod('post')){\n $validation = array();\n $validation['code']='required';\n $this->validate($request,$validation);\n $mcode=$request->code;\n $this->verifyMobile($mcode); \n }\n if($this->isMobileVerified() && $this->isEmailVerified()) {\n //update the user as active user \n DB::table(TBL_USER)\n ->where('user_id',session()->get('registration_id'))\n ->update(array('user_status'=>1)); \n return redirect('payment');\t\t\t\n }\n if(!$this->isEmailVerified()){\n session()->put('email_not_verified','not_verified'); \n }else{\n session()->put('email_not_verified',''); \n }\n if(!$this->isMobileVerified()){\n session()->put('mobile_not_verified','not_verified'); \n }else{\n session()->put('mobile_not_verified','');\n session()->put('mobile_code','');\n } \n return view('tradesmen_verification');\n }else{ \n return redirect('tradesmen-signup');\n }\n\t}", "title": "" }, { "docid": "f9fa8c3598e959f44506a3db492b978a", "score": "0.51024586", "text": "public function licenseVerification(Request $request)\r\n {\r\n $data = [\r\n 'license_refresh' => true,\r\n 'license_key' => $request->license_key,\r\n 'server_ip' => $_SERVER['SERVER_ADDR']\r\n ];\r\n\r\n $result = json_decode(\\Helper::verifyLicense($data), true);\r\n\r\n if($result['verify']) {\r\n DB::table('settings')->whereId(config('mc.app_id'))->update(['license_key' => $request->license_key]);\r\n $result['message'] = 'Successfully updated!';\r\n }\r\n\r\n return response()->json([\r\n 'verify' => $result['verify'],\r\n 'message' => $result['message']\r\n ]);\r\n\r\n }", "title": "" }, { "docid": "c15482317c1bdb5711db4e31edd42948", "score": "0.5101557", "text": "public function verification($token)\n {\n $user = TableRegistry::get('Users');\n $query = $user->query();\n $query->update()\n ->set(['verified' => 1])\n ->where(['token' => $token])\n ->execute();\n\n// $verify = $user->find('all')->where(['token'=>$token])->first();\n// $user->save($verify);\n\n $this->Flash->success('Your email has been verified! Please Log in. ');\n sleep(3);\n $this->redirect(['action' => 'login']);\n $this->Flash->success('Your email has been verified! Please Log in. ');\n\n\n }", "title": "" }, { "docid": "2c78f76bb21ad27c73fba97948e1ad5a", "score": "0.5101174", "text": "function bank_paypalexpress_hash_call($config, $methodName, $nvpStr){\n\t$API_UserName = $config['API_USERNAME'];\n\t$API_Password = $config['API_PASSWORD'];\n\t$API_Signature = $config['API_SIGNATURE'];\n\t$API_Endpoint = paypal_api_endpoint($config);\n\t$api_version = _PAYPAL_API_VERSION;\n\n\t//NVPRequest for submitting to server\n\t$nvpreq = \"METHOD=\" . urlencode($methodName) . \"&VERSION=\" . urlencode($api_version) . \"&PWD=\" . urlencode($API_Password) . \"&USER=\" . urlencode($API_UserName) . \"&SIGNATURE=\" . urlencode($API_Signature) . $nvpStr;\n\n\t$proxy_host = $proxy_port = '';\n\tif (_PAYPAL_API_USE_PROXY){\n\t\t$proxy_host = _PAYPAL_API_PROXY_HOST;\n\t\t$proxy_port = _PAYPAL_API_PROXY_PORT;\n\t}\n\n\t$bank_recuperer_post_https = charger_fonction(\"bank_recuperer_post_https\", \"inc\");\n\tlist($response, $erreur, $erreur_msg) = $bank_recuperer_post_https($API_Endpoint, $nvpreq, '', $proxy_host, $proxy_port);\n\n\tif ($erreur){\n\t\t// moving to display page to display curl errors\n\t\t$_SESSION['curl_error_no'] = $erreur;\n\t\t$_SESSION['curl_error_msg'] = $erreur_msg;\n\t\tspip_log('Erreur bank_recuperer_post_https : ' . $erreur . ';' . $erreur_msg, $config['presta'] . _LOG_ERREUR);\n\t\treturn false;\n\t}\n\n\t//convrting NVPResponse to an Associative Array\n\t$nvpResArray = bank_paypalexpress_deformatNVP($response);\n\n\treturn $nvpResArray;\n}", "title": "" }, { "docid": "c51c10033066ed96b077ba8dcaf0dea2", "score": "0.5096517", "text": "public function getTransaction($data, Payment_Invoice $invoice) {\n $ipn = $data['post'];\n require_once ('./bb-includes/nusoapp.php');\n $MerchantID = $this->getParam('merchantID');\n $Password = $this->getParam('password');\n $amount = (int) $invoice->getTotalWithTax();\n if ($this->getParam('currencie') == '0')\n $amount = $amount / 10;\n $Pay_Status = 'Failed';\n $VerifyAnswer = '';\n $Refnumber = $ipn['refnumber'];\n if (isset ($ipn['status']) && $ipn['status'] == 100) {\n //arianpal successed payments condition\n $Status = $ipn['status'];\n $Resnumber = $ipn['resnumber'];\n $client = new nusoap_client('http://merchant.arianpal.com/WebService.asmx?wsdl', 'wsdl');\n $err = $client->getError();\n if ($err) {\n throw new Exception('<h2>Fault</h2><pre>' . $result . '</pre>');\n }\n else\n {\n $parameters = array(\"MerchantID\" => $MerchantID, \"Password\" => $Password, \"Price\" => $amount, \"RefNum\" => $Refnumber);\n $result = $client->call('verifyPayment', $parameters);\n\n if ($client->fault) {\n throw new Exception('<h2>Fault</h2><pre>' . $result . '</pre>');\n }\n else\n {\n $resultStr = $result;\n $err = $client->getError();\n if ($err) {\n throw new Exception('<h2>Fault</h2><pre>' . $err . '</pre>');\n }\n else\n {\n $Status = $result['verifyPaymentResult']['ResultStatus'];\n error_log('Verify answer:' . $Status);\n if ($Status == 'Success') {\n $Pay_Status = 'OK' ;\n }\n else {\n $Pay_Status = 'Verifyed';\n }\n }\n }\n }\n }\n else\n {\n error_log('Verify answer:' . $ipn['status']);\n }\n if ($Pay_Status != 'OK') {\n throw new Payment_Exception('arianpal Verification Failed: ' . $Pay_Status);\n }\n $response = new Payment_Transaction();\n $response->setType(Payment_Transaction :: TXTYPE_PAYMENT);\n $response->setId($Refnumber);\n $response->setAmount($invoice->getTotalWithTax());\n $response->setCurrency($invoice->getCurrency());\n $response->setStatus(Payment_Transaction :: STATUS_COMPLETE);\n return $response;\n }", "title": "" } ]
e029dcf144f815a4e8b7c096e66fdd33
/ Test si l'ajout fonctionne
[ { "docid": "13b86569b3183484f62de8989f0dc991", "score": "0.54666585", "text": "public function testAdd()\n {\n $client = static::createClient(array(), array(\n 'PHP_AUTH_USER' => 'jr',\n 'PHP_AUTH_PW' => 'jr',\n ));\n $client->followRedirects();\n\n $crawler = $client->request('GET', '/clients');\n $link = $crawler->filter('.bloc__title a')->first()->link();\n $crawler = $client->click($link);\n $newproject = $crawler->selectLink('Ajouter un projet')->link();\n $crawler = $client->click($newproject);\n\n $form = $crawler->selectButton('flyd_dashboardbundle_project_save')->form();\n //var_dump($form->getValues()); die();\n\n // définit certaines valeurs\n $form['flyd_dashboardbundle_project[title]'] = 'Projet de test';\n $form['flyd_dashboardbundle_project[category]'] = 1;\n\n // soumet le formulaire\n $crawler = $client->submit($form);\n\n $this->assertEquals(1, $crawler->filter('html:contains(\"Projet bien enregistré.\")')->count());\n\n }", "title": "" } ]
[ { "docid": "ad95278beaa977662a94bc0a348832e1", "score": "0.60650384", "text": "function ajoutFamille($nom, $nbenfants, $idlangue1, $pays, $francais, $bdd) {\n\t$verif = verifFamille($nom, $pays, $bdd);\n\t// $verif['bool']=true;\n\tif ($verif['bool']==true) {\n\t\t$requete = $bdd->prepare('INSERT INTO famille(nom_famille, nombre_enfants, id_langue_1, francais, pays) \n\t\t\tVALUES(:nom, :nbenfants, :idlangue1, :francais, :pays)');\n\t\t$requete->execute(array(':nom' => $nom,\n\t\t\t'nbenfants' => $nbenfants,\n\t\t\t'idlangue1' => $idlangue1,\n\t\t\t'francais' => $francais,\n\t\t\t'pays' => $pays\n\t\t\t));\n\t\t$reponse[\"commentaire\"] = \"Ajout effectué\";\n\t\t$reponse[\"id_insert\"] = $bdd->lastInsertId();\n\t\t$reponse[\"erreur\"] = 0;\n\t} else {\n\t\t$reponse[\"commentaire\"] = \"Cette famille existe déjà !\";\n\t\t$reponse[\"babysitting\"] = $verif['famille'];\n\t\t$reponse[\"erreur\"] = 1;\n\t}\n\t\n\tafficheRetour($reponse, \"ajoutFamille\");\n}", "title": "" }, { "docid": "e5850350764139acdef88b75892696ee", "score": "0.5818962", "text": "function produit()\n{\n\n estConnecté();\n require(\"./modele/administrateur/administrateurBD.php\");\n if (count($_POST) == 0) {\n $view = new View('administrateur/produit');\n $view->generate();\n } else {\n $view = new View('administrateur/produit');\n $contenu = array();\n $contenu = recupProduitAd($_POST['produit']);\n $view->setContentArray($contenu);\n $view->generate();\n }\n}", "title": "" }, { "docid": "ee7290f3623a636271690cd4ed525300", "score": "0.58111376", "text": "public function ajoutForm()\n\t{\n\t\t$template=\"\";\n\t\t$param=requestObject('Param');\n\t\t$lid=intval($param->getValue());\n\t\tif(isset($_POST['lid'],$_POST['nomBD'], $_POST['nomAuteur'], $_POST['prenomAuteur'],$_POST['noISBN'],$_POST['noEAN13'],$_POST['genre'],$_POST['jourPublication'],$_POST['moisPublication'],$_POST['anneePublication'],$_POST['synopsis']) and !empty($_POST['nomBD']) and !empty($_POST['nomAuteur']))\n\t\t{\n\t\t\n\t\t\t$lid=intval($_POST['lid']);\n\t\t\t$auteur=requestObject('Auteur');\n\t\t\t$tab=$auteur->recherche($_POST['nomAuteur'],$_POST['prenomAuteur']);\n\t\t\tif(count($tab)>0) // l'auteur existe\n\t\t\t{\n\t\t\t\t$aid=$tab[0]['aid'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$aid=requestObject('Auteur')->ajout($_POST['nomAuteur'],$_POST['prenomAuteur']);\n\t\t\t}\n\t\t\t$date_publication=mktime(0,0,0,intval($_POST['moisPublication']),intval($_POST['jourPublication']),$_POST['anneePublication']);\n\t\t\tif($lid==0) // BD inexistante => création\n\t\t\t{\n\n\t\t\t\tif($lid=$this->ajoutLivre($_POST['nomBD'],$_POST['noISBN'],$_POST['noEAN13'],$date_publication,$_POST['synopsis'],$aid,'',requestObject('Utilisateurs')->getUid(),$_POST['genre']))\n\t\t\t\t{\n\t\t\t\t\t$template.=\"<div class='message'>Livre enregistré sous l'identifiant \".$lid.\"</div>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template.=\"<div class='erreur'>Echec de l'enregistrement</div>\";\n\t\t\t\t}\n\t\t\t\t$_POST['lid']=$lid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// BD existante => modification\n\t\t\t\tif($this->update($lid,$_POST['nomBD'],$_POST['noISBN'],$_POST['noEAN13'],$date_publication,$_POST['synopsis'],$aid,'',$_POST['genre']))\n\t\t\t\t{\n\t\t\t\t\t$template.=\"<div class='message'>BD mise à jour avec succès</div>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template.=\"<div class='erreur'>Echec de la mise à jour</div>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\trequestObject('Image')->uploadCover();\n\t\t}\n\t\t$template.=trim(file_get_contents(PARTIAL.'ajout_bd.xhtml'));\n\t\t$livre=new Livre($lid);\n\t\t$template=$this->affichLivre($template,$livre);\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "00e47ab94ae44bb82450aeaf1e2bb7a6", "score": "0.5729168", "text": "public function testZupanijaCreate()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/zupanijas/create')\n // ->assertUrlIs('http://localhost:8000/zupanijas/create')\n ->assertSee('Unesi novu županiju')\n ->type('naziv', 'NAJNAJNOVIJaaZupanija')\n ->press('unesi')\n ->assertDontSee('već zauzet') // postoji već županija s tim imenom?\n //->assertSee('Uspješno dodana županija')\n // ->assertSee('NAJNAJNOVIJaaZupanija');\n ;\n $browser->pause(1500)\n ->screenshot('nova-zupanija-screenshot');\n \n });\n }", "title": "" }, { "docid": "70f681faa073fb129c8097441d19ec36", "score": "0.57289076", "text": "function execute(){\n \n include __DIR__.'/../templates/request.html.php';\n\n //auquel on concatène celui de présentation des données ramenées depuis la base :\n //Soit celui portant sur une seule donnée en particulier (s'il introduit aussi la clé générée spécifiquement pour cette donnée),\n // avec possibilité de la modifier (update)\n //Soit tous ceux sauvegardés avec les deux premières clés, mais en consultation seule.\n \n \n //Les valeurs saisies :\n $error=\"\";\n $cle1=\"\";\n $cle2=\"\";\n $clegeneree=\"\";\n $email=\"\";\n\n //Comme pour l'insertion des données, on contrôle les valeurs pour voir si les\n // saisies ont été correctement faites. Sinon, comme pour l'insertion, on concatène\n // les erreurs sous forme de liste ordonnée et on l'affiche\n /*-------------------------------------------------------------------------------*/\n if (isset($_POST[\"user-email\"]) && strlen(trim($_POST[\"user-email\"]))>=8) {\n $email=trim($_POST[\"user-email\"]);\n include __DIR__.'/../tools/commonTools.php'; //Utilisation des la fonction de contrôle de l'e-mail\n if (!isMailOk($email)) {\n $error.='<li>L\\'Votre e-mail : \"'.$email.'\" est mal orthographié. Veuillez le corriger</li><br />';\n }\n }\n\n if (isset($_POST[\"cle-1\"]) && strlen(trim($_POST[\"cle-1\"]))>=6) {\n $cle1=trim($_POST[\"cle-1\"]);\n } else {\n $error.='<li>La taille de la première clé : \"'. $cle1.'\" est trop courte - 6 caractères minimum requis</li><br />';\n }\n\n if (isset($_POST[\"cle-2\"]) && strlen(trim($_POST[\"cle-2\"]))>=6) {\n $cle2=trim($_POST[\"cle-2\"]);\n } else {\n $error.='<li>La taille de la seconde clé : \"'. $cle2.'\" est trop courte - 6 caractères minimum requis</li><br />';\n }\n /* Deux cas :\n //soit il y a des erreurs, et on affiche la page d'erreur*/\n /*-------------------------------------------------------------------------------*/\n if (strlen(trim($error))>0) {\n $erreur=\"<ol>\".$error.\"</ol>\";\n \n //Affichage des erreurs de saisie sous forme de liste\n //On affich exactement la même page que pour l'insertion,\n //puisque le nom de la chaîne d'erreur \"$erreur\" est la même\n //include __DIR__.'';\n include __DIR__.'/../templates/error.html.php';\n } else {\n //Pas d'erreur et on fait la recherche en base\n\n include __DIR__.'/../entities/Information.php';\n\n //On ramène d'avord tout le contenu de la table\n //qu'on parcourt façon bourrin, au lieu de filtrer cête SGBD\n\n $informations=Information::all();\n $information=null;\n // Sinon, traitement et présentation des données\n if (isset($_POST[\"clegeneree\"]) && strlen(trim($_POST[\"clegeneree\"]))>=6) {\n $clegeneree=trim($_POST[\"clegeneree\"]);\n //Présentation de la donnée (texte) inserée avec la double clé + la clé générée qu'on a fourni ici\n $info=null;\n foreach ($informations as $inf) {\n if ($inf->email===$email && $inf->cle1=== $cle1 && $inf->cle2===$cle2 && $inf->clegeneree=== $clegeneree) {\n //On initialise $information et on l'affiche\n $info=$inf;\n //On peut sortir car la clé générée de façon aléatoire\n //a de fortes chances d'être unique\n break;\n }\n }\n //Enregistrement trouvé\n if (!is_null($info)) {\n //Un enregistrement trouvé, et surement, le seul\n //Affichage du contenu qui peut être modifié dans le cas d'une recherche\n //en introduisant la clé générée \n //$information='<div><textarea>'.$info->data.'</textarea></div>';\n include __DIR__.'/../templates/resultatsRechercheUnique.html.php';\n\n } else {\n //Page indiquant que l'enregistrement n'a pas été trouvé\n //avec le mail et les clés de recherches introduites\n include __DIR__.'/../templates/notFoundResearch.html.php';\n }\n } else {\n //Présentation sous forme de liste des données saisies avec la double clé\n //Puisqu'ici la recherche n'a pas été faite avec le clé générée aléatoirement\n\n $information=\"\";//On initialise $information et on l'affiche\n foreach ($informations as $inf) {\n if ($inf->email===$email && $inf->cle1=== $cle1 && $inf->cle2===$cle2) {\n\n //Dans ce cas on concatène l'ensemble des textes représentant \n //les informations saisies, qu'on présente à la suite chacun dans\n // une \"textarea\" en LECTURE SEULE (readonly) elle-même incluse dans une \"div\". \n $information.='<div class=\"topsecret\"><textarea readonly>'.$inf->data.'</textarea></div>';\n }\n }\n //Et c'est ici qu'on réceptionne et afiche les résultats\n //ainsi concaténés.\n include __DIR__.'/../templates/resultatsRecherche.html.php';\n }\n }\n}", "title": "" }, { "docid": "cb8b3f3debcb081fa6cfea97c9422063", "score": "0.5699677", "text": "function ajoutSuite($idIntervention, $idAffaire)\n{\n\n\t$types = RequeteSuite::getInstance()->getToutTypeSuite();\n\t$suite = new Suite();\n\n\t$page = \"\";\n\n\tif(isset($_POST[ \"okSuiteAjout\" ])){\n\t\tif(isset($_POST[ \"typeSuite\" ]) && $_POST[ \"typeSuite\" ] != - 1 && isset($_POST[ \"texteSuite\" ])){\n\t\t\tif(empty($_POST[ \"dateSuite\" ])){\n\t\t\t\t$date = Date('Ymd');\n\t\t\t\t$suite->setDate($date);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$suite->setDate($_POST[ \"dateSuite\" ]);\n\t\t\t}\n\n\t\t\t$suite->setType($_POST[ \"typeSuite\" ]);\n\t\t\t$suite->setTexte($_POST[ \"texteSuite\" ]);\n\t\t\t$suite->setNombre($_POST[ \"nombreSuite\" ]);\n\n\t\t\t$suite->setIntervention($_GET[ \"intervention\" ]);\n\n\t\t\tRequeteSuite::getInstance()->ajouteSuite($suite);\n\t\t\theader(\"location:intervention.php?id=$idAffaire&intervention=$idIntervention\");\n\n\t\t}\n\t\telse{\n\t\t\t$page .= \"Veuillez renseigner tout les champs\";\n\t\t}\n\t}\n\n\n\t$page .= \"<form action = '' method='post'>\";\n\t$page .= \"<label>Date Suite</label><input type='text' id='datepicker' name='dateSuite'/>\";\n\t$page .= \"<label>Type Suite</label><select name='typeSuite'>\";\n\t$page .= \"<option value='-1'>---SELECTIONNEZ UN TYPE</option>\";\n\tforeach($types as $t){\n\t\t$page .= \"<option value='\".$t->getId().\"'>\".$t->getType().\"</option>\";\n\t}\n\t$page .= \"</select>\";\n\t$page .= \"<label>Nombre</label><input type='number' value='1' class='input-large' name='nombreSuite'/>\";\n\t$page .= \"<label>Texte Suite</label><textarea col='20' rows='6' name='texteSuite'></textarea>\";\n\t$page .= \"<br/><input type='submit' class='btn btn-success' value='Valider' name='okSuiteAjout'/>\";\n\t$page .= \"</form>\";\n\n\treturn $page;\n}", "title": "" }, { "docid": "0912b6f4282b7dd3565ddc41c879e6d0", "score": "0.5691967", "text": "function ajoutcont($contenu) {\r\n $this->modcont($contenu);\r\n }", "title": "" }, { "docid": "ca5330d896fced31eca9641c7891e9dd", "score": "0.568374", "text": "private function ajouterFamille($args){\n $ticket = $args['ticket'];\n $idSecretaire = $this->pdo->estValide($ticket);\n if($idSecretaire != \"\"){\n $idFamille = $args['idFamille'];\n $libelle = $args['libelle'];\n $retour = $this->pdo->ajouterFamille($idFamille, $libelle);\n // error_log(print_r( \"passage dans ajouter famille:\" . $retour,true),3,\"log.txt\");\n if($retour){\n $newTicket = $this->pdo->setTicket($idSecretaire);\n $this->data = $newTicket;\n }\n else{\n $this->data =\"Ajout non effectué\";\n $this->codeRetour=500;\n } \n }\n else{\n $this->data =\"pas connecté\";\n $this->codeRetour=401;\n }\n }", "title": "" }, { "docid": "929f9e123081be98598bec35d9b2c168", "score": "0.5679717", "text": "function operation_coach(){\n\n \t\t$idf = $this->input->post('idf');\n \t\t$id_user = $this->input->post('id_user');\n \t\t\n \t\t$test = $this->crud_model->fetch_single_test_inscription_coach($idf,$id_user);\n \t\tif ($test > 0) {\n\n \t\t\techo(\"echec!!!\");\n \t\t}\n \t\telse{\n\n\t \t\t$insert_data = array( \n\t 'id_user' \t=> htmlspecialchars($this->input->post('id_user')),\n\t 'edition' \t=> htmlspecialchars($this->input->post('edition')),\n\t 'idf' \t\t=> htmlspecialchars($this->input->post('idf'))\n\t ); \n\n\t \t$requete=$this->crud_model->insert_coach($insert_data);\n\t \t$nom_formation = $this->crud_model->get_name_formation($idf);\n\n\t \tif ($requete > 0) {\n\t \t\t# code...\n\t \t\t$url =\"formateur/myformation/\".$idf.\"/\".$id_user;\n\n\t $nom = $this->crud_model->get_name_user($id_user);\n\t $message =$nom.\" vous venez d'être attribué à la formation\".$nom_formation;\n\n\t $notification = array(\n\t 'titre' => \"Coach mentor pour la foration \".$nom_formation,\n\t 'icone' => \"fa fa-headphones\",\n\t 'message' => $message,\n\t 'url' => $url,\n\t 'id_user' => $id_user\n\t );\n\t \n\t $not = $this->crud_model->insert_notification($notification);\n\t \t\t \n \t\t}\n\t \techo(\"Ajout information avec succès\");\n \t\t}\n\n\n\t \n\t \n\t }", "title": "" }, { "docid": "2f114cbee72a7f52e311c2e5eda6b4a0", "score": "0.566012", "text": "function ajouteIntervenant()\n{\n\t$id = $_GET[ \"id\" ];\n\t$page = \"* champs obligatoire.</br>\";\n\n\t$idAdresse = RequeteModification::getInstance()->getIdAdresse($id);\n\n\tif(isset($_POST[ \"okIntervenant\" ])){\n\t\tif(! empty($_POST[ \"nomIntervenant\" ]) && ! empty($_POST[ \"qualiteeIntervenant\" ])){\n\t\t\t$i = new Contact();\n\n\t\t\tif(isset($_POST[ \"nomIntervenant\" ])){\n\t\t\t\t$i->setNom($_POST[ \"nomIntervenant\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"prenomIntervenant\" ])){\n\t\t\t\t$i->setPrenom($_POST[ \"prenomIntervenant\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"adresse\" ])){\n\t\t\t\t$i->setAdresse($_POST[ \"adresse\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"ville\" ])){\n\t\t\t\t$i->setVille($_POST[ \"ville\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"codePostal\" ])){\n\t\t\t\t$i->setCodePostal($_POST[ \"codePostal\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"qualiteeIntervenant\" ])){\n\t\t\t\t$i->setQualite($_POST[ \"qualiteeIntervenant\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"telephoneIntervenant\" ])){\n\t\t\t\t$i->setTelephone($_POST[ \"telephoneIntervenant\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"mailIntervenant\" ])){\n\t\t\t\t$i->setMail($_POST[ \"mailIntervenant\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"faxIntervenant\" ])){\n\t\t\t\t$i->setFax($_POST[ \"faxIntervenant\" ]);\n\t\t\t}\n\t\t\tif(isset($_POST[ \"syndicIntervenant\" ])){\n\t\t\t\t$i->setSyndicProprioRegie($_POST[ \"syndicIntervenant\" ]);\n\t\t\t}\n\n\t\t\tRequeteModification::getInstance()->ajoutIntervenant($id, $i);\n\n\t\t\theader(\"location:affaire.php?id=$id\");\n\t\t}\n\t\telse{\n\t\t\t$page .= \"Veuillez saisir au moins le nom et la qualité du contact.<br/>\";\n\t\t}\n\t}\n\n\n\t$id = $_GET[ \"id\" ];\n\n\t$idAdresse = RequeteModification::getInstance()->getIdAdresse($id);\n\n\t$page .= \"<form action ='' method='POST'>\";\n\t$page .= \"<table>\";\n\n\t$page .= \"<tr><th><label for='nomIntervenant'><b>Nom ou personne morale *</b></label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='nomIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='prenomIntervenant'>Prenom</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='prenomIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='adresse'>Adresse</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='adresse'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='ville'>Ville</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='ville'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='codePostal'>Code Postal</label></th>\";\n\t$page .= \"<td><input type = 'number' class = 'input-large' name='codePostal'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='qualiteeIntervenant'><b>Qualité *</b></label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='qualiteeIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='telephoneIntervenant'>Telephone</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='telephoneIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='mailIntervenant'>Mail</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='mailIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='faxIntervenant'>Fax</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='faxIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><th><label for='syndicIntervenant'>Complément</label></th>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='syndicIntervenant'/></td></tr>\";\n\n\t$page .= \"<tr><td><input type='submit' class='btn btn-success' name = 'okIntervenant' value = 'Valider'/></td></tr>\";\n\t$page .= \"</table></form>\";\n\n\techo $page;\n\n\n}", "title": "" }, { "docid": "90d692be44e559b70aee03d3f48c50a0", "score": "0.5625048", "text": "function droit_ajout_actualite()\r\n{\r\n\tif($_SESSION[\"user\"][\"id_utilisateur\"]>0 && (option_module(\"ajout_actualite_admin\")!=true || $_SESSION[\"espace\"][\"droit_acces\"]==2)) return true;\r\n}", "title": "" }, { "docid": "b599a2313a56b65fa50cce1b303e89ce", "score": "0.5621204", "text": "function confirmInscription(){?>\n <html>\n <head>\n <link rel=\"stylesheet\" href=\"css/sheet.css\" />\n </head>\n <body>\n <?php $this->formConnexion(); ?>\n <p> Félicitations, votre inscription a été enregistrée </p>\n </body>\n </html>\n<?php }", "title": "" }, { "docid": "b4e155887f081dcc3bf856c8eaaead1f", "score": "0.5577284", "text": "public function ajoutConseil(){\t\t\t\n\t\t$this->allowTo('admin');\n\t\t$erreurs = [];\n\n\t\tif ( isset($_POST['ajouter']) ) {\n\t\t\t\n\t\t\t// prenom requis\n\t\t\tif( empty($_POST['myform']['identite']) ) {\n\t\t\t\t$erreurs[] .= \"L'identité est obligatoire.\";\n\t\t\t}\n\n\t\t\t// région\n\t\t\tif( empty($_POST['myform']['titre'])) {\n\t\t\t\t$erreurs[] .= \"Vous n'avez pas séléctionné de titre\";\n\t\t\t}\n\n\t\t\tif( ! empty($_POST['myform']['email']) ) {\n\n\t\t\t\tif( ! filter_var($_POST['myform']['email'], FILTER_VALIDATE_EMAIL) ) {\n\t\t\t\t\t$erreurs[] .= \"L'email n'est pas d'une forme reconnue.\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// insertion dans la BDD\n\t\t\tif(empty($erreurs)){\n\t\t\t\t\n\t\t\t\t\t// traitement\n\t\t\t\t$manager = new ConseilManager();\n\t\t\t\t$manager->setTable('conseil_administration');\n\t\t\t\t$manager->insert($_POST['myform']);\n\t\t\t\t$messages[] = \"L'ajout est effectué\";\n\t\t\t\t$this->show('Administration/ajoutConseil', ['messages' => $messages]);\n\t\t\t}else{\n\t\t\t\t$this->show('Administration/ajoutConseil', ['erreurs' =>$erreurs]);\n\t\t\t}\n\t\t}else{\n\t\t\t$this->show('Administration/ajoutConseil');\n\t\t}\n\t}", "title": "" }, { "docid": "48a3b10dc0bbf501b79613a17bcf723f", "score": "0.55760336", "text": "public function commentaireajouteAction(){\n $Commentaire = new ModelCommentaire();\n $commentaire->setCommentaire_id_user(2);\n $view = new View(\"add-commentaire\", \"back\");\n $view->assign(\"title\",\"Admin Création Commentaire\");\n $form = $Commentaire->buildFormCommentaire();\n \n \n if(!empty($_POST)){\n $errors = Form::validator($_POST, $form);\n \n if(empty($errors)){\n $view->assign(\"formErrors\", $errors);\n $Commentaire->setCommentaire_content(htmlspecialchars($_POST[\"content\"]));\n $id_user = $commentaire->getiduserbymail($_SESSION['email']);\n $Commentaire->save();\n header('Location: \\liste-commentaire?message=2');\n }else{\n $view->assign(\"formErrors\", $errors);\n }\n }\n $view->assign(\"form\", $form);\n \n \n }", "title": "" }, { "docid": "d5e2bbc57e8f83af7bb142a178aef981", "score": "0.5574061", "text": "function addcontent()\n\t\t{\n\t\techo 'disini akan dibuat fungsi untuk menambah konten';\n\t\t}", "title": "" }, { "docid": "cde9b534eaaf00c2b366cb8d8a4ea57f", "score": "0.5561912", "text": "public function commentaire($_commentaire, $_date, $id_utilisateur, $id_sujet)\n{\n$link = $this->_link;\nif(!isset($_SESSION['user'])){\n echo 'Tu dois être connecté pour envoyer un commentaire ';\n}\nelseif (!empty($_commentaire)) {\n $_com = addslashes($_commentaire);\n\n$query = $link->prepare(\"INSERT INTO commentaires (commentaire, date, id_utilisateur, id_sujet) VALUES ('$_com', '$_date', '$id_utilisateur', '$id_sujet')\");\n\n $query->execute();\necho 'commentaire envoyé';\nheader(\"refresh: 0.5\");\n\n}else \n echo '<br>Veuillez remplir le champ s\\'il vous plait <br> ';\n}", "title": "" }, { "docid": "ea25d53c288e7046fb5914828fdc3c6e", "score": "0.55577856", "text": "function htm_champs_crea($e)\r\n{\r\n\tglobal $language_adm;\r\n\t\r\n?>\r\n\r\n<div id=\"menu_right\">\r\n\r\n\t<div class=\"menus_r_haut\">\r\n\t\r\n\t\t<ul class=\"ul_barre_adm\">\r\n\t\t\t<li class=\"li_barre_adm\"><?php echo $language_adm['page_champs_crea_info']; ?></li>\r\n\t\t</ul>\r\n\t\r\n\t</div>\r\n\t\r\n\t<form method=\"post\" action=\"\">\r\n\t\r\n\t<div class=\"menus_r_fond\">\r\n\t\r\n\t\t<?php\r\n\t \r\n\t\tif(!empty($e) && $e == 1) echo '<div class=\"form_left\"></div><div class=\"form_right\"><p><span class=\"error\">'. $language_adm['page_champs_crea_error'] .'</span></p></div>';\r\n\t\r\n\t\t?>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_champs_crea_nom']; ?> :</div>\r\n\t\t<div class=\"form_right\"><input type=\"text\" class=\"input_con\" name=\"nom\" value=\"\"></div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_champs_crea_num']; ?></div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"numeric\" name=\"numeric\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['numeric'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['numeric'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_numeric\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_champs_crea_type']; ?></div>\r\n\t\t<div class=\"form_right_checkbox\">\r\n\t\t\t<input type=\"checkbox\" class=\"input_checkbox\" id=\"type\" name=\"type\" value=\"1\" onclick=\"turnImgCheck(this);\" <?php if (!empty($_POST['type'])) echo 'checked=\"checked\"'; ?> />\r\n\t\t\t<img <?php if (!empty($_POST['type'])) echo 'src=\"images/check2.png\"'; else echo 'src=\"images/check1.png\"'; ?> id=\"img_check_type\" alt=\"\" />\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"form_left\"></div>\r\n\t\t<div class=\"form_right\"><input class=\"submit\" type=\"submit\" value=\"<?php echo $language_adm['bt_link_valider']; ?>\" /></div>\r\n\t\r\n\t</div>\r\n\t\r\n\t</form>\r\n\r\n</div>\r\n\r\n<?php\r\n}", "title": "" }, { "docid": "b20ca697b6d7976f0291f57018a43142", "score": "0.5552497", "text": "abstract protected function confirm_add();", "title": "" }, { "docid": "d2038a8e40ad406f8a6cc0554deebbdc", "score": "0.55497766", "text": "function Inscription(){\n\n require_once \"../views/formulaireInscription.php\";\n if (isset($_POST['BtnInscription'])){\n $inscription = new Mailing();\n $EnvoiDuformulaire = $inscription->SendMailinscription();\n $EnvoiDuformulaire;\n ?>\n <script>\n alert('Vous allez recevoir un mail de confirmation. Merci de cliquer sur le lien ')\n </script>\n <?php\n }\n }", "title": "" }, { "docid": "8e28550728a92d7fea40ce3dd39c4ea0", "score": "0.55479175", "text": "public function testAjoutLieuVilleIfAdminIsUp()\r\n {\r\n $this->logInAdmin();\r\n $this->client->request('GET', '/ajoutLieuVille');\r\n $this->assertSame(200, $this->client->getResponse()->getStatusCode());\r\n }", "title": "" }, { "docid": "19e2f68d326c62e634aa384198d824f5", "score": "0.55354357", "text": "function modifAdresse()\n{\n\t$id = $_GET[ \"id\" ];\n\t$ville = RequeteModification::getInstance()->getTouteVilles();\n\t$type = RequeteModification::getInstance()->getToutTypeRue();\n\t$adresse = RequeteAdresseDossier::getInstance()->getAdresse($id);\n\t//$affaire = RequeteAffaire::getInstance()->getAffaire($id);\n\n\tif(isset($_POST[ \"okAdresse\" ])){\n\n\t\t$a = new Adresse();\n\t\tif(isset($_POST[ \"cadastre\" ])){\n\t\t\t$a->setCadastre($_POST[ \"cadastre\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"ville\" ])){\n\t\t\t$a->setVille($_POST[ \"ville\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"type\" ])){\n\t\t\t$a->setType($_POST[ \"type\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"numeroRue\" ])){\n\t\t\t$a->setNumeroRue($_POST[ \"numeroRue\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"complementAdresse\" ])){\n\t\t\t$a->setcomplementAdresse($_POST[ \"complementAdresse\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"nomRue\" ])){\n\t\t\t$a->setNomRue($_POST[ \"nomRue\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"nomResidence\" ])){\n\t\t\t$a->setNomResidence($_POST[ \"nomResidence\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"nomBatiment\" ])){\n\t\t\t$a->setNomBatiment($_POST[ \"nomBatiment\" ]);\n\t\t}\n\t\t$a->setId(RequeteModification::getInstance()->getIdAdresse($_GET[ 'id' ]));\n\t\tRequeteModification::getInstance()->modifieAdresse($id, $a, $adresse);\n\t\theader(\"location:affaire.php?id=$id\");\n\t}\n\n\t$id = $_GET[ \"id\" ];\n\t$ville = RequeteModification::getInstance()->getTouteVilles();\n\t$type = RequeteModification::getInstance()->getToutTypeRue();\n\t$adresse = RequeteAdresseDossier::getInstance()->getAdresse($id);\n\n\t$page = \"<h3>Modification de l'adresse du dossier :</h3><br/>\";\n\t$page .= \"<form action ='' method='post'>\";\n\t$page .= \"<table>\";\n\t$page .= \"<thead><tr>\";\n\t$page .= \"<th><label for='cadastre'>Numéro Cadastral</label></th>\";\n\t$page .= \"<th><label for='ville'>Ville</label></th>\";\n\t$page .= \"<th><label for='type'>Type</label></th>\";\n\t$page .= \"<th><label for='numeroRue'>Numéro de la rue</label></th>\";\n\t$page .= \"<th><label for='nomRue'>Nom de rue</label></th>\";\n\t$page .= \"<th><label for='nomResidence'>Nom de la résidence</label></th>\";\n\t$page .= \"<th><label for='nomBatiment'>Bâtiment</label></th>\";\n\t$page .= \"</tr></thead>\";\n\n\t$page .= \"<tr><td><input type = 'text' class = 'input-large' name='cadastre' value= '\".RequeteAffaire::getInstance()->getNumeroCadastral($id).\"'/></td>\";\n\t$page .= \"<td><select name='ville'>\";\n\tforeach($ville as $v){\n\t\tif(utf8_encode($v->getVille()) == $adresse->getVille()){\n\t\t\t$page .= \"<option value ='\".$v->getId().\"' selected>\".utf8_encode($v->getVille()).\"</option>\";\n\t\t}\n\t\telse{\n\t\t\t$page .= \"<option value ='\".$v->getId().\"'>\".utf8_encode($v->getVille()).\"</option>\";\n\t\t}\n\t}\n\t$page .= \"</select></td>\";\n\t$page .= \"<td><select name='type'>\";\n\tforeach($type as $t){\n\t\tif(utf8_encode($t->getTypeRues()) == $adresse->getType()){\n\t\t\t$page .= \"<option value ='\".$t->getId().\"' selected>\".utf8_encode($t->getTypeRues()).\"</option>\";\n\t\t}\n\t\telse{\n\t\t\t$page .= \"<option value ='\".$t->getId().\"'>\".utf8_encode($t->getTypeRues()).\"</option>\";\n\t\t}\n\t}\n\t$page .= \"</select></td>\";\n\t$page .= \"<td><input type = 'number' class = 'input-large' name='numeroRue' value= '\".$adresse->getNumeroRue().\"'/></td>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='nomRue' value= '\".htmlentities($adresse->getNomRue(), ENT_QUOTES).\"'/></td>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='nomResidence' value= '\".htmlentities($adresse->getNomResidence(), ENT_QUOTES).\"'/></td>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='nomBatiment' value= '\".htmlentities($adresse->getNomBatiment(), ENT_QUOTES).\"'/></td></tr>\";\n\t$page .= \"<td><input type='submit'class='btn btn-success' value='Modifier le Dossier' name ='okAdresse'/></td>\";\n\t$page .= \"</form>\";\n\t$page .= \"</table><br/><br/>\";\n\n\n\t$affaire = RequeteAffaire::getInstance()->getAdresse($id);\n\n\tif(isset($_POST[ \"okAdresseAffaire\" ])){\n\t\t$a = new Affaire();\n\t\tif(isset($_POST[ \"etage\" ])){\n\t\t\t$a->setEtage($_POST[ \"etage\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"cote\" ])){\n\t\t\t$a->setCote($_POST[ \"cote\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"numAppartVilla\" ])){\n\t\t\t$a->setNumAppartVilla($_POST[ \"numAppartVilla\" ]);\n\t\t}\n\t\tif(isset($_POST[ \"nomEtablissement\" ])){\n\t\t\t$a->setNomEtablissement($_POST[ \"nomEtablissement\" ]);\n\t\t}\n\t\tRequeteModification::getInstance()->modifieAdresseAffaire($id, $a, $affaire);\n\t}\n\n\t$affaire = RequeteAffaire::getInstance()->getAdresse($id);\n\n\t$page .= \"<h3>Modification de l'adresse de l'affaire :</h3><br/>\";\n\t$page .= \"<form action ='' method='post'>\";\n\t$page .= \"<table>\";\n\t$page .= \"<thead><tr>\";\n\t$page .= \"<th><label for='etage'>Etage</label></th>\";\n\t$page .= \"<th><label for='cote'>Côté</label></th>\";\n\t$page .= \"<th><label for='numAppartVilla'>Numéro d'Appartement, de Villa.</label></th>\";\n\t$page .= \"<th><label for='nomEtablissement'>Nom de l'établissement</label></th>\";\n\t$page .= \"</tr></thead>\";\n\n\t$page .= \"<tr><td><input type = 'text' class = 'input-large' name='etage' value= '\".htmlentities($affaire->getEtage(), ENT_QUOTES).\"'/></td>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='cote' value= '\".htmlentities($affaire->getCote(), ENT_QUOTES).\"' /></td>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='numAppartVilla' value= '\".htmlentities($affaire->getNumAppartVilla(), ENT_QUOTES).\"'/></td>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' name='nomEtablissement' value= '\".htmlentities($affaire->getNomEtablissement(), ENT_QUOTES).\"'/></td></tr>\";\n\t$page .= \"<td><input type='submit' class='btn btn-success' value='Modifier Affaire' name ='okAdresseAffaire'/></td>\";\n\t$page .= \"</form>\";\n\t$page .= \"</table>\";\n\n\techo $page;\n}", "title": "" }, { "docid": "6db39ded8c22aa1ee7b6f4f382f1ba75", "score": "0.5525581", "text": "function informe_pub1() {\t// Se extrae el nombre del publicador de la BBDD para mostarlo en el botón del panel\n\trequire '../../../../../settings/conexion.php';\n\t$query = \"SELECT nombre FROM $table2 WHERE id_pub = 1\";\n\t$res = mysqli_query($cn, $query);\n\t$lis = mysqli_fetch_assoc($res);\n\tprint_r($lis['nombre']);\n\n\tif ($lis['nombre'] == '') {\t// Si no exite un publicador registrado se muestra el siguiente mensaje\n\t\techo \"<script>alert('ESTE PUBLICADOR NO ESTA REGISTRADO, LO QUE QUIERE DECIR QUE NO EXISTE. POR FAVOR, NO GUARDE NINGÚN DATO PARA QUE SU INFORME DE GRUPO SEA LO MÁS EXACTO POSIBLE')</script>\";\n\t}\n\trequire '../../../../../settings/close.php';\n}", "title": "" }, { "docid": "da1dc58c93f8e3bff159b79bd52a1942", "score": "0.5525166", "text": "function addOnePerson() {\n if (!empty($_POST['code']) && !empty($_POST['nom']) && !empty($_POST['prenom']) && !empty($_POST['age']) && !empty($_POST['email']) && !empty($_POST['mdp']) && !empty($_POST['habilitation'])) {\n addPerson($_POST['code'],$_POST['nom'],$_POST['prenom'],$_POST['age'],$_POST['email'],$_POST['mdp']);\n newHabilitation($_POST['email'],$_POST['habilitation']);\n }\n require_once('views/viewInscription.php');\n}", "title": "" }, { "docid": "7ece35c16479c9bd2c48648761325512", "score": "0.5525113", "text": "function ajouterClientNonConfirme($client,$index,$nombre){\r\n \t\t$code=$client['code'];\r\n\t\t$nom = $client['prenom'].\" \".$client['nom'];\r\n\t\t$prestation = $client['service_prestation'];\r\n\t\t$tel = $client['tel']; \r\n\t\t$email = $client['email']; ?>\r\n\t\t<div class=\"mySlides2 fade\">\r\n\t\t\t<div class=\"numbertext\"><?php echo ($index+1).\" / $nombre\"; ?></div>\r\n\t\t\t<div class=\"card\">\r\n\t\t\t\t<h4>Client : <?php echo $nom; ?></h4>\r\n\t\t\t\t<h4>N° Telephone : <?php echo $tel; ?></h4>\r\n\t\t\t\t<h4>Email : <?php echo $email; ?></h4>\r\n\t\t\t\t<h4>Type de prestation : <?php echo $prestation; ?></h4>\r\n\t\t\t\t<div class=\"cardcontainer\">\r\n\t\t\t\t <button onclick=\"elt('<?php echo \"cancel$index\"; ?>').submit();\" style=\"width: 30%; margin-left: 20%;\">Annuler</button>\r\n\t\t\t\t <button onclick=\"elt('<?php echo \"confirm$index\"; ?>').submit();\" style=\"width: 30%; margin-left: 15%;\">Confirmer</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<form id=\"<?php echo \"confirm$index\"; ?>\" method=\"POST\" action=\"confirmerClient.php\" >\r\n\t\t\t<input type=\"hidden\" name=\"code\" value=\"<?php echo $code; ?>\">\r\n\t\t</form>\t \r\n\t\t<form id=\"<?php echo \"cancel$index\"; ?>\" method=\"POST\" action=\"annulerClient.php\" >\r\n\t\t\t<input type=\"hidden\" name=\"code\" value=\"<?php echo $code; ?>\">\r\n\t\t</form>\t \r\n <?php }", "title": "" }, { "docid": "bf7c282431da7637874c5dc3057c91f6", "score": "0.5524598", "text": "function registrasi(){}", "title": "" }, { "docid": "7e1e2c7b4e6ee41d3a6bb907700da777", "score": "0.5521953", "text": "function verarbeite_formular( ) {\n global $db;\n\n // Eine eindeutige Kennung für dieses Gericht abrufen\n $gericht_id = $db->nextID('gerichte');\n\n // Auf Grundlage der Checkbox den Wert von $ist_scharf setzen\n if ($_POST['ist_scharf'] == 'ja') {\n $ist_scharf = 1;\n } else {\n $ist_scharf = 0;\n }\n\n // Das neue Gericht in die Tabelle einfügen\n $db->query('INSERT INTO gerichte (gericht_id, gerichtname, preis, ist_scharf)\n VALUES (?,?,?,?)',\n array($gericht_id, $_POST['gerichtname'], $_POST['preis'],\n $ist_scharf));\n\n // Dem Benutzer mitteilen, dass das neue Gericht hinzugefügt wurde\n print htmlentities($_POST['gerichtname']) . \n ' wurde der Datenbank hinzugefügt.';\n}", "title": "" }, { "docid": "03ac7c245d8496909654afb8e41c9314", "score": "0.5520668", "text": "function add_popup_form( $title ) {\r\n return <<<HTML\r\n <html>\r\n <body>\r\n <div id=\"overlay\">\r\n <form id=\"modal-container\" method=\"post\" action=\"popup-plugin.php\">\r\n <!-- <form id=\"modal-container\" method=\"post\" action=\"/\"> -->\r\n <!-- <button class=\"close-btn\"> -->\r\n <p class=\"question-p\">Уже уходите?</p>\r\n <p>Оставьте свои контакты и мы проконсультируем Вас.</p>\r\n <p>Мы знаем о компрессорном оборудовании всё!</p>\r\n <button type=\"button\" id=\"close-btn\" class=\"close-btn\" aria-label=\"Close\">\r\n <svg width=\"22\" height=\"22\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M1 29L29 1L1 29ZM29 29L1 1Z\" fill=\"#383F48\"/>\r\n <path d=\"M29 29L1 1M1 29L29 1L1 29Z\" stroke=\"#383F48\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\r\n </svg>\r\n </button>\r\n <label for=\"input1\">Ваше имя</label>\r\n <input type=\"text\" name='name_col' id=\"smth\">\r\n <label for=\"input2\">Ваш телефон</label>\r\n <input type=\"text\" name='phone_col' id=\"smth\"> \r\n <label for=\"input3\">Ваш email</label>\r\n <input type=\"text\" name='email_col' id=\"smth\">\r\n <button type=\"submit\" id='submit-btn'>Отправить</button>\r\n </form>\r\n </div>\r\n </body>\r\n </html>\r\nHTML;\r\n}", "title": "" }, { "docid": "fac14fdd5952995b915844d8fe02e854", "score": "0.5514511", "text": "public function action_incombatible_browser()\n {\n $this->template->user_title = __('error.incombatible_browser_title');\n $this->template->user_message = __('error.incombatible_browser_message');\n //nechci zobrazit zpravu \"Znovu se prihlaste...\"\n $this->template->show_reloggin_message = FALSE;\n }", "title": "" }, { "docid": "2e3d7921da6c6f01b99321ce5ab61626", "score": "0.5507907", "text": "function gestionEditeur()\n {\n if(isset($_SESSION['idAdmin'])){\n\n if(isset($_GET['action2']))\n {\n if($_GET['action2'] == \"confirmAjout\")\n {\n echo \"<script>alert('Un éditeur a été enregistré en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmModif\")\n {\n echo \"<script>alert('Un éditeur a été modifié en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmSupp\")\n {\n echo \"<script>alert('Un éditeur a été supprimé en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"errorSupp\")\n {\n echo \"<script>alert('L\\' éditeur n\\'a pas été supprimé en base de données car il est rattaché à un éditeur');</script>\";\n }\n\n }\n \n $ManagerEditeur= new \\Projet\\Models\\admin\\ManagerEditeurs();\n $listeEditeur = $ManagerEditeur->lireListeEditeurs();\n\n\n //Appel à la vue : affichage\n require 'app/views/admin/listeEditeur.php';\n\n }\n else{\n header('Location: ./admin-home');\n exit();\n }\n }", "title": "" }, { "docid": "3d971c6500982435e41c388489a735dc", "score": "0.5507109", "text": "function registration(){\n\n // Vérification de la validité des informations\n $admin = 0;\n $pseudo = htmlspecialchars($_POST['pseudo']);\n // Hachage du mot de passe\n $pass_hache = password_hash($_POST['pass'], PASSWORD_DEFAULT);\n $mail = htmlspecialchars($_POST['mail']);\n \n $str = strlen($_POST[\"pass\"]);\n\n $req = new UserManager;\n $pseudodouble = $req -> pseudodouble($pseudo);\n $count = $pseudodouble -> rowCount();\n $pseudodouble -> closeCursor();\n\n $request = new UserManager;\n $maildouble = $request -> maildouble($mail);\n $countmail = $maildouble -> rowCount();\n $maildouble -> closeCursor();\n //Test pseudo déjà utilisé\n \n if(!$count > 0){\n if(!$countmail > 0){\n //Test mot de passe + de 10 caractère\n if($str > 10){\n \n $requ = new UserManager;\n $infoRegist = $requ -> registration($pseudo, $pass_hache, $mail);\n //$infoRegist -> closeCursor();\n \n header ('Location: index.php');\n exit();\n }\n else{\n throw new Exception(\"Votre mot de passe doit contenir au minimum 10 caractère.\");\n header ('Location: index.php');\n exit();\n }\n }\n else{\n throw new Exception(\"Votre mail est déjà utilisé.\");\n }\n \n }\n else{\n throw new Exception(\"Votre pseudo est déjà utilisé.\");\n \n }\n \n}", "title": "" }, { "docid": "15dde8fb8ae850fe325626d49c48ff2a", "score": "0.54987967", "text": "public function btn_send_code($msg=\"login_locked\"){\n $_POST[\"check_code\"] =\"\";\n $Visitor = $this->Visitor();\n $return =\"\";\n \n if($Visitor->exists){\n \n $Visitor->check_code = $Visitor->__random_code();\n $Visitor->auth_locked = 1;\n $Visitor->update();\n \n \n $sendmail=true;\n if($msg==\"login_locked\"){\n $title=\"authentification\";\n $p =\"<p>Votre compte utilisateur est bloqué.</p>\";\n $p1=\"<p>Veuillez trouver ci joint le code de déblocage : </p>\";\n $p2=\"<p>$Visitor->check_code</p>\";\n \n }else if($msg==\"recover_password\" ){\n $title=\"modification du mot de passe\";\n $p =\"<p>Votre mot de passe est en cours de modification.</p>\";\n $p1=\"<p>Veuillez trouver ci joint le code de vérification : </p>\";\n $p2=\"<p>$Visitor->check_code</p>\";\n \n }else if($msg==\"recover_password_retry\"){\n $title=\"tentative de modification du mot de passe\";\n $p =\"<p>Votre mot de passe est en cours de modification.</p><p style='color:red;'>Vous n'avez pas saisi le bon code.</p>\";\n $p1=\"<p>Veuillez trouver ci joint le nouveau code de vérification : </p>\";\n $p2=\"<p>$Visitor->check_code</p>\";\n \n }else if($msg==\"register_attempt\"){\n $title=\"nouvel utilisateur\";\n $p =\"<p>Quelqu'un essaye de créer un nouveau compte avec votre adresse mail.</p>\";\n $p1=\"<p>Par sécurité, nous avons bloqué votre compte.</p>\";\n $p2=\"<p>Un code d'authentification vous sera demandé lors de votre prochaine connexion.</p>\";\n \n }else if($msg==\"register_success\"){\n $title=\"Bienvenue sur le service\";\n $p =\"<p>Félicitations, vous êtes enregistré comme nouvel utilisateur.</p><p>Votre login est néanmoins bloqué.</p>\";\n $p1=\"<p>Veuillez trouver ci joint le code d'authentification qui vous sera demandé lors de votre prochaine connexion.</p>\";\n $p2=\"<p>$Visitor->check_code</p>\";\n \n }else{\n $title=\"authentification\";\n $p =\"<p>Votre compte utilisateur est bloqué.</p>\";\n $p1=\"<p>Veuillez trouver ci joint le code de déblocage : </p>\";\n $p2=\"<p>$Visitor->check_code</p>\";\n $sendmail=false;\n }\n \n $Visitor->check_code = \"\";\n \n $to = $Visitor->email;\n $subject = $title;\n $from = '[email protected]';\n \n // To send HTML mail, the Content-type header must be set\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n $headers .= 'From: '.$from.\"\\r\\n\".'Reply-To: '.$from.\"\\r\\n\" . 'X-Mailer: PHP/' . phpversion();\n // Compose a simple HTML email message\n \n $messageFooter = \"<div><small>xuserver.net \".date (\"M/Y\").\"</small></div>\";\n $message =\"<html><body><img src='https://xuserver.net/xs-framework/xuserver-logo.png' /><h3>Bonjour $Visitor->email</h3>$p $p1 $p2 $messageFooter</body></html>\";\n\n if($sendmail){ \n //echo debug(\"<h1>$Visitor->email</h1>\" . $message);\n $testsent = mail($to, $subject, $message, $headers);\n if(! $testsent){\n echo systray(\"SYS : error mail\", \"danger\");\n }else{\n \n } \n }else{\n \n }\n \n $Visitor->form_check_code();\n $return .= $Visitor->ui->form();\n }else{\n $return .= notify(\"Error cant send code \",\"danger\");\n }\n \n \n return $return;\n }", "title": "" }, { "docid": "8ba087a7a0732fbb5650120bc71b1dbc", "score": "0.54962814", "text": "public function action_test()\n {\n //$version = $model->getNewVersion();\n $flag = Common::http('http://www.lvyou.com/sql.php');\n echo $flag;\n\n }", "title": "" }, { "docid": "a65b04583e4d2e24a74992d19d8a8fef", "score": "0.54928154", "text": "public function add_comp() {\n $this->load->model('M_Projet');\n\n //test si les données ont été renseigné\n if(!empty($_POST)) {\n\t\t $libelle_comp = $_POST[\"libelle_comp\"];\n\t\t\t $description = $_POST[\"description\"];\n\n $libelle_comp = $this->input->post('libelle_comp');\n\t\t\t $description = $this->input->post('description');\n\n $this->M_Projet->set_comp($libelle_comp, $description);\n\n $base_url = base_url();\n header(\"location: \".$base_url.\"C_Tableau_de_bord\");\n } else {\n return \"Veuillez remplir les champs.\";\n }\n }", "title": "" }, { "docid": "d9196376a6f311b3b60a27d882da6b2a", "score": "0.5483612", "text": "public static function insererArticle() {\r\n $articles = new modeleArticle();\r\n $modeleArticle = new modeleArticle();\r\n\r\n //Ajout vérification avec Validation $tab\r\n if (isset($_POST['auteur']) AND isset($_POST['titre']) AND isset($_POST['contenu'])) {\r\n $id = '';\r\n $auteur = $_POST['auteur'];\r\n $titre = $_POST['titre'];\r\n $contenu = $_POST['contenu'];\r\n $date = Date(DATE_W3C);\r\n\r\n $bbcode = array(\r\n '\\[b\\](.*?)\\[\\/b\\]' => '<b>$1</b>',\r\n '\\[i\\](.*?)\\[\\/i\\]' => '<i>$1</i>',\r\n '\\[u\\](.*?)\\[\\/u\\]' => '<u>$1</u>',\r\n '\\[img\\](.*?)\\[\\/img\\]' => '<img src=\"$1\"/>',\r\n '\\[url=([^\\]]*)\\](.*)\\[\\/url\\]' => '<a href=\"$1\" target=\"_blank\">$2</a>',\r\n ':\\)' => '<img src=\"http://www.auplod.com/u/ouapld6f6a0.png\"/>'\r\n );\r\n\r\n foreach ($bbcode as $key => $value) {\r\n $contenu = preg_replace('/' . $key . '/', $value, $contenu);\r\n }\r\n $contenu = nl2br($contenu);\r\n\r\n if (empty($auteur)) {\r\n $Erreurs[] = \"Veuillez renseigner le champ auteur\";\r\n }\r\n if (empty($titre)) {\r\n $Erreurs[] = \"Veuillez renseigner le champ titre\";\r\n }\r\n if (empty($contenu)) {\r\n $Erreurs[] = \"Veuillez renseigner le champ contenu\";\r\n }\r\n\r\n if (!empty($Erreurs)) {\r\n\r\n $Erreurs[] = \"Les informations d'insertion de l'article ne sont pas valides ! Redirection vers le formulaire d'ajout.\";\r\n $articles = $modeleArticle->get_allArticles();\r\n $compteurNews = $modeleArticle->getNbNews();\r\n $compteurCommentaires = $modeleArticle->getNbCommentaires();\r\n require('./Vue/accueil.php');\r\n echo \"<META HTTP-EQUIV='Refresh' CONTENT='3; URL=http://localhost/ProjetBlog/Vue/ajoutNews.php'>\";\r\n } else {\r\n $articles->insererArticles($id, $auteur, $titre, $contenu, $date);\r\n $Ok[] = \"L'article à été ajouté avec succès !\";\r\n $articles = $modeleArticle->get_allArticles();\r\n $compteurNews = $modeleArticle->getNbNews();\r\n $compteurCommentaires = $modeleArticle->getNbCommentaires();\r\n require './Vue/accueil.php';\r\n }\r\n } else {\r\n $Erreurs[] = \"Erreur dans l'insertion de l'article, aucun champs renseignés.\";\r\n echo \"<META HTTP-EQUIV='Refresh' CONTENT='3; URL=http://localhost/ProjetBlog/Vue/ajoutNews.php'>\";\r\n }\r\n }", "title": "" }, { "docid": "2951e3538713b776fbfcbf682b5bdec4", "score": "0.54730225", "text": "function action_saveauto_telecharger() {\n\t$securiser_action = charger_fonction('securiser_action', 'inc');\n\t$arg = $securiser_action();\n\tif (!@is_readable($arg)) {\n\t\t$redirect = urldecode(_request('redirect'));\n\t\tif($redirect){\n\t\t\t$redirect = parametre_url($redirect,'etat','nok_tele');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Autorisation\n\tif(!autoriser('sauvegarder','mes_fichiers')) {\n\t\tinclude_spip('inc/minipres');\n\t\techo minipres();\n\t\texit;\n\t}\n\n\t// Telechargement du fichier\n\theader(\"Content-type: application/force-download;\");\n\theader(\"Content-Transfer-Encoding: application/zip\");\n\theader(\"Content-Length: \".filesize($arg));\n\theader(\"Content-Disposition: attachment; filename=\\\"\".basename($arg).\"\\\"\");\n\theader(\"Pragma: no-cache\");\n\theader(\"Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, public\");\n\theader(\"Expires: 0\");\n\treadfile($arg);\n\n\tif($redirect = _request('redirect')){\n\t\t$redirect = parametre_url(urldecode($redirect),'etat','ok_tele','&');\n\t\tinclude_spip('inc/headers');\n\t\tredirige_par_entete($redirect);\n\t}\n\treturn;\n}", "title": "" }, { "docid": "5f06f0f96ecff430d0de9d2d9d202de9", "score": "0.5473012", "text": "function asignaViajeChofer($cod_viaje, $chofer) {\n\t\t$consulta = mysql_query(\"INSERT INTO t_chofer_viaje (cod_viaje, legajo) \n\t\t\t\t\t\t\t\tvalues ('\".$cod_viaje.\"',\".$chofer.\");\" );\n\t\tif (!$consulta) {\n\t\t\tdie('Consulta no válida: ' . mysql_error());\n\t\t\treturn false;\n\t\t\t\n\t\t} else { \n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "395b714255cb0dab64910dad1f84fc11", "score": "0.5468744", "text": "function CadastrarEditora($nome)\r\n{\r\n $sql = 'INSERT INTO tb_editora VALUES (null,\"'.$nome.'\")';\r\n $res = $GLOBALS['conexao'] -> query($sql);\r\n\r\n if ($res)\r\n {\r\n alert(\"Editora cadastrada com sucesso!\"); \r\n }\r\n else\r\n {\r\n alert(\"Editora já cadastrada no sistema.\");\r\n }\r\n}", "title": "" }, { "docid": "911e95d71838f599df6b60d89cccd037", "score": "0.5465564", "text": "function createPrestamo($codigo, $nombre)\n{\n /*INCLUDE PHP AccesoAula.php\n Referencia a una funcion CREATE de AccesoAula.php, en la cual reciba por parametros\n numero, edificio y capacidad\n En la clase AccesoAula, tienen que hacer la relacion con sl script de la BD\n */\n\n //Si la transaccion es true\n echo 1;\n //Esto echo retorna en la funcion Success: function (response) deñ archivo CnxAdminAulas\n //Cada numero es una opcion diferente dentro de CnxAdminAulas\n}", "title": "" }, { "docid": "1b200a10426d10fd301eda252f28725b", "score": "0.5462984", "text": "static public function ExpedienteExistenteP()\n {\n\n $ruta = ControladorRuta::ctrRuta();\n\n if (isset($_POST[\"idcliente\"])) {\n\n $idcliente = $_POST[\"idcliente\"];\n $idcitamedica = $_POST[\"idcitamedica\"];\n\n $columna1 = \"ID_CLIENTE\";\n $valor1 = $idcliente;\n $tabla1 = \"expediente\";\n\n $resultado1 = CitaControlador::ConsultarRegistroC($tabla1, $columna1, $valor1);\n\n $respuesta = empty($resultado1);\n\n if ($respuesta == true) {\n\n ?>\n <script LANGUAGE=\"javascript\">\n $(document).ready(function() {\n\n swal({\n titltype: \"error\",\n title: \"¡ERROR!\",\n text: \"NO EXISTE EXPEDIENTE, SE DEBE DE CREAR ANTES DE LA CONSULTA\",\n showConfirmButtom: true,\n confirmButtomText: \"Crear Expediente\"\n }).then((result) => {\n if (result.value) {\n window.location = \"<?php echo $ruta; ?>crear-expediente/\" + <?php echo $idcitamedica; ?>;\n }\n })\n\n });\n </script>\n <?php\n } else {\n ?>\n <script LANGUAGE=\"javascript\">\n $(document).ready(function() {\n\n swal({\n titltype: \"success\",\n title: \"¡CONTINUAR!\",\n text: \"EL PACIENTE YA CUENTA CON UN EXPEDIENTE, COMENZAR DIAGNOSTICO\",\n showConfirmButtom: true,\n confirmButtomText: \"Comenzar\"\n }).then((result) => {\n if (result.value) {\n window.location = \"<?php echo $ruta; ?>diagnostico/\" + <?php echo $idcitamedica; ?>;\n }\n })\n\n });\n </script>\n <?php\n }\n }\n }", "title": "" }, { "docid": "3947e9b2ef7fdf8e05cdb03702f08c5e", "score": "0.54511887", "text": "public static function ajouterHopital(){\n\t\t$utilisateurConnecter = $_SESSION['utilisateurConnecter'];\n if(isset($_REQUEST['add'])){\n \t\ttry {\n \t\t\tModelGestionHopital::ajouterHopital();\n $vueConfirmation[] = \"L'hopital à bien été ajouté.\";\n \t\t} catch(PDOException $ex){;\n $vueErreur[] = $ex->getMessage();\n } catch(Exception $e){\n $vueErreur[]=$e->getMessage();\n }\n }\n require_once('vue/pages/moderateur/ajouterHopital.php');\n\t}", "title": "" }, { "docid": "2515fdb12c36c419f4bb07c1a5df0fa3", "score": "0.5446577", "text": "public static function CtrAgregarmpl()\n {\n if (isset($_POST[\"idmateriaplan\"])) {\n \n $tabla = \"pertenece\";\n $datos = array(\n \"cod_mat\" => $_POST[\"nuevamateriapl\"],\n \"codpe\" => $_POST[\"idmateriaplan\"],\n );\n $respuesta = modeloplandeestudios::mdlagregarmateria($tabla, $datos);\n if ($respuesta === \"ok\") {\n echo '<script>\n swal({\n type: \"success\",\n title: \"MATERIA AGREGADA\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n\n }).then((result)=>{\n\n if(result.value){\n window.location = \"plandeestudios\";\n }\n });\n </script>';\n } else {\n echo '<script>\n\n swal({\n type: \"error\",\n title: \"¡MATERIA YA EXISTENTE EN EL PLAN O NO SE A PODIDO AGREGAR!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n\n }).then((result)=>{\n if(result.value){\n window.location = \"plandeestudios\";\n }\n });\n </script>';\n }\n \n }\n }", "title": "" }, { "docid": "05744665c4e8dca5f4e8ba880d5583ae", "score": "0.5437859", "text": "public function enregistrementAvis(){\n\n session_start();\n $meta['title'] = 'Votre avis sur la commande';\n $meta['menu'] = 'panier';\n $userConnect = $this->userConnect();\n $userConnectAdmin = $this->userConnectAdmin();\n\n $msg['error'] = [];\n $formulaireAvis = false;\n\n $avisBDD= new modeleAvis();\n $formulaire = new controleurFonctions();\n\n if(isset($_GET['avis']) && !empty($_GET['avis']) && is_numeric($_GET['avis'])){\n\n if($userConnect){\n\n if($this->controlePostAvis($_GET['avis'], $_SESSION['membre']['id_membre'])){\n\n $formulaireAvis = true;\n\n // Si post, controler les champs, si la commande existe et appartient au bon membre et n'a pas déjà été posté.\n if($_POST){\n\n if(isset($_POST['id_commande_velo']) && isset($_POST['prenom']) && isset($_POST['avis'])){\n\n if(empty($_POST['prenom']) || strlen($_POST['prenom']) > 32 || strlen($_POST['prenom']) < 2){\n $msg['error']['prenom'] = \"Veuillez donner un <b>pseudo</b> entre 2 et 32 caractères.\";\n }\n\n if(empty($_POST['avis']) || strlen($_POST['avis']) > 4500 || strlen($_POST['avis']) < 10){\n $msg['error']['avis'] = \"Veuillez donner votre <b>avis</b> entre 10 et 4500 caractères.\";\n }\n\n if(!$this->controlePostAvis($_POST['id_commande_velo'], $_SESSION['membre']['id_membre'])){\n $msg['error']['generale'] = self::ERREUR_POST;\n }\n\n if(empty($msg['error'])){\n\n foreach ($_POST as $key => $value){\n $_POST[$key] = htmlspecialchars($value, ENT_QUOTES);\n }\n\n extract($_POST);\n\n $avisBDD->insertAvis($id_commande_velo, $_SESSION['membre']['id_membre'], $prenom, $avis);\n\n $msg['error']['confirm'] = \"Merci beaucoup !<br>Votre avis a bien été posté.\";\n\n $formulaireAvis = false;\n\n }\n\n } else {\n $msg['error']['generale'] = self::ERREUR_POST;\n }\n\n }\n\n } else {\n $msg['error']['generale'] = \"Aucun avis ne peut être laissé sur cette comande de votre part.\";\n }\n } else {\n $msg['error']['generale'] = \"Vous devez être connecté pour laisser un avis.\";\n }\n } else {\n $msg['error']['generale'] = self::ERREUR_POST;\n }\n\n $this->Render('../vues/membres/ajout-avis.php', array('meta' => $meta, 'msg' => $msg, 'userConnect' => $userConnect, 'userConnectAdmin' => $userConnectAdmin, 'formulaire' => $formulaire, 'formulaireAvis' => $formulaireAvis));\n\n }", "title": "" }, { "docid": "8827d0bd7c30f9286a067f8902fb37a5", "score": "0.54343516", "text": "public function crescer(){\n $this->comer();\n echo '<br/>' .'estou crescendo';\n }", "title": "" }, { "docid": "3986285056fb8cfcc987365d585fd9d7", "score": "0.543054", "text": "function ajoutIntervention($idAffaire)\n{\n\t$id = $_GET[ \"id\" ];\n\n\t$type = RequeteModification::getInstance()->getToutTypeInformation();\n\t$agents = RequeteRecherche::getInstance()->getAgentsNomPrenom();\n\n\t$page = \"* champs obligatoire.</br>\";\n\t$page .= \"<form action = '' method = 'POST'>\";\n\t$page .= \"<table>\";\n\n\t$page .= \"<tr><th><label for='typeInfo'><b> Type d'intervention *</b></label></th>\";\n\t$page .= \"<th><label for='texteInfo'><b> Date de l'intervention *</b></label></th>\";\n\t$page .= \"<th><label for='texteInfo'><b> Information de l'intervention *</b></label></th>\";\n\t$page .= \"<th><label for='texteInfo'><b> Agent affecte à l'intervention *</b></label></th>\";\n\n\t$page .= \"<tbody><td><select name = 'typeInfo'>\";\n\n\tforeach($type as $t){\n\t\t$page .= \"<option value = '\".$t->getId().\"'>\".utf8_encode($t->getType()).\"</option>\";\n\t}\n\n\t$page .= \"</select>\";\n\t$page .= \"<td><input type = 'text' class = 'input-large' id = 'datepicker' name = 'date' /></td>\";\n\t$page .= \"<td><textarea col='20' rows='6' name='texteInfo'></textarea></td>\";\n\n\t$page .= \"<td><select name='choixAgentInter'>\";\n\t$page .= \"<option value = '-1'>CHOISSISEZ UN AGENT</option>\";\n\tforeach($agents as $a){\n\t\t$page .= \"<option value = '\".$a->getNom().\" \".utf8_encode($a->getPrenom()).\"'>\".utf8_encode($a->getNom()).\" \".utf8_encode($a->getPrenom()).\"</option>\";\n\t}\n\t$page .= \"</select></td>\";\n\t$page .= \"</tbody><tr><td><input type='submit' class='btn btn-success' name='okIntervention' value='valider' /></td></tr>\";\n\t$page .= \"</table></form>\";\n\n\tif(isset($_POST[ \"okIntervention\" ])){\n\n\t\tif(! empty($_POST[ \"texteInfo\" ]) && ! empty($_POST[ \"typeInfo\" ])){\n\n\t\t\t$inf = new Intervention();\n\n\t\t\tdate_default_timezone_set('Europe/Paris');\n\n\t\t\t$inf->setTexte($_POST[ \"texteInfo\" ]);\n\t\t\t$inf->setType($_POST[ \"typeInfo\" ]);\n\t\t\tif($_POST[ 'date' ] == \"\"){\n\t\t\t\t$inf->setDate(date(\"Y-m-d\"));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$inf->setDate($_POST[ 'date' ]);\n\t\t\t}\n\n\t\t\tif($_POST[ \"choixAgentInter\" ] == - 1){\n\t\t\t\t$agent = explode( \" \", $_SESSION[ \"prenomNom\" ]);\n\t\t\t\t$inf->setAgent($agent[1].\" \".$agent[0]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$inf->setAgent($_POST[ \"choixAgentInter\" ]);\n\t\t\t}\n\n\t\t\tRequeteModification::getInstance()->ajoutIntervention($id, $inf);\n\t\t\techo \"L'intervention a bien été ajoutée.\";\n\t\t\theader(\"location:affaire.php?id=$idAffaire\");\n\n\t\t}\n\n\n\t}\n\n\n\treturn $page;\n\n\n}", "title": "" }, { "docid": "2c36e569e1eecbf0f6e1902dee9dc43a", "score": "0.5426705", "text": "function EDIT() {\n\t\t// se construye la sentencia de busqueda de la tupla en la bd\n\t\t$sql = \"SELECT * FROM HISTORIA WHERE (IdTrabajo = '$this->IdTrabajo' AND IdHistoria = '$this->IdHistoria')\";//se construye la sentencia sql\n\t\t// se ejecuta la query\n\t\t$result = $this->mysqli->query( $sql );\n\t\t// si el numero de filas es igual a uno es que lo encuentra\n\t\tif ( $result->num_rows == 1 ) { // se construye la sentencia de modificacion en base a los atributos de la clase\n\t\t\t\n\t\t\t\t$sql = \"UPDATE HISTORIA SET \n\t\t\t\t\tIdTrabajo = '$this->IdTrabajo',\n\t\t\t\t\t IdHistoria='$this->IdHistoria',\n TextoHistoria='$this->TextoHistoria'\n\t\t\t\tWHERE ( IdTrabajo = '$this->IdTrabajo' AND IdHistoria = '$this->IdHistoria'\n\t\t\t\t)\";//se construye la sentencia sql de modificación\n \n\t\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\n\t\t\tif ( !( $resultado = $this->mysqli->query( $sql ) ) ) {\n\t\t\t\treturn 'Error en la modificación';\n\t\t\t} else { // si no hay problemas con la modificación se indica que se ha modificado\n\t\t\t\treturn 'Modificado correctamente';\n\t\t\t}\n\n\t\t} else // si no se encuentra la tupla se manda el mensaje de que no existe la tupla\n\t\t\treturn 'No existe en la base de datos';\n\t}", "title": "" }, { "docid": "6ebfd8f31b4f23429a7541966f15b6c9", "score": "0.54243135", "text": "function modifFamille($idbbsitting,$idfamille, $nom, $nbenfants, $idlangue1, $pays, $francais, $bdd) {\n\t$verif = verifIdFamille($idfamille, $bdd);\n\t// $verif['bool']=true;\n\tif ($verif==true) { \n\t\t$requete = $bdd->prepare('UPDATE famille SET nom_famille= :nom, nombre_enfants= :nbenfants, id_langue_1= :id_langue, francais= :francais, pays = :pays WHERE id_famille= :id_famille');\n\t\t$requete->execute(array(':nom' => $nom,\n\t\t\t'nbenfants' => $nbenfants,\n\t\t\t'id_langue' => $idlangue1,\n\t\t\t'francais' => $francais,\n\t\t\t'pays' => $pays,\n\t\t\t'id_famille' => $idfamille\n\t\t\t));\n\t\t$reponse[\"commentaire\"] = \"Modification effectuée\";\n\t\t$reponse[\"id_modif\"] = $idbbsitting;\n\t\t$reponse[\"erreur\"] = 0;\n\t} else {\n\t\t$reponse[\"commentaire\"] = \"Cette famille n'existe pas !\";\n\t\t$reponse[\"erreur\"] = 1;\n\t}\n\t\n\treturn $reponse;\n}", "title": "" }, { "docid": "d4e6f1e2f61902682204f7dcadfee789", "score": "0.54066026", "text": "public function enregistrerModif()\n {\n // Nettoyage de la saisie\n $nettoyeur = new NettoyeurManager();\n $nettoyeur->ajouter('Bv21411850\\Emdn2\\Utils\\Nettoyage\\NettoyeurBalisesHtml');\n $nettoyeur->ajouter('Bv21411850\\Emdn2\\Utils\\Nettoyage\\NettoyeurEspacesVides');\n $data = $nettoyeur->nettoyer($_POST);\n // Reconstruction de l'article avec des données propres\n $article = Article::initialize($data);\n // Validation des données\n $validateur = new ValidateurManager();\n $validateur->ajouter('Bv21411850\\Emdn2\\Utils\\Validation\\ValidateurString');\n $validateur->ajouter('Bv21411850\\Emdn2\\Utils\\Validation\\ValidateurEmpty');\n if ($validateur->valider($data)) {\n ArticleBd::modifierDocument($article);\n $titre = \"Modification enregistrée\";\n $contenu = \"<p>Votre modification a bien été enregistrée.</p>\";\n } else {\n $titre = \"Modification pas enregistrée\";\n $contenu = \"<p>Votre modification a été ignorée car :</p>\";\n $contenu .= \"<ul>\";\n foreach ($validateur->getErreurs() as $valeur) {\n $contenu .= \"<li>\" . $valeur . \"</li>\";\n }\n $contenu .= \"</ul>\";\n }\n $this->response->setPart('title', $titre);\n $this->response->setPart('content', $contenu);\n }", "title": "" }, { "docid": "5364663f1ad39a8b31241e44e8762fa4", "score": "0.5405616", "text": "public function test_edit_user_success()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/users')\n ->visit('/admin/users/1/edit')\n ->attach('avatar', __DIR__.'/testing/iphone.jpg')\n ->type('username', 'Dang Viet')\n ->press('Submit')\n ->assertPathIs('/admin/users/1/edit')\n ->assertSee('Edit Success !');\n });\n }", "title": "" }, { "docid": "ce1b56e48ea68587ddab87b05a92d6e0", "score": "0.5402952", "text": "public function test4(){\n\n $this->visit('/course_description/2')\n ->type('salma', 'name')\n ->type('[email protected]', 'email')\n ->type('12312312312311', 'ssn')\n ->type('haram','address')\n ->type('01065518447', 'phone_number')\n ->press('Submit')\n ->see('you are already registered to this course');\n }", "title": "" }, { "docid": "fce2d897fc098adbd24094839c8593cd", "score": "0.53995264", "text": "public function test_ajoutComposant(){\r\n //initialise les attributs\r\n $query = \"CREATE (test:t{name:\\\"test\\\"})\";\r\n $composant = new Composant(\"a\",\"b\",\"c\",\"d\");\r\n //on test et on vérifie\r\n $query->ajouterComposant($composant);\r\n $this->assertEquals($composant, $query);\r\n }", "title": "" }, { "docid": "b885dbaf8979299b707d7bf4bd7bc190", "score": "0.53980064", "text": "static public function ctrCrearPersona(){\n\n if(isset($_POST[\"dniP\"])){\n\n if(preg_match('/^[0-9]+$/', $_POST[\"dniP\"]) && preg_match('/^[0-9]+$/', $_POST[\"ubgeoP\"])\n && preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"nombresP\"])&&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"apellidoPP\"])&&\n preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"apellidoMP\"])&&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"tipoPersonaP\"])&&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"sexoP\"])\n \n ){\n\n $tabla = \"persona\";\n\n $datos = array(\"dni\"=>$_POST[\"dniP\"],\n \"nombres\"=>$_POST[\"nombresP\"],\n \"apeP\"=>$_POST[\"apellidoPP\"],\n \"apeM\"=>$_POST[\"apellidoMP\"],\n \"fechaN\"=>$_POST[\"fNP\"],\n \"tipoPe\"=>$_POST[\"tipoPersonaP\"],\n \"sexo\"=>$_POST[\"sexoP\"],\n \"padre\"=>$_POST[\"padreP\"],\n \"madre\"=>$_POST[\"madreP\"],\n \"lengua\"=>$_POST[\"lenguaMP\"],\n \"lugar\"=>$_POST[\"lugarHP\"],\n \"tipoP\"=>$_POST[\"tipoPP\"],\n \"complicaciones\"=>$_POST[\"complicacionPP\"],\n \"ubigeo\"=>$_POST[\"ubgeoP\"]); \n \n $respuesta = ModeloMatricula::mdlIngresarPersona($tabla, $datos);\n\n if($respuesta == \"ok\"){\n\n echo'<script>\n\n swal({\n type: \"success\",\n title: \"La Persona ha sido guardada correctamente\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then((result) => {\n if (result.value) {\n\n window.location = \"matriculas\";\n\n }\n })\n\n </script>';\n\n }else{\n\n echo'<script>\n\n swal({\n type: \"error\",\n title: \"¡Asegurese de ingresar los datos correctamente!\",\n text: \"Verifique que el ubigeo exista\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then((result) => {\n if (result.value) {\n \n window.location = \"matriculas\";\n \n }\n })\n\n </script>';\n\n }\n\n\n }else{\n\n echo'<script>\n\n swal({\n type: \"error\",\n title: \"¡Asegurese de ingresar los datos correctamente!\",\n text: \"Probablemente se deba a un tipo de dato incorrecto\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\",\n closeOnConfirm: false\n }).then((result) => {\n if (result.value) {\n \n window.location = \"matriculas\";\n \n }\n })\n\n </script>';\n\n }\n\n }\n\n }", "title": "" }, { "docid": "6389d53377e98b856f5c4443dfc53fdf", "score": "0.53978837", "text": "function htm_creer_contact($e)\r\n{\r\n\tglobal $language_adm;\r\n\r\n?>\r\n\r\n<div id=\"menu_right\">\r\n\r\n\t<div class=\"menus_r_haut\">\r\n\t\r\n\t\t<ul class=\"ul_barre_adm\">\r\n\t\t\t<li class=\"li_barre_adm\"><?php echo $language_adm['page_gest_ema_cont_crea_info']; ?></li>\r\n\t\t</ul>\r\n\t\r\n\t</div>\r\n\t\r\n\t<form method=\"post\" action=\"\">\r\n\t\r\n\t<div class=\"menus_r_fond\">\r\n\t \r\n\t\t<?php\r\n\t \r\n\t\tif(!empty($e) && $e == 1) echo '<div class=\"form_left\"></div><div class=\"form_right\"><p><span class=\"error\">'. $language_adm['page_gest_ema_cont_crea_error1'] .'</span></p></div>';\r\n\t\tif(!empty($e) && $e == 2) echo '<div class=\"form_left\"></div><div class=\"form_right\"><p><span class=\"error\">'. $language_adm['page_gest_ema_cont_crea_error2'] .'</span></p></div>';\r\n\t\r\n\t\t?>\r\n\t \r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_gest_ema_cont_crea_nom']; ?> :</div>\r\n\t\t<div class=\"form_right\"><input type=\"text\" class=\"input_con\" name=\"nom\" value=\"<?php if(!empty($_POST['nom'])) echo htmlspecialchars($_POST['nom']); ?>\" /></div>\r\n\t\t\r\n\t\t<div class=\"form_left\"><?php echo $language_adm['page_gest_ema_cont_crea_email']; ?> :</div>\r\n\t\t<div class=\"form_right\"><input type=\"text\" class=\"input_con\" name=\"email\" value=\"<?php if(!empty($_POST['email'])) echo htmlspecialchars($_POST['email']); ?>\" /></div>\r\n\t\t\r\n\t\t<div class=\"form_left\"></div>\r\n\t\t<div class=\"form_right\"><input class=\"submit\" type=\"submit\" value=\"<?php echo $language_adm['bt_link_valider']; ?>\" /></div>\r\n\t\t\r\n\t</div>\r\n\t\r\n\t</form>\r\n\r\n</div>\r\n\r\n<?php\r\n}", "title": "" }, { "docid": "e1bd84a43a4b7db7a28a7728ccdfabaa", "score": "0.5391996", "text": "function tambah($data)\n{\n // AMBIL VARIABEL CONN DILUAR FUNGSI\n global $conn;\n // MENGAMBIL NILAI DATA DARI SETIAP ELEMENT DI FORM\n $nama = htmlspecialchars($data[\"nama\"]);\n $lingkungan = htmlspecialchars($data[\"lingkungan\"]);\n $makanan = htmlspecialchars($data[\"makanan\"]);\n $kaki = htmlspecialchars($data[\"kaki\"]);\n // JALANKAN FUNGSI UPLOAD UNTUK GAMBAR\n $gambar = upload();\n // JIKA TIDAK ADA GAMBAR\n if (!$gambar) {\n // KEMBALIKAN NILAI FALSE\n return false;\n }\n // MASUKKAN DATA KE DALAM DATABASE\n $query = \"INSERT INTO hewan VALUES ('', '$nama', '$lingkungan', '$makanan', '$kaki', '$gambar')\";\n // MENARUH PERINTAH KE DATABASE\n mysqli_query($conn, $query);\n // KEMBALIKAN NILAI AFFECETED! BERHASIL/GAGAL!\n return mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "b7729736407201b16ba51e0a8a632f46", "score": "0.53916645", "text": "function insertUpdate($conexion,$consu){\r\n $rs=mysqli_query($conexion,$consu); \r\n if (!$rs) {\r\n echo \"<script>alert('Ocurrio un problema')</script>\";\r\n }\r\n }", "title": "" }, { "docid": "a30f8ecb13baf6c08c526f1158a35a63", "score": "0.53892124", "text": "function insertContain() {\n $backup = file_get_contents(\"backup.txt\");\n\n if(! $backup) {\n showFrame(\"Soubor <code>backup.txt</code> nebyl nalezen!\", false);\n return false;\n }\n\n $exploded = explode(\"== MAIN ==\", $backup);\n\n $ok = insertLessons($exploded[0]);\n if($ok) $ok = insertParagraphs($exploded[1]);\n if($ok) $ok = insertProblems($exploded[2]);\n\n showFrame(\"Tabulky byly úspěšně naplněny obsahem!\", true);\n\n return true;\n}", "title": "" }, { "docid": "01c3d3ba143680ad9fb417b08501a16f", "score": "0.5388203", "text": "public function add_a_project() {\n $this->load->model('M_Projet');\n\n //test si les données ont été renseigné\n if (isset($_POST['nom']) && isset($_POST['description']) && isset($_POST['lien'])) {\n if (!empty($_POST['nom']) && !empty($_POST['description']) && !empty($_POST['lien'])) {\n\n $nom = $this->input->post('nom');\n $description = $this->input->post('description');\n $lien = $this->input->post('lien');\n\n $this->M_Projet->add_project($nom, $description, $lien);\n\n $base_url = base_url();\n header(\"location: $base_url/C_Projet\");\n } else {\n return \"Veuillez remplir les champs.\";\n }\n }\n \n \n \n }", "title": "" }, { "docid": "901d722a463f18fe6b410cd5dcb0e570", "score": "0.5387842", "text": "public function testRedirectAjoutLieuVilleIfNotAdmin()\r\n {\r\n $this->client->request('GET', '/ajoutLieuVille');\r\n $crawler = $this->client->followRedirect();\r\n $this->assertSame(1,$crawler->filter('html:contains(\"login\")')->count());\r\n }", "title": "" }, { "docid": "10d95f3d0001dac2f4a055feac610236", "score": "0.5381144", "text": "function gestionCoupDeCoeur()\n {\n if(isset($_SESSION['idAdmin'])){\n\n if(isset($_GET['action2']))\n {\n if($_GET['action2'] == \"confirmAjout\")\n {\n echo \"<script>alert('Un coup de coeur a été enregistré en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmModif\")\n {\n echo \"<script>alert('Un coup de coeur a été modifié en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmSupp\")\n {\n echo \"<script>alert('Un coup de coeur a été supprimé en base de données');</script>\";\n }\n }\n \n $ManagerCoupDeCoeur = new \\Projet\\Models\\admin\\ManagerCoupCoeur();\n $listeCoupDeCoeur = $ManagerCoupDeCoeur->lireListeCoupDeCoeur();\n\n //Appel à la vue : affichage\n require 'app/views/admin/listeCoupDeCoeur.php';\n\n }\n else{\n header('Location: ./admin-home');\n exit();\n }\n }", "title": "" }, { "docid": "f8c3c247f6fc59280d73d10185e067d5", "score": "0.53757846", "text": "function ajouter($ref, $des, $prix, $image, $cat,&$tabErr)\r\n{\r\n $connexion = connecterServeurBD();\r\n \r\n // Vérifier que la référence saisie n'existe pas déja\r\n $requete=\"select * from produit\";\r\n $requete=$requete.\" where pdt_ref = '\".$ref.\"';\"; \r\n $jeuResultat=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\r\n \r\n //$jeuResultat->setFetchMode(PDO::FETCH_OBJ); // on dit qu'on veut que le résultat soit récupérable sous forme d'objet \r\n \r\n $ligne = $jeuResultat->fetch();\r\n if($ligne)\r\n {\r\n $message=\"Echec de l'ajout : la référence existe déjà !\";\r\n ajouterErreur($tabErr, $message);\r\n }\r\n else\r\n {\r\n // Créer la requête d'ajout \r\n $requete=\"insert into produit\"\r\n .\"(pdt_ref,pdt_designation,pdt_prix,pdt_image, pdt_categorie) values ('\"\r\n .$ref.\"','\"\r\n .$des.\"',\"\r\n .$prix.\",'\"\r\n .$image.\"','\"\r\n .$cat.\"');\";\r\n \r\n // Lancer la requête d'ajout \r\n $ok=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\r\n \r\n // Si échec de la requete\r\n if ($ok==FALSE) \r\n {\r\n $message = \"Attention, l'ajout de la fleur a échoué !!!\";\r\n ajouterErreur($tabErr, $message);\r\n } \r\n \r\n }\r\n}", "title": "" }, { "docid": "b4c0db578cbd2f12c2c6ddd872f35cc9", "score": "0.53727275", "text": "function mostrarFormularioNuevo(){\n?>\n\t<table class='tabla1' width='100%'>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<form action = 'enviarLink.php' method='post'>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<legend>Agregar un Link nuevo</legend>\n\t\t\t\n\t\t\t\t\t<table align='center'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='2'><input type='text' name='newLink'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='2'><textarea rows=\"5\" cols=\"40\" name='tags'>A&ntilde;ade aqui las palabras clave que identifiquen a tu link, asi m&aacute;s usuarios tendran la oportunidad de apreciarlos!, recuerda separarlos por comas</textarea></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><input type='radio' name='tipoInfo' value='1'>publico</td>\n\t\t\t\t\t\t\t<td><input type='radio' name='tipoInfo' value='2' checked>privado</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td colspan='2'><input type='submit' value='Aceptar'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</td>\n\t\t</tr>\n\t</tabla>\n<?\n\t}", "title": "" }, { "docid": "e9b07f450e2ed8758c1bdefc45ec276d", "score": "0.53649014", "text": "function createUti($mdp, $nom, $prenom, $login, $mail, $ue_id)\n{\n\t$pdo = PDOSingleton::getInstance();\n\n\ttry {\n\n\t\t// Initialisation des variable d'erreur PDO pour le cath\n\t $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t //Commencer une transaction\n\t $pdo->beginTransaction();\n\n\t\t$requete = $pdo->prepare(\"INSERT INTO utilisateurs (uti_nom, uti_prenom, uti_login, uti_mdp, uti_mail, uti_is_admin, uti_is_valide)\n\t\t\t\t\tVALUES (:uti_nom, :uti_prenom, :uti_login, :uti_mdp, :uti_mail, 0, 0)\");\n\n\t\t$requete->bindValue(':uti_mdp', password($mdp));\n\t\t$requete->bindValue(':uti_nom', $nom);\n\t\t$requete->bindValue(':uti_prenom', $prenom);\n\t\t$requete->bindValue(':uti_login', $login);\n\t\t$requete->bindValue(':uti_mail', $mail);\n\t\t$requete->execute();\n\t\t$pdo->commit();\n\n\t\t/// Récupérer id du nouvelle utilisateur\n\t\t$user_id = get_user($login);\n\n\t\t/// Ajout des liens pour UE\n\t\tforeach ($ue_id as $aUeId) {\n\t\t\tcreateUtiUE($user_id['uti_id'],$aUeId);\n\t\t}\n\n\t}\n\t//Gestion des erreurs caus?es par les requ?tes PDO\n\tcatch (PDOException $e) {\n\n\t\t//Annuler la transaction\n\t if ($pdo) $pdo->rollBack();\n\n\t //Ajoute l'erreur dans les message flash et retourne false\n\t\tsetMessageFlash($e->getMessage(),MESSAGE_FLASH_ERREUR);\n\t\treturn false;\n\t}\n\t// L'insertion c'est bien d?roul? retourne true\n\treturn true;\n}", "title": "" }, { "docid": "2442181ae6ea592f42c0e2cd7394c844", "score": "0.5363841", "text": "public function testEdit()\n {\n $client = static::createClient(array(), array(\n 'PHP_AUTH_USER' => 'jr',\n 'PHP_AUTH_PW' => 'jr',\n ));\n $client->followRedirects();\n\n $client = static::createClient(array(), array(\n 'PHP_AUTH_USER' => 'jr',\n 'PHP_AUTH_PW' => 'jr',\n ));\n $client->followRedirects();\n\n $crawler = $client->request('GET', '/clients');\n $link = $crawler->filter('.bloc__title a')->first()->link();\n $crawler = $client->click($link);\n $newproject = $crawler->selectLink('Projet de test')->first()->link();\n $crawler = $client->click($newproject);\n\n $link = $crawler->filter('.btn--edit')->first()->link();\n $crawler = $client->click($link);\n $form = $crawler->selectButton('Enregistrer')->form();\n $form['flyd_dashboardbundle_project_edit[status]'] = 2;\n $crawler = $client->submit($form);\n $this->assertEquals(1, $crawler->filter('html:contains(\"Projet bien enregistré.\")')->count());\n\n }", "title": "" }, { "docid": "6e00124f0b0aa5f36d09d1855926d4c7", "score": "0.5362623", "text": "public static function ajouter(){\n\t\tif(Utilisateur::isAllowed(parent::$_pdo,PROFIL_SUPERVISEUR)){\n\t\t\t\n\t\t\tparent::$_response->addVar('txt_ajouterProduit'\t\t\t, gettext('Ajouter un produit'));\t\n\t\t\tparent::$_response->addVar('txt_retour'\t\t\t\t\t, gettext('Retour'));\t\n\t\t\tparent::$_response->addVar('txt_code_produit'\t\t\t, gettext('Code du produit'));\t\n\t\t\tparent::$_response->addVar('txt_libelle'\t\t\t\t, gettext('Libelle'));\t\n\t\t\tparent::$_response->addVar('txt_largeur'\t\t\t\t, gettext('Largeur'));\t\n\t\t\tparent::$_response->addVar('txt_hauteur'\t\t\t\t, gettext('Hauteur'));\t\n\t\t\tparent::$_response->addVar('txt_profondeur'\t\t\t\t, gettext('Profondeur'));\t\n\t\t\tparent::$_response->addVar('txt_uniteMesure'\t\t\t, gettext('Unite de mesure'));\t\n\t\t\tparent::$_response->addVar('txt_quantiteParUniteMesure'\t, gettext('Quantit&eacute; par unit&eacute; de mesure'));\t\n\t\t\tparent::$_response->addVar('txt_poidsBrut'\t\t\t\t, gettext('Poids brut'));\t\n\t\t\tparent::$_response->addVar('txt_poidsNet'\t\t\t\t, gettext('Poids net'));\t\n\t\t\tparent::$_response->addVar('txt_estPoidsVariable'\t\t, gettext('Est un poids variable'));\t\n\t\t\tparent::$_response->addVar('txt_priorite'\t\t\t\t, gettext('Priorit&eacute;'));\t\n\t\t\tparent::$_response->addVar('txt_stock'\t\t\t\t\t, gettext('Stock'));\t\n\t\t\tparent::$_response->addVar('txt_photo'\t\t\t\t\t, gettext('Photo'));\t\n\t\t\tparent::$_response->addVar('txt_non'\t\t\t\t\t, gettext('Non'));\t\n\t\t\tparent::$_response->addVar('txt_oui'\t\t\t\t\t, gettext('Oui'));\t\n\t\t\tparent::$_response->addVar('txt_boutonEnregistrer'\t\t, gettext('Enregistrer'));\t\n\t\t\tparent::$_response->addVar('txt_infosProduit'\t\t\t, gettext('Informations du produit'));\n\t\t\tparent::$_response->addVar('txt_eans'\t\t\t\t\t, gettext('Les codes Eans correspondant au produit'));\t\n\t\t\tparent::$_response->addVar('txt_ajouterEan'\t\t\t\t, gettext('Ajouter un code EAN pour ce produit'));\t\n\t\t\tparent::$_response->addVar('txt_null'\t\t\t\t\t, gettext('Sans priorit&eacute;'));\t\n\t\t\tparent::$_response->addVar('txt_debut'\t\t\t\t\t, gettext('D&eacute;but'));\t\n\t\t\tparent::$_response->addVar('txt_normal'\t\t\t\t\t, gettext('Normal'));\t\n\t\t\tparent::$_response->addVar('txt_fin'\t\t\t\t\t, gettext('Fin'));\t\n\t\t\t\n\t\t\tif(parent::$_request->getVar('submit')){\n\t\t\t\t$error_message = '';\n\t\n\t\t\t\t$codeProduit = parent::$_request->getVar('codeProduit');\n\t\t\t\tif(!Produit::testIntegrite('Code produit', $codeProduit)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner un code produit valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$libelle = parent::$_request->getVar('libelle');\n\t\t\t\tif(!Produit::testIntegrite('Libelle', $libelle)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner un libelle valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$largeur = parent::$_request->getVar('largeur');\n\t\t\t\tif(!Produit::testIntegrite('Largeur', $largeur)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une largeur valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$hauteur = parent::$_request->getVar('hauteur');\n\t\t\t\tif(!Produit::testIntegrite('Hauteur', $hauteur)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une hauteur valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$profondeur = parent::$_request->getVar('profondeur');\n\t\t\t\tif(!Produit::testIntegrite('Profondeur', $profondeur)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une profondeur valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$uniteMesure = parent::$_request->getVar('uniteMesure');\n\t\t\t\tif(!Produit::testIntegrite('Unite de mesure', $uniteMesure)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une unit&eacute; de mesure valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$quantiteParUniteMesure = parent::$_request->getVar('quantiteParUniteMesure');\n\t\t\t\tif(!Produit::testIntegrite('Quantite par unite de mesure', $quantiteParUniteMesure)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une quantit&eacute; par unit&eacute; de mesure valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poidsBrut = parent::$_request->getVar('poidsBrut');\n\t\t\t\tif(!Produit::testIntegrite('Poids brut', $poidsBrut)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner un poids brut valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poidsNet = parent::$_request->getVar('poidsNet');\n\t\t\t\tif(!Produit::testIntegrite('Poids net', $poidsNet)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner un poids net valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$estPoidsVariable = (int) parent::$_request->getVar('estPoidsVariable');\n\t\t\t\tif(!Produit::testIntegrite('Est poids variable', $estPoidsVariable)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner un estPoidsVariable valide') . '<br />';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$priorite = (int) parent::$_request->getVar('priorite');\n\t\t\t\tif(!Produit::testIntegrite('Priorite', $priorite)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une priorit&eacute; valide') . '<br />';\n\t\t\t\t}\n\t\t\t\tif ($priorite == '') $priorite = null;\n\t\t\t\t\n\t\t\t\t$stock = (int) parent::$_request->getVar('stock');\n\t\t\t\tif(!Produit::testIntegrite('Stock', $stock)){\n\t\t\t\t\t$error_message .= gettext('Veuillez renseigner une valeur de stock valide') . '<br />';\n\t\t\t\t}\n\t\t\t\tif ($stock == '') $stock = null;\n\t\t\t\t\n\t\t\t\t$eans = parent::$_request->getVar('ean');\n\t\t\t\tif ($eans != null){\n\t\t\t\t\tforeach($eans as $key=>$ean){\n\t\t\t\t\t\t$code = (int) $ean;\n\t\t\t\t\t\tif ($ean != '' && $ean != null){\n\t\t\t\t\t\t\t$testEan = Ean::loadByCodeEan(parent::$_pdo, $ean);\n\t\t\t\t\t\t\tif($testEan != null){\n\t\t\t\t\t\t\t\tunset($eans[$key]);\n\t\t\t\t\t\t\t\t$error_message .= gettext('Ce code EAN existe d&eacute;j&agrave; pour un autre produit. ') . gettext('Veuillez renseigner un autre code EAN.') . '<br />';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($code == null ){ //|| strlen($ean) != 13){\n\t\t\t\t\t\t\t\t$error_message .= gettext('Veuillez renseigner un code EAN valide') . '<br />';\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\telse\n\t\t\t\t\t$eans = array();\n\t\t\t\t\t\n\t\t\t\t$items \t= array_merge($eans);\n\t\t\t\t$eans \t= array();\n\t\t\t\tforeach($items as $item){\n\t\t\t\t\t$ean = Ean::loadByCodeEan(parent::$_pdo, $item);\n\t\t\t\t\tif ($ean != null)\n\t\t\t\t\t\t$eans[] = array($ean->getIdEan(), $ean->getEan());\n\t\t\t\t\telse\n\t\t\t\t\t\t$eans[] = array(0, $item);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* Récupérer la photo du produit */\n\t\t\t\t$photo = parent::$_request->getVar('photo');\n\t\t\t\t\n\t\t\t\tif($photo == null)\n\t\t\t\t\t$photo = APPLICATION_PATH . 'images/default.png';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($error_message == ''){\t\n\t\t\t\t\t$product = Produit::create(parent::$_pdo, $codeProduit, $libelle, $photo, $largeur, $hauteur, $profondeur, $uniteMesure, $quantiteParUniteMesure, $poidsBrut, $poidsNet, $estPoidsVariable, $priorite, $stock);\n\t\t\t\t\t\n\t\t\t\t\tforeach($eans as $ean) {\n\t\t\t\t\t\tif(!in_array($ean[1], $listeEan)) {\n\t\t\t\t\t\t\t/* Si, pour un produit donné, l'ean n'est pas présent dans la table => Ajouter */\n\t\t\t\t\t\t\tif ($ean[1] != null && $ean[1] != ''){\n\t\t\t\t\t\t\t\t$itemEan = Ean::create(parent::$_pdo,$product->getIdProduit(),$ean[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\t\n\t\t\t\t\t$log \t= '[' . date('d/m/Y:H:i:s') . '] -- ' . gettext('Ajout du produit '). $product->getIdProduit() . gettext(' par ') . $_SESSION['user_login'].\"\\r\\n\";\n\t\t\t\t\t$logFile = '../application/logs/'.date('m-Y').'-produit.log';\n\t\t\t\t\twriteLog($log, $logFile);\n\t\t\t\t\t\n\t\t\t\t\theader('Location: ' . APPLICATION_PATH . 'produit/afficher/' . $product->getIdProduit());\t// Redirection vers la page du produit\n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tparent::$_response->addVar('form_errors'\t\t\t\t, $error_message);\n\t\t\t\t\tparent::$_response->addVar('form_codeProduit'\t\t\t, $codeProduit);\n\t\t\t\t\tparent::$_response->addVar('form_libelle'\t\t\t\t, $libelle);\n\t\t\t\t\tparent::$_response->addVar('form_hauteur'\t\t\t\t, $hauteur);\n\t\t\t\t\tparent::$_response->addVar('form_largeur'\t\t\t\t, $largeur);\n\t\t\t\t\tparent::$_response->addVar('form_profondeur'\t\t\t, $profondeur);\n\t\t\t\t\tparent::$_response->addVar('form_uniteMesure'\t\t\t, $uniteMesure);\n\t\t\t\t\tparent::$_response->addVar('form_quantiteParUniteMesure', $quantiteParUniteMesure);\n\t\t\t\t\tparent::$_response->addVar('form_poidsBrut'\t\t\t\t, $poidsBrut);\n\t\t\t\t\tparent::$_response->addVar('form_poidsNet'\t\t\t\t, $poidsNet);\n\t\t\t\t\tparent::$_response->addVar('form_estPoidsVariable'\t\t, $estPoidsVariable);\n\t\t\t\t\tparent::$_response->addVar('form_photo'\t\t\t\t\t, $photo);\n\t\t\t\t\tparent::$_response->addVar('form_priorite'\t\t\t\t, $priorite);\n\t\t\t\t\tparent::$_response->addVar('form_stock'\t\t\t\t\t, $stock);\n\t\t\t\t\tparent::$_response->addVar('form_arrayEans'\t\t\t\t, $eans);\n\t\t\t\t\tparent::$_response->addVar('form_noEan'\t\t\t\t\t, gettext('Ce produit ne poss&egrave;de pas de code EAN !'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\tparent::$_response->addVar('form_codeProduit'\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_libelle'\t\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_hauteur'\t\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_largeur'\t\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_profondeur'\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_uniteMesure'\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_quantiteParUniteMesure', '');\n\t\t\t\tparent::$_response->addVar('form_poidsBrut'\t\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_poidsNet'\t\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_estPoidsVariable'\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_photo'\t\t\t\t\t, '');\n\t\t\t\tparent::$_response->addVar('form_priorite'\t\t\t\t, '');\t\t\t\t\n\t\t\t\tparent::$_response->addVar('form_stock'\t\t\t\t\t, '');\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "62b0dca10e21c9f99f2292345225dd8a", "score": "0.53595227", "text": "function ajouter($ref, $des, $prix, $image, $cat,&$tabErr)\n{\n $connexion = connecterServeurBD();\n \n // Si la connexion au SGBD à réussi\n if (TRUE) \n {\n \n // Vérifier que la référence saisie n'existe pas déja\n $requete=\"select * from produit\";\n $requete=$requete.\" where pdt_ref = '\".$ref.\"';\"; \n $jeuResultat=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\n\n $jeuResultat->setFetchMode(PDO::FETCH_OBJ); // on dit qu'on veut que le résultat soit récupérable sous forme d'objet \n \n $ligne = $jeuResultat->fetch();\n if($ligne)\n {\n $message=\"Echec de l'ajout : la référence existe déjà !\";\n ajouterErreur($tabErr, $message);\n }\n else\n {\n // Créer la requête d'ajout \n $requete=\"insert into produit\"\n .\"(pdt_ref,pdt_designation,pdt_prix,pdt_image, pdt_categorie) values ('\"\n .$ref.\"','\"\n .$des.\"',\"\n .$prix.\",'\"\n .$image.\"','\"\n .$cat.\"');\";\n \n // Lancer la requête d'ajout \n $ok=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\n \n // Si la requête a réussi\n if ($ok)\n {\n $message = \"La fleur a été correctement ajoutée\";\n ajouterErreur($tabErr, $message);\n }\n else\n {\n $message = \"Attention, l'ajout de la fleur a échoué !!!\";\n ajouterErreur($tabErr, $message);\n } \n\n }\n // fermer la connexion\n // deconnecterServeurBD($idConnexion);\n }\n else\n {\n $message = \"problème à la connexion <br />\";\n ajouterErreur($tabErr, $message);\n }\n}", "title": "" }, { "docid": "e10dcc03eaf1064e51a1b0be103d6e11", "score": "0.5358879", "text": "function ajouterUnLivre()\n {\n if(isset($_SESSION['idAdmin'])){\n\n //on envoie les données a la bdd \n if(isset($_GET['action2']))\n {\n if($_GET['action2'] == \"ajoutLivre\")\n {\n //$_FILES : variable superglobal qui permet de récupérer les input type file\n $contenuImage = \"\";\n if(isset($_FILES['imageLivre']) && ($_FILES['imageLivre']['tmp_name'] != \"\"))\n {\n $contenuImage = file_get_contents($_FILES['imageLivre']['tmp_name']);\n }\n \n\n //On crée un objet de type livre\n $unLivre = new \\Projet\\Models\\admin\\objets\\Livre('',$_POST['selectCategorie'],$_POST['selectAuteurs'],$_POST['nomLivre'],$contenuImage,'',$_POST['dateLivre'],\n $_POST['descriptionLivre'],$_POST['selectDispoLivre'],$_POST['selectEditeurs'],$_POST['nbPageLivre'],$_POST['dimensionLivre'],$_POST['langueLivre'],$_POST['eanLivre'],$_POST['isbnLivre']);\n\n //On appelle la fonction Create de l'objet livre pour enregistrer en bdd\n $unLivre->Create();\n\n header('Location: ./admin-listeLivres?action2=confirmAjout');\n }\n \n }\n\n $ManagerCategorie = new \\Projet\\Models\\admin\\ManagerCategories();\n //récupères dans un select toutes les catégories\n $listCategorie = $ManagerCategorie->lireListeCategorie();\n\n $ManagerAuteurs = new \\Projet\\Models\\admin\\ManagerAuteurs();\n //récupères dans un select toutes les auteurs\n $listAuteurs = $ManagerAuteurs-> lireListeAuteurs();\n\n $ManagerEditeurs = new \\Projet\\Models\\admin\\ManagerEditeurs();\n //récupères dans un select toutes les éditeurs\n $listEditeurs = $ManagerEditeurs->lireListeEditeurs();\n\n //Appel à la vue : affichage\n require 'app/views/admin/ajoutLivre.php';\n }\n else{\n header('Location: ./admin-home');\n exit();\n }\n }", "title": "" }, { "docid": "0e8c097f00637cdfa72a05aaf27ccd6a", "score": "0.5358132", "text": "function form(){\n?>\n <form class= \"add-content\" action=\"index.php\" method=\"POST\">\n URL: <input type = \"text\" placeholder = \"paste long URL\" name = \"long_url\" required>\n Title: <input type = \"text\" placeholder = \"titel\" name = \"title\" required>\n <button class =\"button\" type = \"submit\">Save</button>\n </form>\n<?php\n // toevoegen van eeen link\n if(isset($_POST['long_url']))\n {\n $this->long_url = htmlspecialchars($_POST['long_url']);\n }\n\n if(isset($_POST['title']))\n {\n $this->title = htmlspecialchars($_POST['title']);\n }\n\n // toevoegen van de nieuwe link bij bitly\n $this->data= array('title'=>$this->title, 'long_url'=>$this->long_url );\n \n $newLink = new Post($this->data, $this->token);\n $newLink->post();\n $newLink->default();\n $newLink->postHeaders();\n $newLink->result();\n \n }", "title": "" }, { "docid": "5311f4246f7b9ea8182f59a99231cb2f", "score": "0.53552216", "text": "public function accepter_projet(){\n \n $spathSQL= $this->GLOBALS_INI[\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATH_MODEL\"] . \"accepter_projet.sql\";\n $this->resultat[\"profil_pro_accepter_projet\"]= $this->oBdd->treatDatas($spathSQL, array(\n \"id_pro\" => $this->VARS_HTML[\"id_pro\"],\n \"num_projet\" => $this->VARS_HTML[\"num_projet\"],\n \"id_client\" => $this->VARS_HTML[\"id_client\"],\n \"id_categorie\" => $this->VARS_HTML[\"id_categorie\"],\n \"id_sous_categorie\" => $this->VARS_HTML[\"id_sous_categorie\"],\n \"surface\" => $this->VARS_HTML[\"surface\"],\n \"details\" => $this->VARS_HTML[\"details\"],\n \"date_creation\" => $this->VARS_HTML[\"date_creation\"]\n ));\n \n }", "title": "" }, { "docid": "85745133c77c947af990c4b01b32c462", "score": "0.5353231", "text": "function swp180214_confirm_create_page(){\r\n\t//swp180214_debug('richiesta pagina');\r\n\tif(wp_verify_nonce( $_REQUEST['_nonce'], 'swp180214_action_create_page_nonce' )){\r\n\t\tupdate_option(SWP180214_OPT_PAGE_CREATED,true);\r\n\t\techo 'Pagina creata !';\r\n\t}else die('RICHIESTA NON PERMESSA');\r\n\tdie();\r\n}", "title": "" }, { "docid": "ca5769656fe6fa7977f82d5814f801b1", "score": "0.5348154", "text": "function association_maj_48001() {\n\t$effectuer_maj = FALSE;\n\n\t// cette partie du code s'execute au premier chargement, on n'a pas encore interroge l'utilisateur sur ce qu'il veut faire de ses donnees si il en a ou il n'a pas voulu faire la maj\n\tif (!_request('valider_association_maj_coordonnees')) {\n\t\t// on commence par verifier si des informations de la table spip_asso_membres sont potentiellement transferable vers les tables de coordonnees\n\t\t$adresse = sql_countsel('spip_asso_membres', \"adresse <> '' OR code_postal <> '' OR ville <> ''\");\n\t\t$telephone = sql_countsel('spip_asso_membres', \"telephone <> '' OR mobile <> ''\");\n\n\t\tif (! ($adresse OR $telephone)) { // si on n'a pas de donnees a sauvegarder, on fait la mise a jour sans poser de question\n\t\t spip_log(\"pas d'adresse ni de telephone, adoption tacite de Coordonnees\");\n\t\t\t$effectuer_maj = TRUE;\n\t\t} else { // on a des donnees, demander a l'utilisateur ce qu'il veut en faire\n\t\t\techo '<form method=\"post\" action=\"\">';\n\t\t\techo '<fieldset><p>'._T('asso:maj_coordonnees_intro').'</p>';\n\t\t\t// on commence par determiner si le plugin Coordonnees est installe\n\t\t\tinclude_spip('inc/plugin');\n\t\t\t$liste_plugins = liste_plugin_actifs();\n\t\t\t$plugin_coordonnees_actif = isset($liste_plugins['COORDONNEES']);\n\t\t\tif (!$plugin_coordonnees_actif) {// Le plugin coordonnees n'est pas actif\n\t\t\t\techo '<p>'._T('asso:maj_coordonnees_plugin_inactif').'</p>';\n\t\t\t} else { // le plugin coordonnees est actif\n\t\t\t\techo '<input type=\"radio\" name=\"association_maj_coordonnees_traitement_data\" value=\"ignorer\">'._T('asso:maj_coordonnees_ignorer').'</input><br/>';\n\t\t\t\techo '<input type=\"radio\" name=\"association_maj_coordonnees_traitement_data\" value=\"merge\" checked=\"checked\">'._T('asso:maj_coordonnees_merge').'</input>';\n\t\t\t\techo \"\\n<input type='hidden' name='association_maj_adresses' value='$adresse' />\";\n\t\t\t\techo \"\\n<input type='hidden' name='association_maj_telephones' value='$telephone' />\";\n\t\t\t}\n\t\t\techo '<p><input type=\"submit\" name=\"valider_association_maj_coordonnees\" value=\"'._T('asso:effectuer_la_maj').'\"/></p>';\n\t\t\techo '<p>'._T('asso:maj_coordonnees_notes').'</p></fieldset>';\n\t\t\techo '</form>';\n\t\t}\n\t} else { // l'utilisateur veut effectuer la maj, on controle si il y a des precision quand a l'ecrasement de donnees existentes\n\t\t\t$choix_donnees = _request('association_maj_coordonnees_traitement_data');\n\t\t\tif ($choix_donnees=='merge') { // on integre les donnees d'association dans Coordonnees\n\t\t\t\tinclude_spip('action/editer_numero');\n\t\t\t\tinclude_spip('action/editer_adresse');\n\t\t\t\tinclude_spip('inc/modifier');\n\n\t\t\t\t// pre-remplissage pour les fonctions insert_numero et insert_adresse de Coordonnees\n\t\t\t\t$liens = array('objet' => 'auteur');\n\t\t\t\t$telephone = array('titre' => 'telephone');\n\t\t\t\t$mobile = array('titre' => 'mobile');\n\t\t\t\t$spip_table_numero = table_objet_sql('numero');\n\t\t\t\t$id_table_numero = id_table_objet('numero');\n\t\t\t\t$spip_table_adresse = table_objet_sql('adresse');\n\t\t\t\t$id_table_adresse = id_table_objet('adresse');\n\n\t\t\t\t// On recupere les coordonnees utiles\n\t\t\t\t$coordonnees_membres = sql_select('id_auteur, adresse AS voie, code_postal, ville, telephone, mobile', 'spip_asso_membres', \"adresse <> '' OR mobile <> '' OR code_postal <> '' OR ville <> '' OR telephone <> ''\");\n\t\t\t\twhile ($data = sql_fetch($coordonnees_membres)) {\n\t\t\t\t\t$liens['id_objet'] = $data['id_auteur'];\n\t\t\t\t\tunset($data['id_auteur']);\n\t\t\t\t\tif ($telephone['numero'] = $data['telephone']) { // si on a un numero de telephone\n\t\t\t\t\t\tif ($id_numero = insert_numero($liens)) {\n\t\t\t\t\t\t\tsql_updateq($spip_table_numero, $telephone, \"$id_table_numero=$id_numero\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tunset($data['telephone']);\n\t\t\t\t\tif ($mobile['numero'] = $data['mobile']) { // si on a un numero de moblie\n\t\t\t\t\t\tif ($id_numero = insert_numero($liens)) {\n\t\t\t\t\t\t\tsql_updateq($spip_table_numero, $mobile, \"$id_table_numero=$id_numero\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tunset($data['mobile']);\n\t\t\t\t\tif ($data['voie'] OR $data['code_postal'] OR $data['ville']) { // si on a une adresse, meme partielle\n\t\t\t\t\t\tif ($id_adresse = insert_adresse($liens)) {\n\t\t\t\t\t\t\tsql_updateq($spip_table_adresse, $data, \"$id_table_adresse=$id_adresse\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\\n<fieldset>\", intval(_request('association_maj_adresses')), _T('asso:maj_coordonnees_adresses_inserees'),\n\t\t\t\t '<br/>', intval(_request('association_maj_telephones')), _T('asso:maj_coordonnees_numeros_inseres'), \"\\n</fieldset>\";\n\t\t\t}\n\n\t\t\t$effectuer_maj = TRUE;\n\t}\n\n\t// on effectue si besoin la mise a jour\n\tif ($effectuer_maj) { // on supprime les champs de la table spip_asso_membres, ils ont deja ete sauvegarde dans les tables de Coordonnees si besoin\n\t\tsql_alter(\"TABLE spip_asso_membres DROP telephone\");\n\t\tsql_alter(\"TABLE spip_asso_membres DROP mobile\");\n\t\tsql_alter(\"TABLE spip_asso_membres DROP adresse\");\n\t\tsql_alter(\"TABLE spip_asso_membres DROP code_postal\");\n\t\tsql_alter(\"TABLE spip_asso_membres DROP ville\");\n\t\tsql_alter(\"TABLE spip_asso_membres DROP email\");\n\t} else { // la mise a jour n'est pas effectuee : on le signale dans les maj_erreur pour y revenir au prochain chargement de la page de gestion des plugins\n\t\tif (!$GLOBALS['association_maj_erreur'])\n\t\t\t$GLOBALS['association_maj_erreur'] = 48001;\n\t}\n}", "title": "" }, { "docid": "f3f86367726206cbaeb68f12e5e93efa", "score": "0.534647", "text": "function champ_input_apres_connexion()\n\t\t{\n\t\t\t?>\n <div class=\"form-group\">\n\t\t\t<label for=\"name\"><?php _e( 'Nom *' ); ?></label>\n\t\t\t<input type=\"text\" class=\"form-control\" name=\"author\" value=\"<?php esc_attr( $commenter['comment_author'] ); ?>\" id=\"name\">\n\t\t\t</div>\n <div class=\"form-group\">\n\t\t\t<label for=\"email\"><?php _e( 'Adresse Mail *' ); ?></label>\n\t\t\t<input type=\"email\" class=\"form-control\" name=\"email\" id=\"email\">\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "82745565f5a28552561203905e0af117", "score": "0.53425574", "text": "function inscription(){\n\n\t$nom= isset($_POST['nom'])?($_POST['nom']):'';\n\t$prenom=isset($_POST['prenom'])?($_POST['prenom']):'';\n\t$mdp=isset($_POST['pwdins'])?($_POST['pwdins']):'';\n\t$email= isset($_POST['emailins'])?($_POST['emailins']):'';\n\t$adresse= isset($_POST['adresse'])?($_POST['adresse']):'';\n\t$cp= isset($_POST['cp'])?($_POST['cp']):'';\n\t$ville= isset($_POST['ville'])?($_POST['ville']):'';\n\t$msgIns='';\n\n\n\t$mdp_md5=md5($mdp);\n\t\n\tif (count($_POST)==0) {\n\t\t\t\trequire (\"vue/connexion.tpl\") ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire (\"modele/utilisateurBD.php\") ;\n\t\t\t\tif (!(verifS($email, $mdp, $err))) {\n\t\t\t\t\t$msgIns = $err;\n\t\t\t\t\trequire (\"vue/connexion.tpl\") ;\n\t\t\t\t}\n\t\t\t\telse { \t\t\t\t\t\n\t\t\t\t\tif(!inscription_client($prenom,$nom,$email,$mdp_md5,$adresse,$cp,$ville,$err)){\n\t\t\t\t\t\t$msgIns = $err;\n\t\t\t\t\t\trequire (\"vue/connexion.tpl\") ;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tverif_ident($email,$mdp,$profil);\n\t\t\t\t\t\t$_SESSION['profil'] = $profil;\n\t\t\t\t\t\tconnexion($_SESSION['profil']['id_client']);\n\t\t\t\t\t\theader(\"Location:index.php?controle=menu&action=compte\");}\t\n\t\t\t\t\t}\n\t\t\t\t}\t\n}", "title": "" }, { "docid": "69be478420eaf98441c16f7ca20f9dca", "score": "0.5340513", "text": "function gestionAuteurs()\n {\n if(isset($_SESSION['idAdmin'])){\n\n \n if(isset($_GET['action2']))\n {\n if($_GET['action2'] == \"confirmAjout\")\n {\n echo \"<script>alert('L\\'auteur a été enregistré en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmModif\")\n {\n echo \"<script>alert('L\\'auteur a été modifié en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmSupp\")\n {\n echo \"<script>alert('L\\'auteur a été supprimé en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"errorSupp\")\n {\n echo \"<script>alert('L\\'auteur n\\'a pas été supprimé en base de données car il est rattaché à un livre');</script>\";\n }\n }\n\n $ManagerAuteurs = new \\Projet\\Models\\admin\\ManagerAuteurs();\n $listeAuteur = $ManagerAuteurs->lireListeAuteurs();\n\n\n //Appel à la vue : affichage\n require 'app/views/admin/listeAuteur.php';\n }\n else{\n header('Location: ./admin-home');\n exit();\n }\n\n }", "title": "" }, { "docid": "99c2f341373695c71dc59b2e1c427876", "score": "0.5339103", "text": "function displayAddFormActivity()\n{\n\n\techo \n\n\t\"<form method='POST' action='index.php'>\n\t\t<h5>Ajouter une nouvelle activité</h5>\n\n\t\t<label for='form_name'>Nom de l'activité : </label>\n\t\t<input type='text' name='form_name' placeholder='ex : Peinture'>\n\n\t\t<label for='form_type'>Type de l'activité : </label>\n\t\t<input type='text' name='form_type' placeholder='ex : Création'>\n\n\t\t<label for='form_max'>Date de naissance : </label>\n\t\t<input type='number' name='form_max' placeholder='10'>\n\n\t\t<input type='submit' name='cancel' value='cancel'>\n\t\t<input type='submit' name='send' value='send'>\n\t</form>\";\n}", "title": "" }, { "docid": "904ca5faaeac75e8d0779bcb6629af5e", "score": "0.5335815", "text": "public function modificaprofiloAction()\n {\n \n }", "title": "" }, { "docid": "6ae3fd7ca0d09894a47b3fa79ad9ea1b", "score": "0.5334598", "text": "function modifieSuite($id, $idIntervention, $idAffaire)\n{\n\n\t$types = RequeteSuite::getInstance()->getToutTypeSuite();\n\n\t$suite = RequeteSuite::getInstance()->getSuite($id);\n\n\t$texte = $suite->getTexte();\n\t$type = $suite->getType();\n\t$date = $suite->getDate();\n\t$nombre = $suite->getNombre();\n\n\t$page = \"\";\n\n\tif(isset($_POST[ \"okSuiteModif\" ])){\n\n\t\tif(isset($_POST[ \"typeSuite\" ]) && $_POST[ \"typeSuite\" ] != - 1 && isset($_POST[ \"texteSuite\" ]) && isset($_POST[ \"nombreSuite\" ])){\n\t\t\tif(empty($_POST[ \"dateSuite\" ])){\n\t\t\t\t$date = new Date('Ymd');\n\t\t\t\t$suite->setDate($date);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$suite->setDate($_POST[ \"dateSuite\" ]);\n\t\t\t}\n\n\t\t\t$suite->setType($_POST[ \"typeSuite\" ]);\n\t\t\t$suite->setTexte($_POST[ \"texteSuite\" ]);\n\t\t\t$suite->setNombre($_POST[ \"nombreSuite\" ]);\n\n\t\t\t$suite->setIntervention($_GET[ \"intervention\" ]);\n\t\t\t$suite->setId($_GET[ \"idSuite\" ]);\n\n\n\t\t\tRequeteSuite::getInstance()->modifieSuite($suite);\n\t\t\theader(\"location:intervention.php?id=$idAffaire&intervention=$idIntervention\");\n\t\t}\n\t\telse{\n\t\t\t$page .= \"Veuillez renseigner tout les champs\";\n\t\t}\n\n\t}\n\n\t$page .= \"<form action = '' method='post'>\";\n\t$page .= \"<label>Date</label><input type='text' id='datepicker' name='dateSuite' value='$date' />\";\n\t$page .= \"<label>Type de suite</label><select name='typeSuite'>\";\n\t$page .= \"<option value='-1'>---SELECTIONNEZ UN TYPE</option>\";\n\tforeach($types as $t){\n\t\tif($t->getId() == $type){\n\t\t\t$page .= \"<option value='\".$t->getId().\"'selected>\".$t->getType().\"</option>\";\n\t\t}\n\t\telse{\n\t\t\t$page .= \"<option value='\".$t->getId().\"'>\".$t->getType().\"</option>\";\n\t\t}\n\t}\n\t$page .= \"</select>\";\n\t$page .= \"<label>Nombre</label><input type='number' value='$nombre' class='input-large' name='nombreSuite'/>\";\n\t$page .= \"<label>Texte</label><textarea col='20' rows='6' name='texteSuite'>\".$texte.\"</textarea>\";\n\t$page .= \"<br/><input type='submit' class='btn btn-success' value='Valider' name='okSuiteModif'/>\";\n\t$page .= \"</form>\";\n\t$page .= \"<a href=intervention.php?id=$idAffaire&intervention=$idIntervention class='btn btn-info'>Retourner à l'intervention</a>\";\n\n\treturn $page;\n\n}", "title": "" }, { "docid": "ee73380b3d8136d91f13b290bc45fe1f", "score": "0.5330523", "text": "function createDispostivo($codigo, $nombre)\n{\n /*INCLUDE PHP AccesoAula.php\n Referencia a una funcion CREATE de AccesoAula.php, en la cual reciba por parametros\n numero, edificio y capacidad\n En la clase AccesoAula, tienen que hacer la relacion con sl script de la BD\n */\n\n //Si la transaccion es true\n echo 1;\n //Esto echo retorna en la funcion Success: function (response) deñ archivo CnxAdminAulas\n //Cada numero es una opcion diferente dentro de CnxAdminAulas\n}", "title": "" }, { "docid": "523c22ca3214e4bb3f189274bfebdb74", "score": "0.5326302", "text": "function createTests()\n{\n\n $testDescription = $_POST['testDescription'];\n $testScriptName = $_POST['testScriptName'];\n\t\n\t\n\n\t$sql = \"INSERT INTO Test (testDescription, testScriptName) VALUES('$testDescription', '$testScriptName')\";\n\t$conn = dbConnect();\n\t$result = $conn->query($sql);\n\n\tif ($result=== TRUE)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\techo \"\";\n\t}\n\n\n}", "title": "" }, { "docid": "e353468dec12d45cb045ad629ad36053", "score": "0.5322901", "text": "function action_renvoyer_lettre_dist() {\n\t$securiser_action = charger_fonction('securiser_action','inc');\n\t$id_lettre = $securiser_action();\n\n\n\n\tif ($lettre = intval($id_lettre)\n\t AND autoriser('editer', 'lettres')) {\n\n\t\tif (_request('tous')==1) {\n\t\t\t$lettre = new lettre($id_lettre);\n\t\t\t$lettre->enregistrer_statut('envoi_en_cours');\n\t\t}\n\t\telseif($email = _request('email_abonne')){\n\t\t\t$redirect = _request('redirect');\n\t\t\t$abonne = new abonne(0, $email);\n\t\t\tif ($abonne->existe) {\n\t\t\t\t$resultat = $abonne->renvoyer_lettre($id_lettre);\n\t\t\t\t$GLOBALS['redirect'] = parametre_url($redirect,'message','renvoi_'.($resultat ? 'ok' : 'ko'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$GLOBALS['redirect'] = parametre_url($redirect,'message','abonne_inexistant');\n\t\t\t}\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "c19e1692fd12257288c003d75d068dfc", "score": "0.5317247", "text": "public function validerAjoutSoutien($idS)\n\t{\n\t\t$res=$this->sondage->getInfosSondage($idS);\n\t\t$comInstance = new Commentaire();\n\t\t$res2 = $comInstance->getInfosCommentaire(intval($_POST['com_id']));\n\n\t\tif($res>0 && $res2 >0)\n\t\t{\n\t\t\tif(isset($_SESSION['pseudo']) && isset($_SESSION['email']))\n\t\t\t{\n\t\t\t\t//echo $comInstance->getComId();\n\n\t\t\t\t$comInstance->POSTToVar($_POST);\n\t\t\t\t$comInstance->setSondageId($idS);\n\t\t\t\t$comInstance->setUtId($_SESSION['id']);\n\n\n\t\t\t\t$res3 = $comInstance->checkDejaSoutenu($_SESSION['id']) ;\n\t\t\t\tif($res3==true)\n\t\t\t\t{\n\t\t\t\t\techo \" Vous avez deja aimé\";\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t// on verifie si le commentaire contient du texte\n\t\t\t\tif($comInstance->getSoutien()==\"\")\n\t\t\t\t{\n\t\t\t\t\techo \" Erreur lors de la prise en comtpe de votre soutien\";\n\t\t\t\t\texit();\n\t\t\t\t}\n\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\t$comInstance->setSondageId($idS);\n\t\t\t\t\t$rep = $comInstance->addSoutien($comInstance->getComId(),$_SESSION['id']);\n\t\t\t\t\tif($rep==true)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"success\";\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"veuillez refaire votre soutient , une erreur est survenue\";\n\t\t\t\t\t\texit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"Vous devez etre connecter pour soutenir\";\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->erreur(\"cette page n'existe pas\");\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "b54a0c9d43cd9c2ef2a47eaebc149a48", "score": "0.53147566", "text": "function formulaireMesseV2($atts)\n{\n $id = 0;\n $txtcodePers = $_POST[\"txtcodePers\"];\n $txtnom = $_POST[\"txtnom\"];\n $txtdateMesse = $_POST[\"txtdateMesse\"];\n $txtheureMesse = $_POST[\"txtheureMesse\"];\n $txtphonePers = $_POST[\"txtphonePers\"];\n $txtoffrande = $_POST[\"txtoffrande\"];\n $txtadressePers = $_POST[\"txtadressePers\"];\n $txttypeMesse = $_POST[\"txttypeMesse\"];\n $txttypeMonnaie = $_POST[\"txttypeMonnaie\"];\n\n $id = isset($_GET['id']) ? intval($_GET['id']) : 0;\n\n global $wpdb;\n if (isset($_POST['btnEnregistrer'])) {\n $wpdb->insert(\n TBL_DEMANDE_DE_MESSES, //table\n array(\n 'codePers' => $txtcodePers,\n 'nom' => $txtnom,\n 'dateMesse' => $txtdateMesse,\n 'heureMesse' => $txtheureMesse,\n 'phonePers' => $txtphonePers,\n 'offrande' => $txtoffrande,\n 'adressePers' => $txtadressePers,\n 'typeMesse' => $txttypeMesse,\n 'typeMonnaie' => $txttypeMonnaie\n ) //, //data\n //array('%s', '%s') //data format\t\t\t\n );\n $id = $wpdb->insert_id;\n $message = 'Demande enregistree avec succes.';\n Tools::DialogPopUP($message);\n $message = Tools::ShowMessageBS($message, 'S');\n\n $txtcodePers = '';\n $txtnom = '';\n $txtdateMesse = '';\n $txtheureMesse = '';\n $txtphonePers = '';\n $txtoffrande = '';\n $txtadressePers = '';\n $txttypeMesse = '';\n $txttypeMonnaie = '';\n }\n?>\n <!--\n <link rel=\"stylesheet\" href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,400italic,700,800' type='text/css'>\n <link rel=\"stylesheet\" href='http://fonts.googleapis.com/css?family=Raleway:300,200,100' type='text/css'>\n\n <link rel=\"stylesheet\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>/styles/bootstrap/assets/dist/css/bootstrap.css\">\n-->\n\n <!-- Bootstrap core CSS -->\n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/bootstrap.switch/bootstrap-switch.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/bootstrap.datetimepicker/css/bootstrap-datetimepicker.min.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.select2/select2.css\" />\n\n\n <!--<link rel=\"stylesheet\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/css/styleCopy.css\" />-->\n <link rel=\"stylesheet\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/fonts/font-awesome-4/css/font-awesome.min.css\">\n <link rel=\"stylesheet\" href=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/css/pygments.css\"><!-- -->\n\n <form method=\"post\" action=\"<?php echo $_SERVER['REQUEST_URI']; ?>\">\n\n <?php if (isset($message)) {\n echo $message;\n } ?>\n\n\n <div class=\"box-body\">\n\n <div class=\"form-group\">\n\n <div class=\"col-sm-4\">\n <label for=\"txtcodePers\">codePers</label>\n <input type=\"text\" id=\"txtcodePers\" name=\"txtcodePers\" parsley-trigger=\"change\" required class=\"teststyle form-control\" placeholder=\"codePers\" value=\"<?php echo $txtcodePers; ?>\">\n </div>\n\n <div class=\"col-sm-4\">\n <label for=\"txtnom\">Nom</label>\n <input type=\"text\" id=\"txtnom\" name=\"txtnom\" parsley-trigger=\"change\" required placeholder=\"nom\" class=\"form-control\" value=\"<?php echo $txtnom; ?>\">\n </div>\n\n <div class=\"col-sm-4\">\n <label for=\"txtdateMesse\">dateMesse</label>\n <input type=\"date\" id=\"txtdateMesse\" name=\"txtdateMesse\" parsley-trigger=\"change\" required placeholder=\"dateMesse\" class=\"form-control\" value=\"<?php echo $txtdateMesse; ?>\">\n </div>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div class=\"form-group\">\n <div class=\"col-sm-4\">\n <label for=\"txtheureMesse\">heureMesse</label>\n <input type=\"time\" id=\"txtheureMesse\" name=\"txtheureMesse\" parsley-trigger=\"change\" required placeholder=\"heureMesse\" class=\"form-control\" value=\"<?php echo $txtheureMesse; ?>\">\n </div>\n\n <div class=\"col-sm-4\">\n <label for=\"txtphonePers\">phonePers</label>\n <input type=\"tel\" id=\"txtphonePers\" name=\"txtphonePers\" placeholder=\"phonePers\" class=\"form-control\" value=\"<?php echo $txtphonePers; ?>\">\n </div>\n\n <div class=\"col-sm-4\">\n <label for=\"txtoffrande\">offrande</label>\n <input type=\"number\" id=\"txtoffrande\" name=\"txtoffrande\" parsley-trigger=\"change\" required placeholder=\"offrande\" class=\"form-control\" value=\"<?php echo $txtoffrande; ?>\">\n </div>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div class=\"form-group\">\n <div class=\"col-sm-4\">\n <label for=\"txtadressePers\">adressePers</label>\n <input type=\"text\" id=\"txtadressePers\" name=\"txtadressePers\" placeholder=\"adressePers\" class=\"form-control\" value=\"<?php echo $txtadressePers; ?>\">\n </div>\n\n <div class=\"col-sm-4\">\n <label for=\"txttypeMesse\">typeMesse</label>\n <input type=\"text\" id=\"txttypeMesse\" name=\"txttypeMesse\" parsley-trigger=\"change\" required placeholder=\"typeMesse\" class=\"form-control\" value=\"<?php echo $txttypeMesse; ?>\">\n </div>\n\n <div class=\"col-sm-4\">\n <label for=\"txttypeMonnaie\">typeMonnaie</label>\n <select id=\"txttypeMonnaie\" name=\"txttypeMonnaie\" parsley-trigger=\"change\" required class=\"form-control\">\n <option value=\"HT\" <?php echo ($txttypeMonnaie == '$HT' || $txttypeMonnaie == 'HT') ? 'selected=\"selected\"' : '' ?>>HT</option>\n <option value=\"US\" <?php echo ($txttypeMonnaie == '$US' || $txttypeMonnaie == 'US') ? 'selected=\"selected\"' : '' ?>>US</option>\n </select>\n </div>\n <div style=\"clear: both;\"></div>\n </div>\n\n <div class=\"form-group\">\n <button type=\"submit\" name=\"btnEnregistrer\" id=\"btnEnregistrer\" class=\"button button-primary button-large\">\n Envorer\n </button>\n <div style=\"clear: both;\"></div>\n </div>\n </div>\n </form>\n\n\n <script src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.js\"></script>\n <script src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.select2/select2.min.js\" type=\"text/javascript\"></script>\n <script src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.parsley/parsley.js\" type=\"text/javascript\"></script>\n <script src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/bootstrap.slider/js/bootstrap-slider.js\" type=\"text/javascript\"></script>\n <script type=\"text/javascript\" src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.nanoscroller/jquery.nanoscroller.js\"></script>\n <script type=\"text/javascript\" src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.nestable/jquery.nestable.js\"></script>\n <script type=\"text/javascript\" src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/behaviour/general.js\"></script>\n <script type=\"text/javascript\" src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/jquery.ui/jquery-ui.js\"></script>\n <script type=\"text/javascript\" src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/bootstrap.switch/bootstrap-switch.min.js\"></script>\n <script type=\"text/javascript\" src=\"<?php echo LINK_CURRENT_PLUGIN; ?>styles/CleanZone/js/bootstrap.datetimepicker/js/bootstrap-datetimepicker.min.js\"></script>\n\n<?php\n}", "title": "" }, { "docid": "8f8380713d223869eaa0fe911ec62be1", "score": "0.53089917", "text": "public function usuari_envia_contacte()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/contacte')\n ->assertSee('Contacta')\n ->type('nom', 'Paco')\n ->type('email', '[email protected]')\n ->select('tipus_pregunta', 'Botiga')\n ->type('consulta', 'hola, no entenc el funcionament')\n ->check('checkE')\n ->press('Submit');\n });\n }", "title": "" }, { "docid": "830d3d7b2a840114dede29f15d01de4c", "score": "0.5307302", "text": "function fiche(&$c,$sess_name) {\r\n\r\n\t$formname=\"form_client\";\r\n?>\r\n\r\n<script language=\"javascript\">\r\nfunction go_liste(){\r\n \tdocument.forms['<?=$formname?>'].elements['action'].value='LIST';\r\n \tdocument.forms['<?=$formname?>'].submit();\r\n}\r\nfunction valider(){\r\n \tdocument.forms['<?=$formname?>'].elements['action'].value='SAVE';\r\n \tdocument.forms['<?=$formname?>'].submit();\r\n}\r\nfunction supprimer(){\r\n\tif(window.confirm('Voulez-vous vraiment supprimer cette fiche ?')){\r\n\tdocument.forms['<?=$formname?>'].elements['action'].value='DELETE';\r\n \tdocument.forms['<?=$formname?>'].submit();\r\n\t}\r\n}\r\n</script>\r\n\r\n<?\r\n\t$form=new TForm($_SERVER['PHP_SELF'], $formname);\r\n\techo $form->hidden(\"sess_name\", $sess_name);\r\n\techo $form->hidden(\"action\", \"SAVE\");\r\n\techo $form->hidden(\"origine\", $_REQUEST[\"origine\"]);\r\n\r\n\tis_popup_var();\r\n\t$t=new TTbl();\r\n\r\n\t$t->beg_tbl('formcadre',800,2,'','center');\r\n\t$t->beg_line(\"listheader\");\r\n\t$t->Cell(\r\n\t\t\"Fiche client\"\r\n\t,-1,'',2);\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Civilité\");\r\n\t$t->Cell( $form->combo('','civilite',$c->TCivilite, $c->civilite) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Nom\");\r\n\t$t->Cell( $form->texte('','nom',$c->nom, 80, 255) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Prénom\");\r\n\t$t->Cell( $form->texte('','prenom',$c->prenom, 80, 255) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"N° Passport\");\r\n\t$t->Cell( $form->texte('','num_passport',$c->num_passport, 80, 255) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Nationalité\");\r\n\t$t->Cell( $form->combo('','nationalite',$c->TNationalite, $c->nationalite) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Adresse\");\r\n\t$t->Cell( $form->zonetexte('','adresse',$c->adresse, 60, 5) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Téléphone\");\r\n\t$t->Cell( $form->texte('','tel',$c->tel, 80, 255) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Email\");\r\n\t$t->Cell( $form->texte('','email',$c->email, 80, 255) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Type\");\r\n\t$t->Cell( $form->combo('','type',$c->TType, $c->type) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Tarif négocié\");\r\n\t$t->Cell( $form->texte('','tarif_neg',$c->tarif_neg, 10, 255).\" €\" );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Réf. bancaire\");\r\n\t$t->Cell( $form->texte('','ref_bank',$c->ref_bank, 80, 255) );\r\n\t$t->end_line();\r\n\t\r\n $t->beg_line();\r\n\t$t->Cell(\"Source\");\r\n\t$t->Cell( $form->texte('','source',$c->source, 80, 255) );\r\n\t$t->end_line();\r\n \r\n if($c->data_import!=\"\"){\r\n $t->beg_line();\r\n\t$t->Cell(\"Données de l'import externe\");\r\n\t$t->Cell( $c->data_import );\r\n\t$t->end_line();\r\n \r\n }\r\n \r\n \r\n $t->beg_line();\r\n\t$t->Cell(\"Observations diverses\");\r\n\t$t->Cell( $form->zonetexte('','observation',$c->observation, 60, 5) );\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Modification\");\r\n\t$t->Cell($c->get_dtmaj());\r\n\t$t->end_line();\r\n\t$t->beg_line();\r\n\t$t->Cell(\"Création\");\r\n\t$t->Cell($c->get_dtcre());\r\n\t$t->end_line();\r\n\r\n\t$t->end_tbl();\r\n\r\n\techo \"<p align=\\\"center\\\">\";\r\n\techo $t->link(\"Liste\",\"javascript:go_liste()\",\"button\");\r\n\r\n\tif($c->id>0)\r\n\t\techo $t->link(\"Supprimer\",\"javascript:supprimer()\",\"button_delete\");\r\n\r\n if(have_droit_sess_groupe()){\r\n echo $t->link(\"Valider\",\"javascript:valider()\",\"button_valid\");\r\n }\r\n else{\r\n echo get_right_erreur_msg($t->link(\"Valider\",\"#\",\"button_valid\")); \r\n } \r\n \r\n\techo \"</p>\";\r\n\r\n\techo $form->end_form();\r\n\t\r\n\tif($c->id>0){\r\n liste_reservation_du_client($c);\r\n \tliste_factures_du_client($c);\r\n }\r\n\t\r\n\t\r\n}", "title": "" }, { "docid": "3afe1ce2f5a40589004911c37c195baa", "score": "0.53069174", "text": "function langonet_tester_1() {\n\t// Commenter ou decommenter les lignes suivantes pour tester les differents cas de verification\n\t// VERIFICATION DEFINITION : Erreurs\n\t// -- Les items suivants, utilises comme des items du module Langonet, ne sont pas definis dans verification_fr.php\n\t$essai = _T('verification:test_item_non_defini_1') . ' --- ' . _T('verification:test_item_non_defini_1');\n\t$essai = _T(\"verification:test_item_non_defini_2\");\n\t$essai = _T(\"verification:test_item_non_defini_2\", array('param1'=>$param1));\n\n\t// VERIFICATION DEFINITION : Erreurs\n\t// -- Les items suivants, utilises comme des items de modules differents de Langonet, ne sont pas definis dans leur fichier\n\t// de langue respectif (spip, ecrire ou public.php pour le premier, cfg_fr pour le second)\n\t$essai = _T('test_item_non_defini_3');\n\t$essai = _T('cfg:test_item_non_defini_4');\n\t$essai = _T('cfg:bouton_valider');\n\n\t// VERIFICATION DEFINITION : Avertissements\n\t// -- Les items suivants n'appartiennent pas au module Langonet, sont utilises dans Langonet mais bien definis dans leur \n\t// fichier de langue respectif\n\t$essai = array(0 => _T('date_jour_1'));\n\t$essai = array_push(_T('cfg:bouton_effacer'));\n\n\t// VERIFICATION DEFINITION : Avertissements\n\t// -- Les items suivants sont utilises dans un contexte complexe. Ce sont des items de Langonet ou pas\n\t$essai = _T('verification:test_item_1_'.$suite1);\n\t$essai = _T('test_item_2_'.$suite2);\n\t$essai = _T('test_item_2_'.$suite2, array('param1'=>$param1));\n\t$essai = _T('verification:' . $item1);\n\t$essai = _T(\"verification:$item2\");\n\t$essai = _T(\"verification:\". $item3, array('param1'=>$param1));\n\t$essai = _T(\"verification:defini_html_partiel_\".$suite3);\n\t$essai = _T(\"verification:defini_html_partiel_$suite4\");\n\t$essai = _T(\"verification:defini_html_partiel_${suite5}\");\n\t$essai = _T('langonet:defini_paquet_1');\n\n\t// VERIFICATION _L() : Avertissements\n\t$essai = _L('Test 1 _L() de langonet');\n\t$essai = _L(\"Test 2 _L() de langonet\");\n\t$essai = _L(\"Test 3 _L()\", $arg4);\n\t$essai = _L('Test{} 4 _L{}' . $arg5);\n\t$essai = _L(\"Test 5 _L()$arg6\");\n\t$essai = _L(\"Test 6 _L()${arg7}\");\n\t$essai = _L(\"Test 7 _L()\");\n\t$essai = _L (\"TEST 7 _L()\");\n\t$essai = _L\t\t(\"Test 7 _L()\");\n\t$essai = _L(\"T1234567890123456789012345678901abcdef\");\n\t$essai = _L('Test _L() avec l\\'apostrophe échappée');\n\n\t// VERIFICATION UTILISATION : erreur non mais\n\t$message = _T('langotests:obsolete_4');\n\n}", "title": "" }, { "docid": "23925f71fbd3c34cd9a5e1a5e7fd5c1b", "score": "0.53060234", "text": "public function test()\n {\n //die('je suis ici');\n }", "title": "" }, { "docid": "35f1bce320e0864e63222d8292a0ca80", "score": "0.53038377", "text": "public function test_ajoutComposant3(){\r\n //initialise les attributs\r\n $query = \"CREATE (test:t{name:\\\"test\\\"})\";\r\n $composant = new Composant(\"a\",\" \",\"c\",\"d\");\r\n //on test et on vérifie\r\n $query->ajouterComposant($composant);\r\n $this->assertEquals($composant,$query);\r\n }", "title": "" }, { "docid": "c7d2c9097c754a292cb0baff1054fdd5", "score": "0.53023887", "text": "function bonus_livre($prenom,$gmail){\n $prenom=htmlspecialchars($prenom);\n if(isset($prenom)&& !empty($prenom)&& isset($gmail)&& !empty($gmail)){\n if(preg_match(\"#^[a-z0-9._-]+@[a-z0-9._-]{2,}\\.[a-z]{2,4}$#\",$gmail)){\n $pre=$this->_con->prepare(\"INSERT INTO bonus_livre(prenom,gmail,date_pub) VALUES(?,?,NOW())\");\n $pre->execute(array($prenom,$gmail));\n return'<span id=\"su\">votre message à été envoyé avec succes</span>';\n }\n else\n return'<span class=\"errop\">votre gmail n\\'est pas correct</span>';\n }\n else\n return '<span class=\"errop\">Veuillez remplir ces champs</span>'; \n }", "title": "" }, { "docid": "0924a44bfb7a36aa8807e2877f2f34d0", "score": "0.53011274", "text": "public function testMainPageAdmin()\n {\n $email_text = '[email protected]';\n $email_name = 'email';\n $passw_text = '123456';\n $passw_name = 'password';\n\n $this->visit('/')\n ->type($email_text, $email_name)\n ->type($passw_text, $passw_name)\n ->press('Войти')\n ->see('Веб-ГИС')\n ->see('Применить к таблице')\n ->see('Фитопланктон')\n ->see('Фотосинтетические пигменты')\n ->see('Фильтрация')\n ->see('Выйти')\n ->see('Панель администрирования')\n ->see('За всё время')\n ->see('Очистить');\n }", "title": "" }, { "docid": "74cf25ed0f7b822a9bd534f8acb634eb", "score": "0.52992785", "text": "function formulaires_messages_envoyes_traiter_dist($url_repondre=\"\"){\n\tinclude_spip('base/abstract_sql');\n\t\n\t$liste = _request('selectionne');\n\t$id_auteur = $GLOBALS['visiteur_session']['id_auteur'];\n\tif (is_array($liste) && count($liste)) {\n\t\tif (_request('effacer')){\n\t\t\tsql_updateq('spip_messages',array('statut'=>'poub'),array('id_auteur='.intval($id_auteur),'id_message IN ('.implode(',',$liste).')'));\n\t\t\t\n\t\t\tinclude_spip('inc/invalideur');\n\t\t\tsuivre_invalideur(\"message/\".implode(',',$liste));\n\t\t}\n\t}\n\t\n\treturn array(true,\"\");\n}", "title": "" }, { "docid": "f267b983a558fda9ee7597ff4efc80c0", "score": "0.5297408", "text": "function gestionAtelier()\n {\n if(isset($_SESSION['idAdmin'])){\n\n \n if(isset($_GET['action2']))\n {\n if($_GET['action2'] == \"confirmAjout\")\n {\n echo \"<script>alert('L\\'atelier a été enregistré en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmModif\")\n {\n echo \"<script>alert('L\\'atelier a été modifié en base de données');</script>\";\n }\n\n if($_GET['action2'] == \"confirmSupp\")\n {\n echo \"<script>alert('L\\'atelier a été supprimé en base de données');</script>\";\n }\n }\n\n $ManagerAtelier = new \\Projet\\Models\\admin\\ManagerAtelier();\n $listeAtelier = $ManagerAtelier->lireListeAtelier();\n\n\n //Appel à la vue : affichage\n require 'app/views/admin/listeAtelier.php';\n }\n else{\n header('Location: ./admin-home');\n exit();\n }\n\n }", "title": "" }, { "docid": "cde06c78e66e3b94d1d8f446ab947632", "score": "0.52968293", "text": "function connecteAdmin() // cette fonction indique si un membre est administrateur du site\n{\n // Si l'internaute est connecté et que dans la BDD le champ'statut' a pour valeur '1',cela veut dire que l'internaute est administrateur du site\nif(connecte() && $_SESSION['client']['statut'] == 1)\n{\n return true;\n}\nelse // Sinon le statut de l'internaute est a '0' donc c'est un membre du site\n{\n return false;\n}\n}", "title": "" }, { "docid": "c5644466a9988d790c54bc554675bbf4", "score": "0.52943945", "text": "public function paso1() {\n if (isset($_POST['siguiente'])) {\n header(\"Location: index.php?action=paso2\");\n } else {\n require RUTA_INSTALL . \"vistas/paso1.php\";\n }\n }", "title": "" }, { "docid": "982ec12b81959c2a6ce76c122cdd7214", "score": "0.52939886", "text": "function contactPage()\n{\n if (!empty($_POST) && (($_POST['name'] == '') || $_POST['email'] == '' || !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) || $_POST['message'] == '')) {\n echo '<div class=\"alert alert-warning\">Veuillez renseigner convenablement tous les champs nécessaires</div>';\n } elseif (empty($_POST)) {\n echo '<div class=\"alert alert-info\">Pour toute demande, envoyez-nous un message !</div>';\n } else {\n $message = htmlentities($_POST['message']);\n $messageChecked = \"'\" . $message . \"'\";\n $mail = htmlentities($_POST['email']);\n $name = htmlentities($_POST['name']);\n $headers = \"'FROM :\" . $mail . \"'\";\n $babar = mail('[email protected]', 'Formulaire de contact', $messageChecked, $headers);\n echo '<div class=\"alert alert-success\">Votre e-mail nous a été transmis</div>';\n }\n\n require('view/contactView.php');\n\n}", "title": "" }, { "docid": "564115ea28ee19529069b73bddceeeec", "score": "0.52912754", "text": "function createProgram($program_name, $price, $img) {\n $manoSQL = \"INSERT INTO programs\n VALUES(NULL, '$program_name', '$price', '$img')\n \"; //auksine taisykle: testuojame konsoleje\n $arPavyko = mysqli_query(getPrisijungimas(), $manoSQL); //susikuriame kintamaji $arPavyko, bet nebutina kurtis, kuriames del to kad testinsime\n // if ($arPavyko == false && DEBUG_MODE > 0) { //turi buti klaida ir turime leisti rodyma\n // echo \"ERROR: nepavyko sukurti naujo klausimo: $question, $answer1, $answer2, $answer3, $answer4, $answer5 DB-je !!!! <br>\";\n}", "title": "" }, { "docid": "e244f9d7506666780aab67a7b8493ee6", "score": "0.5286404", "text": "function verificarSeleccionados() {\n $i=0;\n foreach ($_REQUEST as $key => $value) {\n if (strstr($key,'codEstudiante'))\n {\n $i++;\n }\n }\n if($i<=0)\n {\n echo \"<script>alert ('Debe seleccionar al menos un estudiante para cancelar inscripcion');</script>\";\n $pagina = $this->configuracion[\"host\"] . $this->configuracion[\"site\"] . \"/index.php?\";\n $variable=\"pagina=admin_estudiantesInscritosGrupoCoorHoras\";\n $variable.=\"&opcion=verGrupo\";\n $variable.=\"&codProyecto=\".$_REQUEST['codProyecto'];\n $variable.=\"&planEstudio=\".$_REQUEST['planEstudio'];\n $variable.=\"&codEspacio=\".$_REQUEST['codEspacio'];\n $variable.=\"&grupo=\".$_REQUEST['grupo'];\n $variable.=\"&id_grupo=\".$_REQUEST['id_grupo'];\n\n include_once($this->configuracion[\"raiz_documento\"] . $this->configuracion[\"clases\"] . \"/encriptar.class.php\");\n $this->cripto = new encriptar();\n $variable = $this->cripto->codificar_url($variable, $this->configuracion);\n echo \"<script>location.replace('\".$pagina.$variable.\"')</script>\";\n exit;\n }\n else\n {\n return $i;\n }\n }", "title": "" }, { "docid": "cd3b038052d83a1286db49a01330b869", "score": "0.5282384", "text": "function mensajeSuperaCreditosClasificacion() {\n\n echo \"No puede adicionar, el n&uacute;mero de cr&eacute;ditos inscritos supera los establecidos para esta clasificaci&oacute;n\";\n\n }", "title": "" }, { "docid": "c09c2a9bf254b947f5c214ba41447c7c", "score": "0.52806884", "text": "Public Function set_comment()\n {\n // creamos una instancia de la clase captcha\n $captcha = new Captcha('files/');\n // filtramos el id que ingresa\n $id = (int) $_POST['id'];\n // si los datos son correctos\n if(!empty($_POST['name']) && $id !== 0 && !empty($_POST['email']) && !empty($_POST['message']) && strlen($_POST['name'])>3 && strlen($_POST['email'])>15 && $captcha->check($_POST['captcha'])===true)\n {\n // filtramos y parseamos bbcode\n $message = nl2br(Parser::Parsear_bbcc(Parser::Parsear_bbcn(htmlspecialchars($_POST['message']))));\n // pasamos la censura de palabras desde la db\n $message = Parser::DB_BBCN_Parser ($message, array(\n 'table'=>'censura',\n 'column_search'=>'bad',\n 'column_replace'=>'good'\n ));\n // pasamos emoticonos desde la db\n $message = Parser::DB_BBCN_Parser ($message, array(\n 'table'=>'emoticonos',\n 'column_search'=>'bbc',\n 'column_replace'=>'html'\n ));\n // ejecutamos la consulta para agregar un comentario\n $this->db->insert('comentarios',array('Name' => htmlspecialchars($_POST['name']), 'email' => htmlspecialchars($_POST['email']), 'web' => empty($_POST['web']) ? '/' : htmlspecialchars($_POST['web']), 'coment' => $message, 'pub' => $id, 'fecha' => time()));\n // actualizamos el contador de comentarios\n mysql_query('UPDATE publicaciones SET pub_comentario = pub_comentario + 1 WHERE pub_id = '.$id);\n /*\n Aclaración:\n No uso littleDB porque no se como hacer\n pub_comentario = pub_comentario + 1 sin realizar dos consultas.\n lo hablaré con Cody Roodaka para que me aconceje.\n */\n }\n // redireccionamos:\n header('Location: index.php?action=view_pub&id='.$id);\n }", "title": "" }, { "docid": "ed012ee7998d359be0f49d4666f9ac3c", "score": "0.5279716", "text": "public function usuari_envia_contacte_falla()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/contacte')\n ->assertSee('Contacta')\n ->type('email', '[email protected]')\n ->select('tipus_pregunta', 'Botiga')\n ->type('consulta', 'hola, no entenc el funcionament')\n ->check('checkE')\n ->press('Submit');\n\n });\n }", "title": "" }, { "docid": "80ea6381901b772a77aea6cc2885eaca", "score": "0.52787507", "text": "function SubmitNewContent() {\n\t\t\t\n\t\t global $_CONF;\n\t\t\t$this->ERAuthenticate();\n\t\t\t\n\t\t\t$permission = $this->aModel->checkSpecificAccessPermission(\"ER Content\",\"Articles\",\"Add\");\t\t\t\n\t\t\t\n\t\t\tif( $permission )\n\t\t\t\t$this->oView->SubmitNewContent();\t\n\t\t\telse\n\t\t\t\theader(\"location:\".$_CONF['SiteUrl'].\"/index.php?stage=electedrepresentative&mode=electedrepresentativedashboard&msg=Not Authorized\");\t\t\t\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "31081bcb26b97cad5f07e4216c4c2298", "score": "0.52723545", "text": "abstract protected function confirm_edit();", "title": "" }, { "docid": "7bbc497b35f74454023d3bedeb5dd783", "score": "0.52710414", "text": "function writeErrorMessage($newUsername, $newEmail, $newRealName, $modalType) {\n\n\tif (strcmp($modalType, \"register\") == 0) {\n\n\t\techo \"<script>$('#r-user-exists').find('.modal-body').append('<p>The following errors have been detected</p>');</script>\";\n\t\techo \"<script>$('#r-user-exists').find('.modal-body').append('<ul>');</script>\";\n\n\t\tif (!$newUsername) {\n\t\t\techo \"<script>$('#r-user-exists').find('.modal-body').children().eq(1).append('<li>Username already exists</li>');</script>\";\n\t\t} \n\t\tif (!$newEmail) {\n\t\t\techo \"<script>$('#r-user-exists').find('.modal-body').children().eq(1).append('<li>Email already exists</li>');</script>\";\n\t\t}\n\t\tif (!$newRealName) {\n\t\t\techo \"<script>$('#r-user-exists').find('.modal-body').children().eq(1).append('<li>User real name already exists</li>');</script>\";\n\t\t}\n\n\t\techo \"<script>$('#r-user-exists').find('.modal-body').append('</ul>');</script>\";\n\n\t} else if (strcmp($modalType, \"update\") == 0) {\n\n\t\techo \"<script>$('#u-user-exists').find('.modal-body').append('<p>The following errors have been detected</p>');</script>\";\n\t\techo \"<script>$('#u-user-exists').find('.modal-body').append('<ul>');</script>\";\n\n\t\tif (!$newUsername) {\n\t\t\techo \"<script>$('#u-user-exists').find('.modal-body').children().eq(1).append('<li>Username already exists</li>');</script>\";\n\t\t} \n\t\tif (!$newEmail) {\n\t\t\techo \"<script>$('#u-user-exists').find('.modal-body').children().eq(1).append('<li>Email already exists</li>');</script>\";\n\t\t}\n\t\tif (!$newRealName) {\n\t\t\techo \"<script>$('#u-user-exists').find('.modal-body').children().eq(1).append('<li>User real name already exists</li>');</script>\";\n\t\t}\n\n\t\techo \"<script>$('#u-user-exists').find('.modal-body').append('</ul>');</script>\";\n\n\t}\n}", "title": "" } ]
2c4486523a4652bcc86a612c76c59750
Set the mission millesime.
[ { "docid": "a3e20264ee25e4deff3c40fbe6712171", "score": "0.6949508", "text": "public function setMissionMillesime($missionMillesime) {\n $this->missionMillesime = $missionMillesime;\n return $this;\n }", "title": "" } ]
[ { "docid": "dd7410d1721c204f722a7d09d067c43f", "score": "0.66043115", "text": "public function getMissionMillesime() {\n return $this->missionMillesime;\n }", "title": "" }, { "docid": "a7fd8e79f4b17e3c44d70cb9064ca6da", "score": "0.5780209", "text": "public function setTime($time = 0){\n $this->time = ($time > 0 ? $time: $this->time);\n }", "title": "" }, { "docid": "7c1fe2a6025d86f9af9c284af5e0c926", "score": "0.569795", "text": "public function setTime($time){\n\t\t$this->time = $time;\n\t}", "title": "" }, { "docid": "f355c8bfd0a4fa7d9b5964534749f991", "score": "0.5672131", "text": "public function setTime($time) {\n $this->_time = $time;\n }", "title": "" }, { "docid": "cbdbdfe6ff010c372eab11e11a8db8b5", "score": "0.5661517", "text": "public function setTime($time): void\n {\n $this->time = (string) $time;\n }", "title": "" }, { "docid": "796b97b08a1cdd1d5ae6a8f3936005df", "score": "0.5660017", "text": "public function setTime($time)\n {\n $this->time = $time;\n }", "title": "" }, { "docid": "796b97b08a1cdd1d5ae6a8f3936005df", "score": "0.5660017", "text": "public function setTime($time)\n {\n $this->time = $time;\n }", "title": "" }, { "docid": "796b97b08a1cdd1d5ae6a8f3936005df", "score": "0.5660017", "text": "public function setTime($time)\n {\n $this->time = $time;\n }", "title": "" }, { "docid": "3f8a5b188297a7a57fdd3fe60193ed23", "score": "0.54542714", "text": "function setEmission($emission) {\r\r\n\t\t$this->emission = $emission;\r\r\n\t}", "title": "" }, { "docid": "296140c006b2676ed16b2d70a40bd6b1", "score": "0.541216", "text": "public function setTime($lesson);", "title": "" }, { "docid": "53e8b16a092e0364c27b814c52c889e2", "score": "0.5388333", "text": "function setMileage($mileage) {\r\r\n\t\t$this->mileage = $mileage;\r\r\n\t}", "title": "" }, { "docid": "828e02a3ae886b893be89e22a956fca7", "score": "0.5357486", "text": "private function setTime() {\n $this->time = strftime(\"%Y-%m-%d %H:%M:%S\", time());\n }", "title": "" }, { "docid": "eed947c9de8331fc49a4371aa65f5019", "score": "0.5347865", "text": "function setMiles($new_miles)\n {\n $this->miles = $new_miles;\n }", "title": "" }, { "docid": "83d3f8753a3d22f7e5f61c518da2e5fd", "score": "0.5212302", "text": "function set_time($newtime)\n {\n $this->time=$newtime;\n }", "title": "" }, { "docid": "b113f20d63cdd82d5f120e2c19b78869", "score": "0.52118796", "text": "public function setMpn($value)\n {\n $this->mpn = $value;\n }", "title": "" }, { "docid": "113eb2a04089341c6007e8a6ce0b817e", "score": "0.5187538", "text": "public function setMinutes($minutes) {\n\n $this->minutes = $minutes;\n }", "title": "" }, { "docid": "65cdf0eacf9784e7d5ac4f23b974b053", "score": "0.5153165", "text": "#[@xmlmapping(element= 'TM', type= 'double')]\n public function setTime($time) {\n $this->time= $time;\n }", "title": "" }, { "docid": "cb631bfdfac34cc6d6e839ec3a97961e", "score": "0.51485497", "text": "public function getMTime(){}", "title": "" }, { "docid": "cb631bfdfac34cc6d6e839ec3a97961e", "score": "0.5147301", "text": "public function getMTime(){}", "title": "" }, { "docid": "5d9a3bbe1f619b0f5278922b6d9da6ae", "score": "0.51055396", "text": "private function setMinutes( $minutes )\n {\n $default = '00';\n \n if ( ! $minutes ) {\n $this->minutes = $default;\n return;\n }\n\n $minutes = preg_replace( '![^\\d]!', '', $minutes );\n \n $count = strlen( $minutes );\n \n // Make sure it's two digits\n if ( $count > 2 ) {\n $minutes = substr( $minutes, 0, 2 );\n }\n elseif ( $count == 1 ) {\n $this->minutes = '0' . $minutes;\n return;\n }\n elseif ( $count == 0 ) {\n $this->minutes = $default;\n return;\n }\n \n // Make sure it's withing the range\n if ( $minutes > 59 ) {\n $this->minutes = $default;\n return;\n }\n \n $this->minutes = $minutes;\n }", "title": "" }, { "docid": "ef81e68cffad52a016b3c528bc130c6a", "score": "0.50615764", "text": "public function military()\n {\n return $this->format('HH:mm');\n }", "title": "" }, { "docid": "8befd104b91e3262291047cad5cb656e", "score": "0.50219387", "text": "public function setMemoria($memoria){\n $this->memoria = $memoria;\n }", "title": "" }, { "docid": "079bf1504b8ee59eed6c215468cddc38", "score": "0.4995069", "text": "function setMonto($monto) {\n $this->monto = $monto;\n }", "title": "" }, { "docid": "3e1c61de35a2e983c13249a658a67a89", "score": "0.49834335", "text": "public function setTime($hour, $minute, $second, $microsecond){}", "title": "" }, { "docid": "3e1c61de35a2e983c13249a658a67a89", "score": "0.49834335", "text": "public function setTime($hour, $minute, $second, $microsecond){}", "title": "" }, { "docid": "9575505c53f9c02b590478afec6a18e8", "score": "0.4958572", "text": "public function setTime($date){}", "title": "" }, { "docid": "5f61e56bd6bbc2a85484f89a835211b9", "score": "0.49493727", "text": "public function setMontantComm(?float $montantComm): VmpMouvements {\n $this->montantComm = $montantComm;\n return $this;\n }", "title": "" }, { "docid": "e715ace452d4655dc08df96d7ce3efdb", "score": "0.49314117", "text": "public function setTimeNano(int $timeNano) : self\n {\n $this->initialized['timeNano'] = true;\n $this->timeNano = $timeNano;\n return $this;\n }", "title": "" }, { "docid": "d03279797ac8f5a47f867d7101be72f9", "score": "0.49251565", "text": "public function setTime($time) {\n $this->_creationDate = strval(date('Y-m-d\\TH:i:s\\Z', $time));\n }", "title": "" }, { "docid": "a5b7aa698a4a5b8d0f5446885c93ceb2", "score": "0.49109042", "text": "public function setPm($pm)\r\n {\r\n $this->pm = $pm;\r\n }", "title": "" }, { "docid": "ec720547ac2c57da21690c12797acae6", "score": "0.4898668", "text": "public function setWorkerMaxTime($time)\n {\n $this->worker_max_time = $time;\n }", "title": "" }, { "docid": "817b96483b3517c47b58ba91486eb516", "score": "0.48961884", "text": "public function getMTime()\n {\n }", "title": "" }, { "docid": "a5b639be70242a41b8a48d66bcb8dc4e", "score": "0.4884536", "text": "public function setImmatriculation($imma2) {\n if (strlen($imma2) > 8) {\n echo \"Immatriculation non valide (taille > 8)\\n\";\n }\n else {\n $this->immatriculation = $imma2;\n }\n }", "title": "" }, { "docid": "5ec2fc5728e544a30302546a6d7df4bc", "score": "0.48769417", "text": "function setTime($t) \n\t{\n\t\t$this->time = $t;\n\t\t$this->date = getdate($t);\n\t}", "title": "" }, { "docid": "072ef61e816b641de4c03bca3afe34e9", "score": "0.48758018", "text": "public function setTimes(int $times): void\n {\n $this->times = $times;\n }", "title": "" }, { "docid": "b0fe6bae626e97b94807327712780eee", "score": "0.48737174", "text": "public function setMtimeName($name, $timestamp, $flags){}", "title": "" }, { "docid": "25f3b0739f2df9a43097827b9624e85a", "score": "0.48673663", "text": "public function setMotivo($motivo){\n\t\t$this->motivo = $motivo;\n\t}", "title": "" }, { "docid": "80948d4205135f938ad27e8603294509", "score": "0.4859123", "text": "public function setTimeAllowed($timeAllowed){}", "title": "" }, { "docid": "baa2d598b661d19952e08698102a08e3", "score": "0.48574817", "text": "public function setImmagine(string $immagine): void\n {\n $this->immagine=$immagine;\n }", "title": "" }, { "docid": "ddc19af3925ec5cedbee698f77531ec2", "score": "0.48547393", "text": "public function setNumeroMassimo(int $nMax):void{\n $this->numeroMassimo=$nMax;\n }", "title": "" }, { "docid": "98bfb68f5874091a4d932b401050976d", "score": "0.483798", "text": "public function default_set_mm()\n {\n return $this->default_set('mm');\n }", "title": "" }, { "docid": "11b265bc9918e8e75e95f475d360b765", "score": "0.48298028", "text": "function setMinute($minute = 0) {\r\n\t\t\t$second = $this->time % 60;\r\n\t\t\t$this->time = $minute * 60 + $second;\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "bb49d1444e79f4b987b730466e9f00b6", "score": "0.48169565", "text": "public function setIdemp($idemp){\n $this->idemp = $idemp;\n }", "title": "" }, { "docid": "3fa056e078fb38fbcaaee9ca73889389", "score": "0.47901133", "text": "protected function setTime($time)\n {\n if (!is_int($time) || $time < 0) {\n throw new \\InvalidArgumentException(\n 'The \"time\" parameter must be a valid Unix timestamp.'\n );\n }\n $this->time = $time;\n }", "title": "" }, { "docid": "4ececdc71de62d30c8e4e016e9bdb0d9", "score": "0.47832394", "text": "public function setMotivo($motivo)\n\t{\n\t\t$this->motivo = $motivo;\n\t}", "title": "" }, { "docid": "8ae7f767da91a19d3c486e2996cc2d36", "score": "0.47624823", "text": "function SetTime( $nHrs = 0, $nMins = 0, $nSecs = 0 )\r\n\t{\r\n\t\t$this->tm_hour = (int)( $nHrs );\r\n\t\t$this->tm_minute = (int)( $nMins );\r\n\t\t$this->tm_second = (int)( $nSecs );\r\n\r\n\t\t$this->_Normalize();\r\n\t}", "title": "" }, { "docid": "41b892302194f98ed1eeedb2c382c34e", "score": "0.4757622", "text": "public function setMobil(Int $mobil)\n {\n $this->mobil = $mobil;\n\n return $this;\n }", "title": "" }, { "docid": "d4fc99631c9989e8e57ef0ae6b2a5d8e", "score": "0.475179", "text": "public function setModified($time)\n\t{\n\t\t$this->modified = $time;\n\n\t\t// Set new cache name\n\t\t$this->cacheSetup();\n\t}", "title": "" }, { "docid": "3211e7774f000b253e417c13e1f5ba44", "score": "0.47467542", "text": "public function setTime($t)\r\n\t{\r\n if (! $t)\r\n {\r\n $this->clearTime();\r\n }\r\n else\r\n\t {\r\n $t = explode(':', $t);\r\n $this->hours = $t[0];\r\n $this->minutes = isset($t[1]) ? $t[1] : '0';\r\n $this->seconds= isset($t[2]) ? $t[2] : '0';\r\n }\r\n \r\n return $this;\r\n\t}", "title": "" }, { "docid": "549d75360859bf69b5248ed261db8990", "score": "0.47463274", "text": "public function setTimerSpacing($timerSpacing)\n {\n $this->timerSpacing = $timerSpacing;\n }", "title": "" }, { "docid": "0d6e8cd72d3571c5caa2664f76e24fec", "score": "0.47368345", "text": "function set_units($units = \"miles\")\n {\n if($units != \"kilos\" || $units != \"miles\")\n {\n $this->units = \"miles\";\n }\n else\n {\n $this->units = $units;\n }\n }", "title": "" }, { "docid": "67d882275d2bbe71204cb8fa358ca920", "score": "0.4722385", "text": "public function __setTimeId( $timeId ){\n\t\tif(!is_numeric($timeId)){\n\t\t\tthrow new ETipoErrado();\n\t\t}else{\n\t\t\t//nothing to do here\n\t\t}\n\t\t$this->timeId = $timeId;\n\t}", "title": "" }, { "docid": "f4d6bf12b7b39ab0260af9629ba813ab", "score": "0.4719374", "text": "public function set_month_M(){\n $time = self::strtime($this->changeTime);\n $monthAbb = date('M',$time);\n $this->monthAbb = $monthAbb;\n return $this->monthAbb;\n }", "title": "" }, { "docid": "43ae8b27c565a5f17316e7a596a17bfc", "score": "0.4708314", "text": "public function setCampo_multa($campo_multa = true) {\n\t\tif($campo_multa == true) {\n\t\t\t$this->campo_multa = 2;\n\t\t}else {\n\t\t\t$this->campo_multa = '0';\n\t\t}\n\t}", "title": "" }, { "docid": "3f7690d1c2c7b6f7e878adfc6b51f6bb", "score": "0.46941727", "text": "public function setLienMois ($a_lien)\r\n\t\t{\r\n\t\t\t$this->lienMois = $a_lien;\r\n\t\t}", "title": "" }, { "docid": "a2ffb346af3b806e170fa6b881d6fe22", "score": "0.46883303", "text": "public function setTimeNow($time=NULL)\n\t{\n\t\t# Check if the passed value is empty.\n\t\tif(empty($time))\n\t\t{\n\t\t\t# Explicitly set the value to NULL.\n\t\t\t$time=time();\n\t\t}\n\t\t$time=date('U', $time);\n\t\t# Set the data member.\n\t\t$this->time_now=$time;\n\t}", "title": "" }, { "docid": "aa590a0aa8a0b14fafd0907b744082d4", "score": "0.468821", "text": "public function setFromString($time)\n {\n if(!Time::check($time))\n throw new InvalidArgumentException('Invalid time format in Time::setFromString : ' . $time);\n\n $timeArray = explode(':', $time);\n $this->set(intval($timeArray[0]), intval($timeArray[1]), intval($timeArray[2]));\n }", "title": "" }, { "docid": "003def4b48978cf048cc3e3ac7f7a528", "score": "0.46741664", "text": "public function setProcessingTimeInMilliseconds(?int $value): void {\n $this->getBackingStore()->set('processingTimeInMilliseconds', $value);\n }", "title": "" }, { "docid": "f2c5431e3381a6e58dedc5f48498449d", "score": "0.46730763", "text": "public function setWorkerMinTime($time)\n {\n $this->worker_min_time = $time;\n }", "title": "" }, { "docid": "ee881d461cb725a348a0e492bfc66ba8", "score": "0.46716163", "text": "public function setMedianImpactInMs($val)\n {\n $this->_propDict[\"medianImpactInMs\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "fd7dbe8bd898e03c1ae3182c27afd645", "score": "0.46709782", "text": "abstract public function moverATemporal($nombre);", "title": "" }, { "docid": "c155611879516c69293d1c1a9bc77241", "score": "0.46673325", "text": "public function setEscalationTimeInMinutes($val)\n {\n $this->_propDict[\"escalationTimeInMinutes\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "534e71195ddf30cd1ed40afe84187661", "score": "0.4662077", "text": "function setLifeTime($time);", "title": "" }, { "docid": "d5667d37b8f6bb1d5e0b87cf1c9599ad", "score": "0.46616468", "text": "function Military(){\r\n\t\t\t$description = $this->description;\r\n\t\t\t$arr1 = explode(\":\", $description);\r\n\t\t\t$arr2 = explode(\" \", $arr1[1]);\r\n\r\n\t\t\t$hh = $arr1[0];\r\n\t\t\t$mm = $arr2[0];\r\n\t\t\t$tt = $arr2[1];\r\n\r\n\t\t\t$total = 0;\r\n\r\n\t\t\tif($tt == \"AM\"){\r\n\t\t\t\t//add hours\r\n\t\t\t\tif($hh != 12){\r\n\t\t\t\t\t$total = $hh * 100;\r\n\t\t\t\t}\r\n\t\t\t\t$total += $mm;\r\n\t\t\t} else {\r\n\t\t\t\t//if 12 pm\r\n\t\t\t\tif($hh == 12){\r\n\t\t\t\t\t$total = $hh * 100;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$total = ($hh + 12) * 100;\r\n\t\t\t\t}\r\n\t\t\t\t$total += $mm;\r\n\t\t\t}\r\n\r\n\t\t\treturn $total;\r\n\t\t}", "title": "" }, { "docid": "e2e1df9f765f3fb4e168236f7a5a0b38", "score": "0.46612877", "text": "function ChangeTimer($value){\n\t\t\t$db = $this->connectDB();\n\n\t\t\t$sql = $db->prepare(\"UPDATE Securite SET Delais = :timer\");\n\t\t\t$sql->bindValue(\":timer\", $value);\n\n\t\t\t$sql->execute();\n\t\t\t$db = null;\n\t\t}", "title": "" }, { "docid": "84dcf2c36b9b3055fb88c4cbcd534264", "score": "0.46595144", "text": "public function minutes(int $number): self\n {\n $this->timeInSeconds += $number * self::SECONDS_IN_MINUTE;\n return $this;\n }", "title": "" }, { "docid": "9ed43be4de635c98cd2399be7b2c72d7", "score": "0.46568426", "text": "public function ChngMission()\n {\n $id = (int) _v('id');\n\n $fy = _v('mfy', 0);\n $fm = _v('mfm', 0);\n $fd = _v('mfd', 0);\n $ty = _v('mty', 0);\n $tm = _v('mtm', 0);\n $td = _v('mtd', 0);\n\n if (!checkdate($fm, $fd, $fy) || !checkdate($tm, $td, $ty))\n {\n uni_redirect(PATH_ROOT . '');\n } else\n {\n $fdate = $fy . '-' . $fm . '-' . $fd;\n $tdate = $ty . '-' . $tm . '-' . $td;\n }\n\n $this->_Init();\n\n if (empty($this->initErrs))\n {\n $wl = $this->mMission->ChngUMission(UID, $id, $fdate, $tdate);\n uni_redirect(PATH_ROOT . 'mission/id' . $id);\n } else\n {\n uni_redirect(PATH_ROOT . '');\n }\n }", "title": "" }, { "docid": "6b3f44bd5d1b7754d7793f790ecbb72d", "score": "0.46535936", "text": "function instancia__setear_ventana_tiempo_default ()\n\t{\n\t\t$sql[] = 'UPDATE apex_proyecto SET validacion_intentos_min = 5 WHERE validacion_intentos_min IS NULL;';\t\t\n\t\t$this->elemento->get_db()->ejecutar($sql);\n\t}", "title": "" }, { "docid": "69587024081b2530e7b42661a5d0dc5c", "score": "0.4640302", "text": "public static function setExpireTime($time)\n {\n\t$time = max(60, $time);\n\tself::$expires = $time;\n }", "title": "" }, { "docid": "08fb2e56e2a787eb183957d27ed5bf7e", "score": "0.4637869", "text": "public function set_present_time()\r\n {\r\n list($s1, $s2) = explode(' ', microtime());\r\n $this->millisecond = (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\r\n }", "title": "" }, { "docid": "c0a021e94038e5a050c858c0122bce9e", "score": "0.46375275", "text": "public function setMissionid($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->missionid !== $v || $v === 0) {\n\t\t\t$this->missionid = $v;\n\t\t\t$this->modifiedColumns[] = RpMissionItineraryPeer::MISSIONID;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "610b56baa2bd3dfaf18aadafc7ad1ef1", "score": "0.46359444", "text": "public function setTimeStep($timeStep)\n\t{\n\t\t$this->timeStep = (int)$timeStep;\n\t}", "title": "" }, { "docid": "6037818fdcbd2f133f9d8a3a9c7a221e", "score": "0.46338904", "text": "public function setMaxTime($max = NULL) {\n $this->maxTime;\n }", "title": "" }, { "docid": "48c2a27fb3f4820f40c736949dbb2f1d", "score": "0.46242824", "text": "protected function setFinished($time = null)\n {\n $this->finished = $time ?: microtime(true);\n $this->setState(RunInterface::STATE_NOT_RUNNING);\n }", "title": "" }, { "docid": "b4e5cdbbb0ee6fd171b132e470f2ac21", "score": "0.46175653", "text": "public function setMissionsId($newMissionsId)\n {\n // verify missions is integer\n $newMissionsId = filter_var($newMissionsId, FILTER_VALIDATE_INT);\n if (empty($newMissionsId) === true) {\n throw new InvalidArgumentException (\"Missions Invalid\");\n }\n $this->missionsId = $newMissionsId;\n }", "title": "" }, { "docid": "d9716d8bde8e713ca2ca96d10dfc3fa6", "score": "0.46144158", "text": "public function set_calc_time($time) {\n $this->redis->hset($this->experiment_config_key, 'calc_time', $time);\n }", "title": "" }, { "docid": "4ff64944b1174c4d00f9c837904073ed", "score": "0.46126845", "text": "public function set() { return( $this->objSet[SATTIME] ); }", "title": "" }, { "docid": "5ddfef2b47cd30854b0bd35b8851813a", "score": "0.4604741", "text": "#[TentativeType]\n public function setTime(\n #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,\n #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,\n #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $second = 0,\n #[PhpStormStubsElementAvailable(from: '7.1')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $microsecond = 0\n ): DateTime {}", "title": "" }, { "docid": "47bdf85061512f01652079224a6cdb16", "score": "0.46009347", "text": "public function getMissionid()\n\t{\n\t\treturn $this->missionid;\n\t}", "title": "" }, { "docid": "fcc3c3c1a21f698dd58675147d1b48d6", "score": "0.4592726", "text": "public function setAttackSimDurationTime($val)\n {\n $this->_propDict[\"attackSimDurationTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "1a912ef3c75186e0ba228d5645d337c9", "score": "0.45890608", "text": "function set_memory_limit() {\n\t\t$memory_limit = ini_get( 'memory_limit' );\n\n\t\t$this->max_memory_consumption = absint( $memory_limit );\n\n\t\tif ( strstr( $memory_limit, 'k' ) ) {\n\t\t\t$this->max_memory_consumption = ( str_replace( 'k', '', $memory_limit ) * 1000 );\n\t\t}\n\t\tif ( strstr( $memory_limit, 'M' ) ) {\n\t\t\t$this->max_memory_consumption = ( str_replace( 'M', '', $memory_limit ) * 1000000 );\n\t\t}\n\t\tif ( strstr( $memory_limit, 'G' ) ) {\n\t\t\t$this->max_memory_consumption = ( str_replace( 'G', '', $memory_limit ) * 1000000000 );\n\t\t}\n\t}", "title": "" }, { "docid": "aa91e997bfcf72d832e9f678ed7d98b2", "score": "0.45780227", "text": "public function setMinute($value)\n {\n return $this->minute($value);\n }", "title": "" }, { "docid": "19b88e79ff76421b78571072c9297530", "score": "0.4576528", "text": "public function setMissionsId($newMissionsId) {\n //verify access level is integer\n $newMissionsId = filter_var($newMissionsId, FILTER_VALIDATE_INT);\n if(empty($newMissionsId) === true) {\n throw new InvalidArgumentException (\"Missions Id Invalid\");\n }\n $this->missionsId = $newMissionsId;\n }", "title": "" }, { "docid": "bfb33fba78accded29bc60c87d8f7f6a", "score": "0.45624667", "text": "public function setPilotmobilephone($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->pilotmobilephone !== $v) {\n\t\t\t$this->pilotmobilephone = $v;\n\t\t\t$this->modifiedColumns[] = RpMissionItineraryPeer::PILOTMOBILEPHONE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "0898430c86eeabc6dedd14e1c685ed31", "score": "0.45617652", "text": "protected function SetTime($label = NULL) {\n $label = $label ? $label . '_time' : 'SetTime';\n $this->$label = $this->Time();\n }", "title": "" }, { "docid": "7d59f811dad6f53a102f8fb9ef020f39", "score": "0.4558416", "text": "public function set($key, $value, $time = 10080);", "title": "" }, { "docid": "78b1df5f63690dd35e56e12698c0e93d", "score": "0.45345896", "text": "function setMonth($monthno)\n {\n $monthno = intval($monthno);\n if ($monthno < 1)\n $this->monthno_ = 1;\n if ($monthno > 12)\n $this->monthno_ = 12;\n else\n $this->monthno_ = $monthno;\n }", "title": "" }, { "docid": "a1d892a23058d10cdcc215ed7b8d4e90", "score": "0.4533825", "text": "public function activeLienMois ()\r\n\t\t{\r\n\t\t\t$this->lienMoisActif = true;\r\n\t\t}", "title": "" }, { "docid": "83d9201d7ae3208aea2cbea707ed1082", "score": "0.45334476", "text": "private function setMeridiem( $time, $hours )\n {\n if ( ! stripos( $time, 'am') && ! stripos( $time, 'pm') ) {\n $this->meridiem = ( $hours < 12 ) ? 'am' : 'pm';\n }\n else {\n $this->meridiem = ( stripos( $time, 'pm') ) ? 'pm' : 'am';\n }\n }", "title": "" }, { "docid": "c6d278f10bbb219a4d7bccd5365932bd", "score": "0.4531454", "text": "public function setCacheMinutes($a_min)\n\t{\n\t\t$this->cache_minutes = $a_min;\n\t}", "title": "" }, { "docid": "672ab3160e4e5e35ff834b0b81f1ffca", "score": "0.4525488", "text": "public function setAnimation($animation){\n \t$this->animation = $animation;\n }", "title": "" }, { "docid": "2ef8cacb9e3c99b0b372188e46c2d52b", "score": "0.45158538", "text": "function setLifeTime(int $time){\n return $this->lifeTime = $time;\n }", "title": "" }, { "docid": "55fc5074942724af910ac22e044b9a90", "score": "0.4515272", "text": "public function setMinTime($min = NULL) {\n $this->minTime = $min;\n }", "title": "" }, { "docid": "db1a35686c64792fe19f234a6b9aff05", "score": "0.4509539", "text": "protected function setTime($time=null)\n {\n if (is_string($time))\n $this->time = new \\DateTimeImmutable($time);\n elseif ($time instanceof \\DateTimeImmutable)\n $this->time = $time;\n elseif (is_null($time))\n $this->time = SystemTime::instance()->getCurrentTime();\n else\n throw new \\InvalidArgumentException(\"Unexpected time value for event of class \".get_class($this));\n }", "title": "" }, { "docid": "f0dbd94eab4e05492108c644c73d7588", "score": "0.45053095", "text": "public function setSub_mmr($value){\n $this->sub_mmr=$value;\n }", "title": "" }, { "docid": "72612c64dd1387e5ad2d09b66d83627c", "score": "0.45028406", "text": "public function setMontantTva($montantTva) {\n $this->montantTva = $montantTva;\n return $this;\n }", "title": "" }, { "docid": "a28aad5aaf2c3d4ba76ab966469155b1", "score": "0.44988176", "text": "public function applySetMmTable(): void\n {\n $raw = $this->field->getRaw();\n $raw['config'] = $this->addMmTableConfig($raw['config'] ?? [], []);\n $this->field->setRaw($raw);\n }", "title": "" }, { "docid": "6fafad06f505be569d19c84161dbc17f", "score": "0.4487634", "text": "public function setidMedico($Valor){\r\n $this->idMedico = trim($Valor);\r\n }", "title": "" }, { "docid": "c1e795344fa6c986dcbe6c1f7dd234f2", "score": "0.4482808", "text": "public function testAssignAttributeTime($time)\n {\n $this->Restriction->setTime($time);\n\n $this->assertAttributeSame($time, 'time', $this->Restriction);\n }", "title": "" }, { "docid": "6965c429eba5a385ecc007f45ee67880", "score": "0.4482447", "text": "public function testSetTpMoisAnnee() {\n\n $obj = new LocationsFi();\n\n $obj->setTpMoisAnnee(\"tpMoisAnnee\");\n $this->assertEquals(\"tpMoisAnnee\", $obj->getTpMoisAnnee());\n }", "title": "" } ]
ede9035b0931a6b717c89a316bb76652
Process an threesixty_skill restore
[ { "docid": "a7fdcfda4adce73cdbb05003b5dc649f", "score": "0.55698246", "text": "protected function process_threesixty_skill($data) {\n global $DB;\n\n $data = (object)$data;\n $oldid = $data->id;\n\n $data->competencyid = $this->get_new_parentid('threesixty_competency');\n\n $newitemid = $DB->insert_record('threesixty_skill', $data);\n $this->set_mapping('threesixty_skill', $oldid, $newitemid);\n }", "title": "" } ]
[ { "docid": "04b74f48ce86243344b3cba515929478", "score": "0.5618618", "text": "protected function process_threesixty_response_skill($data) {\n global $DB;\n\n $data = (object)$data;\n $oldid = $data->id;\n\n $data->responseid = $this->get_new_parentid('threesixty_response');\n $data->skillid = $this->get_new_parentid('threesixty_skill');\n\n $newitemid = $DB->insert_record('threesixty_response_skill', $data);\n $this->set_mapping('threesixty_response_skill', $oldid, $newitemid);\n }", "title": "" }, { "docid": "ca94c4d4c35cdaef811469f7b67bdcef", "score": "0.55472976", "text": "function undoRestore () ;", "title": "" }, { "docid": "8df9591a15014dad0afe198ef435362c", "score": "0.54604846", "text": "function restore() {}", "title": "" }, { "docid": "838c60c66f216e8c5dedc52d4654dbd0", "score": "0.5398025", "text": "function quiz_rqp_states_restore_mods($state_id,$info,$restore) {\n\n global $CFG;\n\n $status = true;\n\n //Get the quiz_rqp_state\n $rqp_state = $info['#']['RQP_STATE']['0'];\n if ($rqp_state) {\n\n //Now, build the RQP_STATES record structure\n $state->stateid = $state_id;\n $state->responses = backup_todb($rqp_state['#']['RESPONSES']['0']['#']);\n $state->persistent_data = backup_todb($rqp_state['#']['PERSISTENT_DATA']['0']['#']);\n $state->template_vars = backup_todb($rqp_state['#']['TEMPLATE_VARS']['0']['#']);\n\n //The structure is equal to the db, so insert the quiz_states\n $newid = insert_record (\"quiz_rqp_states\",$state);\n }\n\n return $status;\n }", "title": "" }, { "docid": "91d6bf78b6f3b57b2d3604d315a62b5c", "score": "0.53936136", "text": "public function restore()\n {\n if ($this->active) {\n list($class, $method) = $this->getClassAndMethod();\n\n runkit_method_remove($class, $method);\n runkit_method_rename($class, $this->restore_name, $method);\n $this->active = false;\n }\n\n parent::restore();\n }", "title": "" }, { "docid": "3ef85e1aff547b6cc954b10a37d6f638", "score": "0.5205088", "text": "public function prepareStepBattleskills() { }", "title": "" }, { "docid": "b9f7c878c59b9a885038a09b366c4886", "score": "0.51572174", "text": "function quiz_states_restore_mods($attempt_id,$info,$restore) {\n\n global $CFG;\n\n $status = true;\n\n //Get the quiz_states array\n $states = $info['#']['STATES']['0']['#']['STATE'];\n //Iterate over states\n for($i = 0; $i < sizeof($states); $i++) {\n $res_info = $states[$i];\n //traverse_xmlize($res_info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //We'll need this later!!\n $oldid = backup_todb($res_info['#']['ID']['0']['#']);\n\n //Now, build the STATES record structure\n $state->attempt = $attempt_id;\n $state->question = backup_todb($res_info['#']['QUESTION']['0']['#']);\n $state->originalquestion = backup_todb($res_info['#']['ORIGINALQUESTION']['0']['#']);\n $state->seq_number = backup_todb($res_info['#']['SEQ_NUMBER']['0']['#']);\n $state->answer = backup_todb($res_info['#']['ANSWER']['0']['#']);\n $state->timestamp = backup_todb($res_info['#']['TIMESTAMP']['0']['#']);\n $state->event = backup_todb($res_info['#']['EVENT']['0']['#']);\n $state->grade = backup_todb($res_info['#']['GRADE']['0']['#']);\n $state->raw_grade = backup_todb($res_info['#']['RAW_GRADE']['0']['#']);\n $state->penalty = backup_todb($res_info['#']['PENALTY']['0']['#']);\n\n //We have to recode the question field\n $question = backup_getid($restore->backup_unique_code,\"quiz_questions\",$state->question);\n if ($question) {\n $state->question = $question->new_id;\n }\n\n //We have to recode the originalquestion field\n $question = backup_getid($restore->backup_unique_code,\"quiz_questions\",$state->originalquestion);\n if ($question) {\n $state->originalquestion = $question->new_id;\n }\n\n //We have to recode the answer field\n //It depends of the question type !!\n //We get the question first\n $question = get_record(\"quiz_questions\",\"id\",$state->question);\n //It exists\n if ($question) {\n //Depending of the qtype, we make different recodes\n switch ($question->qtype) {\n case 1: //SHORTANSWER QTYPE\n //Nothing to do. The response is a text.\n break;\n case 2: //TRUEFALSE QTYPE\n //The answer is one answer id. We must recode it\n $answer = backup_getid($restore->backup_unique_code,\"quiz_answers\",$state->answer);\n if ($answer) {\n $state->answer = $answer->new_id;\n }\n break;\n case 3: //MULTICHOICE QTYPE\n //The answer is a comma separated list of answers. We must recode them\n $answer_field = \"\";\n $in_first = true;\n $tok = strtok($state->answer,\",\");\n while ($tok) {\n //Get the answer from backup_ids\n $answer = backup_getid($restore->backup_unique_code,\"quiz_answers\",$tok);\n if ($answer) {\n if ($in_first) {\n $answer_field .= $answer->new_id;\n $in_first = false;\n } else {\n $answer_field .= \",\".$answer->new_id;\n }\n }\n //check for next\n $tok = strtok(\",\");\n }\n $state->answer = $answer_field;\n break;\n case 4: //RANDOM QTYPE\n //The answer links to another question id, we must recode it\n $answer_link = backup_getid($restore->backup_unique_code,\"quiz_questions\",$state->answer);\n if ($answer_link) {\n $state->answer = $answer_link->new_id;\n }\n break;\n case 5: //MATCH QTYPE\n //The answer is a comma separated list of hypen separated math_subs (for question and answer)\n $answer_field = \"\";\n $in_first = true;\n $tok = strtok($state->answer,\",\");\n while ($tok) {\n //Extract the match_sub for the question and the answer\n $exploded = explode(\"-\",$tok);\n $match_question_id = $exploded[0];\n $match_answer_id = $exploded[1];\n //Get the match_sub from backup_ids (for the question)\n $match_que = backup_getid($restore->backup_unique_code,\"quiz_match_sub\",$match_question_id);\n //Get the match_sub from backup_ids (for the answer)\n $match_ans = backup_getid($restore->backup_unique_code,\"quiz_match_sub\",$match_answer_id);\n if ($match_que) {\n //It the question hasn't response, it must be 0\n if (!$match_ans and $match_answer_id == 0) {\n $match_ans->new_id = 0;\n }\n if ($in_first) {\n $answer_field .= $match_que->new_id.\"-\".$match_ans->new_id;\n $in_first = false;\n } else {\n $answer_field .= \",\".$match_que->new_id.\"-\".$match_ans->new_id;\n }\n }\n //check for next\n $tok = strtok(\",\");\n }\n $state->answer = $answer_field;\n break;\n case 6: //RANDOMSAMATCH QTYPE\n //The answer is a comma separated list of hypen separated question_id and answer_id. We must recode them\n $answer_field = \"\";\n $in_first = true;\n $tok = strtok($state->answer,\",\");\n while ($tok) {\n //Extract the question_id and the answer_id\n $exploded = explode(\"-\",$tok);\n $question_id = $exploded[0];\n $answer_id = $exploded[1];\n //Get the question from backup_ids\n $que = backup_getid($restore->backup_unique_code,\"quiz_questions\",$question_id);\n //Get the answer from backup_ids\n $ans = backup_getid($restore->backup_unique_code,\"quiz_answers\",$answer_id);\n if ($que) {\n //It the question hasn't response, it must be 0\n if (!$ans and $answer_id == 0) {\n $ans->new_id = 0;\n }\n if ($in_first) {\n $answer_field .= $que->new_id.\"-\".$ans->new_id;\n $in_first = false;\n } else {\n $answer_field .= \",\".$que->new_id.\"-\".$ans->new_id;\n }\n }\n //check for next\n $tok = strtok(\",\");\n }\n $state->answer = $answer_field;\n break;\n case 7: //DESCRIPTION QTYPE\n //Nothing to do (there is no awser to this qtype)\n //But this case must exist !!\n break;\n case 8: //NUMERICAL QTYPE\n //Nothing to do. The response is a text.\n break;\n case 9: //MULTIANSWER QTYPE\n //The answer is a comma separated list of hypen separated multianswer_id and answers. We must recode them.\n $answer_field = \"\";\n $in_first = true;\n $tok = strtok($state->answer,\",\");\n while ($tok) {\n //Extract the multianswer_id and the answer\n $exploded = explode(\"-\",$tok);\n $multianswer_id = $exploded[0];\n $answer = $exploded[1];\n //Get the multianswer from backup_ids\n $mul = backup_getid($restore->backup_unique_code,\"quiz_multianswers\",$multianswer_id);\n if ($mul) {\n //Now, depending of the answertype field in quiz_multianswers\n //we do diferent things\n $mul_db = get_record (\"quiz_multianswers\",\"id\",$mul->new_id);\n if ($mul_db->answertype == \"1\") {\n //Shortanswer\n //The answer is text, do nothing\n } else if ($mul_db->answertype == \"3\") {\n //Multichoice\n //The answer is an answer_id, look for it in backup_ids\n $ans = backup_getid($restore->backup_unique_code,\"quiz_answers\",$answer);\n $answer = $ans->new_id;\n } else if ($mul_db->answertype == \"8\") {\n //Numeric\n //The answer is text, do nothing\n }\n\n //Finaly, build the new answer field for each pair\n if ($in_first) {\n $answer_field .= $mul->new_id.\"-\".$answer;\n $in_first = false;\n } else {\n $answer_field .= \",\".$mul->new_id.\"-\".$answer;\n }\n }\n //check for next\n $tok = strtok(\",\");\n }\n $state->answer = $answer_field;\n break;\n case 10: //CALCULATED QTYPE\n //Nothing to do. The response is a text.\n break;\n default: //UNMATCHED QTYPE.\n //This is an error (unimplemented qtype)\n $status = false;\n break;\n }\n } else {\n $status = false;\n }\n\n //The structure is equal to the db, so insert the quiz_states\n $newid = insert_record (\"quiz_states\",$state);\n\n //Do some output\n if (($i+1) % 10 == 0) {\n echo \".\";\n if (($i+1) % 200 == 0) {\n echo \"<br />\";\n }\n backup_flush(300);\n }\n\n if ($newid) {\n //We have the newid, update backup_ids\n backup_putid($restore->backup_unique_code,\"quiz_states\",$oldid,\n $newid);\n //Now process question type specific state information\n $status = quiz_rqp_states_restore_mods($newid,$res_info,$restore);\n } else {\n $status = false;\n }\n }\n\n //Get the quiz_newest_states array\n $newest_states = $info['#']['NEWEST_STATES']['0']['#']['NEWEST_STATE'];\n //Iterate over newest_states\n for($i = 0; $i < sizeof($newest_states); $i++) {\n $res_info = $newest_states[$i];\n //traverse_xmlize($res_info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //Now, build the NEWEST_STATES record structure\n $newest_state->attemptid = $attempt_id;\n $newest_state->questionid = backup_todb($res_info['#']['QUESTIONID']['0']['#']);\n $newest_state->newest = backup_todb($res_info['#']['NEWEST']['0']['#']);\n $newest_state->newgraded = backup_todb($res_info['#']['NEWGRADED']['0']['#']);\n $newest_state->sumpenalty = backup_todb($res_info['#']['SUMPENALTY']['0']['#']);\n\n //We have to recode the question field\n $question = backup_getid($restore->backup_unique_code,\"quiz_questions\",$newest_state->questionid);\n if ($question) {\n $newest_state->questionid = $question->new_id;\n }\n\n //We have to recode the newest field\n $state = backup_getid($restore->backup_unique_code,\"quiz_states\",$newest_state->newest);\n if ($state) {\n $newest_state->newest = $state->new_id;\n }\n\n //We have to recode the newgraded field\n $state = backup_getid($restore->backup_unique_code,\"quiz_states\",$newest_state->newgraded);\n if ($state) {\n $newest_state->newgraded = $state->new_id;\n }\n\n //The structure is equal to the db, so insert the quiz_newest_states\n $newid = insert_record (\"quiz_newest_states\",$newest_state);\n\n }\n\n return $status;\n }", "title": "" }, { "docid": "989cd781bb764ad825085d1eec472e66", "score": "0.5130097", "text": "public function restored(Terminy $terminy)\n {\n //\n }", "title": "" }, { "docid": "253d924bee0c4f2f349d4dd7604c27d1", "score": "0.5105325", "text": "function module_restore($parameters){\r\n $sql = \"select * from micromenu_list where micromenu_client = $this->client_identifier and micromenu_status=1\";\r\n\t\t$this->call_command(\"DB_QUERY\",Array($sql));\r\n\t\twhile($r = $this->call_command(\"DB_FETCH_ARRAY\",Array($result))){\r\n $this->cache(Array(\"identifier\" => $r[\"micromenu_identifier\"]));\r\n \t \t}\r\n\t\t$this->call_command(\"DB_FREE\",Array($result));\r\n }", "title": "" }, { "docid": "46a0b589bf1979c5cfbada50c20830b3", "score": "0.5075136", "text": "public function restored(SecKillOrder $secKillOrder)\n {\n //\n }", "title": "" }, { "docid": "5966f5bd2e9ac34a7f73574dc8fe933c", "score": "0.50302434", "text": "public function restore(User $user, Examinfo $examinfo)\n {\n //\n }", "title": "" }, { "docid": "394c8c252c19d39de338bd89a2af98f6", "score": "0.50194484", "text": "public function restore();", "title": "" }, { "docid": "d8d2199c26309083647f120662247bc9", "score": "0.50183475", "text": "function threesixty_delete_skill($skillid, $intransaction=false){\n\tglobal $DB;\n\t\n if (!$intransaction) {\n //SCANMSG: transactions may need additional fixing\n $transaction = $DB->start_delegated_transaction();\n\n }\n // Delete all dependent response skills\n if (!$DB->delete_records('threesixty_response_skill', array('skillid' => $skillid))) {\n if (!$intransaction) {\n }\n return false;\n }\n // Delete matching records in trdiary_pdp_skill\n $trdiarytable = new xmldb_table('trdiary_pdp_skill');\n if ($dbman->table_exists($trdiarytable)) {\n if (!$DB->delete_records('trdiary_pdp_skill', array('skillid' => $skillid))) {\n if (!$intransaction) {\n }\n return false;\n }\n }\n // Perform the deletion\n if (!$DB->delete_records('threesixty_skill', array('id' => $skillid))) {\n if (!$intransaction) {\n }\n return false;\n }\n if (!$intransaction) {\n $transaction->allow_commit();\n }\n return true;\n}", "title": "" }, { "docid": "d99fe64db419178d0c7bd4505a4cc8dc", "score": "0.49822322", "text": "function quiz_attempts_restore_mods($quiz_id,$info,$restore) {\n\n notify(\"Restoring quiz without user attempts. Restoring of user attempts will be implemented in Moodle 1.5.1\");\n return true;\n\n global $CFG;\n\n $status = true;\n\n //Get the quiz_attempts array\n $attempts = $info['MOD']['#']['ATTEMPTS']['0']['#']['ATTEMPT'];\n\n //Iterate over attempts\n for($i = 0; $i < sizeof($attempts); $i++) {\n $att_info = $attempts[$i];\n //traverse_xmlize($att_info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //We'll need this later!!\n $oldid = backup_todb($att_info['#']['ID']['0']['#']);\n $olduserid = backup_todb($att_info['#']['USERID']['0']['#']);\n\n //Now, build the ATTEMPTS record structure\n $attempt->quiz = $quiz_id;\n $attempt->userid = backup_todb($att_info['#']['USERID']['0']['#']);\n $attempt->attempt = backup_todb($att_info['#']['ATTEMPTNUM']['0']['#']);\n $attempt->sumgrades = backup_todb($att_info['#']['SUMGRADES']['0']['#']);\n $attempt->timestart = backup_todb($att_info['#']['TIMESTART']['0']['#']);\n $attempt->timefinish = backup_todb($att_info['#']['TIMEFINISH']['0']['#']);\n $attempt->timemodified = backup_todb($att_info['#']['TIMEMODIFIED']['0']['#']);\n $attempt->layout = backup_todb($att_info['#']['LAYOUT']['0']['#']);\n $attempt->preview = backup_todb($att_info['#']['PREVIEW']['0']['#']);\n\n //We have to recode the userid field\n $user = backup_getid($restore->backup_unique_code,\"user\",$attempt->userid);\n if ($user) {\n $attempt->userid = $user->new_id;\n }\n\n //We have to recode the layout field (a list of questions id and pagebreaks)\n $attempt->layout = quiz_recode_layout($attempt->layout, $restore);\n\n //The structure is equal to the db, so insert the quiz_attempts\n $newid = insert_record (\"quiz_attempts\",$attempt);\n\n //Do some output\n if (($i+1) % 10 == 0) {\n echo \".\";\n if (($i+1) % 200 == 0) {\n echo \"<br />\";\n }\n backup_flush(300);\n }\n\n if ($newid) {\n //We have the newid, update backup_ids\n backup_putid($restore->backup_unique_code,\"quiz_attempts\",$oldid,\n $newid);\n //Now process quiz_states\n $status = quiz_states_restore_mods($newid,$att_info,$restore);\n } else {\n $status = false;\n }\n }\n\n return $status;\n }", "title": "" }, { "docid": "c6c17027be28412225625b4b8ce5ae0e", "score": "0.49706227", "text": "public function restored(SecKillGood $secKillGood)\n {\n //\n }", "title": "" }, { "docid": "c855fd37da6d807b81dcae2ef915a829", "score": "0.49619368", "text": "function restore()\r\n{\r\n\tglobal $db, $db_type, $pun_config;\r\n\r\n/*\r\n\tDO DATABASE RESTORE HERE\r\n\r\n\tswitch ($db_type)\r\n\t{\r\n\t\tdefault:\r\n\t\t\t$db->query(\"ALTER TABLE \".$db->prefix.\"some_table DROP some_column\") or error('Unable to drop column \"some_column\" from table \"some_table\"', __FILE__, __LINE__, $db->error());\r\n\t\t\tbreak;\r\n\t}\r\n*/\r\n}", "title": "" }, { "docid": "6dc50e566e387811c1645f61590d635c", "score": "0.4955594", "text": "public function restored(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "8fbfdd3e18529e07f263edd775b6711f", "score": "0.49015328", "text": "public function restoring(Product $Product)\n {\n //code...\n }", "title": "" }, { "docid": "3d9290d169d9fce66ac859e5d5d1b5bf", "score": "0.48817572", "text": "public static function restore()\n\t{\n\t}", "title": "" }, { "docid": "1a90e105e23bb131d64efa456d421e99", "score": "0.4878253", "text": "public function actionRestore()\n {\n $post = Yii::$app->request->post();\n $query = new Query;\n $audit = $query\n ->from(\"audits.{$post['table']}\")\n ->where('audit_id = :audit_id', ['audit_id' => $post['audit_id']])\n ->one();\n $this->setCurrentModel($post['table']);\n $criteria = [];\n /** @var \\yii\\db\\ActiveRecord $model */\n $model = $this->_currentModel;\n foreach ($model->primaryKey() as $primaryKey) {\n $criteria[$primaryKey] = $audit[$primaryKey];\n }\n foreach ($this->module->tables[$post['table']]['updateSkip'] as $column) {\n if (isset($audit[$column])) {\n unset($audit[$column]);\n }\n }\n /** @var \\yii\\db\\ActiveRecord $record */\n $record = $model->findOne($criteria);\n $record->setAttributes($audit, false);\n if ($record->save()) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Record has been restored.'));\n } else {\n Yii::$app->session->setFlash('danger', Yii::t('app', 'Failed to restore record.'));\n }\n return $this->redirect(Yii::$app->request->referrer);\n }", "title": "" }, { "docid": "a3222dd4f16e9d2cb7b7a77080802968", "score": "0.48631033", "text": "public function restore(User $user, Work $work)\n {\n //\n }", "title": "" }, { "docid": "9e95d358df8043edd7280200c3476316", "score": "0.48465034", "text": "function load_skills($path) {\n\t$sqlite = $_SESSION['sqlite'];\n\t$skills_arr = get_data_from_tsv($path);\n\t$count=count($skills_arr);\n\n\t$sqlite = $_SESSION['sqlite'];\n\t\n\tfor($i=1;$i<$count;$i++){\n\t\t$row=array_values($skills_arr[$i]);\n\t\t$id = $sqlite->escapeString($row[0]);\n\t\t$title = $sqlite->escapeString($row[1]);\n\t\tif(!$row[0]==\"\") {\n\t\t\t$insert = \"insert into skill(skill_id, skill_title, p, gamma0,gamma1,lambda) values('$id','$title',$row[2],$row[3],$row[4],$row[5])\";\n\t\t //$sqlite->query($insert) or die(\"Looks like something broke (what do you expect from code written in an airplane by a guy with a philosophy degree?). <b>Make sure your tabs are ordered correctly!</b>: \" . $sqlite->error . \"<br>$insert\");\n\t\t\t\t$sqlite->query($insert) or die(\"Looks like something broke (what do you expect from code written in an airplane by a guy with a philosophy degree?). <b>Make sure your tabs are ordered correctly!</b>: \" . $sqlite->error . \"<br>$insert\");\n\n\t\t}\n\t}\n}", "title": "" }, { "docid": "858c1c264ff2a002034a1d486bd3fa87", "score": "0.48436686", "text": "public function restored(Question $question)\n {\n //\n }", "title": "" }, { "docid": "b2c028addb17ef8efc3d065f369b2efd", "score": "0.48418236", "text": "public function onrestoreCallback($intID, $strTable, $arrData, $intVersion);", "title": "" }, { "docid": "b2c028addb17ef8efc3d065f369b2efd", "score": "0.48418236", "text": "public function onrestoreCallback($intID, $strTable, $arrData, $intVersion);", "title": "" }, { "docid": "fdde02869ac7141819568812a4e6bb28", "score": "0.4830901", "text": "public function doRestore()\n {\n $rc = new restore_controller(\"import\", $this->course->id, backup::INTERACTIVE_NO,backup::MODE_GENERAL,\n $this->admin_user_id,backup::TARGET_NEW_COURSE);\n $rc->get_logger()->set_next(new output_indented_logger(backup::LOG_INFO, false, true));\n $rc->execute_precheck(true);\n $rc->execute_plan();\n }", "title": "" }, { "docid": "1b37a8789d778428b9abd1ebabacbcfe", "score": "0.4819391", "text": "protected function rollback() {\n\t\t\\EE::warning( 'Exiting gracefully after rolling back. This may take some time.' );\n\t\tif ( $this->level > 0 ) {\n\t\t\t$this->delete_site( $this->level, $this->site_data['site_url'], $this->site_data['site_fs_path'] );\n\t\t}\n\t\t\\EE::success( 'Rollback complete. Exiting now.' );\n\t\texit;\n\t}", "title": "" }, { "docid": "dec1e3a7d7093e6758fb9ef783ad5aa9", "score": "0.48153257", "text": "public function restored(Game_record $gameRecord)\n {\n //\n }", "title": "" }, { "docid": "6b3ecf5992530499d84281855bfcae1f", "score": "0.48039782", "text": "public function restore($identifier);", "title": "" }, { "docid": "21aeb80aa33957ea27cbe5803b4dde10", "score": "0.47987172", "text": "public function restored(JobWorkingTime $jobWorkingTime)\n {\n //\n }", "title": "" }, { "docid": "1a7e491a1e7b3ba7a6ec3707bfe366a4", "score": "0.47823253", "text": "public function restore($user_id);", "title": "" }, { "docid": "30df74657ba2e847f60493b70eb6e514", "score": "0.47783834", "text": "public function restored( $model )\n {\n $this->logActivity('restored' , $model);\n }", "title": "" }, { "docid": "d9d22204e947ed675a2564162f1eb754", "score": "0.47613916", "text": "public function restore(User $user, SalaryHead $salaryHead)\n {\n //\n }", "title": "" }, { "docid": "a97aa47f9c84b7e87f6c542d0ebd0055", "score": "0.4730545", "text": "function warquest_clan_skill_decrease_do() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\tglobal $cid;\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $eid;\r\n\tglobal $id;\r\n\tglobal $amount;\r\n\t\r\n\t/* output */\r\n\tglobal $output;\t\r\n\r\n\t$clan = warquest_db_clan($cid);\r\n\r\n\tif (($id==1) & ($clan->attack < $amount)) {\r\n\t\r\n\t\t$message = t('CLAN_MINIMAL_SKILL');\r\n\t\t$output->popup .= warquest_box_icon(\"warning\", $message);\r\n\t\t\r\n\t} else if (($id==2) & ($clan->defense < $amount)) {\r\n\t\r\n\t\t$message = t('CLAN_MINIMAL_SKILL');\r\n\t\t$output->popup .= warquest_box_icon(\"warning\", $message);\r\n\t\t\r\n\t} else {\r\n\t\r\n\t\tswitch ($id) {\r\n\t\t\r\n\t\t\tcase 1: \t$clan->attack -= $amount;\r\n\t\t\t\t\t\t$max = $clan->attack;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\tcase 2: \t$clan->defense -= $amount;\r\n\t\t\t\t\t\t$max = $clan->defense;\r\n\t\t\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\twarquest_db_clan_update($clan);\r\n\t\t\r\n\t\t$message = t('CLAN_SKILL_DECREASED', number_format(($max * $config['init_clan_skill_step']),0,\",\",\".\"));\r\n\t\t\r\n\t\t$link = warquest_link('mid='.$mid.'&sid='.$sid.'&cid='.$cid.'&eid='.$eid.'&id='.$id,t('LINK_DECREASE'), \"decrease\");\t\t\r\n\t\tif ($max>0) {\r\n\t\t\t$link .= '<br/><br/>'.t('GENERAL_AMOUNT').'<br/>';\t\t\r\n\t\t\t$link .= warquest_amount_selected($max);\r\n\t\t\t$link .= '<br/><br/>';\r\n\t\t}\r\n\t\t\r\n\t\t$output->popup .= warquest_box_icon(\"info\", $message, $link);\t\t\t\r\n\t}\r\n}", "title": "" }, { "docid": "8f9f92579578436ec82bfc8dfe678c30", "score": "0.47101232", "text": "public function restored(Product $product)\n {\n //\n }", "title": "" }, { "docid": "8f9f92579578436ec82bfc8dfe678c30", "score": "0.47101232", "text": "public function restored(Product $product)\n {\n //\n }", "title": "" }, { "docid": "8f9f92579578436ec82bfc8dfe678c30", "score": "0.47101232", "text": "public function restored(Product $product)\n {\n //\n }", "title": "" }, { "docid": "8f9f92579578436ec82bfc8dfe678c30", "score": "0.47101232", "text": "public function restored(Product $product)\n {\n //\n }", "title": "" }, { "docid": "defd313edc3c2ca6b307c9412fa7e16c", "score": "0.46974373", "text": "function restore()\n\t{\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or die(JText::_('JINVALID_TOKEN'));\n\n\t\t$id\t\t\t= $this->input->getInt('id', 0);\n\t\t$version\t= $this->input->getInt('version', 0);\n\t\t$record_model = $this->getModel($this->record_name);\n\n\t\t// First checkin the open item\n\t\t$item = JTable::getInstance($this->records_jtable, '');\n\t\t$item->load($id);\n\t\t$item->checkin();\n\n\t\tif ($version)\n\t\t{\n\t\t\t$msg = JText::sprintf('FLEXI_VERSION_RESTORED', $version);\n\t\t\t$record_model->restore($version, $id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg = JText::_('FLEXI_NOTHING_TO_RESTORE');\n\t\t}\n\n\t\t$ctrlTask = 'task=items.edit';\n\t\t$this->setRedirect('index.php?option=com_flexicontent&' . $ctrlTask . '&cid[]=' . $id, $msg);\n\t}", "title": "" }, { "docid": "a9ab1e43b272f4decb0828e9e3f17db0", "score": "0.4694126", "text": "public function restored(Skhpn $skhpn)\n {\n //\n }", "title": "" }, { "docid": "4d858ce81c3a4129cc80a212e870f00f", "score": "0.46938205", "text": "public function restored(Race $race)\n {\n //\n }", "title": "" }, { "docid": "599c78c00095e41c0f0ab339075ddfc1", "score": "0.4688983", "text": "public function restored(Goal $goal)\n {\n //\n }", "title": "" }, { "docid": "bb074e10eccc66ac4e5036e6a4dd7f10", "score": "0.4688581", "text": "function shd_ticket_restore()\n{\n\tglobal $smcFunc, $user_info, $context;\n\n\tcheckSession('get');\n\n\tif (empty($context['ticket_id']))\n\t\tfatal_lang_error('shd_no_ticket', false);\n\n\t// Does the ticket we're trying to restore exist and can we see it?\n\t$query_ticket = shd_db_query('', '\n\t\tSELECT id_ticket, id_dept, id_member_started, id_member_updated, subject, num_replies, status\n\t\tFROM {db_prefix}helpdesk_tickets AS hdt\n\t\tWHERE {query_see_ticket}\n\t\t\tAND id_ticket = {int:ticket}',\n\t\tarray(\n\t\t\t'ticket' => $context['ticket_id'],\n\t\t)\n\t);\n\n\tif ($row = $smcFunc['db_fetch_assoc']($query_ticket))\n\t{\n\t\t$smcFunc['db_free_result']($query_ticket);\n\t\tif ($row['status'] != TICKET_STATUS_DELETED || (!shd_allowed_to('shd_restore_ticket_any', $row['id_dept']) && (!shd_allowed_to('shd_restore_ticket_own', $row['id_dept']) || $user_info['id'] != $row['id_member_started'])))\n\t\t\tfatal_lang_error('shd_cannot_restore_ticket', false);\n\n\t\t$subject = $row['subject'];\n\t\t$starter = $row['id_member_started'];\n\t\t$replier = $row['id_member_updated'];\n\t\t$num_replies = $row['num_replies'];\n\t}\n\telse\n\t{\n\t\t$smcFunc['db_free_result']($query_ticket);\n\t\tfatal_lang_error('shd_no_ticket', false);\n\t}\n\n\t// The ticket's id is in $context['ticket_id'].\n\tcall_integration_hook('shd_hook_restoreticket');\n\n\tshd_db_query('', '\n\t\tUPDATE {db_prefix}helpdesk_tickets AS hdt\n\t\tSET status = {int:status_new}\n\t\tWHERE id_ticket = {int:current_ticket}\n\t\t\tAND {query_see_ticket}',\n\t\tarray(\n\t\t\t'current_ticket' => $context['ticket_id'],\n\t\t\t'status_new' => shd_determine_status('restoreticket', $starter, $replier, $num_replies, $row['id_dept']),\n\t\t)\n\t);\n\n\t// Expire the cache of count(active tickets)\n\tshd_clear_active_tickets($row['id_dept']);\n\n\tshd_log_action('restore',\n\t\tarray(\n\t\t\t'ticket' => $context['ticket_id'],\n\t\t\t'subject' => $subject,\n\t\t)\n\t);\n\n\t// And home.\n\tif (isset($_REQUEST['home']))\n\t\tredirectexit($context['shd_home'] . $context['shd_dept_link']);\n\telse\n\t\tredirectexit('action=helpdesk;sa=ticket;ticket=' . $context['ticket_id']);\n}", "title": "" }, { "docid": "cea19ad041dcf1561c2959f4ea2db4dd", "score": "0.46821088", "text": "public function restored(Product $Product)\n {\n //code...\n }", "title": "" }, { "docid": "68a24f7b749254f16ceb6beb2edfc369", "score": "0.4681568", "text": "public function restoring($model)\n {\n //\n }", "title": "" }, { "docid": "135fb83fd9879d6a8735e400462cbff0", "score": "0.46792817", "text": "public function woocommerce_cart_item_restored( $cart_item_key, $cart ) {\n if ( !empty( $cart->cart_contents[ $cart_item_key ][ 'bundled_items' ] ) ) {\n $bundled_item_cart_keys = $cart->cart_contents[ $cart_item_key ][ 'bundled_items' ];\n foreach ( $bundled_item_cart_keys as $bundled_item_cart_key ) {\n $cart->restore_cart_item( $bundled_item_cart_key );\n }\n }\n }", "title": "" }, { "docid": "36dc2fa2d31dff0071fffbaa0a00e932", "score": "0.46767822", "text": "public function restore($id)\n {\n\n }", "title": "" }, { "docid": "1625b4cc06de89e6560452288508cd60", "score": "0.4671222", "text": "function quiz_restore_mods($mod,$restore) {\n\n global $CFG;\n\n $status = true;\n\n //Hook to call Moodle < 1.5 Quiz Restore\n if ($restore->backup_version < 2005043000) {\n include_once(\"restorelibpre15.php\");\n return quiz_restore_pre15_mods($mod,$restore);\n }\n\n //Get record from backup_ids\n $data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);\n\n if ($data) {\n //Now get completed xmlized object\n $info = $data->info;\n //traverse_xmlize($info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //Now, build the QUIZ record structure\n $quiz->course = $restore->course_id;\n $quiz->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);\n $quiz->intro = backup_todb($info['MOD']['#']['INTRO']['0']['#']);\n $quiz->timeopen = backup_todb($info['MOD']['#']['TIMEOPEN']['0']['#']);\n $quiz->timeclose = backup_todb($info['MOD']['#']['TIMECLOSE']['0']['#']);\n $quiz->optionflags = backup_todb($info['MOD']['#']['OPTIONFLAGS']['0']['#']);\n $quiz->penaltyscheme = backup_todb($info['MOD']['#']['PENALTYSCHEME']['0']['#']);\n $quiz->attempts = backup_todb($info['MOD']['#']['ATTEMPTS_NUMBER']['0']['#']);\n $quiz->attemptonlast = backup_todb($info['MOD']['#']['ATTEMPTONLAST']['0']['#']);\n $quiz->grademethod = backup_todb($info['MOD']['#']['GRADEMETHOD']['0']['#']);\n $quiz->decimalpoints = backup_todb($info['MOD']['#']['DECIMALPOINTS']['0']['#']);\n $quiz->review = backup_todb($info['MOD']['#']['REVIEW']['0']['#']);\n $quiz->questionsperpage = backup_todb($info['MOD']['#']['QUESTIONSPERPAGE']['0']['#']);\n $quiz->shufflequestions = backup_todb($info['MOD']['#']['SHUFFLEQUESTIONS']['0']['#']);\n $quiz->shuffleanswers = backup_todb($info['MOD']['#']['SHUFFLEANSWERS']['0']['#']);\n $quiz->questions = backup_todb($info['MOD']['#']['QUESTIONS']['0']['#']);\n $quiz->sumgrades = backup_todb($info['MOD']['#']['SUMGRADES']['0']['#']);\n $quiz->grade = backup_todb($info['MOD']['#']['GRADE']['0']['#']);\n $quiz->timecreated = backup_todb($info['MOD']['#']['TIMECREATED']['0']['#']);\n $quiz->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);\n $quiz->timelimit = backup_todb($info['MOD']['#']['TIMELIMIT']['0']['#']);\n $quiz->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']);\n $quiz->subnet = backup_todb($info['MOD']['#']['SUBNET']['0']['#']);\n $quiz->popup = backup_todb($info['MOD']['#']['POPUP']['0']['#']);\n\n //We have to recode the questions field (a list of questions id and pagebreaks)\n $quiz->questions = quiz_recode_layout($quiz->questions, $restore);\n\n //The structure is equal to the db, so insert the quiz\n $newid = insert_record (\"quiz\",$quiz);\n\n //Do some output\n echo \"<li>\".get_string(\"modulename\",\"quiz\").\" \\\"\".format_string(stripslashes($quiz->name),true).\"\\\"</li>\";\n backup_flush(300);\n\n if ($newid) {\n //We have the newid, update backup_ids\n backup_putid($restore->backup_unique_code,$mod->modtype,\n $mod->id, $newid);\n //We have to restore the question_instances now (course level table)\n $status = quiz_question_instances_restore_mods($newid,$info,$restore);\n //We have to restore the question_versions now (course level table)\n $status = quiz_question_versions_restore_mods($newid,$info,$restore);\n //Now check if want to restore user data and do it.\n if ($restore->mods['quiz']->userinfo) {\n //Restore quiz_attempts\n $status = quiz_attempts_restore_mods ($newid,$info,$restore);\n if ($status) {\n //Restore quiz_grades\n $status = quiz_grades_restore_mods ($newid,$info,$restore);\n }\n }\n } else {\n $status = false;\n }\n } else {\n $status = false;\n }\n\n return $status;\n }", "title": "" }, { "docid": "e77c80c2aaea6157a641af1d13d257f7", "score": "0.46578613", "text": "public function save_meta_custom_skill_taxo( $term_id ) {\n if ( isset( $_POST['meta_level_skill_taxo'] ) ) {\n $term_level = sanitize_text_field($_POST['meta_level_skill_taxo']);\n if( $term_level ) {\n update_term_meta( $term_id, 'ks_cv_skill_level', $term_level );\n }\n } \n }", "title": "" }, { "docid": "c786996cf75d9d5a0a3e052e747e4afd", "score": "0.46466735", "text": "public function restored(Loan $loan)\n {\n //\n }", "title": "" }, { "docid": "5b88a30a3b66bcc55b6db01691683d46", "score": "0.46312883", "text": "public function restore($id)\n {\n }", "title": "" }, { "docid": "5b88a30a3b66bcc55b6db01691683d46", "score": "0.46312883", "text": "public function restore($id)\n {\n }", "title": "" }, { "docid": "0b992fb57668aa899cbbec854bb68916", "score": "0.46183932", "text": "public function restored(Envio $envio)\n {\n //\n }", "title": "" }, { "docid": "4f331e8f7b4525e0bd157133d2c02cca", "score": "0.460833", "text": "public function saveSkillInfoAction()\n {\n \t$params=$this->getRequest()->getParams();\n \t \n \t$skill_chunks = explode(\",\", $params['skill_name']);\n \t$skills_r = array();\n \t$stripTags = Zend_Registry::get('Zend_Filter_StripTags');\n \tforeach ($skill_chunks as $skill)\n \t{\n \t\t$skills_r[] = @$stripTags->filter( trim($skill) );\n \t}\n \t \n \t$result_id = \"\";\n \t$saved_skills_r = array();\n \t$return_r = array();\n \tforeach ( $skills_r as $key => $skl )\n \t{\n \t\tif( $skl )\n \t\t{\n \t\t\t$skill_reff = \\Extended\\skill_ref::getRowObjectByColumn('skill', $skl);\n \t\t\tif( !$skill_reff )//checking that is skill exist in reference table or not.\n \t\t\t{\n \t\t\t\t//skill do not exist\";\n \t\t\t\t$skill_id = \\Extended\\skill_ref::saveSkill(Auth_UserAdapter::getIdentity()->getId(), $skl);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t// skill exist\";\n \t\t\t\t$skill_id = $skill_reff[0]->getId();\n \t\t\t}\n \t\t\t$result_id = \\Extended\\user_skills::addSkillInfo( Auth_UserAdapter::getIdentity()->getId(), $skill_id );\n \t\t\t$return_r[$key]['user_skill_id'] = $result_id;\n \t\t\t$return_r[$key]['user_skill_name'] = $skl;\n \t\t}\n \t}\n \t \n \t \n \tif( $return_r )\n \t{\n \t\techo Zend_Json::encode( $return_r );\n \t}\n \telse\n \t{\n \t\techo Zend_Json::encode( 0 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "95d4b4c3a81748cd097f4fd94fd900b9", "score": "0.46056628", "text": "public function restored(ProductAdditional $productAdditional)\n {\n //\n }", "title": "" }, { "docid": "4d2c7df956055b5fb398058b785c180f", "score": "0.45992944", "text": "public function restore($id) \n {\n $program = Program::withTrashed()->find($id)->restore();\n return response()->json(['done']);\n }", "title": "" }, { "docid": "e212ea09e65df9438969a611778d1883", "score": "0.45950282", "text": "public function restore($id);", "title": "" }, { "docid": "e212ea09e65df9438969a611778d1883", "score": "0.45950282", "text": "public function restore($id);", "title": "" }, { "docid": "83dd9e0b8969198072f075ec8b646eae", "score": "0.4588145", "text": "public function back_to_warehouse() : void \n {\n $this->service->returnMachine($this->id);\n }", "title": "" }, { "docid": "ad882097c9213e761955a09aa7274cb7", "score": "0.45867065", "text": "function quiz_restore_logs($restore,$log) {\n\n $status = false;\n\n //Depending of the action, we recode different things\n switch ($log->action) {\n case \"add\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n $log->url = \"view.php?id=\".$log->cmid;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n break;\n case \"update\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n $log->url = \"view.php?id=\".$log->cmid;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n break;\n case \"view\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n $log->url = \"view.php?id=\".$log->cmid;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n break;\n case \"view all\":\n $log->url = \"index.php?id=\".$log->course;\n $status = true;\n break;\n case \"report\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n $log->url = \"report.php?id=\".$log->cmid;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n break;\n case \"attempt\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n //Extract the attempt id from the url field\n $attid = substr(strrchr($log->url,\"=\"),1);\n //Get the new_id of the attempt (to recode the url field)\n $att = backup_getid($restore->backup_unique_code,\"quiz_attempts\",$attid);\n if ($att) {\n $log->url = \"review.php?id=\".$log->cmid.\"&attempt=\".$att->new_id;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n }\n break;\n case \"submit\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n //Extract the attempt id from the url field\n $attid = substr(strrchr($log->url,\"=\"),1);\n //Get the new_id of the attempt (to recode the url field)\n $att = backup_getid($restore->backup_unique_code,\"quiz_attempts\",$attid);\n if ($att) {\n $log->url = \"review.php?id=\".$log->cmid.\"&attempt=\".$att->new_id;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n }\n break;\n case \"review\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the info field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n //Extract the attempt id from the url field\n $attid = substr(strrchr($log->url,\"=\"),1);\n //Get the new_id of the attempt (to recode the url field)\n $att = backup_getid($restore->backup_unique_code,\"quiz_attempts\",$attid);\n if ($att) {\n $log->url = \"review.php?id=\".$log->cmid.\"&attempt=\".$att->new_id;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n }\n break;\n case \"editquestions\":\n if ($log->cmid) {\n //Get the new_id of the module (to recode the url field)\n $mod = backup_getid($restore->backup_unique_code,$log->module,$log->info);\n if ($mod) {\n $log->url = \"view.php?id=\".$log->cmid;\n $log->info = $mod->new_id;\n $status = true;\n }\n }\n break;\n default:\n echo \"action (\".$log->module.\"-\".$log->action.\") unknow. Not restored<br />\"; //Debug\n break;\n }\n\n if ($status) {\n $status = $log;\n }\n return $status;\n }", "title": "" }, { "docid": "bce94126d58eac5f64f748a62c0e7173", "score": "0.45761195", "text": "function update_skill($player, $skill, $role) {\n $player=htmlentities($player);\n $player=mysql_escape_string($player);\n $sql=\"SELECT * FROM twstat_players WHERE name=\\\"$player\\\"\";\n $result=mysql_query($sql)or die(\"in twstat_players not selected ! error:\".mysql_error());\n if (mysql_num_rows($result)<1) {\n $sql=\"INSERT INTO twstat_players (name, skill) Values (\\\"$player\\\",\\\"$skill\\\")\\n\";\n } else {\n switch ($role) {\n case 1:\n $sql=\"UPDATE twstat_players SET skill=\\\"$skill\\\", kills=kills+1 WHERE name=\\\"$player\\\"\";\n break;\n case -1:\n $sql=\"UPDATE twstat_players SET skill=\\\"$skill\\\", death=death+1 WHERE name=\\\"$player\\\"\";\n break;\n case 0:\n $sql=\"UPDATE twstat_players SET skill=\\\"$skill\\\" WHERE name=\\\"$player\\\"\";\n break;\n }\n }\n $result_2=mysql_query($sql);\n if (!$result_2) die(\"SKILL ib PLAYERS not inserted or updated ! error:\".mysql_error());\n}", "title": "" }, { "docid": "04e22e47e2ecbefbb1a753c7ed96f8ac", "score": "0.45725688", "text": "function fbird_rollback($link_or_trans_identifier = null) {}", "title": "" }, { "docid": "2a31faaad57afecd38d698208afbb341", "score": "0.45694143", "text": "public function restored(SystemCounty $systemCounty)\n {\n //\n }", "title": "" }, { "docid": "29a29b940f4f85a5cd9ec1d8eb351592", "score": "0.45654172", "text": "function fbird_restore($service_handle, $source_file, $dest_db, $options = null, $verbose = null) {}", "title": "" }, { "docid": "efb78d14023e74647dd8162c62c36290", "score": "0.45619634", "text": "public function restored(PreSurveyRequest $pre_survey_request)\n {\n //\n }", "title": "" }, { "docid": "ebafe3515835f00ac95693edcaf26721", "score": "0.45602226", "text": "public function restored(LeagueAccount $leagueAccount)\n {\n //\n }", "title": "" }, { "docid": "195284af72eb53774378af73b4d63634", "score": "0.4559816", "text": "public static function restore() {\n\t\t\tif((!class_exists('Administration')) || !CdiUtil::isEnabled()) {\n\t\t\t \tthrow new Exception(\"You can only restore the Symphony database from the Preferences page\");\n\t\t\t}\n\t\t\t\n\t\t\tif(!CdiUtil::hasRequiredDumpDBVersion()) {\n\t\t\t\tthrow new Exception('Your current version of <a href=\"http://symphony-cms.com/download/extensions/view/40986/\">Dump DB</a> is not supported. Please switch to version 1.09.');\n\t\t\t} else {\n\t\t\t\trequire_once(EXTENSIONS . '/dump_db/lib/class.mysqlrestore.php');\n\t\t\t\t\n\t\t\t\t// Prevent the CdiLogQuery::log() from persisting queries that are executed by CDI itself\n\t\t\t\tCdiLogQuery::isUpdating(true);\n\t\t\t\t\n\t\t\t\t// COPIED FROM Dump_DB version 1.09\n\t\t\t\t// Adjust to only support FULL database dump\n\t\t\t\t$restore = new MySQLRestore(Symphony::Database());\n\t\t\t\t\n\t\t\t\t$filename = CDI_BACKUP_ROOT . '/' . $_POST[\"ref\"];\n\t\t\t\tif(isset($_FILES['dumpdb_restore_file'])) {\n\t\t\t\t\t$filename = self::getFileName('manual');\n\t\t\t\t\trename($_FILES['dumpdb_restore_file']['tmp_name'],$filename);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(file_exists($filename)) {\n\t\t\t\t\t$data = file_get_contents($filename);\n\t\t\t\t\t$data = str_replace('tbl_', Symphony::Configuration()->get('tbl_prefix', 'database'), $data);\n\t\t\t\t\t$restore->import($data);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"The provided restore file '\" . $filename . \"' could not be found.\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Re-enable CdiLogQuery::log() to persist queries\n\t\t\t\tCdiLogQuery::isUpdating(false);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9fd310a0c7181ac3f129dfeabcc464b7", "score": "0.45557457", "text": "public function restore(User $user, Loan $loan)\n {\n //\n }", "title": "" }, { "docid": "c8af42023fefa90bc0a4a82a4a7004ca", "score": "0.45483562", "text": "function process_intent($intent_type, $script_line) {\nswitch ($intent_type) {\ncase \"url\": return url_intent($script_line); break;\ncase \"tap\": return tap_intent($script_line); break;\ncase \"rtap\": return rtap_intent($script_line); break;\ncase \"dtap\": return dtap_intent($script_line); break;\ncase \"hover\": return hover_intent($script_line); break;\ncase \"type\": return type_intent($script_line); break;\ncase \"select\": return select_intent($script_line); break;\ncase \"read\": return read_intent($script_line); break;\ncase \"show\": return show_intent($script_line); break;\ncase \"upload\": return upload_intent($script_line); break;\ncase \"down\": return down_intent($script_line); break;\ncase \"receive\": return receive_intent($script_line); break;\ncase \"echo\": return echo_intent($script_line); break;\ncase \"save\": return save_intent($script_line); break;\ncase \"dump\": return dump_intent($script_line); break;\ncase \"write\": return write_intent($script_line); break;\ncase \"load\": return load_intent($script_line); break;\ncase \"snap\": return snap_intent($script_line); break;\ncase \"table\": return table_intent($script_line); break;\ncase \"wait\": return wait_intent($script_line); break;\ncase \"live\": return live_intent($script_line); break;\ncase \"ask\": return ask_intent($script_line); break;\ncase \"keyboard\": return keyboard_intent($script_line); break;\ncase \"mouse\": return mouse_intent($script_line); break;\ncase \"check\": return check_intent($script_line); break;\ncase \"test\": return test_intent($script_line); break;\ncase \"frame\": return frame_intent($script_line); break;\ncase \"popup\": return popup_intent($script_line); break;\ncase \"api\": return api_intent($script_line); break;\ncase \"run\": return run_intent($script_line); break;\ncase \"dom\": return dom_intent($script_line); break;\ncase \"js\": return js_intent($script_line); break;\ncase \"r\": return r_intent($script_line); break;\ncase \"py\": return py_intent($script_line); break;\t\ncase \"vision\": return vision_intent($script_line); break;\ncase \"timeout\": return timeout_intent($script_line); break;\ncase \"code\": return code_intent($script_line); break;\ndefault: echo \"ERROR - \" . current_line() . \" cannot understand step \" . $script_line . \"\\n\";}}", "title": "" }, { "docid": "c3bbd844ec8b286dcb60cd2f8e4fb577", "score": "0.4545651", "text": "public function restored(Disemedicine $disemedicine)\n {\n //\n }", "title": "" }, { "docid": "90d3b2c05e528d709d5f059826abb0f9", "score": "0.4544884", "text": "public function prepareStepSkills() {\r\n if(!$this->owner->CharacterQuest->quest->params[\"prepSkills\"]) {\r\n $StartCharacterSkill = $this->owner->Character->getCharacterSkill(1);\r\n $StartCharacterSkill->available = 1;\r\n $StartCharacterSkill->save();\r\n $this->owner->CharacterQuest->quest->params[\"prepSkills\"] = 1;\r\n }\r\n }", "title": "" }, { "docid": "f2be49626b75975443953e7f32ffcff8", "score": "0.45433587", "text": "function restore()\r\n{\r\n global $db, $db_type, $pun_config;\r\n}", "title": "" }, { "docid": "8009b67b06737fdeaf7578933dd315b9", "score": "0.45399728", "text": "function ibase_restore($service_handle, $source_file, $dest_db, $options = null, $verbose = null) {}", "title": "" }, { "docid": "18e3cb02ba356f103f96d86fa4d63e74", "score": "0.45393932", "text": "public function restored(Assertion $assertion)\n {\n Log::info('Restoring Assertion Id: '.$assertion->id);\n\n //Restore any Results related to the assertion\n $results = AssertionResult::withTrashed()\n ->where('assertion_id', $assertion->id)\n ->get();\n\n foreach ($results as $result) {\n $result->restore();\n }\n\n //Restore any tasks related to the assertion\n $tasks = Task::withTrashed()\n ->where('taskable_type', Assertion::class)\n ->where('taskable_id', $assertion->id)\n ->get();\n\n foreach ($tasks as $task) {\n $task->restore();\n }\n }", "title": "" }, { "docid": "6829160e7ca57940002c8a1d2cc7a423", "score": "0.4533178", "text": "public function restore() {\n $this->sfRestore();\n Cache::tags(Config::get('entrust.role_user_table'))->flush();\n }", "title": "" }, { "docid": "779813f51a7952d4ecf0ed51dccd361b", "score": "0.45313096", "text": "public function restored(TaxIn $taxIn)\n {\n //\n }", "title": "" }, { "docid": "def8e85afee875468863056fc5a00ee1", "score": "0.4518558", "text": "function warquest_clan_skill_increase_do() {\r\n\r\n\t/* input */\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\tglobal $cid;\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $eid;\r\n\tglobal $id;\r\n\tglobal $amount;\r\n\r\n\t/* output */\r\n\tglobal $output;\t\r\n\r\n\t$clan = warquest_db_clan($cid);\r\n\t\r\n\tswitch ($id) {\r\n\t\t\r\n\t\tcase 1: \t$clan->attack += $amount;\r\n\t\t\t\t\t$max = $clan->attack;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\tcase 2: \t$clan->defense += $amount;\r\n\t\t\t\t\t$max = $clan->defense;\r\n\t\t\t\t\tbreak;\r\n\t}\r\n\t\t\r\n\twarquest_db_clan_update($clan);\r\n\t\t\r\n\t$message = t('CLAN_SKILL_INCREASED', number_format(($max * $config['init_clan_skill_step']),0,\",\",\".\"));\r\n\t\t\r\n\t$link = warquest_link('mid='.$mid.'&sid='.$sid.'&cid='.$cid.'&eid='.$eid.'&id='.$id, t('LINK_INCREASE'), \"increase\");\t\t\r\n\t$link .= '<br/><br/>'.t('GENERAL_AMOUNT').'<br/>';\t\t\r\n\t$link .= warquest_amount_selected(1000000);\r\n\t$link .= '<br/><br/>';\r\n\t\t\r\n\t$output->popup .= warquest_box_icon(\"info\", $message, $link);\t\t\r\n}", "title": "" }, { "docid": "86478001859ffed6e41b9119bae764f8", "score": "0.45178264", "text": "public function switchProfile()\n\t{\n\t\t$this->fetchSettings();\n\n\t\t// Get profile information\n\t\t$schema = __ROOT__ . '/db/schema.sql';\n\t\t$profile = parse_ini_file(__ROOT__ . '/' . $this->config['paths']['profiles'] . '/' . $_POST['profile']);\n\n\t\t// This profile has no backup\n\t\tif (empty($profile['backup']))\n\t\t{\n\t\t\t$this->response['error'] = 'This job has no recent database backup.';\n\t\t\t$this->ajaxReturn($this->output);\n\t\t}\n\n\t\t// The database backup is missing\n\t\tif (!is_file(__ROOT__ . '/db/' . $profile['hook'] . '/' . $profile['backup']))\n\t\t{\n\t\t\t$this->response['error'] = 'This database backup could not be found.';\n\t\t\t$this->ajaxReturn($this->output);\n\t\t}\n\n\t\t// Restore most recent backup associated with the selected profile\n\t\t$file = __ROOT__ . '/db/' . $profile['hook'] . '/' . $profile['backup'];\n\t\t$ext = strtolower(substr($profile['backup'], strrpos($profile['backup'], '.') + 1, strlen($profile['backup'])));\n\n\t\t// Load schema file\n\t\texec(\"mysql -u \" . $this->config['db']['username'] . \" --password='\" . $this->config['db']['password'] . \"' --host='\" . $this->config['db']['server'] . \"' \" . $this->config['db']['database_name'] . \" < \" . $schema);\n\n\t\t// Load data backup\n\t\tif ($ext == 'gz')\n\t\t{\n\t\t\t// Restore a compressed backup file\n\t\t\t$command = \"gunzip < \" . $file . \" | mysql -u \" . $this->config['db']['username'] . \" --password='\" . $this->config['db']['password'] . \"' --host='\" . $this->config['db']['server'] . \"' \" . $this->config['db']['database_name'];\n\n\t\t\t$this->response['com'] = $command;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Restore an uncompressed SQL file\n\t\t\t$command = \"mysql -u \" . $this->config['db']['username'] . \" --password='\" . $this->config['db']['password'] . \"' --host='\" . $this->config['db']['server'] . \"' \" . $this->config['db']['database_name'] . \" < \" . $file;\n\t\t}\n\n\t\texec($command);\n\t}", "title": "" }, { "docid": "9b5e33e95a8dbc00e2e148419274a04d", "score": "0.45175436", "text": "public function restored(Sociallink $sociallink)\n {\n //\n }", "title": "" }, { "docid": "d7da488f9c2fa88f929d576beddf2061", "score": "0.45166138", "text": "public function restore(User $user, Mission $mission)\n {\n //\n }", "title": "" }, { "docid": "b2bbe5c4a85c5df7eae743e6fa7e0669", "score": "0.45163918", "text": "public function restored(Project $project)\n {\n //\n }", "title": "" }, { "docid": "b2bbe5c4a85c5df7eae743e6fa7e0669", "score": "0.45163918", "text": "public function restored(Project $project)\n {\n //\n }", "title": "" }, { "docid": "936a1a996b62a614cbd27b6340c54c9e", "score": "0.4510472", "text": "function fbird_rollback_ret($link_or_trans_identifier = null) {}", "title": "" }, { "docid": "80950b9fe71b1000cdaf3bd32fc1b879", "score": "0.4508976", "text": "public function restored(Teacher $teacher)\n {\n //\n }", "title": "" }, { "docid": "80950b9fe71b1000cdaf3bd32fc1b879", "score": "0.4508976", "text": "public function restored(Teacher $teacher)\n {\n //\n }", "title": "" }, { "docid": "2c988bcfe776f294dc2b803faae1b15d", "score": "0.450739", "text": "public function restored(Check $check)\n {\n //\n }", "title": "" }, { "docid": "6fd3a867aa7a700234d378fe2f578257", "score": "0.45011845", "text": "public function handle()\n {\n if ( ! empty($module = $this->getStringArg('module'))) {\n $this->rollback($module);\n\n return;\n }\n\n foreach (workbench()->all() as $module) {\n $this->rollback($module);\n }\n }", "title": "" }, { "docid": "709ac5304295a020c8bf8d92e3b5b1d5", "score": "0.44984317", "text": "private function restored()\n {\n $this->revision->event = __FUNCTION__;\n $this->revision->old_values = [];\n $this->revision->new_values = $this->getAttributes(true);\n\n $this->createRevision();\n }", "title": "" }, { "docid": "3e5099c10167cfb87617f65a66d666d5", "score": "0.44946578", "text": "public function restored(Task $task)\n {\n //\n }", "title": "" }, { "docid": "170b6510ce255a2298c8b354881a54c2", "score": "0.44868448", "text": "public function restore($id) \n {\n $lot = Lot::withTrashed()->find($id)->restore();\n return response()->json(['done']);\n }", "title": "" }, { "docid": "cbeca91c05e21f83cf71811ba47bafea", "score": "0.44846696", "text": "function wiki_entries_restore_mods($old_wiki_id,$new_wiki_id,$info,$restore) {\n\n global $CFG;\n\n $status = true;\n\n //Get the entries array\n $entries = $info['MOD']['#']['ENTRIES']['0']['#']['ENTRY'];\n\n //Iterate over entries\n for($i = 0; $i < sizeof($entries); $i++) {\n $ent_info = $entries[$i];\n //traverse_xmlize($ent_info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //We'll need this later!!\n $oldid = backup_todb($ent_info['#']['ID']['0']['#']);\n\n //Now, build the wiki_ENTRIES record structure\n $entry->wikiid = $new_wiki_id;\n $entry->course = $restore->course_id;\n $entry->userid = backup_todb($ent_info['#']['USERID']['0']['#']);\n $entry->groupid = backup_todb($ent_info['#']['GROUPID']['0']['#']);\n $entry->pagename = backup_todb($ent_info['#']['PAGENAME']['0']['#']);\n $entry->timemodified = backup_todb($ent_info['#']['TIMEMODIFIED']['0']['#']);\n $entry->timemodified += $restore->course_startdateoffset;\n //We have to recode the userid field\n $user = backup_getid($restore->backup_unique_code,\"user\",$entry->userid);\n if ($user) {\n $entry->userid = $user->new_id;\n }\n //We have to recode the groupid field\n $group = backup_getid($restore->backup_unique_code, 'groups', $entry->groupid);\n if ($group) {\n $entry->groupid = $group->new_id;\n }\n\n //The structure is equal to the db, so insert the wiki_entries\n $newid = insert_record (\"wiki_entries\",$entry);\n\n //Do some output\n if (($i+1) % 50 == 0) {\n if (!defined('RESTORE_SILENTLY')) {\n echo \".\";\n if (($i+1) % 1000 == 0) {\n echo \"<br />\";\n }\n }\n backup_flush(300);\n }\n\n if ($newid) {\n //We have the newid, update backup_ids\n backup_putid($restore->backup_unique_code,\"wiki_entries\",$oldid,$newid);\n\n //Restore wiki_pages\n $status = wiki_pages_restore_mods($oldid,$newid,$ent_info,$restore);\n\n //Now copy moddata associated files\n $status = wiki_restore_files ($old_wiki_id, $new_wiki_id, $oldid, $newid, $restore);\n } else {\n $status = false;\n }\n }\n return $status;\n }", "title": "" }, { "docid": "c67d34d03b3e964d32e4ed035bcb5958", "score": "0.44800207", "text": "public function restored(Otb $otb)\n {\n //\n }", "title": "" }, { "docid": "9ebfd803dec0397de3a036191126a024", "score": "0.44788173", "text": "public function restored(Account $account)\n {\n //\n }", "title": "" }, { "docid": "7a182cd4461e2f59ac381cb03add4703", "score": "0.44773796", "text": "public function restore(User $user, SanPhamBanMua $sanPhamBanMua)\n {\n //\n }", "title": "" }, { "docid": "4595f1c7dad2a8cc425dbea7cb752c17", "score": "0.44723517", "text": "public function rollback() {\n\t\t$this->data = $this->src;\n\t}", "title": "" }, { "docid": "17a59c08f690a66b28e2680a76d0ed6f", "score": "0.4470703", "text": "public function handle()\n {\n // Just remove existing variants.\n $this->draft->variants()->delete();\n\n $taxes = Tax::get();\n\n $variants = $this->versions->map(function ($version) use ($taxes) {\n $data = collect($version->model_data)->except(['id', 'product_id']);\n\n // Do we have the tax record that exists?\n $taxRecordExists = $taxes->contains('id', $data['tax_id']);\n\n if (! $taxRecordExists) {\n $data['tax_id'] = $taxes->first(function ($tax) {\n return $tax->default;\n })->id;\n }\n $data['options'] = $data['options'] ?? [];\n\n $data['product_id'] = $this->draft->id;\n\n $variant = $this->draft->variants()->create($data->toArray());\n\n $version->relations->groupBy('versionable_type')\n ->each(function ($versions, $type) use ($variant) {\n $action = null;\n switch ($type) {\n case ProductPricingTier::class:\n $action = RestoreProductVariantTiers::class;\n break;\n case ProductCustomerPrice::class:\n $action = RestoreProductVariantCustomerPricing::class;\n break;\n }\n if (! $action) {\n Log::error(\"Unable to restore for {$type}\");\n\n return;\n }\n (new $action)->run([\n 'versions' => $versions,\n 'draft' => $variant,\n ]);\n });\n });\n\n return $this->draft;\n }", "title": "" }, { "docid": "652547f1744a05653703b5538dcf3448", "score": "0.44668716", "text": "public function rollback() {\n static::$messages = new DrushLogMigrateMessage();\n $database_state_key = \\Drupal::state()->get('migrate.fallback_state_key');\n $database_state = \\Drupal::state()->get($database_state_key);\n $db_spec = $database_state['database'];\n $connection = $this->getConnection($db_spec);\n $version = $this->getLegacyDrupalVersion($connection);\n $migrations = $this->getMigrations('migrate_drupal_' . $version, $version);\n\n // Roll back in reverse order.\n $this->migrationList = array_reverse($migrations);\n\n foreach ($migrations as $migration) {\n drush_print(dt('Rolling back @migration', ['@migration' => $migration->id()]));\n $executable = new MigrateExecutable($migration, static::$messages);\n // drush_op() provides --simulate support.\n drush_op([$executable, 'rollback']);\n }\n }", "title": "" }, { "docid": "20824f41f5c9d04540ee189b77b62be7", "score": "0.4466707", "text": "function ibase_rollback($link_or_trans_identifier = null) {}", "title": "" }, { "docid": "3a0a0f8325d4dd323ef46acf0ac77eb2", "score": "0.4462931", "text": "function step3_process()\n{\n\t// TIP: if no code is added here, the installer will simply extract the archive\n\t// into the install directory.\n\t\n\t// TIP: install code is made of Installatron commands. some examples:\n\t// move $this->mv('FROM','TO');\n\t// copy $this->cp('FROM','TO');\n\t// remove (delete) $this->rm('FILE_OR_DIR');\n\t// chmod $this->chmod('FILE_OR_DIR',0777);\n\t// edit file (regex) $this->sr('FILE','#REGEX#\",\"REPLACE_WITH\");\n\t// ...see all the commands at: http://www.installatron.com/sdk_commands\n\t\n\t// TIP: Installatron has a lot of useful variables. some examples:\n\t// install url $this->url\n\t// install path $this->path\n\t// database host $this->db_host\n\t// database host $this->db_host\n\t// database name $this->db_name\n\t// database username $this->db_user\n\t// database password $this->db_pass\n\t// table prefix $this->db_prefix\n\t// ...see all the variables at: http://www.installatron.com/sdk_commands\n\t\n\t// TIP: you can add as many steps as you need\n\t// TIP: you can remove these comments if you don't need them.\n\t }", "title": "" }, { "docid": "2b7d6f476923aa7295ab479aecb7174b", "score": "0.44608253", "text": "public function geoCart_initItem_restore()\n {\n return false;\n }", "title": "" } ]
09858c528f5411c1ca636c28cfe9157b
Write a different csv
[ { "docid": "6da889e1d62df82bcf6831ca8041354e", "score": "0.5797092", "text": "public function writeData($input){\n $output = $input;\n $fp = fopen('solfege-slugged.csv','w');\n foreach($output as $fields){\n fputcsv($fp,$fields);\n }\n fclose($fp);\n }", "title": "" } ]
[ { "docid": "9fd10bcea75ca22a7a28983571361f19", "score": "0.6741762", "text": "protected function writeCsvFile()\n {\n $csvOutput = 'Datum;Wertstellung;Kategorie;Name;Verwendungszweck;Konto;Bank;Betrag;Währung';\n file_put_contents('number26_account_data.csv', $csvOutput . \"\\r\\n\" . $this->csvOutput);\n }", "title": "" }, { "docid": "a8630e0bb14fa25b4ec77b623a081d15", "score": "0.6674892", "text": "protected function addHeaderRowToCSV() {}", "title": "" }, { "docid": "493d4ac5d7941da0bcb5dcfeb76e60a8", "score": "0.65622044", "text": "public function csv();", "title": "" }, { "docid": "0904e37691720144bc569abb6e2fa7b5", "score": "0.6494803", "text": "private static function createCSV()\n {\n // set headers\n self::outputHeaders();\n\n // check data whether it empty & data format is correct? $data = [[...], [...], ...]\n if (is_array(self::$contents) && count(self::$contents) && is_array(self::$contents[0])) {\n // create a file pointer connected to the output stream\n $fp = fopen('php://output', 'w');\n // set the column titles\n if (!empty(self::$titles)) {\n fputcsv($fp, self::$titles);\n }\n // output each row of data\n foreach (self::$contents as $row) {\n $out = [];\n // filter only for fields required\n foreach (self::$fields as $field) {\n // replace the default values in contents if has\n if (count(self::$replaces) && array_key_exists($field, self::$replaces)) {\n $row[$field] = self::$replaces[$field][$row[$field]];\n }\n $out[] = isset($row[$field]) ? $row[$field] : '';\n }\n fputcsv($fp, $out, self::$delimiter);\n $out = []; // reset\n }\n fclose($fp);\n exit();\n }\n }", "title": "" }, { "docid": "b369ac4fd18c617d19e0bb96353a0e10", "score": "0.6461287", "text": "function addCSV($contenu) {\n $ressource = openCSV(\"a+\");\n if (!fwrite($ressource, $contenu)) {\n return false;\n }\n\n closeCSV($ressource);\n return true;\n}", "title": "" }, { "docid": "98bef683b6a3fd061885ca124d7a9141", "score": "0.636071", "text": "function writeFileCsv(&$result, $debug=false)\n {\n if ($this->fileName === false) $filename=$this->newFileName;\n else $filename=$this->fileName;\n\n if ($debug) echo \"Neuer Filename $filename zum Schreiben.\\n\";\n\n $resultCandL=$this->findColumnsLines($result);\n $columns=$resultCandL[\"columns\"];\n if ($debug) \n {\n echo \"writeFileCsv: Analyse des Input Arrays: \\n\";\n echo \" Insgesamt \".sizeof($resultCandL[\"lines\"]).\" Zeilen und \".sizeof($resultCandL[\"columns\"]).\" Spalten erkannt: \\n\";\n print_r($columns);\n }\n \n if (is_file($filename)) unlink($filename); // in ein leeres File schrieben\n $handle=fopen($filename, \"a\");\n fputcsv($handle,$columns,\";\"); // den Index aus dem result File übernehmen\n\n foreach ($result as $file => $entry)\n {\n /* Struktur von result ist Filename = array Spalte => Datum */\n $line=array();\n foreach ($columns as $column)\n {\n if (isset($entry[$column])) $line[]=$entry[$column];\n else $line[]=false;\n }\n $entries=[$file] + $line;\n fputcsv($handle,$entries,\";\");\n /*\n fwrite($handle, $file.\";\");\n foreach ($index as $tab)\n {\n if (isset($entry[$tab])) fwrite($handle, $entry[$tab].\";\"); \n else fwrite($handle, \";\");\n }\n fwrite($handle,\"\\n\");\n */\n }\n fclose($handle);\n }", "title": "" }, { "docid": "d5fb943ef39d19ca7810f5b684c4cea8", "score": "0.6337834", "text": "function write_line_csv($filedir,$line){\n\t\t$file = fopen($filedir,\"a+\");\n\t\treturn fputcsv($file,$line); //return false if have error\n\t}", "title": "" }, { "docid": "ae087d6cd0cf97ec38f169df270df821", "score": "0.63297427", "text": "public function csv()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "934690813391f2b315c1b5a2b4819933", "score": "0.632354", "text": "protected function _writeCsvData()\n {\n // TODO return a better array result after write line by line\n $mResult = false;\n\n foreach ($this->_data as $aRow){\n $mResult = fputcsv($this->_handle, $aRow, $this->_subDelimiter, $this->_enclosure);\n if ($mResult === false) break;\n }\n\n return $mResult;\n }", "title": "" }, { "docid": "59efcc30a46e15405e6eee938c016980", "score": "0.6279994", "text": "function write_to_csv($main_file, $fp, $inp) {\n fputcsv($main_file, $inp);\n // now individual file\n fputcsv($fp, [$inp[0], $inp[2], $inp[3], $inp[4]]);\n}", "title": "" }, { "docid": "486b6d4635fc3670fc010b93a24554c8", "score": "0.6242557", "text": "public function toCSV()\n {\n header('Content-type: text/csv');\n header('Content-Disposition: attachment; filename=\"table.csv\"');\n\n// do not cache the file\n header('Pragma: no-cache');\n header('Expires: 0');\n\n// create a file pointer connected to the output stream\n $file = fopen('php://output', 'w');\n\n fputcsv($file, array_keys($this->arrayData[0]));\n// output each row of the data\n foreach ($this->arrayData as $row)\n {\n fputcsv($file, $row);\n }\n\n exit();\n }", "title": "" }, { "docid": "ad0c1c0571cb1320392f6bb924a9c795", "score": "0.622849", "text": "protected function fputcsv($buffer, $export_row)\n {\n }", "title": "" }, { "docid": "7be5a4363074fce1c3dc4b3d749a5fa8", "score": "0.622835", "text": "function ajouterdansCSV($idAction)\n{\n$pdo = connexion();\n\n\tif($pdo != false)\n\t{\n\t\t$req=\"SELECT A.IdActions,A.Etat, A.NumAction, A.DateDeb, A.HeureDeb, A.MinuteDeb, A.HeureFin, A.MinuteFin,A.DureeAction, A.DescriptionAction, A.SolutionAction,\n\t\t\tI.NomI, I.PrenomI,I.TelMobileI ,I.IdInterlocuteur, F.id, F.NomSociete\n\t\t\tFROM actions A, interlocuteur I, fichesociete F\n\t\t\tWHERE I.IdInterlocuteur = A.IdInterlocuteur\n\t\t\tand I.IdFicheSociete = F.id\n\t\t\tand idActions = $idAction\";\n\t\t\n\t\t$res = $pdo -> query($req)->fetchall(); \n\t\t\t//var_dump($res);\n\t\t\t$list = $res;\n\t\t\t\n\t\t\t$fp = fopen('file.csv', 'a');\n\t\t\t\n\t\t\t\tfor($h = 0; $h < count($list) ; $h++){\n\t\t\t\t$NouveauTableau = array();\n\t\t\t\t$max = count($list[$h])/2;\n\t\t\t\t\n\t\t\t\tfor($CompteurLigne = 0; $CompteurLigne < $max; $CompteurLigne++ )\n\t\t\t\t\t$NouveauTableau[$CompteurLigne] = $list[$h][$CompteurLigne];\n\t\t\t\n\t\t\t\t\tfputcsv($fp, $NouveauTableau, '*');\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\t\t\tfclose($fp);\n\t\t\t\n\t}\n\n}", "title": "" }, { "docid": "7e61766df82c8f95942ed2a66b12eeb8", "score": "0.62217844", "text": "protected function write2CSV (){\n\t\t$cnt = 0;\n\t\tforeach($this->headers as $header) {\n\t\t\tfwrite($this->fhandle, '\"'.$header.'\"');\n\t\t\t$cnt++;\n\t\t\tif ($cnt < count($this->headers)) {\n\t\t\t\tfwrite($this->fhandle, \",\");\n\t\t\t}\n\t\t}\n\t\tfwrite($this->fhandle,\"\\n\");\n//\tDepartment, team, employee name, date, shift name, shift start, shift end, flags.\n// at the moment this will always write department team and employee name, plus all details.\n// in the future we will probably need the ability to suppress repeating text \n// plus possibly another option to only show summary data.\n\t\tforeach ($this->data as $line) {\n\t\t\tfwrite ($this->fhandle, '\"'.$line[0].'\",');\t\t//Department\n\t\t\tfwrite ($this->fhandle, '\"'.$line[1].'\",');\t\t//Team\n\t\t\tfwrite ($this->fhandle, '\"'.$line[2].'\",');\t\t//Employee\n\t\t\tfwrite ($this->fhandle, '\"'.$line[3].'\",');\t\t//Date\n\t\t\tfwrite ($this->fhandle, '\"'.$line[4].'\",');\t\t//Shift Name\n\t\t\tfwrite ($this->fhandle, '\"'.$line[5].'\",');\t\t//Shift Start\n\t\t\tfwrite ($this->fhandle, '\"'.$line[6].'\",');\t\t//Shift End\n\t\t\tfwrite ($this->fhandle, '\"'.$line[7].'\"');\t\t//Flags\n\t\t\tfwrite ($this->fhandle, \"\\n\");\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "1e828c53d108466021b66aa195bfd87d", "score": "0.62082523", "text": "public function createCSV() {\n if ($csv = fopen(\"./csv/clientInfo.csv\", \"w\")) {\n // write a file\n foreach ($this->_contacts as $contact) {\n $vars = $contact->getVars();\n $data = [$vars['id'], $vars['firstname'], $vars['lastname'], $vars['phone'], $vars['email'], \n $vars['ad_street'], $vars['ad_city'], $vars['ad_province'], $vars['ad_postalcode'],\n $vars['birthday'], $vars['salesrep_id']];\n fputcsv($csv, $data);\n }\n fclose($csv);\n } \n }", "title": "" }, { "docid": "b00b4f7c1b05fdf2e0d7da617ef884d3", "score": "0.62001556", "text": "function final_csv(){\n $path = $this->ruta_raiz.\"/bodega/masiva/\";\n $ruta = $path.$this->arcCSV;\n $final= $path.'comp'.$this->arcCSV;\n $linea= null;\n $m = 0;\n\n clearstatcache();\n $fp\t = fopen($ruta,'r');\n $fd = fopen($final, \"w\"); \n\n fwrite($fp, 'header(\\'Content-Type: application/csv; charset=iso-8859-1\\');');\n\n while ($linea= fgets($fp,1024)){\n $linea = str_replace(',',\";\",$linea);\n $linea = str_replace(\"\\\"\",'',$linea);\n\n if(empty($m)){\n $linea = \"*RAD_S*; *F_RAD_S*;\".$linea; \n }else{\n $nmrad = $this->radarray[$m - 1];\n $hoy = date('Y - m - d');\n $linea = \" $nmrad;\".$hoy.\";\".$linea; \n }\n\n fwrite ($fd, $linea); \n $m++;\n }\n\n fclose($fd); //aqui estoy cerrando el archivo.txt\n return $final; //aqui muestro la ruta donde se creo y guardo el archivo.txt\n }", "title": "" }, { "docid": "fdd9f0c37094d8b1b44bb45b24397cc9", "score": "0.6194699", "text": "public function exportcsv() {\n\n// header(\"Content-Type: text/csv\");\n// header(\"Content-Disposition: attachment; filename=file.csv\");\n//\n// function outputCSV($data) {\n// $output = fopen(\"php://output\", \"w\");\n// foreach ($data as $row)\n// fputcsv($output, $row); // here you can change delimiter/enclosure\n// fclose($output);\n// }\n//\n// outputCSV(array(\n// array(\"name 1\", \"age 1\", \"city 1\"),\n// array(\"name 2\", \"age 2\", \"city 2\"),\n// array(\"name 3\", \"age 3\", \"city 3\")\n// ));\n }", "title": "" }, { "docid": "1e180744f45cef85fa1ab488862a29fd", "score": "0.6193579", "text": "public function exportAsCsv()\n {\n\n // Actually create the file\n // The w+ parameter will wipe out and overwrite any existing file with the same name\n $csvFile = $this->csvFolder .'/' .$this->filename;\n $handle = fopen($csvFile, 'w+');\n\n $results = $this->selectAll($this->table);\n // Write all the user records to the spreadsheet\n $text = \"No,Storenumber,Storeaddress,organization,Pickdate,Addeddate\\n\";\n foreach ($results as $row) {\n //$text .= $row['firstname'].', '.$row['lastname'].', '.$row['email'].\"\\n\";\n $text .= '\"'.$row['id'].'\",\"'.$row['storename'].'\",\"'.$row['storeaddress'].'\",\"'.$row['organization'].'\",\"'.$row['pickdate'].'\",\"'.$row['addeddate'].'\"'.\"\\n\";\n }\n fwrite($handle, $text);\n unset($text);\n // Finish writing the file\n fclose($handle);\n\n $this->downLoadCsv($csvFile);\n }", "title": "" }, { "docid": "0fe8a860b209111aa15d322f5cf83183", "score": "0.6145827", "text": "public function exportCSV(){\r\n\t\t\tparent::generalExportCSV( 'csv', array('Id','Pa�s','Zona','Peso','Importe','Estado'), array('id','pais','zona','peso','importe','estado'),$this->pathClass . '/csv.html' );\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "f122a4f3678479c540c30b7736fa7d93", "score": "0.61397195", "text": "public function exportCSV(){\r\n\t\t\tparent::generalExportCSV( 'csv', array('Id','Pa�s','Zona','Peso','Importe','Estado'), array('id','pais','zona','peso','importe','estado'),$this->pathClass . '/csv.html' );\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "d3ab074d19da785d1c7490c21cdc8e3b", "score": "0.6135429", "text": "protected function _writeCsvHeader()\n {\n fputcsv($this->_handle, $this->_csvHeader, $this->_delimiter, $this->_enclosure);\n }", "title": "" }, { "docid": "3eaf5c0692e54c64170f43eb756e0b66", "score": "0.6120355", "text": "public function exportStudentsToCSV()\n {\n }", "title": "" }, { "docid": "7e82f686cc52628071b40f6162d2a85d", "score": "0.61173016", "text": "private function write_csv($contacts) {\n \t$handle = fopen($this->filename, 'w');\n \tforeach ($contacts as $row) {\n \t\tfputcsv($handle, $row);\n \t}\n \tfclose($handle);\n }", "title": "" }, { "docid": "d701e2717f54f332288e801225561033", "score": "0.6108105", "text": "function writeCsv($list) {\n\t\t$file = new SplFileObject('csvfile.csv', 'w');\n\t\tforeach ($list as $fields) {\n\t\t $file->fputcsv($fields);\n\t\t}\n\t}", "title": "" }, { "docid": "8d885a5543603a81e65f2edfa63fe1e0", "score": "0.61027044", "text": "function exportToCsvFile($category = 's') {\n $fileName = $category . '-' . time() . '.csv';\n $filePath = __DIR__ . '/../data/export/' . $fileName;\n $f = fopen($filePath, 'w');\n fputcsv($f, [\n 'license',\n 'name',\n 'age',\n 'S',\n '',\n 'D',\n '',\n 'Mx',\n ''\n ], ';');\n $i = 0;\n foreach ($_SESSION['players'] as $player) {\n $row = [\n $player['license'],\n $player['name'],\n $player['age'],\n $player['rankings']['s']['ranking'],\n $player['rankings']['s']['points'],\n $player['rankings']['d']['ranking'],\n $player['rankings']['d']['points'],\n $player['rankings']['m']['ranking'],\n $player['rankings']['m']['points'],\n ''\n ];\n if ($category == 's') {\n $row[] = $player['rankings']['s']['points'];\n } elseif ($i % 2 == 0) {\n $p1 = $player['rankings'][$category]['points'];\n } elseif ($i % 2 == 1) {\n $p2 = $player['rankings'][$category]['points'];\n $row[] = ($p1 + $p2) / 2;\n }\n fputcsv($f, array_map('utf8_decode', $row), ';');\n\n $i++;\n }\n fclose($f);\n return $fileName;\n}", "title": "" }, { "docid": "e271501745166d3205ba9a3d0cdf7ead", "score": "0.6066797", "text": "function writeCSV($o,$textsep) {\n return $textsep.$o->raw.$textsep;\n }", "title": "" }, { "docid": "4099ff70126f4ddd4e67864224009a36", "score": "0.6056095", "text": "function savefile($fname, $val){\n$fp = fopen($fname, 'a');\nfputcsv($fp, $val);\nfclose($fp);\n}", "title": "" }, { "docid": "9ebef3cfdea0595430d5354804ff1c4d", "score": "0.6048179", "text": "private function writeCSV($array)\n {\n //write to csv file\n $handle = fopen($this->filename, 'w');\n foreach ($array as $row) {\n fputcsv($handle, $row);\n\n }// foreach\n\n fclose($handle);\n return $array;\n }", "title": "" }, { "docid": "deb41d9af4e7496afe34158861885c7a", "score": "0.60447526", "text": "function createCsv($chosenStandards, $fileLocation, $statistics) {\n $file = fopen($fileLocation, 'w');\n if (!$file)\n return false;\n\n //CSV header\n $fileheader = 'date;identifier';\n \n foreach ($chosenStandards as $Standard) {\n $fileheader .= \";\";\n $fileheader .= $Standard;\n }\n $fileheader .= \"\\n\";\n \n fwrite($file, $fileheader);\n $return = \"\";\n\n //CSV datablocks\n $firstloop = true;\n $count = 0;\n while ($stats = mysql_fetch_assoc($statistics)) {\n if ($firstloop) {\n $firstloop = false;\n } else {\n $return .= \"\\n\";\n }\n\n //block Description\n $return .= $stats['timeframe'] . \";\" . $stats['identifier'];\n\n //content\n foreach ($chosenStandards as $Standard) {\n // prevent invalid output if there are no entries in database\n if (!isset($stats[$Standard]))\n $stats[$Standard] = 0;\n $return .= \";\" . $stats[$Standard];\n }\n $count++;\n }\n\n if (fwrite($file, $return))\n stdOut(\"File is written to \" . $fileLocation, \"\");\n fclose($file);\n return $count; \n}", "title": "" }, { "docid": "4097c213effbef17bd9b5d30cdb5f663", "score": "0.6021102", "text": "public function convertDataToCsv()\n {\n\n }", "title": "" }, { "docid": "973d321200ccc8a6474ff31553f6286d", "score": "0.6003612", "text": "function outputCSV($data,$file_name) {\n header(\"Content-Type: text/csv\");\n header(\"Content-Disposition: attachment; filename=$file_name\");\n # Disable caching - HTTP 1.1\n header(\"Cache-Control: no-cache, no-store, must-revalidate\");\n # Disable caching - HTTP 1.0\n header(\"Pragma: no-cache\");\n # Disable caching - Proxies\n header(\"Expires: 0\");\n\n # Start the ouput\n $output = fopen(\"php://output\", \"w\");\n fputcsv($output, array_keys($data[0]));\n # Then loop through the rows\n foreach ($data as $row) {\n # Add the rows to the body\n fputcsv($output, $row); // here you can change delimiter/enclosure\n }\n # Close the stream off\n fclose($output);\n }", "title": "" }, { "docid": "a86bb11bc97b382155305ead8ea3af0c", "score": "0.600288", "text": "public function fputcsv($row)\n\t{\n\t\t$pathname = 'php://temp/' . md5(microtime());\n\t\t$file = fopen($pathname, 'w+');\n\t\t$csvInfo = $this->getCsvControl();\n\n\t\t// if php 5.3.0 make use of the escape parameter\n\t\tif (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n\t\t\tfputcsv(\n\t\t\t\t$file,\n\t\t\t\t$row,\n\t\t\t\t$csvInfo[0],\n\t\t\t\t$csvInfo[1],\n\t\t\t\t$csvInfo[2]\n\t\t\t);\n\t\t}\n\t\t// if not, don't use it\n\t\telse {\n\t\t\tfputcsv(\n\t\t\t\t$file,\n\t\t\t\t$row,\n\t\t\t\t$csvInfo[0],\n\t\t\t\t$csvInfo[1]\n\t\t\t);\n\t\t}\n\n\t\trewind($file);\n\n\t\t// write temporary file to physical file\n\t\twhile ($line = fgets($file)) {\n\t\t\t$this->fwrite($line);\n\t\t}\n\n\t\t// close pointer\n\t\tfclose($file);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "5381b7da80d0726311c4e9a98114131e", "score": "0.5963935", "text": "public function exportCSV($result,$fileNameForCSV,$clgDate,$folderName,$lotNumber,$batchID,$rejectionType)\n\t{\t\n\t\t$filename = $fileNameForCSV.\".csv\";\n\t\tif($rejectionType==18)\n\t\t{\n\t\t\t$fp = fopen(EXPORT_TEXT_ROOT.\"Output\".\"\".SEPARATOR.\"\".date(\"m-d-Y\", strtotime($clgDate)).\"\".SEPARATOR.\"\".\"Lot-\".$lotNumber.\"\".SEPARATOR.\"\".'CREDIT CARD'.\"-\".$lotNumber.\"-\".date(\"m-d-Y\", strtotime($clgDate)).\"\".SEPARATOR.\"\".$folderName.\"\".SEPARATOR.\"\".\"CLG-\".$batchID.\"\".SEPARATOR.$fileNameForCSV.'.csv', 'w');\n\t\t}\n\t\tif($rejectionType==23)\n\t\t{\n\t\t\t$fp = fopen(EXPORT_TEXT_ROOT.\"Output\".\"\".SEPARATOR.\"\".date(\"m-d-Y\", strtotime($clgDate)).\"\".SEPARATOR.\"\".\"Lot-\".$lotNumber.\"\".SEPARATOR.\"\".'CREDIT CARD'.\"-\".$lotNumber.\"-\".date(\"m-d-Y\", strtotime($clgDate)).\"\".SEPARATOR.\"\".$folderName.\"\".SEPARATOR.\"\".\"TRF-\".$batchID.\"\".SEPARATOR.$fileNameForCSV.'.csv', 'w');\n\t\t}\n\t\tif($rejectionType==29)\n\t\t{\n\t\t\t$fp = fopen(EXPORT_TEXT_ROOT.\"Output\".\"\".SEPARATOR.\"\".date(\"m-d-Y\", strtotime($clgDate)).\"\".SEPARATOR.\"\".\"Lot-\".$lotNumber.\"\".SEPARATOR.\"\".'CREDIT CARD'.\"-\".$lotNumber.\"-\".date(\"m-d-Y\", strtotime($clgDate)).\"\".SEPARATOR.\"\".$folderName.\"\".SEPARATOR.\"\".\"CLG-\".$batchID.\"\".SEPARATOR.$fileNameForCSV.'.csv', 'w');\n\t\t}\n\t\t\n\t\tforeach ($result as $fields) {\n\t\t\tfputcsv($fp, get_object_vars($fields));\t\t\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "f27d749dc4e7b2339f3e98d2d4288cde", "score": "0.5959801", "text": "private function writeHeader() {\n $headers = $this->parseFields();\n fputcsv($this->diskBuffer, $headers);\n }", "title": "" }, { "docid": "c369a88180167b25fa57a87d6b9f4d05", "score": "0.5952286", "text": "public function csv () {\r\n\t\t$query = \"SELECT\r\n\t\t\t \t CONCAT(DAY(`user`.registration), '/', MONTH(`user`.registration), '/', YEAR(`user`.registration)),\r\n\t\t\t\t IF (`user`.gender = 0, 'M', 'Mme/Mlle') as gender,\r\n\t\t\t \t `user`.firstName,\r\n\t\t\t \t `user`.lastName,\r\n\t\t\t\t `user`.email,\r\n\t\t\t \t `user`.realAge,\r\n\t\t\t\t `user`.weight,\r\n\t\t\t\t `user`.height,\r\n\t\t\t\t `user`.lifeStyle,\r\n\t\t\t\t `user`.waterDrank,\r\n\t\t\t\t `user`.waterFood,\r\n \t\t\t\t GROUP_CONCAT(`profile`.age) AS age_by_week,\r\n \t\t\t\t `user`.mailing,\r\n \t\t\t\t `user`.lang\r\n\t\t\t\tFROM\r\n\t\t\t\t `user`,\r\n\t\t\t\t `profile`\r\n\t\t\t\tWHERE\r\n\t\t\t\t `user`.id = `profile`.userId\r\n\t\t\t\t GROUP BY\r\n\t\t\t\t `user`.id,\r\n\t\t\t\t `user`.firstName,\r\n\t\t\t\t `user`.lastName,\r\n\t\t\t\t `user`.realAge,\r\n\t\t\t\t `user`.email\";\r\n\t\t$result = $this->_db->fetchAll($query);\r\n\t\t$csv = \"date d'enregistrement;civilité;prénom;nom;email;âge;poids;taille;style de vie;boisson;nourriture;évolution;opt-in;pays\\r\\n\";\r\n\t\tforeach ($result as &$line) {\r\n\t\t\t$csv .= implode(';',(array)$line).\"\\r\\n\";\r\n\t\t}\r\n\t\treturn utf8_decode($csv);\r\n\t}", "title": "" }, { "docid": "37033116a646c002d99a3119a3f35600", "score": "0.5940075", "text": "function writeIntoCSV($data){\n if (sizeof($data)<1){\n echo \"No data satisfy all constraints.<br>\".'<a href=\"javascript:history.go(-1);\">'.\n\t '&lt;&lt Sorry, Go Back.</a>';\n return;\n }\n \n header(\"Content-Type:text/csv\");\n $date = date(\"Ymd-H:i:s\", strtotime(strftime('%c')));\n header(\"Content-Disposition:attachment;filename=energyData-\" . $date . \".csv\");\n $fp = fopen(\"php://output\",\"w\");\n\n fputcsv($fp,array_keys($data[0]));\n\n for ($i=0;$i< sizeof($data); $i++){\n fputcsv($fp,$data[$i]);\n \n }\n\n fclose($fp);\n \n}", "title": "" }, { "docid": "c33a455eba81f655d4c2a11142b8fca9", "score": "0.59241617", "text": "function inc_exporter_csv_dist($titre, $resource, $delim = ', ', $entetes = null, $envoyer = true) {\n\n\t$filename = preg_replace(',[^-_\\w]+,', '_', translitteration(textebrut(typo($titre))));\n\n\tif ($delim == 'TAB') {\n\t\t$delim = \"\\t\";\n\t}\n\tif (!in_array($delim, array(',', ';', \"\\t\"))) {\n\t\t$delim = ',';\n\t}\n\t\n\t$charset = $GLOBALS['meta']['charset'];\n\t$folder = sous_repertoire(_DIR_CACHE, 'export');\n\tif ($delim == ',') {\n\t\t$extension = 'csv';\n\t\t$writer = WriterEntityFactory::createWriterFromFile(\"$folder$filename.$extension\");\n\t\t$writer->openToFile(\"$folder$filename.$extension\");\n\t} else {\n\t\t$extension = 'xlsx';\n\t\t$defaultStyle = (new StyleBuilder())\n ->setFontName('Arial')\n ->setFontSize(11)\n ->build();\n\t\t$writer = WriterEntityFactory::createXLSXWriter();\n\t\t$writer->setTempFolder(sous_repertoire(_DIR_CACHE, 'export'));\n\t\t$writer->setDefaultRowStyle($defaultStyle)\n\t\t ->openToFile(\"$folder$filename.$extension\");\n\t}\n\t$filename = \"$filename.$extension\";\n\n\tif ($entetes and is_array($entetes) and count($entetes)) {\n\t\t$writer->addRow(WriterEntityFactory::createRowFromArray($entetes));\n\t}\n\n\t// on passe par un fichier temporaire qui permet de ne pas saturer la memoire\n\t// avec les gros exports\n\t$fichier = $folder . $filename;\n\n\twhile ($row = is_array($resource) ? array_shift($resource) : sql_fetch($resource)) {\n\t\t$writer->addRow(WriterEntityFactory::createRowFromArray($row));\n\t}\n\t\n\t$writer->close();\n\t\n\tif ($envoyer) {\n\t\theader(\"Content-Type: text/comma-separated-values; charset=$charset\");\n\t\theader(\"Content-Disposition: attachment; filename=$filename\");\n\t\t//non supporte\n\t\t//Header(\"Content-Type: text/plain; charset=$charset\");\n\t\theader('Content-Length: '.filesize($fichier));\n\t\tob_clean();\n\t\tflush();\n\t\treadfile($fichier);\n\t}\n\n\treturn $fichier;\n}", "title": "" }, { "docid": "07d2f2f49f4e02abea0a207f7fb8a6c9", "score": "0.5918549", "text": "public function writeFile($path,$filter=null) {\r\n\t\t$handle = fopen($path, 'w');\r\n\r\n\t\tif ($handle) {\r\n\r\n\t\t\t//si c'est une copie filtrée\r\n\t\t\tif ($filter) {\r\n\t\t\t\t$new_head = $this->getInitHead(array_flip($this->head),$filter);\r\n\t\t\t\tfputcsv($handle, array_keys($new_head) , $this->delimiter, $this->enclosure);\r\n\r\n\t\t\t\tforeach ($this->rows as $fields) {\r\n\t\t\t\t fputcsv($handle, $this->getInitRow($fields,$new_head), $this->delimiter, $this->enclosure);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Si c'est une copie à l'identique\r\n\t\t\telse{\r\n\r\n\t\t\t\tfputcsv($handle, array_keys($this->head) , $this->delimiter, $this->enclosure);\r\n\r\n\t\t\t\tforeach ($this->rows as $fields) {\r\n\t\t\t\t fputcsv($handle, $fields, $this->delimiter, $this->enclosure);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t\tfclose($handle);\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0ff2aefab0d34eea2d31205b8444f85a", "score": "0.5917179", "text": "function outputCsv($fileName, $assocDataArray)\n{\n ob_clean();\n header('Pragma: public');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Cache-Control: private', false);\n header('Content-Type: text/csv');\n header('Content-Disposition: attachment;filename=' . $fileName);\n if (isset($assocDataArray['0'])) {\n $fp = fopen('php://output', 'w');\n //fputcsv($fp, array_keys($assocDataArray['0']));\n foreach ($assocDataArray as $values) {\n fputcsv($fp, $values);\n }\n fclose($fp);\n }\n ob_flush();\n}", "title": "" }, { "docid": "6522cb5b7a29e9745950fd51588fa944", "score": "0.5914155", "text": "function outputCSV($data, $file_name = 'file.csv')\n{\n header(\"Content-Type: text/csv\");\n header(\"Content-Disposition: attachment; filename=$file_name\");\n // Disable caching - HTTP 1.1\n header(\"Cache-Control: no-cache, no-store, must-revalidate\");\n // Disable caching - HTTP 1.0\n header(\"Pragma: no-cache\");\n // Disable caching - Proxies\n header(\"Expires: 0\");\n\n // Start the ouput\n $output = fopen(\"php://output\", \"w\");\n\n // Then loop through the rows\n foreach ($data as $row) {\n // Add the rows to the body\n fputcsv($output, $row); // here you can change delimiter/enclosure\n }\n // Close the stream off\n fclose($output);\n}", "title": "" }, { "docid": "748c0563d092227b4b5f2590ae49f935", "score": "0.59128183", "text": "public function write_to_flatfile() {\n\t\t$mode = $this->flush ? 'w' : 'a';\n\t\t$fp = fopen( '/web/temp/moodle/m2_auto.txt', $mode );\n\n\t\tforeach( $this->to_write as $enrollment ) {\n\t\t\tfputcsv( $fp, $enrollment );\n\t\t}//end foreach\n\n\t\tfclose( $fp );\n\t}", "title": "" }, { "docid": "e84f34e91c4c3e0418656232c60ece4f", "score": "0.5903687", "text": "function writeCsv($csv, $csvPath){\n echo $csv;\n \n $fp = fopen($csvPath, 'w');\n fwrite($fp, $csv);\n fclose($fp);\n}", "title": "" }, { "docid": "e84f34e91c4c3e0418656232c60ece4f", "score": "0.5903687", "text": "function writeCsv($csv, $csvPath){\n echo $csv;\n \n $fp = fopen($csvPath, 'w');\n fwrite($fp, $csv);\n fclose($fp);\n}", "title": "" }, { "docid": "72366dcb73d30d4a95afeee1b2ed9ab7", "score": "0.59014595", "text": "public function export_csv() {\n\n // Download replies\n (new MidrubBaseUserAppsCollectionChatbotHelpers\\Csv)->export_csv();\n\n }", "title": "" }, { "docid": "8cd8e623b058ca2ba3a827ffe2530923", "score": "0.59000903", "text": "function outputCsv($fileName, $assocDataArray)\n{\n ob_clean();\n header('Pragma: public');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Cache-Control: private', false);\n header('Content-Type: text/csv');\n header('Content-Disposition: attachment;filename=' . $fileName); \n if(isset($assocDataArray['0'])){\n $fp = fopen('php://output', 'w');\n //fputcsv($fp, array_keys($assocDataArray['0']));\n foreach($assocDataArray AS $values){\n fputcsv($fp, $values);\n }\n fclose($fp);\n }\n ob_flush();\n exit;\n}", "title": "" }, { "docid": "e4d01a3a001c23d1bba025fbe7c2af81", "score": "0.58880097", "text": "protected function write_csv_data($data)\n {\n }", "title": "" }, { "docid": "b55380dfad715b0d2caf4c1c686aba14", "score": "0.5883879", "text": "function transformers_actions_csv_export($csv, $delimiter = ',', $skip_first_line = FALSE) {\n $csv_array = array();\n foreach ($csv as $i => $line) {\n if (((!$skip_first_line) || ($i >0))) {\n $csv_array[] = implode($delimiter, $line);\n }\n }\n return array('csv_text' => implode(\"\\n\", $csv_array));\n}", "title": "" }, { "docid": "ab4fd619be958cc8fb297a5e45777634", "score": "0.5880732", "text": "function exportQuestionToCsv()\n{\n\tglobal $DB;\n\t$query = $_SESSION['queryForQuestions'];\n\t$que = $DB->RunSelectQuery($query);\n\t$counter = count($que);\n\t\n\tif(($fp = fopen('questions.csv', 'w')) && $counter > 0 && $que != 0)\n\t{\n\t\t$arr = array(\"S.No.\", \"Question\", \"Question Level(B=>Beginner,I=>Intermediate,H=>Higher)\", \"\", \"Subject\", \"Question type ( T = True/False, M = Multiple, S = Subjective)\", \"Marks\", \"Discussion\", \"Hints\", \"Answer1\",\t\"Answer2\", \"Answer3\", \"Answer4\", \"Correct answer\");\n\t\tfputcsv($fp, $arr);\n\t\tfor ($count = 0; $count < $counter; $count++)\n\t\t{\n\t\t\t$arr[0] = $count + 1;\n\t\t\t$arr[1] = $que[$count]->question_title;\n\t\t\t$arr[2] = $que[$count]->question_level;\n\t\t\t$arr[3] = $que[$count]->stream_title;\n\t\t\t$arr[4] = $que[$count]->subject_name;\n\t\t\t$arr[5] = $que[$count]->question_type;\n\t\t\t$arr[6] = $que[$count]->marks;\n\t\t\t$arr[7] = $que[$count]->discussion;\n\t\t\t$arr[8] = $que[$count]->hints;\n\t\t\t\n\t\t\t$id = $que[$count]->id;\n\t\t\t$query = \"SELECT * FROM answer WHERE question_id = '$id'\";\n\t\t\t$ans = $DB->RunSelectQuery($query);\n\t\t\t\n\t\t\t$arr[9] = $ans[0]->answer_title;\n\t\t\t$arr[10] = $ans[1]->answer_title;\n\t\t\t$arr[11] = $ans[2]->answer_title;\n\t\t\t$arr[12] = $ans[3]->answer_title;\n\t\t\t\n\t\t\t$query = \"SELECT a.answer_title FROM question_answer AS qa JOIN answer AS a ON qa.answer_id = a.id WHERE qa.question_id = '$id'\";\n\t\t\t$corr_ans = $DB->RunSelectQuery($query);\n\t\t\t\n\t\t\t$arr[13] = $corr_ans[0]->answer_title;\n\t\t\tfputcsv($fp, $arr);\n\t\t}\n\t}\n\telse \n\t{\n\t\t$arr[0] = 'No Record Found.';\n\t\tfputcsv($fp, $arr);\n\t}\n\theader('Content-type: application/csv');\n\theader('Content-Disposition: attachment; filename=\"Questions.csv\"');\n\treadfile(\"questions.csv\");\n\tfclose($fp);\n\t$fp = fopen('questions.csv', 'w');\n\tfclose($fp);\n\texit;\n}", "title": "" }, { "docid": "e9e38f7754eed015af4fc615dc745131", "score": "0.5873353", "text": "public function writeToFile()\n {\n if (count($this->searchedMedia)) {\n\n //Sort media by likes count desc\n usort($this->searchedMedia, array('InstagramHashtagSearch', 'SortByLikeCount'));\n\n //Create CVS file\n $file = fopen($this->filename, 'w');\n\n $sliced_array = array_slice($this->searchedMedia, 0, 100);\n\n fputcsv($file, array('id', 'type', 'created_at', 'shortcode', 'likes', 'comments', 'thumbnail_src', 'caption'));\n\n foreach ($sliced_array as $obj) {\n\n //Convert obj/array it to associative array\n $a = $this->parseObject($obj);\n\n fputcsv($file, array_values($a));\n }\n\n fclose($file);\n return $this->filename;\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "38131a0904ebb19ba54eb141188c4e9a", "score": "0.58721083", "text": "function export_risk_security_services_join_csv() {\n\t$sql = \"SELECT * from risk_security_services_join\";\n\t$result = runQuery($sql);\n\t\n\t# open file\n\t$export_file = \"downloads/risk_security_services_join_export.csv\";\n\t$handler = fopen($export_file, 'w');\n\t\n\tfwrite($handler, \"risk_security_services_join_id,category_name,category_description,category_disabled\\n\");\n\tforeach($result as $line) {\n\t\tfwrite($handler,\"$line[risk_security_services_join_id],$line[category_name],$line[category_descripion],$line[category_disabled]\\n\");\n\t}\n\t\n\tfclose($handler);\n\n}", "title": "" }, { "docid": "0381a3988cfa3d377b271c085cbf6e7f", "score": "0.5870874", "text": "function putListeDispositifCSV($fichierCSV,$delimiter){\n\t\t\t$table = null;\n\t\t\t$table = TableRegistry::get('dispositif')\n\t\t \t->find()\n\t\t \t->toArray();\n\n\t\t foreach($table as $data){\n\t\t\t\t$res = array($data['CodeDispositif'],$data['NomDispositif']);\n \t\tfputcsv($fichierCSV,$res,$delimiter);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c28a91edab2f9f4afdeaeb7a75412416", "score": "0.5859685", "text": "public function export(): void\r\n {\r\n echo \"\\nNow exporting as CSV...\";\r\n }", "title": "" }, { "docid": "213d7d88fcec7b8f6bb78cc51c2ca183", "score": "0.58570445", "text": "function csv_write($filepath, $data, $colSep = ','){\n\t$lines = array();\n\tforeach ($data as $d) {\n\t\tif( is_array($d) ){\n\t\t\t$lines[] = implode($colSep, $d);\n\t\t}else{\n\t\t\t$lines[] = (string)$d;\n\t\t}\n\t}\n\treturn file_put_contents($filepath, implode(\"\\r\\n\", $lines));\n}", "title": "" }, { "docid": "64dd7dd660026b9c2fb59277567a709c", "score": "0.5847314", "text": "public function csv_export() {\n $export = \"ORDER NUMBER|DATE OF ORDER|CLIENT|TM ID|SKU|QUANTITY|PRICE|LOT#|DELIVERY|ADDRESS|OBSERVATIONS|\\n\";\n foreach ($this->records as $record) {\n $export .= implode(\"|\", $record) . \"|\\n\";\n }\n return $export;\n }", "title": "" }, { "docid": "8a79a672cce48fd61073b0ef0bb86ae8", "score": "0.5841577", "text": "protected function getCSVFile()\n {\n $csv = <<< CSV\nID,Name,Rating,Views\n1,Lighter,\"5,6\",\"3.230\"\n2,Chair,\"6\",\"2.093.230\"\n3,Table,\"8,0\",\"530\"\n4,Book,\"9,2\",\"76.126\"\nCSV;\n $tmpFile = tempnam(sys_get_temp_dir(), 'csvtest');\n file_put_contents($tmpFile, $csv);\n return $tmpFile;\n }", "title": "" }, { "docid": "fb086cb71eeb0baa8841fbfb21245d77", "score": "0.5827012", "text": "public function outputCSV() {\n\t\t$this->schedule->printResults('csv');\n\t}", "title": "" }, { "docid": "7617ca3df5f8a6c8942360b95e9df2d9", "score": "0.5823035", "text": "function get_export()\n{\n $table = Order::all();\n $file = fopen('file.csv', 'w');\n foreach ($table as $row) {\n fputcsv($file, $row->toarray());\n }\n fclose($file);\n //return Redirect::to('consolidated');\n}", "title": "" }, { "docid": "122d4840165773c96f9e877cddde6a24", "score": "0.5819644", "text": "public function do_export($data)\n {\n // ensure no output buffer gets into the csv.\n // league/csv apparently uses output buffering to save content of csv.\n ob_clean();\n\n $header = apply_filters('mailoptin_conversion_csv_headers', array(\n __('Campaign', 'mailoptin'),\n __('Subscriber Name', 'mailoptin'),\n __('Subscriber Email', 'mailoptin'),\n __('Custom Fields', 'mailoptin'),\n __('User Agent', 'mailoptin'),\n __('Conversion Page', 'mailoptin'),\n __('Referrer', 'mailoptin'),\n __('Date & Time', 'mailoptin')\n ));\n\n\n /** @var array $contents store array of csv content. */\n $contents = array();\n\n foreach ($data as $conversion) {\n // collect only the columns values excluding their column names.\n $conversion = array_values($conversion);\n // remove the conversion ID column (the first array value)\n unset($conversion[0]);\n // replace the second column (third before Id column removal above) i.e optin_id with optin campain name\n $conversion[1] = OptinCampaignsRepository::get_optin_campaign_name($conversion[1]);\n // remove the optin type column\n unset($conversion[2]);\n\n $contents[] = $conversion;\n }\n\n try {\n $writer = Writer::createFromFileObject(new \\SplTempFileObject()); //the CSV file will be created using a temporary File\n $writer->setNewline(\"\\r\\n\"); //use windows line endings for compatibility with some csv libraries\n $writer->insertOne($header);\n $writer->insertAll($contents);\n // Because you are providing the filename you don't have to\n // set the HTTP headers Writer::output can\n // directly set them for you\n // The file is downloadable\n $writer->output('optin-conversions-' . date('m-d-Y') . '.csv');\n die;\n } catch (\\Exception $e) {\n\n }\n }", "title": "" }, { "docid": "522ddd962cc38d767092e160260abba2", "score": "0.5815261", "text": "public function generate_csv() {\r\n\r\n // ==============got to join two tables here===============\r\n $csv_output = '';\r\n $separator = ',';\r\n global $wpdb;\r\n $table_name = $wpdb->prefix . 'dbpac_students';\r\n $enrollment_table_name = $wpdb->prefix . 'dbpac_enrollments';\r\n\r\n /*\r\n $sql = \"SHOW COLUMNS FROM $table_name\";\r\n $result = $wpdb->get_results($sql);\r\n\r\n if (count($result) > 0) {\r\n \tforeach($result as $row){\r\n \t\t$csv_output = $csv_output . $row->Field . $separator;\r\n \t}\r\n \t$csv_output = substr($csv_output, 0, -1); \r\n }\r\n $csv_output .= \"\\n\";\r\n */\r\n\r\n $csv_output .= \"user_id,user_email,user_name,student_id,first_name,last_name,dob,enrollment_id,instrument_name,division_name,song_title,composer_name,duration,group_id,fees,is_paid\"; \r\n $csv_output .= \"\\n\";\r\n\r\n $sql = \"SELECT $table_name.user_id, $table_name.student_id, $table_name.first_name, $table_name.last_name, $table_name.dob, $table_name.user_email, $table_name.user_name, $enrollment_table_name.division_name, $enrollment_table_name.instrument_name, $enrollment_table_name.composer_name, $enrollment_table_name.enrollment_id, $enrollment_table_name.song_title, $enrollment_table_name.duration, $enrollment_table_name.group_id, $enrollment_table_name.fees, $enrollment_table_name.is_paid\r\n FROM $table_name\r\n INNER JOIN $enrollment_table_name\r\n ON ($table_name.student_id = $enrollment_table_name.student_id AND $enrollment_table_name.is_enrolled = 'yes') \r\n ORDER BY $enrollment_table_name.group_id, $enrollment_table_name.user_id ASC\r\n \";\r\n\r\n //$sql = \"SELECT * FROM $table_name\";\r\n $values = $wpdb->get_results($sql);\r\n if (count($values) > 0){\r\n foreach($values as $row){\r\n \t//$fields = array_values((array) $row_value);\t\t//Getting rid of the keys and using numeric array to get values\r\n //$csv_output .= implode($separator, $fields);\t//Generating string with field separator\r\n $csv_output = $csv_output . $row->user_id . $separator;\r\n $csv_output = $csv_output . $row->user_email . $separator;\r\n $csv_output = $csv_output . $row->user_name . $separator;\r\n $csv_output = $csv_output . $row->student_id . $separator;\r\n $csv_output = $csv_output . $row->first_name . $separator;\r\n $csv_output = $csv_output . $row->last_name . $separator;\r\n $csv_output = $csv_output . $row->dob . $separator;\r\n $csv_output = $csv_output . $row->enrollment_id . $separator;\r\n $csv_output = $csv_output . $row->instrument_name . $separator;\r\n $csv_output = $csv_output . $row->division_name . $separator;\r\n $csv_output = $csv_output . $row->song_title . $separator;\r\n $csv_output = $csv_output . $row->composer_name . $separator;\r\n $csv_output = $csv_output . gmdate(\"i:s\", $row->duration) . $separator;\r\n $csv_output = $csv_output . $row->group_id . $separator;\r\n $csv_output = $csv_output . $row->fees . $separator;\r\n $csv_output = $csv_output . $row->is_paid . $separator;\r\n\r\n\r\n $csv_output .= \"\\n\";\r\n }\r\n }\r\n else {\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n $csv_output = $csv_output . 'no results return' . $separator;\r\n }\r\n \r\n return $csv_output;\r\n }", "title": "" }, { "docid": "17c11f64e35490d7dff4ab654598de2b", "score": "0.5810942", "text": "function fputcsv($handle, $fields, $delimiter = ',', $enclosure = '\"')\n{\n return 0;\n}", "title": "" }, { "docid": "df88da49ed3a262ca8c98c7d38553571", "score": "0.58047616", "text": "public function csv_rows_out() {\n\n\t\t$sep = $this->get_csv_export_separator();\n\t\t$data = $this->get_data();\n\t\t$cols = $this->get_csv_cols();\n\t\t$rows = array();\n\t\t$i = 0;\n\n\t\t// First, compile each row.\n\t\tforeach ( $data as $row ) {\n\n\t\t\tforeach ( $row as $col_id => $column ) {\n\t\t\t\t// Make sure the column is valid.\n\t\t\t\tif ( array_key_exists( $col_id, $cols ) ) {\n\t\t\t\t\t$data = str_replace( \"\\n\", \"\\r\\n\", trim( $column ) );\n\t\t\t\t\t$rows[ $i ][] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i ++;\n\t\t}\n\n\t\t// Second, now write each row.\n\t\tforeach ( $rows as $row ) {\n\t\t\tfputcsv( $this->file, $row, $sep );\n\t\t}\n\t}", "title": "" }, { "docid": "911d37ade035af5fab814869600c1d53", "score": "0.57953554", "text": "public function outputCSV($filepath, $csv)\n {\n //@codingStandardsIgnoreStart\n // Open for writing only; place the file pointer at the end of the file.\n // If the file does not exist, attempt to create it.\n $handle = fopen($filepath, \"a\");\n // for some reason passing the preset delimiter/enclosure variables results in error\n if (fputcsv($handle, $csv, ',', '\"') == 0) {\n Mage::throwException(Mage::helper('ddg')->__('Problem writing CSV file'));\n }\n\n fclose($handle);\n //@codingStandardsIgnoreEnd\n }", "title": "" }, { "docid": "b5097001889767439635bfbc566c889d", "score": "0.5786574", "text": "public function exportCsv($array2csv, $filename) {\n if (!empty($array2csv)) {\n array_unshift($array2csv, array_keys($array[0]));\n $filename = $filename;\n //write ()\n }\n }", "title": "" }, { "docid": "f14d139c7460580a010772a8f9aac79f", "score": "0.578315", "text": "public function actionExportCsv() {\n\n\t\t$begin = isset($_REQUEST['export_range_begin']) ? $_REQUEST['export_range_begin'] : '1970-01-01';\n\t\t$end = isset($_REQUEST['export_range_end']) ? $_REQUEST['export_range_end'] : '2199-12-31';\n\n\t\t// $events = $this->Event->getInRangeWithRegistrations($exportRangeBegin, $exportRangeEnd);\n //\n\t\t// $registrations = [];\n\t\t// foreach ($events as $event) {\n\t\t// \t$_registrations = $this->Registration->filter([\n\t\t// \t\t'registration_event_id' => $event['id']\n\t\t// \t])->findAll();\n\t\t// \tforeach ($_registrations as $_registration) {\n\t\t// \t\t$registrations[] = array_merge($event, $_registration);\n\t\t// \t}\n\t\t// }\n //\n\n\t\t$registrations = $this->Registration->getInRange($begin, $end);\n\n\t\t$lines = [ \"ID,Anmelde-Datum,Anrede,Vorname,Nachname,Geburtstag,Anschrift,PLZ,Stadt,Telefon,E-Mail,Mitglied im Förderverein,Veranstaltungs-ID,Veranstaltung,Kurs\\n\" ];\n\t\tforeach ($registrations as $registration) {\n\t\t\t$lines[] = sprintf(\"%u,\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",\\\"%s\\\",%u,\\\"%s\\\",\\\"%s\\\"\\n\",\n\t\t\t\t$registration['id'],\n\t\t\t\tstrftime('%d.%m.%Y %H:%M', strtotime($registration['registration_date'])),\n\t\t\t\t$registration['registration_salutation'],\n\t\t\t\t$registration['registration_firstname'],\n\t\t\t\t$registration['registration_lastname'],\n\t\t\t\tstrftime('%d.%m.%Y', strtotime($registration['registration_birthday'])),\n\t\t\t\t$registration['registration_street_address'],\n\t\t\t\t$registration['registration_zip'],\n\t\t\t\t$registration['registration_city'],\n\t\t\t\t$registration['registration_phone'],\n\t\t\t\t$registration['registration_email'],\n\t\t\t\t($registration['registration_is_member'] != 0) ? \"ja\" : \"nein\",\n\t\t\t\t$registration['registration_event_id'],\n\t\t\t\t$registration['event_title'],\n\t\t\t\t$registration['course_title']\n\t\t\t);\n\t\t}\n\n\t\t$tmpFile = tempnam(PATHTOTMP, 'reg');\n\t\t$handle = fopen($tmpFile, \"w\");\n\t\tforeach ($lines as $line) {\n\t\t\tfwrite($handle, $line);\n\t\t}\n\t\tfclose($handle);\n\n\n\t\t$this->FileHandler->handleDownload([\n\t\t\t'downloadFile' => $tmpFile,\n\t\t\t'downloadFileAlias' => sprintf('haus_st_jakobus_Anmeldungen_von_%s_bis_%s_stand_%s.csv', $begin, $end, strftime('%Y-%m-%d-%H%M')),\n\t\t\t'deleteFile' => true\n\t\t]);\n\t}", "title": "" }, { "docid": "a9928162148445f90bd59d8743b0f204", "score": "0.5782232", "text": "function generateCSVFile()\n {\n // Generate a temporary file to hold the data\n \n $this->setCSVFile(tempnam(ABSPATH .\n \"/\" . get_option('upload_path'), \"CSV\")) ;\n\n $this->setCSVFile(tempnam('', \"CSV\")) ;\n\n // Write the CSV data to the file\n\n $f = fopen($this->getCSVFile(), \"w\") ;\n fwrite($f, $this->__csvData) ;\n fclose($f) ;\n }", "title": "" }, { "docid": "584dd86e41ed0cfb7710f7bb3530fb7b", "score": "0.57811713", "text": "private function write_csv($array)\n {\n if (is_writable($this->filename)) \n { \n $handle = fopen($this->filename, 'w');\n foreach ($array as $key=>$entry) \n {\n fputcsv($handle, $entry);\n }\n fclose($handle);\n }\n return $array;\n }", "title": "" }, { "docid": "eace5b15d4332388cf4a54f102da4355", "score": "0.5779507", "text": "private function write_csv($array)\n {\n //open the file for writing\n $write = fopen($this->filename, 'w');\n //write contact to the file\n foreach ($array as $address) {\n fputcsv($write, $address);\n }\n //close the handle\n fclose($write);\n }", "title": "" }, { "docid": "193436e5c10e560c8152da5cbe5556fa", "score": "0.5779019", "text": "function genCSV($data, $f){\n foreach($data as $d){\n if(count($d) != count($data[0])){\n print \"\\nInconsistent values passed to genCSV. All arrays MUST have equal number of values.\";\n return false;\n }\n }\n\n $out = fopen($f, 'w');\n $str = \"\";\n foreach($data as $d){\n $str .= $d['header'] . \",\";\n }\n fwrite($out, trim($str, \",\") . \"\\n\");\n\n for($ii=0; $ii < count($data[0]['results']); $ii++){\n $str = \"\";\n for($jj=0; $jj < count($data); $jj++){\n $str .= $data[$jj]['results'][$ii] . \",\";\n }\n fwrite($out, trim($str, \",\") . \"\\n\");\n }\n fclose($out);\n\n return setFileAtt($f);\n}", "title": "" }, { "docid": "7187538d1b7c03a83b536b86daef6a67", "score": "0.5778323", "text": "public function putCSV(array $fields, $delimiter=',', $enclosure='\"');", "title": "" }, { "docid": "1b1529085ee29f1257e6db0a0815aacb", "score": "0.577549", "text": "private function genCsv($query, $intestazione, $fileName) {\n\ttry {\n\t $connection = Yii::app()->db;\n\t $command = $connection->createCommand($query);\n\t $dati = $command->query();\n\t $fname = tempnam(\"/tmp\", $fileName);\n\t $NewFile = fopen($fname, \"w\");\n\t fwrite($NewFile, \"\\xEF\\xBB\\xBF\"); // UTF-8 BOM\n// \t\tCicla i risultati\n\t foreach ($dati as $key => $row) {\n\t\tif ($key == 0 && $intestazione == 'si') {\n// \t\t\t\tSe si � scelto di inserire anche l'intestazione\n\t\t $testa = \"\";\n\t\t foreach ($row as $nomeCampo => $valore) {\n\t\t\t$testa = $testa . $nomeCampo . \"|\";\n\t\t }\n\t\t $testa = substr($testa, 0, -1) . \"\\n\";\n\t\t fwrite($NewFile, $testa);\n\t\t}\n\n// \t\t\tCicla i valori\n\t\t$csv = \"\";\n\t\tforeach ($row as $nomeCampo => $valore) {\n\t\t $csv = $csv . $valore . \"|\";\n\t\t}\n\t\t$csv = substr($csv, 0, -1) . \"\\n\";\n\t\tfwrite($NewFile, $csv);\n\t }\n\n\t fclose($NewFile);\n\t header('Pragma: public');\n\t header('Expires: 0');\n\t header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t header(\"Content-Type: text/csv; name=\\\"$fileName\\\"\");\n\t header(\"Content-Disposition: attachment; filename=\\\"$fileName\\\"\");\n\t header(\"Content-Transfer-Encoding: binary\");\n\t header(\"Content-Length: \" . filesize($fname));\n\t header(\"Connection: Close\");\n\t readfile($fname);\n\t} catch (CDbException $e) {\n\t throw new CHttpException(500, 'Database error: ' . $e->getMessage());\n\t}\n }", "title": "" }, { "docid": "1d7392fc27429b521e786255516acd41", "score": "0.5771557", "text": "function array_to_csv_download($similarwords) {\n\t\theader('Content-type: text/csv');\n\t\theader('Content-Disposition: attachment; filename=\"risultato.csv\"');\n\t\t \n\t\t// do not cache the file\n\t\theader('Pragma: no-cache');\n\t\theader('Expires: 0');\n\t\t \n\t\t// create a file pointer connected to the output stream\n\t\t$file = fopen('php://output', 'w');\n\n\t\t// save the column headers\n\t\tfputcsv($file, array('Link1', 'Link2', 'percentuale'));\n\n\t\tforeach ($similarwords as $elemento) {\n\n\t\t\tfputcsv($file, $elemento);\n\t\t\t\n\t\t}\n\t\t\n\t\tfclose($file);\n\t}", "title": "" }, { "docid": "1cffcec2761c47380f880ea678d8718b", "score": "0.5768704", "text": "public function exportcsv()\n {\n $donors = Donor::get();\n $donor_array = array();\n $row = 0;\n foreach($donors as $donor){\n $donor_array[$row] = [ \n 'NAME' => $donor->name,\n 'ADDRESS' => $donor->address,\n 'PHONE NO' => $donor->phoneno,\n 'EMAIL' => $donor->email,\n 'OCCUPATION' => $donor->occupation,\n 'OCCUPATION DETAILS' => $donor->occupation_details,\n 'PANNO' => $donor->panno,\n 'OTHERS' => $donor->others\n ]; \n $row++;\n }\n Excel::create('Donor', function($excel) use($donor_array) {\n $excel->sheet('Donor', function($sheet) use($donor_array) { \n $sheet->fromArray(\n $donor_array\n );\n $sheet->setStyle(array(\n 'font' => array(\n 'name' => 'Calibri',\n 'size' => 12,\n 'bold' => true\n )\n ));\n $sheet->setAllBorders('thick'); \n $sheet->setAutoSize(true); \n });\n })->export('xlsx'); \n }", "title": "" }, { "docid": "f1241ef8e54666339ab4df88a1706200", "score": "0.57643056", "text": "public function exportCSV()\n {\n //Get columns and data.\n $data = $this->data;\n $columns = $this->columns;\n\n //Create a CSV file due to data.\n $callback = function() use ($data, $columns)\n {\n $file = fopen('php://output', 'w');\n //Write first column names.\n fputcsv($file, $columns);\n foreach($data as $d) {\n //Write each row due to income data.\n fputcsv($file,$d);\n }\n fclose($file);\n };\n return Response::stream($callback, 200, $this->headers);\n }", "title": "" }, { "docid": "eed4a94b43cd1d5d05553ecbdd7f69f6", "score": "0.57600224", "text": "protected function createCSVReport()\n {\n // paid users csv\n $paidUsers = $this->getBaseQuery()->whereHas('subscription', function ($query) {\n $query->where('subscription.subscription_type_id', 1);\n })->get();\n\n $this->generateUserCsv($paidUsers, 'paid_user.csv');\n\n // active trials users csv\n $activeTrials = $this->getBaseQuery()->whereHas('subscription', function ($query) {\n $query->where('subscription.subscription_type_id', '!=', 1)\n ->where('expiry', '>=', Carbon::today());\n })\n ->doesnthave('subscription', 'and', function ($query) {\n $query->where('subscription.subscription_type_id', 1);\n })\n ->get();\n $this->generateUserCsv($activeTrials, 'active_trials.csv');\n\n // Only Signed up User csv\n $onlySignedUp = $this->getBaseQuery()->doesntHave('subscription')\n ->get();\n $this->generateUserCsv($onlySignedUp, 'only_signed_up.csv');\n\n // Trail Expired Users csv\n $trailExpired = $this->getBaseQuery()->whereHas('subscription', function ($query) {\n $query->where('subscription.subscription_type_id', '!=', 1)\n ->where('expiry', '<', Carbon::today());\n })\n ->doesnthave('subscription', 'and', function ($query) {\n $query->where('subscription.subscription_type_id', 1);\n })\n ->get();\n\n $this->generateUserCsv($trailExpired, 'trail_expired.csv');\n\n // all users csv\n $allUsers = $this->getBaseQuery()\n ->get();\n $this->generateUserCsv($allUsers, 'all_user.csv');\n }", "title": "" }, { "docid": "1baead971c187ce15d7eeacad14e59c1", "score": "0.57538646", "text": "public function writeProductos(){\n $contadorProducto = 0;\n $output = fopen('products_import.csv', 'w');\n $vector = array();\n array_push($vector,$this->getVectorLabelProductos());\n //var_dump($this->productos);\n foreach($this->productos[\"id\"] as $producto){\n $imagenes = '';\n foreach($this->productos[\"imagenes\"][$contadorProducto] as $imagen){\n $imagenes.= $imagen.';';\n }\n $imagenes = substr($imagenes,0,strlen($imagenes)-1);\n $vectorProductos = array(\n $producto,\n 1,\n $this->productos[\"titulo\"][$contadorProducto],\n $this->productos[\"idCategoria\"][$contadorProducto],\n $this->productos[\"precio\"][$contadorProducto],\n 31,\n $this->productos[\"precio\"][$contadorProducto],\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n $producto,\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n 100,\n 1,\n \"both\",\n \"\",\n \"\",\n \"\",\n $this->productos[\"shortDesc\"][$contadorProducto],\n $this->productos[\"desc\"][$contadorProducto],\n $this->productos[\"titulo\"][$contadorProducto],\n $this->productos[\"titulo\"][$contadorProducto],\n $this->productos[\"titulo\"][$contadorProducto],\n $this->productos[\"shortDesc\"][$contadorProducto],\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n $imagenes,\n \"\",\n \"\", // Caracteristicas\n 1,\n \"new\",\n \"0\",\n \"0\",\n \"0\",\n \"0\",\n \"1\",\n \"\",\n \"\",\n \"\"\n );\n array_push($vector,$vectorProductos);\n $contadorProducto++;\n }\n foreach($vector as $field){\n fputcsv($output, $field,',');\n }\n fclose($output);\n //var_dump($this->productos);\n echo \"Generados productos<br>\";\n }", "title": "" }, { "docid": "8f9344c4e64504daf0af5ccd1f8d6776", "score": "0.57531875", "text": "public function toCsv(): string\n {\n $items = $this->itemRepository->all();\n @unlink(base_path('temp/pdf_to_csv.csv'));\n\n $file = fopen($this->fileName, 'w');\n fputcsv($file, array_keys($items[0]));\n\n foreach ($items as $item) {\n fputcsv($file, array_values($item));\n }\n\n fclose($file);\n\n return $this->fileName;\n }", "title": "" }, { "docid": "73fff97c8b9b5347f5ef5fef590ce3af", "score": "0.5746296", "text": "public function exportdata()\n {\n $sth = $dbh->prepare(\"SELECT matricule, nom, prenom,email FROM employes LIMIT 200\");\n //because we don't want to duplicate the data for each row\n // PDO::FETCH_NUM could also have been used\n $sth->setFetchMode(PDO::FETCH_ASSOC);\n $sth->execute();\n\n //we create the CSV into memory\n $csv = Writer::createFromFileObject(new SplTempFileObject());\n\n //we insert the CSV header\n $csv->insertOne(['matricule', 'nom', 'prenom','email']);\n\n // The PDOStatement Object implements the Traversable Interface\n // that's why Writer::insertAll can directly insert\n // the data into the CSV\n $csv->insertAll($sth);\n\n // Because you are providing the filename you don't have to\n // set the HTTP headers Writer::output can\n // directly set them for you\n // The file is downloadable\n $csv->output('Employes.csv');\n die;\n return view('reportings/exportdata',['csv' => $csv]);\n\n}", "title": "" }, { "docid": "f7332396e6f5c87797aa06537f789e6d", "score": "0.5742727", "text": "public function output()\n {\n //$output = chr(239) . chr(187) . chr(191);\n $output = '';\n foreach ($this->data as $row) {\n $quoted_data = array_map(array('CSV_Writer', 'wrap_with_quotes'), $row);\n $output .= sprintf(\"%s\\n\", implode($this->deliminator, $quoted_data));\n }\n// echo $output;\n $name = $this->name;\n $name = str_replace(\" \", \"-\", $name);\n $name = preg_replace('/[^[email protected]_]/', '', $name);\n $name = $name . '-' . time() . '.csv';\n $temp = $this->CI->config->item('admin_upload_temp_path');\n if(!is_dir($temp)){\n mkdir($temp, 0777);\n chmod($temp, 0777);\n }\n $path = $temp . $name;\n $fp = fopen($path, 'w+');\n fwrite($fp, $output);\n fclose($fp);\n $this->download($path);\n unlink($path);\n }", "title": "" }, { "docid": "ce9c542fae6248d2d51a16b5c2bcd8a4", "score": "0.5741067", "text": "private function writeCsv($data)\n {\n $csvDirectory = Mage::getBaseDir('var') . DS . 'import';\n if(is_dir($csvDirectory) == false) {\n $file = new Varien_Io_File();\n if ($file->mkdir($csvDirectory, 0777, true) == false) {\n Mage::log('Directory var/import doesn\\'t exist and automatic creation failed.', null, 'process_stock_cron.log');\n }\n }\n $filePath = $csvDirectory . DS . 'stock.csv';\n $csvHeaders = array('sku', 'qty', 'plant_grade', 'manage_stock');\n\n $csvFile = fopen($filePath, 'w');\n fputcsv($csvFile, $csvHeaders);\n\n foreach ($data as $item) {\n fputcsv($csvFile, $item);\n }\n\n fclose($csvFile);\n }", "title": "" }, { "docid": "068dfe3c0672b3e1b07b2dab2b5498d1", "score": "0.5737753", "text": "function arrayToCsv(array $data,$new_file_name,$mode = \"a+\"){\n $fp = fopen($new_file_name.\".csv\",$mode);\n foreach($data as $v) {\n if(is_string($v)) {$v = array($v);}\n foreach($v as &$sub_v) {\n $sub_v = str_replace(array(\"\\n\", \"\\r\", \"\\t\", \"\\r\\n\"), \"<br>\", $sub_v);\n }\n\n fputcsv($fp,$v);\n }\n return;\n}", "title": "" }, { "docid": "c2fc65420f58e756fe91752864ba31e7", "score": "0.5736411", "text": "function between_dates_csv($date1,$date2){ \n\t\t$res = afficher_absence_entredate($date1,$date2);\n\t\theader('Content-Type: application/csv-tab-delimited-table');\t\n\t\theader('Content-disposition: filename=absence_'.date('Y-m-d').'.csv');//nommage du fichier avec la date du jour\n\t\techo 'La liste des absents entre '.$date1.' et '.$date2.\"\\n\";\n\n\t\t//Premiere ligne avec le noms des colonnes\n\t\techo '\"Nom\";\"Prénom\";\"Email\";\"Matiere\";\"Date\";\"Matin/Aprés-midi\"'.\"\\n\";\n\t\t \n\t\twhile($a=$res->fetch(PDO::FETCH_OBJ))\n\t\t{\n\t\techo '\"'.$a->nom.'\";\"'.$a->prenom.'\";\"'.$a->email.'\";\"'.$a->matiere.'\";\"'.$a->date.'\";\"'.$a->quand.\"\\n\";\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "393ac76580b21b02bf8311b4bc9c4fd0", "score": "0.57325935", "text": "public function csv_cols_out() {\n\n\t\t$sep = $this->get_csv_export_separator();\n\t\t$cols = $this->get_csv_cols();\n\n\t\tfputcsv( $this->file, $cols, $sep );\n\t}", "title": "" }, { "docid": "cf1023d424dae6217d162c64fda476d5", "score": "0.57312983", "text": "private function write_csv($array){\n // Code to write $addresses_array to file $this->filename\n $handle = fopen($this->filename, \"w\");\n foreach($array as $fields) {\n fputcsv($handle, $fields);\n }\n fclose($handle);\n }", "title": "" }, { "docid": "5c7b22ca80c121b5a0ffd88b18445fd0", "score": "0.57308954", "text": "public function exportCsvAction() {\n $fileName = 'adjustment.csv';\n $content = $this->getLayout()\n ->createBlock('inventoryplus/adminhtml_adjuststock_listadjuststock_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" }, { "docid": "f0d09369c0f679785169660d45a58e0d", "score": "0.5721116", "text": "protected function getCsvFile()\n {\n $csv = <<< CSV\nID,Name,Stock\n1,Lighter,12\n2,Chair,\"15.000\"\n3,Table,\"14,4\"\n4,Book,7\nCSV;\n $tmpFile = tempnam(sys_get_temp_dir(), 'csvtest');\n file_put_contents($tmpFile, $csv);\n return $tmpFile;\n }", "title": "" }, { "docid": "f3ff5808a9779901726e395666e604c7", "score": "0.57197034", "text": "function toCSV($data) {\n $output = fopen(\"php://output\", \"wb\");\n foreach ($data as $row) {\n fputcsv($output, $row);\n }\n fclose($output);\n}", "title": "" }, { "docid": "97c1687917ed49ce59e34d57c2cf0987", "score": "0.5718675", "text": "public function exportCsvAction()\n\t\t{\n\t\t\t$fileName = 'quickreorder.csv';\n\t\t\t$grid = $this->getLayout()->createBlock('quickreorder/adminhtml_quickreorder_grid');\n\t\t\t$this->_prepareDownloadResponse($fileName, $grid->getCsvFile());\n\t\t}", "title": "" }, { "docid": "a933f4f9f1e36abd0aaac8a79d20d3c9", "score": "0.5712797", "text": "protected function writeCsv($filename, array $content) {\n $handler = fopen($filename, 'w');\n // Write the UTF-8 BOM header so excel handles the encoding.\n fprintf($handler, chr(0xEF) . chr(0xBB) . chr(0xBF));\n foreach ($content as $row) {\n fputcsv($handler, $row);\n }\n fclose($handler);\n }", "title": "" }, { "docid": "1515151bb1bd2e18d9331ee99b006292", "score": "0.57124335", "text": "public function writeCategorias(){\n $contador = 0;\n $contadorCategoria = 3;\n $output = fopen('categorias_import.csv', 'w');\n $vector = array();\n array_push($vector,$this->getVectorLabelCategorias());\n foreach($this->nombresCategorias as $categoria){\n $id = $contadorCategoria;\n $active = 1;\n $nombre = $categoria;\n $parent = 2;\n $root = 0;\n $description = $categoria;\n $metatitulo = $categoria;\n $matakeywords = $categoria;\n $metadescription = $categoria;\n $urlrewritten = $categoria;\n $imageurl = $this->imagenesCategorias[$contadorCategoria];\n $vectorTemp = array($id,$active,$nombre,$parent,$root,$description,$metatitulo,$matakeywords,$metadescription,$urlrewritten,$imageurl);\n array_push($vector,$vectorTemp);\n $contadorCategoria++;\n }\n foreach($vector as $field){\n fputcsv($output, $field,',');\n }\n fclose($output);\n //var_dump($this->nombresCategorias);\n echo \"Generadas categorias<br>\";\n }", "title": "" }, { "docid": "b4e81cd57a4b2c8fff35bdec0abd6da2", "score": "0.5709217", "text": "public function exportCsvFile($postArr){\n\t\t$fieldArr = array('occid','occurrenceID','catalogNumber','otherCatalogNumbers','family','sciname','genus','specificEpithet','taxonRank',\n\t\t'infraspecificEpithet','scientificNameAuthorship','taxonRemarks','identifiedBy','dateIdentified','identificationReferences',\n\t\t'identificationRemarks','identificationQualifier','typeStatus','recordedBy','recordNumber','associatedCollectors','eventDate',\n\t\t'year','month','day','verbatimEventDate','habitat','substrate','fieldnumber','occurrenceRemarks','informationWithheld',\n\t\t'associatedOccurrences','associatedTaxa','dynamicProperties','verbatimAttributes','behavior','reproductiveCondition','cultivationStatus',\n\t\t'establishmentMeans','lifeStage','sex','individualCount','samplingProtocol','samplingEffort','preparations','country','stateProvince',\n\t\t'county','municipality','locality','decimalLatitude','decimalLongitude','geodeticDatum','coordinateUncertaintyInMeters','locationRemarks',\n\t\t'verbatimCoordinates','minimumElevationInMeters','maximumElevationInMeters','verbatimElevation','minimumDepthInMeters',\n\t\t'maximumDepthInMeters','verbatimDepth','dateEntered','dateLastModified');\n\t\t$fileName = 'specimenOutput_'.time().'.csv';\n\t\theader ('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n\t\theader ('Content-Type: text/csv');\n\t\theader ('Content-Disposition: attachment; filename=\"'.$fileName.'\"');\n\t\t$sql = 'SELECT '.implode(',',$fieldArr).' FROM omoccurrences WHERE occid IN() ';\n\t\t$rs = $this->conn->query($sql);\n\t\tif($rs->num_rows){\n\t\t\t$out = fopen('php://output', 'w');\n\t\t\techo implode(',',$fieldArr).\"\\n\";\n\t\t\twhile($r = $rs->fetch_assoc()){\n\t\t\t\tfputcsv($out, $r);\n\t\t\t}\n\t\t\tfclose($out);\n\t\t}\n\t\telse{\n\t\t\techo \"Recordset is empty.\\n\";\n\t\t}\n\t\t$rs->free();\n\t}", "title": "" }, { "docid": "c0b76e86527a40a8da3824dd843de443", "score": "0.57027966", "text": "public function setup_csv() {\n\t\t$this->use_first_row_as_header();\n\t}", "title": "" }, { "docid": "443c36844e93703f596a2b217b49e823", "score": "0.5690108", "text": "function outputCSV($data) \n{\n $outstream = fopen(\"php://output\", \"w\");\n function __outputCSV(&$vals, $key, $filehandler) \n\t{\n fputcsv($filehandler, $vals);\n }\n array_walk($data, \"__outputCSV\", $outstream);\n fclose($outstream);\n}", "title": "" }, { "docid": "5d7f6cd57a1e13f9e446e54a2067c1f7", "score": "0.56851643", "text": "public function export_csv(){\n\t$this->load->dbutil();\n\n\t$query = $this->transaksi_model->get_columns();\n\t$data = $this->dbutil->csv_from_result($query);\n\n\t$dbname='exp-' . date(\"Y-m-d-H-i-s\") . '.csv';\n\t$this->load->helper('download');\n\tforce_download($dbname, $data);\n }", "title": "" }, { "docid": "4dab6f10053fa82111c72640012132c8", "score": "0.56809735", "text": "public function render_section_csv($sectiontitle, $report, $head, $rows, $fields)\n {\n $name = clean_param($sectiontitle, PARAM_FILE);\n $name = preg_replace(\"/[^A-Z0-9]+/i\", \"_\", trim($name));\n $quote = '\"';\n $delim = \",\";//\"\\t\";\n $newline = \"\\r\\n\";\n\n header(\"Content-Disposition: attachment; filename=$name.csv\");\n header(\"Content-Type: text/comma-separated-values\");\n\n //echo header\n $heading = \"\";\n foreach ($head as $headfield) {\n $heading .= $quote . $headfield . $quote . $delim;\n }\n echo $heading . $newline;\n\n\n //echo data rows\n $handle = fopen('php://output', 'w+');\n foreach ($rows as $row) {\n $rowarray=[];\n foreach ($fields as $field) {\n $rowarray[]= $row->{$field};\n }\n //for UTF 8 encoding\n fprintf($handle, chr(0xEF).chr(0xBB).chr(0xBF));\n fputcsv($handle, $rowarray,$delim,$quote);\n }\n fclose($handle);\n //After file is created, die\n die();\n }", "title": "" }, { "docid": "89da5e2f84a7e1a17cc7aa44b1205007", "score": "0.56794256", "text": "function writeCsv( array $data, $filename, $path = null, $appendDate = true )\n{\n if( empty( $data ) )\n {\n return false;\n }\n\n /* display field/column names as first row */\n $csvOutput = arrayToCsv( $data );\n\n /* create path and filename */\n if( $appendDate === true )\n {\n $filename = sprintf( '%s/%s.%s.csv', realpath( $path ), $filename, date( 'Y-m-d' ) );\n }\n else\n {\n $filename = sprintf( '%s/%s.csv', realpath( $path ), $filename );\n }\n\n if( false !== file_put_contents( $filename, $csvOutput ) )\n {\n return $filename;\n }\n\n return false;\n}", "title": "" }, { "docid": "7b44a03ba2d4c67ac9e16cda9e7c47d6", "score": "0.5673854", "text": "public function getCsv();", "title": "" }, { "docid": "a10612c8ba9f564985dcb01415591d42", "score": "0.5666787", "text": "function php_report_export_csv(&$report) {\n $this->report =& $report;\n }", "title": "" }, { "docid": "0c39af7611eaaee41460d2719023c906", "score": "0.5666316", "text": "private function write_csv($array)\n {\n // address book\n $handle = fopen($this->filename,'w');\n foreach ($array as $entry) {\n fputcsv($handle, $entry);\n }\n fclose($handle);\n }", "title": "" }, { "docid": "928c6e4bd990749be2b4d3676e1e10e5", "score": "0.5664807", "text": "private function outputcsv($list) {\n $file = fopen(\"Output.csv\", \"w\");\n\n foreach ($list as $line) {\n fputcsv($file, explode(',', $line));\n }\n\n if(fclose($file)){\n session_start();\n $_SESSION[\"message\"] = \"<h3 style='color:green'>Output.csv has been updated successfully.</h3>\";\n header(\"Location:index.php\");\n }\n }", "title": "" }, { "docid": "6b7ecaab77f3882c1bf437046ce01914", "score": "0.5659492", "text": "public function exportCsvAction()\n {\n $fileName = 'cofa.csv';\n $content = $this->getLayout()->createBlock('bs_cofa/adminhtml_cofa_grid')\n ->getCsv();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "title": "" } ]
042f709fb3bdcc6ef24f5fbb5043bb3e
Get the lives for the cmsuser/artist.
[ { "docid": "bd28eaeff3e305de2275871e5b562946", "score": "0.5217463", "text": "public function lives() {\n return $this->hasMany('App\\Models\\Live');\n }", "title": "" } ]
[ { "docid": "da3f458b94a10b73da036e66fcd7f194", "score": "0.57191145", "text": "public function getArtists()\n {\n return $this->_artists;\n }", "title": "" }, { "docid": "4daa9620e3fbcc1f2e7ff4c4b256fcd1", "score": "0.5336711", "text": "public function artists()\n {\n $artists = Artist::where('verified', true)->get();\n\n return view('pages.artists', ['artists'=> $artists]);\n }", "title": "" }, { "docid": "63c20f17706797a9bce3640f5dbfd2df", "score": "0.5294649", "text": "public function findLiveLoans()\n {\n return $this->em->getRepository('MarketplaceBundle\\Entity\\Loan')->findBy(\n array('live' => true),\n array('creationDate' => 'DESC')\n );\n }", "title": "" }, { "docid": "9658c84f366c1c093fa7ff0e577fe84f", "score": "0.5238", "text": "function timj_get_lastfm_loved_tracks($lastFMUsername) {\n $lovedTracksURL = sprintf(\n 'http://ws.audioscrobbler.com/2.0/?method=user.getlovedtracks&user=%s&limit=%d&api_key=%s&format=json',\n $lastFMUsername,\n FOLLOWER_TRACK_LIMIT,\n LASTFM_API_KEY\n );\n\n $contents = timj_file_get_contents($lovedTracksURL);\n $response = json_decode($contents, true);\n\n if ( ! isset($response['lovedtracks']) || ! isset($response['lovedtracks']['track'])) {\n return array();\n }\n\n $tracks = $response['lovedtracks']['track'];\n $result = array();\n\n foreach ($tracks as $track) {\n $result[] = array(\n $track['artist']['name'],\n $track['name'],\n );\n }\n\n return $result;\n}", "title": "" }, { "docid": "921bc31a1a5884b38a3229c42d6b648c", "score": "0.523508", "text": "public function getLife()\n {\n return $this->life;\n }", "title": "" }, { "docid": "ed11e3400b0a638142667a32d09d66ac", "score": "0.5206721", "text": "public function getAssists()\n {\n return $this->getProperty('assists', 'int');\n }", "title": "" }, { "docid": "3cb2e40421be320684e75b298f9e4d99", "score": "0.5205254", "text": "public function getSlaves();", "title": "" }, { "docid": "3cb2e40421be320684e75b298f9e4d99", "score": "0.5205254", "text": "public function getSlaves();", "title": "" }, { "docid": "fa4a53400c18ee78e9ac34637a53b219", "score": "0.51487666", "text": "public function getArtistList(){\n return $this->_artistRepository->getAllArtistList();\n }", "title": "" }, { "docid": "00fbcc740cbdca72205013b42f4aa2f3", "score": "0.5074807", "text": "public function getArtist()\r\n {\r\n return $this->artist;\r\n }", "title": "" }, { "docid": "fee72a01065b28c3c9d495d819110db9", "score": "0.50440806", "text": "function user_artist_list($userObj_or_id, $options = array()) {\n if(!$userObj_or_id) return [];\n $userObj = any2obj('user', $userObj_or_id);\n $artist_ids = [];\n //if($userObj->user_level >= USER_LEVEL_CURATOR || !user_has_role($userObj, USER_ROLE_CURATOR)) return [];\n if($userObj->user_level >= USER_LEVEL_ARTIST || user_has_role($userObj, USER_ROLE_ARTIST)){\n $artist_ids[] = $userObj->id; // this user is a artist\n } \n\n if($mapObjs = find_objects('user_map', ['user_id' => $userObj->id, 'verified' => 1, 'active' => 1])) {\n //$artist_ids = array();\n foreach($mapObjs as $mapObj) {\n \n $perms = json_decode($mapObj->permissions);\n $edit = $perms ? $perms->vault : '';\n if($edit == 'edit') $artist_ids[] = $mapObj->host_user_id;\n }\n }\n return $artist_ids;\n}", "title": "" }, { "docid": "a547d449350f21b203fdce3d957363b8", "score": "0.50101715", "text": "public function getArtist()\n {\n return $this->artist;\n }", "title": "" }, { "docid": "a547d449350f21b203fdce3d957363b8", "score": "0.50101715", "text": "public function getArtist()\n {\n return $this->artist;\n }", "title": "" }, { "docid": "dbae81a40694e019d19353264858370e", "score": "0.49788606", "text": "public function getArtist() {\n $aaUArt = $this->getAll([[\"sName\",$this->sName],['sUserId',$this->sUserId]]);\n $this->iId = $aaUArt[0][0];\n $this->oArtist = new Artist();\n $aaArtist = $this->oArtist->getAll([[\"sName\",$this->sName]]);\n $this->oArtist->iId = $aaArtist[0][0];\n $this->oArtist->sName = $aaArtist[0][1];\n $this->oArtist->iGrades = $aaArtist[0][2];\n $this->oArtist->aGradesOvr = array(\n \"iLyric\" => $aaArtist[0][3],\n \"iContent\" => $aaArtist[0][4],\n \"iProd\" => $aaArtist[0][5],\n \"iCareer\" => $aaArtist[0][6],\n \"iInfluence\" => $aaArtist[0][7],\n \"iOriginal\" => $aaArtist[0][8],\n \"iOverall\" => $aaArtist[0][9]\n );\n }", "title": "" }, { "docid": "e96898c958d357205d4b6a59183e923d", "score": "0.4956128", "text": "public function artists_created()\n\t{\n\t\treturn $this->hasMany('App\\Models\\TagObjects\\Artist\\Artist', 'created_by');\n\t}", "title": "" }, { "docid": "fa346369caf563c46de95c633535f080", "score": "0.49442628", "text": "function getArtist()\n\t{\n\t\treturn $this->_artist;\n\t}", "title": "" }, { "docid": "d1eaf489380caa24578322c44a024716", "score": "0.49335", "text": "public function getLived() : int\n {\n return $this->raw_data['lived'];\n }", "title": "" }, { "docid": "182dd28ab86010ec145b16f07164bbf9", "score": "0.49330932", "text": "public function getArtist() {\n\t\treturn $this->artist;\n\t}", "title": "" }, { "docid": "bae928b288db893f7951fa476e39a6ad", "score": "0.49104655", "text": "public function artists(Request $request) {\n $user = JWTAuth::parseToken()->authenticate();\n\n if (Gate::forUser($user)->allows('statistics', null)) {\n $validator = Validator::make($request->all(), $this->validations);\n\n if ($validator->fails()) {\n return response()->json([\n 'success'=> false,\n 'errors' => $validator->errors()->all()\n ], 400);\n }\n\n $to = Carbon::now();\n $from = Carbon::now()->subYear();\n $limit = 10;\n \n if ($request->has('from')) {\n $from = $request->input('from');\n }\n\n if ($request->has('to')) {\n $to = $request->input('to');\n }\n \n if ($request->has('limit')) {\n $limit = $request->input('limit');\n }\n\n $artists = User::popularBetween($from, $to)->take($limit)->get();\n\n return response()->json([\n 'success' => true,\n 'artists' => $this->userSerializer->list($artists, ['basic', 'stats']),\n ]);\n }\n\n return response()->json([\n 'success' => false,\n 'errors' => ['Not authorized to get statistics'],\n ], 403);\n }", "title": "" }, { "docid": "62e548b3e7fca2f7f8759e2e3dfd7dd1", "score": "0.49043825", "text": "protected function getAllArtists()\n {\n $alldata = $this->getArtists();\n $headerhtml = './templates/header.html';\n $header = file_get_contents($headerhtml);\n $values = array('[+title+]', '[+heading+]', '[+3+]');\n $replacements = array($this->phrases['artists_title'], $this->phrases['artists_heading'], 'current');\n $content = '';\n $content .= printTemplate($values, $replacements, $header);\n\n $content .= $this->getSongArtistCount();\n $file = './templates/artistlist.html';\n\n $tpl = file_get_contents($file);\n $values = ['[+artist+]', '[+count+]'];\n $content .= printTemplateArray($values, $alldata, $tpl);\n\n $footer = './templates/footer.html';\n $content .= file_get_contents($footer);\n return $content;\n }", "title": "" }, { "docid": "2f82400e31f1c9aed34fd196223d34fa", "score": "0.4900012", "text": "public function getLife(){\r\n\r\n\t\t$life = new stdClass();\r\n\r\n\t\t/* Check privacy */\r\n\t\tif ($this->userProfileLife){\r\n\r\n\t\t\t/* Get data */\r\n\t\t\tforeach(array('statement', 'interests', 'destress', 'book', 'movie') as $var){\r\n\t\t\t\t$life->$var = $this->$var;\r\n\t\t\t}\r\n\t\t\t$life->website = $this->url;\r\n\t\t\t$life->advice = $this->bestadvice;\r\n\t\t\t$life->adjective = $this->describeyourself;\r\n\r\n\t\t} else {\r\n\r\n\t\t\t/* User chose to keep information hidden. */\r\n\t\t\t$life = false;\r\n\r\n\t\t}\r\n\r\n\t\t/* Return data */\r\n\t\treturn $life;\r\n\r\n\t}", "title": "" }, { "docid": "e69ca0d710345884903b44b7896fd217", "score": "0.4878808", "text": "protected function getSongArtistCount()\n {\n $datas = $this->getCount();\n $content = '';\n $file = './templates/countlist.html';\n $tpl = file_get_contents($file);\n $values = ['[+artist+]', '[+song+]'];\n $content = printTemplateArray($values, $datas, $tpl);\n\n return $content;\n }", "title": "" }, { "docid": "5be4800e3d60e188aaad9047a20594af", "score": "0.48720884", "text": "public function getArtistTracksAttribute(){\n return $this->artistTracks()->paginate(config('contus.audio.audio.record_per_page'));\n }", "title": "" }, { "docid": "b22381e059429a45467fa6662414d446", "score": "0.4839171", "text": "public function artists(){\n if(auth()->user()->usertype == 'admin'){\n $artists = User::where('usertype','=','artist')->get();\n return view('arts.artist.index',compact('artists'));\n \n }else{\n return '404';\n }\n \n \n }", "title": "" }, { "docid": "2bc5550219a227bcc717ae67cbd9e2d4", "score": "0.48282647", "text": "public function getsongArtist()\n {\n return new Artist($this->con, $this->artisId);\n }", "title": "" }, { "docid": "c7537d0251910a44524fa66431a03d19", "score": "0.4776991", "text": "public function getArtist()\r\n {\r\n return $this->getAdapter()->getArtist();\r\n }", "title": "" }, { "docid": "2c4046070637d8d828ede204962a06e3", "score": "0.47753364", "text": "public function get(ArtistIdentity $identity);", "title": "" }, { "docid": "0d433c65c5c0d06240ab4c25e7f5c4b4", "score": "0.47408625", "text": "public function index()\n\t{\n\t\treturn $this->auth->user()->articles;\n\t}", "title": "" }, { "docid": "69e3c5f4c2e26e07c479f96bff4c3700", "score": "0.47380486", "text": "public function view_all_artist() {\n $artists = Profile::where('Type','Artist')->paginate(12);;\n\n $artist_data['artist'] = $artists;\n return view('frontend.viewAllArtist',$artist_data);\n }", "title": "" }, { "docid": "edafdf8f67f90bf0896cfdf88303344a", "score": "0.47342554", "text": "public function getDisplayArtist()\n {\n return $this->displayArtist;\n }", "title": "" }, { "docid": "edafdf8f67f90bf0896cfdf88303344a", "score": "0.47342554", "text": "public function getDisplayArtist()\n {\n return $this->displayArtist;\n }", "title": "" }, { "docid": "32353df410c41eb1916e7e6f610c0dd2", "score": "0.471987", "text": "function getLove()\n {\n return $this->love;\n }", "title": "" }, { "docid": "4438e89bc118bd5d8f1e9250da0b7032", "score": "0.47155133", "text": "public function getArtistas() {\r\r\n $listado = $this->bd->get_results(\"SELECT DISTINCT artist_name FROM tb_tracks ORDER BY artist_name ASC\");\r\r\n return $listado;\r\r\n }", "title": "" }, { "docid": "f35ec57ed3b4963fa6954d42060ff124", "score": "0.46933183", "text": "public function getLiveries() {\r\n \r\n return Utility\\LocomotiveUtility::getLiveriesForLocomotiveClass($this->id); \r\n \r\n }", "title": "" }, { "docid": "cf823fd791516c1a73d83e82cd6ba342", "score": "0.46915063", "text": "public function index()\n {\n $artists = User::with('media')\n ->whereNotNull('artist_verified_at')\n ->get();\n\n return Inertia::render('Artists/List', compact('artists'));\n }", "title": "" }, { "docid": "cb5b0d59020758dfd1ce8fd41bfd3107", "score": "0.46844086", "text": "public function index()\n {\n $leagues = Auth::user()->player()->first()->leagues()->get();\n return $leagues;\n }", "title": "" }, { "docid": "d950aaac1d155e1516d00bb0da0d6e31", "score": "0.46573067", "text": "public function getLove()\n {\n return $this->_love;\n }", "title": "" }, { "docid": "57b7a607ac047f8dfbf7bbcab1ce67b0", "score": "0.46514592", "text": "public function getArtist($user_id){\n\t\tglobal $con;\n\t\t$query=\"SELECT * FROM subscribers\n\t\t\t\tWHERE user_id=\\\"$user_id\\\"\n\t\t\t\tLIMIT 1\";\n\t\t$artist=\"\";\n\t\t$result=array();\n\t\t$result=$this->select($con,$query);\n\t\tforeach ($result as $key => $value) {\n\t\t\t$artist=$value['names'];\n\t\t}\n\n\t\treturn $artist;\n\t}", "title": "" }, { "docid": "0a2678e5f3dc194069c60279a76e4a25", "score": "0.46458286", "text": "public function an_user_can_see_his_own_servers()\n {\n $user = factory(User::class)->create();\n\n factory(Server::class)->create([\n 'user_id' => $user->id,\n 'forge_id' => 1\n ]);\n\n factory(Server::class)->create([\n 'user_id' => $user->id,\n 'forge_id' => 2\n ]);\n\n factory(Server::class)->create([\n 'user_id' => $user->id,\n 'forge_id' => 3\n ]);\n\n\n $this->actingAs($user, 'api');\n\n $response = $this->json('GET', 'api/v1/users/' . $user->id . '/servers');\n $this->assertEquals(count(json_decode($response->getContent())), 3);\n $response->assertSuccessful();\n $response->assertJsonStructure([[\n 'id',\n 'name',\n 'forge_id',\n 'user_id',\n 'state',\n 'created_at',\n 'updated_at',\n ]]);\n }", "title": "" }, { "docid": "07833b0d881dec8b928770c23ad152e8", "score": "0.46391252", "text": "public function index()\n {\n $artistes = Artiste::where('userId', auth()->user()->id)\n ->limit(20)\n ->get();\n\n return view('artiste.index')->with(compact('artistes'));\n }", "title": "" }, { "docid": "3901b2de612422cd26e967fb48cb1379", "score": "0.46369332", "text": "public function getTimelineUsers();", "title": "" }, { "docid": "a8c9112b1bf14465ffcd6b82c7f37f53", "score": "0.463524", "text": "public function getLife()\n {\n return $this->current_health;\n }", "title": "" }, { "docid": "4c32d642dadd726dc58176a8b7abb3df", "score": "0.46337003", "text": "public function getCount() {\n return $this->db->fetchColumn('SELECT COUNT(artist_id) FROM artists');\n }", "title": "" }, { "docid": "ea0ad9c5b678cc1443e95755066492f2", "score": "0.46224448", "text": "public function artists()\n {\n return $this->belongsToMany('App\\Artist', 'program_artist');\n }", "title": "" }, { "docid": "46cf52021aa108ac5d033024a7487c38", "score": "0.4618677", "text": "public function user_can_retrieve_their_own_team_list()\n { \n factory(Team::class, 10)->create();\n\n $userTeams = factory(Team::class, 10)->create([\n 'user_id' => $this->user->id\n ]);\n\n \t$response = $this->actingAs($this->user, 'api')\n ->get('/api/teams');\n $response->assertStatus(200);\n\n $this->assertCount(10, $response->json());\n }", "title": "" }, { "docid": "de11fb81b7d468c36694b51b813f7249", "score": "0.4614012", "text": "public function getDelaisLivraison()\n {\n return $this->delais_livraison;\n }", "title": "" }, { "docid": "b2cbad7a96df08a76410b03bf26a88d9", "score": "0.46100998", "text": "public function getLife_point()\n {\n return $this->life_point;\n }", "title": "" }, { "docid": "9ebc6a71ba7256f63ef1a597c70117d5", "score": "0.46075043", "text": "public function artist_albums()\n {\n $albums = AlbumModel::getArtistAlbums(Application::$app->session->get('user'));\n $artist = ArtistModel::getArtistProfile(Application::$app->session->get('user'));\n $this->setLayout('artistlayout');\n return $this->artistRender('artist_albums', ['albums' => $albums, 'artist' => $artist]);\n }", "title": "" }, { "docid": "258832a9aec2a51913dc71ddd91258ac", "score": "0.46025595", "text": "public function getAuthors();", "title": "" }, { "docid": "d8a51b44d98ed207d898af2e4020aaf0", "score": "0.45940688", "text": "function get_artist()\n {\n\t\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('stream_artist');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array(); \t\n }", "title": "" }, { "docid": "9e75c42b67e4b767d412b67796e33245", "score": "0.45903724", "text": "public function index()\n {\n return view('pages.artists', [\n 'artists' => Artist::all()\n ]);\n }", "title": "" }, { "docid": "70232567d46647cabc2ce495abe2d8d5", "score": "0.45714268", "text": "public function getFamillesLiees() {\n return $this->famillesLiees;\n }", "title": "" }, { "docid": "d7fd8dc8ee44a786ac0963cdb6e7298e", "score": "0.45704284", "text": "public function show(Artist $artist)\n {\n abort_if(Gate::denies('user_show'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return response()->json($artist,200);\n }", "title": "" }, { "docid": "50d9d0e44ddb2220fb6c4630229849a4", "score": "0.45668", "text": "public function getAuthors()\n {\n return $this->authors;\n }", "title": "" }, { "docid": "50d9d0e44ddb2220fb6c4630229849a4", "score": "0.45668", "text": "public function getAuthors()\n {\n return $this->authors;\n }", "title": "" }, { "docid": "85341a309bab07d812e2a5263a91d9f6", "score": "0.45651254", "text": "protected function _getAgeWhoIs()\n {\n $url = preg_replace('/^www\\./', '', $this->url);\n $url = 'http://www.who.is/whois/' . urlencode($url);\n $data = $this->getPage($url);\n preg_match('#(?:Creation Date|Created On)\\.*:\\s*([ \\ta-z0-9\\/\\-:\\.]+)#si', $data, $p);\n if (!empty($p[1])) {\n $value = strtotime(trim($p[1]));\n if ($value === false) {\n return 0;\n }\n return $value;\n }\n return 0;\n }", "title": "" }, { "docid": "01bd26799913018829a36ed89979478c", "score": "0.45607015", "text": "public function artists_last_updated()\n\t{\n\t\treturn $this->hasMany('App\\Models\\TagObjects\\Artist\\Artist', 'updated_by');\n\t}", "title": "" }, { "docid": "4b51e81f3b178a6bc567d3e23539fde0", "score": "0.45569673", "text": "public function ultimos()\n {\n\n $articulos = Article::select()\n ->orderBy('idArticle', 'DESC')\n ->take(3)\n ->get();\n\n for($i = 0 ; $i<count($articulos) ; $i++){\n $user = User::find($articulos[$i]->userId);\n $articulos[$i]->datosUser = $user;\n\n } \n\n return $articulos;\n }", "title": "" }, { "docid": "a07eabcdf2b7196296e489d54f8ff9a8", "score": "0.4545464", "text": "public function showArtist($artist): array {\n return [\n '#type' => 'markup',\n '#markup' => $this->t('Showing details on @artist.', ['@artist' => $this->loadArtist($artist)]),\n ];\n }", "title": "" }, { "docid": "248157f4672f0c7d6a1a670002efd502", "score": "0.45406917", "text": "public function getInstantsList()\n {\n if( isset($this->spells) )\n {\n return $this->spells->getInstantsList();\n }\n else\n {\n throw new E_OTS_NotLoaded();\n }\n }", "title": "" }, { "docid": "7c4e95d9c4bc82b5f3bd897e20e5d207", "score": "0.45395845", "text": "public function getAuthors() {\r\r\n\t\treturn self::$authors;\r\r\n\t}", "title": "" }, { "docid": "1aa227ffc59b5935adc0d820d8ed3794", "score": "0.45363256", "text": "function artwork_page_list_recent() {\n $content = array();\n\n $query = new EntityFieldQuery();\n $query\n ->entityCondition('entity_type', 'artwork')\n ->propertyOrderBy('created', 'DESC')\n ->fieldCondition('field_artist', 'value', 'Da Vinci', 'CONTAINS', 0)\n ->range(0, 5);\n $result = $query->execute();\n\n $artworks = artwork_load_multiple(array_keys($result['artwork']));\n foreach ($artworks as $artwork) {\n $content[$artwork->aid] = artwork_page_view($artwork, 'teaser');\n }\n\n return $content;\n}", "title": "" }, { "docid": "1acfd40e59e4eec22633865cfde76356", "score": "0.4531116", "text": "public function fetchUserTeams()\n {\n $teams = auth()->user()->teams;\n return TeamResource::collection($teams);\n }", "title": "" }, { "docid": "ae664c429fd57f51841713693fb4ab6d", "score": "0.4527004", "text": "function dok_artists_nb() {\n $query = 'select count(*) as c from '.dok_tn('artist');\n $res = dok_oquery($query);\n $row = $res->fetch_array();\n return $row['c'];\n}", "title": "" }, { "docid": "ea34f7e245652924adf16496974f406f", "score": "0.45219892", "text": "public function artists()\n {\n return $this->belongsToMany('App\\Artist');\n }", "title": "" }, { "docid": "c04318fb3b7ce83866102f1deab3d27c", "score": "0.45214617", "text": "public function getArtistId()\n {\n return $this->artist_id;\n }", "title": "" }, { "docid": "9c6666dae9acdcc9905fb570c444bb05", "score": "0.4517054", "text": "function dok_artists_list () {\n\t$back = array();\n\t$query = 'select id, name, creation from '.dok_tn('artist').' order by name';\n\t$res = dok_oquery($query);\n while ( $row = $res->fetch_array() ) {\n $back[$row['id']] = array('name'=>$row['name'], 'creation'=>$row['creation']);\n }\n return $back;\n}", "title": "" }, { "docid": "7b5612480da3415e3d068d99b30aa41a", "score": "0.45154795", "text": "public function getAuthors()\n {\n return $this->author;\n }", "title": "" }, { "docid": "7b5612480da3415e3d068d99b30aa41a", "score": "0.45154795", "text": "public function getAuthors()\n {\n return $this->author;\n }", "title": "" }, { "docid": "fdc804234c7952b3b1109ac793316522", "score": "0.4508014", "text": "public function getContentSandwichArtist();", "title": "" }, { "docid": "68d746d15837c43f65f01dd3c65b361a", "score": "0.45058045", "text": "public function show(Artist $artist){\n return view('artists.info', compact('artist'));\n }", "title": "" }, { "docid": "4fa50750f89ba1dcf7a64f6c3fe6c35e", "score": "0.45013756", "text": "public function getAuthors() {\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Construct the query\n\t\t$query->select('u.id AS value, u.name AS text');\n\t\t$query->from('#__users AS u');\n\t\t$query->join('INNER', '#__mymuse_track AS c ON c.created_by = u.id');\n\t\t$query->group('u.id, u.name');\n\t\t$query->order('u.name');\n\n\t\t// Setup the query\n\t\t$db->setQuery($query->__toString());\n\n\t\t// Return the result\n\t\treturn $db->loadObjectList();\n\t}", "title": "" }, { "docid": "a06b40970766b838419d286ebdd4a4cd", "score": "0.44947472", "text": "function yourls_get_cookie_life() {\n\treturn yourls_apply_filter( 'get_cookie_life', YOURLS_COOKIE_LIFE );\n}", "title": "" }, { "docid": "fe5bc667338e4d06bcb459bcb7b55f41", "score": "0.4487213", "text": "public function get_cookie_life() {\n\n\t\t\t$life = get_option( 'sa_saved_for_later_profile_life', 180 );\n\n\t\t\treturn apply_filters( 'sa_saved_for_later_profile_life', time()+(60*60*24*$life) );\n\n\t\t}", "title": "" }, { "docid": "6dfb10034aecda5bbd81c88fdbdbe8b1", "score": "0.44855678", "text": "public function getDisplayArtistName()\n {\n return $this->displayArtistName;\n }", "title": "" }, { "docid": "6dfb10034aecda5bbd81c88fdbdbe8b1", "score": "0.44855678", "text": "public function getDisplayArtistName()\n {\n return $this->displayArtistName;\n }", "title": "" }, { "docid": "6dfb10034aecda5bbd81c88fdbdbe8b1", "score": "0.44855678", "text": "public function getDisplayArtistName()\n {\n return $this->displayArtistName;\n }", "title": "" }, { "docid": "f2c5ecb7eb6b6120e701661fcc9d2770", "score": "0.4484069", "text": "public function show(Artistas $artistas)\n {\n //\n }", "title": "" }, { "docid": "ff3a0f19b3460bcd6b475922404e84fa", "score": "0.4480006", "text": "function admin_managefeaturedartist() {\n\t\t$artists = $this->paginate('Featuredartist',array('album != \"\"','language' => Configure::read('App.LANGUAGE')));\n\t\t$this -> set( 'artists', $artists );\n\t}", "title": "" }, { "docid": "7609183f045e4fdad1a8ce1f85c09175", "score": "0.44754803", "text": "function admin_managenewartist() {\n\t\t$artists = $this->paginate('Newartist',array('language' => Configure::read('App.LANGUAGE')));\n\t\t$this -> set( 'artists', $artists );\n\t}", "title": "" }, { "docid": "1ffd3893591621883b28bbc86665b2d9", "score": "0.44749698", "text": "function admin_manageartist() {\n \n\t\t$artists = $this->paginate('Artist',array('language' => Configure::read('App.LANGUAGE')));\n \n\t\t$this -> set( 'artists', $artists );\n\t}", "title": "" }, { "docid": "2ab6ed3b9af837055499fc2221d3036f", "score": "0.446855", "text": "function getArtistsByCountry($country, $number_of_artists) {\n\n require \"/home/aw008/variables/sensible_info.php\";\n\n $params = array(\n 'api_key' => $lastfm_api_key,\n 'method' => \"tag.getTopArtists\",\n 'limit' => $number_of_artists,\n 'tag' => $country,\n 'format' => 'json'\n );\n\n $encoded_params = array();\n\n foreach ($params as $k => $v){\n $encoded_params[] = urlencode($k).'='.urlencode($v);\n }\n\n $url = \"http://ws.audioscrobbler.com/2.0/?\".implode('&', $encoded_params);\n\n $rsp = file_get_contents($url);\n $rsp_obj = json_decode($rsp);\n\n $artists_array = $rsp_obj->topartists->artist;\n\n $array_of_artists = array();\n\n foreach ($artists_array as $k => $v) {\n $artist_name = $v->name;\n $array_of_artists[] = array('name' => $artist_name, 'country' => $country);\n }\n\n return $array_of_artists;\n}", "title": "" }, { "docid": "36fbb2c66df11259247b2255045323d3", "score": "0.4468412", "text": "private function profile_age(&$data) {\n $tracks = $this->_tracks($data);\n $owned_playlists = $this->_owned_playlists($data);\n\n $age = null;\n\n if (empty($tracks))\n return;\n\n foreach ($tracks as $track) {\n if (! isset($track['playlists']))\n continue;\n\n foreach ($track['playlists'] as $item) {\n if (in_array($item, $owned_playlists)) {\n $_age = strtotime($track['added_at']);\n $age = is_null($age) || $_age < $age ? $_age : $age;\n }\n }\n }\n\n return $age;\n }", "title": "" }, { "docid": "c5b910f0f214bbe663a26167287f91a4", "score": "0.4463063", "text": "private function loadArtist($artist) {\n return $artist;\n }", "title": "" }, { "docid": "3c6285f85e49fcc8d8fc86ab29050c81", "score": "0.44502267", "text": "public function getClothes()\n {\n return $this->clothes;\n }", "title": "" }, { "docid": "33b021d893d9484cb15b178c9566c890", "score": "0.4443857", "text": "public function recentAlbums(){\n $album = new Album();\n return $album->recentAlbums();\n }", "title": "" }, { "docid": "43f8022ac748e6b5805bbdbf17e7d3c8", "score": "0.443744", "text": "public function getUserStat()\n {\n $userTerdaftar = \\stjo\\Model\\User::all()->count();\n\n\n return $userTerdaftar;\n\n }", "title": "" }, { "docid": "81e86b15eeb348dd037a45d8080820b5", "score": "0.44359213", "text": "function get_my_managers() {\n\t\t$seen_user_before = array();\n\t\t$theuser= $this->current_user;\n\n\t\twhile (!empty($theuser) && array_key_exists($theuser,$this->all_users)) {\n\t\t\tif (isset($seen_user_before[$theuser]) ) {\n\t\t\t\t// We have seen this user before, ignore them\n\t\t\t\t$theuser='';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$seen_user_before[$theuser] = 1;\n\t\t\tif (!empty($this->all_users[$theuser])){\n\t\t\t\t$theuser=$this->all_users[$theuser]; //get manager's id\n\t\t\t\t$this->my_managers[]= $theuser;\n\t\t\t} else {\n\t\t\t\t$theuser='';\n\t\t\t}\n\t\t}\n\n\t\t//print_r(\"<BR>my managers <BR>\");\n\t\t//_ppd($this->my_managers);\n\t}", "title": "" }, { "docid": "c563af5c8a722b59cc13fb4a30fde7f8", "score": "0.44206268", "text": "public function artistProfile()\n {\n $artist = Auth::user()->artist;\n $data = [\n 'id' => $artist->id,\n 'name' => $artist->name,\n 'description' =>$artist->description,\n 'image'=>$artist->image,\n 'genres' => $artist->genres->map(function($genre){\n return[\n 'id' => $genre->id,\n 'name' => $genre->name\n ];\n }),\n 'bookings' => $artist->bookings->map(function($booking){\n return[\n 'id' => $booking->id,\n 'name' => $booking->firstname . ' ' . $booking->lastname,\n 'description' => $booking->description,\n 'date' => $booking->book_date,\n 'amount' => $booking->amount,\n 'status' => $booking->status->name,\n ];\n }),\n 'videos' => $artist->videos->map(function($video){\n return[\n 'url' => $video->url,\n 'id' =>$video->id\n ];\n }),\n ];\n\n return response()->json([\n 'data' => $data,\n 'status' => 200\n ]);\n }", "title": "" }, { "docid": "afcbbedbef8c31b9c2e56141c628baa2", "score": "0.44197792", "text": "function get_track_artists($track_key, $artist_type = 6, $is_html = true) {\n\t$names = \"\";\n\tif(open_db()) {\n\t\tif(!$is_html) {\t// Plain text output\n\t\t\t$names = $GLOBALS['db']->querySingle(\"SELECT group_concat(contributors.name, ', ') AS Artists FROM contributors, contributor_track WHERE (contributor_track.role = $artist_type) AND (contributors.id = contributor_track.contributor) AND (contributor_track.track = $track_key)\");\n\t\t\t$index = strrpos($names, ',');\n\t\t\tif($index === true) {\n\t\t\t\t$start = substr($names, 0, $index);\n\t\t\t\t$finish = substr($names, $index + 2);\n\t\t\t\t$names = $start . \" & \" . $finish;\n\t\t\t}\n\t\t} else {\t// HTML output\n\t\t\t$result = $GLOBALS['db']->query(\"SELECT \\\"<a href=\\\"\\\"MAL_artist_album_list.php?a=\\\" || contributors.id || \\\"\\\"\\\"> <span id=<\\\"\\\"artist\\\"\\\">\\\" || contributors.name || \\\"</span></a>\\\" AS Artists FROM contributors, contributor_track WHERE (contributor_track.role = 6) AND (contributors.id = contributor_track.contributor) AND (contributor_track.track = $track_key)\");\n\t\t\t$total = 0;\n\t\t\twhile($row = $result->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t\t$total++;\n\t\t\t}\n\t\t\t$count = 0;\n\t\t\twhile($row = $result->fetchArray(SQLITE3_ASSOC)) {\n\t\t\t\tif($count > 0) {\n\t\t\t\t\tif($count == ($total - 1)) {\n\t\t\t\t\t\t$names .= \" & \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$names .= \", \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$names .= $row['Artists'];\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t}\n\treturn $names;\n}", "title": "" }, { "docid": "82663c42d2af3374dae34ad4fda2bdcd", "score": "0.44188356", "text": "public function getUsermetaCount()\n {\n return $this->count(self::USERMETA);\n }", "title": "" }, { "docid": "d41ea6eaaccbe996ac9abdb9c756eb92", "score": "0.44127277", "text": "public function getRecentArticles()\n {\n $recentArticlesFeed = new Model_Feed_RecentArticles();\n $recentArticles = $recentArticlesFeed->get();\n $articles = array();\n\n if (!empty($recentArticles)) {\n $articles = Model_Article::getSome($recentArticles, false, true);\n foreach ($articles as $article) {\n $coauthorship = new Model_Coauthors($article->id);\n $article->coauthor = Model_User::get($coauthorship->user_id);\n }\n }\n return $articles;\n }", "title": "" }, { "docid": "28c7beed80a35bcea789e67b7da3a1ee", "score": "0.44055519", "text": "public function listAction()\n {\n \t$repository = $this->getDoctrine()\n ->getManager()\n ->getRepository('YMTestBundle:Artist');\n\n // .. To find all the Artists in the DB\n\t\t $artists = $repository->findAll();\n\n //We strip_tags the biography\n foreach ($artists as $artist){\n\n $artist->setBiography(strip_tags($artist->getBiography()));\n }\n\n //And we return the view rendered by S2\n return $this->render('YMTestBundle:Musician:list.html.twig', array('artists' => $artists));\n }", "title": "" }, { "docid": "b41fbfd6aa45e5baca33219836f6bf9a", "score": "0.44050103", "text": "public function getUsers() {\n return $this->schoolType->getManagers();\n }", "title": "" }, { "docid": "5952524b738d053c91c36728e670e7c5", "score": "0.44044346", "text": "function getArtists($queryWhere) {\n \n }", "title": "" }, { "docid": "f2efbca5f7a0e0080e62a5c8f254c937", "score": "0.43978953", "text": "public function getVerifiedArtists(Request $request)\n {\n // build a query for verfied artists\n $builder = User::query()->verified();\n\n $query = $request->input('q', '');\n if (!empty($query)) {\n\n $builder = $builder->search($query);\n\n }\n\n return view('admin.artists.index', [\n 'route_title' => trans('admin_artists.verified.title'),\n 'route_description' => trans('admin_artists.description'),\n 'artists' => $builder->paginate(),\n 'query' => $query,\n ]);\n }", "title": "" }, { "docid": "63da9d2198200a4d8f1ead74d57f7633", "score": "0.4394605", "text": "private function getLifeTime()\n {\n return $this->_lifeTime;\n }", "title": "" }, { "docid": "ee236b8c70a0cbdfde2a8f0f8e2a5ef7", "score": "0.43923628", "text": "public function getAffiliatemembers();", "title": "" }, { "docid": "4d6dbd443f7ae6dcbc5d41a082c5e495", "score": "0.43893066", "text": "public function getArtistCredits(): ArtistCreditList\n {\n return $this->artistCredits;\n }", "title": "" }, { "docid": "45c4cb534cf2a3a343edf5150367a4cf", "score": "0.43885908", "text": "function getArtistID() {\n\t\treturn $this->_ArtistID;\n\t}", "title": "" } ]
3f085c7189a9ebbd8b578d1d0afbce70
============================================= / Function Remainder Concatenation in PHP is with "."
[ { "docid": "0cb7dc4e3cd21e6bd2a39cedab256f41", "score": "0.0", "text": "function remainder($num1, $num2){\n\n $modulo = $num1 % $num2;\n show(\"The remainder between \" .$num1 .\" and \" . $num2 .\" is=> \" .$modulo);\n return $modulo ;\n \n }", "title": "" } ]
[ { "docid": "62074d1b17a41c01852b5bc42992974c", "score": "0.6149682", "text": "function dotToString($mainclassname){\r\n //open the dot file. this dot file name will be in the format of directory.subdir.subdir.nameofmainclass.dot\r\n $file = fopen(\"carTest.\" . $mainclassname . \".dot\", r) or die(\"unable to file!\");\r\n\r\n //string that we will return\r\n $dotStringFormat;\r\n //parse file.\r\n while(!feof($file)){\r\n $line = fgets($file);\r\n $dotStringFormat .= $line . \"\\n\";\r\n }\r\n //close the file when we are done with it.\r\n fclose($file);\r\n return $dotStringFormat;\r\n }", "title": "" }, { "docid": "bf8e87020acf4029c358a5b69ac1ca04", "score": "0.6126259", "text": "private function formatMethodName($variable) {\n\t\t$values = explode(\".\", $variable);\n\t\t$variable = end($values);\n\t\treturn strtolower($variable);\n\t}", "title": "" }, { "docid": "42322f46519eec05cedae8e7b0e7c24d", "score": "0.6007711", "text": "function fwcl($filed){\n return $filed.'_'.l();\n}", "title": "" }, { "docid": "39b3c252fa8bb65bd6f00da110e1a8e6", "score": "0.60044426", "text": "function concatString($s1, $s2){\n\t\treturn \"CONCAT($s1, $s2)\";\n\t}", "title": "" }, { "docid": "d3bb270447611aa6d7a9d89917bb0305", "score": "0.5965273", "text": "function data_c($str)\n\t{\n\t$data = explode(\".\", $str);\n\treturn $data[2].\"-\".$data[1].\"-\".$data[0];\n\t}", "title": "" }, { "docid": "6d1990560332e3e98e709cc1388daaf5", "score": "0.5955274", "text": "private function formatResourceName($variable) {\n\t\t$values = explode(\".\", $variable);\n\t\t$variable = end($values);\n\t\treturn strtolower($variable);\n\t}", "title": "" }, { "docid": "9217412cdd6a2e871696c2ee613a21d1", "score": "0.59067416", "text": "function limpaMascaraCnpj($p_numero){\n\t$p_numero = str_replace(\".\",\"\",$p_numero);\n\t$p_numero = str_replace(\"/\",\"\",$p_numero);\n\treturn $p_numero;\n}", "title": "" }, { "docid": "af8bf4ba128129e6b660877451b0cb49", "score": "0.59006536", "text": "protected function join()\n {\n return '';\n }", "title": "" }, { "docid": "55cb87066e821dbc3630fdd4d5d74954", "score": "0.58704674", "text": "function add_dots ( &$item1, $key, $prefix ) {\n $item1 = \"$prefix$item1\";\n}", "title": "" }, { "docid": "accf72e52691e61cf8e58776e03eeb98", "score": "0.5869605", "text": "function joinNamespace()\n{\n\treturn implode('\\\\', array_filter(func_get_args()));\n}", "title": "" }, { "docid": "2689676962275af2499a5f168fba79fb", "score": "0.5841395", "text": "function PrependSeparator(){}", "title": "" }, { "docid": "7820a469ece7cd5805573d8abaf1f3e0", "score": "0.5822159", "text": "function myfunct ($argument){\n return $argument . 'kekchose';\n }", "title": "" }, { "docid": "58bc62a786fa1954796d44332a5c8380", "score": "0.58142066", "text": "function name_edit($urunkelime){\n $str =26;\n\n if (strlen($urunkelime) < $str){\n return $urunkelime;\n }else{\n return substr($urunkelime,0,$str).\"..\";\n }\n\n}", "title": "" }, { "docid": "073f8412ead06cd77e48277c2765c1b8", "score": "0.58090687", "text": "public function getShortedName() {\n $prename = $this->getPrename();\n $name = $this->getName();\n if (strlen($name) > 3) {\n $name = substr($name, 0, 3) . \".\";\n }\n return trim($prename . \" \" . $name);\n }", "title": "" }, { "docid": "79d57f8ad6bb6bf8da8e333bff050037", "score": "0.57942986", "text": "function QuitarPunto($p){\n\treturn str_replace ( \".\", \"\", $p);\n}", "title": "" }, { "docid": "c3cbc585332d49ce6549c4b4b0fe8603", "score": "0.57793784", "text": "function get_possessive_full_name()\n\t{\n\t\t$full_name = $this->get_full_name();\n\t\t$postfix = (substr($full_name, -1) == 's') ? \"'\" : \"'s\";\n\t\treturn $full_name . $postfix;\n\t}", "title": "" }, { "docid": "0f0e62c339f201101a83664ecd3861f4", "score": "0.57611376", "text": "function del_chara($string){\n return str_replace(\".\",\"\",$string);\n}", "title": "" }, { "docid": "f5e8749abc6ba65c5408d0451f161043", "score": "0.5752507", "text": "function add_extension($nom, $ext) {\n $ext = '.' . $ext;\n return (substr($nom, -strlen($ext), strlen($ext)) != $ext) ? $nom.$ext : $nom;\n}", "title": "" }, { "docid": "3ab01b207c6cfd7c94306b61026fb723", "score": "0.57434756", "text": "private function limpaCaracterCpf() {\n\t\t\treturn str_replace(\".\",\"\",str_replace(\"-\",\"\",$this->getRequest()->getParam('nu_cpf')));\n\t\t}", "title": "" }, { "docid": "a6630063429e2b5c935bbe666453b8a3", "score": "0.57285064", "text": "public function baseName() {\n\t\t$className = get_class($this);\n\t\t$className = str_replace(array(__NAMESPACE__ . '\\\\', 'Controller'), '', $className);\n\t\t$r = explode('\\\\', $className);\n\t\t$values = array();\n\t\tif (!empty($r)) {\n\t\t\tforeach($r as $item) {\n\t\t\t\t$values []= lcfirst($item);\n\t\t\t}\n\t\t}\n\t\treturn implode('/', $values);\n\t}", "title": "" }, { "docid": "3f2a4002a9bd5766682aed11bd3119ed", "score": "0.5720034", "text": "function printStr(){\n\t\t$val = '$__$';\n\t\t//single quote\n\t\techo 'Money $__$ money' . \"<br />\";\n\t\t\n\t\t//double quote\n\t\techo \"Money $val money\";\n\t}", "title": "" }, { "docid": "c4f9f589447c8552c45d4e7c14df9264", "score": "0.56906176", "text": "function charater($firstVariable) {\n // cette fonction return un string\n return $firstVariable;\n }", "title": "" }, { "docid": "624f70410ec798b6dd18884d15f35499", "score": "0.568824", "text": "function price_format($a,$status=true){\n $string = $a . \"\";\n $tempKoma = \"\";\n if(strpos($string,\".\")!=false){\n $posKoma = strpos($string,\".\");\n $tempKoma = substr($string,$posKoma);\n $tempKoma = str_replace(\".\",\",\",$tempKoma);\n $tempKoma = substr($tempKoma,0,3);\n $string = substr($string,0,strpos($string,\".\"));\n }\n\n $jumDot = intval(strlen($string)/3);\n if(strlen($string) % 3 == 0){\n $jumDot = $jumDot-1;\n }\n $aha = 0;\n for($i=0; $i<$jumDot;$i++){\n $part[$i] = substr($string,strlen($string)-3);\n $string = substr($string,0,strlen($string)-3);\n $aha++;\n }\n\n $temp = $string;\n $string = \"\";\n for($i=0;$i<$jumDot;$i++){\n $string = \".\" . $part[$i] . $string;\n }\n $string = $temp . $string ;\n return $string;\n}", "title": "" }, { "docid": "bb2309eed396dd949ac49dd888c70baa", "score": "0.56867796", "text": "private function generatePrefix(): string\n {\n // phpcs:ignore Magento2.Functions.DiscouragedFunction\n return substr(\\hash('sha256', dirname(__DIR__, 6)), 0, 3) . '_';\n }", "title": "" }, { "docid": "690610953491ac9d39fa808d068e5d88", "score": "0.5679936", "text": "function lang_form_string_key($keyfromfile) {\n return str_replace('.', '##46#', $keyfromfile); /// Derived from &#46, the ascii value for a period.\n}", "title": "" }, { "docid": "9e03c9ed232e56d8a106312da324eca5", "score": "0.5663739", "text": "static function formatName($name, $path = '' ) {\n\t\t$return = preg_replace('/\\//', '_', $path);// construction du path\n\t\tforeach(preg_split('/_/', $name) as $s) {$return .= ucfirst($s);} // construction du nom de la class\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "403b60fa6ec3729909035a98fcbe3cc9", "score": "0.56593686", "text": "public function getFileNormalize() : string\n {\n return \"{$this->getFilename()}.{$this->extension}\";\n }", "title": "" }, { "docid": "64889d70e805e42624346e963fcdc2c6", "score": "0.5651687", "text": "function custom_implode($first,$second,$implode_value='-'){\n\treturn $first.''.$implode_value.''.$second;\n}", "title": "" }, { "docid": "28376814425cef9ecd74a2ff10842e9f", "score": "0.5644501", "text": "public static function Path()\n {\n return str_replace('/', '.', self :: Get(0));\n }", "title": "" }, { "docid": "ea88957bbce12af6668c59997096ed08", "score": "0.5630296", "text": "function stripChange($value) {\n\t\t$returnVar = \"\";\n\t\t\t\t\n\t\tif (is_numeric($value)) { \n\t\t\t// If we have multiple periods then we will output all but the last one\n\t\t\t$explodedValue = explode(\".\", $value);\n\t\t\t\n\t\t\tif (count($explodedValue) > 1) {\n\t\t\t\tfor ($x = 0; $x < count($explodedValue) - 1; $x++) {\n\t\t\t\t\t$returnVar = ($returnVar == \"\") ? $explodedValue[$x] : \".\" . $explodedValue[$x];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { $returnVar = $explodedValue[0]; }\n\t\t}\n\t\telse { $returnVar = $value; }\n\t\t\n\t\treturn $returnVar;\n\t}", "title": "" }, { "docid": "cf3dd85ecb8a50f59aea4d455ecef1c4", "score": "0.56279486", "text": "function limpaMascaraCpf($p_numero){\n\t$p_numero = str_replace(\".\",\"\",$p_numero);\n\t$p_numero = str_replace(\"-\",\"\",$p_numero);\n\treturn $p_numero;\n}", "title": "" }, { "docid": "b7df7f6b1356494163a7c30966f1fcd9", "score": "0.5626644", "text": "function ff_concat()\n{\n\t$ret = '';\n\tforeach (func_get_args() as $value) {\n\t\t$ret .= $value;\n\t}\n\treturn $ret;\n}", "title": "" }, { "docid": "560a2e1a9f5c6c395814a9b42b68eb96", "score": "0.5616511", "text": "function stripChange($value) {\n\t\t$returnVar = \"\";\n\t\t\t\t\n\t\tif (is_numeric($value)) { \n\t\t\t// If we have multiple periods then we will output all but the last one\n\t\t\t$explodedValue = explode(\".\", $value);\n\t\t\t\n\t\t\tif (count($explodedValue) > 1) {\n\t\t\t\tfor ($x = 0; $x < count($explodedValue) - 1; $x++) {\n\t\t\t\t\t$returnVar = (empty($returnVar)) ? $explodedValue[$x] : \".\" . $explodedValue[$x];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { $returnVar = $explodedValue[0]; }\n\t\t}\n\t\telse { $returnVar = $value; }\n\t\t\n\t\treturn $returnVar;\n\t}", "title": "" }, { "docid": "f8257c64e178e6b97fc6d280bf70904c", "score": "0.5606185", "text": "function getEXT($str)\n{\n\t$t=\"\";\n\t$string =$str;\n\t$tok = strtok($string,\".\");\n \twhile($tok) {\n \t\t$t=$tok;\n \t\t$tok = strtok(\".\");\n \t}\n \t return $t;\n}", "title": "" }, { "docid": "4b9f88f06c943d5323cb26b31b376e8e", "score": "0.560324", "text": "function getExt($str) {\n\t$i = strrpos($str,\".\");\n\tif (!$i) { return \"\"; }\n\t$l = strlen($str) - $i;\n\t$pre_ext = substr($str,$i+1,$l);\n\t$ext = strtolower($pre_ext);\n\treturn $ext;\n}", "title": "" }, { "docid": "0bcfda975a3625d8934442034586d51d", "score": "0.5597991", "text": "public function suffix ()\n {\n return \"]\";\n }", "title": "" }, { "docid": "f003d1773e5ca852c2df4db0d44f70cc", "score": "0.5597048", "text": "function pegarExtensao($x){\n return strrchr($x,\".\");\n }", "title": "" }, { "docid": "b74648ab304d1538028ab62a95cba002", "score": "0.5592205", "text": "function ads($var) {\n if (!(substr($var, -1, 1) == '/')) $var .= '/';\n return $var;\n }", "title": "" }, { "docid": "657dfe3541d77ac6795c60ebe8b30c24", "score": "0.55857384", "text": "private function normalizeCaller($caller)\n {\n return str_replace('.', '/', $caller);\n }", "title": "" }, { "docid": "72bac9652fab635aa3dc1f30b1f9c723", "score": "0.5582273", "text": "function getClassName($class)\n {\n return str_replace('.', '_', $class);\n }", "title": "" }, { "docid": "2fefcfed5070d16b87a0414e780f21f6", "score": "0.55748016", "text": "function str_join() {\n\t\treturn forward_static_call_array(array('Horizon\\Support\\Str', 'join'), func_get_args());\n\t}", "title": "" }, { "docid": "a0eba648be5ab1321623c8444817e675", "score": "0.55737144", "text": "function addSlhs($elm){return \"'\".$elm.\"'\";}", "title": "" }, { "docid": "77f1af3d8dbc843bad8e5d6f7d30367d", "score": "0.55589354", "text": "function __string()\n {\n\t\treturn\n \"Tag('{$this->level} {$this->id} {$this->tagname} {$this->parms}')\";\n }", "title": "" }, { "docid": "affb79dd4debc8a328ba4a0d68df0acb", "score": "0.5558046", "text": "private function str(): string {\n return $this->correctToPreferredFormat(\n implode($this->delim(), $this->parts())\n );\n }", "title": "" }, { "docid": "c8a40e0d4bb55c897aba14ccf271bcf7", "score": "0.55565447", "text": "public function toFullyQualifiedString(): string\n {\n\n if ( empty( $this->hostName ) )\n {\n return $this->tld->toFullyQualifiedString();\n }\n\n if ( null === $this->tld )\n {\n return $this->hostName;\n }\n\n return $this->hostName . '.' . $this->tld->toFullyQualifiedString();\n\n }", "title": "" }, { "docid": "7fe9b91daab7ff2186051c8c47f1685a", "score": "0.55553687", "text": "function fname($fname){\n\tglobal $REQ_ID;\n\tif(!stristr($fname, \".\")){\n\t\t//directory\n\t\treturn $fname . \"_\" . $REQ_ID;\n\t}\n\t$parts = explode(\".\", $fname);\n\treturn $parts[0] . \"_\" . $REQ_ID . \".\" . $parts[1];//fname_id.ext\n}", "title": "" }, { "docid": "e864c3cd427597557519683b22952029", "score": "0.5546579", "text": "function limpaMascaraCpfCnpjCep($p_numero){\n\t$p_numero = str_replace(\".\",\"\",$p_numero);\n\t$p_numero = str_replace(\"-\",\"\",$p_numero);\n\t$p_numero = str_replace(\"/\",\"\",$p_numero);\n\treturn $p_numero;\n}", "title": "" }, { "docid": "8fa33b0374a73e0ad1144098c5493421", "score": "0.55417573", "text": "function getExtension($str) { \r\n\t$i = strrpos($str,\".\"); \r\n\tif (!$i) { return \"\"; } \r\n\t$l = strlen($str) - $i; \r\n\t$ext = substr($str,$i+1,$l); \r\n\treturn $ext; \r\n}", "title": "" }, { "docid": "c9579fe3d43e7c703de390f51252f1b5", "score": "0.55324626", "text": "protected function buildName()\n {\n return lcfirst($this->relatedModel->getName())\n . $this->getNamePrecision();\n }", "title": "" }, { "docid": "0bba676104ca57f86bfb77f0a92efdde", "score": "0.5525875", "text": "function remove_double_dots( $value_ )\r\n\t{\r\n\t\t//! Count the dots\r\n\t\t$value = $value_;\r\n\t\t$dots = substr_count($value, '.');\r\n\r\n\t\tif ( $dots > 1 )\r\n\t\t\t$value = preg_replace('/\\./', '', $value, ($dots - 1));\r\n\r\n\t\t// Return the value adjusted\r\n\t\treturn $value;\r\n\t}", "title": "" }, { "docid": "333618bab48094bdc0118cb533f6aa38", "score": "0.5523468", "text": "function ag_stringToFilename($string, $raw_name = false) {\n\t$pos = strrpos($string, '.');\n\t$name = substr($string,0 ,$pos);\n\tif(!$raw_name) {$name = ucwords(str_replace('_', ' ', $name));}\n\treturn $name;\t\n}", "title": "" }, { "docid": "2e3fb37cfe866252cb3f09011a271efe", "score": "0.55185986", "text": "function getExtension($str) {\n$i = strrpos($str,\".\");\nif (!$i) { return \"\"; }\n$l = strlen($str) - $i;\n$ext = substr($str,$i+1,$l);\nreturn $ext;\n}", "title": "" }, { "docid": "2e3fb37cfe866252cb3f09011a271efe", "score": "0.55185986", "text": "function getExtension($str) {\n$i = strrpos($str,\".\");\nif (!$i) { return \"\"; }\n$l = strlen($str) - $i;\n$ext = substr($str,$i+1,$l);\nreturn $ext;\n}", "title": "" }, { "docid": "745352f3bc0ce5452fc767e7fd72aa6d", "score": "0.55185765", "text": "protected function safeName($name)\n {\n return str_replace(array('/','.'), array('SLASH','DOT'), $name);\n }", "title": "" }, { "docid": "2dc0765d34c665e122de0c994e8b1ee6", "score": "0.550771", "text": "public static function concat() {\r\n\t\t\t$fullpath = \"\";\r\n\t\t\tforeach (func_get_args() as $path) {\r\n\t\t\t\t$fullpath = ($fullpath) ? rtrim($fullpath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path;\r\n\t\t\t}\r\n\t\t\treturn $fullpath;\r\n\t\t}", "title": "" }, { "docid": "0a233c28910af29a9286fbbe414e8ab2", "score": "0.55045617", "text": "public function toDotFormat()\n {\n $mac = $this->long2mac($this->mac, $this->type, '');\n return implode('.', str_split($mac, 4));\n }", "title": "" }, { "docid": "fca043a8d9386de275b6ccf8f40bdf2d", "score": "0.5504217", "text": "function foobar($foo, $bar = 'foo')\n{\n\treturn $foo.$bar;\n}", "title": "" }, { "docid": "bb20cd1524439144eaf91fa8c8005df7", "score": "0.54939216", "text": "private function formatPayloadVariable($variable) {\n\t\t$values = explode(\".\", $variable);\n\t\t$variable = end($values);\n\t\treturn $this->camelCase($variable);\n\t}", "title": "" }, { "docid": "2270c475cb32adf8386ab78a724d1d00", "score": "0.54863393", "text": "protected function compose() {\n $base= self::$base;\n return implode(DIRECTORY_SEPARATOR, array_map(\n function($e) use($base) {\n return $base->equals($e) ? $base->path() : rtrim($e, DIRECTORY_SEPARATOR);\n },\n func_get_args()\n ));\n }", "title": "" }, { "docid": "9b5cdb03969b3e9940aebb3de6cfd545", "score": "0.5481292", "text": "function formatParamName($colName) {\n // replace period with triple underscore\n return str_replace('.', '___', $colName);\n}", "title": "" }, { "docid": "efaf7ef61addb75cd33bb83b78545673", "score": "0.54720974", "text": "function formataCnpj($cnpj) {\n\t\t$cnpjRet = \"\";\n\t\tif ($cnpj) {\n\t\t\t$cnpjRet = substr($cnpj, -14, 2).\".\".substr($cnpj, -12, 3).\".\".substr($cnpj, -9, 3).\"/\".substr($cnpj, -6, 4).\"-\".substr($cnpj, -2, 2);\n\t\t}\n\t\treturn $cnpjRet;\n\t}", "title": "" }, { "docid": "b8fb24f3f41e862d490c1c2bb04045b9", "score": "0.5471221", "text": "public static function concat() {\n\t\t\t$fullurl = \"\";\n\t\t\tforeach (func_get_args() as $url) {\n\t\t\t\t$fullurl = ($fullurl) ? rtrim($fullurl, \"/\").\"/\".ltrim($url, \"/\") : $url;\n\t\t\t}\n\t\t\treturn $fullurl;\n\t\t}", "title": "" }, { "docid": "0f6d4c45a4424f09cffce83f4c118b64", "score": "0.5470681", "text": "function decimal_digit_maintainer($value){\n\t define(\"AFTER_DESIMAL_DIGITS \",2);\n\t$value_array = explode('.',$value);\n\tif(isset($value_array[1])){\n\t\t\t$value_array[1] = str_pad($value_array[1],AFTER_DESIMAL_DIGITS,'0',STR_PAD_RIGHT);\n\t}else{\n\t\t$value_array[1] = '00';\n\t}\n\treturn implode('.',$value_array);\n}", "title": "" }, { "docid": "aa1871dd75432e5f55e851f5ae80d99a", "score": "0.5469575", "text": "function joinPath()\n{\n\treturn implode(DS, array_filter(func_get_args()));\n}", "title": "" }, { "docid": "fbd443fcdfccda436106fb112c8d3e75", "score": "0.5466467", "text": "public function standardizePath()\n {\n $arrPath = func_get_args();\n\n if (count($arrPath) == 0 || $arrPath == null || $arrPath == \"\")\n {\n return \"\";\n }\n\n $strVar = \"\";\n\n foreach ($arrPath as $itPath)\n {\n $itPath = str_replace(array(TL_ROOT, \"\\\\\"), array(\"\", \"/\"), $itPath);\n $itPath = explode(\"/\", $itPath);\n\n foreach ($itPath as $itFolder)\n {\n if ($itFolder == \"\" || $itFolder == \".\" || $itFolder == \"..\")\n {\n continue;\n }\n\n $strVar .= \"/\" . $itFolder;\n }\n }\n\n return preg_replace(\"/^\\//i\", \"\", $strVar);\n }", "title": "" }, { "docid": "d7c0f44db52c5562683eb8d1095bff8a", "score": "0.546605", "text": "function nameFix($wordIn)\n {\n $wordOut = str_replace('.', '-', $wordIn);\n\n return $wordOut;\n }", "title": "" }, { "docid": "fe57bcff42fbe4eea8c3709e880a327d", "score": "0.5456786", "text": "function getExtension($str) { \n\t$i = strrpos($str,\".\"); \n\tif (!$i) { return \"\"; } \n\t$l = strlen($str) - $i; \n\t$ext = substr($str,$i+1,$l); \n\treturn $ext; \n}", "title": "" }, { "docid": "526492ac230b15798c015aa1a8a578ed", "score": "0.54549164", "text": "function file_ext($file_name) {\n\t$dot_pos = strrpos($file_name,'.');\n\tif ($dot_pos === false) return '';\n\n\treturn substr($file_name,$dot_pos+1);\n}", "title": "" }, { "docid": "5e5bb90945079cc362f4d6ad1f1688c0", "score": "0.54441065", "text": "function getImage($name)\n{\n return str_replace(\" \", \"_\", $name) . \".jpg\";\n}", "title": "" }, { "docid": "3f44dad590e9a7339b91a62932280629", "score": "0.5443589", "text": "public function __toString()\n {\n return '/' . $this->compile() . '/';\n }", "title": "" }, { "docid": "7fac24352e7419dedb9cedf84a6535a0", "score": "0.54390734", "text": "function getFullname($first_name,$last_name)\n {\n return \"Ten cua ban la : \" .$first_name .\" \".$last_name;\n }", "title": "" }, { "docid": "19fb4e97db336d4b9f5400ad4641dd69", "score": "0.5435635", "text": "private function buildPath()\n {\n $paths = [];\n\n foreach (func_get_args() as $arg)\n {\n if ($arg !== '')\n {\n $paths[] = $arg;\n }\n }\n\n return preg_replace('#(?<!:)/+#', '/', join('/', $paths));\n }", "title": "" }, { "docid": "1a8b181d2611028f2706182115f3fc67", "score": "0.5433597", "text": "protected function outputName()\n {\n $groupPart = empty($this->group) ? '' : \\strtoupper($this->group . '.');\n return \\strtoupper($groupPart . $this->getName());\n }", "title": "" }, { "docid": "3afb237b491862c9ad636f9d711c0c85", "score": "0.54306275", "text": "public function mosPathName($p_path, $p_addtrailingslash=true) {\r\n if (substr(PHP_OS, 0, 3) == 'WIN')\t{\r\n $retval = str_replace( '/', '\\\\', $p_path );\r\n if ($p_addtrailingslash AND substr( $retval, -1 ) != '\\\\') $retval .= '\\\\';\r\n // Remove double \\\\\r\n $retval = str_replace( '\\\\\\\\', '\\\\', $retval );\r\n }\r\n else {\r\n $retval = str_replace( '\\\\', '/', $p_path );\r\n if ($p_addtrailingslash AND substr( $retval, -1 ) != '/') $retval .= '/';\r\n // Remove double //\r\n $retval = str_replace('//','/',$retval);\r\n }\r\n return $retval;\r\n }", "title": "" }, { "docid": "1046300f7512a907488174f8614aee76", "score": "0.54289395", "text": "public static function safeName($name) {\n\t\t\tif(!preg_match('/^[A-Z_][\\.A-Z0-9_]*$/i', $name)){\n\t\t\t\t$pieces = explode('.', $name);\n\t\t\t\tforeach($pieces as $i => $piece) {\n\t\t\t\t\t$pieces[$i] = '`'. str_replace('`', '``', $piece) . '`';\n\t\t\t\t}\n\t\t\t\treturn implode('.', $pieces);\n\t\t\t} else {\n\t\t\t\treturn $name;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "42d3e656ddc6c0472d8de5b73eb43d7b", "score": "0.54246145", "text": "private static function _generatePathFromArray($aPath) {\n return implode('->', $aPath);\n }", "title": "" }, { "docid": "e2c7dcf82cb864e23008349a01c6aff2", "score": "0.541748", "text": "public function isDot () {}", "title": "" }, { "docid": "e2c7dcf82cb864e23008349a01c6aff2", "score": "0.541748", "text": "public function isDot () {}", "title": "" }, { "docid": "e2c7dcf82cb864e23008349a01c6aff2", "score": "0.541748", "text": "public function isDot () {}", "title": "" }, { "docid": "e2c7dcf82cb864e23008349a01c6aff2", "score": "0.541748", "text": "public function isDot () {}", "title": "" }, { "docid": "c0e2bd20806a31f21b035cfcdb5b4750", "score": "0.5415718", "text": "function getExtension($str) {\n $i = strrpos($str,\".\");\n if (!$i) { return \"\"; }\n $l = strlen($str) - $i;\n $ext = substr($str,$i+1,$l);\n return $ext;\n }", "title": "" }, { "docid": "c0e2bd20806a31f21b035cfcdb5b4750", "score": "0.5415718", "text": "function getExtension($str) {\n $i = strrpos($str,\".\");\n if (!$i) { return \"\"; }\n $l = strlen($str) - $i;\n $ext = substr($str,$i+1,$l);\n return $ext;\n }", "title": "" }, { "docid": "c0e2bd20806a31f21b035cfcdb5b4750", "score": "0.5415718", "text": "function getExtension($str) {\n $i = strrpos($str,\".\");\n if (!$i) { return \"\"; }\n $l = strlen($str) - $i;\n $ext = substr($str,$i+1,$l);\n return $ext;\n }", "title": "" }, { "docid": "de915344ba30aac375d66f7ba62b43bb", "score": "0.540485", "text": "function generate_get_min_suffix() {\n\t\treturn defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\t}", "title": "" }, { "docid": "8d84d394ec8dc6b6254019489a503586", "score": "0.54030305", "text": "function _phpFN($id){\n\t\tglobal $conf;\n\t\t$id = cleanID($id);\n\t\t$id = str_replace(':','/',$id);\n\t\t$fn = 'php/'.utf8_encodeFN($id).'.php';\n\t\treturn $fn;\n\t}", "title": "" }, { "docid": "cad1951e12149eb983868d65d552b4e2", "score": "0.5398355", "text": "function escapePath($str){\n return preg_replace('/ /', '\\ ', $str);\n }", "title": "" }, { "docid": "9eed3ce5282d4999a1005b11ffec66c8", "score": "0.53941506", "text": "function ourDeFormatNumber($aValue){\r\n\t $rs = str_replace(\".\",\"\",$aValue);\r\n\t //echo $rs;\r\n\t return ($rs);\r\n }", "title": "" }, { "docid": "e5f4732fac15fe84e1a2c18019986535", "score": "0.5393912", "text": "function full_name(){\n return \"$this->first_name\" . \" \" . $this->last_name . \"\\n\";\n }", "title": "" }, { "docid": "3e06f6af20569337365765c1e0bbab75", "score": "0.53931564", "text": "private function convertToDotName($fullClass)\n {\n $parts = explode(\"\\\\\", $fullClass);\n\n $class = end($parts);\n\n $name = preg_replace('/(?<=[a-zA-Z])([A-Z])(?=[a-zA-Z])/', '.$1', $class);\n\n return strtolower($name);\n }", "title": "" }, { "docid": "eb538cfb6c23bcff222172ba302fafdc", "score": "0.53926414", "text": "function getExtension($str) {\r\n $i = strrpos($str,\".\");\r\n if (!$i) { return \"\"; }\r\n $l = strlen($str) - $i;\r\n $ext = substr($str,$i+1,$l);\r\n return $ext;\r\n }", "title": "" }, { "docid": "b2fe2ab03c1865c44aced4f253919d98", "score": "0.5388266", "text": "function string() {\n $args = func_get_args();\n array_unshift($args, $this->basedir);\n return implode(DIRECTORY_SEPARATOR, $args);\n }", "title": "" }, { "docid": "814a6d23d2d67082e89e44997874f7a0", "score": "0.5384477", "text": "public function getNiceName(): string\n {\n $formatted = __($this->nice_name);\n\n return is_string($formatted) ? $formatted : '';\n }", "title": "" }, { "docid": "338f694c6e4b0984b9646eec3f77198b", "score": "0.5384411", "text": "protected function getConcatenator()\n {\n if (stripos($this->endpoint, \"?\") === false) {\n return \"?\";\n }\n return \"&\";\n }", "title": "" }, { "docid": "744c5ad57e007e3d8c38fae31a789133", "score": "0.5378591", "text": "public function testAppend()\n {\n $value = Util::append('something', '.ext');\n $this->assertEquals($value, 'something.ext');\n\n $value = Util::append('something.ext', '.ext');\n $this->assertEquals($value, 'something.ext');\n\n $value = Util::append('something.ext.else', '.ext');\n $this->assertEquals($value, 'something.ext.else.ext');\n }", "title": "" }, { "docid": "dbbad3f034fb23f408b0f7adbde523c0", "score": "0.5378057", "text": "function nen($numes)\n{\n return str_replace(',', '.', str_replace('.', '', $numes));\n}", "title": "" }, { "docid": "aaade5c1cd928a372e169ad22158cd1c", "score": "0.5377551", "text": "public static function f_main($name) {\n $_name = $_FILES[$name]['name'];\n $name_exploaded = explode('.', $_name);\n if(count($name_exploaded) > 1)\n unset($name_exploaded[count($name_exploaded) - 1]);\n return implode('.', $name_exploaded);\n }", "title": "" }, { "docid": "a5d8c6a33de252f55c82ee76104802d1", "score": "0.5375115", "text": "function slashes($str){\n\t\n\t\t$year = substr($str, 2, 2);\n\t\t$month = substr($str, 4, 2);\n\t\t$day = substr($str, 6, 2);\n\t\t\n\t\treturn $day.\"/\".$month.\"/\".$year;\n\t\n\t}", "title": "" }, { "docid": "78708feb89a0b4802fad4b6678a467bb", "score": "0.53744894", "text": "function __filename(&$model, $string) {\n\t\textract ($this->settings[$model->alias]);\n\t\tif (strpos($string,'{') !== false) {\n\t\t\t$string = low($this->_replacePseudoConstants($model, $string));\n\t\t}\n\t\t$string = str_replace('__dot__', '.', Inflector::slug(str_replace('.', '__dot__', $string)));\n\t\t$bits = explode('.', $string);\n\t\tif (count($bits) > 1) {\n\t\t\t$ext = low(array_pop($bits));\n\t\t} else {\n\t\t\t$ext = false;\n\t\t}\n\t\t$filename = $full = implode('.', $bits);\n\t\tif($ext) {\n\t\t\t$full .= '.' . $ext;\n\t\t}\n\t\t$this->__addReplace($model, '{$filenameOnly}', $filename);\n\t\t$this->__addReplace($model, '{$extension}', $ext);\n\t\t$this->__addReplace($model, '{$filename}', $full);\n\t\treturn array($filename, $ext, $full);\n\t}", "title": "" }, { "docid": "bbfc9f98c297226b4ae0729ce2190c6a", "score": "0.5370462", "text": "function format_path ($path): string {\n if ($path[0] == \".\") {\n $path = getcwd().\"/{$path}\";\n }\n\n $path = str_replace(['/', '\\\\'], DIRECTORY_SEPARATOR, $path);\n $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');\n $absolutes = [];\n foreach ($parts as $part) {\n if ('.' == $part) continue;\n if ('..' == $part) {\n array_pop($absolutes);\n } else {\n $absolutes[] = $part;\n }\n }\n return \"/\".implode(DIRECTORY_SEPARATOR, $absolutes);\n }", "title": "" }, { "docid": "253d1ac78d3200d9890cae5b9f0d30b6", "score": "0.53693515", "text": "function buildUniqueFileName($prefix, $extension) {\n return $prefix. microtime(true) .$extension;\n}", "title": "" }, { "docid": "652252df299457248289c8df5216e93a", "score": "0.53675425", "text": "function _insert_at_symbols_into_name($authval) {\n //search for first fullstop\n //search leftwards for space, split string there.\n $strlen = strlen($authval);\n $fullstoppos = strpos($authval, '.');\n $spacepos = strrpos($authval, ' ', $fullstoppos - $strlen); //subtraction gives a negative value, therefore searching leftwards\n $familyname = substr($authval, 0, $spacepos);\n $givenname = substr($authval, $spacepos + 1); //+1 to ignore space\n //recombine with @@ as separator\n return $familyname . '@@' . $givenname;\n}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "28d52a767c8274442f7420c8ed08afd0", "score": "0.0", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|unique:suppliers'\n ]);\n\n Supplier::create($request->all());\n\n return create_response();\n }", "title": "" } ]
[ { "docid": "08bf051ddd8fb321ee757b920958e19f", "score": "0.70976067", "text": "public function save()\n {\n if($this->saved()) $this->client->put($this->router->path($this->_id), $this->attributes);\n else {\n // create the resource\n $response = $this->client->post($this->router->path(), $this->attributes);\n $this->_id = $response['id'];\n $this->exists = true;\n }\n }", "title": "" }, { "docid": "1d53a1b85330dbd54b2110d38f49c072", "score": "0.681924", "text": "public function store() {\n\t\treturn $this->attemptEdit(new Resource(), true);\n\t}", "title": "" }, { "docid": "c3547b2773825a7810dd2d7be213c014", "score": "0.6804277", "text": "public function store()\n {\n try\n {\n $this->execute('Chenkacrud\\Resources\\ProcessResourceCommand');\n } catch (\\Exception $e)\n {\n dd('error');\n }\n }", "title": "" }, { "docid": "6842710d2e1af6b300f62eeb2e1bd88e", "score": "0.6769727", "text": "public function store(StoreResourceRequest $request)\n {\n $resource = new Resource;\n $resource->fill($request->all());\n\n if ($request->has('audio')) {\n $resource->audio = $request->audio->store('resources');\n }\n\n if ($request->has('document')) {\n $resource->document = $request->document->store('resources');\n }\n\n $resource->saveOrFail();\n\n return $this->api_success([\n 'data' => new ResourceResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "e51fa81f584f17798f0483bf328bf426", "score": "0.6717579", "text": "public function store()\n\t{\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\t\t//$input = Input::only(array_keys($this->resource->getFillableLabels())); //More safe, less convenient\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "title": "" }, { "docid": "42778db7569f0d4906b7ddc48c115b07", "score": "0.67087436", "text": "public function store()\n\t{ \n\t\t$resource = $this->resourceRepository->newResource();\n\t\t$manager = new ResourceManager($resource, Input::all());\n\n\t\t$manager->save();\n\t\t\n\t\treturn Redirect::route('resource')->with('successMessage', 'El recurso se ha guardado con éxito.');\n\t}", "title": "" }, { "docid": "ffb15df04a92a2bd0c39d006dbfccb17", "score": "0.6673047", "text": "public function store()\n {\n return $this->okResponse(\n new $this->resource(\n $this->service->store()\n )\n );\n }", "title": "" }, { "docid": "bf05263acc6d31d87c9ed0ed323947e0", "score": "0.6646847", "text": "public function store(string $storagePath): self;", "title": "" }, { "docid": "883aa81cab86540535ca6f5ce9f06662", "score": "0.65984905", "text": "public function store()\n {\n // Check whether the object has ever been stored.\n if ($this->isNew) {\n Logger::get()->debug('Storing new entity ' . get_class($this) . '...');\n // Create the record. Get an ID back.\n $this->id = $this->getDataSource()->create($this->getFieldsData());\n // Store this object in the appropriate factory for further use.\n $this->getFactory()->registerEntity($this);\n } else {\n Logger::get()->debug('Updating entity ' . get_class($this) . \":{$this->id}...\");\n $this->getDataSource()->update($this->id, $this->getFieldsData());\n }\n\n // Once stored, the entity is no longer new.\n $this->isNew = false;\n }", "title": "" }, { "docid": "682cf9175057b843f439d49243f35e43", "score": "0.65586984", "text": "public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->repository->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "title": "" }, { "docid": "594b28921afbb12a0e454c67e44f856f", "score": "0.64591277", "text": "public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->service->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "title": "" }, { "docid": "c4a6400468605f94c95346b88f6f2008", "score": "0.64513814", "text": "public function store(string $type, string $id, array $data) : StorageInterface;", "title": "" }, { "docid": "e0d7c11298835364d1614d7fbef2631c", "score": "0.6432668", "text": "public function store()\n {\n $data = (new TagValidator)->validate(request()->all());\n $title = Arr::get($data, 'title');\n\n try {\n // Database exception happened so tag not created\n Tag::query()\n ->create([\n 'title' => $title,\n ]);\n\n } catch (QueryException $e) {\n dump('===== Error =====');\n dump($e->getMessage());\n dump('===== Error =====');\n }\n\n $tag = optional(Tag::query()\n ->where('title', $title)\n ->first());\n\n // Links will create with no tag linked to it\n collect(Arr::get($data, 'links'))\n ->each(function ($link) use ($tag) {\n Link::query()\n ->create([\n 'title' => Arr::get($link, 'title'),\n 'url' => Arr::get($link, 'url'),\n 'tag_id' => $tag->id\n ]);\n });\n\n\n return TagResource::make($tag->load('links'));\n }", "title": "" }, { "docid": "5fe3bd8f1f685c0f002d9e7c106f705e", "score": "0.64026153", "text": "public function save($resource) {\n $stmt = $this->db->prepare(\"INSERT INTO resource (id, name, description, quantity, type)\n values (0,?,?,?,?)\");\n $stmt->execute(array($resource->getName(),$resource->getDescription(),$resource->getQuantity(),\n $resource->getType()));\n }", "title": "" }, { "docid": "96db6e3f6a4372c5200ed59ea22c5213", "score": "0.63912016", "text": "public function create() {\n $this->storage_dir->touch();\n $this->storage_file->touch();\n }", "title": "" }, { "docid": "94e2137d286af73e1907a20ffd26c05f", "score": "0.6390171", "text": "public function store(Request $request)\n\t{\n $validator = $this->validate($request, [\n \t//\n ]);\n\n try\n {\n \t$newResource = $this->repository->createResource($request->all());\n\n } catch(\\Exception $exception)\n {\n $this->flashErrorAndReturnWithMessage($exception);\n }\n\n // returns back with success message\n flash()->success('Your resource was added!');\n return redirect()->action('Admin\\Catalogue\\ResourcesController@index');\n\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": "e6a2ecff8be90a692566c0ac3bcd7773", "score": "0.6366602", "text": "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\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": "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": "8aec92e17d4ffebeefab6cee733407cb", "score": "0.6354979", "text": "public function store()\n\t{\n\t\t$data = Input::get();\n\n\t\t$item = $this->repo->create($data);\n\n\t\t$resource = new Item($item, $this->transformer);\n\n\t\treturn $this->response($resource, 201);\n\t}", "title": "" }, { "docid": "fa7c0a35fe78f5965a80622583f4e02b", "score": "0.63520324", "text": "public function store(Request $request)\n {\n $requestData = $request->all();\n unset($requestData[\"_token\"]);\n $requestData = json_encode($requestData);\n ResourcesService::postToResourcesTable($requestData);\n SyncService::SyncResourcesTable();\n return redirect('admin/resources')->with('flash_message', 'Resource added!');\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "546b8f72711b8412694a876ac960a51e", "score": "0.0", "text": "public function basic_ConfirmationEmail($user)\n {\n try{\n Mail::send('emails.kkk', [\"data\" => $user], function ($message) use ($user) {\n //$message->from('[email protected]', 'Baqalah.biz');\n $message->from('[email protected]', 'Baqalah Support');\n\n $message->to($user->Email, '')->subject('Account Verification');\n });\n }\n catch (\\Exception $e){\n return false;\n }\n\n return true;\n\n }", "title": "" } ]
[ { "docid": "f810559c966a6f2c87d7e75698b80a8e", "score": "0.76585895", "text": "public function edit(Resource $resource)\n {\n //\n $this->authorize('update', $resource);\n $pages = Page::all();\n return view('resource.edit', compact('resources','pages'));\n }", "title": "" }, { "docid": "c27b7f061b14b3c5c61c337e63783752", "score": "0.759154", "text": "public function edit(Resource $resource)\n {\n $tags = convert_tags_to_string($resource);\n\n return view('resource.edit', ['resource' => $resource, 'tags' => $tags]);\n }", "title": "" }, { "docid": "ca645ebeda02bf966ffbaad2c71250d4", "score": "0.74312454", "text": "public function edit($id) {\n return view('acl::resource.edit', [\n 'id' => $id,\n 'resource' => Resource::find($id)\n ]\n );\n }", "title": "" }, { "docid": "f8bd9e82b8ee3d8f3f2608a73be27803", "score": "0.7401273", "text": "public function edit($id){\n $resource = Resources::find($id);\n\n return view('members.resources.resourceEdit', compact('resource'));\n }", "title": "" }, { "docid": "bc0bd96680ee02ddbc9334c953e42dda", "score": "0.73810554", "text": "public function page_productEdit($resource)\n {\n\n $this->_pageContent['productInfo'] = $resource;\n\n $this->_myPage = \"page_productForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "16f9d8e3ea1972347bf2f38afa73ab77", "score": "0.7339075", "text": "public function edit($id)\n {\n $resource = $this->prepResource('update', $id);\n $this->showBreadcrumb($resource, [$resource->routeExist('show') ? $resource->routeShow($id) : $resource->routeEdit($id) => $resource->getCaption(), null => 'Edit']);\n\n return $this->view(compact('resource'));\n }", "title": "" }, { "docid": "462e1860fc17aa64cba32eedec85d271", "score": "0.7111798", "text": "function edit($resource_id=NULL)\n\t{\n\t\t# Although the Edit item only appears in the menu for contributors and admins, \n\t\t# user could reach it from URL editing\n\t\t// echo $this -> uri -> segment(2);\n\t\tif (! ( ($this->ion_auth->is_admin() || $this->ion_auth->in_group('contributor') ) ) ) \n\t\t{\n \t\t# redirect them to the home page \n\t\t\t# TO DO: redirect to a page with a message saying that they're not a contributor\n\t\t\tredirect('home', 'refresh');\n \t}\n\t\t\n\t\t// define some vars to pass to the nav and page views\n\t\t$data['title'] = \"Global Health: edit resource\";\n\t\t$data['heading'] = \"Edit resource\"; \t\t\n\t\t// for <meta> tags and DC\n\t\t$data['description'] = \"\";\n\t\t$data['keywords'] = \"\";\n\t\t$data['active_topnav'] = \"\"; \n\t\t$data['active_leftnav'] = \"Edit resource\"; // active menu item\n\t\t$data['active_submenu'] = \"Edit\"; \n\t\t$data['message'] = \"\";\n\t\t$data['error'] = \"\";\n\t\t\n\t\t# If a resource has been chosen in the editchooseview view, the ID will\n\t\t# be passed in POST, so get it then re-call this controller, invoking \n\t\t# the resource method with the ID\n\t\tif (isset($_POST['resource_id']))\n\t\t{\n\t\t\t$resource_id = $_POST['resource_id'];\n\t\t\tredirect(\"resource/edit/$resource_id\", 'refresh');\n\t\t}\n\t\t# ...else if there's a resource_id in the URL, display the edit form\n\t\t# for that resource. If the segment doesn't exist FALSE is returned.\n\t\telseif (is_null($resource_id))\n\t\t{\n\t\t\tredirect(\"resource/choose/\", 'refresh');\n\t\t}\n\t\t# If nowt in POST, just display the choose resource to edit view\n\t\telse\n\t\t{\n\n\t\t}\n\t\t\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t$resource_title = $q -> row() -> title;\n\t\t$data['resource__id'] = $resource_id; \n\t\t# Get the user ID to save as record editor\n\t\t$user_id = $this->ion_auth->user()->row()-> id;\t\t\n\t\t# Populate form elements.\n\t\t# Get full resource record first \n\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t\n\t\t# Populate form elements. \n\t\t# Call function in ResourceDB_model to get subject areas\n\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t# by existing resources\n\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t# Get key areas (aka top level categories) and shove into an array\n\t\t# Query returns * in key_areas table (id, title, description)\n\t\t$data['keyarea_query'] = $this -> ResourceDB_model -> get_key_areas();\n\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t$old_subjects_ary = array();\n\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t{\n\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t}\n\t\t# Pass currently attached subjects to the view page\n\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\n\t\t# Note parameter in function call - this will return all types, not just those 'in use', \n\t\t# which is important for an insert form.\n\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types(FALSE);\n\t\t\n/* \t\t# -- SUBJECTS ---\n\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t# by existing resources\n\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t$old_subjects_ary = array();\n\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t{\n\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t}\n\t\t# Pass currently attached subjects to the view page\n\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\n\t\t\n*/\n\t\t\n\t\t# -- RESOURCE TYPES ---\n\t\t# False param returns all resource types, not just those 'in use'\n\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types(false);\n\t\t\n\t\t# -- TAGS --\n\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t$old_tags_ary = array();\n\t\tforeach ($tags_query -> result() as $row)\n\t\t{\n\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t}\n\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\n\t\t# ==== FORM VALIDATION ======\n\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t# validation rules, hence a rule for all elements below. See CI Forum thread at:\n\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t# sqare brackets, as just checking for the title existing would always \n\t\t# return true - we need to check that the edited title exists or not. \n\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean\");\n\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('subjects', 'Categories', 'required');\t\t\n\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\n\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t# (re)populate with user data\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t# Load page data into template - the view will be called at function end\n\t\t\t$template['content'] = $this -> load -> view('resource/edit_view', $data, TRUE);\n\t\t}\t\n\n\t\t# If form validates, update record\n\t\telse\n\t\t{\n\t\t\t# Get form values for fields in gh_resource table\n\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t# DATETIME data type\n\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\n\t\t\t$record_data = array (\n\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t'author' => $_POST['author'], \n\t\t\t\t\t\t\t//'source' => $_POST['source'], \n\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t# Run update query in model\n\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\n\t\t\t# TAGS\n\t\t\t# First, get tag(s) user's inserted. \n\t\t\tif (!empty($_POST['tags']))\n\t\t\t{\n\t\t\t\t$tags = $this -> input -> post('tags');\n\n\t\t\t\t# ...then split string by the comma delimiter...\n\t\t\t\t$tags_ary = explode(',', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from resource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> id;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t}\n\t\t\t\n\t\t\t# SUBJECTS\n\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t# empty array so as not to generate a runtime error\n\t\t\tif (isset($_POST['subjects']))\n\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\telse\n\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t{\n\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t}\n\n\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t{\n\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t}\n\n\t\t\t\n\t\t\t# Set messages etc for the result page\n\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t# Load results page with data array\n\t\t\t$template['content'] = $this->load->view('resource/edit_result_view', $data, TRUE);\t\t\n\t\t} // end if validates\t\n\t\t\n\t\t# Display form or update results\n\t\t$this -> load -> view ('template2_view', $template);\n\t\t# Load TinyMCE editor\n\t\t$this -> load -> view('tinymce_script_view');\t\n\t\t# Load tag plugin script\n\t\t$this -> load -> view('resource/tag_plugin_view');\n\t\t# Load confirmation script for 'are you sure?' dialogue on delete\n\t\t$script_data['text'] = \"\\\"Do you really want to delete this resource record? You cannot undo this action.\\\"\";\n\t\t$this -> load -> view('confirm_script_view', $script_data);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "00ef184427d07695b1e8fc0c22e82b41", "score": "0.7083047", "text": "public function edit()\n {\n return view('manager::edit');\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.70471513", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "436839a6b183921cefd8e08a9530aab9", "score": "0.70336676", "text": "function edit( $resource ){\n\n $customer = get( 'customers', $resource );\n\n return view( '', compact( 'customer' ));\n}", "title": "" }, { "docid": "687719d7fbd10fee5075a252fb8ed0a2", "score": "0.7031539", "text": "public function edit(Resource $resource)\n {\n $icons = Icon::all();\n $logo = Logo::first();\n return view('pages.bo.services.serviceEdit',compact('resource', 'icons', 'logo'));\n }", "title": "" }, { "docid": "c1333e15861ffed0d228237f46dc6774", "score": "0.69906336", "text": "function edit()\n\t{\n\t\t$this->get($this->id(),2);\n\t\t$this->editing(true);\n\t}", "title": "" }, { "docid": "c0d211d253e2cdb5e3aa0b701a09d8fe", "score": "0.6970446", "text": "public function page_userEdit($resource)\n {\n\n $this->_pageContent['userInfo'] = $resource;\n\n $this->_myPage = \"page_userForm.tpl\";\n\n // call show page\n $this->htmlStream();\n }", "title": "" }, { "docid": "7bfd0448802c70ea9c26b14afbc29a51", "score": "0.6967585", "text": "public function edit() {\n\t\t\tif(isset($this->id)) {\n\t\t\t\t$this->returnView($this->model->edit($this->id));\n\t\t\t} \n\t\t\telse {\n\t\t\t\terror404();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "83b72662162c1c99a4a9ec1b7b4e6edc", "score": "0.69612134", "text": "public function show_editform()\n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "541b62a47416bd843be17728e23bc59c", "score": "0.6953202", "text": "public function edit($id)\n\t{\n\t\t$filter = array(\n\t\t\t'name' \t\t\t=> Input::get('name'),\n\t\t\t);\n\n\t\t$resourceById = Resource::find($id);\n\t\t$resources = Resource::where(function($query){\n\t\t\tif(Input::get('name', null))\n\t\t\t\t$query->where('name', 'LIKE', '%' . Input::get('name') . '%');\n\t\t})\n\t\t->orderBy('name', 'asc')\n\t\t->paginate();\n\t\t$index = $resources->getPerPage() * ($resources->getCurrentPage()-1) + 1;\n\t\treturn View::make('resource.edit')\n\t\t\t->with(array(\n\t\t\t\t'resources'=> $resources,\n\t\t\t\t 'resourceById' => $resourceById,\n\t\t\t\t 'index'\t\t=> $index,\n\t\t\t\t 'filter'\t\t=> $filter\n\t\t\t\t ));\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "480e68fe244baf956aaee5a92b28179a", "score": "0.69229615", "text": "public function edit($id)\n {\n /** Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /** Check if logged in user is authorized to make this request */\n $this->authorize('update', [\n $resource\n ]);\n\n /** Set the message headers */\n $message = [\n 'to' => $resource->recipients->pluck('id'),\n 'subject' => $resource->subject,\n 'body' => $resource->body,\n ];\n\n /** Displays the edit resource page */\n return view('admin.' . $this->name . '.edit')\n ->with('resource', $resource)\n ->with('name', $this->name)\n ->with('message', $message);\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "ae53e150e2ac4fae5c0e64d490dc364b", "score": "0.69077027", "text": "public function edit($id)\n {\n $ModelName = $this->getModelName();\n $entity_name = $this->getEntityName();\n\n $record = $ModelName::findOrFail($id);\n\n return View::make('admin.' . str_plural($entity_name) . '.edit')\n ->with($entity_name, $record)\n ->with($this->getRelationshipFields());\n }", "title": "" }, { "docid": "692e66486df9d8bf243ddc6ad57df6db", "score": "0.6902988", "text": "public function edit($id)\n {\n $this->authorize('update', [$this->entity_repository, $id]);\n $entity = $this->entity_workflow->edit($id);\n return view('entity_edit', compact('entity')); //ayto DEN tha to exw sto restful_crud code generation\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "5c928fff942d0cfe3b2191927392941a", "score": "0.68704987", "text": "public function editForm()\n\t{\n\t\t$layout = $this->input->get('layout', null, 'string');\n\t\t$nameModelForm = (empty($layout)) ? $this->nameKey . 'form' : $layout . 'form';\n\t\t$layout = (empty($layout)) ? 'edit' : 'edit_' . $layout; \n\t\t$view = $this->getView($this->default_view, JFactory::getDocument()->getType(), '', array(\n\t\t\t'layout' => $layout\n\t\t));\n\t\t$view->setModel($this->getModel($this->nameKey));\n\t\t$view->setModel($this->getModel($nameModelForm));\n\t\t$view->editForm();\n\t}", "title": "" }, { "docid": "0203676e2eea2cba44d07a5b31307075", "score": "0.6842875", "text": "public function edit()\n {\n return view('dev::edit');\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "5abb2c0d314013941d44e2af19a6e1b2", "score": "0.683265", "text": "public function edit($id) {\n $form = $this->formCRUD->find_form($id);\n $this->load->view('theme/header');\n $this->load->view('formCRUD/edit',array('form'=>$form));\n $this->load->view('theme/footer');\n }", "title": "" }, { "docid": "d99e4eb994fac5d81b537cf4065d860a", "score": "0.6818386", "text": "public function editAction()\n {\n $id = (int) $this->getRequest()->getParam('id');\n Mage::register('current_questions', Mage::getModel('oggetto_faq/questions')->load($id));\n $this->loadLayout()->_setActiveMenu('oggetto_faq');\n $this->_addContent($this->getLayout()->createBlock('oggetto_faq/adminhtml_faq_edit'));\n $this->renderLayout();\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68022823", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "3dc27b29583d035b599fe54604b6daf2", "score": "0.67940915", "text": "public function edit($id)\n\t{\n\t\t$resourcetype = Resourcetype::find($id);\n\n\t\treturn View::make('resourcetypes.edit', compact('resourcetype'));\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "18af0570d7d5565bf33c445b2a110d76", "score": "0.678326", "text": "public function edit($id)\n\t{\n\t\treturn \"Edit a form\";\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6763203", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "112f460c8f2a4cf9f1c4aa73d88299c0", "score": "0.67533964", "text": "public function edit($id)\n {\n $form = Form::findOrFail($id);\n $form = form_accessor($form);\n $data = [\n 'title' => 'Edit',\n 'method' => 'put',\n 'action' => url('account/forms/' . $id),\n 'form' => $form,\n 'component_name_map' => array_merge(Form::$componentNameMap['left'], Form::$componentNameMap['right'])\n ];\n return view('content.account.forms.create-edit', $data);\n }", "title": "" }, { "docid": "d4c5c17930926329b1e22e3611608cee", "score": "0.6750425", "text": "public function edit()\n {\n $volunteerJobId = Helper::getIdFromUrl('volunteerjob');\n $volunteerJob = VolunteerJobModel::load()->get($volunteerJobId);\n\n Helper::checkIdsFromSessionAndUrl($volunteerJob->user_id);\n\n View::render('volunteerjobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/volunteerjob/' . $volunteerJobId . '/update',\n 'volunteerjob' => $volunteerJob\n ]);\n }", "title": "" }, { "docid": "9a10b30017d016b9d98477af86b62da9", "score": "0.6731764", "text": "public function edit(Form $form)\n {\n return view('form.edit', compact('form'));\n }", "title": "" }, { "docid": "444f98d0090cda3d8ec6a32c569483fe", "score": "0.6730375", "text": "public function edit()\n {\n return view('item::edit');\n }", "title": "" }, { "docid": "03ac97aa9bc02aa1c7056da56a66fc93", "score": "0.67284465", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Record')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Record entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Record:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c392a7017c2b6cc02ed9b4c0630f20ed", "score": "0.6726397", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "26bb68bb8f5ec9cc8e61b7a5e6902d51", "score": "0.672611", "text": "public function editAction()\n {\n return $this->addOrEdit('edit');\n }", "title": "" }, { "docid": "2fa25e04d9730c28170ec243a44454d6", "score": "0.67249113", "text": "public function edit($id)\n {\n $admin = $this->administador;\n $title = 'Editar administrador';\n $form_data = ['route' => ['admin.administrador.update',$this->administador->id],'method' => 'PUT'];\n return view('admin.administrador.form')->with(compact('admin','form_data','title'));\n }", "title": "" }, { "docid": "6029dd897b1c8f37a564dd8d339a6700", "score": "0.67143613", "text": "public function edit($id)\n {\n $subjects = Subject::all();\n $collections = Collection::all();\n $resource = Resource::find($id);\n return view('admin.resources.edit', compact('resource','subjects','collections'));\n }", "title": "" }, { "docid": "e5e830d61bdd5b24a06755b5955b9294", "score": "0.66952914", "text": "public function edit($id)\n {\n $pooja = Poojaas::find($id);\n return view('admin.poojas.editForm',['menu'=>'4','pooja'=>$pooja]);\n }", "title": "" }, { "docid": "664d31fb91ae9ed1c67f8f8130c44637", "score": "0.6693591", "text": "public function edit($id)\n {\n $employee = $this->employeeRepository->findOrFail($id);\n\n return view('panel.employee.form', [\n 'employee' => $employee,\n 'documents' => $this->getDocuments(),\n 'selectedDocuments' => $this->employeeRepository->listIdDocuments($id),\n 'companies' => $this->getCompanies(),\n 'selectedCompanies' => $this->employeeRepository->listIdCompanies($id),\n 'states' => $this->states,\n 'route' => 'employee.update',\n 'method' => 'PUT',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Atualizar')\n ]);\n }", "title": "" }, { "docid": "72520d735eee1df0929570294fe6727a", "score": "0.66925275", "text": "public function edit($id)\n {\n if(Gate::denies($this->resource.'-update'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n $item = $this->model::find($id);\n\n if(!isset($item))\n return $this->backOrJson(request(), 'item_not_found', 'crud.item-not-found');\n \n if($this->onlyMine && Gate::denies('mine', $item))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $this->addToView($this->options($item));\n \n return request()->wantsJson() \n ? $item\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('item', 'label', 'title', 'icon')));\n }", "title": "" }, { "docid": "f6e0eeed266da7c21e16df553b4abe30", "score": "0.6692456", "text": "public function edit($id){\n $model = new $this->model;\n $model = $model->find($id);\n return View::make('form.edit', compact('model'));\n }", "title": "" }, { "docid": "bf49bc8226e13e2862c2259d16e93588", "score": "0.6680715", "text": "public function edit($id)\n {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }", "title": "" }, { "docid": "04940e3eb1b0bdb3eba0fb05f8254b27", "score": "0.66792357", "text": "function edit() {\r\n $this -> display();\r\n }", "title": "" }, { "docid": "ff9d0f1f39dddbbfb9b90aaa18217f06", "score": "0.6676591", "text": "public function showEdit()\n {\n $task = new TaskModel();\n $taskId = filter_input(INPUT_POST, 'id');\n $view = new View();\n $view->render('task_edit_view.php', 'default_view.php');\n $task->getTaskById($taskId);\n }", "title": "" }, { "docid": "6a173642cfc904aa993c4c5ec090a9c1", "score": "0.66722536", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormationFrontBundle:Formation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Formation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FormationAdminBundle:Formation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "e93e5a7b2d3281b57823696586572b44", "score": "0.6663701", "text": "public function edit()\n {\n return view('insurance::edit');\n }", "title": "" }, { "docid": "e12e61afec6117ea96b6103dec4dfafb", "score": "0.66596234", "text": "public function edit($id)\n {\n return view('post::forms');\n }", "title": "" }, { "docid": "3c0a48f35d98dc8d1b03a7edd73c99aa", "score": "0.665629", "text": "public function edit($id)\n {\n return view('softether::edit');\n }", "title": "" }, { "docid": "fb9fada09a2381e81983f10ccc266fe8", "score": "0.6654141", "text": "public function edit($id)\n {\n $items = $this->model->where('id','!=',$id)->get();\n $item = $this->model->find($id);\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'item' => $item,\n 'essence' => $this->essence,\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "5ee97cd51477ad520224ac2a1fab98d9", "score": "0.66515166", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CumtsMainBundle:Show')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Show entity.');\n }\n\n $editForm = $this->createForm(new ShowType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CumtsAdminBundle:Show:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "7696ddc01688530a06b8f6b1b1e2b7cb", "score": "0.6647159", "text": "public function edit($id)\n {\n //\n $id = $this->route->getParameter('id');\n $model = $this->hospitalesRepo->find($id);\n \n return view('hospitales.form',compact('model'));\n }", "title": "" }, { "docid": "503c64be303ecd03ee2b721a741f8efc", "score": "0.66430277", "text": "public function edit()\n\t{\n\t\t$this->auth->restrict('DM_Preparedness.Content.Create');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif(empty($id)) {\n\t\t\t// New record\n\t\t\tTemplate::set('formView', $this->showEditor());\n\t\t} else {\n\t\t\t// Existing record\n\t\t\tTemplate::set('formView', $this->showEditor($id));\n\t\t}\n\n\t\tTemplate::set('toolbar_title', lang('dm_preparedness_edit') .' DM Preparedness');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "a35bc99f8c25aa274b588a4b001efbac", "score": "0.6642428", "text": "public function edit($id)\n {\n $fom = Formm::find($id);\n return View::make('form.edit',compact('fom'));\n }", "title": "" }, { "docid": "e8cae06a05d236b8611e5b194566db50", "score": "0.6634301", "text": "public function edit($id)\n {\n //\n\n\n $persons = Person::findOrFail($id);\n\n //highlight sidebar\n $this->setActiveParent();\n\n //null = current request\n $form_fields = DynamicForm::form_fields('edit', $persons, null, Person::form_fields() );\n\n return view('persons.edit', compact('form_fields', 'persons') );\n\n }", "title": "" }, { "docid": "7ebc3ae9eb2995b615edac942a9302ef", "score": "0.66311395", "text": "public function edit($id) {\n $prefectures = Prefecture::pluck('display_name','id');\n $prefectures[''] = '';\n $company = Company::where('id',$id)->first();\n $company->form_action = $this->getRoute() . '.update';\n $company->page_title = 'Company Edit Page';\n $company->prefectures = $prefectures;\n // Add page type here to indicate that the form.blade.php is in 'edit' mode\n $company->page_type = 'edit';\n return view('backend.companies.form', [\n 'company' => $company\n ]);\n }", "title": "" }, { "docid": "a58284e14c88a606668feb06103d3539", "score": "0.6629659", "text": "public function edit($id)\n\t{\n\t\t// get the Administrador\n\t\t$administradores = Administrador::find($id);\n\n\t\t\n\t\t// show the edit form and pass the Administrador\n\t\t$this->layout->content = View::make('Administrador.edit')\n->with('administradores', $administradores);\n\t}", "title": "" }, { "docid": "2fb5c281d7d88e78e7e77d412ec633cc", "score": "0.66276693", "text": "public function edit($id)\n {\n $project = Project::findOrFail($id);\n return view('admin.forms.form_project', [\"project\" => $project]);\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "2f00a5b5f71f61a4c34f37c428ae3061", "score": "0.6626582", "text": "public function edit($id)\n {\n $entity = $this->crud->getRepository()->findOrFail($id);\n\n $form = $this->crud->getEditFormClass();\n\n if ($form) {\n $form = FormBuilder::create($form, [\n 'method' => 'patch',\n 'model' => $entity,\n 'route' => [$this->crud->getRouteByMethod('update'), $id],\n ]);\n }\n\n return view($this->crud->getViewByMethod('edit'))\n ->with('entity', $entity)\n ->with('form', $form)\n ->with('crud', $this->crud);\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.66259205", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "7b25948b2cb4ca65ae5501eab2bf6b75", "score": "0.6625509", "text": "public function edit($id)\r\n {\r\n $user = User::find($id); \r\n \r\n // show the edit form and pass the shark\r\n return View('frontend.form_users')\r\n->with('user', $user)\r\n ->with('update',true)\r\n ;\r\n }", "title": "" }, { "docid": "7d175ca825cbe048b738bd7976f8de67", "score": "0.6624655", "text": "public function edit(Form $form)\n {\n return view('admin.form.edit', compact('form'));\n }", "title": "" }, { "docid": "2e857827ad8b86ed049c66e1b290cf8f", "score": "0.6622313", "text": "public function edit($id) {\n\t\t$contact = Contact::find($id);\n\t\t$form_fields = $this->getFormFields('Contact');\n\t\t$this -> layout -> content = View::make('admin.contacts.edit', compact('contact','form_fields'));\n\t}", "title": "" }, { "docid": "2a65944b9a357cefcd45e5edab8ccbd3", "score": "0.66182107", "text": "public function edit($id)\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos')) return $this->accessFail();\n\t\t\n $objeto = $this->objetoRepo->find($id);\n\n $this->notFoundUnless($objeto);\n\t\t\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => array('objetos.update', $objeto->Obj_Id), 'method' => 'PATCH');\n $action = '';\n\t\tif ( \\Util::getAccess('Objetos', 'Update')) $action = 'Actualizar';\t\n\t\tif ( \\Util::getAccess('Objetos', 'Delete')) $action = 'Eliminar';\t\n\t\t$action_label = \\Lang::get('utils.Actualizar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}", "title": "" }, { "docid": "76648b4106d5f9fb3fccadf6ba8ad7e1", "score": "0.66175586", "text": "public function edit()\n {\n return view('counterrace::edit');\n }", "title": "" }, { "docid": "5d979456b1516a2847c2d079fb4641a2", "score": "0.66171396", "text": "public function edit($id)\n {\n $company = $this->company_model->findOrFail($id);\n $data = [\n 'title' => \"Company Form\",\n 'company' => $company,\n 'method' => \"PUT\",\n ];\n return view('company.company_form', $data);\n }", "title": "" }, { "docid": "05d425274b6655a0bc8a6a2e30c40a2a", "score": "0.66161895", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->history->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['history' => $this->history, 'history_types' => $this->history_types]);\n\t}", "title": "" }, { "docid": "d82133b3b27967ec923f49fef0687720", "score": "0.6615583", "text": "public function edit($id)\n {\n $product = Product::findOrFail($id);\n return view('manage.update',compact('product'));\n }", "title": "" }, { "docid": "d615d8d8a4d8f4cf935c141dac481476", "score": "0.6613157", "text": "public function edit($id)\n {\n\n $this->init();\n\n $this->pre_edit($id);\n\n $model = \"App\\\\\" . $this->model;\n $data = $model::find($id);\n $action = $this->action;\n $view = $this->model;\n\n\n $form = $model::edit_form($data);\n\n $form['data']['action'] = $action . \"/\" . $id;\n $form['data']['heading'] = \"Edit \" . str_singular($this->model) . \": \" . $id;\n $form['data']['type'] = \"edit\";\n $form['data']['submit'] = \"Update\";\n\n\n return view('tm::forms.add',compact( \"form\", 'action','view'));\n }", "title": "" }, { "docid": "362c7ddf2a5fb0999d07dbd6072a97d0", "score": "0.6612507", "text": "public function edit(int $id)\n {\n if (auth()->user()->user_type_id == 0){\n return redirect('/admin/resources')->with(['error' => 'Unauthorized!']);\n }\n $subjects = $this->Subject->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $courses = $this->Course->GetAllAndOrder('name', 'asc')->pluck('name', 'id');\n $model = $this->Resource->GetByID($id);\n if ($model == null) {\n return redirect('/admin/resources')->with(['error' => 'Resources not found!']);\n }\n return view(\"admin.cresources.edit\")->with(['active'=>'resource', 'subactive'=>'resource', 'model'=>$model, 'subjects'=>$subjects, 'courses'=>$courses]);\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "e85fde44c8e1c9ec2d404615e7636756", "score": "0.66006833", "text": "public function editAction()\n {\n $projectCatalog = ProjectCatalog::getInstance();\n $idProject = $this->getRequest()->getParam('idProject');\n $project = $projectCatalog->getById($idProject);\n $post = array(\n 'id_project' => $project->getIdProject(),\n 'type' => $project->getType(),\n 'status' => $project->getStatus(),\n );\n $this->view->post = $post;\n $this->setTitle('Edit Project');\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "4447b0652f435f99829824829c7ac505", "score": "0.6596689", "text": "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Theme_Service_Rom::getRom(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t}", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6588934", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "5804dcb2b9a17ff737a0b3c87eb000a8", "score": "0.6586884", "text": "public function edit($id)\n {\n if (Auth::user()->role == 'member') {\n dd('Member are not allowed to do this, how did you get here?');\n }\n else {\n $product = Product::find($id);\n return view('products.edit_form')->with('product', $product)->with('manufacturers', Manufacturer::all());\n }\n }", "title": "" }, { "docid": "b223a48c110d536d3f8537b6f881e5fe", "score": "0.6586317", "text": "public function editAction()\n {\n $this->_edit();\n $this->view->form = $this->_getFormUserProfile();\n }", "title": "" }, { "docid": "1cb6fa968962bdd3b01e45725d7d5362", "score": "0.6584201", "text": "public function edit($id)\n {\n $data['title'] = 'Why Epic Update'; \n $data['menu'] = 'why_epic';\n $data['sub_menu'] = 'why_epic_list';\n $data['why_epic'] = WhyEpic::find($id);\n return view('backend.why_epic.why_epic_edit', $data);\n }", "title": "" }, { "docid": "f5e69f73a0fbafc4fb91b2ce43c99bfa", "score": "0.6580334", "text": "public function edit($id){\n $student = Student::find($id);\n return view('admin.student.formEditStudent',compact('student'));\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.6576812", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "10b974335aefccd5bc654e311f5a26c9", "score": "0.65767276", "text": "public function edit($id) {\n $nerd = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('product.edit')\n ->with('product_detail', $nerd);\n }", "title": "" }, { "docid": "9b8d2c73bfa22d48146bec75330e17c2", "score": "0.65694124", "text": "public function showResource($id) {\n $resource = Resource::find($id);\n return view('update_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "e94d3986cbe8d66a1574a1189feed48a", "score": "0.6567517", "text": "public function edit($id)\n\t{\n\t\t//find farm\n\t\t$farm =\t$this->farmRepository->findById($id);\n\t\treturn View::make('farm.edit',compact('farm'));\n\t}", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6563645", "text": "public function actionEdit() { }", "title": "" }, { "docid": "366b0ea03383346dfc3f2d2ae42b6888", "score": "0.6563147", "text": "public function edit($id)\n {\n $company = Companies::find($id);\n\n // show the edit form and pass the shark\n return view('admin.company.edit')\n ->with('company', $company);\n }", "title": "" }, { "docid": "03ca41bdd92d6efaae461cb601c3cb8a", "score": "0.6563086", "text": "public function edit($id)\n {\n $format = Format::findOrFail($id);\n $controls = [\n [\n 'type' => 'text',\n 'name' => 'title',\n 'title' => 'Название',\n 'placeholder' => 'Введите название'\n ],\n ];\n\n return view('control-form.edit', [\n 'title' => 'Редактировать формат',\n 'controls' => $controls,\n 'route_update' => 'format.update',\n 'item' => $format,\n ]);\n }", "title": "" }, { "docid": "a415921fd3d313f235be8f9067dc927c", "score": "0.6560566", "text": "public function edit($id)\n\t{\n\t\t$job = Job::find($id);\n\t \n\t \n\t\treturn view('admin.job.edit', compact('job'));\n\t}", "title": "" }, { "docid": "6142999594166128c9323deb1a39a478", "score": "0.6557391", "text": "public function editAction()\n {\n // action body\n\t\t$contact = $this->createContact(isset($_POST['submit']) ? $_POST : array('id' => $this->_getParam('id')));\n\n\t\t$form = $this->createForm($contact);\n\n\t\t$this->view->form = $form;\n\n\t\tif(isset($_POST['submit']))\n\t\t{\n\t\t\tif($form->isValid($_POST))\n\t\t\t{\n\t\t\t\t$contact = $this->createContact($_POST);\n\n\t\t\t\t$contact->save();\n\t\t\t\t$this->_helper->getHelper('FlashMessenger')->addMessage('Contact Updated.');\n\t\t\t\t$this->_redirect('/contacts');\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "7c50e3dedd440fee2b41e80896671eb9", "score": "0.65533197", "text": "public function edit()\n {\n return view('document::edit');\n }", "title": "" }, { "docid": "4fa0e28ffbd3c3cea5f69cf7391f91f7", "score": "0.6552931", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\t\treturn view('employees.edit', compact('employee'));\n\t}", "title": "" } ]
7b2535d43e149b8e5caf17ff507fb12e
Method to set the value of field upd_pg_id
[ { "docid": "1338cefb0c7dcee61d9e50aac8b31eae", "score": "0.6669787", "text": "public function setUpdPgId($upd_pg_id)\n {\n $this->upd_pg_id = $upd_pg_id;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "6ede5dcac79180ad675c46d6b5fe2f30", "score": "0.6766844", "text": "public function getUpdPgId()\n {\n return $this->upd_pg_id;\n }", "title": "" }, { "docid": "6ede5dcac79180ad675c46d6b5fe2f30", "score": "0.6766844", "text": "public function getUpdPgId()\n {\n return $this->upd_pg_id;\n }", "title": "" }, { "docid": "9c777151768cb15f2d3c75db89098461", "score": "0.6234357", "text": "public function setGid(int $gid) : void {\n $this->gid = $gid;\n $this->updateLastMetadataModified();\n }", "title": "" }, { "docid": "0ffb28424a5eb71539f0b7f960313939", "score": "0.5633743", "text": "function set_paginagroep_id($val){\n\t\t$this->paginagroep_id = $val;\n\t}", "title": "" }, { "docid": "a3e9dbd4d6d839e441b3da4c6bb25f7b", "score": "0.5625753", "text": "Public function set_id_galop ($idg)\n\t\t\t{\n\t\t\t\t $this-> id_galop = $idg;\n\t\t\t}", "title": "" }, { "docid": "873a07fb61c6a3335e5a7134b9591cc6", "score": "0.5562061", "text": "function SetFieldID($fieldID, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue ( 'fieldID', $fieldID, $dbupdate );\n\t}", "title": "" }, { "docid": "17a0cf5374524138b101354e8af72c51", "score": "0.5529325", "text": "public function pg()\n\t{\n\t\t$this->pg = isset($_GET[$this->pg_query_var]) && is_numeric($_GET[$this->pg_query_var]) ?\n\t\t\t(int) $_GET[$this->pg_query_var] : 1;\n\t}", "title": "" }, { "docid": "637b83fb96f91e442852fe34b3dcd19b", "score": "0.54895866", "text": "public function setPid($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->pid !== $v) {\n\t\t\t$this->pid = $v;\n\t\t\t$this->modifiedColumns[] = TxMklvcommunityFeUsersFeGroupsMmPeer::PID;\n\t\t}\n\n\t}", "title": "" }, { "docid": "009d384867dce3369c4ea2f5e7632d01", "score": "0.5480164", "text": "function SetFieldID($fieldID, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue('fieldID', $fieldID, $dbupdate);\n\t}", "title": "" }, { "docid": "1bf0be00ea2b04b0fddbfa5c3b7604f6", "score": "0.54309", "text": "public function SetPackageID($id=NULL) {\n\t$this->SetValue('ID_Pkg',$id);\n }", "title": "" }, { "docid": "81b4368cead5cc545f56a03855a11582", "score": "0.53419805", "text": "function _set_id( $post ){\n \t\t$this->post = $post;\n }", "title": "" }, { "docid": "71b539e5a231fc940e27db35f063e47b", "score": "0.5293828", "text": "function setProcessId($pid) {\n $this->p_id=$pid;\n }", "title": "" }, { "docid": "0357c5b98aba498ad66f56882ed0638e", "score": "0.5293035", "text": "public function set_post_id( $post_id ){\n\t\tif( is_object( $post_id ) ){\n\t\t\t$post_id = $post_id->ID;\n\t\t}\n\t\t\n\t\tif( $this->post_id != $post_id ){\n\t\t\t$this->post_id = absint( $post_id );\n\t\t\t$this->reset_option();\n\t\t}\n\t}", "title": "" }, { "docid": "66ee7e1189049b970b5c835a183bf85a", "score": "0.5243308", "text": "function setProcessId($pid) {\n $this->pId=$pid;\n }", "title": "" }, { "docid": "816e925f61bddf4ee722169bb18adae0", "score": "0.5216949", "text": "function set_id($new_id){\n\t\t$this->id=$new_id;\n\t}", "title": "" }, { "docid": "2fffc398b91891d0143708b4ecd13486", "score": "0.51478815", "text": "abstract protected function setPrimaryKey();", "title": "" }, { "docid": "cc095319a6529ea6fec141965797a90b", "score": "0.51334226", "text": "public function set_post_id( $post_id ){\n\t\t$this->value = null;\n\t\t$this->post_id = \"$post_id\";\n\t}", "title": "" }, { "docid": "8506dffd62f6413922231c221b3ad3e5", "score": "0.51223856", "text": "public function setId ($inStg) {\n $this->id=PDO::quote($inStg);\n }", "title": "" }, { "docid": "c5497e60824c01f9eb9e1e5de9be9665", "score": "0.5116984", "text": "public function set_post_id( $post_id ) {\n\t\t$this->post_id = $post_id;\n\t\t$this->get_datastore()->set_object_id( $post_id );\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$datastore = $field->get_datastore();\n\t\t\tif ( $datastore->get_object_id() === 0 ) {\n\t\t\t\t$datastore->set_object_id( $post_id );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4e638cd6d63f09c20c6397f365e6eea9", "score": "0.51166755", "text": "function set_nieuwsgroep_id($val){\n\t\t$this->nieuwsgroep_id = $val;\n\t}", "title": "" }, { "docid": "ceb2716d81fc23eaf2dbe3ebc4e9c055", "score": "0.5078332", "text": "public function set_id(){ }", "title": "" }, { "docid": "bdd768af42f6eba1f114d99ca22bfdfe", "score": "0.5059266", "text": "public function setPid(int $pid)\r\n {\r\n $this->pid = $pid;\r\n }", "title": "" }, { "docid": "6bc368c638abdb5e68ed2d17b8a94783", "score": "0.5052704", "text": "function set_id($id) {\r\n $this->basenode->set_attribute('id', $id);\r\n }", "title": "" }, { "docid": "29042e0db932b20e3525fc17b8fa0334", "score": "0.50444317", "text": "function setReferringUrl_id($referring_url)\n\t{\n\t\tif($referring_url != $this->referring_url)\n\t\t{\n\t\t\t$this->_modified = true;\n\t\t\t$this->referringurl_id = $referring_url;\n\t\n\t\t}\n\t}", "title": "" }, { "docid": "bc67043a91c21a0f4edb1c9f1fd94ca3", "score": "0.5035566", "text": "public function setID($_id)\n\t{\n\t\t$this->_id = $_id;\n\t}", "title": "" }, { "docid": "081779a067b5c11e3b28ec6c805f1ecb", "score": "0.50041515", "text": "public function setGId($gId)\n {\n $this->gId = $gId;\n }", "title": "" }, { "docid": "f0085515a14b1cf29684883f9770d595", "score": "0.49957412", "text": "function setPageId($pid)\n {\n $this->pageId = MathUtility::convertToPositiveInteger($pid);\n }", "title": "" }, { "docid": "0fe5f3c28b29476c631292e6ad26fc89", "score": "0.49856094", "text": "function ChangeID ($nid) {\n // attempt to resolve all references to this object.\n \n $query = \"SELECT * FROM `objects` WHERE `oid` = '$nid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n if (mysql_num_rows ($sql) == 0) { // target ID does not exist\n $pid = $this->oid;\n $query = \"UPDATE `objects` \n SET `oid` = '$nid' \n WHERE `oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $query = \"UPDATE `hierarchy` \n SET `parent_oid` = '$nid' \n WHERE `parent_oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $query = \"UPDATE `hierarchy` \n SET `child_oid` = '$nid' \n WHERE `child_oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n \n $query = \"UPDATE `properties` \n SET `oid` = '$nid' \n WHERE `oid` = '$pid'\";\n $sql = mysql_query ($query) or die (mysql_error ());\n return true;\n } else {\n die (\"Failed to reallocate object\");\n }\n }", "title": "" }, { "docid": "7b613bf9f06fe26738f69cb81403f397", "score": "0.49743354", "text": "function SetSubID($subID, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue('subID', $subID, $dbupdate);\n\t}", "title": "" }, { "docid": "45305d8117cc7e1a1538ffdcce450d4f", "score": "0.49715525", "text": "public function setID($id) {$this->id = $id;}", "title": "" }, { "docid": "2dca97e0d74b206e67062b5d240776c5", "score": "0.49677265", "text": "protected function setPgNum($unverified_num) {\n\t\tif (intval($unverified_num)) {\n\t\t\t$this->pg_num = $unverified_num;\t\n\t\t\t$this->u_obj->pg_num = $unverified_num;\t\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->pg_num = $unverified_num;\t\n\t\t\t$this->u_obj->pg_num = $unverified_num;\t\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "abf25e323666ef2ea77278a0877ccec9", "score": "0.4964917", "text": "private function _setPGT($pgt)\n {\n $this->_pgt = $pgt;\n }", "title": "" }, { "docid": "65f7a7b3bfea94abcc9a0fea46baf65d", "score": "0.495991", "text": "public static function getPgEditar();", "title": "" }, { "docid": "1564aee89914aba08843c97ae1e721a1", "score": "0.4959056", "text": "function SetProductID($productID, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue ( 'productID', $productID, $dbupdate );\n\t}", "title": "" }, { "docid": "2c053f9a33450fff5144e63f3c073448", "score": "0.49507856", "text": "function set_pagina_id($val){\n\t\t$this->pagina_id = $val;\n\t}", "title": "" }, { "docid": "8179a8785096a03fcbbaa0844a519212", "score": "0.49504423", "text": "public function setPid($pid)\n {\n $this->pid = $pid;\n }", "title": "" }, { "docid": "1e4df6073e34dd7a373d832ea74feb56", "score": "0.4949319", "text": "function _updatePostit()\r\n\t{\r\n\t\t$dt =& $this->_dt;\r\n\r\n\t\t$post = array('psit_title' => kform::getInput('psitTitle'),\r\n\t\t 'psit_texte' => kform::getInput('psitTexte'),\r\n\t\t 'psit_id' => kform::getInput('psitId'),\r\n\t\t 'psit_userId' => kform::getInput('psitParentId')\r\n\t\t);\r\n\r\n\t\t$dt->updatePostit($post);\r\n\r\n\t\t$page = new kPage('none');\r\n\t\t$page->close();\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "51b3901780d703f178e4d480080d6714", "score": "0.48966786", "text": "function SQPRcanc() {\n $problem_id = $_POST['problem_id'];\n $this->dm->init('T_SQA_DFCT', 'PROBLEM_ID');\n $keys = \"PROBLEM_ID = '\" . $problem_id . \"'\";\n $SQPR = $this->dm->sqpr_number();\n\n $data = array(\n 'SQPR_NUM' => NULL\n );\n\n $this->dm->update($data, $keys);\n $data['problem_id']=$problem_id;\n echo '1';\n }", "title": "" }, { "docid": "f0d994e6eb16014e26b9ac7453716c1a", "score": "0.48796684", "text": "function SetRelatedID($relatedID, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue ( 'relatedID', $relatedID, $dbupdate );\n\t}", "title": "" }, { "docid": "371e8b716b00d460bfb43040dac27969", "score": "0.48756376", "text": "function set_group($gid) {\n if (melanie2_logs::is(melanie2_logs::TRACE)) melanie2_logs::get_instance()->log(melanie2_logs::TRACE, \"melanie2_addressbook::set_group($gid)\");\n if ($gid) $this->group_id = $gid;\n else $this->group_id = null;\n }", "title": "" }, { "docid": "0254f5640e1c4b60be0c66d4c48c0f77", "score": "0.48611018", "text": "function set_id($id) {\r\n\t\t$this->id = $id;\r\n\t}", "title": "" }, { "docid": "9294223c83c7ea76ac22e941ce1fac0d", "score": "0.48439735", "text": "function SetProductID($productID, $dbupdate = true)\n\t{\n\t\treturn $this->UpdateValue('productID', $productID, $dbupdate);\n\t}", "title": "" }, { "docid": "fe64ba3ab7d8a0689c552cfee3822696", "score": "0.4840278", "text": "function set_group($gid) { \n\t\t$this->gid = $gid;\n\t}", "title": "" }, { "docid": "81bb49585f4c9b15dfd0a57019cfece8", "score": "0.4838372", "text": "function association_change_pk($table, $row_old, $row_new, $row_int='') {\r\n\tinclude_spip('inc/install');\r\n\t$sgbd = analyse_fichier_connection(_FILE_CONNECT);\r\n\tswitch ($sgbd[4]) { // le 4e argument de spip_connect_db() --appele dans le /config/connect.php de l'installation contient le \"type/moteur\" de SGBD : c'est le nom du fichier de portage .php defini /ecrire/req\r\n\t\tcase 'mysql' :\r\n\t\t\t$ok = sql_alter(\"TABLE spip_$table CHANGE $row_old $row_new $row_int\".'INT NOT NULL AUTO_INCREMENT');\r\n\t\t\tbreak;\r\n\t\tcase 'pg' :\r\n\t\t\tif ($row_old==$row_new) { // simple changement de type ?\r\n\t\t\t\t$ok = sql_alter(\"TABLE spip_$table ALTER $row_old TYPE $row_int\".'SERIAL');\r\n\t\t\t} else {\r\n\t\t\t\t$ok = sql_alter(\"TABLE spip_$table RENAME COLUMN $row_old TO $row_new\"); // il est cependant recommande d'utiliser la methode ANSI http://wiki.postgresql.org/wiki/FAQ#How_do_you_change_a_column.27s_data_type.3F\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase 'sqlite2' :\r\n\t\tcase 'sqlite3' :\r\n\t\t\tif ($row_old!=$row_new) { // on n'aura pas \"Error: duplicate column name: $row_new\"\r\n\t\t\t\t$ok = sql_alter(\"TABLE spip_$table ADD $row_new INT NOT NULL\"); // ALTER TABLE limite, or AUTOINCREMENT ne peut s'utiliser avec la cle primaire http://www.sqlite.org/lang_altertable.html\r\n\t\t\t\t$ok &= sql_update(\"spip_$table\", array($row_new=>$row_old) ); // copier les donnees de l'ancienne colonne a la nouvelle\r\n\t\t\t\tglobal $association_tables_principales;\r\n\t\t\t\t$ok &= sql_alter(\"TABLE spip_$table RENAME TO spip_temp$table\"); // ALTER TABLE limite au point de ne pouvoir DROPer de colonne ; mais sait renommer la table, ce qu'on fait... http://www.sqlite.org/lang_altertable.html\r\n\t\t\t\t$ok &= sql_create($association_tables_principales[\"spip_$table\"]['field'], $association_tables_principales[\"spip_$table\"]['key'], TRUE); // ...puis on recree la table proprement (avec \"INTEGER PRIMARY KEY AUTOINCREMENT\" --utiliser Int ou un autre provque \"Error: AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\" et quand AutoIncrement n'est pas le dernier de la liste provoque 'Error: near \"autoincremen\": syntax error')\r\n#\t\t\t\t$ok &= sql_query(\"INSERT INTO spip_$table SELECT \". implode(', ', array_keys($association_tables_principales[\"spip_$table\"]['field']) ) .\" FROM spip_temp$table\"); // ...puis on reimporte les donnees http://www.sqlite.org/faq.html#q11 (methode directe peu portable)\r\n\t\t\t\t$ok &= sql_insertq_multi(\"spip_$table\", sql_allfetsel(implode(', ', array_keys($association_tables_principales[\"spip_$table\"]['field']) ), \"spip_temp$table\") ); // ...puis on reimporte les donnees http://www.sqlite.org/faq.html#q11 (methode portable utilisant l'API SQL mais risque de debordement de memoire avec sql_fetchall...)\r\n\t\t\t\tif ($ok)\r\n\t\t\t\t\t$ok = sql_drop_table(\"spip_temp$table\"); // ...et enfin on supprime la table de transition http://www.sqlite.org/faq.html#q11\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault :\r\n\t\t\t$ok = sql_alter(\"TABLE spip_$table ADD $row_new $row_int\".'INT NOT NULL'); // ajouter la nouvelle colonne : elle doit etre non nullable (pour etre une cle primaire) et de type entiere (pour etre candidate a l'auto-incrementation)\r\n\t\t\tif ($ok) { // creation reussie\r\n\t\t\t\t$ok = sql_update(\"spip_$table\", array($row_new=>$row_old), 1); // migrer l'ancienne colonne vers la nouvelle\r\n\t\t\t\tif ($ok) { // migration reussie\r\n\t\t\t\t\t$ok = sql_alter(\"TABLE spip_$table DROP $row_old\"); // supprimer l'ancienne colonne\r\n\t\t\t\t\tif ($ok) // on a donc supprime la cle primaire par consequent\r\n\t\t\t\t\t\tsql_alter(\"TABLE spip_$table ADD PRIMARY KEY($row_new)\"); // declarer la nouvelle colonne comme cle primaire\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t}\r\n\treturn $ok;\r\n}", "title": "" }, { "docid": "f9e2f5fbbac421425f615199f2d56a43", "score": "0.48246035", "text": "public function SetID(\n $in_user_id_bigint ///< An integer, with the user ID.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_id_bigint = $in_user_id_bigint;\n }", "title": "" }, { "docid": "a3cdf6665edc4fb1ee752d3aaf95d15c", "score": "0.48207352", "text": "function setId($id)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "a3cdf6665edc4fb1ee752d3aaf95d15c", "score": "0.48207352", "text": "function setId($id)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "794718c91344c82fdba4c971fa792c63", "score": "0.48205414", "text": "public function edit(jawabanUserPg $jawabanUserPg)\n {\n //\n }", "title": "" }, { "docid": "4824011e542e7fe9c797da2162200c84", "score": "0.481836", "text": "public function setPostId($newPostId): void {\n\t\ttry {\n\t\t\t$uuid = self::validateUuid($newPostId);\n\t\t} catch(\\InvalidArgumentException | \\RangeException | \\Exception | \\TypeError $exception) {\n\t\t\t$exceptionType = get_class($exception);\n\t\t\tthrow(new $exceptionType($exception->getMessage(), 0, $exception));\n\t\t}\n\t\t$this->postId = $uuid;\n\t}", "title": "" }, { "docid": "6d34faf2db8f51166185be2117829efc", "score": "0.48156232", "text": "public function set_id( $id ) {\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "e86d3400167f8527307f10a9d2957a12", "score": "0.48152184", "text": "public function store_original_post_id() {\n\t\tglobal $post;\n\n\t\tif ( isset( $post->ID ) ) {\n\t\t\t$this->original_post_id = $post->ID;\n\t\t}\n\t}", "title": "" }, { "docid": "c726b7c446e887f5328316b21cba23a4", "score": "0.4814717", "text": "public function setID($id){\n\t\t\t$this->id = $id;\n\t\t}", "title": "" }, { "docid": "c41a849ec843e9578e112395546538db", "score": "0.47959206", "text": "public function getID()\n {\n return $this->grID;\n }", "title": "" }, { "docid": "2f5e69a97e9a179b7fb553eead02adc8", "score": "0.4791475", "text": "Public function set_id_promenade ($idp)\n\t\t\t{\n\t\t\t\t $this-> id_promenade = $idp;\n\t\t\t}", "title": "" }, { "docid": "1143891966c88c7eb947524421b5db8a", "score": "0.47842", "text": "public function setid($id){\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "9c0f402be067b4bf4af06b7f69047945", "score": "0.47736248", "text": "function set_id($id) {\n $this->id = $id;\n }", "title": "" }, { "docid": "f4b898dfe72faf4781ac8c4fa769947d", "score": "0.4773049", "text": "function setBrowser_id($browser)\n\t{\n\t\t$this->_modified = true;\n\t\t$this->browser_id = $browser;\n\t}", "title": "" }, { "docid": "13a14c7233eaddfcff6901a1e071ae94", "score": "0.47709474", "text": "public function setID(int $id);", "title": "" }, { "docid": "99c324e4e5dba84f7d9f4fae117bff62", "score": "0.4770714", "text": "function setRemoteID( $value )\r\n {\r\n $this->RemoteID = $value;\r\n }", "title": "" }, { "docid": "dea52945e7f80ddcf8beaf07d8746763", "score": "0.47704473", "text": "public function set_id_user($arg)\n {\n if ($this->is_valid_int_format($arg))\n $this->_id_user = $arg;\n }", "title": "" }, { "docid": "11d4bc7b8261fc1d1179e4e971ea6d66", "score": "0.47703722", "text": "function set_id($id)\n\t{\n\t\t$this->set_default_property(self :: PROPERTY_ID, $id);\n\t}", "title": "" }, { "docid": "85a149473f61de6d764720d7c770572b", "score": "0.47699505", "text": "protected function setNodeId()\n {\n // increment new node ID\n $this->node_id++;\n }", "title": "" }, { "docid": "608368a8f9eed6d7d17463c722603389", "score": "0.4761388", "text": "function editLaeufer($id, $verein) {\n $query = \"UPDATE main.laeufer SET verein = \".pg_escape_literal($verein).\" WHERE id = \".pg_escape_literal($id).\";\";\n return $query;\n}", "title": "" }, { "docid": "76fad7ba940c62c3296e4d17736dcbf1", "score": "0.4759522", "text": "function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }", "title": "" }, { "docid": "fd2e06419a9f6ccc4bf8381090f5acc9", "score": "0.47582814", "text": "public function changePayment($id,$prop_pay){\r\n $this->database->query(\"UPDATE proposals SET prop_pay = '$prop_pay' WHERE prop_id = '$id'\");\r\n $this->database->query(\"DELETE FROM receipt WHERE receipt_prop_id = '$id'\");\r\n $new_id = $this->database->insert(\"REPLACE INTO receipt (receipt_prop_id) VALUES ('$id')\");\r\n }", "title": "" }, { "docid": "82ef535942a4bb407d8c2dbefe48a0cf", "score": "0.47499022", "text": "function setRegPerId($regPerId) {\n $this->regPerId = $regPerId;\n }", "title": "" }, { "docid": "fd70725ec0df4fbf1ca17bda672c6f62", "score": "0.4736485", "text": "public function setId($new_id)\n\t{\n\t\tif ($new_id !== '0' && $new_id !== 0)\n\t\t{\n\t\t\tparent::setId($new_id);\n\t\t}\n\t}", "title": "" }, { "docid": "16ce2d131ca1c2d76b6d3c5c3638c5b4", "score": "0.47358754", "text": "function set_invoice_id($id, $legalObj_or_id) {\n $legalObj = any2obj('legal_entity', $legalObj_or_id); \n $legal_entity_id = $legalObj->id;\n if($prefix = $legalObj->invoice_prefix) {\n $next_id = $legalObj->invoice_nextid;\n $invoice_id = $prefix.$next_id;\n update_object('legal_entity', ['invoice_nextid' => $next_id + 1], $legal_entity_id);\n } else {\n $custom_id = 'A'.$id;\n }\n $data['invoice_id'] = $invoice_id; \n list($id, $errors) = update_object('invoice', $data, $id); \n if($errors) dump($errors);\n return $invoice_id;\n}", "title": "" }, { "docid": "f12b410180a1c7d6ef1848d6036719f6", "score": "0.47337845", "text": "public function setID($id)\n\t{\n\t\t$this->id = (integer) $id;\n\t}", "title": "" }, { "docid": "30e7a826d27c7339110f11dbf5c7fd70", "score": "0.47296497", "text": "public function setGPGID($id)\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t\t$id = trim($id);\n\t\t\n\t\tif (empty($id))\n\t\t\treturn(false);\n\t\t\n\t\tif ((strlen($id) == 8) && (preg_match(\"![^A-F0-9]!\", $id) == 0))\n\t\t{\n\t\t\t$allPrivateGPGKeys = array_keys($this->gpgKeyList);\n\n\t\t\tif (!in_array($id, $allPrivateGPGKeys))\n\t\t\t\t$this->showWarningAndDie(\"ERROR: setGPGID: No private GPG key for the ID ($id)\", $I18N_noPrivateGPG);\n\t\t\t\n\t\t\t$this->gpgID = $id;\n\t\t}\n\t\telse\n\t\t\tdie(\"ERROR: setGPGID: GPG ID ($id) has invalid format!\");\n\t}", "title": "" }, { "docid": "b10ad6720084186cb3cb468f49a3b4ae", "score": "0.47279927", "text": "function set_mentor_id($mentor_id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_MENTOR_ID, $mentor_id);\r\n }", "title": "" }, { "docid": "eadd3159132d78ee417c3ba41546e1b4", "score": "0.4723568", "text": "public function setRefID($value) {\n\t\t$this->RefID = $value;\n\t}", "title": "" }, { "docid": "b4ee8ac6bf95ff61146ce7bb2df1fcaf", "score": "0.47214055", "text": "public function _setID($iD) {\n\t\t$this->_iD = $iD;\n\t}", "title": "" }, { "docid": "d78c2232809fadb57c8cb3f1641bcf3b", "score": "0.47179016", "text": "private function set_ress_id ($val = null){\n\t\tif(isset($val) && is_numeric($val) && $val >= 0) $this->id = $val;\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "3fbf169e8e40f7eff35c1b0a4f5a512e", "score": "0.47170845", "text": "public function setID($pbid)\n\t{\n\t\t$this->pbid = $pbid;\n\t\t$this->pbarid = 'progress-bar-' . $pbid;\n\t\t$this->tbarid = 'transparent-bar-' . $pbid;\n\t\t$this->textid = 'pb_text-' . $pbid;\n\t}", "title": "" }, { "docid": "2f4e56d9c837a5755ebb304fba0cafb5", "score": "0.4713962", "text": "public function pdPrimTagSet($primTagID) {\t\t /* Setting of University*/\t\t\r\n\t\t$this->pdPrimTag = $primTagID;\r\n\t}", "title": "" }, { "docid": "61f8f7ef5f2034032e36cdadfc2b6ecb", "score": "0.47136983", "text": "public function setIncrementId($id);", "title": "" }, { "docid": "ec3db54645c3d46b8f0d6ecc38da5c1b", "score": "0.46961945", "text": "public function SetOwnerID(\n $in_owner_id_bigint\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_owner_id_bigint = $in_owner_id_bigint;\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.4696026", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.4696026", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.4696026", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "4b22cae90410d59689363f5f1006b3f3", "score": "0.4687335", "text": "function saveRevision($budget_org, $uid, $update = FALSE) {\n // in the revision's creator_uid for the momentary write.\n $temp_uid = $budget_org->uid;\n $budget_org->uid = $uid;\n if ($update) {\n drupal_write_record('budgetsys_org_revision', $budget_org, 'vid');\n } \n else {\n drupal_write_record('budgetsys_org_revision', $budget_org);\n }\n // Reset the order's creator_uid to the original value.\n $budget_org->uid = $temp_uid;\n }", "title": "" }, { "docid": "1f9d58a77e4a18de66651e40b976845b", "score": "0.46803015", "text": "public function set_id($var) {\r\n\t\t$this->id = $var;\r\n\t}", "title": "" }, { "docid": "25edc686c3a0e026d895788cf96bb50b", "score": "0.4679524", "text": "public function setidpago($idpago): void\n {\n $this->idpago = $idpago;\n }", "title": "" }, { "docid": "07dfbd2d02266255fe7d29c6040b8ecd", "score": "0.46752417", "text": "public function save_post($post_id) {\n\n if (wp_is_post_revision($post_id)) return;\n\n // assign a uid to this post \n $uid = get_post_meta( $post_id, 'UID', true );\n if( !$uid ){\n update_post_meta( $post_id, 'UID', uniqid() ); \n }\n\n }", "title": "" }, { "docid": "c6d8fa38b02a95e15353644a53eb9162", "score": "0.4672252", "text": "abstract public function updateGroupe($id, $groupe);", "title": "" }, { "docid": "39dcdf757262b9955806dda4f14eca32", "score": "0.4672177", "text": "private function update ()\n\t{\n\t\t$this->db->update($this->table, $this->data, \"id={$this->data['id']}\");\n\t}", "title": "" }, { "docid": "d1efe851d96cf24413425c48d9305be7", "score": "0.46707684", "text": "public function setID($id)\r\n {\r\n $this->userID = $id;\r\n }", "title": "" }, { "docid": "a9d2ed18c7187bfa23328b6b3696b82d", "score": "0.4658759", "text": "function editPasswort($id, $role, $passwort) {\n $query = \"UPDATE main.\" . rtt($role) . \" SET passwort = '\" . password_hash($passwort, PASSWORD_BCRYPT) . \"' WHERE id = \".pg_escape_literal($id).\";\";\n return $query;\n}", "title": "" }, { "docid": "26ae47a8da6a5bcf15636f54eb6cd3fd", "score": "0.46547675", "text": "public function update($id){}", "title": "" }, { "docid": "26ae47a8da6a5bcf15636f54eb6cd3fd", "score": "0.46547675", "text": "public function update($id){}", "title": "" }, { "docid": "26ae47a8da6a5bcf15636f54eb6cd3fd", "score": "0.46547675", "text": "public function update($id){}", "title": "" }, { "docid": "26ae47a8da6a5bcf15636f54eb6cd3fd", "score": "0.46547675", "text": "public function update($id){}", "title": "" }, { "docid": "44facb958003cc31d199e181d5c8b616", "score": "0.4648044", "text": "function set_id($publication_id)\r\n {\r\n $this->id = $publication_id;\r\n }", "title": "" }, { "docid": "c184dbed0bc8961039189d2461d0d60f", "score": "0.46479344", "text": "public function set_id($id)\n {\n $this->id = $id;\n }", "title": "" }, { "docid": "e63d12cfc5b0c02fd294b80bb3cb4af9", "score": "0.46458754", "text": "function update_field( $selector, $value, $post_id = \\false ) {\n}", "title": "" }, { "docid": "bacabed39b1697fa8014620a9c855bd5", "score": "0.46375275", "text": "static function set( $p_user_id ) {\n\t\tglobal $g_cache_current_user_id;\n\t\tglobal $g_cache_current_user_pref;\n\t\n\t\tif( $p_user_id == $g_cache_current_user_id ) {\n\t\t\treturn $p_user_id;\n\t\t}\n\t\n\t\t$t_old_current = $g_cache_current_user_id;\n\t\t$g_cache_current_user_id = $p_user_id;\n\t\n\t\t# Clear current user preferences cache\n\t\t$g_cache_current_user_pref = array();\n\t\n\t\treturn $t_old_current;\n\t}", "title": "" }, { "docid": "f471bab8d937359d55a2a0a12339fc5e", "score": "0.4636588", "text": "public function setGid($value)\n {\n return $this->set(self::GID, $value);\n }", "title": "" }, { "docid": "f471bab8d937359d55a2a0a12339fc5e", "score": "0.4636588", "text": "public function setGid($value)\n {\n return $this->set(self::GID, $value);\n }", "title": "" } ]
69cd6eaf3f9421623d09a948394ad6d7
Test try updates a user with password and password_confirmation not matching. Expects return a json error validation
[ { "docid": "2b814e5c5dc7d1de071b53d81ac80377", "score": "0.8669808", "text": "public function testTryUpdatePasswordAndPasswordConfirmationNotMatch()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => '[email protected]', 'name' => 'Willian Rodrigues', 'password' => '123456', 'password_confirmation' => '123457']);\n\n $response->assertJsonFragment([\n \"password\" => [\"Campos password e password_confirmation estão diferentes.\"]\n ]);\n $response->assertStatus(422);\n }", "title": "" } ]
[ { "docid": "3cfd481b62bb5c8db7fd5548fae55082", "score": "0.8647695", "text": "public function testTryUpdateWithoutPasswordConfirmation()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => '[email protected]', 'name' => 'Willian Rodrigues', 'password' => '123456']);\n\n $response->assertJsonFragment([\n \"password\" => [\"Campos password e password_confirmation estão diferentes.\"]\n ]);\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "24e586f6cf1823f58c7408c21f98b082", "score": "0.84612024", "text": "public function testTryUpdateWithoutPassword()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => '[email protected]','name' => 'Willian Rodrigues', 'password_confirmation' => '123456']);\n\n $response->assertJsonFragment([\n \"message\" => \"Usuário atualizado.\"\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "48f8ce74481c28185d6114caff0b8fed", "score": "0.81233466", "text": "public function testAuthUserCanUpdatePassword()\n {\n $user = factory(\\App\\User::class)->create();\n $ownerRole = $this->getOwnerRole();\n $user->assignRole($ownerRole);\n $token = $this->getTokenForUser($user, \"abcdefgh1\");\n $response = $this->json('POST', '/api/profile/update-password', [\n 'old_password' => 'abcdefgh1',\n 'password' => 'bcdefgh1',\n 'password_confirmation' => 'bcdefgh1'\n ], [\n 'Authentication' => 'Bearer ' . $token\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "cc2d40d46ab48afdb7cd61053ff43fd8", "score": "0.7949242", "text": "public function testUpdatePassword()\n {\n $user = factory(User::class)->create();\n $this->actingAs($user, 'api');\n $formData = [\n \"formData\" => [\n \"password_actual\" => 'password',\n \"password\" => 'Coso',\n \"user\" => $user->id\n ]\n ];\n $response = $this->json('PUT', 'api/user/change-password', $formData, ['Accept' => 'application/json'])\n ->assertStatus(200)->assertJson(\n [\n \"updated\" => true,\n \"message\" => \"Actualizado Correctamente\"\n ]\n );\n }", "title": "" }, { "docid": "d1982ff5e3a00c000d5d960476bb77e2", "score": "0.7903932", "text": "public function testCorrectPasswordValidation()\n {\n $userPassword = $this->faker->unique()->password;\n $user = factory(User::class)->create(['password' => bcrypt($userPassword)]);\n $this->actingAs($user);\n $response = $this->json('POST', '/email/change', [\n 'password' => $userPassword\n ]);\n $response->assertJsonMissingValidationErrors('password');\n }", "title": "" }, { "docid": "08a1f41030f2aee6f2b2d7726d49c0a5", "score": "0.75845236", "text": "public function testTryUpdateWithoutPasswordMinimumCaracters()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => '[email protected]', 'name' => 'Willian Rodrigues', 'password' => '123', 'password_confirmation' => '123']);\n\n $response->assertJsonFragment([\n \"password\" => [\"Mínimo 6 caracteres.\"]\n ]);\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "546240c6d0e60591b6879ffe6447f6a7", "score": "0.7495347", "text": "public function testUsingOtherUserPasswordRejection() {\n $user = factory(User::class)->create();\n $this->actingAs($user);\n $otherUserPassword = $this->faker->unique()->password;\n factory(User::class)->create(['password' => bcrypt($otherUserPassword)]);\n $response = $this->json('POST', '/email/change', [\n 'password' => $otherUserPassword\n ]);\n $response->assertJsonValidationErrors('password');\n }", "title": "" }, { "docid": "d752b4d3a2439ad0cee783cb29abe8dc", "score": "0.7444192", "text": "public function testResetPassword()\n {\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($user, 'api')\n ->json('PATCH', '/api/v1/users/password', [\n 'new_password' => '123456',\n ]);\n\n $response->assertStatus(201);\n\n $this->assertTrue($user->newQuery()->find($user->id)->verifyPassword('123456'));\n }", "title": "" }, { "docid": "74ddda149b6ca925ff3e047f82d7d1df", "score": "0.73886615", "text": "public function testIncorrectPasswordRejection()\n {\n $user = factory(User::class)->create();\n $this->actingAs($user);\n $response = $this->json('POST', '/email/change', [\n 'password' => $this->faker->unique()->password\n ]);\n $response->assertJsonValidationErrors('password');\n }", "title": "" }, { "docid": "4de5a431cc02445cd4da39203805cd2a", "score": "0.7336642", "text": "public function testUserUpdate(): void\n {\n $this->createInstance();\n $user = uniqid('', false);\n $mail = $user . '@laborange.fr';\n $pass = $user;\n $result = $this->fConnector->getSSO()->signup($user, $pass, $mail)->wait();\n\n $result2 = $this->fConnector->getSSO()->login($user, $pass, false)->wait();\n\n $result3 = $this->fConnector->getUserManagement()->updateEmail($user . '@laborange2.fr', $user, $result2->userId,null)->wait();\n\n $this->assertEquals(\n $result3->email,\n $user . '@laborange2.fr',\n 'Test update of a user'\n );\n\n $result5 = $this->fConnector->getUserManagement()->updatePassword('totototo', $user, $result2->userId,null)->wait();\n $result6 = $this->fConnector->getSSO()->login($user, 'totototo')->wait();\n $this->assertInstanceOf(FlarumToken::class, $result6,'Test new login after password update');\n\n\n }", "title": "" }, { "docid": "55eb8188e6566229f3485c1133d72a9f", "score": "0.733195", "text": "public function test_update_user_data_not_valid()\n {\n $this->userMock\n ->shouldReceive('find')\n ->once()\n ->andReturn(TRUE);\n\n $expectedResponse = [\n 'code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Please, verify required fields.',\n 'response' => false\n ];\n $this->json('PUT', '/api/v1/users/1', ['first_name' => ''])\n ->seeJsonEquals($expectedResponse);\n }", "title": "" }, { "docid": "3cca239b92696a25a9ac6900122fa025", "score": "0.73158175", "text": "public function testUpdatePassword()\n {\n $user = $this->logNewUser(new User());\n $userId = $user->id;\n $newPass = 'secret';\n\n $response = $this->patch('/profile/password', [\n 'current_password' => 'secret',\n 'password' => $newPass,\n 'password_confirmation' => $newPass,\n ]);\n\n $this->assertTrue(Hash::check($newPass, $user->password));\n $user->delete();\n\n }", "title": "" }, { "docid": "1beca0677c9d6bf36c3b9dac433572a6", "score": "0.72873", "text": "public function testTryUpdateWithInvalidEmail()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => 'willian_email.com', 'name' => 'Willian Rodrigues', 'password' => '123456', 'password_confirmation' => '123456']);\n\n $response->assertJsonFragment([\n \"email\" => [\"Email inválido.\"]\n ]);\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "39431cfcb77c5b2cc611c4bd892c7164", "score": "0.72705024", "text": "public function testValidatePasswordConfirm()\n {\n $email = $this->user->email;\n $token = $this->broker()->createToken($this->user);\n $reset = [\n 'email' => $email,\n 'token' => $token,\n 'password' => '123456',\n 'password_confirmation' => '1234561',\n '_method' => 'PUT'\n ];\n $this->json('POST', 'api/password/reset', $reset)\n ->assertJsonStructure($this->jsonStructureValidate());\n }", "title": "" }, { "docid": "b9d99d67f0a942c771233c3570e2e674", "score": "0.7231779", "text": "public function testValidateResetPassword()\n {\n $users = TableRegistry::get('Lil.Users');\n\n // incorrect old password\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test2',\n 'passwd' => 'testtest2',\n 'repeat_pass' => 'testtest2'\n ];\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'resetPassword']);\n $errors = $user->getErrors();\n $this->assertTrue(!empty($errors));\n $this->assertEquals(1, sizeof($errors));\n $this->assertTrue(!empty($errors['old_pass']));\n\n // passwords do not match\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test',\n 'passwd' => '123223',\n 'repeat_pass' => 'testtest2'\n ];\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'resetPassword']);\n $errors = $user->getErrors();\n $this->assertTrue(!empty($errors));\n $this->assertEquals(1, count($errors));\n $this->assertTrue(!empty($errors['repeat_pass']));\n\n // empty password\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test',\n 'passwd' => '',\n 'repeat_pass' => ''\n ];\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'resetPassword']);\n $errors = $user->getErrors();\n $this->assertTrue(!empty($errors));\n $this->assertEquals(1, count($errors));\n $this->assertTrue(!empty($errors['passwd']));\n\n // ok\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test',\n 'passwd' => 'testtest2',\n 'repeat_pass' => 'testtest2'\n ];\n\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'resetPassword']);\n $this->assertTrue(empty($user->getErrors()));\n }", "title": "" }, { "docid": "a8b9617dc20a23bfb56ebab15cf34394", "score": "0.7222065", "text": "public function testChangeUserPassword()\n {\n }", "title": "" }, { "docid": "478b91c94ad27eba98fe25009481f901", "score": "0.7221121", "text": "public function testUserUpdateSuccess() {\n $user = factory(User::class)->create();\n $userData = $user->toArray();\n $userData['email'] = '[email protected]';\n $this->actingAs($user)->json(\"PUT\", \"/users/{$user->id}\", $userData)\n ->assertResponseStatus(204);\n\n $exists = User::where(\"email\", \"[email protected]\")->count();\n $this->assertGreaterThan(0, $exists);\n }", "title": "" }, { "docid": "fd68a3e80b0bbeb05b9e430f64552abb", "score": "0.71958464", "text": "public function test_update_user_no_success()\n {\n $this->userMock\n ->shouldReceive('find')\n ->once()\n ->andReturn($this->userMock)\n ->shouldReceive('update')\n ->once()\n ->andReturn(FALSE);\n\n $expectedResponse = [\n 'code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Could not update this user.',\n 'response' => false\n ];\n\n $this->json('PUT', '/api/v1/users/321', ['name' => 'test test'])\n ->seeJsonEquals($expectedResponse);\n }", "title": "" }, { "docid": "a9b765744d3694726df87854f724d0fb", "score": "0.710403", "text": "public function testTryUpdateWithEmailExceeds()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => 'willian_cesar_alves_dos_santos_gonzaga_rodrigues_junior@email.com', 'name' => 'Willian Rodrigues', 'password' => '123456', 'password_confirmation' => '123456']);\n\n $response->assertJsonFragment([\n \"email\" => [\"Máximo 50 caracteres.\"]\n ]);\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "23100679f5ff651d9779e9ad658ff44d", "score": "0.7103585", "text": "public function test_edit_user()\n {\n $user = new User(Connection::make());\n\n //create a new user\n $dbuser = $user->createUser('[email protected]', 'Jane', 'Doe', 'password');\n\n //update the new user\n $updatedUser = $user->updateUser($dbuser, '[email protected]', 'John', 'Doe', 'newpassword');\n\n //make sure the amount of affected rows is 1\n $this->assertEquals(1, $updatedUser);\n\n }", "title": "" }, { "docid": "edd1f4834ce12086fa2a76ff0d4f8767", "score": "0.7097535", "text": "public function testPasswordMustBeConfirmed()\n {\n $response = $this->postJson('/auth/register', [\n 'email' => '[email protected]',\n 'fullname' => 'my full name',\n 'password' => 'mypassword',\n ]);\n\n $response->assertStatus(422)\n ->assertJson([\n \"message\" => 'The given data was invalid.',\n \"errors\" => [\n \"password\" => [\n \"The password confirmation does not match.\"\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "9768349e7d64f19e448329e4718390f0", "score": "0.7081076", "text": "public function testPostChangePassword()\n {\n }", "title": "" }, { "docid": "6aaf08696d833f0104b2c3adfd5a10c8", "score": "0.7075447", "text": "public function testUsersPatchFail()\n {\n // Set some variables to be checked\n $name = 'John Wu';\n\n // Fail (cannot update someone else)\n // Fake a new user to find\n $user = factory(Users::class)->create();\n $response = $this->json(\n 'PATCH',\n '/brunoocto/sample/pm/users/'.$user->id,\n [\n 'data' => [\n 'id' => $user->id,\n 'type' => 'users',\n 'attributes' => [\n 'name' => $name,\n ],\n ],\n ],\n [\n 'Content-Type' => 'application/vnd.api+json',\n 'Accept' => 'application/vnd.api+json',\n 'User-Id' => $this->auth_user->id,\n ]\n );\n\n // Check that an expection is sent\n $this->assertTrue(isset($response->exception));\n }", "title": "" }, { "docid": "fb3da898532bc677634943d788d92ee5", "score": "0.70623267", "text": "public function testUserUpdateFailNotLoggedIn() {\n $user = factory(User::class)->create();\n $userData = $user->toArray();\n $this->put(\"/users/{$user->id}\", $userData)\n ->assertResponseStatus(403);\n }", "title": "" }, { "docid": "4c17ecc466097bc96ea8085da9cefde7", "score": "0.70315313", "text": "public function canUpdateUserPassword();", "title": "" }, { "docid": "5ca6e1660ef212aded18f4c720d75bbc", "score": "0.7015183", "text": "public function testUpdate()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['name'=> 'Willian Rodrigues', 'email' => '[email protected]']);\n\n $response->assertJsonFragment([\n \"message\" => 'Usuário atualizado.',\n \"name\" => \"Willian Rodrigues\"\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "f590cf85076ca235a3d78b42b2c8283c", "score": "0.6995089", "text": "public function testValidUpdateValidUser()\n\t\t{\n\t\t\t$user = new User (-1, $this->email, $this->password, $this->salt);\t\t\t\n\t\t\t$user->insert($this->mysqli);\n\t\t\t\n\t\t\t$newEmail = \"[email protected]\";\n\t\t\t$user->setEmail($newEmail);\n\t\t\t$user->update($this->mysqli);\n\t\t\t\n\t\t\t//select the user from mySQL and assert it was inserted properly\n\t\t\t$this->sqlUser = User::getUserByEmail($this->mysqli, $newEmail);\n\t\t\t\n\t\t\t// verify the email changed\n\t\t\t$this->assertIdentical($this->sqlUser->getEmail(), $newEmail);\n\t\t\t$this->assertIdentical($this->sqlUser->getPassword(), $this->password);\n\t\t\t$this->assertIdentical($this->sqlUser->getSalt(), $this->salt);\n\t\t\t$this->assertTrue($this->sqlUser->getId() > 0);\n\t\t}", "title": "" }, { "docid": "b64d640377f86cdc61ff64c5594fb8be", "score": "0.69729114", "text": "public function testLoginWithOldPassword()\n\t{\n\t\t$exist = App\\Droit\\User\\Entities\\User::find(3582);\n\n\t\t$value = 'cindy';\n\n\t\t$user = App\\Droit\\User\\Entities\\User::where('password','=', \\Hash::make(md5($value)) )->get(); // \\Hash::make(md5($value))\n\n\t\tif(!$user->isEmpty())\n\t\t{\n\t\t\t$user = $user->first();\n\t\t\t$this->assertEquals($user->id, $exist->id);\n\t\t}\n\n\t}", "title": "" }, { "docid": "247ba5185f8c1dac38bb6f0005c52a47", "score": "0.6958526", "text": "public function testChangePasswordAction_misMatchingPasswords(){\n $this->addFixture(new LoadUserData());\n $this->addFixture(new LoadUserEmailData());\n $this->addFixture(new LoadForgetPasswordCodeData());\n $this->loadFixtures();\n $client = static::createClient();\n $formData=array(\"newPass\"=>\"test\",\"newPassR\"=>\"test1\",\"Username\"=>\"sampleUser\");\n $client->request('POST','/reset',array(), array(), array(),$formData);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "16d4937de8dc00d3fdd4680292b7ca68", "score": "0.69490445", "text": "public function testUsersPatch()\n {\n // Set some variables to be checked\n $name = 'Léo 马丁';\n\n // Try a successful update\n $response = $this->json(\n 'PATCH',\n '/brunoocto/sample/pm/users/'.$this->auth_user->id,\n [\n 'data' => [\n 'id' => $this->auth_user->id,\n 'type' => 'users',\n 'attributes' => [\n 'name' => $name,\n ],\n ],\n ],\n [\n 'Content-Type' => 'application/vnd.api+json',\n 'Accept' => 'application/vnd.api+json',\n 'User-Id' => $this->auth_user->id,\n ]\n );\n\n // Check basic response structure\n $this->commonSingleVndCheck($response, 'users');\n\n // Check Update status\n $response->assertStatus(200);\n\n // Check some values\n $response->assertJson([\n 'data' => [\n 'type' => 'users',\n 'id' => $this->auth_user->id,\n 'attributes' => [\n 'name' => $name,\n ]\n ],\n ]);\n }", "title": "" }, { "docid": "557157384907f099bc97044d28fd1821", "score": "0.6946761", "text": "public function testUserUpdate() {\n $updateUser = new User();\n $updateUser->setUserId(1);\n $updateUser->setLoginName('testuser123');\n $updateUser->setPassword(md5('passwordUpdated'));\n $updateUser->setUserTypeId(1);\n\n $result = $this->userManagementDao->updateUser($updateUser);\n $this->assertTrue($result === true);\n }", "title": "" }, { "docid": "d4a51196014abe9beb68e47e654cf63f", "score": "0.69455314", "text": "public function testValidateProperties()\n {\n $users = TableRegistry::get('Lil.Users');\n\n // incorrect old password\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test2',\n 'passwd' => 'testtest2',\n 'repeat_pass' => 'testtest2'\n ];\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'properties']);\n $errors = $user->getErrors();\n $this->assertTrue(!empty($errors));\n $this->assertEquals(1, count($errors));\n $this->assertTrue(!empty($errors['old_pass']));\n\n // passwords do not match\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test',\n 'passwd' => '123223',\n 'repeat_pass' => 'testtest2'\n ];\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'properties']);\n $errors = $user->getErrors();\n $this->assertTrue(!empty($errors));\n $this->assertEquals(1, count($errors));\n $this->assertTrue(!empty($errors['repeat_pass']));\n\n // on empty password minLength\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => '',\n 'passwd' => 'a',\n 'repeat_pass' => 'a'\n ];\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'properties']);\n $errors = $user->getErrors();\n $this->assertTrue(!empty($errors));\n //$this->assertTrue((new DefaultPasswordHasher)->check('test', $user->passwd));\n\n // ok\n $data = [\n 'user_id' => '28233ae2-d3ac-4121-aec7-3878ef19fac5',\n 'old_pass' => 'test',\n 'passwd' => 'testtest2',\n 'repeat_pass' => 'testtest2'\n ];\n\n $user = $users->get('28233ae2-d3ac-4121-aec7-3878ef19fac5');\n $users->patchEntity($user, $data, ['validate' => 'properties']);\n $errors = $user->getErrors();\n $this->assertTrue(empty($errors));\n $this->assertTrue((new DefaultPasswordHasher)->check('testtest2', $user->passwd));\n }", "title": "" }, { "docid": "a606fc000663f752f926f3c28fe758c5", "score": "0.6943232", "text": "public function testChangePassword()\n {\n }", "title": "" }, { "docid": "5bba4dd1b4e3f03e1f5985318ca57a1b", "score": "0.69405884", "text": "public function testPasswordNeedsRehash()\n {\n $password = 'test1234';\n $ds = $this->buildMock(true);\n $user = new UserModel($ds);\n\n $postPassword = $user->prePassword($password);\n $this->assertNotEquals($password, $postPassword);\n }", "title": "" }, { "docid": "2c7eb9b46a0f2582e7ace0566fa7b817", "score": "0.69257045", "text": "public function postUpdatepassword()\n {\n $valiationArr = array();\n if (isset(Auth::user()->id) && Auth::user()->id) {\n $formData = Input::all();\n $formDataArr = array();\n if (isset($formData['formdata']) && $formData['formdata'] != '') {\n parse_str($formData['formdata'], $formDataArr);\n if (isset($formDataArr['User']) && is_array($formDataArr['User']) && count($formDataArr['User']) > 0) {\n $validator = Validator::make($formDataArr['User'], User::$rules['changepassword']);\n if ($validator->fails()) {\n $errorArr = $validator->getMessageBag()->toArray();\n if (isset($errorArr) && is_array($errorArr) && count($errorArr) > 0) {\n foreach ($errorArr as $errorKey => $errorVal) {\n $valiationArr[] = array(\n 'modelField' => $errorKey,\n 'modelErrorMsg' => $errorVal[0]\n );\n }\n }\n }\n if (isset($formDataArr['User']['old_password']) && $formDataArr['User']['old_password'] != '') {\n $user = Auth::user();\n if (!(Hash::check($formDataArr['User']['old_password'], $user->getAuthPassword()))) {\n $valiationArr[] = array(\n 'modelField' => 'old_password',\n 'modelErrorMsg' => 'Old Password is incorrect.'\n );\n }\n }\n if (is_array($valiationArr) && count($valiationArr) > 0) {\n echo '****FAILURE****' . json_encode($valiationArr);\n } else {\n DB::beginTransaction();\n if (isset(Auth::user()->id) && Auth::user()->id != 0) {\n $formDataArr['user']['updated_at'] = date('Y-m-d h:i:s');\n $formDataArr['user']['password'] = Hash::make($formDataArr['User']['new_password']);\n try {\n DB::table('users')->where('id', Auth::user()->id)->update($formDataArr['user']);\n DB::commit();\n echo '****SUCCESS****User password has been changed successfully.';\n }\n catch (ValidationException $e) {\n DB::rollback();\n echo '****ERROR****Unable to change user password.';\n }\n catch (\\Exception $e) {\n DB::rollback();\n echo '****ERROR****Unable to change user password.';\n }\n }\n }\n }\n } else {\n echo '****ERROR****Invalid form submission.';\n }\n } else {\n echo '****ERROR****Please login to register.';\n }\n exit;\n }", "title": "" }, { "docid": "43611beb467263567c0e89102d35798b", "score": "0.69231945", "text": "public function update(Request $request)\n {\n $validate = \\Validator::make($request->all(), [\n 'email' => 'required|string|email|max:255',\n 'confirm_password' => 'required|string|min:8',\n ]);\n\n if($request->new_password){\n $newpass = \\Validator::make($request->all(), [\n 'new_password' => 'required|string|min:8',\n ]);\n\n if ($newpass->fails()) {\n $respon = [\n 'status' => 'error',\n 'msg' => 'Validator error',\n 'errors' => $newpass->errors(),\n 'content' => null,\n ];\n return response()->json($respon, 200);\n }\n }\n\n if ($validate->fails()) {\n $respon = [\n 'status' => 'error',\n 'msg' => 'Validator error',\n 'errors' => $validate->errors(),\n 'content' => null,\n ];\n return response()->json($respon, 200);\n } else {\n $user = User::find($request->user()->id);\n if(! \\Hash::check($request->confirm_password, $user->password, [])){\n $respon = [\n 'status' => 'error',\n 'msg' => 'Validator error',\n 'errors' => 'Password confirm doesnt match',\n 'content' => null,\n ];\n return response()->json($respon, 200);\n }\n if($request->name){\n $user->name = $request->name;\n }\n $user->email = $request->email;\n if($request->new_password){\n $user->password = Hash::make($request->new_password);\n }\n $user->save();\n return response()->json([\n 'status' => 'success',\n 'msg' => 'Record updated',\n 'errors' => null,\n ]);\n }\n }", "title": "" }, { "docid": "c3fbf44133db66cd0fa66d561261c51d", "score": "0.69204026", "text": "public function testUpdateWithInvalidUserID()\n {\n //Creates 1 ramdoms user\n $user = factory(User::class)->create();\n //Acting as user\n $this->actingAs($user);\n //make request\n $response = $this->json('PUT', '/api/users/update/wad666668', ['name'=> 'Willian Rodrigues', 'email' => '[email protected]', 'password' => '123456', 'password_confirmation' => '123456']);\n //checks if access is unauthorized\n $response->assertStatus(404);\n }", "title": "" }, { "docid": "70266a74db9456219a60f7ab646d0ed0", "score": "0.69013184", "text": "public function testUpdateWithoutUserID()\n {\n //Creates 1 ramdoms user\n $user = factory(User::class)->create();\n //Acting as user\n $this->actingAs($user);\n //make request\n $response = $this->json('PUT', '/api/users/update/', ['name'=> 'Willian Rodrigues', 'email' => '[email protected]', 'password' => '123456', 'password_confirmation' => '123456']);\n //checks if access is unauthorized\n $response->assertStatus(404);\n }", "title": "" }, { "docid": "b4f7a5f36ae4913296e3fb7882269a2c", "score": "0.6884543", "text": "public function testTryUpdateWithNameExceeds()\n {\n //Create a ramdom user\n $user = factory(User::class)->create();\n //acting as first user created\n $this->actingAs($user);\n\n $response = $this->json('PUT', '/api/users/update/'.$user->id, ['email' => '[email protected]', 'name' => 'Willian Cesar Alves dos Santos Gonzaga Rodrigues Junior', 'password' => '123456', 'password_confirmation' => '123456']);\n\n $response->assertJsonFragment([\n \"name\" => [\"Máximo 50 caracteres.\"]\n ]);\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "42482f2edd5587051d38c080042583ef", "score": "0.68813485", "text": "function it_updates_a_user()\n {\n \n $user = factory(User::class)->create();\n $this->withoutExceptionHandling(); \n \n $this->put(\"usuarios/{$user->id}\",[\n 'name' => 'daniel',\n 'email' => '[email protected]',\n 'password' =>'123456'\n ])->assertRedirect(\"usuarios/{$user->id}\");\n\n $this->assertCredentials([\n 'name' =>'daniel',\n 'email' =>'[email protected]',\n 'password' => '123456'\n ]);\n }", "title": "" }, { "docid": "5faf23a72411b08530f0d7c597574d91", "score": "0.68810374", "text": "public function testUpdate()\n {\n\n $this->createDummyUser();\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => \"updatedName\",\n 'username' => \"updatedDesc\",\n 'email' => \"[email protected]\",\n 'password' => \"updated password\",\n 'password_confirmation' => \"updated password\"\n ));\n\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n 'name' => \"updatedName\",\n 'username' => \"updatedDesc\",\n 'email' => \"[email protected]\",\n ]);\n }", "title": "" }, { "docid": "c5270e6a83d1a0310683661b81c87e55", "score": "0.6878113", "text": "public function testForgotPass()\n {\n //Given\n $user = factory(User::class)->create(['verified' => 1]);\n\n //When\n $response = $this->json('POST', '/api/admin/forgot',\n [\n 'email' => $user->email\n ]);\n\n //Then\n $response->assertJson([\n 'success' => true\n ]);\n }", "title": "" }, { "docid": "5c4f4e39092552c565db3fce102d324a", "score": "0.687595", "text": "public function testUserCantResetPasswordWithoutPasswordConfirmationMatch() {\n $response = $this->postJson('/api/reset-password', [\n 'password_confirmation' => $this->password,\n 'password' => $this->password.\"123\",\n 'email' => $this->faker->unique()->safeEmail(),\n 'token' => $this->faker->sha256()\n ]);\n\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "9f6f8f2c14332f980a5b35f7ee67c17b", "score": "0.68742836", "text": "public function testUserUpdate()\n {\n $user = factory(User::class)->create();\n $response = $this\n ->actingAs($user)\n ->call('put', '/users/'.$user->id, [\n 'name' => 'Henk',\n 'email' => '[email protected]',\n 'editor' => 'vim',\n ]);\n $response->assertRedirect('/projects')->assertSessionHas('successes');\n }", "title": "" }, { "docid": "699dbde54a7bc7e02f8ef966eedddf9e", "score": "0.68591654", "text": "public function testUpdateDoNothing()\n {\n\n $this->createDummyUser();\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n ]);\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => $this->testName,\n 'username' => $this->testUsername,\n 'email' => $this->testEmail,\n 'password' => $this->testPassword,\n 'password_confirmation' => $this->testPassword\n ));\n\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n 'name' => $this->testName,\n 'username' => $this->testUsername,\n 'email' => $this->testEmail,\n ]);\n }", "title": "" }, { "docid": "7f35277f4dcc04d422c801d4b79d3b71", "score": "0.68565357", "text": "public function testUserCanUpdateProfile()\n {\n $user = factory(\\App\\User::class)->create();\n $ownerRole = $this->getOwnerRole();\n $user->assignRole($ownerRole);\n $token = $this->getTokenForUser($user, \"abcdefgh1\");\n $response = $this->json('POST', '/api/profile', [\n 'email' => '[email protected]',\n 'name' => 'User ABCX',\n 'old_password' => 'abcdefgh1',\n 'password' => 'bcdefgh1',\n 'password_confirmation' => 'bcdefgh1'\n ], [\n 'Authentication' => 'Bearer ' . $token\n ]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "37cecc4dacd4a16e9790a8b503e17b78", "score": "0.68457997", "text": "public function testForgotPassword()\n {\n // Create a new User in DB\n $response = $this->json('POST', '/api/user/signup', [\n 'username' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => 'password'\n ]);\n\n // Get the email address\n $json = $response->json();\n $email = $json['email'];\n\n // Make confirmation request including the confirmation_code\n $response = $this->json('POST', '/api/user/forgotpassword', [\n 'email' => '[email protected]',\n ]);\n\n // Check if request is successfull with correct message\n $response\n ->assertStatus(200)\n ->assertJson([\n 'form' => 'forgotpassword',\n 'status' => true,\n 'message' => 'expert.contribute.forgotpassword.mail_sent'\n ]);\n\n // Check if the according user is now confirmed in DB\n $this->assertDatabaseHas('password_resets', [\n 'email' => '[email protected]'\n ]);\n\n\n }", "title": "" }, { "docid": "5e06303e0616091980465112d51edb17", "score": "0.68350565", "text": "public function testAuthFailPassword()\n {\n $user = new User();\n $user->email = self::TEST_EMAIL;\n $user->password_hash = Hash::make(self::TEST_PASSWORD);\n $user->activated_at = new \\DateTime();\n $user->save();\n\n // Expect not found exception\n $this->expectExceptionMessage(User::ERROR_NOT_FOUND);\n\n // Try to auth user with wrong pass\n $userService = new UserService();\n $token = $userService->auth(self::TEST_EMAIL, 'wrong_password');\n\n // Validate Empty Token\n $this->assertEmpty($token);\n }", "title": "" }, { "docid": "0deea700b108940993011be8c5bfcc5f", "score": "0.6834127", "text": "public function testForgetPasswordAction_UpdatePasswordForgetRecord(){\n $this->addFixture(new LoadUserData());\n $this->addFixture(new LoadUserEmailData());\n $this->addFixture(new LoadForgetPasswordCodeData());\n $this->loadFixtures();\n\n $email= array(\"email\"=>\"[email protected]\");\n $emailJson=json_encode($email);\n\n\n $client = static::createClient();\n\n $client->request('POST','/user/forgetPass',array(), array(), array(),$emailJson );\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "3defafb1fda1b949cc4e9dc8054311c5", "score": "0.6831334", "text": "public function testPassword()\n {\n $user = $this->logNewUser(new User());\n $response = $this->get('/profile/password');\n $response->assertSee('Borrar Cuenta');\n $user->delete();\n\n }", "title": "" }, { "docid": "2c86299335415f991a621b5a6c0e8b78", "score": "0.68067324", "text": "public function test_update_user_not_found()\n {\n $this->user_not_found_test('/api/v1/users/1', 'put', []);\n }", "title": "" }, { "docid": "27359618b510185be692f33c6860fae0", "score": "0.6790679", "text": "public function testChangePassword() {\n $this->objFromFixture('Member', 'admin')->login(); //Login admin\n \n \n //Test incorrect current password\n $response=$this->getAMFResponse('Server.changePassword', array('currPassword'=>'nimda', 'password'=>'admin1'));\n \n \n //Verify the response\n $this->assertEquals('EROR', $response['status'], 'Response status should have been EROR');\n $this->assertEquals(_t('CodeBankAPI.CURRENT_PASSWORD_MATCH', '_Current password does not match'), $response['message'], 'Response message should have been that the current password does not match');\n \n \n //Test chancing with the correct current password\n $response=$this->getAMFResponse('Server.changePassword', array('currPassword'=>'admin', 'password'=>'admin1'));\n \n \n //Verify the response\n $this->assertEquals('HELO', $response['status'], 'Response status should have been HELO');\n \n \n //Test chancing with the correct current password\n $response=$this->getAMFResponse('Administration.changeUserPassword', array('id'=>$this->objFromFixture('Member', 'noaccess')->ID, 'password'=>'admin1'));\n \n \n //Verify the response\n $this->assertEquals('HELO', $response['status'], 'Response status should have been HELO');\n \n \n //Try changing another users pasword where they don't have admin permissions\n $this->objFromFixture('Member', 'apiuser')->login(); //Login non-admin\n \n //Test chancing with the correct current password\n $response=$this->getAMFResponse('Administration.changeUserPassword', array('id'=>$this->objFromFixture('Member', 'noaccess')->ID, 'password'=>'admin1'));\n \n \n //Verify the response\n $this->assertEquals('EROR', $response['status'], 'Response status should have been EROR');\n }", "title": "" }, { "docid": "283597dd368291567e3d7a654caae0fb", "score": "0.6780809", "text": "public function updatePasswordAction() {\n $logger = $this->get('logger');\n if (!$this->get('request')->isXmlHttpRequest()) { // Is the request an ajax one?\n return new Response(\"<b>Not an ajax call!!!\" . \"</b>\");\n }\n\n try {\n //Get parameters\n $request = $this->get('request');\n $id = $request->get('id');\n $current = $request->get('current');\n $new = $request->get('new');\n\n $translator = $this->get(\"translator\");\n\n if( isset($id) && isset($current) && isset($new)){\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('Tech506SecurityBundle:User')->find($id);\n if( isset($user) ) {\n $encoder = $this->container->get('security.encoder_factory')->getEncoder($user);\n $currentEncoded = $encoder->encodePassword($current, $user->getSalt());\n if($currentEncoded == $user->getPassword()){\n $user->setPassword($encoder->encodePassword($new, $user->getSalt()));\n $em->persist($user);\n $em->flush();\n return new Response(json_encode(array(\n 'error' => false,\n 'msg' => $translator->trans('account.update.password.success'))));\n } else {\n return new Response(json_encode(array(\n 'error' => true,\n 'msg' => $translator->trans('current.password.error'))));\n }\n } else {\n return new Response(json_encode(array(\n 'error' => true,\n 'msg' => $translator->trans('validation.not.found'))));\n }\n } else {\n return new Response(json_encode(array('error' => true, 'msg' => \"Missing Parameters\")));\n }\n } catch (Exception $e) {\n $info = toString($e);\n $logger->err('Catalog::updatePasswordAction [' . $info . \"]\");\n return new Response(json_encode(array('error' => true, 'msg' => $info)));\n }\n }", "title": "" }, { "docid": "6b7c717989f57e70826ad139a4cac61b", "score": "0.6777992", "text": "public function canUpdatePassword();", "title": "" }, { "docid": "707600eefd7ddbd28359a97c91874918", "score": "0.67721623", "text": "public function updatePasswordAction()\n {\n $request = $this->get('request');\n $post = $request->request->all();\n\n $error = array();\n if ($this->get('app.sha256salted_encoderservices')->isPasswordValid($post['encodedPass'], $post['OldPassword'], $post['saltPass'])) {\n $result = $this->get('UserServices')->UpdateUserPassword($post['userId'], $post['NewPassword']);\n } else {\n $error['error'] = $this->translator->trans('Invalid Old Password. Please try again');\n $result = json_encode($error);\n }\n\n $res = new Response($result);\n $res->headers->set('Content-Type', 'application/json');\n return $res;\n }", "title": "" }, { "docid": "bbb1968062e16e9f9ca50aac67461d77", "score": "0.6740751", "text": "public function testChangePasswordAction_missingFields(){\n $this->addFixture(new LoadUserData());\n $this->addFixture(new LoadUserEmailData());\n $this->addFixture(new LoadForgetPasswordCodeData());\n $this->loadFixtures();\n $client = static::createClient();\n $formData=array(\"newPass\"=>\"test\",\"newPassR\"=>\"test1\",\"Username\"=>\"sampleUser\");\n $client->request('POST','/reset',array(), array(), array(),$formData);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "31b699e81d32e1dd5d3321fc6658faa3", "score": "0.67316645", "text": "public function testUserLoginWrongPassword()\n {\n $user = factory(User::class)->create();\n\n $credentials = [\n 'email' => $user->email,\n 'password' => 'badAss#Wrongpassword'\n ];\n\n $response = $this->post('/api/v1/auth/login', $credentials);\n $response->assertResponseStatus(400);\n }", "title": "" }, { "docid": "e64775eb91e5721a704d5195cd4a6779", "score": "0.6723008", "text": "public function testUpdateEmptyField()\n {\n\n $this->createDummyUser();\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => \"\",\n 'username' => \"\",\n 'email' => \"\",\n 'password' => $this->testPassword,\n 'password_confirmation' => $this->testPassword\n ));\n\n $this->assertDatabaseMissing('users', [\n 'id' => 1,\n 'name' => \"\",\n 'username' => \"\",\n 'email' => \"\",\n ]);\n\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n 'name' => $this->testName,\n 'username' => $this->testUsername\n ]);\n }", "title": "" }, { "docid": "7daa22b3b40e7f8d524afc309d4175fa", "score": "0.6716227", "text": "public function testUpdateRequired()\n {\n $user = factory(\\App\\User::class)->create(['id' => 1, 'job' => 'admin']);\n\n factory(\\App\\User::class)->create([\n 'id' => 2,\n 'job' => 'manager',\n 'surname' => 'surname',\n 'name' => 'name',\n 'patronymic' => 'patronymic',\n 'username' => 'username',\n 'password' => 'password',\n 'email' => '[email protected]',\n 'active' => 0,\n 'work_hours' => 0\n ]);\n\n $this->actingAs($user)->visit('/staff/2/edit')\n ->see('Редактировать сотрудника')\n ->see('surname')\n ->see('name')\n ->see('patronymic')\n ->see('username')\n ->see('password')\n ->see('[email protected]')\n ->type('', 'username')\n ->type('', 'password')\n ->press('Сохранить')\n ->dontSeeInDatabase('users', [\n 'id' => 2,\n 'username' => '',\n 'password' => ''\n ])\n ->see('Поле username обязательно для заполнения.')\n ->see('Поле password обязательно для заполнения.');\n }", "title": "" }, { "docid": "c4f56ac648499d80ec138c3cc1f1305f", "score": "0.6696969", "text": "public function testPasswordMismatch()\n {\n $this\n ->visit(route('public.register'))\n ->type('testuser', 'username')\n ->type('[email protected]', 'email')\n ->type('testpass', 'password1')\n ->type('testpass-different', 'password2')\n ->press(trans('public.buttons.register'))\n ->seePageIs(route(\"public.register\"))\n ->see(trans(\"validation.confirmed\"));\n }", "title": "" }, { "docid": "56b8f1873c91ca58b44f797a3780b4a5", "score": "0.6689931", "text": "public function test_validate_password_properties()\n {\n\n /* require */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n // 'password' => 'secret',\n ]);\n\n $request->response->assertJson([\n 'error' => 'The password field is required.'\n ])->assertStatus(400);\n\n /* minimum character >= 6 */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secre',\n ]);\n\n $request->response->assertJson([\n 'error' => 'The password must be at least 6 characters.'\n ])->assertStatus(400);\n\n /* maximun character <= 100 */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => Core::generateRandomString(101),\n ]);\n\n $request->response->assertJson([\n 'error' => 'The password may not be greater than 100 characters.'\n ])->assertStatus(400);\n\n }", "title": "" }, { "docid": "0a813e9b8a8b742567b5a44fa9ebd5b2", "score": "0.6668976", "text": "public function testRegisterPasswordRequired()\n {\n $response = $this->postJson('/auth/register', [\n 'fullname' => 'my full name',\n 'email' => '[email protected]',\n 'password_confirmation' => 'mypassword'\n ]);\n $response->assertStatus(422)\n ->assertJson([\n \"message\" => 'The given data was invalid.',\n \"errors\" => [\n \"password\" => [\n \"The password field is required.\"\n ]\n ]\n ]);\n }", "title": "" }, { "docid": "9c6c2a18e78a8a0c4b724100a7342b99", "score": "0.6659329", "text": "public function testUpdateFailure()\n {\n $validator = new UserMetaValidator(App::make('validator'));\n $this->assertFalse($validator->with($this->getInvalidCreateData())->update()->passes());\n $this->assertEquals(6, count($validator->errors()));\n $this->assertInstanceOf('Illuminate\\Support\\MessageBag', $validator->errors());\n }", "title": "" }, { "docid": "d37b0409180b7c596a32d3604b600379", "score": "0.6659028", "text": "public function put_password() {\n // Init model\n $model = new Model_V1_Users();\n\n $token = Security::clean(Input::put('token'));\n //check token\n if ($model->check_token($token) and $token != '') {\n // Init validation\n $val = Validation::forge()->add_model('Model_V1_Users');\n $data = array('password' => Input::put('new_password'));\n if ($val->run($data, true)) {\n\n $old_password = Security::clean(Input::param('old_password'), $this->_filter);\n $new_password = Security::clean(Input::param('new_password'), $this->_filter);\n $re_password = Security::clean(Input::param('retype_password'), $this->_filter);\n // check retype_password match with new_password\n if ($new_password !== $re_password) {\n return $this->get_response(ERROR_PWD_NOT_MATCH, '', MSG_PWD_NOT_MATCH);\n }\n\n $user_id = Security::clean(Input::put('user_id'));\n // Change password\n $res = Auth::change_password($old_password, $new_password, $user_id);\n if ($res['code'] != STATUS_OK) {\n return $this->get_response($res['code'], '', $res['message']);\n } else {\n return $this->get_response(STATUS_OK, $res['data'], 'Change password successful!');\n }\n\n } else {\n //get validation message\n $message = array();\n foreach ($val->error() as $field => $error) {\n array_push($message, array($field => $error->get_message()));\n }\n return $this->get_response(ERROR_VALIDATE, '', $message);\n }\n } else {\n return $this->get_response(ERROR_TOKEN_INVALID, '', MSG_TOKEN_INVALID);\n }\n }", "title": "" }, { "docid": "87716a5f7cfee4c98afb20c50c992f10", "score": "0.6653771", "text": "public function testUpdatePasswordOnly()\n {\n $responseMock = $this->createMock(ApiResponseInterface::class);\n $responseMock->method('getStatusCode')->willReturn(200);\n\n $requestMock = $this->createMock(AbstractUpdateRequest::class);\n $requestMock->method('mapResponse')->with($responseMock)->willReturn(['mapped' => 'Response']);\n\n $clientMock = $this->createMock(Client::class);\n $clientMock->method('execute')->with($requestMock)->willReturn($responseMock);\n\n $unitOfWorkMock = $this->createMock(UnitOfWork::class);\n $unitOfWorkMock\n ->method('createDocument')\n ->with(CustomerRepository::class, ['mapped' => 'Response'])\n ->willReturn('returnVal');\n\n $documentManagerMock = $this->createMock(DocumentManagerInterface::class);\n $documentManagerMock\n ->method('createRequest')\n ->with(Customer::class, CustomerPasswordChangeRequest::class, 'id', 4, 'currentPW', 'newPW')\n ->willReturn($requestMock);\n $documentManagerMock->method('getClient')->willReturn($clientMock);\n $documentManagerMock->method('getUnitOfWork')->willReturn($unitOfWorkMock);\n\n $metaDataMock = $this->createMock(ClassMetadataInterface::class);\n $metaDataMock->method('getName')->willReturn(CustomerRepository::class);\n\n $customerRepo = new CustomerRepository(\n $metaDataMock,\n $documentManagerMock,\n $this->createMock(QueryHelper::class),\n $this->createMock(FilterManagerInterface::class)\n );\n\n static::assertEquals(\n 'returnVal',\n $customerRepo->updateOnlyPassword('id', 4, 'currentPW', 'newPW')\n );\n }", "title": "" }, { "docid": "80835c5923d675804a5d6c3834c333c4", "score": "0.6649806", "text": "public function updateUserPassword($id,$password);", "title": "" }, { "docid": "efe87c13b88daf902a718968240c3026", "score": "0.6644302", "text": "public function changePassword() {\n $sessions = new Sessions();\n $users = new Users();\n $validation = json_decode($users->validatePassword($_POST['password'], $_POST['password2'], false));\n\n if ($validation->success) {\n $user = UsersQuery::create()->findOneById($sessions->getUserId());\n $user->setPassword(hash('sha256', SALT . $_POST['password']));\n $user->save();\n\n exit(json_encode([\n 'success' => true,\n 'message' => Dictionary::init()['password_changed']\n ]));\n }\n\n exit(json_encode($validation));\n }", "title": "" }, { "docid": "e71b2d0dabd46c00e1757ef66ab09d19", "score": "0.6643042", "text": "public function testVerifyPassword()\n {\n $this->user->setPassword(\"test\");\n $res = $this->user->verifyPassword(\"test\", \"test\");\n // $password = \"$2y$10$5RWBydI/rhc/zlr2fKZ5eOpQryrxaq6B7fh.8tEke1Ajw3/m1Je9W\";\n $this->assertTrue($res);\n }", "title": "" }, { "docid": "6c819b6092dd07ef2ad375b77d3908e5", "score": "0.6639204", "text": "public function testCheckPasswordResetCodeBadUser()\n {\n $ds = $this->buildMock(true, 'save');\n $user = new UserModel($ds);\n\n $this->assertFalse($user->checkResetPasswordCode('hash'));\n }", "title": "" }, { "docid": "e6ba1652040c712c6968649b0fea9889", "score": "0.66365737", "text": "public function update(Request $request, User $user)\n {\n if (!$user)\n {\n return response()->json(['message' => 'ID de usuario no existe.', 'type' => 'error', 'code' => 404], 404);\n }\n $rules=[];\n if($request->input('first_name')){\n $rules['first_name'] = 'required|min:3|max:32';\n }\n if($request->input('last_name')){\n $rules['last_name'] = 'required|min:3|max:32';\n }\n if($request->input('old_password')){\n $rules['old_password'] = 'required|min:6';\n }\n if($request->input('email')){\n $rules['email'] = 'required|email|confirmed|unique:users';\n }\n if($request->input('password')){\n $rules['password'] = 'required|confirmed|min:6|max:20';\n }\n $validator=Validator::Make($request->all(), $rules);\n\n if ($validator->fails()) {\n return response()->json(['message' => $validator->errors(), 'type' => 'error', 'code' => 100], 200);\n }\n if($request->input('password') && (!Hash::check($request->input('old_password'), $user->password)))\n {\n return response()->json(['message' => 'La contraseña actual es incorrecta', 'type' => 'info', 'code' => 200], 200);\n }\n \n $first_name=$request->input('first_name');\n $last_name=$request->input('last_name');\n $email=$request->input('email');\n $password=bcrypt($request->input('password'));\n\n $bandera = false;\n\n if ($first_name)\n {\n $user->first_name = $first_name;\n $bandera=true;\n }\n\n if ($last_name)\n {\n $user->last_name = $last_name;\n $bandera=true;\n }\n\n if ($email)\n {\n if($user->email != $email)\n {\n $user->email = $email;\n $user->confirmed = false;\n $bandera=true;\n }\n }\n\n if ($password)\n {\n $user->password = $password;\n $bandera=true;\n }\n\n if ($bandera)\n {\n $user->save();\n return response()->json(['message'=>'Datos actualizados.', 'type'=>'success', 'code' => 300], 200);\n }\n else\n {\n return response()->json(['message'=>'No se ha modificado ningun dato.', 'type'=>'info', 'code'=>400],200);\n }\n }", "title": "" }, { "docid": "5889b13800690caac6df1e4e6c0577b0", "score": "0.6635868", "text": "public function updatePassword(Request $request){\n\n try{\n $user_id = $request->user_id;\n $old_password = $request->old_password;\n $password = $request->new_password;\n\n $emailLogin = EmailLogin::where('app_user_id',$user_id)->count();\n\n if(!empty($emailLogin)){\n\n $checkPass = EmailLogin::where('app_user_id',$user_id)->where('password',$old_password)->first();\n\n if(!empty($checkPass)){\n\n if($checkPass->account_type_id == 1) {\n $checkPass->password = \\Hash::make($password);\n $checkPass->visible_pass = \\Crypt::encrypt($password);\n\n if($checkPass->save()){\n return Response::json(['success' => 'Password updated successfully'], 200);\n }else{\n return Response::json(['error' => 'Something went wrong', 'error_id' => 300], 403);\n }\n\n }else{\n return Response::json(['error' => 'Logged with social, Cant change password', 'error_id' => 100], 403);\n }\n\n }else{\n return Response::json(['error' => 'wrong password inserted, please try again','error_id'=> 401 ], 403);\n }\n\n }else{\n return Response::json(['error' => 'No user found with this user id', 'error_id' => 404], 403);\n }\n\n\n\n\n }catch(Exception $ex){\n return Response::json(['error' => 'Something went wrong', 'error_id' => 200], 403);\n\n }\n }", "title": "" }, { "docid": "f702fed34e193223b117e429e430495f", "score": "0.66302407", "text": "public function editUser() {\n $response = Input::get('response');\n $user = User::find(Input::get('id'));\n\n if(is_null($user)) {\n if($response == 'JSON')\n return '{\"status\":\"error\",\"message\":\"Usuario inválido\",\"data\":'.json_encode(Input::except('password')).'}';\n else\n return Redirect::to('user/edit')->with('alert', 'Usuario inválido')->withInput(Input::except('password'));\n }\n\n if($user->id != Auth::user()->id and Auth::user()->user_type_id != 4) {\n if($response == 'JSON')\n return '{\"status\":\"error\",\"message\":\"Usted no tiene permisos para modificar este usuario\",\"data\":'.json_encode(Input::except('password')).'}';\n else\n return Redirect::to('user/edit')->with('alert', 'Usted no tiene permisos para modificar este usuario')->withInput(Input::except('password'));\n }\n\n /* Verifying that user has a correct and valid data */\n $validation = $this->validateUser('edit');\n\n if(!$validation['isValid']) {\n if($response == 'JSON')\n return '{\"status\":\"error\",\"message\":'.$validation['message'].',\"data\":'.json_encode(Input::except('password')).'}';\n else\n return Redirect::to('user/edit')->with('alert', $validation['message'])->withInput(Input::except('password'));\n }\n\n /* Getting the old user email */\n $old_email = $user->email;\n\n /* Updating data */\n $user->last_name = Input::get('last_name');\n $user->first_name = Input::get('first_name');\n $user->phone = Input::get('phone');\n $user->extension_phone = Input::get('extension_phone');\n $user->email = Input::get('email');\n\n /* Generating and saving encrypted password */\n if(Input::get('password') != '') {\n $crypt_password = Hash::make(Input::get('password'));\n $user->password = $crypt_password;\n }\n\n /* If the request brings with a valid academic administrative unit, set it, if not, set to NULL */\n if(Input::get('academic_administrative_unit_type') == '3') {\n $user->academic_administrative_unit_id = NULL;\n }\n else {\n $user->academic_administrative_unit_id = Input::get('academic_administrative_unit');\n }\n\n /* If the request came from signup-pro, get the department of user */\n if(Input::has('department_id')) {\n $user->department_id = Input::get('department_id') == 0 ? NULL : Input::get('department_id');\n }\n\n /* If the request came from signup-pro, get the user_type_id of user */\n if(Input::has('user_type_id')) {\n $user->user_type_id = Input::get('user_type_id');\n }\n\n $user->save();\n\n /* Validatying if the user needs confirm email and sending email if it is necessary */\n if($old_email != $user->email) {\n $message = $this->mailToValidateMail($user, 'edit');\n if(Auth::user()->user_type_id != 4) {\n Auth::logout();\n }\n }\n else {\n $message = 'Información de usuario actualizada';\n }\n\n\n if($response == 'JSON') \n return '{\"status\":\"success\",\"message\":\"'.$message.'\",\"user\":'.$user.'}';\n else\n return Redirect::to('login')->with('alert', $message);\n\n }", "title": "" }, { "docid": "0ca94122f81cd20a9f7626d5415cb752", "score": "0.6629248", "text": "public function update(Request $request, $id)\n {\n //$usuario = User::find($id);\n\n /*$usuario->nombre = $request->nombre;\n $usuario->ap_paterno = $request->ap_paterno;\n $usuario->ap_materno = $request->ap_materno;\n $usuario->email = $request->email;*/\n\n //dd($request->actual_password);\n\n //Revisar que la contraseña actual sea la misma que la guardada en bd\n $password_ok = Auth::attempt(['id' => $id, 'password' => $request->actual_password]);\n\n $input = [];\n\n $input['nombre'] = $request->nombre;\n $input['ap_paterno'] = $request->ap_paterno;\n $input['ap_materno'] = $request->ap_materno;\n $input['email'] = $request->email;\n\n if($password_ok){\n\n if(isset($request->nuevo_password)){\n if($request->nuevo_password == $request->repetir_password){\n\n //Guardar en array la contraseña\n $input['password'] = Hash::make($request->repetir_password);\n\n $usuario = User::find($id);\n $query = $usuario->update($input);\n\n }else{\n Flash::error(\"Las contraseñas no coinciden\");\n return redirect('modificar/'.$id);\n }\n }else{\n $usuario = User::find($id);\n $query = $usuario->update($input);\n }\n\n if($query){\n Flash::success('Registro guardado exitosamente');\n return redirect('perfil');\n }else{\n Flash::error('Error en el proceso de guardado');\n return redirect('perfil');\n }\n }else{\n Flash::error('La contraseña actual es incorrecta');\n return redirect('modificar/'.$id);\n }\n\n }", "title": "" }, { "docid": "fa714cd71312125377ade8c46028625d", "score": "0.66226524", "text": "function nrua_users_password_change( WP_REST_Request $request ){\n\n\t$parameters = $request->get_json_params();\n\n\t$email = sanitize_email( stripslashes( $parameters['email'] ) );\n\t$password = sanitize_text_field( stripslashes( $parameters['password'] ) );\n\t$password_lost_code = sanitize_text_field( stripslashes( $parameters['password_lost_code'] ) );\n\n\t// check passowrd\n\t$pass_errors = nrua_check_password( $password );\n\tif( count($pass_errors) > 0 ){\n\t\t$response = [\n\t\t\t'code' => 400,\n\t\t\t'message' => __( 'Please, use more complex password.', 'nrua' ),\n\t\t\t'data' => [\n\t\t\t\t'status' => 400,\n\t\t\t\t'errors' => $pass_errors\n\t\t\t]\n\t\t];\n\t\treturn new WP_REST_Response( $response, 400 );\n\t}\n\n\t// verify email\n\tif( !is_email( $email ) ){\n\t\t$response = [\n\t\t\t'code' => 400,\n\t\t\t'message' => __( 'Please, use correct email address', 'nrua' ),\n\t\t\t'data' => [\n\t\t\t\t'status' => 400,\n\t\t\t]\n\t\t];\n\t\treturn new WP_REST_Response( $response, 400 );\n\t}\n\n\t$user_id = username_exists( $email );\n\tif ( ! $user_id && false == email_exists( $email ) ) {\n\t\t$response = [\n\t\t\t'code' => 404,\n\t\t\t'message' => __('User not found', 'nrua'),\n\t\t\t'data' => [\n\t\t\t\t'status' => 400\n\t\t\t]\n\t\t];\n\t\treturn new WP_REST_Response( $response, 400 );\n\t}else{\n\t\t$nw_user_password_lost_code = get_user_meta( $user_id, 'nw_user_password_lost_code', true );\n\t \n\t\tif( $password_lost_code === $nw_user_password_lost_code && $nw_user_password_lost_code > 0 ){\n\t\t\tdelete_user_meta( $user_id, 'nw_user_password_lost_code');\n\n\t\t\t$result = wp_set_password( $password, $user_id );\n\t\t\tif( is_wp_error($result) ){\n\t\t\t\t$response = [\n\t\t\t\t\t'code' => 500,\n\t\t\t\t\t'message' => __('Process user password change failed.', 'nrua'),\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'status' => 500\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t\treturn new WP_REST_Response( $response, 500 );\n\t\t\t}else{\n\t\t\t\t$response = [\n\t\t\t\t\t'code' => 200,\n\t\t\t\t\t'message' => __( 'User password changed successful.', 'nrua' ),\n\t\t\t\t\t'data' => [\n\t\t\t\t\t\t'status' => 200\n\t\t\t\t\t]\n\t\t\t\t];\n\t\t\t\treturn new WP_REST_Response( $response, 200 );\n\t\t\t}\n\t\t}else{\n\t\t\t$response = [\n\t\t\t\t'code' => 400,\n\t\t\t\t'message' => __( 'User password code is wrong.', 'nrua' ),\n\t\t\t\t'data' => [\n\t\t\t\t\t'status' => 400\n\t\t\t\t]\n\t\t\t];\n\t\t\treturn new WP_REST_Response( $response, 400 );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "76e6d61e6942a15be41599f82a85df24", "score": "0.66226214", "text": "public function testUserCantResetPasswordWithoutPasswordConfirmation() {\n $response = $this->postJson('/api/reset-password', [\n 'password' => $this->password,\n 'email' => $this->faker->unique()->safeEmail(),\n 'token' => $this->faker->sha256()\n ]);\n\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "c729fc1db718ea29d74d1ca4bf7441b7", "score": "0.6612748", "text": "public function testSetPassword()\n {\n $this->user->setPassword(\"test\");\n $res = $this->user->password;\n // $password = \"$2y$10$5RWBydI/rhc/zlr2fKZ5eOpQryrxaq6B7fh.8tEke1Ajw3/m1Je9W\";\n $this->assertEquals($res, $this->user->password);\n }", "title": "" }, { "docid": "60e81fcb7be331b25b3149aa5be403a2", "score": "0.6584718", "text": "public function testBadValuesModifyPassword($passwordToChange, $passwordRepeatToChange)\n {\n\n\n $userController = new UserController();\n $userToTest = new User(\"1\",\"[email protected]\",\"test123\",\"test\",\"testFirstName\",\"testLastName\",\"0000000000\",\"1\");\n\n $dbMock = $this->createMock(UserDAO::class);\n $dbMock->method('changeUserPassword')\n ->willReturn(true);\n\n $userController->setUserDAO($dbMock);\n $userController->setUser($userToTest);\n\n $userController->modifyPassword($passwordToChange,$passwordRepeatToChange);\n $hashedNewPassword = sha1($passwordToChange);\n\n assertNotEquals($hashedNewPassword,$userToTest->getPassword());\n }", "title": "" }, { "docid": "970dbdeea1a856984adf11dbbd3499b1", "score": "0.65824944", "text": "public function testUpdateById()\n {\n $user = $this->user->getByUsername('lwt');\n\n $this->assertTrue($this->user->updateById($user->getId(), ['email' => '[email protected]']));\n $this->assertFalse($this->user->updateById($user->getId(), []));\n }", "title": "" }, { "docid": "d717040fd6d1f7325e617efa31bd5969", "score": "0.6563331", "text": "public function testChangePassword($user)\n {\n $this->client->setAuth('basic', ['username' => $user->email, 'token' => $this->token]);\n\n $postFields = [\n 'previous_password' => 'aBc12345',\n 'password' => '12345'\n ];\n\n $this->client->users($user->id)->changePassword($postFields);\n $this->assertEquals(200, $this->client->getDebug()->lastResponseCode);\n $this->assertNull($this->client->getDebug()->lastResponseError);\n }", "title": "" }, { "docid": "e55bc75fe08805504baf1fc6245e0a0c", "score": "0.65503174", "text": "public function password(Request $request){\n \n $request->validate([\n \"old_password\" => \"required|min:6\",\n \"new_password\" => \"required|min:6|confirmed\"\n ]);\n $user = Auth::user();\n\n if( !Hash::check($request->old_password, $user->password)){\n return response()->json([\n \"errors\" => [\n \"Wrong password\" . \" \" . $request->old_password\n ]\n ], 401);\n }\n\n\n // Change user password\n $user->password = Hash::make($request->new_password);\n $user->save();\n\n return response()->json([\n \"success\" => true\n ], 200);\n }", "title": "" }, { "docid": "544f794893e394ce570d5e09b45ed284", "score": "0.65385175", "text": "public function updatePassword() {\n try {\n $postdata = file_get_contents(\"php://input\");\n $request = json_decode($postdata);\n\n /*\n * SUBMIT THE RECORD\n */\n $response = $this->profile_model->updatePassword($request);\n switch ($response) {\n case -1 :\n $this->MSG = INSUFF_DATA;\n break;\n\n case 0 :\n $this->MSG = WRONG_PASSWORD;\n break;\n\n case 1 :\n $this->MSG = PASS_NOT_MATCH;\n break;\n\n case 2 :\n $this->MSG = PASS_CHANGE_SUCC;\n $this->STATUS = SUCCESS_STATUS;\n break;\n }\n\n $this->RESP = array(\n 'STATUS' => $this->STATUS,\n 'MSG' => $this->MSG\n );\n\n echo json_encode($this->RESP);\n } catch (Exception $ex) {\n throw new Exception('Profile Controller : Error in updatePassword function - ' . $ex);\n }\n }", "title": "" }, { "docid": "911992c1aafb3ee7961d2785355527f9", "score": "0.6522743", "text": "public function adminChangePassword(Request $request, $id){\n $data = $request->validate([\n 'password' => 'required|string|min:6',\n 'password_confirm' => 'required|string|min:6',\n ]); \n\n if($request->password == $request->password_confirm){\n $user = User::findOrfail($id);\n $user->password = Hash::make($request->password);\n return response()->json(['success'=>'Contraseña Reestablecia'], 200);\n } \n return response()->json(['errors'=>'Los campos deben ser iguales'], 422); \n }", "title": "" }, { "docid": "8086a97ef60a98a85502d1a00b167a40", "score": "0.652083", "text": "public function testCanBeUpdateWithoutAvatarAndSeeInDB()\n {\n $user = $this->createUser();\n\n $data = ['id' => $user->id, 'name' => 'Test User', 'email' => '[email protected]', 'password' => '123456'];\n $this->post('/api/users/'.$user->id, $data, ['X-Authorization' => $user->apiKey->key]);\n $user = User::find($user->id);\n $this->assertEquals('Test User', $user->name);\n $this->assertEquals('[email protected]', $user->email);\n $this->assertEquals('/img/user2-160x160.png', $user->avatar);\n $this->get('/api/users')->seeJsonContains(['id' => $user->id, 'name' => 'Test User', 'email' => '[email protected]', 'avatar' => '/img/user2-160x160.png'])->seeStatusCode(200);\n }", "title": "" }, { "docid": "162f83ab0b973ff954c9d1faa9b05bb7", "score": "0.6507103", "text": "public function testUserUpdateOtherUser()\n {\n $user = factory(User::class)->create();\n $otherUser = factory(User::class)->create();\n $response = $this\n ->actingAs($otherUser)\n ->call('put', '/users/'.$user->id, [\n 'name' => 'Henk',\n 'email' => '[email protected]',\n 'editor' => 'vim',\n ]);\n $response->assertStatus(403);\n }", "title": "" }, { "docid": "6856d9ea694f7fa1c7e3ebea838a42c3", "score": "0.64952934", "text": "public function testIncorrectPasswordLogin()\n {\n $this->createCompany();\n $this->createUser();\n\n $this->visit('/')\n ->type('12345', 'username')\n ->type('12345', 'company')\n ->type('bad_password', 'password')\n ->press('Login')\n ->see('Gebruikersnaam en/of wachtwoord onjuist');\n }", "title": "" }, { "docid": "378037a038716ba9503821c503109290", "score": "0.6482562", "text": "public function updatePassword(Request $request)\n {\n\n $validator = Validator::make($request->all(), [\n 'current_password' => 'required',\n \t'password' => 'required|confirmed|different:current_password|min:8',\n ]);\n\n if($validator->fails()){\n $response = [\n 'success' => false,\n 'message' => $validator->errors(),\n ];\n return response()->json($response, 401); \n }\n\n $user = Auth::user();\n\n if(!Hash::check($request->current_password, $user->password)) {\n \n $response[\"success\"] = False;\n $response['message'] = \"Current Password does not match!\";\n \n return response()->json($response, 422);\n }\n DB::beginTransaction();\n\n try {\n \n $user->password = Hash::make($request->input('password'));\n $user->email_verified_at = Carbon::now();\n $user->default_password = null;\n $user->save();\n\n $user->notify(new PasswordResetSuccess($user));\n \n DB::commit(); \n\n $response = [\n 'Success' => true,\n 'Message' => \"Password Updated Succesfully!\",\n ];\n return response()->json($response, 200);\n\n\n } catch (Exception $e) {\n report($e);\n \n DB::rollBack();\n\n $response = [\n 'Success' => false,\n 'Message' => \"Oops! Something went wrong, Try Again!\",\n ];\n return response()->json($response, 422);\n }\n\n }", "title": "" }, { "docid": "dbed6fd32bc17278f741a63c28dc231b", "score": "0.648159", "text": "function it_resets_password_successfully(UserRepository $repository)\n {\n $oldSalt = 'ptrjb30aOvqWJ4mG';\n //$oldPassword = '*******';\n $oldHashedPassword = '7907C7ED5F7F4E4872E24CAB8292464F';\n \n $user = (new UserEntity())\n ->setId(1)\n ->setUserName('jihe')\n ->setPassword($oldHashedPassword)\n ->setSalt($oldSalt)\n ->setRole(UserEntity::ROLE_OPERATOR)\n ->setStatus(UserEntity::STATUS_NORMAL);\n\n $repository->findUser(1)->shouldBeCalled()->willReturn($user);\n $repository->updatePassword(1, \n Argument::that(function ($password) {\n return 32 == strlen($password);\n }),\n Argument::that(function ($salt) {\n return 16 == strlen($salt);\n }))\n ->shouldBeCalled(1)->willReturn(true);\n\n $this->resetPassword(1, '123456')\n ->shouldBe(true);\n }", "title": "" }, { "docid": "939399600f6333f61a513c32d47473d3", "score": "0.6481178", "text": "public function put_password($data){\n $user_id = ($_SESSION['market3w_user_id']==-1)?null:$_SESSION['market3w_user_id'];\n if($user_id==null){return $this->setApiResult(false, true, 'you are not logged');}\n\n $user_password = (empty ($data['user_password']))?null:$data['user_password'];\n $user_password2 = (empty ($data['user_password']))?null:$data['user_password'];\n $user_email = (empty ($data['user_email']))?null:$data['user_email'];\n\n if($user_id==null){return $this->setApiResult(false, true, 'param \\'user_id\\' undefined');}\n if(!is_numeric($user_id)){return $this->setApiResult(false, true, 'param \\'user_id\\' is not numeric');}\n if($user_password==null){return $this->setApiResult(false, true, 'param \\'user_password\\' undefined');}\n if($user_password2==null){return $this->setApiResult(false, true, 'param \\'user_password2\\' undefined');}\n if($user_email==null){return $this->setApiResult(false, true, 'param \\'user_email\\' undefined');}\n\n $this->table->resetObject();\n\n\n if($user_password!=null && $user_password==$user_password2){\n $this->table->addNewField(\"user_password\",md5($user_email.SALT_USER_PWD.$user_password));\n }\n $this->table->addWhere(\"user_id\", $user_id);\n $this->table->update();\n return $this->setApiResult(true);\n }", "title": "" }, { "docid": "b19ecac4758944cf4422fa998af5d386", "score": "0.6480587", "text": "public function testOnlyNewConfirmation()\n {\n $validator=new Validator();\n $result=$validator->changePassword(\"\",\"123577\",\"1234\",999);\n $this->assertFalse($result[0]);\n $this->assertEquals('Current password is required.',$result[1]);\n }", "title": "" }, { "docid": "3f3d232dd8f470b4092aada2698ea586", "score": "0.6476841", "text": "function test_update_normal()\n {\n //assert update did not return false\n $result = my_sql::update(\"useraccount\", array(\"lastName\", \"firstName\"), array(\"Shlongers\", \"Bobby\"), \"userEmail=:0\", array(\"[email protected]\"));\n $this->assertNotEquals(false, $result);\n\n //assert validity of update data\n $expected = [\n [\"userEmail\" => \"[email protected]\", \"profileImageID\" => null, \"firstName\" => \"Bobby\", \"lastName\" => \"Shlongers\", \"shippingAddressID\" => null, \"billingAddressID\" => null]\n ];\n $values = my_sql::select(\"*\", \"useraccount\", \"userEmail=:0\", array(\"[email protected]\"));\n $this->assertEquals($expected, $values);\n }", "title": "" }, { "docid": "cab334bd890c15fc9b0bce452bec0fcd", "score": "0.6474313", "text": "public function testUpdateValidUser()\n\t\t{\n\t\t\t$user = new User(-1, $this->email, $this->password, $this->salt, 0, $this->externalId);\n\t\t\t$user->insert($this->mysqli);\n\t\t\t\n\t\t\t//change the user's email\n\t\t\t$newEmail = \"[email protected]\";\n\t\t\t$user->setEmail($newEmail);\n\t\t\t\n\t\t\t\n\t\t\t//change the user's verified status\n\t\t\t$user->setVerified(1);\n\t\t\t\n\t\t\t// update user\n\t\t\t$user->update($this->mysqli);\n\t\t\t\n\t\t\t// select the user from mySQL and assert it was inserted properly\n\t\t\t$query = \"SELECT id, email, password, salt, verified, externalId FROM user WHERE email = ?\";\n\t\t\t$statement = $this->mysqli->prepare($query);\n\t\t\t$this->assertNotEqual($statement, false);\n\t\t\t\n\t\t\t// bind parameters to the query template\n\t\t\t$wasClean = $statement->bind_param(\"s\", $newEmail);\n\t\t\t$this->assertNotEqual($wasClean, false);\n\t\t\t\n\t\t\t// execute the statement\n\t\t\t$executed = $statement->execute();\n\t\t\t$this->assertNotEqual($executed, false);\n\t\t\t\n\t\t\t// get the result & verify we only had 1\n\t\t\t$result = $statement->get_result();\n\t\t\t$this->assertNotEqual($result, false);\n\t\t\t$this->assertIdentical($result->num_rows, 1);\n\t\t\t\n\t\t\t// examine the result & assert we got what we want\n\t\t\t$row = $result->fetch_assoc();\n\t\t\t$this->sqlUser = new User($row[\"id\"], $row[\"email\"], $row[\"password\"], $row[\"salt\"], $row[\"verified\"], $row[\"externalId\"]);\n\t\t\t$this->sqlUser->setVerified($row[\"verified\"]);\n\t\t\t$this->sqlUser->setExternalId($row[\"externalId\"]);\n\t\t\t\n\t\t\t// verify the email was changed\n\t\t\t$this->assertIdentical($this->sqlUser->getEmail(), $newEmail);\n\t\t\t$this->assertIdentical($this->sqlUser->getPassword(), $this->password);\n\t\t\t$this->assertIdentical($this->sqlUser->getSalt(), $this->salt);\n\t\t\t$this->assertTrue($this->sqlUser->getId() > 0);\n\t\t\t$this->assertTrue($this->sqlUser->getVerified() == 1);\n\t\t\t$statement->close();\n\t\t}", "title": "" }, { "docid": "3a9a5e372b8ddb53e532c355718f7c5d", "score": "0.6471926", "text": "public function updateForgotPasswordAction()\n {\n $request = $this->get('request');\n $post = $request->request->all();\n\n $emails = $post['userId'];\n $user_info = $this->get('UserServices')->checkUserEmailMD5($emails);\n $userId = $user_info['cu_id'];\n\n $newPass = $post['newPass'];\n $success = $this->get('UserServices')->updateUserPassword($userId, $newPass);\n $res = new Response(json_encode($success));\n $res->headers->set('Content-Type', 'application/json');\n return $res;\n }", "title": "" }, { "docid": "30005f9ec61c01f48d4acc6132e19551", "score": "0.6469933", "text": "public function testLoginWrongPassword()\n {\n $user = factory(User::class)->create([\n 'email' => '[email protected]',\n ]);\n\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/login')\n ->type('email', $user->email)\n ->type('password', 'fails')\n ->press('Login')\n ->assertPathIs('/login')\n ->assertSee(\n 'These credentials do not match our records.'\n );\n });\n }", "title": "" }, { "docid": "42b94c35be439036d4bb061ab47997d4", "score": "0.6464998", "text": "public function testUpdateUser()\n {\n $this->addTestFixtures();\n $this->logInAsAdmin();\n $id = $this->user1->getId();\n\n $crawler = $this->client->request('GET', '/users/'.$id.'/edit');\n\n $form = $crawler->selectButton('Modifier')->form();\n $form['user[username]'] = 'userAddTest';\n $form['user[password][first]'] = '1234';\n $form['user[password][second]'] = '1234';\n $form['user[email]'] = '[email protected]';\n $form['user[roles]'] = 'ROLE_USER';\n $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n $response = $this->client->getResponse();\n $statusCode = $response->getStatusCode();\n\n $this->assertEquals(200, $statusCode);\n $this->assertContains('Superbe! L\\'utilisateur a bien été modifié', $crawler->filter('div.alert.alert-success')->text());\n }", "title": "" }, { "docid": "5d9ffbefc60e53fd80b46b53e6a180a5", "score": "0.6464491", "text": "public function test_update_user_success()\n {\n $this->userMock\n ->shouldReceive('find')\n ->once()\n ->andReturn($this->userMock)\n ->shouldReceive('update')\n ->once()\n ->andReturn(TRUE)\n ->shouldReceive('toArray')\n ->once()\n ->andReturn(['user']);\n\n $expectedResponse = [\n 'code' => 200,\n 'status' => 'OK',\n 'message' => 'success',\n 'response' => ['user']\n ];\n\n $this->json('PUT', '/api/v1/users/321', ['name' => 'test test'])\n ->seeJsonEquals($expectedResponse);\n }", "title": "" }, { "docid": "bafde6bffdd7e1b62c6b90a61402d2fd", "score": "0.64568985", "text": "public function testEmptyPassword() {\n\n $newUser = new User();\n $newUser->setUserId(4);\n $newUser->setLoginName('testUser2');\n $newUser->setPassword('');\n $newUser->setUserTypeId(1);\n\n try {\n $saveUser = $this->userManagementDao->addUser($newUser);\n //If success fully inserted, then that's a failure.\n $this->assertTrue(false);\n } catch (Exception $e) {\n $this->assertTrue(true);\n }\n }", "title": "" }, { "docid": "fcdf6897e4dac1f30500e6e93ed46283", "score": "0.6455251", "text": "public function testUpdateUser()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "3bad524d324d96fd7a2ab45d6bb000f6", "score": "0.6454199", "text": "public function postChangePass()\n {\n $user = User::findOrFail(Input::get('user_id'));\n\n if ($this->checkPassword(Input::get('password_actual'), $user->password)) {\n $rules = array(\n 'password' => 'required|between:6,12|confirmed|different:password_actual',\n 'password_confirmation' => 'required|between:6,12',\n );\n $messages = array(\n 'password.required' => 'O campo Nova Senha é requerido',\n 'password.between' => 'O campo Nova Senha precisa ter entre 6 e 12 caracteres!',\n 'password.confirmed' => 'O campo Nova Senha e Confirma Senha precisam ser iguais!',\n 'password.different' => 'O campo Nova Senha precisam ser diferente de sua Senha Atual!',\n 'password_confirmation.required' => 'O campo Confirma Senha é requerido',\n 'password_confirmation.between' => 'O campo Nova Senha precisa ter entre 6 e 12 caracteres!',\n );\n\n $validator = Validator::make(Input::all(), $rules, $messages);\n\n if ($validator->passes()) {\n $user->password = Input::get('password');\n $user->save();\n return Redirect::to('usuarios')->with('message', $user->nome . ', sua senha foi atualizada com sucesso!!!');\n }\n return Redirect::back()\n ->with('message', 'Ocorreram alguns problemas ao validar os dados!')\n ->withErrors($validator)\n ->withInput();\n }\n return Redirect::back()->with('message', 'Ocorreram alguns problemas ao validar os dados!')\n ->withErrors('Senha atual não confere!');\n }", "title": "" }, { "docid": "9582776225fd4dfff1c3076385fdd04a", "score": "0.6442539", "text": "public function testUpdateFuelCardFail2()\n {\n // Arrange\n $user = factory(User::class)->create();\n $body = [\n 'exp_month' => '11',\n 'exp_year' => null,\n ];\n\n // Act\n Passport::actingAs($user);\n $response = $this->json('POST', 'api/updatefuelcard', $body);\n\n // Assert\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "51f77fe215fd929677ec448d2cac1b5a", "score": "0.64340186", "text": "public function updatePassword(){\n $this->validate([\n 'password'=>['required',$this->passwordRules()],\n ]);\n User::find($this->modelId)->update(['password'=>Hash::make($this->password)]);\n $this->modalFormVisible = false;\n }", "title": "" } ]
a609133a65ad1c867f900bd97a7688e5
layout ant view variables
[ { "docid": "f3d02302cf5ee47a31bf5a41089705b1", "score": "0.0", "text": "public function dashboardAction() {\n $this->layout()->heading = $this->getTranslator()->translate('Dashboard');\n $this->layout()->subHeading = $this->getTranslator()->translate('Welcome to admin panel'); \n return array();\n }", "title": "" } ]
[ { "docid": "5b65a99ef2c9848d9273324979189b3e", "score": "0.6889688", "text": "public function layout();", "title": "" }, { "docid": "0fd62d4536a8d1b32b2cca2d3daeaa15", "score": "0.6886227", "text": "public function layout() {}", "title": "" }, { "docid": "9ccf870b5de5c4f1a405613e7ee08483", "score": "0.66227555", "text": "public static function viewlayoutVars($layoutVars)\n\t{\n\t\tself::$layoutVars = $layoutVars;\n\t}", "title": "" }, { "docid": "c6571a07ec85e2e22473b1c8624ae2f9", "score": "0.6471709", "text": "protected function setupLayout()\n\t{\n\t\t//if (!is_null($this->layout))\n\t\t//{\n\t\t//\t$this->layout = View::make($this->layout, array('BaseUrl'=>URL::to('/')));\n\t\t//}\n\t}", "title": "" }, { "docid": "2aad027c6239ecadb379f32706966410", "score": "0.6463445", "text": "protected function setupLayout(){\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": "9ea3847092084015f82f057dc98eb16b", "score": "0.64206684", "text": "protected function setupLayout()\n\t{\n\t\t// if ( ! is_null($this->layout))\n\t\t// {\n\t\t// \t$this->layout = View::make($this->layout);\n\t\t// }\n\t}", "title": "" }, { "docid": "c06fce363af31a104106116a166969d5", "score": "0.63302284", "text": "public function GetLayout ();", "title": "" }, { "docid": "745c5fbed404f6f2b479b2e1092e9f23", "score": "0.63225985", "text": "protected function _initBasicViewVariables()\n {\n // Add base url to view\n $this->view->setVar('_baseUri', BASE_URI);\n $this->view->setVar('_siteName', $this->config->website->siteName);\n $this->view->setVar('_currentUri', $_SERVER['REQUEST_URI']);\n\n // Get template default\n $this->_defaultTemplate = $this->di->get(\"config\")->frontendTemplate->defaultTemplate;\n\n // Add template default to view\n $this->view->setVar(\"_defaultTemplate\", $this->_defaultTemplate);\n\n $this->view->setVar('_user', $this->session->get('auth'));\n }", "title": "" }, { "docid": "3a14530a5592b897b9cae918732a6444", "score": "0.6317628", "text": "protected function configureViewAssignVariables() {\n\t\t$globalVariables = $this->configuration['variables.'];\n\t\t$templateVariables = $this->getTemplate()->getVariables();\n\t\tif(!is_array($globalVariables)) $globalVariables = array();\n\t\tif(!is_array($templateVariables)) $templateVariables = array();\n\t\t$variables = array_merge($globalVariables, $templateVariables);\n\n\t\tforeach ($variables as $variableName => $cObjType) {\n\t\t\tif (is_array($cObjType)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(!in_array($variableName, $this->reservedVariableConstantNames)) {\n\t\t\t\t$this->view->assign($variableName, $this->cObj->cObjGetSingle($cObjType, $variables[$variableName . '.']));\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException('Cannot use reserved name \"' . $variableName . '\" as variable name in FLUIDPAGE.', 1288095721);\n\t\t\t}\n\t\t}\n\t\t$this->view->assign('data', $this->cObj->data);\n\t\t$this->view->assign('page', $this->cObj->data);\n\t\t$this->view->assign('current', $this->cObj->data[$this->cObj->currentValKey]);\n\t\t$this->view->assign('layout', $this->template->getLayoutUid());\n\t}", "title": "" }, { "docid": "71a7432adda1fa544487dea487798096", "score": "0.63091063", "text": "public function initializeView()\n {\n $this->view->assign('extConf', ObjectAccess::getGettableProperties($this->extConf));\n $this->view->assign('id', $GLOBALS['TSFE']->id);\n $this->view->assign('data', $this->configurationManager->getContentObject()->data);\n }", "title": "" }, { "docid": "2c85ec1b98460787ef18a898b62d8c84", "score": "0.6288983", "text": "protected function setupLayout()\n\t{\n\n\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": "04f15b3803ccc23f34bd14c97c0ea6d7", "score": "0.62779367", "text": "public function renderLayout(): void;", "title": "" }, { "docid": "c7cc5f4bd860dd663a5a39c4df6b0121", "score": "0.6237739", "text": "protected function setupLayout()\n\t{\n\t\tif( ! is_null( $this->layout ) ) {\n\t\t\t$this->layout = View::make( $this->layout );\n\t\t}\n\n\t\tView::share( 'currentUser', Auth::user() );\n\t}", "title": "" }, { "docid": "3f79a9e7eb665c234ba8d5ff424a8454", "score": "0.622075", "text": "protected function setupLayout() {\n\t\tif (! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "c037f5807adad01d2d52e85ed928e346", "score": "0.6206657", "text": "private function initializeView() {\n\t\t$this->assign('ControllerName', $this->controllerName);\n\t\t$this->assign('Role', $this->getSessionRole());\n $this->assign('User', $this->getSessionUser());\n \t$this->assign('BaseUrl', Location::baseUrl());\n \t$this->assign('RequestUrl', Location::requestUrl());\n\t\t$this->assign('AssetsPath', ASSETS_PATH);\n\t\t$this->assign('ImgPath', IMG_PATH);\n\t\t$this->assign('PosterPath', POSTER_PATH);\n \t$this->assign('DebugMode', DEBUG_MODE);\n\t\t$this->assign('ProjectName', PROJECT_NAME);\n }", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.61715794", "text": "public function getLayout();", "title": "" }, { "docid": "4f2e0207e03f7012ae3bd6b2124c3eac", "score": "0.61715794", "text": "public function getLayout();", "title": "" }, { "docid": "516b7f800b96068e2de3265173fe4307", "score": "0.61691886", "text": "protected function _setupViewVars() {\n\t\t$required = array(\n\t\t\t'_extract',\n\t\t\t'_footer',\n\t\t\t'_header',\n\t\t\t'_serialize',\n\t\t\t'_delimiter',\n\t\t\t'_enclosure',\n\t\t\t'_newline',\n\t\t\t'_eol',\n\t\t\t'_null',\n\t\t\t'_bom',\n\t\t\t'_setSeparator'\n\t\t);\n\t\tforeach ($required as $viewVar) {\n\t\t\tif (!isset($this->viewVars[$viewVar])) {\n\t\t\t\t$this->viewVars[$viewVar] = null;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->viewVars['_delimiter'] === null) {\n\t\t\t$this->viewVars['_delimiter'] = ',';\n\t\t}\n\n\t\tif ($this->viewVars['_enclosure'] === null) {\n\t\t\t$this->viewVars['_enclosure'] = '\"';\n\t\t}\n\n\t\tif ($this->viewVars['_newline'] === null) {\n\t\t\t$this->viewVars['_newline'] = \"\\n\";\n\t\t}\n\n\t\tif ($this->viewVars['_eol'] === null) {\n\t\t\t$this->viewVars['_eol'] = PHP_EOL;\n\t\t}\n\n\t\tif ($this->viewVars['_null'] === null) {\n\t\t\t$this->viewVars['_null'] = 'NULL';\n\t\t}\n\n\t\tif ($this->viewVars['_bom'] === null) {\n\t\t\t$this->viewVars['_bom'] = false;\n\t\t}\n\n\t\tif ($this->viewVars['_setSeparator'] === null) {\n\t\t\t$this->viewVars['_setSeparator'] = false;\n\t\t}\n\n\t\tif ($this->viewVars['_extract'] !== null) {\n\t\t\t$this->viewVars['_extract'] = (array)$this->viewVars['_extract'];\n\t\t\tforeach ($this->viewVars['_extract'] as $i => $extract) {\n\t\t\t\t$this->viewVars['_extract'][$i] = (array)$extract;\n\t\t\t\tif (count($this->viewVars['_extract'][$i]) !== 2) {\n\t\t\t\t\t$this->viewVars['_extract'][$i][1] = '%s';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($this->viewVars['_serialize'] !== null) {\n\t\t\t$this->viewVars['_serialize'] = (array)$this->viewVars['_serialize'];\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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.6151475", "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": "820c5e670016eff95c327bb281932478", "score": "0.61406547", "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": "7286ecfc14991d304e1f86e3b71f6d33", "score": "0.6127545", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n $this->layout->with('controller',$this);\n }\n\n\n }", "title": "" }, { "docid": "7488e7c545a3e91553e0f072b0b0378b", "score": "0.61274207", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = view($this->layout);\n }\n }", "title": "" }, { "docid": "6f1c361aba912d12511232d2ee14687b", "score": "0.6122616", "text": "public function requestLayout() {}", "title": "" }, { "docid": "c4ff80264eeee89a3d49212489fb9bed", "score": "0.60792774", "text": "protected function setupLayout()\n\t{\n\n\t\tView::share('message', Session::get('message'));\n\t\tView::share('company', Config::get('app.company'));\n\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": "896a6f73b6223b2efabda2f5aa0c1dbb", "score": "0.60787714", "text": "abstract public function getLayout();", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.6070862", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "0a9f12d62f44e9089cb1b0b2100c339a", "score": "0.6020188", "text": "abstract protected function options_layout();", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.60081494", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.60081494", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "ab19b65fcb5316c2dee81b51104cdf03", "score": "0.59998167", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "ce661936c83b55015fd7fa7be9b0981f", "score": "0.59972835", "text": "private function _assignCommonData()\r\n {\r\n $this->view->BASE_URL = Nine_Registry::get ( 'BASE_URL' );\r\n $this->view->APP_NAME = Nine_Registry::get ( 'APP_NAME' );\r\n $this->view->APP_BASE_URL = Nine_Registry::get ( 'APP_BASE_URL' );\r\n $this->view->LANG_CODE = Nine_Registry::getLangCode();\r\n $this->view->HELPER_URL = $this->view->BASE_URL . 'modules/' . $this->getRequest ()->getModuleName () . '/views/helpers/';\r\n $this->view->LAYOUT_NAME = Nine_Layout::getMvcInstance ()->getLayout ();\r\n \r\n $layoutCollectionDir = Nine_Layout::getMvcInstance ()->getLayoutPath ();\r\n $layoutCollectionUrl = substr ( $layoutCollectionDir, strlen ( Nine_Registry::get ( 'BASE_DIR' ) ) );\r\n $this->view->LAYOUT_URL = $this->view->BASE_URL . $layoutCollectionUrl . '/';\r\n $this->view->LAYOUT_HELPER_URL = $this->view->LAYOUT_URL . 'helpers/';\r\n if (Nine_Constant::PRODUCT_MODE != $this->_config ['currentMode']) {\r\n $this->view->isProductMode = false;\r\n } else {\r\n $this->view->isProductMode = true;\r\n }\r\n /**\r\n * User\r\n */\r\n $this->view->LOGGED_GROUP_ID = @Nine_Registry::getLoggedInGroupId();\r\n }", "title": "" }, { "docid": "f9d896acce11558f9b5ea512b1f4c51a", "score": "0.5986768", "text": "public function __invoke()\n {\n return view('holonews::layout', [\n 'winkScriptVariables' => Holonews::scriptVariables(),\n ]);\n }", "title": "" }, { "docid": "01dd2587e31d7941e4e3a1df3477499a", "score": "0.5984627", "text": "public function getLayoutData() {\n\t\t\n\t\t$c = Page::getCurrentPage();\n\t\t$layout = new stdClass();\n\t\t$layout->handle = ($pt = $c->getCollectionTypeHandle()) ? $pt : 'view';\n\t\t$layout->content = new stdClass();\n\n\t\tswitch ($layout->handle) {\n\n\t\t\tcase('full_width'):\n\t\t\tcase('view'):\n\t\t\t\t$layout->content->main = 'span12';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$layout->content->main = 'span5';\n\t\t\t\t$layout->content->left = 'span7';\n\n\t\t}\n\n\t\treturn $layout;\n\t}", "title": "" }, { "docid": "d9be88ccb9bd5b8ac493ea105faa93d3", "score": "0.5972255", "text": "public function layout()\n {\n //$this->template['header'] = $this->load->view('templates/header', $this->data, true);\n //$this->template['footer'] = $this->load->view('templates/footer', $this->data, true);\n $this->template['page'] = $this->load->view($this->page, $this->data, true);\n $this->load->view('templates/main', $this->template);\n }", "title": "" }, { "docid": "b86f1fdd21e994a40588875f8a1ba20c", "score": "0.597105", "text": "public function show($template,$varname,$values){\r\n $view = new View($template);\r\n $view->assign($varname, $values); \r\n }", "title": "" }, { "docid": "06862b527f8f65cfc120818bafae0327", "score": "0.59349316", "text": "public function setupLayout()\n {\n $this->layout = CoreView::getLayout();\n }", "title": "" }, { "docid": "32f1b0d9c34de5284ab2b2026d58ae95", "score": "0.5925273", "text": "public function getLayoutVariables() {\n $user['name'] = \"Blake, S\";\n return [\n 'user' => $user\n ];\n }", "title": "" }, { "docid": "8d27f4e7d799d9dd70d94bb4f39fb806", "score": "0.5899064", "text": "public function viewRender()\n {\n foreach ($this->getData() as $key => $itens) {\n $$key = $itens;\n }\n\n require_once($this->pathToView);\n }", "title": "" }, { "docid": "21fe9d36302482566e0a87626ce45fb5", "score": "0.5895039", "text": "public function init()\n {\n $config = $this->_helper->ConfigHelper->getConfig();\n foreach($config as $config_name => $config_value){\n $this->view->$config_name = $config_value;\n }\n }", "title": "" }, { "docid": "a100de145450a4aa8fb51e16cd352330", "score": "0.5891709", "text": "private function initVars()\n {\n $this->current_id_node = $this->httpRequest->getParameter('id_node', 'request', 'int');\n \n // fetch the current id_node. If no node the script assums that\n // we are at the top level with id_parent 0\n if( false === $this->current_id_node ) \n {\n $this->viewVar['id_node'] = 0;\n $this->current_id_node = 0; \n }\n else\n {\n $this->viewVar['id_node'] = (int)$this->current_id_node; \n } \n \n $this->id_node_up = $this->httpRequest->getParameter('id_node_up', 'get', 'int');\n $this->id_node_down = $this->httpRequest->getParameter('id_node_down', 'get', 'int');\n \n \n // template variables\n //\n // data of the current node\n $this->viewVar['node'] = array();\n // data of the child nodes\n $this->viewVar['nodes'] = array();\n // data of the branch nodes\n $this->viewVar['branch'] = array(); \n // errors\n $this->viewVar['error'] = FALSE; \n }", "title": "" }, { "docid": "4410194efe57297feb71e400b652942e", "score": "0.58769655", "text": "private function assignGlobalTplVars(): void\n {\n /**\n * Set design object to the template.\n * @internal Warning: This one won't work if directly used as shortcut in pH7Tpl parser.\n */\n $this->view->design = $this->design;\n\n $bIsMobApp = MobApp::is($this->httpRequest, $this->session);\n\n $aAuthViewVars = [\n 'is_admin_auth' => AdminCore::auth(),\n 'is_user_auth' => UserCore::auth(),\n 'is_aff_auth' => AffiliateCore::auth()\n ];\n $aGlobalViewVars = [\n 'top_navbar_type' => M\\DbConfig::getSetting('navbarType'),\n 'is_guest_homepage' => $this->isGuestOnHomepage($aAuthViewVars['is_user_auth']),\n 'is_disclaimer' => !$bIsMobApp && (bool)M\\DbConfig::getSetting('disclaimer'),\n 'is_cookie_consent_bar' => !$bIsMobApp && (bool)M\\DbConfig::getSetting('cookieConsentBar')\n ];\n\n $this->view->assigns($aAuthViewVars);\n $this->view->assigns($aGlobalViewVars);\n\n // Set other variables\n $this->setMetaTplVars();\n $this->setModsStatusTplVars();\n $this->setUserNotifications();\n }", "title": "" }, { "docid": "a4d2914e99ffba2998be8ae7e4e64a1a", "score": "0.5848234", "text": "public function viewAux() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "44dd106f49857b8a518fe30cb32e4fa6", "score": "0.58467877", "text": "public function setupLayout()\r\n\t{\r\n\t\t$layout = 'layout';\r\n\t\tif (isset($this->services[$this->routing->service])) {\r\n\t\t\t$service = $this->services[$this->routing->service];\r\n\t\t\tif (isset($service['layout']))\r\n\t\t\t\t$layout = $service['layout'];\r\n\t\t\t\r\n\t\t\tif (isset($service['helpers'])) {\r\n\t\t\t\tforeach ((array) $service['helpers'] as $helper)\r\n\t\t\t\t\t$this->template->getHelper($helper);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->routing->layout = $layout;\r\n\t}", "title": "" }, { "docid": "da13e5612abe47fadfefeedc60e83fb1", "score": "0.58290076", "text": "public function layout()\n {\n // making temlate and send data to view.\n $this->template['header'] = $this->load->view('layout/header', $this->data, true);\n $this->template['left'] = $this->load->view('layout/left', $this->data, true);\n $this->template['middle'] = $this->load->view($this->middle, $this->data, true);\n $this->template['footer'] = $this->load->view('layout/footer', $this->data, true);\n\n $this->load->view('layout/index', $this->template);\n }", "title": "" }, { "docid": "1cc12fb7c5cbd37d43c748f57004cb77", "score": "0.58206403", "text": "private static function setView($v){\n ob_start();\n $context = self::$cdt[0];\n $data = self::$cdt[1];\n extract($data); // Extract data to view\n require VIEW.$v.'.phtml';\n $vars = get_defined_vars();\n $view = ob_get_contents();\n ob_end_clean();\n\n // Clean HTML Comments on View file\n $view = preg_replace('/\\<\\!--.*?-->/', '', $view);\n\n // Get all Component Placeholders\n preg_match_all(\"~\\{\\:\\s*(.*?)\\s*\\:\\}~\", $view, $comps);\n\n // Set All Components\n foreach ($comps[1] as $k => $c) {\n $parts = array_map('trim', explode('|', $c));\n\n if(file_exists(VIEW.'components/'.$parts[0].'.phtml')){\n DEBUG ? self::$debug_view['components'][$k]['file'] = \"view/components/$parts[0].phtml\" : false; // Log to debug bar\n\n ob_start();\n\n // Setup arguments to component\n if(count($parts) == 2){\n // Clear previous component's args and extracted variables\n if(isset($args) && is_array($args)){\n foreach ($args as $k => $v) {\n unset(${$k});\n }\n }\n unset($args, $temp);\n\n if(self::is_string($parts[1])){\n // Get the $args as string\n $args = self::trim_string($parts[1]);\n }\n else{\n // Get the $args as array, variable or single string (without quotes)\n $keys = array_map('trim', explode('.', $parts[1]));\n if(count($keys) > 1){ // if array\n if(isset(${$keys[0]})){\n $temp = ${$keys[0]};\n foreach ($keys as $i => $vl) {\n $i !== 0 ? $temp =& $temp[$vl] : false;\n }\n $args = !is_null($temp) ? $temp : false;\n } else {\n $args = $keys;\n }\n }\n elseif(count($keys) == 1 && !isset(${$keys[0]})) {\n if(is_numeric($keys[0])){\n $args = (int)$keys[0];\n } elseif(explode(',', $keys[0])){\n $args = array_map('trim', explode(',', $keys[0])); // return as array if args has comma (,) separations\n } else {\n $args = (string)$keys[0];\n }\n }\n else{ // if variable\n $args = !is_null(${$keys[0]}) ? ${$keys[0]} : false;\n }\n }\n }\n else{\n $args = false;\n }\n\n DEBUG ? self::$debug_view['components'][$k]['args'] = $args : false; // Log to debug bar\n\n $args && is_array($args) ? extract($args) : false; // Extract args\n include VIEW.'components/'.$parts[0].'.phtml';\n $component = ob_get_contents();\n ob_end_clean();\n }\n elseif(file_exists(VIEW.'components/'.$parts[0].'.html')){\n $component = file_get_contents(VIEW.'components/'.$parts[0].'.html'); \n DEBUG ? self::$debug_view['components'][$k]['file'] = \"view/components/$parts[0].html\" : false; // Log to debug bar\n }\n else{ \n Err::componentNotFound($parts[0]);\n $component = ''; \n }\n\n $possibleComp = [\"{: $c :}\", \"{:$c:}\", \"{:$c :}\", \"{: $c:}\"];\n $view = str_replace($possibleComp, $component, $view);\n }\n return [$view, $vars];\n }", "title": "" }, { "docid": "1eb392a7f3bf91e54285d94c6cd0cae2", "score": "0.58206344", "text": "protected function setupLayout()\n {\n if (! is_null($this->getLayoutName())) {\n $this->layout = view($this->getLayoutName());\n }\n }", "title": "" }, { "docid": "d71c1c3929bc39d8288a719b13eb6616", "score": "0.58018506", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n\n \\Breadcrumbs::setListElement('ol');\n \\Breadcrumbs::addCssClasses('breadcrumb');\n \\Breadcrumbs::removeCssClasses('breadcrumbs');\n \\Breadcrumbs::setDivider(null);\n $this->getThemeConfig();\n\n $navtools = Event::fire('frontend.navbar.create');\n $navtools_html = $footeritems_html = $headeritems_html = '';\n \\View::share('navbar', '');\n \\View::share('header', '');\n \\View::share('footer', '');\n foreach ($navtools as $w) {\n foreach ($w as $o) {\n $navtools_html .= View::make($o);\n }\n }\n\n $footeritems = Event::fire('frontend.footer.create');\n\n foreach ($footeritems as $w) {\n foreach ($w as $o) {\n $footeritems_html .= View::make($o);\n }\n }\n\n $headeritems = Event::fire('frontend.header.create');\n\n\n foreach ($headeritems as $w) {\n foreach ($w as $o) {\n $headeritems_html .= View::make($o);\n }\n }\n\n Config::set('theme.menus', Event::fire('menu.positions.collect'));\n\n //get the layout for the current route\n //load the default if no layout specified\n\n\n// ll($footeritems_html);\n\n if (\\View::exists('anastasia::navbar')) {\n $navtools = \\View::make('navbar')->with('navtools', $navtools_html);\n\n \\View::share('navbar', (string)$navtools);\n }\n if (\\View::exists('header')) {\n $headeritems = \\View::make('header')->with('headeritems', $headeritems_html);\n \\View::share('header', (string)$headeritems);\n }\n if (\\View::exists('footer')) {\n $footeritems = \\View::make('footer')->with('footeritems', $footeritems_html);\n \\View::share('footer', (string)$footeritems);\n }\n\n\n\n }", "title": "" }, { "docid": "247a3869a047f3c3eafa164cf230b43c", "score": "0.58006173", "text": "public function show_layout(){\n \n\n\n\n return view('admin.adminlayoutform');\n }", "title": "" }, { "docid": "1a97b3d1e513441ff5dddfe8cee8ec67", "score": "0.5789045", "text": "public function updateLayout()\n {\n //\n }", "title": "" }, { "docid": "95f09bc28aa690b4e0f42662471d9500", "score": "0.5781561", "text": "public function view()\n {\n /* put stuff in main content section of the template*/\n \n\n }", "title": "" }, { "docid": "784c79b5f6ab6c6022d2c410489d09e4", "score": "0.57806265", "text": "function Compose()\n\t\t{\n\t\t\t$this->layout = 'static';\n\t\t}", "title": "" }, { "docid": "f8029bef4f369b1dfe3acc215f219a31", "score": "0.5778041", "text": "public static function exportLayout();", "title": "" }, { "docid": "b0e6f0d0c97a52e24d7dca9b76aa65f5", "score": "0.57622534", "text": "function view ($plantilla,$variables= array()){\n extract ($variables);\n require(\"views/\".$plantilla.\".tpl.php\");\n\n}", "title": "" }, { "docid": "785fca2d2c4c2b8033a73c8d19ae03e9", "score": "0.5740136", "text": "function view($plantilla,$variables=array()){\n extract ($variables);\n require('views/'.$plantilla.'.tpl.php');\n}", "title": "" }, { "docid": "6e5dbc4b4a0bbb9d9f4d7e48f159094a", "score": "0.57148504", "text": "public function setLayout()\n\t{\n \t$this->_helper->layout->setLayout('admin-auth');\t\n\t}", "title": "" }, { "docid": "2654d9b9180453f3f3339dabf208d1bc", "score": "0.56956935", "text": "abstract public function makeView();", "title": "" }, { "docid": "02bf467c00a36ac61cce2e325f5fb4eb", "score": "0.5688675", "text": "protected function _setVarToView()\n {\n $categories = $this->Categories->find('list');\n $status = Configure::read('system_status');\n $this->loadModel('Services');\n $services = $this->Services->find('list')\n ->where(['status' => ACTIVE]);\n\n $this->set(compact('categories', 'status', 'services'));\n }", "title": "" }, { "docid": "e9958a04fe3bedbe3dc52959964a9736", "score": "0.5674777", "text": "function view() { return $this->get('view'); }", "title": "" }, { "docid": "33cdaaee9752158c4e9fd03f1920c203", "score": "0.56744844", "text": "public function __construct() {\n\t\t$this->layout = \"default\";\n\t}", "title": "" }, { "docid": "2f1d48af05d90693b070333c2285f5aa", "score": "0.56687665", "text": "private function init_layout( $atts ) {\n\t\tif ( $this->slide ) {\n\t\t\t$this->layout = 'h';\n\t\t}\n\n\t\t$this->apply_string_attribute( $atts, 'layout' );\n\t}", "title": "" }, { "docid": "6cd37c385af5148c4dd6b4638b39c4c3", "score": "0.56668305", "text": "public function getLayout(): string;", "title": "" }, { "docid": "0d7890cf1d9416f887346a6976e48842", "score": "0.5660406", "text": "function residentialHeader()\n {\n $this->layout = \"\"; \n \n }", "title": "" }, { "docid": "7f634b5c53a71b2ec8ab81ddfe4f9116", "score": "0.56467086", "text": "function tpl_view() {\n\treturn _tpl_view_rewrite(func_get_args());\n}", "title": "" }, { "docid": "b4a24f9ee1a0b76e59d5925dc766f496", "score": "0.5642592", "text": "public function actionFieldLayout()\n {\n $this->provideTemplate('field_layout');\n }", "title": "" }, { "docid": "30eba67b28dee2f6ff68efdb52ed7e66", "score": "0.5640342", "text": "function Layout($name)\r\n\t{\r\n\t\t$this->Layout = Config::get('VIEW_PATH') .'/'. $name . Config::get('VIEW_FILE_EXTENSION');\r\n\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "865811e64471f15c9c0e5ef0bad0d49d", "score": "0.5622251", "text": "private function setParamsForView()\n {\n $parts = new FirstAccessWizardParts(['model' => $this->model]);\n Yii::$app->view->title = $parts->active['index'] . '. ' . $parts->active['label'];\n Yii::$app->view->params['model'] = $this->model;\n Yii::$app->view->params['partsQuestionario'] = $parts;\n Yii::$app->view->params['hidePartsLabel'] = true; // This param hide the second title under the wizard progress bar.\n Yii::$app->view->params['disablePlatformLinks'] = true;\n Yii::$app->view->params['hideBreadcrumb'] = true; // This param hide the breadcrumb in the wizard layout.\n Yii::$app->view->params['hidePartsUrl'] = true; // This param disable the progress wizard menu links.\n }", "title": "" }, { "docid": "a0a6c103b7751bbaf90b45e6a7163c84", "score": "0.56064034", "text": "protected function setupLayout() {\r\n\r\n if (null !== $this->layout) {\r\n $this->changeLayout($this->layout);\r\n }\r\n }", "title": "" }, { "docid": "be8582c1b71bf1097aed8845a9c6c492", "score": "0.5603227", "text": "public function getIndexViewVariables()\n {\n $results = $this->getPaginator();\n\n $variable = $this->generateViewPaginatorVariable($results, 'itemTypes');\n\n return $variable;\n }", "title": "" }, { "docid": "be55d288cb277c3aac44cacb9cb7b53b", "score": "0.5602789", "text": "protected function loadLayoutView()\n\t{\n\t\t$file = 'Layouts'.DS.$this->layout.'.php';\n\t\treturn new joz_view($file , $this->layoutData);\n\t}", "title": "" } ]
2cb56dd61e6f40e13326987042e1c9c9
/ PRINT HTML HEADER
[ { "docid": "fa15a428acef85b8effb02ddb18a5601", "score": "0.0", "text": "function do_html_header() {\n\t\tglobal $cont_sel;\n\t\tglobal $gal_sel;\n\t\tglobal $proj_sel;\n\t\tglobal $pageLanguage;\n\t\tglobal $pg_type;\n?>\n\t\t<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>AAS - Application and Admission System</title>\n\t\t\t<meta name=\"viewport\" content=\"width=device-width\">\n\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">\n\t\t\t<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,700,600,300' rel='stylesheet' type='text/css'>\n\t\t\t<link rel=\"stylesheet\" href=\"css/normalize.css\" type=\"text/css\">\n\t\t\t<link rel=\"stylesheet\" href=\"css/grid.css\" type=\"text/css\">\n\t\t\t<link rel=\"stylesheet\" href=\"css/AAS_applicant_UI_style.css\" type=\"text/css\">\n\t\t\t<link rel=\"stylesheet\" href=\"css/print.css\" type=\"text/css\"> \n\t\t\t\t<script>\n\t\t\t\t\tfunction printpage()\n\t\t\t\t\t{\n\t\t\t\t\twindow.print();\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t</head>\n\t\t<body>\n\t\t\t<header class=\"main-header\">\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t if (isset($_SESSION['valid_user']))\n\t\t\t\t\t{\n\t\t\t\t\tisPaidandEngOrGer();\n\t\t\t\t\tif ($pageLanguage == 'german') \n\t\t\t\t\t\t{\n\t\t\t\t\t\tdisplay_user_menu_d();\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\tdisplay_user_menu();\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tdisplay_top_and_index();\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</header>\n<?php\n\t}", "title": "" } ]
[ { "docid": "2881cf2940d51a5a56c09c05565dce74", "score": "0.8058335", "text": "public function print_heading() {\n\t\techo esc_html( $this->heading );\n\t}", "title": "" }, { "docid": "1c943e4ec7eb0a566e8ea9479a74a598", "score": "0.7954681", "text": "abstract public function printHeader();", "title": "" }, { "docid": "f2553fb96a7cd3177626e1b873c21913", "score": "0.77316517", "text": "function printHTMLHeader($title)\n {\n $this->HTMLFilterOutput(str_replace('__TITLE__',\n $title,\n (empty($this->_output_header)\n ? '<html><head><title>__TITLE__</title></head><body><h1>__TITLE__</h1>'\n : $this->_output_header)\n )\n );\n }", "title": "" }, { "docid": "9c368aec976fecabff90d6ed154c6b29", "score": "0.7687709", "text": "function htmldoc_header($title = \"\")\n {\n print(\"<HTML><HEAD><TITLE>$title - Fooware</TITLE></HEAD><BODY>\\n\");\n }", "title": "" }, { "docid": "cdd79daeefcea00aa0eb6ecb2714d688", "score": "0.7624847", "text": "function print_html_header(){\n ?>\n <html>\n <head>\n <title>OAPI: Shields Up</title>\n\n <style>\n body {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1.2em;\n }\n\n table {\n margin: 0px;\n border: 0px;\n padding: 10px;\n }\n </style>\n </head>\n\n <body>\n <body bgcolor=#F1ECDF>\n <center>\n <h1>Shields Up</h1>\n\n <p><b><font color=\"red\">WARNING!!!</p>\n\n <p>This is a VERY EARLY BETA! Use at your own risk.</font></b></p>\n </center>\n <?php\n }", "title": "" }, { "docid": "6caea4075deffc92abfe18b0b496db9d", "score": "0.7593146", "text": "private function generateHeader() {\n\t\t$template = new Core_Snippet('BattleReport/header.phtml', PATH_SNIPPET);\n\t\treturn $template->render();\n\t}", "title": "" }, { "docid": "83579fd4a4f8db50eb91c8546296a6ed", "score": "0.7570257", "text": "public function printHeaderTop() {\n //$this->printOrganizationDetails();\n //$this->printLogo();\n \n }", "title": "" }, { "docid": "4719e7088d0166a6dcde33e1bba8c9a0", "score": "0.75425065", "text": "public function displayHeader() {\n\t\techo $this->header();\n\t}", "title": "" }, { "docid": "0de936295cd9cbaa1fac3e57c8f8569f", "score": "0.75011563", "text": "public function printHeader() {\n $pdf = &$this->pdf;\n $this->printLogo();\n $pdf->Line(0, 24, 139, 24, array('width' => 0.2, 'cap' => 'round', 'join' => 'round', 'color' => array(150, 150, 150))); \n }", "title": "" }, { "docid": "6b44971088743063ba2096a40584aab1", "score": "0.74642974", "text": "public function outputHeader() {\n\tglobal $qq;\n\t\n\techo \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\" \\\"http://www.w3.org/TR/html4/strict.dtd\\\"><html>\";\n\t// do the head\n\techo \"<head>\";\n\techo \"<title>{$this->getTitle()}</title>\";\n\techo '<meta http-equiv=\"Content-Type\" content=\"text/xml; charset=windows-1252\" />';\n\techo '<meta http-equiv=\"imagetoolbar\" content=\"no\" />';\n\techo '<meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\" />';\n\techo '<meta http-equiv=\"EXPIRES\" content=\"0\">';\n\techo '<meta http-equiv=\"CACHE-CONTROL\" content=\"NO-CACHE\">';\n\techo '<meta name=\"robots\" content=\"noindex, nofollow\">';\n}", "title": "" }, { "docid": "2bcefc509bb94060f8eb3ea51407e417", "score": "0.74604046", "text": "function htmlHeader() {\n\t\t$doctype = $this->doctype;\n\t\t$sitename = $this->sitename;\n\t\t$pagetitle = $this->pagetitle;\n\t\tif ($sitename != \"\" & $pagetitle !=\"\") {\n\t\t\t$title = \"$sitename | $pagetitle\";\n\t\t} else {\n\t\t\t$title = $sitename . $pagetitle;\n\t\t}\n\t\t\n\t\t$theHTML = \"\";\n\t\t\n\t\t$theHTML .= \"$doctype\\n\";\n\t\t$theHTML .= \"<html>\\n\";\n\t\t$theHTML .= \"<head>\\n\";\n\t\t$theHTML .= \"<title>$title</title>\\n\";\n\t\t$theHTML .= $this->htmlMetaTags();\n\t\t$theHTML .= $this->htmlCSSLinks();\n\t\t$theHTML .= $this->htmlHeadScripts();\n\t\t$theHTML .= \"</head>\\n\";\n\t\t$theHTML .= \"<body>\\n\";\n\n\t\treturn $theHTML;\n\t}", "title": "" }, { "docid": "d8a787a0d704d84c0c0de020213746c0", "score": "0.74415773", "text": "static function header() {\r\n return '<header class=\"header\" >\r\n <h1><a href=\"'.sq_utils::get_uri().'/admin\"><span class=\"logo-image\">&nbsp;<span class=\"logo-letter\">S</span></span><span class=\"logo-text\">equence</span></a></h1>\r\n</header>'.\"\\n\\n\";\r\n}", "title": "" }, { "docid": "bba23ce98223f92ccbd8986032a7312c", "score": "0.7410132", "text": "function header_output() {\n }", "title": "" }, { "docid": "8d6310c0406c5f61e7d49cb74000ca31", "score": "0.7375602", "text": "function printheader($title){\n\t//$title = htmlentities($title);\n\tglobal $webbackground;\n\tglobal $lang;\n\n echo \"<!DOCTYPE html>\n<html lang=\\\"\".$lang.\"\\\">\n<head>\n <meta charset='utf-8'>\n <meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=edge\\\">\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1\\\">\n <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" media=\\\"screen\\\" href=\\\"css/cssmenu.css\\\">\n <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" media=\\\"screen\\\" href=\\\"css/iptv-es.css\\\">\n <!-- <script src=\\\"http://code.jquery.com/jquery-latest.min.js\\\" type=\\\"text/javascript\\\"></script>-->\n <script src=\\\"js/script.js\\\"></script>\n <title>\".$title.\"</title>\n</head>\n <body>\";\n}", "title": "" }, { "docid": "7f89678a9ec468dfac8d5ec263423814", "score": "0.7372701", "text": "public static function html_header() {\n\t\techo wp_kses(\n\t\t\tsprintf( '<link rel=\"microsub\" href=\"%s\" />' . PHP_EOL, static::get_microsub_endpoint() ),\n\t\t\tarray(\n\t\t\t\t'link' => array(\n\t\t\t\t\t'rel' => array(),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "4bce507e4cd2b59c63def646cd5b5125", "score": "0.73703367", "text": "function _htmlHeader($title)\n {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "f985f3f0e1b75fc0b53b1bad2893435a", "score": "0.7364329", "text": "public function present_header() {\n $html = parent::present_header();\n\n $html .= <<<HTML\n<h1 class=\"center\">Verification email sent.</h1>\n</header>\nHTML;\n\n return $html;\n }", "title": "" }, { "docid": "4cbb52294d4b2bb04c5bdf016641b960", "score": "0.73117423", "text": "function print_header() {\n\n ?>\n\n\n\n\n\n\n<head><title>Trend Micro InterScan Web Security Event</title>\n\n</head>\n\n\n <?php\n}", "title": "" }, { "docid": "821167ff52df8418dca3a4a0b5a421fc", "score": "0.7291363", "text": "function print_header($title = \"\", $subtitle = \"\") {\n\tif (empty($title)) {\n\t\tglobal $title;\n\t}\n\tif (empty($subtitle)) {\n\t\tglobal $subtitle;\n\t}\n\tprint \"<html>\\n\";\n\tprint \"<head>\\n\";\n\tif (file_exists(realpath(\"./stylesheet.css\"))) {\n\t\tprint \"<link rel=stylesheet href=stylesheet.css>\\n\";\n\t}\n\tprint \"<title>$title $subtitle</title>\\n\";\n\tprint \"</head>\\n\";\n\tprint \"<body>\\n\";\n\tprint \"<center>\\n\";\n}", "title": "" }, { "docid": "acdfbc2fb42710fdb3a90e8da8089717", "score": "0.729129", "text": "function header ()\n\t{\n\t\t// Get attributes needed\n\t\t$attributes = $this->get_attributes();\n\n\t\t/*if ( $this->use_classes )\n\t\t{*/\n\t\t\t$ol_attributes = '';\n\t\t/*}\n\t\telse\n\t\t{\n\t\t\t//$ol_attributes = ' style=\"margin: 0;\"';\n\t\t}*/\n\n\t\tif ( $this->line_numbers_start != 1 )\n\t\t{\n\t\t\t$ol_attributes .= ' start=\"' . $this->line_numbers_start . '\"';\n\t\t}\n\n\t\t// Get the header HTML\n\t\t$header = $this->format_header_content();\n\n\t\t// Work out what to return and do it\n\t\tif ( $this->line_numbers != GESHI_NO_LINE_NUMBERS )\n\t\t{\n\t\t\tif ( $this->header_type == GESHI_HEADER_PRE )\n\t\t\t{\n\t\t\t\treturn \"<pre$attributes>$header<ol$ol_attributes>\";\n\t\t\t}\n\t\t\telseif ( $this->header_type == GESHI_HEADER_DIV )\n\t\t\t{\n\t\t\t\treturn \"<div$attributes>$header<ol$ol_attributes>\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $this->header_type == GESHI_HEADER_PRE )\n\t\t\t{\n\t\t\t\treturn \"<pre$attributes>$header\";\n\t\t\t}\n\t\t\telseif ( $this->header_type == GESHI_HEADER_DIV )\n\t\t\t{\n\t\t\t\treturn \"<div$attributes>$header\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5287714cba0c29524a6d6e117a2cbeba", "score": "0.7289263", "text": "function displayHeader(): String\n {\n return \"<h1>$this->title</h1>\";\n }", "title": "" }, { "docid": "53351561ecddb857e325290a5a5d0152", "score": "0.7285086", "text": "public function add_header() {\n echo '<h1>My custom header</h1>';\n }", "title": "" }, { "docid": "ba7ee140a57beae3acfe92f24a558f3f", "score": "0.7260909", "text": "function print_header($pageTitle='', $pageHeading='', $pageNavigation='', $pageFocus='', $pageMeta='') {\n global $CFG, $USER;\n\n $this->init_full();\n $extraheader = '';\n if (!empty($USER) && !empty($USER->id) && $this->user_allowed_editing()) {\n if ($this->user_is_editing()) {\n $editingString = get_string('turneditingoff');\n } else {\n $editingString = get_string('turneditingon');\n }\n\n $params = $this->url->params();\n $params['edit'] = $this->user_is_editing() ? 0 : 1;\n $paramstring = '';\n foreach ($params as $key=>$val) {\n $paramstring .= '<input type=\"hidden\" name=\"'.$key.'\" value=\"'.s($val).'\" />';\n }\n\n $extraheader = '<form '.$CFG->frametarget.' method=\"get\" action=\"'.$this->url->out(false).'\"><div>'\n .$paramstring.'<input type=\"submit\" value=\"'.$editingString.'\" /></div></form>';\n }\n print_header($pageTitle, $pageHeading, $pageNavigation, $pageFocus, $pageMeta, true, $extraheader );\n }", "title": "" }, { "docid": "02954f02927628066a9c2a4259bf102f", "score": "0.726076", "text": "function printHeaders() {\n echo \"<head>\\n\";\n echo \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"txt/html; charset=ISO-8859-1\\\" />\\n\";\n echo \" <meta http-equiv=\\\"Content-Language\\\" content=\\\"en\\\" />\\n\";\n echo \" <title>Training with Beth!</title>\\n\";\n echo \" <meta http-equiv=\\\"Content-Script-Type\\\" content=\\\"text/javascript\\\" />\\n\";\n echo \" <link type=\\\"text/css\\\" rel=\\\"stylesheet\\\" href=\\\"/css/styles.css\\\" />\\n\";\n echo \" <script src=\\\"js/menuFunctions.js\\\" language=\\\"javascript\\\" type=\\\"text/javascript\\\"></script>\\n\"; \n echo \" </head>\\n\";\n}", "title": "" }, { "docid": "fc0549c5436512dd3b28e7403d857663", "score": "0.7239394", "text": "function addHeader() {\n\t\t$this->page .= <<<EOD\n<html>\n<head>\n<title>$this->title</title>\n</head>\n<body>\n<h1 align=\"center\">$this->title</h1>\nEOD;\n\t}", "title": "" }, { "docid": "c722b6acb0126a71ffaf6d4ee9169471", "score": "0.72337556", "text": "public static function header(){\t?>\r\n\t\t\t<header>\r\n\t\t\t\t<figure>\r\n\t\t\t\t\t<a href=\"index.php\">\r\n\t\t\t\t\t\t<img alt=\"logo Cifocar\" title=\"logo Cifocar\" src=\"images/logos/logo-cifocar.png\" />\r\n\t\t\t\t\t</a>\r\n\t\t\t\t</figure>\r\n\t\t\t\t<hgroup>\r\n\t\t\t\t\t<h2>Compra y Venta de vehículos de segunda mano</h2>\r\n\t\t\t\t</hgroup>\r\n\t\t\t</header>\r\n\t\t<?php }", "title": "" }, { "docid": "506994c539b98425bd31e640ebaa91d2", "score": "0.72303784", "text": "public static function header_html() {\n\t\tif ( self::$themeVersion !== null ) {\n\t\t\techo themify_get( 'setting-header_html', '', true );\n\t\t}\n\t}", "title": "" }, { "docid": "cc545f8e375a054c72bf1c17aa4e1716", "score": "0.7197698", "text": "public function HeaderPage() {\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<html>\n<head>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n<title>PrintOut <?PHP echo $this->PrintoutTitle; ?></title>\n<style>\n<?PHP\n require($this->stylesheet); \n?>\n</style>\n</head>\n<body> \n<?PHP\n}", "title": "" }, { "docid": "cc27b78ddcdf09294b9a86ab63db1f99", "score": "0.7192721", "text": "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n return $html;\r\n }", "title": "" }, { "docid": "f6d249da4bf1c9f8a3ccec0b71c71f00", "score": "0.71868426", "text": "function createPageHeader($pagetitle){\n ?><!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device.width,initial.scale=1.0\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo(FILES_CSS_STYLES); ?>\">\n <title><?php echo $pagetitle; ?></title> \n </head>\n <body class=\"<?php getprintFromUrl() ?>\"> \n <?php \n}", "title": "" }, { "docid": "b21b72d3f4810a95466119f08231e6ae", "score": "0.7181238", "text": "public function show_header() {\n\t\tif ( $this->botmode ) return ;\n\t\tprint $this->get_common_header ( '' , 'WiALo' ) ;\n\t\tprint \"<div style='float:right'><img border=0 src='https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Vidar_by_Collingwood.jpg/150px-Vidar_by_Collingwood.jpg' /></a></div>\" ;\n\t\tprint \"<h1><i>W</i>eb <i>A</i>nnotator <i>L</i>ogin</h1>\" ;\n\t}", "title": "" }, { "docid": "190cdad9150b3208562a51bc24ad7de2", "score": "0.7175827", "text": "function print_head($title) {\n\tprint \"<html>\\n\n\t<head>\\n\n\t<title>Online Voting System</title>\\n\n\t</head>\\n\n\t<body>\\n\n\t<h2>$title</h2>\";\n}", "title": "" }, { "docid": "153a9d4d943d3c4a4be3959285689244", "score": "0.71660453", "text": "function printHeader($pageTitle) {\n print(\"\n<html>\n<head>\n <!-- Chart -->\n <script src=\\\"https://canvasjs.com/assets/script/canvasjs.min.js\\\"></script>\n <!-- MAIN CSS -->\n <link rel=\\\"stylesheet\\\" href=\\\"css/style.css\\\">\n <title>$pageTitle</title>\n <style>\n body {\n text-align: center;\n margin: 50px;\n } \n </style>\n</head>\n<body>\n\");\n}", "title": "" }, { "docid": "a1d678697ebdefd1a62897948e10924f", "score": "0.7155998", "text": "function Header()\n{\n\tglobal $title;\n\t$this->Ln(14);\n}", "title": "" }, { "docid": "00fc461a32d9d545ec0c9f1ac64ef4a1", "score": "0.71439123", "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, 25);\n\t\t$worksheet->set_column(3, 3, 20);\n\t\t$worksheet->set_column(4, 4, 15);\n\t\t$worksheet->set_column(5, 5, 40);\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": "ca324715ae8b3a2a61c835aac83aaebc", "score": "0.7141237", "text": "public function header()\n {\n $htm='';\n\n if (isset($this->config->title)) {\n $title=$this->config->title;\n }\n\n if (isset($this->config->homeurl)) {\n $homeurl=$this->config->homeurl;\n } else {\n $homeurl='#';\n }\n\n $htm.=$this->topNav();\n\n return $htm;\n }", "title": "" }, { "docid": "87f8bee8ac071f25e5f71c347405dbc0", "score": "0.71412235", "text": "function headers()\n {\n return \" <div id='header'>\\n\".\"\n <h1>white rabbit</h1>\n <div id='nav'>\n <ul>\n <li>\n </li>\n </ul>\n </div>\n </div>\\n\";\n }", "title": "" }, { "docid": "06274323616a3875541ea7a66279d393", "score": "0.713853", "text": "function _show_header($q) {\n echo $this->header_lc . $this->header_end;\n }", "title": "" }, { "docid": "4222577524800aa2ce2b8a1f70c43a59", "score": "0.71153337", "text": "public function Header()\n {\n common::egw_header();\n echo parse_navbar();\n }", "title": "" }, { "docid": "650641dfc5d8e7d246bb0caa3cc4b015", "score": "0.71104777", "text": "private static function WritePageHeader()\n\t{\n\t\t// Set character set to UTF-8\n\t\theader(\"Content-Type: text/html; charset=UTF-8\");\n\t?><!DOCTYPE html><html lang=\"en\"><head>\n\t\t<meta charset=\"utf-8\">\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t<title>Aten Software Product Data Exporter for Magento</title>\n\t\t<link href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">\n\t</head><body><div class=\"container\">\n\t\t<h2><a href=\"https://www.atensoftware.com/p187.php\">Aten Software Product Data Exporter for Magento</a></h2><?php\n\t}", "title": "" }, { "docid": "e5b4742a42fba3d18ed8868134ed2947", "score": "0.71046364", "text": "function displayHeader($title){\n\techo \"<!DOCTYPE HTML>\n\t\n\t\t<html lang=\\\"en\\\">\n\t\t \n\t\t<head>\n <meta charset=\\\"utf-8\\\">\n <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-\tscale=1, shrink-to-fit=no\\\">\n\n <!-- CDN CSS -->\n <link rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\\\" integrity=\\\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T\\\" crossorigin=\\\"anonymous\\\">\n <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href= \\\"../css/styles.css\\\">\n <title>\" .$title. \"</title>\n </head>\n <body>\n \";\n}", "title": "" }, { "docid": "0b9e306520c078b573368e24aaa03b53", "score": "0.7079392", "text": "function html_header($type, $title){\n doctype($type);\n html_beg();\n head_beg();\n title($title);\n head_end();\n}", "title": "" }, { "docid": "3a5e5721df04cc27a4ca1bb6c8b8fdd0", "score": "0.70631945", "text": "protected function printHead()\n\t{\n\t\tprint(\"\n\t\t<head dir='ltr' lang='en'>\n\t\t\");\n\n\t\t$this->printMeta();\n\t\t$this->printCSS();\n\t\t$this->printTitle();\n\t\t$this->printJavascripts();\n\n\t\tprint(\"\n\t\t</head>\n\t\t\");\n\t}", "title": "" }, { "docid": "71a93865863f836a5b84b8827b7b4e37", "score": "0.70615065", "text": "function displayHeader(){\n $html = '';\n $html .= '<header>';\n $html .= '<p><img src=\"super2-600.png\" width=\"600\" height=\"175\" alt=\"Super Sudoku\"></p>';\n $html .= '</header>';\n\n\n return $html;\n}", "title": "" }, { "docid": "7a6bc3c5a699375ba7824f8e222722fe", "score": "0.70540893", "text": "public function print_header() {\n\t\t\t$currentScreen = get_current_screen();\n\t\t\t$type = $this->get_currentScreenType( $currentScreen );\n\t\t\t$tlmenu = $this->slug.\"_menu\";\n\t\t\t$name = \"\";\n\t\t\t$sub = \"\";\n\t\t\tswitch( $type ) {\n\t\t\t\tcase 'tools':\n\t\t\t\tcase 'settings':\n\t\t\t\tcase 'media':\n\t\t\t\t\t$name = $this->admin_menus[ $type ][ 'label' ];\n\t\t\t\t\tbreak;\n\t\t\t\tcase $tlmenu:\n\t\t\t\t\t$name = $this->admin_menus[ 'menu' ][ 'label' ];\n\t\t\t\t\t$myslug = $this->slug.\"_submenu_\";\n\t\t\t\t\t$index_pos = strpos( $currentScreen->id, $myslug ) + strlen( $myslug );\n\t\t\t\t\tif( false !== $index_pos ) {\n\t\t\t\t\t\t$index = (int)substr( $currentScreen->id, $index_pos );\n\t\t\t\t\t\tif( array_key_exists( 'submenus', $this->admin_menus[ 'menu' ] ) ) {\n\t\t\t\t\t\t\t$sub = $this->admin_menus[ 'menu' ]['submenus'][$index][ 'label' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\techo \"<h1 style='font-size: 2.1em; font-weight: 500;'>\".$name.\"</h1>\";\n\t\t\techo \"<div style='padding-bottom: 1em;'>\";\n\t\t\tif( $this->version ) {\n\t\t\t\techo \"<span style='font-size: 0.9em;'>v\".number_format((float)($this->version/100), 2, '.', '').\" </span>\";\n\t\t\t}\n\t\t\tif( strlen( $this->copyright ) > 0 ) {\n\t\t\t\techo \"<span style='font-size: 1.1em;'>&copy;\".$this->copyright.\"</span>\";\n\t\t\t}\n\t\t\tif( strlen( $sub ) > 0 ) {\n\t\t\t\techo \"<h2 style='padding-top: 1.5em; margin: 0px; font-size: 1.8em; font-weight: 500;'>\".$sub.\"</h2>\";\n\t\t\t}\n\t\t\techo \"</div>\";\n\t\t}", "title": "" }, { "docid": "026dd2c98c2b5ea7b09cad00d62fd477", "score": "0.69994533", "text": "public function Header() {\n $bMargin = $this->getBreakMargin();\n $auto_page_break = $this->AutoPageBreak;\n \n // Logo\n\t\t$image_file = PDF_HEADER_LOGO;\n\t\t$this->Image($image_file, 10, 10, 15, '', 'PNG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n\t\n $this->SetAutoPageBreak(false, 0);\n $this->SetAutoPageBreak($auto_page_break, $bMargin);\n }", "title": "" }, { "docid": "e09c61328398c2333fc12133f31a217c", "score": "0.6986878", "text": "function printHeader($userTitle, $userHeader, $userMenu) {\n global $headerText;\n \n //replace the !!header!! marker with the user-defined header\n $headerText = eregi_replace('!!header!!', $userHeader, $headerText);\n \n //replace the !!title!! marker with the user-defined header\n $headerText = eregi_replace('!!title!!', $userTitle, $headerText);\n \n //replace the !!menu!! marker with the user-defined menu\n $headerText = eregi_replace('!!menu!!', $userMenu, $headerText);\n \n //print the header\n print $headerText;\n }", "title": "" }, { "docid": "70c00a1cb67dd645e83bdb08372aad54", "score": "0.69840586", "text": "function PrintHTMLHeaderLogged() {\n printf(\"<head>\n <!--metas-->\n <meta content=\\\"text/html\\\" charset=\\\"utf-8\\\" http-equiv=\\\"Content-Type\\\">\n <meta content=\\\"PHP Timerboard for EVE Online\\\" name=\\\"description\\\">\n <meta content=\\\"index,follow\\\" name=\\\"robots\\\">\n <meta content=\\\"width=device-width, initial-scale=1\\\" name=\\\"viewport\\\">\n <title>PHP Timerboard</title>\n <link rel=\\\"stylesheet\\\" href=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\\\">\n <link rel=\\\"stylesheet\\\" href=\\\"../../css/sticky-footer-navbar.css\\\">\n <script src=\\\"https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js\\\"></script>\n <script src=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\\\"></script>\n \n </head>\");\n \n //<script src=\\\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js\\\"></script>\n //<script src=\\\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js\\\"></script>\n}", "title": "" }, { "docid": "794a10e21d891e8c76ab656f4730f412", "score": "0.6954377", "text": "private function show_header() {\r\n //\r\n //Get the fields in this sql \r\n $cols = $this->fields->get_array();\r\n //\r\n //Loop through the fields and display the <tds>\r\n foreach ($cols as $col) {\r\n //\r\n $name = is_null($col->alias) ? $col->to_str() : $col->alias;\r\n echo \"<th>$name</th>\";\r\n }\r\n }", "title": "" }, { "docid": "5db98814093021c34e335ca84558f8ba", "score": "0.694634", "text": "function printFirstHeading(){\n\t\t?><h1 class=\"firstHeading\"><?php $this->data['displaytitle']!=\"\"?$this->html('title'):$this->text('title');\n\t\twfRunHooks( 'MonacoPrintFirstHeading' );\n\t\t?></h1><?php\n\t}", "title": "" }, { "docid": "7b31dfb0a70b3dba7949e7e5770f362e", "score": "0.6935816", "text": "public function printHtmlPageHead($title)\n {\n $title = htmlspecialchars($title);\n echo <<<HTML\n<div class=\"page-head\">\n <h2>{$title}</h2>\n</div>\nHTML;\n }", "title": "" }, { "docid": "cc12ad1fd77afd9408a4c7e7f352b855", "score": "0.6929097", "text": "function setHTMLHeader($header)\n {\n $this->_output_header = $header;\n }", "title": "" }, { "docid": "d1512b8ad7cbf0c43a3c11ae3a3edf84", "score": "0.69271296", "text": "public static function header_output() {\n\t\t$color_options = self::wpex_color_options();\n\t\t$css ='';\n\t\tforeach( $color_options as $option ) {\n\t\t\t$theme_mod = get_theme_mod('wpex_'. $option['id'] .'');\n\t\t\tif ( '' != $theme_mod ) {\n\t\t\t\t$css .= $option['element'] .'{ '. $option['style'] .':'. $theme_mod.' !important; }';\n\t\t\t}\n\t\t}\n\t\t$css = preg_replace( '/\\s+/', ' ', $css );\n\t\t$css = \"<!-- Theme Customizer Styling Options -->\\n<style type=\\\"text/css\\\">\\n\" . $css . \"\\n</style>\";\n\t\tif ( !empty( $css ) ) {\n\t\t\techo $css;\n\t\t}\n\t}", "title": "" }, { "docid": "15347edf078dd3428cd6ec9ef824dd5b", "score": "0.69024926", "text": "function exportHeader() {\n\tglobal $exportData, $exportFields, $settings, $wpdb;\n\t$header = '';\n\t// Now write the header...\n\t$exportData .= $settings['outputOpenHeader'] . $header . $settings['outputCloseHeader'];\n}", "title": "" }, { "docid": "8c38d8358e1569108b23eace62ae783f", "score": "0.6888677", "text": "function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}", "title": "" }, { "docid": "a39a72cafd9c8e520316ef97be51332e", "score": "0.6886562", "text": "public function header($title)\r\n\t\t{\t\t\t\r\n\t\t\techo \r\n\t\t\t'<!DOCTYPE html>\r\n\t\t\t<html lang=\"en\">\r\n\t\t\t \r\n\t\t\t<head>\r\n\t\t\t <meta charset=\"utf-8\">\r\n\t\t\t <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n\t\t\t <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n\t\t\t <title>Momentum - '.$title.'</title>\r\n\t\t\t <link href=\"css/root.css\" rel=\"stylesheet\">\r\n\t\t\t <script src=\"assets/js/plugins/formatmoney.js\"></script>\r\n\t\t\t</head>\r\n\t\t\t<body>\r\n\t\t\t <div class=\"content\" style=\"padding:0;width:760px;\">\r\n\r\n\t\t\t <div class=\"\">\r\n\r\n\t\t\t <div class=\"invoice row reporting\">\r\n\t\t\t <div class=\"invoicename\">'.$title.'</div>\r\n\t\t\t <div class=\"logo\">\r\n\t\t\t <img src=\"'.$this->company->logo.'\" alt=\"logo\"><br>\r\n\t\t\t <b>P.O BOX</b> '.$this->company->address.' <b>Tel:</b> '.$this->company->phone.'<br/>\r\n\t\t\t <b>Site:</b> '.$this->company->web.' <b>Email:</b> '.$this->company->email.'\r\n\t\t\t </div>';\r\n\t\t}", "title": "" }, { "docid": "b25f1d1b2b023c855c544d7b4b183331", "score": "0.6883873", "text": "function buildheader($title, $forcelogout = 0){\n\t// use a function call to build the page header\n\t\t\n\t// Check we are not on the ban list and that we are not a spam robot\n\t\n\tloginsecurity();\n\t\n\t// Build the page up to the body tag\n\n\toutfile(TEMPLATES . 'header.inc');\n\n\techo wraptag('title', $title);\n\techo HEAD;\n\techo BODY;\n\tlogoutform($forcelogout);\t\n \n\techo '<div id=\"content\">';\n\techo '<div id=\"php\">';\n\t\n}", "title": "" }, { "docid": "977b9d19f23537f91c84a9297eae557f", "score": "0.68789095", "text": "function PrintHeadContent()\r\n\t{\r\n\t\tglobal $_SETUP;\r\n\r\n\t\tif ( $this->inLodo ) {\r\n\t\t\trequire_once $_SETUP['HOME_DIR'] . \"/code/lib/html/head.inc\";\r\n\t\t}\r\n\t\telse {\r\n?>\r\n<!-- include css -->\r\n<?php\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "20089bd2da077755b15d3dd32ca9bcf0", "score": "0.68708783", "text": "function pluginoutputheader($pagetitle) {\necho '<html>\n<head>\n<title>STOCKWIZARD - ' . $pagetitle . '</title>\n<meta http-equiv=\"Content-Language\" content=\"en-gb\">\n</head>\n<style>\na {\ncolor:blue;\n}\n</style>\n<body>\n<p align=\"center\"><img border=\"0\" src=\"logo.png\" width=\"591\" height=\"101\"></p>\n<p align=\"center\"></p>\n<p align=\"center\">&nbsp;</p>\n<p align=\"left\">&nbsp;</p>\n<p><a href=\"showlist.php\">Back to products</a> | ' . $pagetitle . ':</p>';\n}", "title": "" }, { "docid": "31e58902aceb809b1f96448ff4b662df", "score": "0.6861401", "text": "public function HEADERS () {\r\n \r\n }", "title": "" }, { "docid": "4f09b173953a2e0c7a04a71be110b2d9", "score": "0.6829149", "text": "function writeHeader() {\n\t\t$GLOBALS['HTML']->header(array('title'=>_('Project Search'), 'pagename'=>'search'));\n\t\tparent::writeHeader();\n\t}", "title": "" }, { "docid": "83e8841aa767108d7b72de5ebf6ce833", "score": "0.68263173", "text": "function displayHeader() {\n\t?>\n<html>\n<head>\n\t<title>My Movie Database (MyMDb)</title>\n\t<meta charset=\"utf-8\" />\n\t<link href=\"https://webster.cs.washington.edu/images/kevinbacon/favicon.png\" type=\"image/png\" rel=\"shortcut icon\" />\n\n\t<!-- Link to your CSS file that you should edit -->\n\t<link href=\"bacon.css\" type=\"text/css\" rel=\"stylesheet\" />\n</head>\n\t<?php\n}", "title": "" }, { "docid": "2dbd9ece10a6b812333ab358968a7650", "score": "0.68183047", "text": "function html_generic_fileheader($title) {\n\tglobal $HTML;\n\n\tif (!$title) {\n\t\tthrow new Exception('A title is mandatory in XHTML!');\n\t}\n\n\t$HTML->headerHTMLDeclaration();\n\techo \"<head>\\n\";\n\techo '<meta http-equiv=\"Content-Type\" ' .\n\t 'content=\"text/html; charset=utf-8\" />' . \"\\n\";\n\techo '<script type=\"text/javascript\">//<![CDATA[' .\n\t \"\\n\\tvar sys_url_base = \" . minijson_encode(util_make_url(\"/\"),\n\t false) . \";\\n\" .\n\t \"//]]></script>\\n\";\n\t$HTML->headerForgepluckerMeta();\n\techo html_e('title', array(), util_html_secure($title));\n}", "title": "" }, { "docid": "fab1e1d132a749c2c034b786da9533b2", "score": "0.680661", "text": "function printHeader($header) {\r\n $header = preg_replace('/_/', ' ', $header);\r\n print \"<h3 class='infoHeader'>\". $header .\"</h3>\";\r\n}", "title": "" }, { "docid": "101f81439d571be693ef46036b5e448a", "score": "0.67990875", "text": "function do_html_header($title = '') {\n?>\n <html>\n <!DOCTYPE html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n <title><?php echo $title; ?></title>\n <link href=\"\" rel=\"stylesheet\" type=\"text/css\" />\n \n <script language=\"Javascript\">\n <!--\n //-->\n </script>\n \n </head>\n <body>\n<?php \n}", "title": "" }, { "docid": "e844bfd07a337525fe4eff421ecae6d5", "score": "0.67977023", "text": "function page_header($title, $bgcolor = \"ffffff\") {\n echo '<html lang=\"en\"><head><meta charset=\"UTF-8\">';\n echo '<title>' . $title . '</title></head>';\n echo '<body bgcolor=\"#' . $bgcolor . '\">';\n }", "title": "" }, { "docid": "d52e14e3f10b05d529c71d9f6dfafffc", "score": "0.6795801", "text": "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 6);\n\t\t$worksheet->set_column(1, 1, 10);\n\t\t$worksheet->set_column(2, 2, 25);\n\t\t$worksheet->set_column(3, 3, 25);\n\t\t$worksheet->set_column(4, 4, 35);\n\t\t$worksheet->set_column(5, 5, 35);\n\t\t$worksheet->set_column(6, 6, 15);\n\t\t$worksheet->set_column(7, 7, 30);\n\t\t$worksheet->set_column(8, 8, 10);\n\t\t$worksheet->set_column(9, 9, 10);\n\t\t$worksheet->set_column(10, 10, 20);\n\t\t$worksheet->set_column(11, 11, 10);\n\t\t$worksheet->set_column(12, 12, 35);\n\t\t$worksheet->set_column(13, 13, 35);\n\t\t$worksheet->set_column(14, 14, 15);\n\t\t$worksheet->set_column(15, 15, 30);\n\t\t$worksheet->set_column(16, 16, 15);\n\t\t$worksheet->set_column(17, 17, 10);\n\t\t$worksheet->set_column(18, 18, 20);\n\t\t$worksheet->set_column(19, 19, 40);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TL\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 2, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"บัญชีข้าราชการพลเรือนสามัญเดิม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 4, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 5, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 7, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 8, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 9, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 1));\n\t\t$worksheet->write($xlsRow, 11, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"บัญชีข้าราชการพลเรือนสามัญใหม่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 15, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 16, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 17, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 18, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 19, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 0));\n\n\t\tset_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0);\n\t\t\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\t$worksheet->write($xlsRow, 7, \"สายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ระดับตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"อัตราเงินประจำตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"เลขที่ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"ชื่อตำแหน่งในการบริหารงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"ชื่อตำแหน่งในสายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"ประเภทตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 15, \"สายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 16, \"ระดับตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 17, \"อัตราเงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 18, \"อัตราเงินประจำตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 19, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t}", "title": "" }, { "docid": "3fd2aa0d23266c82fdaec0772644bf1c", "score": "0.6792409", "text": "function html_headers($title='',$include_javascript_header=FALSE,$bgcolor='',$text_color='',$link_color='',$vlink_color='',$alink_color='',$css_url=FALSE,$head_lines=FALSE,$bodytags=FALSE)\n{\n # arg1 = (optional) title\n # arg2 = (optional) if 1: include legacy select_and_auto_copy_javascript_header() which works for IE only.\n # if 2: include ZeroClipboard javascript header\n # if 3: include Any+Time javascript header\n # arg3 = (optional) bgcolor, !-----------------------------!\n # arg4 = (optional) text color ! If specifying a color in !\n # arg5 = (optional) link color ! hex code format, include !\n # arg6 = (optional) vlink color ! the # in the value passed !\n # arg7 = (optional) alink color !-----------------------------!\n # arg8 = (optional) URL of CSS stylesheet to use. If used, all colors above\n # will be null'ed out.\n # arg9 = (optional) array of lines to include in between the <head> </head> tags.\n # arg10= (optional) bodytags : ANYTHING in this will be included within the <body> tag like this: <body ANYTHING>\n $num_args = func_num_args();\n echo \"<html>\\n\";\n echo \"<head>\\n\";\n if($title)\n {\n echo \"<title>$title</title>\\n\";\n }\n if($include_javascript_header==1)\n {\n select_and_auto_copy_javascript_header();\n }\n elseif($include_javascript_header==2)\n {\n select_all_and_copy_javascript_header_zeroclipboard();\n }\n elseif($include_javascript_header==3)\n {\n any_time_javascript_header();\n }\n if($css_url)\n {\n echo \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$css_url\\\" />\\n\";\n }\n if($head_lines)\n {\n if(is_array($head_lines))\n {\n foreach($head_lines as $head_ord => $head_line)\n {\n echo \"$head_line\\n\";\n }\n }\n }\n echo \"</head>\\n\";\n echo \"<body\";\n if(!($css_url))\n {\n if($bgcolor)\n {\n echo \" bgcolor=\\\"$bgcolor\\\"\";\n }\n else\n {\n echo \" bgcolor=\\\"#000000\\\"\";\n }\n if($text_color)\n {\n echo \" text=\\\"$text_color\\\"\";\n }\n else\n {\n echo \" text=\\\"#FFFFFF\\\"\";\n }\n if($link_color)\n {\n echo \" link=\\\"$link_color\\\"\";\n }\n if($vlink_color)\n {\n echo \" vlink=\\\"$vlink_color\\\"\";\n }\n if($alink_color)\n {\n echo \" alink=\\\"$alink_color\\\"\";\n }\n if($bodytags)\n {\n echo \" $bodytags\";\n }\n }\n if($include_javascript_header==2)\n {\n echo \" onLoad=\\\"init()\\\"\";\n }\n echo \">\\n\";\n}", "title": "" }, { "docid": "b05fc7a7febe2659b56df9c24543d762", "score": "0.67922425", "text": "protected function renderHeader()\n {\n if (file_exists($this->getDirectoryPath('Views') . 'layout' . DS . 'header'. self::EXT)) {\n $this->setHeaderParam();\n $this->_output .= $this->_parseTemplate(\n file_get_contents(\n $this->getDirectoryPath('Views') \n . 'layout' . DS \n . 'header'.self::EXT\n )\n );\n }\n \n return $this->_output;\n }", "title": "" }, { "docid": "86838df786f94c9d42e4017fc1955072", "score": "0.6789516", "text": "function header() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t.keyring-importer ul,\n\t\t\t.keyring-importer ol { margin: 1em 2em; }\n\t\t\t.keyring-importer li { list-style-type: square; }\n\t\t\t#auto-message { margin-left: 10px; }\n\t\t\t<?php echo do_action( 'keyring_importer_header_css' ); ?>\n\t\t</style>\n\t\t<div class=\"wrap keyring-importer\">\n\t\t<h2><?php printf( __( '%s Importer', 'keyring' ), esc_html( static::LABEL ) ); ?></h2>\n\t\t<?php\n\t\tif ( count( $this->errors ) ) {\n\t\t\techo '<div class=\"error\"><ol>';\n\t\t\tforeach ( $this->errors as $error ) {\n\t\t\t\techo '<li>' . esc_html( $error ) . '</li>';\n\t\t\t}\n\t\t\techo '</ol></div>';\n\t\t}\n\t}", "title": "" }, { "docid": "bea3a56be8ed43e1734e38a4acca82c1", "score": "0.67874956", "text": "function html_header()\n{\n\techo \"<html>\\n<head>\\n\";\n\techo \"\\t<title>CalDAVTester GUI: serverinfo.xml</title>\\n\";\n\tif (file_exists(__DIR__.'/jquery.js'))\n\t{\n\t\techo \"\\t<script src='jquery.js'></script>\\n\";\n\t}\n\telse\n\t{\n\t\techo \"\\t<script src='https://code.jquery.com/jquery-2.2.4.min.js' integrity='sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=' crossorigin='anonymous'></script>\\n\";\n\t}\n\techo \"\\t<script src='gui.js'></script>\\n\";\n\techo \"\\t<link type='text/css' href='gui.css' rel='StyleSheet'/>\\n\";\n\techo \"</head>\\n<body>\\n\";\n}", "title": "" }, { "docid": "584efc2fe0633ff3180f9ff7f784edc5", "score": "0.6779264", "text": "function printAdditionalHead(){}", "title": "" }, { "docid": "6a71983d167d64f2d96d7b1634286cb7", "score": "0.6772925", "text": "function showHeader($title) // , $nolink = 'books'\n{\n ?>\n <html>\n <head><title><?=htmlspecialchars($title)?></title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n </head>\n <body>\n <h2><?=htmlspecialchars($title)?></h2>\n <a href=\"index.php\">BOOKS (detail Block2) & Authors (master B1)</a>&nbsp;&nbsp;&nbsp;\n <a href=\"B1_tbl.php\">AUTHORS (suppliers, material documents)</a>&nbsp;&nbsp;&nbsp;\n <a href=\"lnktbl.php\">BORROWERS (buyers, links, veze)</a>\n &nbsp;&nbsp;&nbsp;\n <a href=\"exp_B2_xml.php\">EXPORT B2->XML</a>\n <hr>\n <?php\n}", "title": "" }, { "docid": "cb11e01c0a335c2575db51150e256d7d", "score": "0.67671716", "text": "public static function print_app_header() {\n global $CFG, $OUTPUT;\n if (self::uses_eduvidual()) {\n require_once($CFG->dirroot . '/blocks/eduvidual/block_eduvidual.php');\n block_eduvidual::print_app_header();\n } else {\n echo $OUTPUT->header();\n }\n }", "title": "" }, { "docid": "61b05b7df1b98c740c66bfee4f889556", "score": "0.67662233", "text": "public function output() {\n $headerArray = parent::getHeaders();\n foreach($headerArray as $header){\n header($header);\n }\n echo $this->getPageContent();\n }", "title": "" }, { "docid": "f4921d83c14aef3d2761a34710f04a26", "score": "0.6764694", "text": "function showHeader()\n\t{\n\t\tinclude(COMMON_ROOT.'custom/header.php');\n\t}", "title": "" }, { "docid": "d81044e3a7972447c0b6d59527bfb3c6", "score": "0.6764413", "text": "function lmt_page_header($title) {\n\tglobal $page_title;\n\t$page_title = $title;\n\t\n\tglobal $header_title;\n\t$header_title = 'Lexington Math Tournament';\n\t\n\tglobal $logged_in_header;\n\tif(isSet($_SESSION['LMT_user_id']))\n\t\t$logged_in_header = '<div id=\"user\"><span id=\"username\">School: '.$_SESSION['LMT_school_name'].'</span><span id=\"bar\"> | </span><a href=\"'.URL::root().'/LMT/Registration/Signout\">Log Out</a></div>';\n\t\n\tglobal $more_head_stuff;\n\t$more_head_stuff.='<link rel=\"stylesheet\" href=\"'.URL::root().'/res/lmt.css\" type=\"text/css\" media=\"all\" />';\n\t\n\tglobal $jquery_function, $javascript;\n\t$jquery_function .= $javascript;\n\t\n\tglobal $header_noprint, $header_class;\n\tif (isSet($header_noprint))\n\t\t$header_class = 'noPrint';\n}", "title": "" }, { "docid": "ecd19a7716d920b56844557b32811d04", "score": "0.6759427", "text": "public static function header() {\n\n $CI =& get_instance();\n $CI->load->view(\"xcms_header\", array(\n \"base_url\" => base_url(),\n \"title\" => XCMS_Page::getInstance()->getTitle(),\n \"metaTags\" => XCMS_Page::getInstance()->getMetaTags(),\n \"styleSheets\" => XCMS_Page::getInstance()->getStylesheets()\n ));\n\n }", "title": "" }, { "docid": "2158839ebe671a6f8bd4773505654d80", "score": "0.67539144", "text": "public function page_header($title){\n\t\treturn $this->Html->tag(\n\t\t\t\"div\",\n\t\t\t\"<h1>$title</h1>\",\n\t\t\tarray(\"class\" => \"page-header\")\n\t\t);\n\t}", "title": "" }, { "docid": "17ee24a946f495b8eccc9be7c4bc5113", "score": "0.6725636", "text": "function showHeader(){\n include(\"$this->root/reddpress/includes/header.php\");\n // include(\"$this->root/reddpress/lib/footer.php\");\n }", "title": "" }, { "docid": "4b4c1cd333357762956ab88e5da8f7e3", "score": "0.6709346", "text": "function HTMLHeader()\n {\n?>\n\n <header class=\"section-header\">\n <h1>Redrock Tavern</h1>\n </header>\n\n<?php \n }", "title": "" }, { "docid": "db6955036e3626fe59d614ec20f1adfe", "score": "0.6707659", "text": "protected function header() {\n echo '<div class=\"wrap\">';\n echo '<h2>' . __('Import AAM Settings', AAM_KEY) . '</h2>';\n }", "title": "" }, { "docid": "de889fecfd7bfc58d40c635aa7aa7742", "score": "0.6705942", "text": "function PrintHeader($title,$school){\n$school = !isset($school)?GetSchool():$school;\n$logo = _CONFIGDIR_.$school['logo'];\n$abbr = $school['Abbr'];\n$nm = $school['Name'];\n$shtabbr = $school['ShortAddr'];\n$header = <<<sss\n<div id=\"TitleDiv\">\n <div id=\"InnerDiv\">\n <img src=\"{$logo}\" name=\"SchoolImg\" alt=\"{$abbr}\" />\n <div id=\"TitleBox\">\n <div id=\"SchoolName\">{$nm}</div>\n <div id=\"SchoolAddress\">{$shtabbr}</div>\n <div id=\"payTitle\">{$title}</div>\n </div>\n </div>\n</div>\nsss;\necho $header;\n}", "title": "" }, { "docid": "f636389d8ad41015c868204a48cfc608", "score": "0.67049253", "text": "function print_header(){\n\t\tglobal $worksheet, $xlsRow;\n\n\t\t$worksheet->set_column(0, 0, 6.29);\n\t\t$worksheet->set_column(1, 1, 7.71);\n\t\t$worksheet->set_column(2, 2, 24.57);\n\t\t$worksheet->set_column(3, 3, 18.57);\n\t\t$worksheet->set_column(4, 4, 27.29);\n\t\t$worksheet->set_column(5, 5, 18.57);\n\t\t$worksheet->set_column(6, 6, 24.57);\n\t\t$worksheet->set_column(7, 7, 11.57);\n\t\t$worksheet->set_column(8, 8, 13.14);\n\t\t$worksheet->set_column(9, 9, 18.57);\n\t\t$worksheet->set_column(10, 10, 24.57);\n\t\t$worksheet->set_column(11, 11, 11.57);\n\t\t$worksheet->set_column(12, 12, 13.14);\n\t\t$worksheet->set_column(13, 13, 11.57);\n\t\t$worksheet->set_column(14, 14, 27.29);\n//\t\t$worksheet->set_column(15, 15, 20);\n\n\t\t$xlsRow++;\n\t\t$worksheet->write($xlsRow, 0, \"ลำดับ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TRL\", 1));\n\t\t$worksheet->write($xlsRow, 1, \"ตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 1));\n\t\t$worksheet->write($xlsRow, 2, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 3, \"ข้อมูลผู้ดำรงตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 4, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 1));\n\t\t$worksheet->write($xlsRow, 5, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 6, \"ส่วนราชการและตำแหน่งที่ ก.ก. กำหนดไว้เดิม\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 7, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 8, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 1));\n\t\t$worksheet->write($xlsRow, 9, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 10, \"ส่วนราชการและตำแหน่งที่ ก.ก. กำหนดใหม่\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 11, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"T\", 1));\n\t\t$worksheet->write($xlsRow, 12, \" \", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 1));\n\t\t$worksheet->write($xlsRow, 13, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 1));\n\t\t$worksheet->write($xlsRow, 14, \"หมายเหตุ\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 0));\n//\t\t$worksheet->write($xlsRow, 15, \"อัตรา\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TR\", 0));\n\n\t\tset_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0);\n\t\t\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\", \"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\", \"TLB\", 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\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 8, \"ระดับตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 9, \"ชื่อตำแหน่งในการบริหารงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 10, \"ชื่อตำแหน่งในสายงาน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 11, \"ประเภทตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 12, \"ระดับตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"TLRB\", 0));\n\t\t$worksheet->write($xlsRow, 13, \"เงินเดือน\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t\t$worksheet->write($xlsRow, 14, \"\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n//\t\t$worksheet->write($xlsRow, 15, \"เงินประจำตำแหน่ง\", set_format(\"xlsFmtTableHeader\", \"B\", \"C\", \"LRB\", 0));\n\t}", "title": "" }, { "docid": "9af674e008011f971a2446e9ac37162e", "score": "0.67015994", "text": "function format_header_content ()\n\t{\n\t\t$header = $this->header_content;\n\t\tif ( $header )\n\t\t{\n\t\t\tif ( $this->header_type == GESHI_HEADER_PRE )\n\t\t\t{\n\t\t\t\t$header = str_replace(\"\\n\", '', $header);\n\t\t\t}\n\t\t\t$header = $this->replace_keywords($header);\n\n\t\t\tif ( $this->use_classes )\n\t\t\t{\n\t\t\t\t$attr = ' class=\"head\"';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$attr = \" style=\\\"{$this->header_content_style}\\\"\";\n\t\t\t}\n\t\t\treturn \"<div$attr>$header</div>\";\n\t\t}\n\t}", "title": "" }, { "docid": "cd2d7c36cbcbfe7598d29c742cdad135", "score": "0.66993517", "text": "function print_header ($title=\"\", $heading=\"\", $navigation=\"\", $focus=\"\", $meta=\"\",\n $cache=true, $button=\"&nbsp;\", $menu=\"\", $usexml=false) {\n// $title - appears top of window\n// $heading - appears top of page\n// $navigation - premade navigation string\n// $focus - indicates form element eg inputform.password\n// $meta - meta tags in the header\n// $cache - should this page be cacheable?\n// $button - HTML code for a button (usually for module editing)\n// $menu - HTML code for a popup menu\n// $usexml - use XML for this page\n global $USER, $CFG, $THEME, $SESSION;\n\n if (file_exists(\"$CFG->dirroot/theme/$CFG->theme/styles.php\")) {\n $styles = $CFG->stylesheet;\n } else {\n $styles = \"$CFG->wwwroot/theme/standard/styles.php\";\n }\n\n if ($navigation == \"home\") {\n $home = true;\n $navigation = \"\";\n } else {\n $home = false;\n }\n\n if ($button == \"\") {\n $button = \"&nbsp;\";\n }\n\n if (!$menu and $navigation) {\n if (isset($USER->id)) {\n $menu = \"<font size=\\\"2\\\"><a target=\\\"$CFG->framename\\\" href=\\\"$CFG->wwwroot/login/logout.php\\\">\".get_string(\"logout\").\"</a></font>\";\n } else {\n $menu = \"<font size=\\\"2\\\"><a target=\\\"$CFG->framename\\\" href=\\\"$CFG->wwwroot/login/index.php\\\">\".get_string(\"login\").\"</a></font>\";\n }\n }\n\n // Add a stylesheet for the HTML editor\n $meta = \"<style type=\\\"text/css\\\">@import url($CFG->wwwroot/lib/editor/htmlarea.css);</style>\\n$meta\\n\";\n\n // Specify character set ... default is iso-8859-1 but some languages might need something else\n // Could be optimised by carrying the charset variable around in $USER\n if (current_language() == \"en\") {\n $meta = \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=iso-8859-1\\\" />\\n$meta\\n\";\n } else {\n $meta = \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=\".get_string(\"thischarset\").\"\\\" />\\n$meta\\n\";\n }\n\n if ( get_string(\"thisdirection\") == \"rtl\" ) {\n $direction = \" dir=\\\"rtl\\\"\";\n } else {\n $direction = \" dir=\\\"ltr\\\"\";\n }\n\n if (!$cache) { // Do everything we can to prevent clients and proxies caching\n @header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n @header(\"Pragma: no-cache\");\n $meta .= \"\\n<meta http-equiv=\\\"pragma\\\" content=\\\"no-cache\\\" />\";\n $meta .= \"\\n<meta http-equiv=\\\"expires\\\" content=\\\"0\\\" />\";\n }\n\n if ($usexml) { // Added by Gustav Delius / Mad Alex for MathML output\n $currentlanguage = current_language();\n\n @header(\"Content-type: text/xml\");\n echo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\\n\";\n if (!empty($CFG->xml_stylesheets)) {\n $stylesheets = explode(\";\", $CFG->xml_stylesheets);\n foreach ($stylesheets as $stylesheet) {\n echo \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"$CFG->wwwroot/$stylesheet\\\" ?>\\n\";\n }\n }\n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.1\";\n if (!empty($CFG->xml_doctype_extra)) {\n echo \" plus $CFG->xml_doctype_extra\";\n }\n echo \"//\" . strtoupper($currentlanguage) . \"\\\" \\\"$CFG->xml_dtd\\\">\\n\";\n $direction = \" xmlns=\\\"http://www.w3.org/1999/xhtml\\\" xml:lang=\\\"$currentlanguage\\\" $direction\";\n }\n\n $title = str_replace('\"', '&quot;', $title);\n\n include (\"$CFG->dirroot/theme/$CFG->theme/header.html\");\n}", "title": "" }, { "docid": "ac73e664e1a1d3765e03ffc5e52d8af8", "score": "0.6693392", "text": "function genesisawesome_html5_header_open() {\n\t\n\techo '<header id=\"header\">';\n\tgenesis_structural_wrap( 'header' );\n\n}", "title": "" }, { "docid": "d912a9da39800c09c3c1ba72294f8ee9", "score": "0.66920936", "text": "public function display_header(){\n\t\t$selected_date = calendar::get_date();\n\n\t\t//button dates for the previos and nect month\n\t\t$prev = date('Y-m', mktime(0, 0, 0, date('m', $selected_date)-1, 1, date('Y', $selected_date)));\n\t\t$next = date('Y-m', mktime(0, 0, 0, date('m', $selected_date)+1, 1, date('Y', $selected_date)));\n\n\t\t//displaying the header and href for previous and next month\n\t\techo '<h2 id=\"date_toggle\">'\n\t\t.'<a href=\"?ym='.$prev.'\"> &#10094; </a>'\n\t\t.date(\"M | Y\",$selected_date)\n\t\t.'<a href=\"?ym='.$next.'\"> &#10095; </a>'\n\t\t.'</h2>';\n\t}", "title": "" }, { "docid": "49c3f692e1d2ab50f382a38e16df55b3", "score": "0.6686538", "text": "public function header() {\n\n\t\t$language\t= ( !empty($this->_language) ) ? ' xml:lang=\"en\" lang=\"en\"' : null;\n\t\t$header\t\t= '';\n\n\t\tif ( !headers_sent() ) {\n\t\t\theader( 'Content-Type: text/html; charset='.CHARSET );\n\t\t}\n\n\t\t// echo '<?xml version=\"1.0\"? >';\n\t\t$header\t.= '<!DOCTYPE html\n PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';\n\n\t\t$header\t.= '\n<html xmlns=\"http://www.w3.org/1999/xhtml\"'.$language.'>\n<head>';\n\n\t\t$metaList\t= $this->_metaList;\n\t\t// this ensures that the content-type-meta-tag is printed first on page\n\t\tarray_unshift($metaList, array( 'http-equiv'\t=> 'content-type',\n\t\t\t\t\t\t\t\t\t\t'content'\t\t=> 'text/html; charset='.CHARSET ));\n\t\tforeach( $metaList as $meta ) {\n\t\t\t$header\t.= '\n\t<meta '.self::array2attributes( $meta ).' />';\n\t\t}\n\n\t\t$header\t.= '\n\t<title>'.$this->_title.'</title>';\n\n\t\tif ( count($this->_styleSheetList) > 0 ) {\n\t\t\tforeach( $this->_styleSheetList as $style ) {\n\t\t\t\t$type\t= ($style['alternative']) ? 'alternative stylesheet' : 'stylesheet';\n\t\t\t\tif ( $style['conditional'] == null ) {\n\t\t\t\t\t$header\t.= '\n\t<link rel=\"'.$type.'\" type=\"text/css\" href=\"'.$style['css'].'\" title=\"'.$style['title'].'\" media=\"'.$style['media'].'\" />';\n\t\t\t\t} else {\n\t\t\t\t\t$header\t.= '\n\t<!--[if '.$style['conditional'].']><link rel=\"'.$type.'\" type=\"text/css\" href=\"'.$style['css'].'\" title=\"'.$style['title']\n\t\t\t\t\t\t.'\" media=\"'.$style['media'].'\" /><![endif]-->';\n\t\t\t\t}\n\t\t\t} // foreach\n\t\t} // if\n\n\t\tif ( !$this->_deferJavascript && count($this->_javaScriptList) > 0 ) {\n\t\t\t$header\t.= '\n\t'.implode(\"\\n\t\", $this->_javaScriptList);\n\t\t}\n\n\t\tif ( $this->_favicon ) {\n\t\t\t$header\t.= '\n\t<link rel=\"shortcut icon\" href=\"'.$this->_favicon.'\" />';\n\t\t}\n\n\t\t$header\t.= '\n</head>\n<body '.self::array2attributes( $this->_attributeList ).'>';\n\t\t$header\t.= \"\\n\";\n\n\t\treturn $header;\n\t}", "title": "" }, { "docid": "8d0840d6c94957b40159767cfdc2b4b8", "score": "0.66863066", "text": "public function Header()\n {\n if ($this->print_header)\n {\n if (is_null($this->headerCallback))\n {\n\t \t// Logo\n \t\t// le chemain de l'image est : plugins/sfTCPDFPlugin/lib/tcpdf/images/ERP_logo.png\n\t \t//$image_file = K_PATH_IMAGES.'logo_ERP.jpg';\n\t \t//$this->Image($image_file, 10, 10, 54, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n\t \t\t \t\n\t // Set font\n\t $this->SetFont('TIMES', 'N', 10);\n\t $signature = <<<EOD\n\t <br><br>\n<table width=\"500px\" border=\"2\" bordercolor=\"#000000\">\n \t \t\t \n \t \t\t <tr><td width=\"40%\"><br><div align=\"center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"/img/logo_ERP.png\" width=\"170\" height=\"70\" />\n \t \t\t </div> \n \t </td >\n \t \t\t \t\t <td width=\"48%\" bgcolor=\"#FFFFFF\" ><br><br/><b><div align=\"center\"><span style=\"font-size:55px\"><strong>BON DE COMMANDE</strong> \n \t \t\t </span>\n \t \t\t </div></b>\n \t \t\t </td> \n \t \t\t <td width=\"42%\" ><br/>\n \t \t\t <div align=\"left\"><span style=\"font-size:35px\"> Code.MG-FR12<br/>&nbsp; Version : 02 <br/>&nbsp; Date d'application :11/05/2012 <br/>\n \t \t\t &nbsp; Pages : {$this->getAliasNumPage()} / {$this->getAliasNbPages()}<br>\n \t \t\t </span></div>\n \t \t\t \n \t \t\t </td > \n \t \t\t </tr>\n \t \t\t\n \t \t\t </table> \nEOD;\n\n \t$this->writeHTML($signature);\n\t \n }\n else\n {\n call_user_func($this->headerCallback, $this);\n }\n }\n }", "title": "" }, { "docid": "910574639e173f1f2141e0334249d55b", "score": "0.668073", "text": "function view_header( ) {\n global $PAGE;\n global $OUTPUT;\n\n $factory = $this->factory;\n\n $PAGE->set_url('/mod/bimtwo/view.php',\n array('id' => $factory->cm->id));\n $PAGE->set_title($factory->bimtwo->name);\n $PAGE->set_heading($factory->course->shortname);\n $PAGE->set_button(update_module_button($factory->cm->id,\n $factory->course->id,\n get_string('modulename', 'bimtwo')));\n echo $OUTPUT->header();\n\n /** set up the tabs, initially set up by the controller,\n * the view modifies which and how the tabs are shown\n */\n $inactive = array();\n $activated = array();\n $current_tab = 'posts';\n\n print_tabs( $this->controller->tabs, $current_tab, $inactive,\n $activated );\n }", "title": "" }, { "docid": "83885c06f3ed5677102973bf21911494", "score": "0.667112", "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\n // START SUGARPDF\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 }\n }\n // END SUGARPDF\n\n $this->Image($logo, $this->GetX(), $this->getHeaderMargin(), $headerdata['logo_width']);\n $imgy = $this->getImageRBY();\n } else {\n $imgy = $this->GetY();\n }\n $cell_height = round(($this->getCellHeightRatio() * $headerfont[2]) / $this->getScaleFactor(), 2);\n // set starting margin for text data cell\n if ($this->getRTL()) {\n $header_x = $ormargins['right'] + ($headerdata['logo_width'] * 1.1);\n } else {\n $header_x = $ormargins['left'] + ($headerdata['logo_width'] * 1.1);\n }\n $this->SetTextColor(0, 0, 0);\n // header title\n $this->SetFont($headerfont[0], 'B', $headerfont[2] + 1);\n $this->SetX($header_x);\n $this->Cell(0, $cell_height, $headerdata['title'], 0, 1, '', 0, '', 0);\n // header string\n $this->SetFont($headerfont[0], $headerfont[1], $headerfont[2]);\n $this->SetX($header_x);\n $this->MultiCell(0, $cell_height, $headerdata['string'], 0, '', 0, 1, '', '', true, 0, false);\n // print an ending header line\n $this->SetLineStyle(array('width' => 0.85 / $this->getScaleFactor(), 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\n $this->SetY((2.835 / $this->getScaleFactor()) + max($imgy, $this->GetY()));\n if ($this->getRTL()) {\n $this->SetX($ormargins['right']);\n } else {\n $this->SetX($ormargins['left']);\n }\n $this->Cell(0, 0, '', 'T', 0, 'C');\n }", "title": "" }, { "docid": "c4c1915f8b37a04f707b08a23a093b88", "score": "0.66696554", "text": "function renderHeaders();", "title": "" }, { "docid": "ff7d14b3c7347939e5cf50dc962fac6a", "score": "0.6659482", "text": "protected function outputHeaders() {\n foreach ($this->headers as $name => $value) {\n header(\"$name: $value\", true);\n }\n }", "title": "" }, { "docid": "3b667c40ff6b91f558cfe24c60c78598", "score": "0.6657514", "text": "public function header(){\n\t}", "title": "" }, { "docid": "26f7e8204e91c5956115bdd800a2f9e4", "score": "0.66449463", "text": "public function printHeader()\n {\n if( isset($_REQUEST['file']) )\n {\n $stmt = $this->getDbh()->prepare( 'select Name, Type, Size, Content from Uploads where Uploads_ID=?' );\n if( $stmt->execute( [$_REQUEST['file']] ) )\n {\n $filedata = $stmt->fetch(PDO::FETCH_ASSOC);\n }\n }\n else\n {\n $filedata = null;\n }\n \n if( $filedata )\n {\n header('Content-length: ' . $filedata['Size']);\n header('Content-type: ' . $filedata['Type']);\n header('Content-Disposition: attachment; filename=' . $filedata['Name'] );\n print $filedata['Content'];\n }\n else\n {\n header(\"HTTP/1.1 404 Not Found\");\n header(\"Content-type: text/plain\");\n print \"file not found\";\n }\n \n /* suppress any further output */\n return false;\n }", "title": "" }, { "docid": "47d158ebf76840b956cc58fc1f1c3f7b", "score": "0.6641571", "text": "function Header() {\n }", "title": "" }, { "docid": "a9a428d62262d4e3513606e8096868b4", "score": "0.66390073", "text": "public function getHeader(){\n\t\t\t\t/*$h=$this->pageCount==1?$this->config['coverHeaderHeight']:'60px';\n\t\t\t\t$pTpBm=$this->pageCount==1?$this->config['coverHeaderPadding']:'10px';\n\t\t\t\treturn '<div class=\"page-header '.($this->pageCount==1?'page-cover':'').'\" style=\"height:'.$h.'px;background-color:'.$this->config['headerBG'].';\"><div style=\"padding-top:'.$pTpBm.'px;padding-bottom:'.$pTpBm.'px;padding-right:'.$this->config['pageLeftRightPadding'].'px;height:'.($h-$pTpBm*2).'px\" class=\"header-img\"><img src=\"'.$this->config['headerImg'].'\" /></div></div>'.($this->pageCount==1?'<div id=\"reportTitle\" style=\"line-height:'.$this->reportTitleHeight.'px\">'.$this->config['reportTitle'].'</div>':'');\t\t\t\t\t\t\t\t\n\t\t\t*/\n\t\t\t}", "title": "" }, { "docid": "d30af664d449183b8861a8ec7fc4d107", "score": "0.6636752", "text": "function Header() {\n\t\t\n\t\t$this->SetTextColor(0,80,180);\n\t\t//Ancho del borde (1 mm)\n\t\t\n\t\t//Titulo\n\t\t\n\t\t//salto de linea\n\t\t$this->Ln(20);\n\n\t\t//Logo\n\t\t//Arial bold 15\n\t\t$this->SetFont('Arial','B',20);\n\t\t//Movernos a la derecha\n\t\t$this->Cell(70);\n\t\t//Titulo\n\t\t$this->Cell(60,10, 'REPORTE DE RESIDENCIAS: INGIENERIA TICs',0,0,'c');\n\t\t//salto de linea\n\t\t$this->Ln(17);\n\t}", "title": "" }, { "docid": "f33fa1bcdb90050f3f0e329918505090", "score": "0.66366696", "text": "function displayHeader($reportTitle) {\r\n $reportDate=date(\"l F d, Y\");\r\n \r\n echo '<div class=\"reportHeader\">';\r\n //output header - TITLE, report date/time.\r\n echo '<p class=\"reportTitle\">'.$reportTitle.'</p>';\r\n echo '<p class=\"reportTitle\"> Report Date: '.$reportDate.' </p>';\r\n echo '</div>';\r\n \r\n}", "title": "" }, { "docid": "4bfb68b80acbd6d425f6ff8659969620", "score": "0.66350025", "text": "protected function _echo_header ($obj)\r\n {\r\n?>\r\n <table class=\"basic columns left-labels top\">\r\n <?php $this->_echo_details ($obj); ?>\r\n <tr>\r\n <th>Found in</th>\r\n <td>\r\n <?php $this->_echo_folders ($obj); ?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <th>Size</th>\r\n <td>\r\n <?php echo file_size_as_text ($this->_size_of ($obj)); ?>\r\n </td>\r\n </tr>\r\n </table>\r\n<?php\r\n }", "title": "" } ]
6f7372a371eec33a1810bab5d75d42a5
Create DOM from URL or file
[ { "docid": "47056d27051ef0ff880439875fd9c2bb", "score": "0.0", "text": "public function TEST(){\n $html = file_get_html('http://www.google.com/');\n echo $html;\n }", "title": "" } ]
[ { "docid": "8ffee708d90c9ffe980a973a40cb0cb3", "score": "0.6695614", "text": "function file_get_dom() {\n $dom = new simple_html_dom;\n $args = func_get_args();\n $dom->load(call_user_func_array('file_get_contents', $args), true);\n return $dom;\n}", "title": "" }, { "docid": "3ef3e8a3e94ee261c3ed1d3db405ae2e", "score": "0.63398373", "text": "function file_get_html() {\n $dom = new simple_html_dom;\n $args = func_get_args();\n $dom->load(call_user_func_array('file_get_contents', $args), true);\n return $dom;\n}", "title": "" }, { "docid": "92ac7bad191c540263d106efcb6be39d", "score": "0.6274546", "text": "private function buildDom() {\n\t\t// create new dom object\n\t\t$dom = new \\DOMDocument('1.0', 'UTF-8');\n\t\t// set error level\n\t\t$internalErrors = libxml_use_internal_errors(true);\n\t\t// load the html into the object\n\t\t$dom->loadHTML( $this->response );\n\t\t// discard white space\n\t\t$dom->preserveWhiteSpace = false;\n\t\t// Restore error level\n\t\tlibxml_use_internal_errors($internalErrors);\n\t\t$this->dom = $dom;\n\t}", "title": "" }, { "docid": "fcf08a5f6e540b0b74b098e8f3129565", "score": "0.61832136", "text": "function createdParseDOM($source, array $args = array(), $createDOM = TRUE)\n{\n\t/* If no source is provided then we stop here */\n\tif (!$source)\n\t\tdie(\"DPARSE ERROR: An empty document was provided.\");\n\n\t/* Begin timer */\n\t$timer = microtime(true);\n\n\t/* Handle default arguments */\n\t$defaultargs = array(\"method\" => \"GET\",\n\t\t\t\t\t\t\t\"fake_user_agent\" => NULL,\n\t\t\t\t\t\t\t\"fake_http_referer\" => NULL,\n\t\t\t\t\t\t\t\"force_input_charset\" => NULL,\n\t\t\t\t\t\t\t\"output_charset\" => NULL,\n\t\t\t\t\t\t\t\"strip_whitespaces\" => false,\n\t\t\t\t\t\t\t\"connect_timeout\" => 10,\n\t\t\t\t\t\t\t\"transfer_timeout\" => 40,\n\t\t\t\t\t\t\t\"verify_peer\" => false,\n\t\t\t\t\t\t\t\"http_auth_username\" => NULL,\n\t\t\t\t\t\t\t\"http_auth_password\" => NULL,\n\t\t\t\t\t\t\t\"cookie_file\" => NULL,\n\t\t\t\t\t\t\t\"is_xml\" => FALSE,\n\t\t\t\t\t\t\t\"enable_logger\" => FALSE);\n\n\tforeach ($defaultargs as $key => $value)\n\t\tif (!isset($args[$key]))\n\t\t\t$args[$key] = $value;\n\n\n\n\t/* Determine the kind of input source */\n\t/* Web URL Case (the '://' suffix is used to differenciate it from a possible file whose name could start by 'http' */\n\tif (strpos($source, \"http://\") === 0 || strpos($source, \"https://\") === 0) {\n\n\t\t/* Check the HTTP method specified */\n\t\tif (strtoupper($args['method']) != \"GET\" && strtoupper($args['method']) != \"POST\")\n\t\t\tdie(\"Invalid HTTP method specified\");\n\n\t\t/* We retrieve the HTML using cURL */\n\t\t$ch = curl_init();\n\t\t$url = $source;\n\t\t$urlparametersoffset = strpos($source, \"?\");\n\t\tif ($args['method'] == \"POST\" && $urlparametersoffset) {\n\n\t\t\t/* HTTP POST case */\n\t\t\tcurl_setopt( $ch, CURLOPT_URL, substr($source, 0, $urlparametersoffset) );\n\t\t\tcurl_setopt( $ch, CURLOPT_POST, true);\n\t\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, substr($source, $urlparametersoffset + 1) );\n\n\t\t} else {\n\n\t\t\t/* HTTP GET case */\n\t\t\tcurl_setopt( $ch, CURLOPT_URL, $source );\n\n\t\t}\n\n\t\t/* Set other cURL parameters */\n \t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER, true);\n \t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n \t\tcurl_setopt($ch, CURLOPT_AUTOREFERER, true);\n \t\tcurl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n \t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $args['verify_peer']);\n \t\tcurl_setopt($ch,CURLOPT_CONNECTTIMEOUT, $args['connect_timeout']);\n \t\tcurl_setopt($ch,CURLOPT_TIMEOUT, $args['transfer_timeout']);\n \t\tif ($args['fake_user_agent'])\n\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $args['fake_user_agent']);\n\t\tif ($args['fake_http_referer'])\n\t\t\tcurl_setopt($ch, CURLOPT_REFERER, $args['fake_http_referer']);\n\t\tif ($args['cookie_file']) {\n\t\t\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $args['cookie_file']);\n\t\t\tcurl_setopt($ch, CURLOPT_COOKIEFILE, $args['cookie_file']);\n\t\t}\n\t\tif ($args['http_auth_username'] && $args['http_auth_password']) {\n\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $args['http_auth_username'] . \":\" . $args['http_auth_password']); \n\t\t\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);\n\t\t\tcurl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, true);\n\t\t}\n\n\t\t/* Download the page */\n\t\t$source = curl_exec($ch);\n\t\t$content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n\t\t/* Error handler */\n\t\tif (curl_error($ch))\n\t\t\tdie(curl_error($ch));\n\t\t/* Properly close cURL */\n\t\tcurl_close($ch);\n\t}\n\n\t/* Filepath case */\n\telse if (file_exists($source)) {\n\n\t\t/* We just use file_get_contents() to get the data, it is the fastest way to achieve this */\n\t\t$filename = $source;\n\t\t$source = file_get_contents($source);\n\n\t}\n\n\t/* Plain HTML string case */\n\telse {\n\n\t\t/* Well the $source variable already has the raw content*/\n\t\tvoid;\n\n\t}\n\n\t/* Build the DOM */\n\tif ($createDOM)\n\t\treturn new DParseDOM($source, $timer, $content_type, $args['force_input_charset'], $args[\"output_charset\"], $args[\"strip_whitespaces\"], $args['is_xml'], $args['enable_logger']);\n\telse\n\t\treturn $source;\n}", "title": "" }, { "docid": "cda94c669c4228ea877e031f09003870", "score": "0.6165145", "text": "public function read_url_data_into_dom() {\n // $this->html_raw = file_get_contents($clqc->render_url());\n $this->html_dom = file_get_html($this->render_url());\n\n if (!empty($this->html_dom)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "4365e1f067e7a69cdb267fa9b72d5f91", "score": "0.60903984", "text": "public function load($source, $type) {\n $dom = new DOMDocument();\n $dom->load($source);\n return $dom;\n }", "title": "" }, { "docid": "17559ac759701e55c8d35c6135be62ee", "score": "0.60571826", "text": "function getDomFromUrl($lotto) {\n switch ($lotto) {\n case 'swisslotto':\n $url = 'https://www.swisslos.ch/en/swisslotto/information/winning-numbers/winning-numbers.html';\n break;\n case 'euromillions':\n $url = 'https://www.swisslos.ch/en/euromillions/information/winning-numbers/winning-numbers.html';\n break;\n default:\n $url = '';\n break;\n }\n // Get DOM from URL\n $dom = new Dom;\n $dom->loadFromUrl($url);\n\n // Return DOM\n return $dom;\n}", "title": "" }, { "docid": "ed1de5ef9e9e7ce7a5ffba4c8b9562a8", "score": "0.5966495", "text": "public function __construct($url) { //this all means go that url and passing the content of that website into DomDocument obj and $doc var contain whole html of that webpage\n\n\t\t$option = array('http'=>array('method'=>\"GET\",'header'=>\"User-Agent:kiranweb/0.1\\n\")\n\t );\n\n\t $context = stream_context_create($option); //this is built in function to request a webpage\n\n\t $this->doc = new DomDocument(); //built in class which allows to perform action on webpages\n\t @$this->doc->loadHTML(file_get_contents($url,false,$context)); //@ means dont show any error and warning\n\t}", "title": "" }, { "docid": "5c927b39684fe0508871220149650232", "score": "0.5852452", "text": "function get_page_dom($path)\n{\n $url = get_full_url($path);\n print \"Retrieving '\" . $url . \"'\\n\";\n $html = null;\n $html = scraperWiki::scrape($url);\n $dom = null;\n $dom = new simple_html_dom();\n $dom->load($html);\n return $dom;\n}", "title": "" }, { "docid": "5c927b39684fe0508871220149650232", "score": "0.5852452", "text": "function get_page_dom($path)\n{\n $url = get_full_url($path);\n print \"Retrieving '\" . $url . \"'\\n\";\n $html = null;\n $html = scraperWiki::scrape($url);\n $dom = null;\n $dom = new simple_html_dom();\n $dom->load($html);\n return $dom;\n}", "title": "" }, { "docid": "25755ec7db57607fd0ed3353676b2eb5", "score": "0.5840509", "text": "public function getDOMDocument();", "title": "" }, { "docid": "e531fb822c4991666e0e367535c37af0", "score": "0.580224", "text": "public static function loadFile($htmlFile)\n {\n $node = new Dom;\n $node->loadFile($htmlFile);\n return $node;\n }", "title": "" }, { "docid": "3e858f51d3d70aa1ae724f8b9d3e5654", "score": "0.57803655", "text": "private function createDocument($data) {\n // We convert html string to DOM object so that we can process individual elements\n $doc = new \\DOMDocument(\"1.0\", \"UTF-8\");\n $doc->resolveExternals = FALSE;\n $doc->substituteEntities = FALSE;\n $doc->strictErrorChecking = FALSE;\n libxml_use_internal_errors(TRUE);\n $raw = '<?xml encoding=\"UTF-8\"><!DOCTYPE html><html><head></head><body>' . $data . '</body></html>';\n // Makes sure we use UTF-8 encoding, is needed to prevent loss of mul ibyte characters\n $forced_utf8 = mb_convert_encoding($raw, 'HTML-ENTITIES', 'UTF-8');\n @$doc->loadHTML($forced_utf8);\n libxml_clear_errors();\n\n return $doc;\n }", "title": "" }, { "docid": "a875a1e94077c74b497ca56dcc5eedeb", "score": "0.576487", "text": "public function content(): \\DOMDocument;", "title": "" }, { "docid": "7a8ccf8b3ae1a18e4f807e96af6416ad", "score": "0.5752358", "text": "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "title": "" }, { "docid": "7a8ccf8b3ae1a18e4f807e96af6416ad", "score": "0.5752358", "text": "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "title": "" }, { "docid": "96d63871297b57c9c210590e6adab1a8", "score": "0.573364", "text": "function createDOMNodeFromFile( $filename, $siteAccess, $filetype = false )\n {\n $path = substr( $filename, strpos( $filename, '/', 7 ) );\n\n $dom = new DOMDocument( '1.0', 'utf-8' );\n $fileDOMNode = $dom->createElement( 'file' );\n $fileDOMNode->setAttribute( 'site-access', $siteAccess );\n\n if ( $filetype !== false )\n {\n $fileDOMNode->setAttribute( 'file-type', $filetype );\n }\n\n $dom->appendChild( $fileDOMNode );\n $originalPathNode = $dom->createElement( 'original-path' );\n $originalPathNode->appendChild( $dom->createTextNode( $filename ) );\n $fileDOMNode->appendChild( $originalPathNode );\n $pathNode = $dom->createElement( 'path' );\n $pathNode->appendChild( $dom->createTextNode( $path ) );\n $fileDOMNode->appendChild( $pathNode );\n\n $destinationPath = $this->Package->path() . '/' . eZContentObjectPackageHandler::contentObjectDirectory() . '/' . $path;\n eZDir::mkdir( eZDir::dirpath( $destinationPath ), false, true );\n eZFileHandler::copy( $filename, $destinationPath );\n\n return $fileDOMNode;\n }", "title": "" }, { "docid": "e10ade89e424ea3dd398538a1e20fba6", "score": "0.5722635", "text": "function getResponseDOM();", "title": "" }, { "docid": "7997769a691c5011550d448c936cec98", "score": "0.5714129", "text": "private static function createDomDocument()\n {\n $document = new \\DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "title": "" }, { "docid": "ffc550848b3c11bc3c80536a5058c042", "score": "0.5641553", "text": "public function getContent($url)\n\t{\n\t\tif ( stripos($url, 'http') !==0) {\n\t\t\t$url = 'http://' . $url;\n\t\t}\n\n\t\t$this->content = new DOMDocument('1.0');\n\t\t$this->content->preserveWhiteSpace = false;\n\t\t// @ used to suppress warnings generated from improperly configured web pages\n\t\t@$this->content->loadHTMLFile($url);\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "b4224ec35dfffe7fe6f1475bbe89da2e", "score": "0.56311536", "text": "public function fetch(string $url, array $options)\n {\n $dom = new \\PHPHtmlParser\\Dom;\n $dom->loadFromUrl($url, [\n \"curlHeaders\" => $options[\"curlHeaders\"]\n ]);\n return $dom;\n }", "title": "" }, { "docid": "5aef0f49c8f516ffa7460ce541643b30", "score": "0.56100047", "text": "public static function loadFromUrl(string $url, ?Options $options = null, ClientInterface $client = null, RequestInterface $request = null): Dom\n {\n $dom = new Dom();\n self::$dom = $dom;\n\n if (\\is_null($client)) {\n $client = new Client();\n }\n if (\\is_null($request)) {\n $request = new Request('GET', $url);\n }\n\n return $dom->loadFromUrl($url, $options, $client, $request);\n }", "title": "" }, { "docid": "394b8e27c8bcf556af3a8ab80d0157ef", "score": "0.55877435", "text": "function createDocFromURL($url,$file,$download=false)\r\n\t\t{\r\n\t\t\t//echo 'createDocFromURL Entered.<br>';\r\n\t\t\tif(!preg_match(\"/^http:/\",$url))\r\n\t\t\t\t$url=\"http://\".$url;\r\n\t\t\t$f = fopen($url,'rb');\r\n\t\t\twhile(!feof($f)){\r\n\t\t\t\t$html= fread($f,8192);\r\n\t\t\t}\r\n\t\t\treturn $this->createDoc($html,$file,$download);\t\r\n\t\t}", "title": "" }, { "docid": "70fe2bb554cb899ee249cbbdda96a7ad", "score": "0.5582484", "text": "function mai_cta_get_dom_document( $html ) {\n\n\t// Create the new document.\n\t$dom = new DOMDocument();\n\n\t// Modify state.\n\t$libxml_previous_state = libxml_use_internal_errors( true );\n\n\t// Load the content in the document HTML.\n\t$dom->loadHTML( mb_convert_encoding( $html, 'HTML-ENTITIES', 'UTF-8' ) );\n\n\t// Remove <!DOCTYPE.\n\t$dom->removeChild( $dom->doctype );\n\n\t// Remove <html><body></body></html>.\n\t// $dom->replaceChild( $dom->firstChild->firstChild->firstChild, $dom->firstChild ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase\n\n\t// Handle errors.\n\tlibxml_clear_errors();\n\n\t// Restore.\n\tlibxml_use_internal_errors( $libxml_previous_state );\n\n\treturn $dom;\n}", "title": "" }, { "docid": "067761616f6217769aa149470a8a96d3", "score": "0.5578476", "text": "private function getDOM($content)\n {\n $doc = new \\DOMDocument();\n @$doc->loadHTML($content);\n \n return $doc;\n }", "title": "" }, { "docid": "9208d42a1d18b2d17af4dca79b6dc328", "score": "0.5565661", "text": "public function new_dom() {\n $dom = new DOMDocument('1.0', 'UTF-8');\n\n $root = $dom->createElement('response');\n $root->setAttribute('method', $this->servicemethod);\n $root->setAttribute('generator', 'zend');\n $root->setAttribute('version', '1.0');\n\n $status = $dom->createElement('status');\n $message = $dom->createElement('message');\n $data = $dom->createElement('data');\n\n $dom->appendChild($root);\n $root->appendChild($status);\n $root->appendChild($message);\n $root->appendChild($data);\n\n return $dom;\n }", "title": "" }, { "docid": "92869eca4ff30260430113fb809dd4d1", "score": "0.55545163", "text": "public static function load($html)\n {\n $node = new Dom;\n $node->load($html);\n return $node;\n }", "title": "" }, { "docid": "a979b89ed28f1678150772ec452bf249", "score": "0.55027884", "text": "function __construct($filename) {\n $this->filename = $filename;\n //try opening otherwise we will create new\n $this->dom = new DOMDocument;\n if(!@$this->dom->load($filename))\n $this->dom = DOMImplementation::createDocument();\n \n $this->dom->formatOutput = TRUE;\n }", "title": "" }, { "docid": "69b286f9b97b69039e7043e857c5f83b", "score": "0.5469346", "text": "public function __construct($url){\n\n\t\t$options = array (\n\t\t\t'http'=>array('method'=> \"GET\", 'header'=> \"User-Agent: searchEngine/0.1\\n\")\n\t\t\t\t\t); //this option is gonna be used when we will request a webpage.. Go to the url request the whole document.. the option we are specifying are the method we are gonna retrieve the website with which will be get because we are gonna retrieve the data .. the we have to specify header and user agent.. user agent is how website knows who visited..\n\n\t\t$context = stream_context_create($options); // which is we are gonna be used when we are gonna make the request\n\n\t\t$this->doc = new domDocument(); //domdocument allows you to perform actions on web pages\n\n\n\t\t@$this->doc->loadHTML(file_get_contents($url,false,$context)); //we are gonna be passing parameter(file). and the file is gonna be the actual webpage itself.. the false is for wheather we wanna use the include path for php.. a configuration url..\n\n\t\t\n\t\t}", "title": "" }, { "docid": "b0f9445c419f399ccec16c68300191a0", "score": "0.5452257", "text": "public static function loadFromFile(string $file, ?Options $options = null): Dom\n {\n $dom = new Dom();\n self::$dom = $dom;\n\n return $dom->loadFromFile($file, $options);\n }", "title": "" }, { "docid": "566b639d1cedd5e401f0f6ff1cb00438", "score": "0.5415083", "text": "function openXML($file)\n{\n $doc = new DOMIT_Document();\n if ($doc->loadXML(CONTENTDIR.$file)) {\n $xml =& $doc->documentElement;\n return $xml;\n } else {\n echo('Could not open or read XML file: '. $file . '<br />' . $doc->getErrorString());\n return false;\n }\n}", "title": "" }, { "docid": "24d5cbb2fa2ece64dc4fdaad963d62d5", "score": "0.5412353", "text": "function parse() {\n\t\t$html = file_get_contents( $this->url );\n\t\tif( $html === false )\n\t\t\tthrow new \\Exception( \"Can't load \".$this->url );\n\n\t\t$dom = new \\DOMDocument();\n\t\tlibxml_use_internal_errors( true );\n\t\t$dom->loadHTML( $html );\n\t\tlibxml_clear_errors();\n\n\t\t$links = $dom->getElementsByTagName( 'img' );\n\t\tforeach( $links as $link )\n\t\t{\n\t\t\t$src = $this->absUrl( $link->getAttribute( 'src' ) );\n\t\t\t$this->images[$src] = '';\n\t\t}\n\n\t\t$links = $dom->getElementsByTagName( 'a' );\n\t\tforeach( $links as $link )\n\t\t{\n\t\t\t$href = $this->absUrl( $link->getAttribute( 'href' ) );\n\t\t\t$this->links[$href] = '';\n\t\t}\n\t}", "title": "" }, { "docid": "0561bae7d1c27cfd7a1f676f4184a855", "score": "0.54100794", "text": "function str_get_dom($str, $lowercase=true) {\n $dom = new simple_html_dom;\n $dom->load($str, $lowercase);\n return $dom;\n}", "title": "" }, { "docid": "8bbd89b6c0d8023e526315bdd15d25dd", "score": "0.5402937", "text": "public function url($url){\n $content = file_get_contents($url);\n \n $this->content = $content;\n \n return $this->loadHTML($content);\n }", "title": "" }, { "docid": "486a6a099d01e7bca21e74ed072fb33d", "score": "0.5338188", "text": "private function _loadDOM()\n\t {\n\t\t$this->dom = new DOMDocument();\n\t\t@$this->dom->loadHTML($this->html);\n\t\t$this->xpath = new DOMXPath($this->dom);\n\t }", "title": "" }, { "docid": "6dc0e7be4b3609844e9e278f03f11cf2", "score": "0.5336517", "text": "public function dom($file)\n {\n $domOBJ = new DOMDocument();\n $domOBJ->load($file);//XML page URL\n $content = $domOBJ->getElementsByTagName(\"item\");\n $i = 10;\n\n\n foreach ($content as $data) {\n if ($i-- == 0) {\n break;\n }\n $title = $data->getElementsByTagName(\"title\")->item(0)->nodeValue;\n $date = $data->getElementsByTagName(\"pubDate\")->item(0)->nodeValue;\n $description = $data->getElementsByTagName(\"description\")->item(0)->nodeValue;\n $link = $data->getElementsByTagName(\"link\")->item(0)->nodeValue;\n\n\n echo \"<div class='card w-75' id='feed-box'>\";\n echo \"<h3>$title</h3>\";\n echo \"<i>$date</i>\";\n echo \"<br>\";\n echo \"<p>$description</p>\";\n echo \"<a href='$link'</a>\";\n echo \"<br>\";\n echo \"<br>\";\n echo \"</div>\";\n }\n }", "title": "" }, { "docid": "cf6396714c739397589d9c0199d87745", "score": "0.53311133", "text": "function __construct($filename) {\n $this->dom = new DomDocument;\n if(!@$this->dom->load($filename)) {\n trigger_error(\"Could not open file $filename\");\n exit();\n }\n }", "title": "" }, { "docid": "ff4b4ff482c5a95faaacac94275e2eb9", "score": "0.53112495", "text": "public function buildDomArr()\n {\n if (empty($this->urlArr)) {\n throw new Exception('URL array not loaded');\n }\n foreach ($this->urlArr as $url) {\n $tempSanne = new self();\n $tempSanne->setURL($url);\n $tempSanne->load();\n $this->domArr[] = $tempSanne->getDOM();\n }\n }", "title": "" }, { "docid": "debda0d7049abecc555fce9440e9d1fb", "score": "0.5306497", "text": "function loadDocument ($request) {\n //CONDIZIONI INIZIALI\n $dom = new DOMDocument();\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n //CONTROLLA IL TIPO DI RICHIESTA E CARICA IL XML FILE ADEGUATO\n if($request == \"sitemap\") $dom->load(\"../sitemap.xml\");\n else if($request == \"removeNews\" || $request == \"submitNews\") $dom->load(\"../../../xml/news.xml\");\n else $dom->load(\"../xml/news.xml\");\n //RITORNA IL FILE ALLA FUNZIONE CHIAMANTE\n return $dom;\n }", "title": "" }, { "docid": "b9d708495181119503a7235b8bd5e473", "score": "0.5306443", "text": "protected function getDocumentObjectModel($url) {\n\t\t$response = $this->httpClient->get($url);\n\n\t\t// if not correct http response (<>200)\n\t\tif (!$response->isOk()) {\n\t\t throw new \\Exception(__(\n\t\t 'URL {0} couldn\\'t be downloaded, httpCode: {1}',\n\t\t $url, \n\t\t $response->getStatusCode()\n\t\t ));\n\t\t}\n\n\t\t// Converting response to utf8\n\t\t$body = $response->body();\n\t\t$documentHtml = $body;\n\t\t$body = iconv('iso-8859-2', 'utf-8', $body);\n\n\t\t// creating DOM parser\n\t\t$dom = new \\PHPHtmlParser\\Dom;\n\t\t$dom->loadStr($body, [\n\t\t 'enforceEncoding' => 'utf8'\n\t\t]);\n\n\t\treturn $dom;\n\n\t}", "title": "" }, { "docid": "116640c93007b513a19586310383ec59", "score": "0.530529", "text": "public static function retrieve_img_from_url(DOMNode $domnode, $url)\n {\n\t/*** use PHP simple dom parser module to load html from site ***/\n\t//include('simple_html_dom.php'); //DIDNT WORK\n\t//$site = file_get_html($url);\n\n\t// create new document, load html parsed, @ suppreses errors\n\t$doc = new DOMDocument();\t\n\t@$doc->loadHTML(file_get_contents($url));\n\t\n\t\n\n }", "title": "" }, { "docid": "a928374d3ede6d4577f45623ed9a4ca1", "score": "0.5277642", "text": "public function loadHTML ($source) {}", "title": "" }, { "docid": "3d93c0a2c9a2170565e5b8dc6d8aa935", "score": "0.5276865", "text": "protected function initDom() {\n\t\t// LibXML is noisy apparently\n\t\tlibxml_use_internal_errors( true );\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadHTML( '<?xml encoding=\"UTF-8\">' . $this->html );\n\t\tlibxml_use_internal_errors( false );\n\n\t\t$dom->strictErrorChecking = false;\n\t\t$dom->encoding = 'UTF-8';\n\n\t\t$this->dom = $dom;\n\t}", "title": "" }, { "docid": "a3e38cc5a5eadc0ee4fcaa8526ee23bd", "score": "0.52694273", "text": "function __construct(){\n\t\t\tglobal $document;\n\t\t\t$document = DOMImplementation::createDocument(null, 'html',\n\t\t\t\tDOMImplementation::createDocumentType(\"html\", \n\t\t\t\t\t\"-//W3C//DTD XHTML 1.0 Transitional//EN\", \n\t\t\t\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"));\n\t\t}", "title": "" }, { "docid": "bcdb8d68beae05bb3454118c2256d222", "score": "0.5257846", "text": "public function __makeTemplate()\n {\n $this->templateLoaded = true;\n if (!$this->getTemplatePath()) {\n // Default template if no template path set\n $html = <<<HTML\n<html>\n<head>\n <title></title>\n</head>\n<body>\n <div var=\"content\"></div>\n</body>\n</html>\nHTML;\n return \\Dom\\Loader::load($html);\n } else {\n return \\Dom\\Loader::loadFile($this->getTemplatePath());\n }\n }", "title": "" }, { "docid": "ae499cb986c7b1caf0d827f3cb766315", "score": "0.5257673", "text": "public function doDom($xml) {\n if (substr($xml, 0, 7) == \"http://\") {\n $this->load($xml);\n } elseif (is_file($xml)) {\n $this->load($xml);\n } elseif (is_string($xml)) {\n $this->loadXML($xml, LIBXML_NOCDATA);\n } elseif ($xml instanceof DOMDocument) {\n $this->loadXML($xml->saveXML());\n }\n $this->xpath = new \\DOMXPath($this);\n return $this;\n }", "title": "" }, { "docid": "59087137e27d69133b614d4b98c08714", "score": "0.52546495", "text": "private function insertDOMFromFileIntoNode ($node, $filePath){\n $file_content = file_get_contents($filePath);\n\n $localDoc = new DOMDocument(); //create a tmp document to create the DOM tree from HTML\n $localDoc->loadHTML($file_content);\n $targetNode = $localDoc->getElementsByTagName(\"body\")->item(0);\n $targetNodeInnerHTML = getInnerHTML($targetNode);\n\n //$clipNode = $this->ownerDoc->importNode($targetNode, true);\n //$node->appendChild($clipNode);\n setInnerHTML($node, $targetNodeInnerHTML);\n }", "title": "" }, { "docid": "59087137e27d69133b614d4b98c08714", "score": "0.52546495", "text": "private function insertDOMFromFileIntoNode ($node, $filePath){\n $file_content = file_get_contents($filePath);\n\n $localDoc = new DOMDocument(); //create a tmp document to create the DOM tree from HTML\n $localDoc->loadHTML($file_content);\n $targetNode = $localDoc->getElementsByTagName(\"body\")->item(0);\n $targetNodeInnerHTML = getInnerHTML($targetNode);\n\n //$clipNode = $this->ownerDoc->importNode($targetNode, true);\n //$node->appendChild($clipNode);\n setInnerHTML($node, $targetNodeInnerHTML);\n }", "title": "" }, { "docid": "a839f20bcecb3b36b6038b7d01cddaad", "score": "0.5251888", "text": "private function getHtml($url)\n\t{\n\t\t// Get html from the given page\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($curl, CURLOPT_TIMEOUT, $this->config['CURLOPT_TIMEOUT']);\n\t\t$html = curl_exec($curl);\n\t\tcurl_close($curl);\n\n\t\t//Load the html and store it into a DOM object\n\t\t$dom = new DOMDocument();\n\t\t@$dom->loadHTML($html);\n\n\t\treturn $dom;\n\t}", "title": "" }, { "docid": "483869ca7d5a40375bdbb17f029ad886", "score": "0.5251039", "text": "public function parseDOM()\n\t {\n\t\t$this->_config = new SimpleXMLElement(file_get_contents(__DIR__ . \"/config/parser/\" . mb_strtolower($this->site) . \".xml\"));\n\t\t$params = [\"info\", \"title\"];\n\t\t$params = array_merge($params, $this->mainprops);\n\n\t\tforeach($params as $name)\n\t\t {\n\t\t\t$result = $this->_getValue($name);\n\t\t\tif ($result !== false)\n\t\t\t {\n\t\t\t\t$this->$name = $result;\n\t\t\t } //end if\n\n\t\t } //end foreach\n\n\t\tswitch (mb_strtolower($this->site))\n\t\t {\n\t\t\tcase \"avito\":\n\t\t\t $this->_parser($params);\n\t\t\t $this->_filter($params);\n\t\t\t $this->_getDate();\n\t\t\tbreak;\n\t\t\tcase \"cian\":\n\t\t\t $this->parseCIAN();\n\t\t\t $this->_filter($params);\n\t\t\t $this->_getDate();\n\t\t\tbreak;\n\t\t }\n\n\t\tif (isset($this->title) === true)\n\t\t {\n\t\t\tif (preg_match(\"/Продам/ui\", $this->title) > 0 && $this->operation === \"rent\")\n\t\t\t {\n\t\t\t\t$this->validtype = false;\n\t\t\t }\n\n\t\t } //end if\n\n\t\tunset($this->info);\n\t\tunset($this->title);\n\t }", "title": "" }, { "docid": "449c9401d543a7784cdf4500f5e52079", "score": "0.52492183", "text": "public function __construct()\n {\n $this->doc = new \\DOMDocument('1.0', 'UTF-8');\n $this->doc->loadHTML(\n \"<!DOCTYPE html>\\n<html><head><title></title></head><body></body></html>\"\n );\n }", "title": "" }, { "docid": "80c86a1200e13e505097632b85dda007", "score": "0.5238501", "text": "abstract protected function create(DOMQuery $query_path);", "title": "" }, { "docid": "59b3e275824630a104111fe797ef1f70", "score": "0.5227971", "text": "public function __construct()\n\t{\n\t\t// XML document\n\t\t$this->_xml = new DOMDocument('1.0', Kohana::$charset);\n\n\t\t// Attributes\n\t\t$this->_xml->formatOutput = TRUE;\n\n\t\t// Root element\n\t\t$this->_root = $this->_xml->createElement('urlset');\n\n\t\t// Append to XML document\n\t\t$this->_xml->appendChild($this->_root);\n\t}", "title": "" }, { "docid": "cfa62e2eb3e68ad297d5956dcb63cfad", "score": "0.522242", "text": "public function __construct($WidgetID){\n $localDoc = new DOMDocument(); //create a tmp document to crdeate the widget\n $this->ownerDoc = $localDoc;\n $this->widget_id = $WidgetID;\n $this->ownerDoc->loadHTML('<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">');\n $this->widget_node = $this->ownerDoc->createElement('div');\n $this->widget_node->setAttribute('id',$WidgetID);\n $this->ul_node = $this->ownerDoc->createElement('ul');\n $this->widget_node->appendChild($this->ul_node);\n //$this->ownerDoc->appendChild($this->widget_node);\n }", "title": "" }, { "docid": "6c200b87acda3861a9a5e0e8d1614734", "score": "0.52039677", "text": "private function generate()\n\t\t{\n\t\t$dom = new \\DOMDocument(\"1.0\", \"utf-8\");\n\n\t\t$rss = $dom->createElement(\"rss\");\n\t\t$rss->setAttribute(\"xmlns:itunes\", \"http://www.itunes.com/dtds/podcast-1.0.dtd\");\n\t\t$rss->setAttribute(\"version\", \"2.0\");\n\t\t$dom->appendChild($rss);\n\t\t\n\t\t$channel = $dom->createElement(\"channel\");\n\t\t$rss->appendChild($channel);\n\t\t\n\t\t$title = $dom->createElement(\"title\", $this->titLe);\n\t\t$channel->appendChild($title);\n\t\t\n\t\tif ($this->subtitle != null)\n\t\t\t{\n\t\t\t$itune_subtitle = $dom->createElement(\"itunes:subtitle\", $this->subtitle);\n\t\t\t$channel->appendChild($itune_subtitle);\n\t\t\t}\n\t\t\n\t\t$link = $dom->createElement(\"link\", $this->link);\n\t\t$channel->appendChild($link);\n\t\t\n\t\t$description = $dom->createElement(\"description\");\n\t\t$description->appendChild($dom->createCDATASection($this->description));\n\t\t$channel->appendChild($description);\n\t\t\n\t\t$itune_summary = $dom->createElement(\"itunes:summary\", $this->description);\n\t\t$channel->appendChild($itune_summary);\n\t\t\n\t\t$image = $dom->createElement(\"image\");\n\t\t$image->appendChild($title->cloneNode(true));\n\t\t$image->appendChild($link->cloneNode(true));\n\t\t$channel->appendChild($image);\n\t\t$image_url = $dom->createElement(\"url\", $this->image);\n\t\t$image->appendChild($image_url);\n\t\t\n\t\t$itune_image = $dom->createElement(\"itunes:image\");\n\t\t$itune_image->setAttribute(\"href\", $this->image);\n\t\t$channel->appendChild($itune_image);\n\t\t\n\t\t$itune_author = $dom->createElement(\"itunes:author\", $this->author);\n\t\t$channel->appendChild($itune_author);\n\t\t\n\t\t$itune_owner = $dom->createElement(\"itunes:owner\");\n\t\t$itune_owner_name = $dom->createElement(\"itunes:name\", $this->author);\n\t\t$itune_owner->appendChild($itune_owner_name);\n\t\tif ($this->email != null)\n\t\t\t{\n\t\t\t$itune_owner_email = $dom->createElement(\"itunes:email\", $this->email);\n\t\t\t$itune_owner->appendChild($itune_owner_email);\n\t\t\t}\n\t\t$channel->appendChild($itune_owner);\n\t\t\n\t\tif ($this->category != null)\n\t\t\t{\n\t\t\t$category = $dom->createElement(\"itunes:category\", $this->category);\n\t\t\t$channel->appendChild($category);\n\t\t\t}\n\t\t\n\t\tif ($this->language != null)\n\t\t\t{\n\t\t\t$language = $dom->createElement(\"language\", $this->language);\n\t\t\t$channel->appendChild($language);\n\t\t\t}\n\t\t\n\t\tif ($this->copyright != null)\n\t\t\t{\n\t\t\t$copyright = $dom->createElement(\"copyright\", $this->copyright);\n\t\t\t$channel->appendChild($copyright);\n\t\t\t}\n\t\t\n\t\tforeach ($this->medias as $media)\n\t\t\t{\n\t\t\tif ($this->injectionMode == true)\n\t\t\t\t$media->inject($this->subtitle, $this->link, $this->description, $this->author, $this->image);\n\n\t\t\t$media->addToDom($dom);\n\t\t\t\n\t\t\tif ($this->pubDate == null)\n\t\t\t\t$this->pubDate = $media->getPubDate();\n\t\t\telse if ($this->pubDate < $media->getPubDate())\n\t\t\t\t$this->pubDate = $media->getPubDate();\n\t\t\t}\n\t\t\n\t\tif ($this->pubDate == null)\n\t\t\t$this->pubDate = new \\DateTime();\n\t\t$pubDate = $dom->createElement(\"pubDate\", $this->pubDate->format(DATE_RFC2822));\n\t\t$channel->appendChild($pubDate);\n\t\t\n\t\t// retourne le document Dom\n\t\treturn $dom;\n\t\t}", "title": "" }, { "docid": "6bef1cb1bf7460239b043e19897d9ce3", "score": "0.5199225", "text": "function newDocument($array = array(), $styleArray = array(), $scriptArray = array(), $echo = true){\n\t\t\tglobal $document;\n\t\t\tglobal $body;\n\t\t\t\n\t\t\t$document->formatOutput = true;\n\t\t\t$html = $document->documentElement;\n\t\t\t$document->appendChild($html);\n\t\t\t$head = $document->createElement('head');\n\t\t\t$html->appendChild($head);\n\t\t\t\n\t\t\t$title = $document->createElement('title');\n\t\t\t$titleText = parse_url($_SERVER['REQUEST_URI']);\n\t\t\t$titleText = explode('/',$titleText['path']);\n\t\t\tarray_pop($titleText);\n\t\t\t$titleText = array_pop($titleText);\n\t\t\tif(strlen($titleText) == 0) $titleText = $_SERVER['HTTP_HOST'];\n\t\t\t$title->appendChild($document->createTextNode($titleText));\n\t\t\t$head->appendChild($title);\n\t\t\t\n\t\t\t$link = $document->createElement('link');\n\t\t\t$rel = $document->createAttribute('rel');\n\t\t\t$rel->appendChild($document->createTextNode('icon'));\n\t\t\t$type = $document->createAttribute('type');\n\t\t\t$type->appendChild($document->createTextNode('image/png'));\n\t\t\t$href = $document->createAttribute('href');\n\t\t\t$href->appendChild($document->createTextNode('/assets/images/folder.png'));\n\t\t\t$link->appendChild($rel);\n\t\t\t$link->appendChild($type);\n\t\t\t$link->appendChild($href);\n\t\t\t$head->appendChild($link);\n\t\t\t\n\t\t\tforeach($styleArray as $key){\n\t\t\t\t$$key = $document->createElement('link');\n\t\t\t\t$head->appendChild($$key);\n\t\t\t\t$rel = $document->createAttribute('rel');\n\t\t\t\t$rel->appendChild($document->createTextNode('stylesheet'));\n\t\t\t\t$$key->appendchild($rel);\n\t\t\t\t$type = $document->createAttribute('type');\n\t\t\t\t$type->appendChild($document->createTextNode('text/css'));\n\t\t\t\t$$key->appendchild($type);\n\t\t\t\t$href = $document->createAttribute('href');\n\t\t\t\t$href->appendChild($document->createTextNode($key));\n\t\t\t\t$$key->appendchild($href);\n\t\t\t}\n\t\t\t\n\t\t\tforeach($scriptArray as $key){\n\t\t\t\t$$key = $document->createElement('script');\n\t\t\t\t$head->appendChild($$key);\n\t\t\t\t$type = $document->createAttribute('type');\n\t\t\t\t$type->appendChild($document->createTextNode('text/javascript'));\n\t\t\t\t$$key->appendChild($type);\n\t\t\t\t$type = $document->createAttribute('src');\n\t\t\t\t$type->appendChild($document->createTextNode($key));\n\t\t\t\t$$key->appendChild($type);\n\t\t\t}\n\t\t\t\n\t\t\t$body = $document->createElement('body');\n\t\t\t$html->appendChild($body);\n\t\t\tforeach($array as $key => $value){\n\t\t\t\tif($key == 'head'){\n\t\t\t\t\t$head->appendChild($value);\n\t\t\t\t}elseif($key == 'body'){\n\t\t\t\t\t$body->appendChild($value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(is_bool($echo) && $echo == true){\n\t\t\t\techo $document->saveXml();\n\t\t\t\treturn $document->saveXml();\n\t\t\t}else{\n\t\t\t\tglobal $$echo;\n\t\t\t\techo $document->saveXml($$echo);\n\t\t\t\treturn $document->saveXml($$echo);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "aa5d24fa14a529f5a18c11f06e99fc77", "score": "0.51707304", "text": "function simplexml_import_dom (DOMNode $node, $class_name = null) {}", "title": "" }, { "docid": "9813e87e606d5a73dc7b79aacb9997d8", "score": "0.51650953", "text": "public static function createFromFilePath($path)\n {\n $doc = new HtmlDoc();\n $template = new TextFile($path);\n $template->load();\n $template->getContent();\n $doc->loadFile($template);\n return $doc;\n }", "title": "" }, { "docid": "fc46cf830c9fea7bcd835047cf896b2d", "score": "0.5160729", "text": "public function createDocument ($namespaceURI = null, $qualifiedName = null, DOMDocumentType $doctype = null) {}", "title": "" }, { "docid": "c4dcaf8983ad6bef40114540e6432d91", "score": "0.5145118", "text": "public function getXml(string $url): XmlParser;", "title": "" }, { "docid": "f9f31c2c90b9568235de6d749283730d", "score": "0.51418275", "text": "public function load_parser() {\n\t\trequire('domparser/simple_html_dom.php');\n\t}", "title": "" }, { "docid": "df2f2cb866c5dafec963990536d8f641", "score": "0.5141408", "text": "private function prepareData($url, $html = null, $encoding = 'UTF-8') {\n if (is_null($html)) {\n $html = file_get_contents($url);\n } \n $html = $this->prepareForDOM($html, $encoding);\n $doc = new \\DOMDocument('1.0', 'UTF-8');\n //@ for non-valid html\n @$doc->loadHTML($html);\n \n return $doc;\n }", "title": "" }, { "docid": "bdf3f961a33f9816313dfda683b76261", "score": "0.5137016", "text": "public static function getDom($type = NULL) {\n if (!is_null($type) && class_exists('One_Dom_' . ucfirst(strtolower($type)))) {\n $dom = 'One_Dom_' . ucfirst('One_Dom_' . ucfirst(strtolower($type)));\n return new $dom();\n } else if (One_Config::get('dom.type')) {\n $dom = 'One_Dom_' . One_Config::get('dom.type');\n return new $dom();\n } else\n return new One_Dom();\n }", "title": "" }, { "docid": "6274309f452305a1d05b9cf9f0ae90ad", "score": "0.5116644", "text": "function create_ead_dom($batch){\n\n // make a DOM object from the batch object's raw xml string\n $dom_doc = new DOMDocument();\n\n if (! $dom_doc->loadXML($batch->getRaw()) ){\n\t return false; \n }\n\n // if we could make a dom document...\n else{\n // save the document to an attribute\n $batch->ead_doc = $dom_doc;\n\n // make an xpath object to use for xpath queries\n $batch->ead_xpath = new DOMXPath($batch->ead_doc);\n\n }\n\n return true;\n\n }", "title": "" }, { "docid": "a50e7fe3e04b748f558a4f0952ed7d19", "score": "0.5107891", "text": "public function createEntity(\\DOMDocument $entityDom);", "title": "" }, { "docid": "ce66d2ca2b51fd0efa8b239c965ee73f", "score": "0.50930023", "text": "public function loadHTMLFile ($filename) {}", "title": "" }, { "docid": "e41c2a5b4c3d56723f06a5a8f0248360", "score": "0.50856096", "text": "public function file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)\n\t{\n\t // We DO force the tags to be terminated.\n\t $dom = new Dommr(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText);\n\t // For sourceforge users: uncomment the next line and comment the retreive_url_contents line 2 lines down if it is not already done.\n\t \n\t $contents = @$this->get_web_page($url);\n\n\t if( $contents['errno'] != 0 /*bad url, timeout, redirect loop*/ || $contents['http_code'] != 200 /*no page, no permissions, no service*/ ) return false;\n $contents = $contents['content'];\n\n\t\t// Paperg - use our own mechanism for getting the contents as we want to control the timeout.\n\t\t//$contents = retrieve_url_contents($url);\n\t\tif (empty($contents) || strlen($contents) > MAX_FILE_SIZE)\n\t\t{\n\t\t return false;\n\t\t}\n\t \n\t // The second parameter can force the selectors to all be lowercase.\n\t $dom->load($contents, $lowercase, $stripRN);\n\t return $dom;\n\t}", "title": "" }, { "docid": "9745518f6a7bba5b5db387f0ce0369e4", "score": "0.50602907", "text": "protected static function _create($doctype = 'xml') {\n\t\t$dir = TDOM_BASE . 'adapter' . DIRECTORY_SEPARATOR . $doctype . DIRECTORY_SEPARATOR;\n\t\t$classname = 'tdom_' . $doctype;\n\t\t$filename = $dir . $classname . '.php';\n\t\tif (is_dir($dir)) {\n\t\t\tif (is_file($filename)) {\n\t\t\t\trequire_once($filename);\n\t\t\t\tif (class_exists($classname, false)) {\n\t\t\t\t\treturn new $classname();\n\t\t\t\t} else {\n\t\t\t\t\tthrow new exception(\"tdom error: la clase {$classname} para el tipo de documento {$doctype} no existe!\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new exception(\"tdom error: el archivo {$filename} del adaptador {$doctype} no existe\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new exception(\"tdom error: el directorio {$dir} no existe\");\n\t\t}\n\t}", "title": "" }, { "docid": "7b26b199f54016c6917d16859330e03e", "score": "0.5052911", "text": "public function getDOMHandler();", "title": "" }, { "docid": "662ab6508250acb8efa627baec43ed2d", "score": "0.50516033", "text": "public function file($path){\n $path = $this->filesystemRoot() . $path;\n\n $content = file_get_contents($path);\n\n $this->content = $content;\n\n return $this->loadHTML($content);\n }", "title": "" }, { "docid": "dcbe95eef70a3ea76d4b5c4cea6bc00b", "score": "0.5045553", "text": "public function getDom($url, $encoding = 'UTF-8') {\n return $this->prepareData($url, null, $encoding);\n }", "title": "" }, { "docid": "978206416a5d4a4de4dc3121969c67cd", "score": "0.50416714", "text": "public function __construct($WidgetID){\n $localDoc = new DOMDocument(); //create a tmp document to crdeate the widget\n $this->ownerDoc = $localDoc;\n $this->widget_id = $WidgetID;\n $this->ownerDoc->loadHTML('<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">');\n $this->widget_node = $this->ownerDoc->createElement('div');\n $this->widget_node->setAttribute('id',$WidgetID);\n //$this->ownerDoc->appendChild($this->widget_node);\n }", "title": "" }, { "docid": "b779df968b86310b7bf2cae174a0a986", "score": "0.5006395", "text": "public function createElementFromHTML(string $tag, string $html) : DOMNode\n\t{\n\t\t//print \"ExtendedDOMDocument::createElementFromHTML ($tag, $html) \\n\";\n\t\t//var_dump($this->document);\n\t\t$d = new DOMDocument();\n\t\t$d->loadHTML($html);\n\t\t$body = $d->getElementsByTagName(\"body\")->item(0);\n\t\t$el = $this->document->createElement($tag);\n\t\tforeach ($body->childNodes as $child) {\n\t\t\t$child = $this->document->importNode($child, true);\n\t\t\t$child = $el->appendChild($child);\n\t\t}\n\t\treturn $el;\n\t}", "title": "" }, { "docid": "f942967d19c09092a652fdc87735399b", "score": "0.4969351", "text": "public function toDom()\n\t\t{\n\t\treturn $this->generate();\n\t\t}", "title": "" }, { "docid": "f5c900cd6c800c3ae615677aa09906f0", "score": "0.49620265", "text": "public static function parseDom($url, $tagName){\n\t\t\t$document_xml = new DomDocument(); // Instanciation de la classe DomDocument : création d'un nouvel objet\n\t\t\t$tab = array();\n\t\t\t$document_xml->load($url); // Chargement à partir de citations.xml\n\t\t\n\t\t\t$elements = $document_xml->getElementsByTagName($tagName);\n\t\t\n\t\t\tforeach($elements as $element){\n\t\t\t\t$tab[]=$element->nodeValue;\n\t\t\t}\n\t\t\t\n\t\t\treturn $tab;\n\t\t}", "title": "" }, { "docid": "1becbe26c0ae03d28659c8a6b938aaa2", "score": "0.49541107", "text": "public function HTMLstream()\n {\n?>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"library/normal.css\">\n <title><?php echo($this->title); ?></title>\n </head>\n\n <body>\n <container> \n <header>\n <h3>David's Website</h3>\n <p>A Little Test Site</p>\n </header>\n <nav>\n <a href=\"page1.php\">Home</a>\n <a href=\"page2.php\">Page 2</a>\n <a href=\"page3.php\">Page 3</a>\n <a href=\"page4.php\">Page 4</a>\n </nav>\n\n <section>\n <?php echo($this->content); ?>\n </section>\n\n <footer>\n <p>&copy;2013 David</p>\n </footer>\n </container>\n </body>\n</html>\n<?php\n }", "title": "" }, { "docid": "a21ffc006b1cfbfb91b01663568fcfc1", "score": "0.4941862", "text": "function xmlwriter_open_uri($uri) {}", "title": "" }, { "docid": "ae5633c2e224b951437e39c7e3017b00", "score": "0.49328297", "text": "private function _scrapeData(){\n\t\t\ttry{\n\t\t\t\t$this->DOM = file_get_html($this->getRestUrl());\n\t\t\t}\n\t\t\tcatch (Exception $e){\n\t\t\t\tthrow new Exception(\"Cannot scrape the page. validate the url and try again.\");\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "206e2d62e2a92a456c7b27dbeef62913", "score": "0.49295682", "text": "public function source(\\DOMNode $node = null): string\n {\n $nodeMode = $node !== null;\n if ($nodeMode && $node instanceof \\DOMDocument) {\n $nodeMode = false;\n }\n\n if ($nodeMode) {\n if (!isset(self::$newObjectsCache['domdocument'])) {\n self::$newObjectsCache['domdocument'] = new $this();\n }\n $tempDomDocument = clone (self::$newObjectsCache['domdocument']);\n if ($node->nodeName === 'html') {\n $tempDomDocument->loadHTML('<!DOCTYPE html>');\n $tempDomDocument->appendChild($tempDomDocument->importNode(clone ($node), true));\n $html = $tempDomDocument->source();\n $html = substr($html, 16); // remove the DOCTYPE + the new line after\n } elseif ($node->nodeName === 'head' || $node->nodeName === 'body') {\n $tempDomDocument->loadHTML(\"<!DOCTYPE html>\\n<html></html>\");\n $tempDomDocument->childNodes[1]->appendChild($tempDomDocument->importNode(clone ($node), true));\n $html = $tempDomDocument->source();\n $html = substr($html, 22, -7); // remove the DOCTYPE + the new line after + html tag\n } else {\n $isInHead = false;\n $parentNode = $node;\n for ($i = 0; $i < 1000; $i++) {\n $parentNode = $parentNode->parentNode;\n if ($parentNode === null) {\n break;\n }\n if ($parentNode->nodeName === 'body') {\n break;\n } elseif ($parentNode->nodeName === 'head') {\n $isInHead = true;\n break;\n }\n }\n $tempDomDocument->loadHTML(\"<!DOCTYPE html>\\n<html>\" . ($isInHead ? '<head></head>' : '<body></body>') . '</html>');\n $tempDomDocument->childNodes[1]->childNodes[0]->appendChild($tempDomDocument->importNode(clone ($node), true));\n $html = $tempDomDocument->source();\n $html = substr($html, 28, -14); // remove the DOCTYPE + the new line + html + body or head tags\n }\n $html = trim($html);\n } else {\n $removeHtmlElement = false;\n $removeHeadElement = false;\n $headElement = $this->getElementsByTagName('head')->item(0);\n if ($headElement === null) {\n if ($this->addHtmlElementIfMissing()) {\n $removeHtmlElement = true;\n }\n if ($this->addHeadElementIfMissing()) {\n $removeHeadElement = true;\n }\n $headElement = $this->getElementsByTagName('head')->item(0);\n }\n $meta = $this->createElement('meta');\n $meta->setAttribute('data-html5-dom-document-internal-attribute', 'charset-meta');\n $meta->setAttribute('http-equiv', 'content-type');\n $meta->setAttribute('content', 'text/html; charset=utf-8');\n if ($headElement->firstChild !== null) {\n $headElement->insertBefore($meta, $headElement->firstChild);\n } else {\n $headElement->appendChild($meta);\n }\n $html = parent::saveHTML();\n $html = rtrim($html, \"\\n\");\n\n if ($removeHeadElement) {\n $headElement->parentNode->removeChild($headElement);\n } else {\n $meta->parentNode->removeChild($meta);\n }\n\n if (strpos($html, 'html5-dom-document-internal-entity') !== false) {\n $html = preg_replace('/html5-dom-document-internal-entity1-(.*?)-end/', '&$1;', $html);\n $html = preg_replace('/html5-dom-document-internal-entity2-(.*?)-end/', '&#$1;', $html);\n }\n\n $codeToRemove = [\n 'html5-dom-document-internal-content',\n '<meta data-html5-dom-document-internal-attribute=\"charset-meta\" http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">',\n '</area>', '</base>', '</br>', '</col>', '</command>', '</embed>', '</hr>', '</img>', '</input>', '</keygen>', '</link>', '</meta>', '</param>', '</source>', '</track>', '</wbr>',\n '<![CDATA[-html5-dom-document-internal-cdata', '-html5-dom-document-internal-cdata]]>', '-html5-dom-document-internal-cdata-endtagfix'\n ];\n if ($removeHeadElement) {\n $codeToRemove[] = '<head></head>';\n }\n if ($removeHtmlElement) {\n $codeToRemove[] = '<html></html>';\n }\n\n $html = str_replace($codeToRemove, '', $html);\n }\n return $html;\n }", "title": "" }, { "docid": "3249f37111d6d7b0a4ef1a2e4fad7c3c", "score": "0.49173495", "text": "abstract public function getContent( $url );", "title": "" }, { "docid": "258e3fae83cdcbbc829795a41a965b0c", "score": "0.49172166", "text": "public function domFromPdfFile($filename, $saveToFile = null);", "title": "" }, { "docid": "5f6db76a3296f554f09cc6379833e730", "score": "0.49134564", "text": "public function exportData()\r\n {\r\n $incontentCreator = new DOMDocument();\r\n $incontentCreator->formatOutput = true;\r\n $incontentCreator->preserveWhiteSpace = false;\r\n $incontentNode = null;\r\n if ($this->type == \"ordered\")\r\n {\r\n $incontentNode = $incontentCreator->createElement(\"ol\");\r\n if (!empty($this->attr))\r\n {\r\n $incontentNode->setAttribute(\"type\", $this->attr);\r\n }\r\n }\r\n else if ($this->type == \"unordered\")\r\n {\r\n $incontentNode = $incontentCreator->createElement(\"ul\");\r\n if (!empty($this->attr))\r\n {\r\n $incontentNode->setAttribute(\"bullet\", $this->attr);\r\n }\r\n }\r\n\r\n $createdbodyNode = $this->createXmlContent($incontentCreator, $this->content, $incontentNode, $this);\r\n $bodyNode = $incontentCreator->importNode($createdbodyNode, true);\r\n return $bodyNode;\r\n }", "title": "" }, { "docid": "b4359cbab1d75181e3cb43234b236ca7", "score": "0.4909834", "text": "function xmlwriter_open_uri ($uri) {}", "title": "" }, { "docid": "e222fb54689343b7d796baacfd33f54b", "score": "0.4909807", "text": "private function createUnifiedDomDocument(string $html): void\n {\n $this->createRawDomDocument($html);\n $this->ensureExistenceOfBodyElement();\n }", "title": "" }, { "docid": "b17cda3a81ec4c407b4a93560db1d1c1", "score": "0.49064088", "text": "abstract public function newInstance($uri);", "title": "" }, { "docid": "44b60d756b22fa2621c33e0e54a8973e", "score": "0.4899292", "text": "function _convert($html) {\n\n $doc = DOMUtils::parseHTMLFragment($html,\"UTF-8\");\n if (!$doc) {\n Log::debug('Unable to parse!');\n return $html;\n }\n $links = $doc->getElementsByTagName('a');\n $linkArray = [];\n\n for ($i = $links->length - 1; $i >= 0; $i--) {\n $linkArray[] = $links->item($i);\n }\n foreach ($linkArray as $link) {\n $link->removeAttribute('href');\n $data = $link->getAttribute('data');\n $obj = Strings::fromJSON($data);\n\n $replaced = $doc->createElement('link');\n if (isset($obj->page) && !empty($obj->page)) {\n $pageId = intval($obj->page);\n if ($pageId > 0) {\n $path = PageService::getPath($pageId);\n $replaced->setAttribute('page',$obj->page);\n if (!empty($path)) {\n $replaced->setAttribute('path',$path);\n }\n }\n }\n if (isset($obj->file) && !empty($obj->file)) {\n $replaced->setAttribute('file',$obj->file);\n }\n if (isset($obj->image) && !empty($obj->image)) {\n $replaced->setAttribute('image',$obj->image);\n }\n if (isset($obj->url) && !empty($obj->url)) {\n $replaced->setAttribute('url',$obj->url);\n }\n if (isset($obj->email) && !empty($obj->email)) {\n $replaced->setAttribute('email',$obj->email);\n }\n $replaced->setAttribute('data',$data);\n\n for ($j = 0; $j < $link->childNodes->length; $j++) {\n $child = $link->childNodes->item($j);\n $link->removeChild($child);\n $replaced->appendChild($child);\n }\n\n $link->parentNode->replaceChild($replaced,$link);\n }\n\n $html = DOMUtils::getInnerXML($doc->documentElement,\"UTF-8\");\n return $html;\n }", "title": "" }, { "docid": "fd47528f0ccf9d2756c447a691e9f1d2", "score": "0.48922768", "text": "public function index()\n {\n $client = new Client();\n\n // Hackery to allow HTTPS\n $guzzleclient = new \\GuzzleHttp\\Client([\n 'timeout' => 60,\n 'verify' => false,\n ]);\n\n // Create DOM from URL or file\n $html = file_get_html('https://www.facebook.com');\n\n return $html;\n // Find all images\n foreach ($html->find('img') as $element) {\n echo $element->src . '<br>';\n }\n\n // Find all links\n foreach ($html->find('a') as $element) {\n echo $element->href . '<br>';\n }\n }", "title": "" }, { "docid": "1f8f7ff5ec7e99e54a31c8737adf60be", "score": "0.48908326", "text": "public function domFromPdfStream($content, $saveToFile = null);", "title": "" }, { "docid": "425eb71c31ea6751707c7e13c14dba68", "score": "0.48884407", "text": "public function toDom( $input = array( ) )\n {\n /*if( ! is_array( $input ) )\n $input = array( );*/\n\n if( ! is_array( $this->data ) )\n $this->data = array( );\n\n JavaScript::put( array_merge( $input, $this->data, [\n 'base_url' => url( '' ),\n 'api_base_url' => url( 'api/' . config( \"api.version\" ) ),\n 'user' => \\Auth::user( ),\n 'apiToken' => 'test-token',\n 'template_tokens' => config( 'template.tokens' ),\n 'app' => [ \n 'name' => config( 'app.name' ),\n 'site_name' => config( 'app.site_name' ),\n ]\n\n ] ) );\n }", "title": "" }, { "docid": "08658f8749e83fff9962909f09488296", "score": "0.4869476", "text": "function __construct($html)\n {\n# $html = preg_replace('/<!DOCTYPE (?:.+?)>/i', '', $html);\n# \n# # drops XMLNS definitions because XPATH evaluates nothing when XMLNS are defined\n# $html = preg_replace('/(<.*)xmlns=\"(?:.+?)\"(.*>)/', '\\1\\2', $html);\n# \n# $this->dom = new \\DOMDocument();\n# $this->dom->loadXML(html_entity_decode($html, ENT_NOQUOTES, 'UTF-8'));\n \n $this->dom = \\HTML5_Parser::parse($html);\n $this->xpath = new \\DOMXpath($this->dom);\n }", "title": "" }, { "docid": "7c3ce08330f25e343e2be3a092f3fc2e", "score": "0.48632577", "text": "public function createDomFromHtml(Trace $trace, $html)\n {\n Preconditions::checkIsString($html);\n $dom = new DOMDocument();\n $trace->tlog(\"Loading html to DOM\");\n $loaded = @$dom->loadHTML($html);\n if (!$loaded) {\n throw new ParseException(\"Problem parsing html to DOM.\");\n }\n $trace->tlog('Fixing id attributes in the DOM');\n $this->fixIdAttributes($trace, $dom);\n return $dom;\n }", "title": "" }, { "docid": "fc979d742ecb69f718c709408d824f65", "score": "0.48583126", "text": "public function __construct() {\n $this->body = new HTMLNode('body');\n $this->body->setAttribute('itemscope');\n $this->body->setAttribute('itemtype', 'http://schema.org/WebPage');\n $this->headNode = new HeadNode();\n $this->htmlNode = new HTMLNode('html');\n $this->getDocumentRoot()->addChild($this->headNode, true)->addChild($this->body);\n }", "title": "" }, { "docid": "658d89a74ee019aa2648e9d4187ec4f6", "score": "0.48470783", "text": "abstract protected function createDocument( $content );", "title": "" }, { "docid": "3b675d47925d74489c1257698a1a5c4c", "score": "0.48402017", "text": "function createElementFromXML($xml) {\n \n // To make thing easy and make sure namespaces work properly, we add the root namespace delcarations if it is not declared\n $namespaces = $this->ns;\n $xml = preg_replace_callback('/<[^\\?^!].+?>/s', function($root_match) use ($namespaces) {\n preg_match('/<([^ <>]+)[\\d\\s]?.*?>/s', $root_match[0], $root_tag);\n $new_root = $root_tag[1];\n if (strpos($new_root, ':')) {\n $parts = explode(':', $new_root);\n $prefix = $parts[0]; \n if (isset($namespaces[$prefix])) {\n if (!strpos($root_match[0], \"xmlns:$prefix\")) {\n $new_root .= \" xmlns:$prefix='\" . $namespaces[$prefix] . \"'\"; \n }\n }\n }\n return str_replace($root_tag[1], $new_root, $root_match[0]);\n }, $xml, 1);\n \n $dom = new BetterDOMDocument($xml, $this->auto_ns);\n if (!$dom->documentElement) {\n trigger_error('BetterDomDocument Error: Invalid XML: ' . $xml);\n }\n $element = $dom->documentElement;\n \n // Merge the namespaces\n foreach ($dom->getNamespaces() as $prefix => $url) {\n $this->registerNamespace($prefix, $url);\n }\n \n return $this->importNode($element, true);\n }", "title": "" }, { "docid": "53d84e76d487bdd028eef3b90bba9952", "score": "0.48352003", "text": "private function getRemoteXML($url) {\n\t\t\n\t\t// $url = str_ireplace(\"%3b\",\";\",$url);\n\t\t// $url = str_ireplace(\"%3d\",\"=\",$url);\n\t\t// $url = str_ireplace(\"%2f\",\"/\",$url);\n\t\t// $url = str_ireplace(\"%3a\",\":\",$url);\n\t\t$url = str_ireplace(\" \",\"++\",$url);\n\t\t\n\t\t// print \"URL: $url -- <br />\";\n\t\t\n\t\t$content = file_get_contents($url);\n\n\t\tif ($content !== false) {\n\t\t\t\n\t\t\tif($this->class == \"findingaid\") {\n\t\t\t\t$content = $this->replaceFindAidTags($content);\n\t\t\t}\n\t\t\telse if ($this->class == \"image\") {\n\t\t\t\t$content = $this->replaceImageTags($content);\n\t\t\t}\n\t\t\t\n\t\t\t$content = $this->replaceHighlightTags($content);\n\n\t\t\t$content = utf8_encode($content);\n\t\t\t\n\t\t\t$xml = simplexml_load_string($content);\n\t\t}\n\t\telse {\n\t\t\t$xml = false;\n\t\t}\n\n\t\treturn($xml);\n\t}", "title": "" }, { "docid": "44555db27678fdb7cfc160a53f3da4ef", "score": "0.48350018", "text": "protected function extractXML()\n {\n //set_error_handler('HandleXmlError');\n if (is_string($this->xmlsrc))\n {\n $this->xmldoc = new DOMDocument;\n $xmlfile = (substr_count($this->xmlsrc,'http://') == 0) ? 'http://'.$this->host.$this->xmlsrc : $this->xmlsrc;\n return $this->xmldoc->load($xmlfile);\n }\n else if ($this->xmlsrc instanceof \\DomDocument)\n {\n $this->xmldoc = $this->xmlsrc;\n return $this->xmldoc;\n }\n restore_error_handler();\n }", "title": "" }, { "docid": "cc09f6ea725e8677dad4187fa61e5194", "score": "0.48260444", "text": "function appendHTML(DOMNode $parent, $source) {\n $tmpDoc = new DOMDocument();\n $tmpDoc->loadHTML($source);\n foreach ($tmpDoc->getElementsByTagName('body')->item(0)->childNodes as $node) {\n $importedNode = $parent->ownerDocument->importNode($node, TRUE);\n\t\t$parent->appendChild($importedNode);\n }\n}", "title": "" }, { "docid": "ad6430ff3f157a8f73aa9a759ecc2717", "score": "0.48156244", "text": "public function __construct()\n {\n $this->xml = new SimpleXMLElement('<llgc-pages/>');\n $this->curlWebPage();\n \n // Format our XML \n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($this->xml->asXML());\n \n // Open our XMl file\n $current = file_get_contents('res.xml');\n // Save the contents to the file\n file_put_contents('res.xml', $dom->saveXML());\n \n // Header('Content-type: text/xml');\n print($this->xml->asXML());\n }", "title": "" }, { "docid": "506c3e642b35012e03be7bb75fb10635", "score": "0.48017418", "text": "public function getContent($url);", "title": "" }, { "docid": "b82313aa8172343a66fc64bcb2bef808", "score": "0.47927865", "text": "public function fromUrl(string $url): Definition;", "title": "" }, { "docid": "27c0e5fade18271f316161a90351ced0", "score": "0.4792243", "text": "function document_factory_url($url) {\n\t\t$d = new Document();\n\t\t//strip url handler, for now we always assume file://\n\t\t$filename = preg_replace(\"|^(.*)://|\",\"\",$url);\n\t\t\n\t\tif (!file_exists($filename)) {\n\t\t\tdie(\"An invalid URL was specified to crete a new document, this would only be caused if files are being deleted as you are working through the queue. '$filename'\\n\");\t\n\t\t}\n\t\t\n\t\t$sql = \"SELECT id FROM \" . $d->_table . \" WHERE url= '\" . mysql_real_escape_string($url) .\"'\" ;\n\t\t$result = $d->_db->Execute($sql);\n\t\t\n\t\tif ($result && !$result->EOF) {\n\t\t\tif (file_exists($filename)) {\n\t\t\t\t$d = new Document($result->fields['id']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$sql = \"DELETE FROM \" . $d->_table . \" WHERE id= '\" . $result->fields['id'] .\"'\";\n\t\t\t\t$result = $d->_db->Execute($sql);\n\t\t\t\techo(\"There is a database for the file but it no longer exists on the file system. Its document entry has been deleted. '$filename'\\n\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$file_command = $GLOBALS['oer_config']['document']['file_command_path'] ;\n\t\t\t$cmd_args = \"-i \".escapeshellarg($new_path.$fname);\n\t\t \t\t\n\t\t \t$command = $file_command.\" \".$cmd_args;\n\t\t \t$mimetype = exec($command);\n\t\t \t$mime_array = split(\":\", $mimetype);\n\t\t \t$mimetype = $mime_array[1];\n\t\t \t$d->set_mimetype($mimetype);\n\t\t\t$d->url = $url;\n\t\t \t$d->size = filesize($filename);\n\t\t \t$d->type = $d->type_array['file_url'];\n\t\t \t$d->persist();\n\t\t \t$d->populate();\t\n\t\t}\n\n\t\treturn $d;\n\t}", "title": "" } ]
830315e592eb456a1f5a627cb81b5d2f
Configures the output to render Topic (either in LIST or SINGLE mode).
[ { "docid": "65ef9b909ee6024d8a94934597edf992", "score": "0.57399684", "text": "protected function prepareTopic() {\n\t\t/** @var tx_egovapi_domain_repository_topicRepository $topicRepository */\n\t\t$topicRepository = tx_egovapi_domain_repository_factory::getRepository('topic');\n\n\t\tswitch ($this->settings['mode']) {\n\t\t\tcase 'LIST':\n\t\t\t\t/** @var tx_egovapi_domain_repository_domainRepository $domainRepository */\n\t\t\t\t$domainRepository = tx_egovapi_domain_repository_factory::getRepository('domain');\n\n\t\t\t\t$restrictDomain = FALSE;\n\t\t\t\t$domain = null;\n\t\t\t\tif ($this->settings['domain']) {\n\t\t\t\t\t$domain = $domainRepository->findById($this->settings['domain']);\n\t\t\t\t\t$restrictDomain = TRUE;\n\t\t\t\t}\n\t\t\t\tif ($restrictDomain && !$domain) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ($this->settings['topics']) {\n\t\t\t\t\t// Static list of topics to show\n\t\t\t\t\t$topics = array();\n\t\t\t\t\t$ids = t3lib_div::trimExplode(',', $this->settings['topics']);\n\t\t\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t\t$topic = $topicRepository->findById($id);\n\t\t\t\t\t\t// Only use topics related to current domain\n\t\t\t\t\t\tif ($topic && (!$restrictDomain || $topic->getDomain() == $domain)) {\n\t\t\t\t\t\t\t$topics[] = $topic;\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$topics = $topicRepository->findAll($domain);\n\t\t\t\t}\n\n\t\t\t\t$this->prepareTopicList($domain, $topics);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SINGLE':\n\t\t\t\t$requestedId = isset($this->parameters['topic']) ? $this->parameters['topic'] : 0;\n\t\t\t\t$id = $requestedId;\n\t\t\t\tif ($this->settings['topics']) {\n\t\t\t\t\t// Static list of topics to show, take first one\n\t\t\t\t\t// if requested id is not authorized\n\t\t\t\t\t$ids = t3lib_div::trimExplode(',', $this->settings['topics']);\n\t\t\t\t\t$id = t3lib_div::inArray($ids, $requestedId) ? $requestedId : $ids[0];\n\t\t\t\t}\n\n\t\t\t\t$topic = $topicRepository->findById($id);\n\t\t\t\t$this->prepareTopicSingle($topic);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "e8ebb7c9c0e8b762af6fa11d94f57d93", "score": "0.56343275", "text": "function ocf_render_topic($topic,$has_topic_marking,$pt=false,$show_forum=NULL)\n{\n\tif ((array_key_exists('last_post_id',$topic)) && (!is_null($topic['last_post_id'])))\n\t{\n\t\t$last_post_url=build_url(array('page'=>'topicview','id'=>$topic['last_post_id'],'type'=>'findpost'),get_module_zone('topicview'));\n\t\t$last_post_url->attach('#post_'.strval($topic['last_post_id']));\n\t\tif (!is_null($topic['last_member_id']))\n\t\t{\n\t\t\tif ($topic['last_member_id']!=$GLOBALS['OCF_DRIVER']->get_guest_id())\n\t\t\t{\n\t\t\t\t//$colour=get_group_colour(ocf_get_member_primary_group($topic['last_member_id']));\n\t\t\t\t$poster=do_template('OCF_USER_MEMBER',array(\n\t\t\t\t\t/*'COLOUR'=>$colour,*/\n\t\t\t\t\t'USERNAME'=>$topic['last_username'],\n\t\t\t\t\t'PROFILE_URL'=>$GLOBALS['OCF_DRIVER']->member_profile_url($topic['last_member_id'],false,true)\n\t\t\t\t));\n\t\t\t} else $poster=protect_from_escaping(escape_html(($topic['last_username']=='')?do_lang('SYSTEM'):$topic['last_username']));\n\t\t} else\n\t\t{\n\t\t\t$poster=do_lang_tempcode('NA');\n\t\t}\n\t\t$last_post=do_template('OCF_FORUM_TOPIC_ROW_LAST_POST',array('_GUID'=>'6aa8d0f4024ae12bf94b68b74faae7cf','ID'=>strval($topic['id']),'DATE_RAW'=>strval($topic['last_time']),'DATE'=>$topic['last_time_string'],'POSTER'=>$poster,'LAST_URL'=>$last_post_url));\n\t} else $last_post=do_lang_tempcode('NA_EM');\n\t$map=array('page'=>'topicview','id'=>$topic['id']);\n\tif ((array_key_exists('forum_id',$topic)) && (is_null(get_bot_type())) && (get_param_integer('start',0)!=0)) $map['kfs'.strval($topic['forum_id'])]=get_param_integer('start',0);\n\t$url=build_url($map,get_module_zone('topicview'));\n\n\t// Modifiers\n\t$topic_row_links=new ocp_tempcode();\n\t$modifiers=$topic['modifiers'];\n\tif (in_array('unread',$modifiers))\n\t{\n\t\t$first_unread_url=build_url(array('page'=>'topicview','id'=>$topic['id'],'type'=>'first_unread'),get_module_zone('topicview'));\n\t\t$first_unread_url->attach('#first_unread');\n\t\t$topic_row_links->attach(do_template('OCF_TOPIC_ROW_LINK',array('_GUID'=>'6f52881ed999f4c543c9d8573b37fa48','URL'=>$first_unread_url,'IMG'=>'unread','ALT'=>do_lang_tempcode('JUMP_TO_FIRST_UNREAD'))));\n\t}\n\t$topic_row_modifiers=new ocp_tempcode();\n\tforeach ($modifiers as $modifier)\n\t{\n\t\tif ($modifier!='unread')\n\t\t{\n\t\t\t$topic_row_modifiers->attach(do_template('OCF_TOPIC_ROW_MODIFIER',array('_GUID'=>'fbcb8791b571187fd699aa6796c3f401','IMG'=>$modifier,'ALT'=>do_lang_tempcode('MODIFIER_'.$modifier))));\n\t\t}\n\t}\n\n\t// Emoticon\n\tif ($topic['emoticon']!='') $emoticon=do_template('OCF_TOPIC_EMOTICON',array('_GUID'=>'dfbe0e4a11b3caa4d2da298ff23ca221','EMOTICON'=>$topic['emoticon']));\n\telse $emoticon=do_template('OCF_TOPIC_EMOTICON_NONE');\n\n\tif ($topic['first_member_id']!=$GLOBALS['OCF_DRIVER']->get_guest_id())\n\t{\n\t\t$poster_profile_url=$GLOBALS['OCF_DRIVER']->member_profile_url($topic['first_member_id'],false,true);\n\t\t//$colour=get_group_colour(ocf_get_member_primary_group($topic['first_member_id']));\n\t\t$poster=do_template('OCF_USER_MEMBER',array(\n\t\t\t\t\t\t\t\t\t\t/*'COLOUR'=>$colour,*/\n\t\t\t\t\t\t\t\t\t\t'PROFILE_URL'=>$poster_profile_url,\n\t\t\t\t\t\t\t\t\t\t'USERNAME'=>$topic['first_username']\n\t\t\t\t\t\t\t\t\t));\n\t} else\n\t{\n\t\t$poster=make_string_tempcode(escape_html($topic['first_username']));\n\t}\n\tif ($pt)\n\t{\n\t\t$with=($topic['pt_from']==$topic['first_member_id'])?$topic['pt_to']:$topic['pt_from'];\n\t\t$with_username=$GLOBALS['OCF_DRIVER']->get_username($with);\n\t\tif (is_null($with_username)) $with_username=do_lang('UNKNOWN');\n\t\t$colour=get_group_colour(ocf_get_member_primary_group($with));\n\t\t$b=do_template('OCF_USER_MEMBER',array(\n\t\t\t\t\t\t\t\t\t\t'COLOUR'=>$colour,\n\t\t\t\t\t\t\t\t\t\t'PROFILE_URL'=>$GLOBALS['OCF_DRIVER']->member_profile_url($with,false,true),\n\t\t\t\t\t\t\t\t\t\t'USERNAME'=>$with_username\n\t\t\t\t\t\t\t\t\t));\n\t\t$poster=do_template('OCF_PT_BETWEEN',array('_GUID'=>'619cd7076c4baf7b26cb3149694af929','A'=>$poster,'B'=>$b));\n\t}\n\n\t// Marker\n\t$marker=new ocp_tempcode();\n\tif ($has_topic_marking)\n\t{\n\t\t$marker=do_template('OCF_TOPIC_MARKER',array('_GUID'=>'62ff977640d3d4270cf333edab42a18f','ID'=>strval($topic['id'])));\n\t}\n\n\t// Title\n\t$title=$topic['first_title'];\n\n\t// Page jump\n\t$max=intval(get_option('forum_posts_per_page'));\n\trequire_code('templates_result_launcher');\n\t$pages=results_launcher(do_lang_tempcode('NAMED_TOPIC',escape_html($title)),'topicview',$topic['id'],$max,$topic['num_posts'],'view',5);\n\n\t// Tpl\n\t$post=$topic['first_post'];\n\tif (!is_null($show_forum))\n\t{\n\t\t$hover=do_lang_tempcode('FORUM_AND_TIME_HOVER',escape_html($show_forum),escape_html(get_timezoned_date($topic['first_time'])));\n\t\t$breadcrumbs=ocf_forum_breadcrumbs($topic['forum_id'],NULL,NULL,false);\n\t} else\n\t{\n\t\t$hover=protect_from_escaping(is_null($topic['first_time'])?'':escape_html(get_timezoned_date($topic['first_time'])));\n\t\t$breadcrumbs=new ocp_tempcode();\n\t}\n\n\treturn do_template('OCF_FORUM_TOPIC_ROW',array('_GUID'=>'1aca672272132f390c9ec23eebe0d171','BREADCRUMBS'=>$breadcrumbs,'RAW_TIME'=>is_null($topic['first_time'])?'':strval($topic['first_time']),'UNREAD'=>in_array('unread',$modifiers),'ID'=>strval($topic['id']),'HOVER'=>$hover,'PAGES'=>$pages,'MARKER'=>$marker,'TOPIC_ROW_LINKS'=>$topic_row_links,'TOPIC_ROW_MODIFIERS'=>$topic_row_modifiers,'POST'=>$post,'EMOTICON'=>$emoticon,'DESCRIPTION'=>$topic['description'],'URL'=>$url,'TITLE'=>$title,'POSTER'=>$poster,'NUM_POSTS'=>integer_format($topic['num_posts']),'NUM_VIEWS'=>integer_format($topic['num_views']),'LAST_POST'=>$last_post));\n}", "title": "" }, { "docid": "8054224c1556e3cd02ad8187613c80b6", "score": "0.55549103", "text": "function plt_admin_menu() {\n\n\tadd_options_page('phpBB List Topics', 'phpBB List Topics', 1, 'phpbblisttopics', 'plt_admin_page');\n\n}", "title": "" }, { "docid": "da92828dab6b037fd42dd25410369333", "score": "0.5512969", "text": "public function listTopic()\n {\n return view('Topic::list');\n }", "title": "" }, { "docid": "13d09b4910d2f4d5849dff5202b489ca", "score": "0.5414035", "text": "function sink_topics() // Type\n\t{\n\t\trequire_code('ocf_topics_action');\n\t\trequire_code('ocf_topics_action2');\n\n\t\t$topics=$this->get_markers();\n\t\tif (count($topics)==0) warn_exit(do_lang_tempcode('NO_MARKERS_SELECTED'));\n\n\t\t$forum_id=NULL;\n\t\tforeach ($topics as $i=>$topic_id)\n\t\t{\n\t\t\t$id=$GLOBALS['FORUM_DB']->query_value('f_topics','id',array('id'=>$topic_id));\n\t\t\tif ($id===NULL) continue;\n\n\t\t\tif ($forum_id===NULL)\n\t\t\t{\n\t\t\t\t$forum_id=$GLOBALS['FORUM_DB']->query_value('f_topics','t_forum_id',array('id'=>$topic_id));\n\t\t\t}\n\t\t\tocf_edit_topic($topic_id,NULL,NULL,NULL,NULL,1,NULL,NULL,'');\n\t\t}\n\n\t\treturn $this->redirect_to_forum('SINK_TOPIC',$forum_id);\n\t}", "title": "" }, { "docid": "a791895636bc913d78ce77f5f4a262ea", "score": "0.5395896", "text": "protected function start_section_list() {\n return html_writer::start_tag('ul', array('class' => 'topics'));\n }", "title": "" }, { "docid": "e1913a0cc2e1ae43364b01c8a50fe175", "score": "0.5288282", "text": "public function __construct() {\n parent::__construct( 'topics', 'Topics', 'Discourse topics widget' );\n }", "title": "" }, { "docid": "2751b1d0f95fc5d7ddb1d950a02cef2a", "score": "0.52656925", "text": "function Topics()\n\t{\n\t\tparent::Model();\n\t}", "title": "" }, { "docid": "067f349cc6350c7aa719649b5cc7d518", "score": "0.52507275", "text": "public function setTopic($val)\n {\n $this->_propDict[\"topic\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0a75fe4d3791a8c531dafd4d86eda95e", "score": "0.52381694", "text": "function topic_drush_help_alter($command) {\n $implemented = drush_get_commands();\n foreach ($command['topics'] as $topic_name) {\n // We have a related topic. Inject into the $command so the topic displays.\n $command['sections']['topic_section'] = 'Topics';\n $command['topic_section'][$topic_name] = $implemented[$topic_name]['description'];\n }\n}", "title": "" }, { "docid": "2319aafaa899010afaa4d50fb250bfec", "score": "0.5225699", "text": "function show_topics_list($topics,$tableid,$cm, $selectedtopics){\n\t\n\t\tif(!$topics){\n\t\t\treturn $this->output->heading(get_string('notopics',constants::M_COMPONENT), 3, 'main');\n\t\t}\n\n\t\t//prepare AMD\n $opts=array('activityid'=>$cm->instance);\n $this->page->requires->js_call_amd(\"mod_pchat/updateselectedtopic\", 'init', array($opts));\n\n //prepare table with data\n\t\t$table = new \\html_table();\n\t\t$table->id = $tableid;\n\t\t$table->attributes =array('class'=>constants::M_CLASS_TOPICSCONTAINER);\n\n\n\t\t$table->head = array(\n get_string('topicselected', constants::M_COMPONENT),\n\t\t\tget_string('topicname', constants::M_COMPONENT),\n\t\t\tget_string('topiclevel', constants::M_COMPONENT),\n get_string('topicicon', constants::M_COMPONENT),\n get_string('topictargetwords', constants::M_COMPONENT),\n get_string('timemodified', constants::M_COMPONENT),\n\t\t\tget_string('actions', constants::M_COMPONENT),\n ''\n\t\t);\n\t\t$table->headspan = array(1,1,1,1,1,1,2);\n\t\t$table->colclasses = array(\n\t\t\t'selected','topicname', 'topiclevel', 'topicicon', 'topictargetwords','timemodified', 'edit','delete'\n\t\t);\n\n\n\t\t//loop through the topics and add to table\n $currenttopic=0;\n\t\tforeach ($topics as $topic) {\n $currenttopic++;\n $row = new \\html_table_row();\n\n //topic name\n $checked = $selectedtopics && array_key_exists($topic->id,$selectedtopics);\n $topicselectedcell = new \\html_table_cell(\\html_writer::checkbox('check_' . $topic->id,'checked',$checked,'',array('class'=>constants::M_CLASS_TOPICSCHECKBOX,'data-topicid'=>$topic->id)));\n\n //topic name\n $topicnamecell = new \\html_table_cell($topic->name);\n\n //topic level\n switch($topic->topiclevel) {\n case constants::M_TOPICLEVEL_CUSTOM:\n $topiclevel = get_string('topiclevelcustom',constants::M_COMPONENT);\n break;\n case constants::M_TOPICLEVEL_COURSE:\n default:\n $topiclevel = get_string('topiclevelcourse',constants::M_COMPONENT);\n break;\n }\n $topiclevelcell = new \\html_table_cell($topiclevel);\n\n //topic fonticon\n $fonticon = utils::fetch_fonticon($topic->fonticon);\n $topiciconcell = new \\html_table_cell($fonticon);\n\n //topic targetwords\n $tdata=array();\n $tdata['targetwords']=explode(PHP_EOL,$topic->targetwords);\n $targetwords = $this->output->render_from_template( constants::M_COMPONENT . '/targetwords', $tdata);\n $topictargetwordscell = new \\html_table_cell($targetwords);\n\n //modify date\n $datecell_content = date(\"Y-m-d H:i:s\",$topic->timemodified);\n $topicdatecell = new \\html_table_cell($datecell_content);\n\n //topic edit\n\n $actionurl = '/mod/pchat/topic/managetopics.php';\n $editurl = new \\moodle_url($actionurl, array('moduleid' => $topic->moduleid, 'id' => $topic->id));\n //if its not this module we will be going elsewhere...\n if($cm->instance==$topic->moduleid) {\n $editlink = \\html_writer::link($editurl, get_string('edittopic', constants::M_COMPONENT));\n }else{\n $editlink = \\html_writer::link($editurl, get_string('leaveedittopic', constants::M_COMPONENT));\n }\n $editcell = new \\html_table_cell($editlink);\n\n\t\t //topic delete\n if($cm->instance==$topic->moduleid) {\n $deleteurl = new \\moodle_url($actionurl,\n array('moduleid' => $cm->instance, 'id' => $topic->id, 'action' => 'confirmdelete'));\n $deletelink = \\html_writer::link($deleteurl, get_string('deletetopic', constants::M_COMPONENT));\n }else{\n $deletelink='';\n }\n\t\t\t$deletecell = new \\html_table_cell($deletelink);\n\n\t\t\t$row->cells = array(\n $topicselectedcell, $topicnamecell, $topiclevelcell,$topiciconcell, $topictargetwordscell,$topicdatecell, $editcell, $deletecell\n\t\t\t);\n\t\t\t$table->data[] = $row;\n\t\t}\n\t\treturn \\html_writer::table($table);\n\n\t}", "title": "" }, { "docid": "c6bd97243a16c35d8a0e629d0c167caf", "score": "0.5205868", "text": "public function showTopic()\n {\n $topics = Topic::paginate(10);\n return view('manageTopic', compact('topics'));\n }", "title": "" }, { "docid": "e26d215383b0b866c201a9f0413c0085", "score": "0.5202944", "text": "function toggle_notifications_topic() // Type\n\t{\n\t\trequire_code('notifications2');\n\t\treturn notifications_ui_advanced('ocf_topic',do_lang_tempcode('NOW_ENABLED_NOTIFICATIONS_TOPIC'),do_lang_tempcode('NOW_DISABLED_NOTIFICATIONS_TOPIC'));\n\t}", "title": "" }, { "docid": "d8224b2ebfbb3803670f56f3f52135f7", "score": "0.5196662", "text": "public abstract static function topics();", "title": "" }, { "docid": "f95fc37e2c5d3e4a0a8fac22220f22bd", "score": "0.51452345", "text": "function formatTopic($topic) {\n\t$topicName = $topic[\"topicName\"];\n\t$toplevel = $topic[\"topicLevel\"];\n\tif ($toplevel == 1) {\n\t\t$toplevel = \"true\";\n\t} else {\n\t\t$toplevel = \"false\";\n\t}\n\treturn (\"\t <topic toplevel=\\\"$toplevel\\\">$topicName</topic>\\n\");\n}", "title": "" }, { "docid": "92692fd2763a8faed1e699fc3be85276", "score": "0.51273304", "text": "function meta_box_topics_callback() {\n\t?>\n\t<div id=\"sfwd-topics-app\"></div>\n\t<?php\n}", "title": "" }, { "docid": "874f2c7c7a592910334f9541e9bfad87", "score": "0.51250774", "text": "public function setTopic($topic)\n {\n $this->topic = $topic;\n }", "title": "" }, { "docid": "f3dc6381e5668184dc1cc514c1e4cd6f", "score": "0.50799316", "text": "public static function api_topic_templet(&$topic=array()){\n $str = <<<EOF\n <div class=\"ui header\">\n <a class=\"ui small avatar image\"><img src=\"{$topic['user']['home_url']}\" alt=\"{$topic['user']['nickname']}\"></a>\n <div class=\"content\">\n {$topic['title']}\n <div class=\"sub header attribute\">\n <span class=\"category\"><a href=\"{app_url_topic}/c{$topic['category']['_id']}\" class=\"ui magenta link\">{$topic['category']['title']}</a></span>&nbsp;|\n <span>{$topic['user']['nickname']} 发表于 {$topic['created_on_format']}</span>&nbsp;|\n <span>浏览数: {$topic['view_count']}</span>\n </div>\n </div>\n </div>\n <div class=\"course\">\n <div class=\"cont\">\n {$topic['description']}\n </div>\t\t\t\t\t\n </div>\nEOF;\n return self::api_templet($str);\n }", "title": "" }, { "docid": "0ea7d6405cfbfbb05d7c7741ba098596", "score": "0.5076135", "text": "function sink_topic() // Type\n\t{\n\t\t$topic_id=get_param_integer('id');\n\t\trequire_code('ocf_topics_action');\n\t\trequire_code('ocf_topics_action2');\n\t\tocf_edit_topic($topic_id,NULL,NULL,NULL,NULL,NULL,1,NULL,'');\n\t\treturn $this->redirect_to('SINK_TOPIC',$topic_id);\n\t}", "title": "" }, { "docid": "fb45c71fb8ff54bdcc1b29d1572a984a", "score": "0.506469", "text": "public function show(Topic $topic)\n {\n //\n }", "title": "" }, { "docid": "bd4fbff95e588b8a282e5d23a0ddddf6", "score": "0.5041926", "text": "public function display_extra_topic_fields() {\n\t\t$topic_id = bbp_get_topic_id();\n\n\t\tif ( Plugin::REVIEWS_FORUM_ID != bbp_get_topic_forum_id( $topic_id ) ) {\n\t\t\t$site_url = get_post_meta( $topic_id, self::SITE_URL_META, true );\n\n\t\t\tif ( $site_url ) {\n\t\t\t\t// Display site URL for logged-in users only.\n\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\tprintf( '<p class=\"wporg-bbp-topic-site-url\">%1$s <a href=\"%2$s\" rel=\"nofollow ugc\">%2$s</a></p>',\n\t\t\t\t\t\t__( 'The page I need help with:', 'wporg-forums' ),\n\t\t\t\t\t\tesc_url( $site_url )\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tprintf( '<p class=\"wporg-bbp-topic-site-url\">%1$s <em>%2$s</em></p>',\n\t\t\t\t\t\t__( 'The page I need help with:', 'wporg-forums' ),\n\t\t\t\t\t\tsprintf( __( '[<a href=\"%s\">log in</a> to see the link]', 'wporg-forums' ), wp_login_url() )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "730c2900aedcffa5d174e30fd8f0fa55", "score": "0.50255793", "text": "public function index()\n {\n $topics = Topic::all();\n return view('Admin.Topic.index', compact('topics'));\n }", "title": "" }, { "docid": "89e5036d34a77428b2720431d7c28ac4", "score": "0.5014124", "text": "function topicDesc (object $topic)\n{\n echo(\"<td class=\\\"td_topic col-7\\\" scope='col'>\");\n //afficher le titre du topic\n echo(\"<h3>\");\n echo $topic->titre;\n // si le topic est accessible qu'au membres inscrits\n if ($topic->id_droits==1)\n {\n echo(\"<span class=\\\"spanlisttopic\\\"> (privé *) </span>\");\n } else if ($topic->id_droits==200)\n {\n echo(\"<span class=\\\"spanlisttopic\\\"> (admin *) </span>\");\n }\n echo(\"</h3>\");\n //lien vers les conversations liées au topic et description du topic\n echo('<a href=\"conversation.php?id='.$topic->id.'\">');\n echo $topic->description;\n echo('</a>');\n echo('</td>');\n}", "title": "" }, { "docid": "fe1c9a9334b3805329e8d9b2b2e17bb3", "score": "0.49984255", "text": "function ioch_admin_settings_section_callback() {\n\n echo '<p>' .\n esc_html__( 'Set here the basic settings for 10chat.' ) .\n '</p>';\n\n}", "title": "" }, { "docid": "10fb72bef6b8fee18ecfa81832a3555a", "score": "0.49892735", "text": "public function index()\n {\n $topics = \\App\\Topic::with('parent')->get();\n return view('admin/topic/index', compact('topics'));\n }", "title": "" }, { "docid": "9ebb3a6ca8703e3c5234cd075aa18886", "score": "0.49888736", "text": "function _display_for_topic() {\n\t\t// Stop here if RSS export is turned off\n\t\tif (empty(module('forum')->SETTINGS['RSS_EXPORT'])) {\n\t\t\treturn module('forum')->_show_error('RSS export is turned off!');\n\t\t}\n\t\t$topic_id = intval($_GET['id']);\n\t\t// Check if such topic exists\n\t\t$topic_info = db()->query_fetch('SELECT * FROM '.db('forum_topics').' WHERE id='.intval($topic_id).' '.(!FORUM_IS_ADMIN ? ' AND approved=1 ' : '').' LIMIT 1');\n\t\t// Check topic existance\n\t\tif (empty($topic_info['id'])) {\n\t\t\treturn module('forum')->_show_error('No such topic!');\n\t\t}\n\t\t// Get latest posts\n\t\t$Q = db()->query(\n\t\t\t'SELECT * FROM '.db('forum_posts').' \n\t\t\tWHERE topic='.intval($forum_id).' AND status=\"a\" \n\t\t\tORDER BY created DESC \n\t\t\tLIMIT '.intval(!empty(module('forum')->SETTINGS['RSS_LATEST_IN_TOPIC']) ? module('forum')->SETTINGS['RSS_LATEST_IN_TOPIC'] : 15));\n\t\twhile ($A = db()->fetch_assoc($Q)) {\n\t\t\t$data[] = array(\n\t\t\t\t'title'\t\t\t=> _prepare_html($A['subject'], 0),\n\t\t\t\t'link'\t\t\t=> process_url('./?object=forum&action=view_post&id='.$A['id']),\n\t\t\t\t'description'\t=> _prepare_html(module('forum')->_cut_bb_codes($A['text']), 0),\n\t\t\t\t'date'\t\t\t=> $A['created'],\n\t\t\t\t'author'\t\t=> _prepare_html($A['user_name'], 0),\n\t\t\t\t'source'\t\t=> '',\n\t\t\t);\n\t\t}\n\t\t// Fill array of feed params\n\t\t$params = array(\n\t\t\t'feed_file_name'\t=> 'feed_topic_'.$topic_info['id'],\n\t\t\t'feed_title'\t\t=> 'Latest posts inside topic: '._prepare_html($topic_info['name'], 0),\n\t\t\t'feed_desc'\t\t\t=> _prepare_html($topic_info['desc'], 0),\n\t\t\t'feed_url'\t\t\t=> process_url('./?object=forum&action=view_topic&id='.intval($topic_info['id'])),\n\t\t);\n\t\treturn common()->rss_page($data, $params);\n\t}", "title": "" }, { "docid": "479dcfd52b7ec040fcf6e2c215d48f19", "score": "0.49855328", "text": "protected function displayStage3_4()\n {\n // ZFDemoModel_Topics provides static methods that auto-instantiate and manage the model\n $this->view->topics = ZFDemoModel_Topics::getPresentationModel();\n $this->view->user = 'anonymous';\n // Controller = 'index', Action = 'index', param name = 'topic'\n $this->view->topicUrl = 'index/index/topic';\n $this->view->hide = false;\n /////////////////////////////\n // ==> SECTION: acl <==\n $role = ZFModule_Forum::getRole();\n // another form of access control (whether or not to show hidden posts)\n $this->view->hide = ($role === 'moderator' || $role === 'admin') ? false : true;\n }", "title": "" }, { "docid": "bed306735a246e8bcb7cae3882987725", "score": "0.49792373", "text": "function settings_section_default_cb() {\n\t\techo '<p>'. __( 'These settings let you choose the default behavior of the presentations'). '</p>';\n\t}", "title": "" }, { "docid": "a9afdcff4f4ea083151fd50fea8c814a", "score": "0.49631816", "text": "function s2web_case_publishing_display_documents_list_pane_admin_info($subtype, $conf, $contexts) {\n if (!empty($conf)) {\n $block = new stdClass();\n $block->title = $conf['override_title'] ? $conf['override_title_text'] : '';\n $block->content = t('Fields: %fields', array('%fields' => implode(', ', $conf['fields'])));\n return $block;\n }\n}", "title": "" }, { "docid": "64ee966c8b280d5b8d7cd49672974e97", "score": "0.49455032", "text": "public function setTopic($optional = [])\n {\n return $this->apiCall('post', '/channels.setTopic', ['json' => array_merge([\n ], $optional)]);\n }", "title": "" }, { "docid": "277c88333fc247214f2f90e00a9a3105", "score": "0.4944093", "text": "public function bbpress_add_new_topic_link() {\n\t\tif ( bbp_current_user_can_access_create_topic_form() ) :\n\t\t\t?>\n\t\t\t&emsp;<a href=\"#new-post\">Start a new topic</a>\n\t\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "244790ecb378679d1f14f0927b86594c", "score": "0.4933062", "text": "public function run()\n {\n $category = Topic::find()->where(['store_id' => Yii::$app->storeSystem->getId()])->andWhere(['>', 'category', 0])->orderBy(['category' => SORT_ASC, 'tag_id' => SORT_ASC, 'created_at' => SORT_DESC])->all();\n $excellent = Topic::find()->where(['store_id' => Yii::$app->storeSystem->getId()])->andWhere(['grade' => Topic::GRADE_EXCELLENT])->orderBy(['sort' => SORT_ASC, 'created_at' => SORT_DESC])->limit(8)->all();\n return $this->render(Inflector::camel2id(StringHelper::basename(get_class($this))), [\n 'type' => $this->type,\n 'nodeId' => $this->nodeId,\n 'category' => $category,\n 'excellent' => $excellent,\n ]);\n }", "title": "" }, { "docid": "fcd938e33a13f87ddc45fca21254d980", "score": "0.49264795", "text": "public function display()\n\t{\n\t\t$this->print_settings();\n\t}", "title": "" }, { "docid": "c802f7f614990630a58242119016a924", "score": "0.49240828", "text": "function ch3sapi_main_setting_section_callback() { ?>\n\t<p>This is the main configuration section.</p>\n<?php }", "title": "" }, { "docid": "fd77d653d31a047973033340e0126772", "score": "0.4920157", "text": "public function indexAction() {\n\n //DONT RENDER IF SUBJECT IS NOT SET\n if (!Engine_Api::_()->core()->hasSubject('sitecrowdfunding_topic')) {\n return $this->setNoRender();\n }\n\n //GET PROJECT SUBJECT\n $this->view->project = $project = Engine_Api::_()->core()->getSubject('sitecrowdfunding_topic')->getParent();\n $order = $this->_getParam('postorder', 0);\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET VIEWER\n $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n //SEND TAB ID TO THE TPL\n $this->view->tab_selected_id = Zend_Controller_Front::getInstance()->getRequest()->getParam('content_id');\n //GET TOPIC SUBJECT\n $this->view->topic = $topic = Engine_Api::_()->core()->getSubject();\n $this->view->canEdit = $topic->canEdit();\n //GET PROJECT OBJECT\n $this->view->project = $project = Engine_Api::_()->getItem('sitecrowdfunding_project', $topic->project_id);\n $sitecrowdfundingDiscussionContent = Zend_Registry::isRegistered('sitecrowdfundingDiscussionContent') ? Zend_Registry::get('sitecrowdfundingDiscussionContent') : null;\n //WHO CAN POST TOPIC\n $this->view->canPost = $canPost = $project->authorization()->isAllowed($viewer, \"topic\");\n\n //INCREASE THE VIEW COUNT\n if (!$viewer || !$viewer_id || $viewer_id != $topic->user_id) {\n $topic->view_count = new Zend_Db_Expr('view_count + 1');\n $topic->save();\n }\n\n //CHECK WATHCHING\n $isWatching = null;\n if ($viewer->getIdentity()) {\n $topicWatchesTable = Engine_Api::_()->getDbtable('topicWatches', 'sitecrowdfunding');\n $isWatching = $topicWatchesTable->isWatching($project->getIdentity(), $topic->getIdentity(), $viewer_id);\n if (false == $isWatching) {\n $isWatching = null;\n } else {\n $isWatching = (bool) $isWatching;\n }\n }\n if (empty($sitecrowdfundingDiscussionContent))\n return $this->setNoRender();\n $this->view->isWatching = $isWatching;\n\n //GET POST ID\n $this->view->post_id = $post_id = (int) $this->_getParam('post');\n\n $table = Engine_Api::_()->getDbtable('posts', 'sitecrowdfunding');\n $select = $table->select()\n ->where('project_id = ?', $project->getIdentity())\n ->where('topic_id = ?', $topic->getIdentity());\n\n if ($order == 1) {\n $select->order('creation_date DESC');\n } else {\n $select->order('creation_date ASC');\n }\n\n $this->view->paginator = $paginator = Zend_Paginator::factory($select);\n $paginator->setItemCountPerPage(10);\n $paginator->setCurrentPageNumber(Zend_Controller_Front::getInstance()->getRequest()->getParam('page'));\n if ($canPost && !$topic->closed) {\n $this->view->form = $form = new Sitecrowdfunding_Form_Post_Create();\n $form->populate(array(\n 'topic_id' => $topic->getIdentity(),\n 'ref' => $topic->getHref(),\n 'watch' => ( false == $isWatching ? '0' : '1' ),\n ));\n }\n }", "title": "" }, { "docid": "0fbf236036940baa0ad5a9dd03bebdea", "score": "0.49178314", "text": "function admin_section_config_text() {\n $isLanding = $this->isLanding();\n echo \"<p>\";\n if (is_multisite()):\n _e('Multisite set.', self::TEXT_DOMAIN);\n else:\n _e('Multisite not set.', self::TEXT_DOMAIN);\n echo '<br/>';\n _e('This plugin needs a network set in order to work.', self::TEXT_DOMAIN);\n endif;\n echo \"</p>\";\n if ($isLanding):\n echo \"<p>\" . _e('This is a landing site', self::TEXT_DOMAIN) . \"</p>\";\n else:\n echo \"<p>\" . _e('This is not a landing site.', self::TEXT_DOMAIN) . \"</p>\";\n endif;\n $lang = $this->getDefaultLanguage();\n echo \"<p>\" . _e('Your browser default language: ', self::TEXT_DOMAIN) . $lang . \"</p>\";\n $destination = $this->destination();\n echo \"<p>\" . _e('You would be redirected to: ', self::TEXT_DOMAIN) . $destination . \".</p>\";\n }", "title": "" }, { "docid": "f98b936311d3c018ffc58d96ac5f1b60", "score": "0.49125794", "text": "public function display($type = null){\n\t\t$modID = parent::getModuleID();\n $pageSettings = parent::getAppConfig();\n\t\t$arrSettings = parent::getModuleParams();\n\t\tforeach($arrSettings as $row){\n\t\t\t$key = $row['settingName'];\n\t\t\t$$key = $row['settingVal'];\n\t\t}\n //Parse RSS feed and display\n\t\tif(!function_exists('fetch_rss')){\n \tinclude($_SERVER['DOCUMENT_ROOT'] . \"/modules/support_files/magpie_rss/rss_fetch.inc\");\n\t\t}\n\t\tdefine('MAGPIE_INPUT_ENCODING', 'UTF-8');\n\t\tdefine('MAGPIE_OUTPUT_ENCODING', 'UTF-8');\n if($feedUrl != \"\"){\n \t$out = \"\";\n \t$rss = fetch_rss($feedUrl);\n $count = 0;\n\t\t\tforeach ($rss->items as $item) {\n \t$count++;\n\t\t\t\t$href = $item['link'];\n\t\t\t\t$title = preg_replace('/^([a-zA-Z0-9]+:)/','',$item['title']); //Strip the users name from the tweet\n\t\t\t\t$title = preg_replace('/(@\\S*:)/','<span class=\"repliedto\">$1</span>',$title); //Strip the users name from the tweet\n preg_match('(http://[a-zA-Z0-9./]+)',$title,$matches);\n $ftitle = preg_replace('(http://[a-zA-Z0-9./]+)','',$title);\n $link = $matches[0];\n\t\t\t\t$out .= \"<p>$ftitle <a href='$link' target='_blank'>$link</a></p>\";\n if($count >= $feedCount){\n \tbreak;\n }\n\t\t\t}\n\t\t}else{\n \t$out = \"No feed configured!\";\n }\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "d6068ab509fa640541fdbdbbdc0240b1", "score": "0.49103716", "text": "public function index()\n {\n $topics = Topic::simplePaginate(100);\n $topic_count = Topic::count();\n\n $page = Input::get('page');\n if(!isset($page)) $page = 1;\n\n return view('topic')\n ->with('topics',$topics)\n ->with('topic_count',$topic_count)\n ->with('page',$page)\n ->with('active','topic')\n ;\n }", "title": "" }, { "docid": "d9aba908a93ce012557f778a3d624ad0", "score": "0.4909363", "text": "public function index()\n {\n //\n $entities=\\App\\Topic::all();\n\n $data=['entities'=>$entities];\n\n return view('admin/topics/index')->with($data);\n }", "title": "" }, { "docid": "ed07d49a9f2699f371cb61f24dff7e9f", "score": "0.49047837", "text": "public function actionDisplay() {\n $model = Article::getInstance();\n $params[\"items\"] = $model->getTinTuc();\n \n $page_title = \"wapsite - trang tin tức tổng hợp nhanh nhất\";\n \n setSysConfig(\"seopage.title\",$page_title); \n setSysConfig(\"seopage.keyword\",$page_title); \n setSysConfig(\"seopage.description\",$page_title);\n \n $this->render('default', $params);\n }", "title": "" }, { "docid": "b917ed10714d0e7299035e57ef4ead5b", "score": "0.4903904", "text": "public function display_news_and_reviews_display_section_options() {\n\t\t// var_dump($this->news_and_reviews_display_type);\n\t\tprint '<p>Assing what to display in News and Reviews on homepage</p>';\n\t}", "title": "" }, { "docid": "7436707e5a6330f157eeac117c19400c", "score": "0.49034977", "text": "public function setPreview() {\n\t\techo \"Setting preview\" . BRNL;\n\t\t// gets id sequenced by section topic priority\n\t\t$storylist = $this->article->getArticleIds('next');\n\t\t// remove old issue 1 tags\n\t\t$sql = \"UPDATE articles set issue = 0 where issue = 1\";\n\t\t$this->pdo->query($sql);\n\n\t\t$sql = \"UPDATE articles SET issue = '1' where id = ? \";\n\t\t$pubin = $this->pdo->prepare($sql);\n\t\tforeach ($storylist as $story) {\n\t\t\t//echo \"sertting $story to issue 1\" . BRNL;\n\t\t\t$pubin->execute([$story]);\n\t\t}\n\n\t}", "title": "" }, { "docid": "b45a3768312e8a3845c41458db7dc8dc", "score": "0.48941106", "text": "public function setTopic($topic)\n {\n $this->connection->send('TOPIC', $this->name, $topic);\n }", "title": "" }, { "docid": "3b0d61bad27ddd7ceb8090bf92cd9873", "score": "0.4882217", "text": "public function setTopic($Topic)\n {\n $this->__set(\"topic\", $Topic);\n }", "title": "" }, { "docid": "29205ae58a2e09707c399fdd182d5723", "score": "0.48710394", "text": "public function index()\n {\n $title = 'Topics';\n $topics = Auth::user()->topics;\n return view('topic.index', compact('title','topics'));\n }", "title": "" }, { "docid": "5fd1ea8e9fdb2a8aa466592a23f14e08", "score": "0.48636222", "text": "function admin_section_mode_text() {\n global $blog_id;\n echo '<ul>';\n echo '<li><strong>' . __(\"Landing site\", self::TEXT_DOMAIN) . '</strong>: ' . __(\"Site redirects based on browser language.\", self::TEXT_DOMAIN) . '</li>';\n echo '<li><strong>' . __(\"Language site\", self::TEXT_DOMAIN) . '</strong>: ' . __(\"Site shows specific language\", self::TEXT_DOMAIN) . '</li>';\n echo '</ul>';\n $blog_info = get_blog_details($blog_id);\n if ($blog_info->public == 0):\n echo '<p style=\"color:red;font-weight:bolder;font-size:1.5em;\">' . __(\"This site is not set to public. It would not be considered\", self::TEXT_DOMAIN) . '</p>';\n endif;\n }", "title": "" }, { "docid": "7dac806669ab56e3a85b8ceeb1de6719", "score": "0.48604757", "text": "public function __construct(){\n\t\t$this->content = array('1' =>'Introduction','2' =>'GetStarted', '3' => 'Syllabus', '4' => 'Programming Languages', '5' => \"Modern Technologies\");\n\t\tforeach ($this->content as $key => $value) {\n\t\t\t$this->result[] = ['sno' => $key , 'Data' => $value];\n\t\t}\n\t\t$this->data = array(\"Topics\"=> $this->result);\n\t}", "title": "" }, { "docid": "e12b3c6eacdd233d437cba0cc0da4f44", "score": "0.48529664", "text": "function tealium_default_content_type_render($subtype, $conf, $args, $context) {\n $block = new stdClass();\n $default_data_points = _tealium_get_default_data_points_from_context();\n\n if (!empty($conf)) {\n foreach ($conf as $key => $value) {\n $value = ctools_context_keyword_substitute($value, array(), $context);\n if (!empty($value) && in_array($key, $default_data_points)) {\n // Time to send the valug to Tealium.\n tealium_tag_notify($key, $value);\n }\n }\n\n return $block;\n }\n}", "title": "" }, { "docid": "307fd2b256f816e733b10c563b31beca", "score": "0.48462325", "text": "public function makeQuestionText() {\n\t\t$this->text = \"Which of the following \".strtolower($this->category->prettyName).\" does \".$this->topicSubject->name.\" like?\";\n\t}", "title": "" }, { "docid": "01c8d8934c3effa635e4df74a021418d", "score": "0.48425692", "text": "public function index()\n {\n $this->tplVars = $this->tplVars + [\n 'page_title' => $this->pageTitle\n ];\n\n //liste des données\n $this->tplVars = $this->tplVars + [\n 'list' => $this->model->findAllQuestionsWithTopicName()\n ];\n\n //afficher la liste \n \\Renderer::showAdmin(strtolower($this->nameCrud) . \"/list\", $this->tplVars);\n }", "title": "" }, { "docid": "b8ed2040a4ec76182c85b25e337ae317", "score": "0.48425126", "text": "function show_publishthis_messages() {\n\t\ttry {\n\t\t\t\n\t\t\tif (is_admin() && current_user_can('administrator') ) {\n\t \n\t\t\t\n\t\t\tif( intval( ini_get( 'output_buffering' ) ) == 0 ) {\n\t\t\t\techo '<div id=\"message\" class=\"error\">'.\n\t\t\t\t\t\t'<p><strong>Output Buffering is OFF.</strong>'.\n\t\t\t\t\t\t'<br>What does this mean? It means that some of the features of this plugin will not work. Please contact your PublishThis Client Services representative and they can help you with a solution to fix this.'.\n\t\t\t\t\t\t'</p></div>';\n\t\t\t} \n\t\t}\n\t\t}\n\t\tcatch ( Exception $ex ) {}\n\t}", "title": "" }, { "docid": "85174b99623b40b2598a892740d6664b", "score": "0.48197395", "text": "public function setTopic(?string $value): void {\n $this->getBackingStore()->set('topic', $value);\n }", "title": "" }, { "docid": "dd2e7c8962d832530c1f1aa794a909a5", "score": "0.4811967", "text": "public function general_content_type_settings_header() {\n print '<p>'. __('Here you can control the specific chart options for this content type.', 'raphael-charts') .'</p>';\n print '<p>'. __('All of these options can be overridden from the shortcode, these are just the defaults.', 'raphael-charts') .'</p>';\n }", "title": "" }, { "docid": "1d44aef7afc9826fde8170594e8629ab", "score": "0.4805376", "text": "function getTopicSting()\n {\n if ($this->getTopicIds()) {\n return implode(',', $this->getTopicIds());\n } else {\n return '';\n }\n }", "title": "" }, { "docid": "c50f28c950c5c600d405e9906f02dcbc", "score": "0.47970012", "text": "function set_stdout()\n\t{\n\t\t$this->option_stdout = true;\n\t}", "title": "" }, { "docid": "08217e2d302679caa725836b7b7809c7", "score": "0.47837365", "text": "public function index ()\n {\n $topics = Topic::orderBy('created_at', 'desc')->get();\n\n return view('forum.topics.index', [\n 'topics' => $topics,\n ]);\n }", "title": "" }, { "docid": "16e3e1843c7f20b093262de5bb5d2c0f", "score": "0.4783272", "text": "function settings_page () {\r\n\t\t?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<h2>Explanations for the Simp To Trad Chinese plugin</h2>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t<p>&nbsp;</p>\r\n\r\n\t\t\t<p><b>Once installed, this plugin allow to get a direct link in the post listing named \"Clone Simp to Trad\" that enable the clone and the conversation of a regular post into traditional Chinese.</b></p>\r\n\t\t\t<p>&nbsp;</p>\r\n\t\t\t<p><b>This is the first version of the plugin. It clearly deserves 3 functional enhancements. <i>These 3 enhancements might be made in a next version but may be not.</i></b></p>\r\n\t\t\t<p>&nbsp;</p>\r\n\t\t\t<ol>\r\n\t\t\t\t<li>A direct link available in each content element (article, page, tag result ... etc) via two ideograms: 繁 (trad) 簡 (simp).</li>\r\n\t\t\t\t<li>The ability for the admin to perform a preview with the help of an ajax request of any translation before publishing it.</li>\r\n\t\t\t\t<li>The ability to add translation strings directly into the translation file available in the library directory o this plugin.</li>\r\n\t\t\t</ol>\r\n\t\t</div>\t\t\r\n\t\r\n\t<?php\r\n\t}", "title": "" }, { "docid": "6292d6dd3f3573b457a4b346c77991a1", "score": "0.4781776", "text": "public function print_stuff() {\n $this->autoLayout = \"print\";\n }", "title": "" }, { "docid": "acfef462e836fc0fd026e76b4be647fa", "score": "0.47716603", "text": "public function topic_index(){\n if (!Auth::user()->hasAccess('forum.create')) {\n return redirect()->back()->withErrors(['You do not have permission to view this content']);\n }\n $topics = ChatterDiscussion::with('ChatterPost')->with('ChatterCategory')->orderBy('created_at', 'DESC')->paginate(20);\n $counter = 0;\n $categoryList = ChatterCategory::pluck('name', 'id');\n return view('forums/topic-index', compact('topics', 'counter', 'categoryList'));\n }", "title": "" }, { "docid": "0afec579b6ab5af74eb5c6b0543364ea", "score": "0.47675592", "text": "public function configure()\n\t{\n\t\t$this->setDescription($this->description);\n\t}", "title": "" }, { "docid": "afe1b50190e7fe5bf4021befadf62017", "score": "0.4761708", "text": "function &topic()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n return htmlspecialchars( $this->Topic );\n }", "title": "" }, { "docid": "2acb6d9c087dd55eb90cc3dd6272ab0a", "score": "0.4757327", "text": "public function specialization() {\n $title = isset($this->config->ranking_title) ? trim($this->config->ranking_title) : '';\n if (!empty($title)) {\n $this->title = format_string($this->config->ranking_title);\n }\n }", "title": "" }, { "docid": "c249b21e7b7d25ec94080d4d59a68088", "score": "0.47539473", "text": "function __construct() {\n\t\tparent::__construct();\n\t\t$this->template->title = 'Reply';\n\t}", "title": "" }, { "docid": "03bfcd6de2fdf3b3b028dd1191ab77ae", "score": "0.47539416", "text": "private function optInToNews()\n\t{\n\t\tee()->config->_update_config(['show_ee_news' => 'y']);\n\t}", "title": "" }, { "docid": "d9919645c47d5930a4c0247a787aced8", "score": "0.47525886", "text": "public function networkAdmin() {\n\t\tforeach ($this->theme->getBlogs() as $blog) {\n\t\t\tswitch_to_blog($blog['blog_id']);\n\t\t\tdelete_transient('RockharborThemeBase::aggregatePosts');\n\t\t}\n\t\t$out = $this->theme->render('admin'.DS.'network_options');\n\t\techo $out;\n\t}", "title": "" }, { "docid": "6fe8b7a8a6f2c02b82b9a5702123f0c3", "score": "0.47524497", "text": "function thoora_initView( $args )\n{\n\ttry {\n\t\textract($args);\n\t\t\n\t\t$url \t\t= ($args['params']['url'])?$args['params']['url']:THOORA_DEFAULT_TOPIC;\n\t\t$type \t\t= ($args['params']['infoType'])?strtolower($args['params']['infoType']):THOORA_DEFAULT_TYPE;\n\t\t$count \t\t= ($args['params']['maxResult'])?$args['params']['maxResult']:THOORA_DEFAULT_MAXRESULT;\n\t\t$count \t\t= (intval($count)>0)?$count:THOORA_DEFAULT_MAXRESULT;\n\t\t$apiKey \t= ($args['params']['apiKey'])?$args['params']['apiKey']:THOORA_DEFAULT_APIKEY;\n\t\t$linkThoora = (bool)$args['params']['allowThoora'];\n\t\t\n\t\t\n\t\t\n\t\tif ($url == \"\" || $type == \"\" || $apiKey == \"\") throw new Exception;\n\n\t\t$vid \t= thoora_getVid($url, $apiKey);\n\t\t$data \t= thoora_fetchContent($vid, $type, $count, $apiKey);\n\t\t$info \t= thoora_fetchInfo($vid, $apiKey);\n\t\n\t\tif (!$vid || !$info) throw new Exception;\n\t\t\n\t\t$topicName = strtoupper($info->topic_name);\n\t\t$userName = $info->screen_name;\n\t\t$followers = $info->followers_count;\n\t\t$topicImg = $info->topic_image_small;\n\t\t$typeIcon = $type;\n\t\n\t\tswitch ($type){\n\t\t\tcase \"news\":\n\t\t\t\t$data = $data->stories;\n\t\t\t\tbreak;\n\t\t\tcase \"favorites\":\n\t\t\t\t$data = $data->favorites;\n\t\t\t\tbreak;\n\t\t\tcase \"images\":\n\t\t\t\t$data = $data->images;\n\t\t\t\tbreak;\n\t\t\tcase \"feeds\":\n\t\t\t\t$data = $data->articles;\n\t\t\t\tbreak;\n\t\t\tcase \"tweets\":\n\t\t\t\t$data = $data->tweets;\n\t\t\t\tbreak;\n\t\t}\n\t\n\t\t?>\n\t\n\t\t<div id=\"thoora-wrapper\">\n\t\t\t<div class=\"thoora-header\">\n\t\t\t\t<div class=\"thoora-topicImg\"><img src=\"<?= $topicImg; ?>\" /></div>\n\t\t\t\t<div class=\"thoora-topicTitle\"><?= $topicName; ?></div>\n\t\t\t\t<div class=\"thoora-topicInfo\">By <?= $userName; ?> &nbsp;&nbsp;<?= $followers?> Follower<?= ($followers == 1)?\"\":\"s\"; ?></div>\n\t\t\t\t<? if ($linkThoora): ?>\n\t\t\t\t\t<div class=\"thoora-button\">\n\t\t\t\t\t\t<a href=\"<?= $url; ?>\" target=\"_blank\">\n\t\t\t\t\t\t\tFOLLOW\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t<? endif; ?>\n\t\t\t\t\n\t\t\t</div>\n\t\t\t<div class=\"thoora-backgroundWrapper\">\n\t\t\t\t<div class=\"thoora-up thoora-arrowRow thoora-arrowHide\">\n\t\t\t\t\t<div class=\"thoora-arrowContainer\">\n\t\t\t\t\t\t<img src=\"<?= thoora_image(\"widget_arrowup.png\")?>\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"thoora-scroll\">\n\t\t\t\t<? foreach ($data as $k => $v): ?>\n\t\t\t\t\t<? $typeIcon \t= thoora_checkIconType($v, $type); ?>\n\t\t\t\t\t<? $typeContent = thoora_checkContentType($v, $type); ?>\n\t\t\t\t\t<div class=\"th-custom-container <?= \"thoora$k\" ?>\">\n\t\t\t\t\t\t<div class=\"th-custom-containerContent\">\n\t\t\t\t\t\t\t<div class=\"th-custom-typeIcon\"><img src=\"<?= thoora_image(\"{$typeIcon}_ico.png\")?>\" /></div>\n\t\t\t\t\t\t\t\t<div class=\"th-custom-innerContent\">\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<?= thoora_htmlContainer($v, $typeContent); ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t<? endforeach;?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"thoora-down thoora-arrowRow thoora-arrowHide\">\n\t\t\t\t\t<div class=\"thoora-arrowContainer\">\n\t\t\t\t\t\t<img src=\"<?= thoora_image(\"widget_arrowdown.png\")?>\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"thoora-footer\">\n\t\t\t\t<? if ($linkThoora): ?>\n\t\t\t\t\t<a href=\"<?= $url; ?>\" target=\"_blank\">\n\t\t\t\t<? endif; ?>\n\t\t\t\t\t\t<img src=\"<?= thoora_image(\"footer.png\")?>\" />\n\t\t\t\t<? if ($linkThoora): ?>\n\t\t\t\t\t</a>\n\t\t\t\t<? endif; ?>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}\n\tcatch (Exception $e){\n\t\techo \"<a href='\".THOORA_WORDPRESS_URL.\"' target='_blank'>Thoora widget not properly configured</a>\";\n\t}\n}", "title": "" }, { "docid": "03e66a3eefa0c56b42d765400a9f9d23", "score": "0.4752399", "text": "public function show(){\n\t\techo $this->prettify($this->settings);\n\t}", "title": "" }, { "docid": "3d4ced4a81a7f72dde17058aaf409543", "score": "0.4750771", "text": "function apoc_topic_description( $args = '' ) {\n\n\t// Default arguments\n\t$defaults = array (\n\t\t'topic_id' => 0,\n\t\t'before' => '<p class=\"entry-byline\">',\n\t\t'after' => '</p>',\n\t\t'size'\t\t=> 50,\n\t\t'echo'\t\t=> true,\n\t);\n\t$args = wp_parse_args( $args, $defaults );\n\n\t// Validate topic_id\n\t$topic_id = bbp_get_topic_id( $args['topic_id'] );\n\n\t// Build the topic description\n\t$voice_count\t= bbp_get_topic_voice_count ( $topic_id );\n\t$reply_count\t= bbp_get_topic_reply_count ( $topic_id , true ) + 1;\n\t$time_since \t= bbp_get_topic_freshness_link ( $topic_id );\n\t$author\t\t\t= bbp_get_author_link( array( 'post_id' => $topic_id , 'size' => $args['size'] ) );\n\n\t// Singular/Plural\n\t$reply_count = sprintf( _n( '%d posts' , '%d posts', $reply_count ) \t, $reply_count );\n\t$voice_count = sprintf( _n( '%s member', '%s members', $voice_count\t) \t, $voice_count );\n\n\t// Topic has replies\n\t$last_reply = bbp_get_topic_last_active_id( $topic_id );\n\tif ( !empty( $last_reply ) ) :\n\t\t$last_updated_by = bbp_get_author_link( array( 'post_id' => $last_reply, 'type' => 'name' ) );\n\t\t$retstr = sprintf( 'This topic by%1$s contains %2$s by %3$s, and was last updated by %4$s, %5$s.', $author, $reply_count, $voice_count, $last_updated_by, $time_since );\n\n\t// Topic has no replies\n\telseif ( ! empty( $voice_count ) && ! empty( $reply_count ) ) :\n\t\t$retstr = sprintf( 'This topic contains %1$s by %2$s.', $reply_count, $voice_count );\n\n\t// Topic has no replies and no voices\n\telseif ( empty( $voice_count ) && empty( $reply_count ) ) :\n\t\t$retstr = sprintf( 'This topic has no replies yet.' );\n\tendif;\n\n\t// Combine the elements together\n\t$retstr = $args['before'] . $retstr . $args['after'];\n\n\t// Return filtered result\n\tif ( true == $args['echo'] )\n\t\techo $retstr;\n\telse\n\t\treturn $retstr;\n}", "title": "" }, { "docid": "fe2f25ab7a8256c5b91436611387ad85", "score": "0.4746679", "text": "function drush_topic_core_topic($topic_name = NULL) {\n $commands = drush_get_commands();\n if (is_null($topic_name)) {\n // Show choice list.\n foreach (drush_get_topics() as $key => $topic) {\n $choices[$key] = $topic['description'];\n }\n natcasesort($choices);\n if (!$topic_name = drush_choice($choices, dt('Choose a topic'), '!value (!key)', array(5))) {\n return;\n }\n }\n // If the topic name is not found, check for\n // \"docs-$topic_name\". This allows users to be\n // just a bit lazy when selecting core topics by name.\n if (!isset($commands[$topic_name]) && isset($commands[\"docs-$topic_name\"])) {\n $topic_name = \"docs-$topic_name\";\n }\n return drush_dispatch($commands[$topic_name]);\n}", "title": "" }, { "docid": "21dacf77f5b6a15080419db057dbb129", "score": "0.47431663", "text": "function show_section()\n \t{\n \t\t$id = isset($this->ipsclass->input['HID']) ? intval($this->ipsclass->input['HID']) : 0;\n \t\t\n \t\tif ( ! preg_match( \"/^(\\d+)$/\" , $id ) )\n \t\t{\n \t\t\t$this->show_titles();\n \t\t\treturn;\n \t\t}\n \t\t\n \t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, title, text',\n \t\t\t\t\t\t\t\t\t \t\t\t\t 'from' => 'faq',\n \t\t\t\t\t\t\t\t\t \t\t\t\t 'where' => 'ID='.$id\n \t\t\t\t\t\t\t \t\t\t\t) );\n \t\t$this->ipsclass->DB->simple_exec();\n \t\t\n \t\t$topic = $this->ipsclass->DB->fetch_row();\n \t\t\n\t\tif ( ! $topic['id'] )\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'MSG' => 'help_no_id' ) );\n\t\t}\n\t\t\n \t\t$this->output = $this->ipsclass->compiled_templates['skin_help']->start( $this->ipsclass->lang['help_topic'], $this->ipsclass->lang['topic_text'], $topic['title'] );\n \t\t$this->output .= $this->ipsclass->compiled_templates['skin_help']->display( $this->ipsclass->text_tidy( $topic['text'] ) );\n\n \t\t$this->output .= $this->ipsclass->compiled_templates['skin_help']->help_end();\n \t\t\n \t\t$this->page_title = $this->ipsclass->lang['help_topic'];\n \t\t$this->nav = array( \"<a href='{$this->base_url}&amp;act=Help'>{$this->ipsclass->lang['help_topics']}</a>\", $this->ipsclass->lang['help_topic'] );\n \t}", "title": "" }, { "docid": "f8a9ca289d5fd4247f9305ef30746029", "score": "0.4722346", "text": "public function index()\n {\n $topics = Topic::latest()->paginate(10);\n return view('topics.index',compact('topics'));\n }", "title": "" }, { "docid": "a84dcda451755048ded967abb2fe8ed7", "score": "0.4716087", "text": "function os2web_case_publishing_display_documents_list_pane_render($subtype, $conf, $args, $contexts) {\n if (!empty($contexts)) {\n $context = current($contexts);\n if (in_array('node', $context->type)) {\n $fields = $conf['fields'];\n\n // Finding nid of all referenced cases and documents.\n $nids = array();\n foreach ($fields as $field_key => $field_value) {\n if (!empty($field_value)) {\n $node = (array) $context->data;\n if (isset($node[$field_key]) && is_array(current($node[$field_key]))) {\n foreach (current($node[$field_key]) as $nid) {\n $nids[$nid['target_id']] = (int) $nid['target_id'];\n }\n }\n }\n }\n\n // Finding all files on the found nid's\n $files = array();\n $nodes = node_load_multiple($nids);\n foreach ($nodes as $node) {\n if (node_access('view', $node)) {\n\n // If the node is a case will we need to find all the documents\n // under the case.\n if ($node->type == 'os2web_case_publishing_case') {\n $documents = current($node->field_os2web_case_documents);\n if (is_array($documents)) {\n $dnids = array();\n foreach ($documents as $document) {\n $dnids[$document['target_id']] = (int) $document['target_id'];\n }\n $dnodes = node_load_multiple($dnids);\n\n // Extracting the files.\n foreach ($dnodes as $dnode) {\n if (node_access('view', $dnode)) {\n if (isset($dnode->field_os2web_case_document_file)) {\n $file = current($dnode->field_os2web_case_document_file);\n if (is_array($file)) {\n $file = current($file);\n $tmp = current($dnode->field_os2web_case_document_name);\n $file['description'] = $tmp[0]['safe_value'];\n $files[$file['fid']] = $file;\n }\n }\n }\n }\n }\n }\n else {\n if (isset($node->field_os2web_case_document_file)) {\n $file = current($node->field_os2web_case_document_file);\n if (is_array($file)) {\n $file = current($file);\n $tmp = current($node->field_os2web_case_document_name);\n $file['description'] = $tmp[0]['safe_value'];\n $files[$file['fid']] = $file;\n }\n }\n }\n }\n }\n\n // The returned content block.\n $block = new stdClass();\n $block->title = t('Documents');\n $variables = array(\n 'files' => $files,\n 'options' => array(\n 'target' => $conf['link_target'],\n ),\n );\n $block->content = theme('os2web_case_publishing_documents_list', $variables);\n return $block;\n }\n }\n\n return FALSE;\n}", "title": "" }, { "docid": "0a8865cd092db90f0e1c93618c9e3548", "score": "0.4715353", "text": "public function getTopic()\r\n {\r\n return $this->topic;\r\n }", "title": "" }, { "docid": "ded18c336ddb4d751ccd22fd7959f2b6", "score": "0.4714015", "text": "abstract protected function prepareTopicSingle(/* tx_egovapi_domain_model_topic */ $topic);", "title": "" }, { "docid": "03bdad633c3ee4a754b621fa31597587", "score": "0.47137496", "text": "public function display_setting($args = array())\n {\n\n extract($args);\n \n $options = array();\n if (!get_option('Template_theme_options'))\n\t\t{\n\t\t\tforeach ($this->settings as $j => $settings) {\n\t\t\t\t$options[] = $settings;\n\t\t\t\t}\n\t\t\t\t\n\t\t\tif (!isset($options[$id]) && $type != 'heading')\n $options[$id] = $std;\n elseif (!isset($options[$id]))\n $options[$id] = 0;\n\t\t} \n\t else\n\t\t{\n\t\t\t$options = get_option('Template_theme_options');\n\t\t\t\n\t\t\tif (!isset($options[$id]) && $type != 'checkbox')\n $options[$id] = $std;\n elseif (!isset($options[$id]))\n $options[$id] = 0;\n\t\t}\n\t\n $field_class = '';\n if ($class != '')\n $field_class = ' ' . $class;\n\n switch ($type) {\n\n case 'checkbox':\n echo '<div class=\"normal-toggle-button\">';\n echo '<input class=\"checkbox' . $field_class . '\"id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" value=\"0\" type=\"hidden\"/> ';\n echo '<input class=\"checkbox' . $field_class . '\" type=\"checkbox\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" value=\"1\" ' . checked($options[$id], 1, false) . ' /> ';\n echo '</div>';\n break;\n\n case 'select':\n echo '<select class=\"select' . $field_class . '\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\">';\n\n foreach ($choices as $value => $label)\n echo '<option value=\"' . esc_attr($label) . '\"' . selected($options[$id], $label, false) . '>' . $label . '</option>';\n\n echo '</select>';\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'radio':\n $i = 0;\n foreach ($choices as $value => $label) {\n echo '<input class=\"radio' . $field_class . '\" type=\"radio\" name=\"Template_theme_options[' . $id . ']\" id=\"' . $id . $i . '\" value=\"' . esc_attr($value) . '\" ' . checked($options[$id], $value, false) . '> <label for=\"' . $id . $i . '\">' . $label . '</label>';\n if ($i < count($options) - 1)\n echo '<br />';\n $i++;\n }\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'textarea':\n echo '<textarea class=\"' . $field_class . '\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" placeholder=\"' . $std . '\" rows=\"5\" cols=\"30\">';\n\n\t\t\t\tif(get_bloginfo('version') >= '4.3')\n\t\t\t\t{\n\t\t\t\t\techo format_for_editor($options[$id]);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '</textarea>';\n\t\t\t\t\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'password':\n echo '<input class=\"regular-text' . $field_class . '\" type=\"password\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" value=\"' . esc_attr($options[$id]) . '\" />';\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'shortcode':\n echo '<span id=\"' . $id . '\" ><b>' . $std . '</b></span>';\n\n if ($desc != '')\n // echo '<br /><br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'colorpicker':\n $value = esc_attr($options[$id]);\n \n echo '<input class=\"colorwell\" type=\"text\" id=\"' . $id . '\"name=\"Template_theme_options[' . $id . ']\" placeholder=\"' . $std . '\" value=\"' . $value . '\" />';\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'media':\n\n echo '<input class=\"upload' . $field_class . '\" type=\"text\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" placeholder=\"' . $std . '\" value=\"' . esc_attr($options[$id]) . '\" />';\n echo '&nbsp;<input type=\"button\" class=\"ttrbutton btn\" value=\"' . __('Upload', \"mytheme\") . '\"/>';\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'button':\n\n echo '<input class=\"button-secondary' . $field_class . '\" type=\"button\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" value=\"' . $std . '\" onclick=\"' . $onclick . '\"/> ';\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n case 'file':\n\n echo '<input name=\"Template_theme_options[' . $id . ']\" id=\"' . $id . '\" type=\"file\" />';\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n\n /*case 'sitemaplink':\n Template_create_sitemap();\n echo '<a class=\"' . $field_class . '\" href=\"../sitemap.xml\"> <input class=\"button-secondary' . $field_class . '\" type=\"button\" value=\"' . esc_attr($options[$id]) . '\"/></a>';\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break; */\n\n case 'text':\n default:\n if ($pattern != '') {\n echo '<input class=\"regular-text' . $field_class . '\" type=\"text\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" placeholder=\"' . $std . '\" value=\"' . esc_attr($options[$id]) . '\" pattern=\"' . $pattern . '\"/>';\n } else {\n echo '<input class=\"regular-text' . $field_class . '\" type=\"text\" id=\"' . $id . '\" name=\"Template_theme_options[' . $id . ']\" placeholder=\"' . $std . '\" value=\"' . esc_attr($options[$id]) . '\"/>';\n }\n\n if ($desc != '')\n echo '<br /><span class=\"description\">' . $desc . '</span>';\n\n break;\n }\n\n }", "title": "" }, { "docid": "755a864fcefbe8aea1ab95246be1ff40", "score": "0.4712299", "text": "public function config()\n\t{\n\t\tparent::config();\n\n\t\t$this->data->page['title'] = T_('Horray!');\n\t\t$this->data->page['special'] = true;\n\t\t$this->data->page['desc'] = T_('Live and learn');\n\n\n\t\t$this->data->redirect_url = $this->url('base');\n\t\tif(self::get_enter_session('redirect_url'))\n\t\t{\n\t\t\t$this->data->redirect_url = self::get_enter_session('redirect_url');\n\t\t}\n\t}", "title": "" }, { "docid": "227d04d54cbbf4b480c9ec5af784a1d1", "score": "0.47119516", "text": "protected function format_topics( $discourse_topics, $args ) {\n\n\t\tif ( empty( $discourse_topics['topic_list'] ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$topics = $discourse_topics['topic_list']['topics'];\n\n\t\t// If the first topic is pinned, don't display it.\n\t\tif ( ! empty( $topics[0]['pinned'] ) && 1 === intval( $topics[0]['pinned'] ) ) {\n\t\t\t$topics = array_slice( $topics, 1, $args['max_topics'] );\n\t\t} else {\n\t\t\t$topics = array_slice( $topics, 0, $args['max_topics'] );\n\t\t}\n\n\t\t$users = $discourse_topics['users'];\n\t\t$poster_avatar_url = '';\n\t\t$poster_username = '';\n\n\t\t$output = '<ul class=\"dclt-topiclist\">';\n\n\t\tforeach ( $topics as $topic ) {\n\t\t\t$topic_url = $this->options['url'] . \"/t/{$topic['slug']}/{$topic['id']}\";\n\t\t\t$created_at = date_create( get_date_from_gmt( $topic['created_at'] ) );\n\t\t\t$created_at_formatted = date_format( $created_at, 'F j, Y' );\n\t\t\t$last_activity = $topic['last_posted_at'];\n\t\t\t$category = $this->find_discourse_category( $topic );\n\t\t\t$posters = $topic['posters'];\n\t\t\tforeach ( $posters as $poster ) {\n\t\t\t\tif ( preg_match( '/Original Poster/', $poster['description'] ) ) {\n\t\t\t\t\t$original_poster_id = $poster['user_id'];\n\t\t\t\t\tforeach ( $users as $user ) {\n\t\t\t\t\t\tif ( $original_poster_id === $user['id'] ) {\n\t\t\t\t\t\t\t$poster_username = $user['username'];\n\t\t\t\t\t\t\t$avatar_template = str_replace( '{size}', 22, $user['avatar_template'] );\n\t\t\t\t\t\t\t$poster_avatar_url = $this->options['url'] . $avatar_template;\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$avatar_image = '<img class=\"dclt-latest-avatar\" src=\"' . esc_url( $poster_avatar_url ) . '\">';\n\t\t\t$output .= '<li class=\"dclt-topic\"><div class=\"dclt-topic-poster-meta\">';\n\t\t\tif ( 'true' === $args['display_avatars'] ) {\n\t\t\t\t$output .= apply_filters( 'dclt_shorcodes_avatar', $avatar_image, esc_url( $poster_avatar_url ) );\n\t\t\t}\n\t\t\t$output .= '<span class=\"dclt-username\">' . esc_html( $poster_username ) . '</span>' . '<span class=\"dclt-term\"> posted on </span>\n\t\t\t\t\t\t<span class=\"dclt-created-at\">' . $created_at_formatted . '</span><br>\n\t\t\t\t\t\t<span class=\"dclt-term\">in </span><span class=\"dclt-shortcode-category\" >' . $this->discourse_category_badge( $category ) . '</span></div>\n\t\t\t\t\t\t<p class=\"dclt-topic-title\"><a href=\"' . esc_url( $topic_url ) . '\">' . esc_html( $topic['title'] ) . '</a></p>\n\t\t\t\t\t\t<p class=\"dclt-topic-activity-meta\"><span class=\"dclt-term\">replies</span> <span class=\"dclt-num-replies\">' .\n\t\t\t esc_attr( ( $topic['posts_count'] ) - 1 ) .\n\t\t\t '</span> <span class=\"dclt-term\">last activity</span> <span class=\"dclt-last-activity\">' .\n\t\t\t // Unless webhooks are setup, the last activity will only be as acurate as the cache period.\n\t\t\t $this->calculate_last_activity( $last_activity ) . '</span></p></li>';\n\t\t}\n\t\t$output .= '</ul>';\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "9dca24d109e851938e44b6cc4ed1b00d", "score": "0.47085518", "text": "public function config()\n\t{\n\t\t$this->render('configuration/config', $data);\n\t}", "title": "" }, { "docid": "c415c0e64f1944e6990cd67cad7fcb66", "score": "0.47043744", "text": "protected function configure()\n {\n parent::configure();\n\n $this->setName('manual:to-pdf');\n $this->setDescription('Generates reference documentation as PDF file');\n }", "title": "" }, { "docid": "e5657c56462b48eebf5ff3e9c691745c", "score": "0.46986118", "text": "public function display() {\r\n\r\n\t\t// Remember the pages so as not to perform any more lookups\r\n\t\tif ( ! isset( self::$allPages ) ) {\r\n\t\t\tself::$allPages = get_pages();\r\n\t\t}\r\n\r\n\t\t$this->settings['options'] = array();\r\n\t\tforeach ( self::$allPages as $page ) {\r\n\t\t\t$title = $page->post_title;\r\n\t\t\tif ( empty( $title ) ) {\r\n\t\t\t\t$title = sprintf( __( 'Untitled %s', TF_I18NDOMAIN ), '(ID #' . $page->ID . ')' );\r\n\t\t\t}\r\n\t\t\t$this->settings['options'][ $page->ID ] = $title;\r\n\t\t}\r\n\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "799395c6aa807f4e2f3a478f2d17442f", "score": "0.46893838", "text": "public function getTextTopic()\n {\n return $this->textTopic;\n }", "title": "" }, { "docid": "d653ae938781e5ca53f745ffb807e3d1", "score": "0.46889704", "text": "function announcementTypes() {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('helpTopicId', 'journal.managementPages.announcements');\n\t\tparent::announcementTypes();\n\t}", "title": "" }, { "docid": "0f0d979243207cb7283adb511daabf87", "score": "0.46885636", "text": "public function topics_information() {\n\n\t\t\t$msg = '';\n\t\t\t$stmt = $this->conn->prepare(\"SELECT COUNT(*) AS total FROM categories\");\n\t\t\t$stmt->execute();\n\t\t\t$total = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t$follows = engine::number_user_topics(USER_ID);\n\t\t\t$reg_date = get_time(engine::getuserdata(USER_ID, 'REG_DATE'));\n\t\t\t$msg .= '<p class=\"left-form-info\">'.get_text(209,1).' <b>'.$total['total'].'</b> '.get_text(210,1).' <b>'.$follows.'</b> '.get_text(211,1).'</p>';\n\t\t\t$stmt = $this->conn->prepare(\"SELECT time, category_id FROM follows WHERE user_id=? ORDER BY time DESC LIMIT 1\");\n\t\t\t$stmt->execute(array(USER_ID));\n\t\t\t$last_time = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t$msg .= '<p class=\"left-form-info\">'.get_text(213,1).' <b>'.$reg_date.'</b>. '.get_text(214,1).' <b>'.get_time($last_time['time']).'</b>.</p>';\n\t\t\t$stmt = $this->conn->prepare(\"SELECT name, url FROM categories WHERE id=?\");\n\t\t\t$stmt->execute(array($last_time['category_id']));\n\t\t\t$category = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t$msg .= '<p class=\"left-form-info\">'.get_text(215,1).': <b><a href=\"category/'.$category['url'].'\" style=\"display:inline\">'.$category['name'].'</a></b></p>';\n\t\t\treturn $msg; \n\n\t\t}", "title": "" }, { "docid": "57bc79bc82d8ac9f0922a16feba1f9ba", "score": "0.46867374", "text": "public function display_settings ($data = array())\n\t{\n\t\t$this->multi_item_row($data);\n\t}", "title": "" }, { "docid": "bbde448a4adc5eadaf2cdbbd01f42cf8", "score": "0.46842155", "text": "function setTopic(string $topic, string $reason = '');", "title": "" }, { "docid": "f634f71eff2b5b08632fc20e211e1283", "score": "0.46813604", "text": "function pin_topics() // Type\n\t{\n\t\trequire_code('ocf_topics_action');\n\t\trequire_code('ocf_topics_action2');\n\n\t\t$topics=$this->get_markers();\n\t\tif (count($topics)==0) warn_exit(do_lang_tempcode('NO_MARKERS_SELECTED'));\n\n\t\t$forum_id=NULL;\n\t\tforeach ($topics as $i=>$topic_id)\n\t\t{\n\t\t\t$id=$GLOBALS['FORUM_DB']->query_value('f_topics','id',array('id'=>$topic_id));\n\t\t\tif ($id===NULL) continue;\n\n\t\t\tif ($forum_id===NULL)\n\t\t\t{\n\t\t\t\t$forum_id=$GLOBALS['FORUM_DB']->query_value('f_topics','t_forum_id',array('id'=>$topic_id));\n\t\t\t}\n\t\t\tocf_edit_topic($topic_id,NULL,NULL,NULL,NULL,1,NULL,NULL,'');\n\t\t}\n\n\t\treturn $this->redirect_to_forum('PIN_TOPIC',$forum_id);\n\t}", "title": "" }, { "docid": "edc4896d28bee1677a98279e37ddc2b6", "score": "0.46787354", "text": "public function index()\n {\n $topics = Topic::all();\n\n return $this->showAll($topics);\n }", "title": "" }, { "docid": "5477a796d242d3d1a92151d642a744c0", "score": "0.46787035", "text": "function admin_section_main_text() {\n echo '<p>' . __(\"Language settings for current blog. Ignored for landing site.\", self::TEXT_DOMAIN) . '</p>';\n }", "title": "" }, { "docid": "b1afbab664d4b22ea2189211cc845c47", "score": "0.4677965", "text": "function display()\n\t{\n\t\tJRequest::setVar('view','poll'); // force it to be the polls view\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "225017a308b5ce2974b6a19c1712dbec", "score": "0.46777678", "text": "protected function configure()\n {\n $this->setName('about:deskription')\n ->setDescription(\"view deskription about mini mvc php native project by nagara\")\n ->setHelp(\"\\n\\nauthor ekajayanagara as miyuki nagara\\nstudent infomatic at darma persada\\n\\n\");\n }", "title": "" }, { "docid": "a2a2f4dd8462d49d0aa83b026b2b1d48", "score": "0.46714336", "text": "public function index(){\n $this->_setupValue('skin:chat');\n }", "title": "" }, { "docid": "927a37c5547e74fecb625afe4de994aa", "score": "0.4671147", "text": "public function getTopicView()\n {\n return $this->topic_view;\n }", "title": "" }, { "docid": "21bb9b55060f8f13bf72629fe1322a4d", "score": "0.46671", "text": "public function new_topic_link() {\n\t\tif (\n\t\t\tbbp_is_single_forum()\n\t\t||\n\t\t\tbbp_is_single_view() && in_array( bbp_get_view_id(), array( 'plugin', 'reviews', 'theme' ) )\n\t\t) {\n\t\t\t$btn = null;\n\t\t\t$is_reviews = 'reviews' === bbp_get_view_id();\n\n\t\t\tif ( bbp_current_user_can_access_create_topic_form() ) {\n\t\t\t\t$btn = sprintf(\n\t\t\t\t\t'<a class=\"button button-secondary create-topic\" href=\"#new-topic-0\">%s</a>',\n\t\t\t\t\t$is_reviews ? __( 'Create Review', 'wporg-forums' ) : __( 'Create Topic', 'wporg-forums' )\n\t\t\t\t);\n\t\t\t} elseif ( ! bbp_is_forum_closed() && ! is_user_logged_in() ) {\n\t\t\t\t$btn = sprintf(\n\t\t\t\t\t'<a class=\"button button-secondary create-topic login\" href=\"%s\">%s</a>',\n\t\t\t\t\twp_login_url(),\n\t\t\t\t\t$is_reviews ? __( 'Log in to Create a Review', 'wporg-forums' ) : __( 'Log in to Create a Topic', 'wporg-forums' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( $btn ) {\n\t\t\t\t$searchform = get_search_form( [ 'echo' => false ] );\n\n\t\t\t\techo '<div class=\"bbp-create-topic-wrapper\">';\n\t\t\t\tif ( $searchform ) {\n\n\t\t\t\t\t// Output create button alongside search form except for reviews, which already have the button in a section rendered above this one.\n\t\t\t\t\tif( $is_reviews ) {\n\t\t\t\t\t\techo $searchform;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t/* translators: 1: markup for forums search field which is primary action, 2: markup for button to create topic */\n\t\t\t\t\t\t\t__( '%1$s or %2$s', 'wporg-forums' ),\n\t\t\t\t\t\t\t$searchform,\n\t\t\t\t\t\t\t$btn\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo $btn;\n\t\t\t\t}\n\t\t\t\techo \"</div>\\n\";\n\t\t\t}\n\n\t\t\tremove_filter( 'bbp_template_before_pagination_loop', array( $this, 'new_topic_link' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "a92a61a2bca7e3411ed17c74202d3b1a", "score": "0.46577027", "text": "function print_sub_kategori_edar() {\n\t\t$config['header_view'] = FALSE;\n\t\t$config['add_anchor'] = FALSE;\n\t\t$config['del_anchor'] = FALSE;\n\t\t$config['edit_anchor'] = FALSE;\n\t\treturn $this->list_sub_kategori_edar($config);\n\t}", "title": "" }, { "docid": "952b6b9841edab526e3ddc3d6d394785", "score": "0.4655308", "text": "public static function config()\n {\n $content = '';\n $my_onglets = false;\n \n Acid::set('admin_title', Acid::trad('admin_menu_infos'));\n $content .= Acid::mod('User')->printAdminBody(User::printAdminUserForms(), $my_onglets);\n \n Conf::addToContent($content);\n }", "title": "" }, { "docid": "3544777a28dbb0f371ea23520a598489", "score": "0.46539024", "text": "function lessons_set_topic_url($hook, $type, $url, $params) {\n\t$entity = $params['entity'];\n\n\tif (!$entity instanceof ElggObject) {\n\t\treturn;\n\t}\n\n\tif ($entity->getSubtype() === 'lessons') {\n\t\t$title = elgg_get_friendly_title($entity->title);\n\t\treturn \"lessons/view/{$entity->guid}/{$title}\";\n\t}\n\n\tif ($entity->getSubtype() === 'lessons_reply') {\n\t\t$topic = $entity->getContainerEntity();\n\t\treturn \"lessons/reply/view/{$entity->guid}/{$topic->guid}\";\n\t}\n}", "title": "" }, { "docid": "71585c4d703a11cd74b6190eeb7a1b09", "score": "0.46532318", "text": "function edit_topic() // Type\n\t{\n\t\t$topic_id=get_param_integer('id');\n\n\t\t$topic_info=$GLOBALS['FORUM_DB']->query_select('f_topics',array('*'),array('id'=>$topic_id),'',1);\n\t\tif (!array_key_exists(0,$topic_info)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\t\t$forum_id=$topic_info[0]['t_forum_id'];\n\t\t$personal_topic=is_null($forum_id);\n\n\t\t$this->handle_topic_breadcrumbs($forum_id,$topic_id,$topic_info[0]['t_cache_first_title'],do_lang_tempcode('EDIT_TOPIC'));\n\n\t\t$this->check_has_mod_access($topic_id);\n\n\t\t$post_url=build_url(array('page'=>'_SELF','type'=>'_edit_topic','id'=>$topic_id),'_SELF');\n\n\t\t// Certain aspects relating to the posting system\n\t\t$fields=new ocp_tempcode();\n\t\t$fields->attach(form_input_line(do_lang_tempcode('TITLE'),'','title',$topic_info[0]['t_cache_first_title'],false));\n\t\tif ((get_option('is_on_topic_descriptions')=='1') && (!$GLOBALS['FORUM_DRIVER']->topic_is_threaded($topic_id)))\n\t\t\t$fields->attach(form_input_line(do_lang_tempcode('DESCRIPTION'),'','description',$topic_info[0]['t_description'],false));\n\t\t$fields->attach(form_input_line(do_lang_tempcode('REASON'),do_lang_tempcode('DESCRIPTION_REASON'),'reason','',false));\n\t\tif (get_option('is_on_topic_emoticons')=='1')\n\t\t\t$fields->attach($this->choose_topic_emoticon($topic_info[0]['t_emoticon']));\n\t\t$options=array();\n\t\t$hidden_fields=new ocp_tempcode();\n\t\tif (ocf_may_moderate_forum($forum_id,get_member()))\n\t\t{\n\t\t\t$moderation_options=array(\n\t\t\t\tarray(do_lang_tempcode('OPEN'),'open',$topic_info[0]['t_is_open']==1,do_lang_tempcode('DESCRIPTION_OPEN')),\n\t\t\t\tarray(do_lang_tempcode('PINNED'),'pinned',$topic_info[0]['t_pinned']==1,do_lang_tempcode('DESCRIPTION_PINNED')),\n\t\t\t);\n\t\t\tif (addon_installed('unvalidated'))\n\t\t\t{\n\t\t\t\tif ($topic_info[0]['t_validated']==0)\n\t\t\t\t{\n\t\t\t\t\t$topic_info[0]['t_validated']=get_param_integer('validated',0);\n\t\t\t\t\tif ($topic_info[0]['t_validated']==1) attach_message(do_lang_tempcode('WILL_BE_VALIDATED_WHEN_SAVING'));\n\t\t\t\t}\n\t\t\t\t$moderation_options[]=array(do_lang_tempcode('VALIDATED'),'validated',$topic_info[0]['t_validated']==1,do_lang_tempcode('DESCRIPTION_VALIDATED'));\n\t\t\t}\n\t\t\tif (get_value('disable_sunk')!=='1')\n\t\t\t\t$moderation_options[]=array(do_lang_tempcode('SUNK'),'sunk',$topic_info[0]['t_sunk']==1,do_lang_tempcode('DESCRIPTION_SUNK'));\n\t\t\tif (!$personal_topic) $options[]=array(do_lang_tempcode('CASCADING'),'cascading',$topic_info[0]['t_cascading']==1,do_lang_tempcode('DESCRIPTION_CASCADING'));\n\t\t} else\n\t\t{\n\t\t\t$moderation_options=array();\n\t\t\t$hidden_fields->attach(form_input_hidden('validated','1'));\n\t\t}\n\t\t$fields->attach(form_input_various_ticks($options,''));\n\t\tif (count($moderation_options)!=0) $fields->attach(form_input_various_ticks($moderation_options,'',NULL,do_lang_tempcode('MODERATION_OPTIONS')));\n\n\t\trequire_code('fields');\n\t\tif (has_tied_catalogue('topic'))\n\t\t{\n\t\t\tappend_form_custom_fields('topic',strval($topic_id),$fields,$hidden_fields);\n\t\t}\n\n\t\t// Awards?\n\t\tif (addon_installed('awards'))\n\t\t{\n\t\t\trequire_code('awards');\n\t\t\t$fields->attach(get_award_fields('topic',strval($topic_id)));\n\t\t}\n\n\t\t$title=get_page_title('EDIT_TOPIC');\n\t\t$submit_name=do_lang_tempcode('SAVE');\n\t\treturn do_template('FORM_SCREEN',array('_GUID'=>'071b6747a1df1cf8e72f8f542422aa5b','STAFF_HELP_URL'=>brand_base_url().'/docs'.strval(ocp_version()).'/pg/tut_mod','HIDDEN'=>$hidden_fields,'TITLE'=>$title,'FIELDS'=>$fields,'TEXT'=>'','SUBMIT_NAME'=>$submit_name,'URL'=>$post_url));\n\t}", "title": "" }, { "docid": "469b67d4c084a76ccda4906a2c230626", "score": "0.46519858", "text": "public function main()\n {\n if($this->getOutputChoice()) {\n /*\n * Shows first 20 due to paginate\n */\n $this->out(file_get_contents( 'http://localhost:8080/rssreader/channels'));\n }\n else{\n $channels = $this->Channels->find('all');\n $this->out('All channels');\n $data = [];\n array_push($data, ['Id', 'Channel', 'Url']);\n foreach ($channels as $channel)\n {\n array_push($data, [$channel->id, $channel->name, $channel->channel_url]);\n }\n $this->helper('Table')->output($data);\n }\n }", "title": "" }, { "docid": "f2dbba4c08de8cf72a940503a16c8204", "score": "0.46473658", "text": "public function description()\n\t{\n\t\treturn $this->lang->words['pin_topic'];\n\t}", "title": "" }, { "docid": "cdb15749e08cecd0d683304aa2e35897", "score": "0.46465415", "text": "public function setTopic($var)\n {\n GPBUtil::checkString($var, True);\n $this->topic = $var;\n\n return $this;\n }", "title": "" }, { "docid": "c92efade6841581021caa45e83cac95e", "score": "0.46447867", "text": "public function getTopicsList(){\n return $this->_get(1);\n }", "title": "" } ]
9cfc2e672baf5a48415981bacd3f2826
Store a field without indexing it
[ { "docid": "cf259ebb0cb620e6840504606b9a83b6", "score": "0.6322061", "text": "protected function store($name, $value)\n {\n $field = Zend_Search_Lucene_Field::unIndexed($name, $value);\n $this->addField($field);\n }", "title": "" } ]
[ { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.6468027", "text": "public function setField($field);", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.6468027", "text": "public function setField($field);", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.6468027", "text": "public function setField($field);", "title": "" }, { "docid": "f3de0c79acf58cd14bdc618cc91af30f", "score": "0.63579214", "text": "function writeDataField($value) { $this->_datafield = $value; }", "title": "" }, { "docid": "d26b640f1259cfacd0d9e90e75a9256d", "score": "0.62969905", "text": "public function set($field, $value){}", "title": "" }, { "docid": "8c84a672ad81dd810cd899076525c2b1", "score": "0.6198293", "text": "public function addField($field){}", "title": "" }, { "docid": "5cb2ed8f017bbe7a959010c617d020c4", "score": "0.618293", "text": "public function __set($field, $new_value) \n\t{\n\t\tif(!array_key_exists($field, $this->data)) return;\n\n\t\t# store the memory usage before loading the data\n\t\t$start_mem = memory_get_usage(true);\n\t\t\t\t\t\n\t\t# set the modified flag so that we know to save this object on shutdown\n\t\t$this->modified[$field] = true;\n\t\t\n\t\t# never modify the ID\n\t\tif($field == 'id') return;\n\t\t\n\t\t# otherwise set the variable data\n\t\t$this->data[$field] = $new_value;\t\t\n\t\t\n\t\t# incremement the memory usage variable\n\t\t$this->this_memory += memory_get_usage(true) - $start_mem;\n\t}", "title": "" }, { "docid": "09ad12ffb91ebf9d91442c77d0a75f90", "score": "0.6128735", "text": "public function __set($fieldName, $fieldValue){}", "title": "" }, { "docid": "1737a3317a8f9e200f5adb71d64ddb3a", "score": "0.6080962", "text": "public function offsetSet($fieldName, $fieldValue){}", "title": "" }, { "docid": "f0d385296a49aac5633e98b8ba23b9cb", "score": "0.607418", "text": "private final function write(ACHRecordField $field) {\n\t\t$this->data = substr_replace(\n $this->data, \t\t\t\t// current data\n $field->getData(), \t\t\t// data to insert\n $field->getStartPosition(), // position to insert,\n $field->length() \t\t\t// length of string to insert\n );\n\t}", "title": "" }, { "docid": "f548a6115d9b559576e238c0e6f1f723", "score": "0.606558", "text": "public function saveValue(array $field, $model): void {\n $model[$this->data->get('column')] = $field['value'];\n }", "title": "" }, { "docid": "1516e456e3d4848f2012ec7415412194", "score": "0.6012597", "text": "public function setField($fieldName){}", "title": "" }, { "docid": "0e0d2ae2b2cb97895dc5c9b7ecc9f0fe", "score": "0.5981577", "text": "public function setField( $name, $value );", "title": "" }, { "docid": "070c2581c5e53b70072511d59c3a8527", "score": "0.5978403", "text": "public function setDataField($field, $value)\n {\n $this->_data[$field] = $value;\n }", "title": "" }, { "docid": "50052da548112621613340db44f69607", "score": "0.5965741", "text": "public function addStoredField(string $fieldName): void\n {\n $this->storedFields[] = $fieldName;\n }", "title": "" }, { "docid": "a2a67d96a03787d0460be22ef7a85245", "score": "0.59253997", "text": "function writeDataField($value)\n {\n $this->_datafield = $value;\n }", "title": "" }, { "docid": "a3eebbc012cfd5f0e872c169ba8f7832", "score": "0.5860375", "text": "function store($data)\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// NOTE: 'data' is post['jform'] for J2.5 (this is done by the controller or other caller)\n\t\t$field = $this->getTable('flexicontent_fields', '');\n\t\t$types = isset($data['tid']) ? $data['tid'] : array(); // types to which the field is being assigned\n\t\t\n\t\t// Support for 'dirty' field properties\n\t\tif ($data['id']) {\n\t\t\t$field->load($data['id']);\n\t\t\t\n\t\t\tif ($field->issearch==-1 || $field->issearch==2) unset($data['issearch']); // Already dirty\n\t\t\telse if (@ $data['issearch']==0 && $field->issearch==1) $data['issearch']=-1; // Becomes dirty OFF\n\t\t\telse if (@ $data['issearch']==1 && $field->issearch==0) $data['issearch']=2; // Becomes dirty ON\n\t\t\t\n\t\t\tif ($field->isadvsearch==-1 || $field->isadvsearch==2) unset($data['isadvsearch']); // Already dirty\n\t\t\telse if (@ $data['isadvsearch']==0 && $field->isadvsearch==1) $data['isadvsearch']=-1; // Becomes dirty OFF\n\t\t\telse if (@ $data['isadvsearch']==1 && $field->isadvsearch==0) $data['isadvsearch']=2; // Becomes dirty ON\n\t\t\t\n\t\t\tif ($field->isadvfilter==-1 || $field->isadvfilter==2) unset($data['isadvfilter']); // Already dirty\n\t\t\telse if (@ $data['isadvfilter']==0 && $field->isadvfilter==1) $data['isadvfilter']=-1; // Becomes dirty OFF\n\t\t\telse if (@ $data['isadvfilter']==1 && $field->isadvfilter==0) $data['isadvfilter']=2; // Becomes dirty ON\n\t\t\t\n\t\t\t// FORCE dirty OFF, if field is being unpublished -and- is not already normal OFF\n\t\t\tif ( isset($data['published']) && $data['published']==0 && $field->published==1 ) {\n\t\t\t\tif ($field->issearch!=0) $data['issearch'] = -1;\n\t\t\t\tif ($field->isadvsearch!=0) $data['isadvsearch'] = -1;\n\t\t\t\tif ($field->isadvfilter!=0) $data['isadvfilter'] = -1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// bind it to the table\n\t\tif (!$field->bind($data)) {\n\t\t\t$this->setError( $this->_db->getErrorMsg() );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Get field attibutes, for J1.5 is params for J2.5 is attribs\n\t\t$attibutes = !FLEXI_J16GE ? $data['params'] : $data['attribs'];\n\n\t\t// Build attibutes INI string\n\t\tif (FLEXI_J16GE) {\n\t\t\t// JSON encoding allows to use new lines etc\n\t\t\t// handled by 'flexicontent_types' (extends JTable for flexicontent_types)\n\t\t\t//$field->attribs = json_encode($attibutes);\n\t\t} else {\n\t\t\tif (is_array($attibutes))\n\t\t\t{\n\t\t\t\t$txt = array ();\n\t\t\t\tforeach ($attibutes as $k => $v) {\n\t\t\t\t\tif (is_array($v)) {\n\t\t\t\t\t\t$v = implode('|', $v);\n\t\t\t\t\t}\n\t\t\t\t\t$txt[] = \"$k=$v\";\n\t\t\t\t}\n\t\t\t\t$field->attribs = implode(\"\\n\", $txt);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Put the new fields in last position\n\t\tif (!$field->id) {\n\t\t\t$field->ordering = $field->getNextOrder();\n\t\t}\n\n\t\t// Make sure the data is valid\n\t\tif (!$field->check()) {\n\t\t\t$this->setError($field->getError() );\n\t\t\treturn false;\n\t\t}\n\n\t\t// Store it in the db\n\t\tif (!$field->store()) {\n\t\t\t$this->setError( $this->_db->getErrorMsg() );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (FLEXI_ACCESS) {\n\t\t\tFAccess::saveaccess( $field, 'field' );\n\t\t} else if (FLEXI_J16GE) {\n\t\t\t// saving asset in J2.5 is handled by the fields table class\n\t\t}\n\t\t\n\t\t$this->_field = & $field;\n\t\t$this->_id = $field->id;\n\t\t\n\t\t// Assign (a) chosen types to custom field or (b) all types if field is core\n\t\t$this->_assignTypesToField($types);\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "be5919a56475bf72b20a64724f185e3d", "score": "0.5855398", "text": "function set($field, $value){\n\t\tif (isset($this->data->$field)) $this->data->$field = $value;\n\t\tif (isset($this->vdata->$field)) $this->vdata->$field = $value;\n\t}", "title": "" }, { "docid": "c014793f9170636c87b363af70245c62", "score": "0.57479084", "text": "public function setField(string $fieldName, $value);", "title": "" }, { "docid": "a9937ad5da6a7915b9713be80eb77a69", "score": "0.5696155", "text": "public function set($field, $value = NULL)\n\t{\n\t\tif (is_array($field))\n\t\t{\n\t\t\tforeach ($field as $_field => $_val)\n\t\t\t{\n\t\t\t\t$this->data[$_field] = $_val;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data[$field] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "9080be7ad077d4ddd04c14c084656a41", "score": "0.56840074", "text": "function addField($afield){\n $this->fields[$afield->name]= $afield;\n }", "title": "" }, { "docid": "9080be7ad077d4ddd04c14c084656a41", "score": "0.56840074", "text": "function addField($afield){\n $this->fields[$afield->name]= $afield;\n }", "title": "" }, { "docid": "f7ddf9e88e16129ad563efb4d189de49", "score": "0.5665236", "text": "function add_field($field, $value) \r\r\n\t{\r\r\n\t\t// sent to paypal as POST variables. If the value is already in the \r\r\n\t\t// array, it will be overwritten.\r\r\n\t\t$this->fields[$field] = $value;\r\r\n\t}", "title": "" }, { "docid": "2a518f12501616c9d9e7e437bddf435b", "score": "0.56551003", "text": "function save( BP_XProfile_Field $field ){\n \n }", "title": "" }, { "docid": "689f418fdf7c217f9c835f6b0430521e", "score": "0.56526583", "text": "public function saveValue(array $field, $model): void {\n $model[$this->data->get('column')] = $field['value'] ? $this->trueValue : $this->falseValue;\n }", "title": "" }, { "docid": "4a012ff334593667e8060636dcb4571c", "score": "0.56358", "text": "public static function saveFields(array $field, array &$context) {\n $attributes = &$field['attributes'];\n $field['id'] = str_replace('ga:', '', $field['id']);\n $attributes['type'] = strtolower($attributes['type']);\n $attributes['dataType'] = strtolower($attributes['dataType']);\n $attributes['status'] = strtolower($attributes['status']);\n $attributes['description'] = isset($attributes['description']) ? $attributes['description'] : '';\n $attributes['calculation'] = isset($attributes['calculation']) ? $attributes['calculation'] : NULL;\n\n // Allow other modules to alter Google Analytics fields before saving\n // in database.\n \\Drupal::moduleHandler()->alter('google_analytics_reports_field_import', $field);\n\n \\Drupal::database()->insert('google_analytics_reports_fields')\n ->fields([\n 'gaid' => $field['id'],\n 'type' => $attributes['type'],\n 'data_type' => $attributes['dataType'],\n 'column_group' => $attributes['group'],\n 'ui_name' => $attributes['uiName'],\n 'description' => $attributes['description'],\n 'calculation' => $attributes['calculation'],\n ])\n ->execute();\n $context['results'][] = $field['id'];\n }", "title": "" }, { "docid": "40b55576e296ade15233f4783a87d9fb", "score": "0.5620973", "text": "function addField($field){\n\t\tarray_push($this->fields,$field);\n\t\t//echo($this->fields[0]['type']);\n\t}", "title": "" }, { "docid": "64db866f613865a4659f74070d9d1927", "score": "0.55979973", "text": "function setField($field,$value){\n\t\t$this->$field = $value;\n\t}", "title": "" }, { "docid": "ba1742263fad29a62c97849a1db5a6ff", "score": "0.5590456", "text": "static public function setField ($o, $field, $value) {\n\t\t#/home/grabli66/haxe/std/php/_std/Reflect.hx:80: characters 19-20\n\t\t$tmp = $o;\n\t\t#/home/grabli66/haxe/std/php/_std/Reflect.hx:80: characters 3-35\n\t\t$tmp->{$field} = $value;\n\t}", "title": "" }, { "docid": "121a4a8a76f0ffce5b1c8161ca35ff9b", "score": "0.5588107", "text": "public function addUserField($field){}", "title": "" }, { "docid": "aa7b22c92522d285fccaf07eef557bc3", "score": "0.55873257", "text": "function add_field($field, $value) {\r\n\t\t// sent to paypal as POST variables. If the value is already in the \r\n\t\t// array, it will be overwritten.\r\n\t\t\r\n\r\n\t\t$this->fields [$field] = $value;\r\n\t}", "title": "" }, { "docid": "a9cecc2be2a8061b571107aec4bc1500", "score": "0.5585601", "text": "public function save( Field $field ) {\n\t\t$value_set = $field->get_full_value();\n\n\t\tif ( empty( $value_set ) && $field->get_value_set()->keepalive() ) {\n\t\t\t$storage_key = $this->key_toolset->get_storage_key(\n\t\t\t\t$field->is_simple_root_field(),\n\t\t\t\t$this->get_full_hierarchy_for_field( $field ),\n\t\t\t\t$this->get_full_hierarchy_index_for_field( $field ),\n\t\t\t\t0,\n\t\t\t\t$this->key_toolset->get_keepalive_property()\n\t\t\t);\n\t\t\t$this->save_key_value_pair( $storage_key, '' );\n\t\t}\n\t\tforeach ( $value_set as $value_group_index => $values ) {\n\t\t\tforeach ( $values as $property => $value ) {\n\t\t\t\t$storage_key = $this->key_toolset->get_storage_key(\n\t\t\t\t\t$field->is_simple_root_field(),\n\t\t\t\t\t$this->get_full_hierarchy_for_field( $field ),\n\t\t\t\t\t$this->get_full_hierarchy_index_for_field( $field ),\n\t\t\t\t\t$value_group_index,\n\t\t\t\t\t$property\n\t\t\t\t);\n\t\t\t\t$this->save_key_value_pair( $storage_key, $value );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "626176afb006571d930ed1d0e50ef4e9", "score": "0.5572073", "text": "public function addFieldCache($field)\n {\n $cache = $this->getMandango()->getCache();\n\n foreach ($this->getQueryHashes() as $hash => $_) {\n $value = $cache->has($hash) ? $cache->get($hash) : array();\n if (!is_array($value)) {\n $value = array();\n }\n if (!array_key_exists('fields', $value) || !is_array($value['fields'])) {\n $value['fields'] = [];\n }\n /* Check for path collision:\n * https://docs.mongodb.com/manual/release-notes/4.4-compatibility/#path-collision-restrictions\n */\n $newFields = [];\n foreach ($value['fields'] as $cachedField => $_) {\n $fieldLength = strlen($field);\n $cachedFieldLength = strlen($cachedField);\n if (\n $cachedFieldLength > $fieldLength &&\n substr($cachedField, 0, $fieldLength) === $field &&\n $cachedField[$fieldLength] === '.'\n ) {\n // $cachedField is a sub-field of the object at $field, drop $cachedField\n continue;\n }\n if (\n $fieldLength > $cachedFieldLength &&\n substr($field, 0, $cachedFieldLength) === $cachedField &&\n $field[$cachedFieldLength] === '.'\n ) {\n // $field is a sub-field of the object at $cachedField, don't add it to the cache.\n return;\n }\n $newFields[$cachedField] = 1;\n }\n $value['fields'] = $newFields;\n\n $value['fields'][$field] = 1;\n $cache->set($hash, $value);\n }\n }", "title": "" }, { "docid": "fe63001f368039265d283067bc44fcd1", "score": "0.5569197", "text": "public function setField($field_value) {\n\t\t$this->_data['field'] = $field_value;\n\t}", "title": "" }, { "docid": "f3a5bbf094d8e7b4f97779050dc5e57e", "score": "0.556746", "text": "function saveField($field,$branch,$field_name,$field_type,$field_default){\n\t\tglobal $l_customer;\n\n\t\tif($branch==$l_customer[\"common\"]){\n\t\t\treturn -10;\n\t\t}\n\n\t\tif($branch==$l_customer[\"other\"]){\n\t\t\t$field=str_replace($l_customer[\"other\"].\"_\",\"\",$field);\n\t\t}\n\t\tif($field_name==\"\") return -3;\n\n\t\t$h=$this->customer->getFieldDbProperties($field);\n\n\t\t$new_field_name=(($branch && $branch!=$l_customer[\"other\"]) ? $branch.\"_\" : \"\").$field_name;\n\n\t\tif(eregi('[^a-z0-9\\_]',$new_field_name)) return -7;\n\n\t\tif($field!=$new_field_name && count($this->customer->getFieldDbProperties($new_field_name))) return -4;\n\n\t\tif($this->customer->isProperty($field) || $this->customer->isProtected($field) || $this->customer->isProperty($new_field_name) || $this->customer->isProtected($new_field_name)) return -5;\n\t\tif($branch==$l_customer[\"other\"]) if($this->settings->isReserved($new_field_name)) return -5;\n\n\t\t$this->db->query(\"ALTER TABLE \".CUSTOMER_TABLE.\" \".((count($h)) ? \"CHANGE \".$field : \"ADD\").\" \".$new_field_name.\" \".$this->settings->getDbType($field_type).\" NOT NULL;\");\n\n\t\tif(count($h)) $this->settings->removeFieldAdd($field);\n\t\t$this->settings->storeFieldAdd($new_field_name,\"default\",$field_default);\n\n\t\t$this->settings->save();\n\n\t}", "title": "" }, { "docid": "9843f740342823d635130a89e939e058", "score": "0.5553822", "text": "public function field($field);", "title": "" }, { "docid": "9843f740342823d635130a89e939e058", "score": "0.5553822", "text": "public function field($field);", "title": "" }, { "docid": "c2e0fe5863a921aef3410301beb0b1f1", "score": "0.5553595", "text": "public function forField($field);", "title": "" }, { "docid": "44de61aa402b3786860679b9ffa90335", "score": "0.5536513", "text": "public function set(/*string*/ $field, /*mixed*/ $value)\n\t{\n\t\t// If the values are different\n\t\tif(!isset($this->aRecord[$field]) || $this->aRecord[$field] !== $value) {\n\t\t\t// Set the changed flag\n\t\t\t$this->bChanged\t= true;\n\t\t}\n\n\t\t// Set the field\n\t\t$this->aRecord[$field]\t= $value;\n\t}", "title": "" }, { "docid": "2712cc4a80e5d1ab3a2904f48ee38497", "score": "0.5513141", "text": "public function test_can_add_a_field_to_a_document()\n\t{\n\t $field = (new Field())\n ->name('name')\n ->type('string')\n ->nullable()\n ->columnName('customName')\n ;\n\n\t\t$this->assertFluentSetter($this->builder->addField($field));\n\t\t$this->assertContains(['type' => 'string', 'name' => 'customName'], $this->cm->getFieldMapping('name'));\n\t\t$this->assertEquals('customName', $this->cm->getFieldMapping('name')['name']);\n\t\t$this->assertTrue($this->cm->getFieldMapping('name')['nullable']);\n\t}", "title": "" }, { "docid": "3416526f94e3b15ebf00508405a2865d", "score": "0.5509607", "text": "public function setFieldValue(string $field, mixed $value): static;", "title": "" }, { "docid": "ba34ef19089ee2570934c0c6afd0d7a0", "score": "0.55087495", "text": "public function addField($fieldName, $fieldValue){}", "title": "" }, { "docid": "52021cd796cfb8158d8db07e77fbdce0", "score": "0.55024356", "text": "public function setField(string $field): void\n {\n $this->field = $field;\n }", "title": "" }, { "docid": "a21078c91c4c929a4c634e72f3bdb1f3", "score": "0.54982287", "text": "public function eyuiform_saveFieldValue($formId,$fieldId,$fullFieldName,$fieldValue);", "title": "" }, { "docid": "c3a37fbc257a9aaddd07c65da807bf52", "score": "0.54949135", "text": "public function setField($key, $value)\n\t{\n\t\t$this->_data[$key] = $value;\n\t}", "title": "" }, { "docid": "e32b5290cbf102a3487a5482b10764f7", "score": "0.5494111", "text": "public function &addField(FieldInterface $field);", "title": "" }, { "docid": "0cbd7eb79bf442a6baa01d3ff3ab3b04", "score": "0.54773825", "text": "function __set ($name, $value ){\n\t\tif($name=='id')\n\t\t\t$this->id=$value;\n\t\telse if(!isset($this->entity->fields[$name])) throw new Exception('There is no field \"'.$name.'\" in entity \"'.$this->entity->name.'\"');\n\t\telse if(($this->entity->fields[$name] instanceof DateField) and !($value instanceof DateTime))\n\t\t\t\tthrow new Exception('\"'.$name.'\" type must be DateTime');\n\t\telse if($this->entity->fields[$name] instanceof PasswordField)\n\t\t\t$this->fields[$name]=md5($value);\n\t\telse if($this->entity->fields[$name] instanceof UniversalTextField){\n\t\t\tif(!$this->fields[$name]) $this->fields[$name]=array(0,$value);\n\t\t\telse $this->fields[$name][1]=$value;\n\t\t}\n\t\telse if($this->entity->fields[$name] instanceof ReferenceField){\n\t\t\tif(!isset($this->previousReference[$name])) \n\t\t\t\tif(isset($this->fields[$name]) and $this->fields[$name]){\n\t\t\t\t\tif($this->fields[$name] instanceof Persistent)\n\t\t\t\t\t\t$this->previousReference[$name]=$this->fields[$name]->id;\n\t\t\t\t\telse $this->previousReference[$name]=$this->fields[$name];\n\t\t\t\t}\n\t\t\t\telse $this->previousReference[$name]=0;\n\t\t\t$this->fields[$name]=$value;\n\t\t}\n\t\telse $this->fields[$name]=$value;\n\t}", "title": "" }, { "docid": "8a2ea6a4ee546206e71a0d181e1dfe08", "score": "0.54753053", "text": "public function saveField($value, $collection, $id, $field)\n {\n $this->saveData($value, $collection, $id, $field);\n }", "title": "" }, { "docid": "0193485b32f10d379041ca5f0af2f381", "score": "0.54641235", "text": "public function store($key, $value);", "title": "" }, { "docid": "0e85d5c3ba839fe7d4d578f64841483a", "score": "0.54589754", "text": "public function addField(Field $field): static;", "title": "" }, { "docid": "2478f2b31f669be87a35284da73fa74c", "score": "0.5457017", "text": "public function set(string $fieldName, mixed $value): static;", "title": "" }, { "docid": "b40fc320018a590f97585d8cd6512f2c", "score": "0.5455968", "text": "public function offsetSet($key,$value){\n $this->fields[$key] = $value;\n }", "title": "" }, { "docid": "fdcfa664505f1b85cb08d15c4c87e0d9", "score": "0.5453878", "text": "public function setValue( $field, $value ) {\n\t\tif ( !$this->fields->hasKey( $field ) ) {\n\t\t\tthrow new \\InvalidArgumentException( \"Field does not exist in record: '{$field}'.\" );\n\t\t}\n\n\t\t$this->fields->set( $field, $value );\n\t}", "title": "" }, { "docid": "3ccd3b64681a21146f7e44915917ca6b", "score": "0.5450729", "text": "abstract public function store();", "title": "" }, { "docid": "95db7a6830e280280ab01ddf16b58501", "score": "0.5442771", "text": "function addFieldID($field) {\n\t\t$this->fieldID=$field;\n\t}", "title": "" }, { "docid": "7b8851cf1c0bb900c01a707fcf30dcc5", "score": "0.5438862", "text": "public function add(field $field)\n\t{\n\t\t$this->fields[] = $field;\n\t}", "title": "" }, { "docid": "0e1f2ef55b786949ab24182bb922415e", "score": "0.543441", "text": "public function set_field( $field, $value ) {\n\t\t// Don't deserialize values of \"private\" fields.\n\t\tif ( '_' !== $field[0] ) {\n\n\t\t\t// Only set values of existing fields, don't create a new field.\n\t\t\tif ( property_exists( $this, $field ) ) {\n\t\t\t\t$this->$field = $value;\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "b24129c9ddea4c2cd54724f4f8815f32", "score": "0.54316264", "text": "abstract function store();", "title": "" }, { "docid": "b24129c9ddea4c2cd54724f4f8815f32", "score": "0.54316264", "text": "abstract function store();", "title": "" }, { "docid": "a8ce2dbc47b763c76f3f0c1080dd1b5d", "score": "0.5403864", "text": "public function saveOrUpdate(string $field, string $search, array $data = []);", "title": "" }, { "docid": "e1d30a9f445fbdddf7ddcf12b3db852d", "score": "0.5403366", "text": "public function __set($key,$value){\n $this->fields[$key] = $value;\n }", "title": "" }, { "docid": "382657ef5cfd4b81de5412443f4822cf", "score": "0.5394154", "text": "private function increaseField($field)\n\t{\n\t\tDB::table($this->table)->\n\t\t\twhere('id', $this->id)->\n\t\t\tupdate([\n\t\t\t\t$field => DB::raw(\"$field + 1\")\n\t\t]);\n\t\t$this->$field = DB::table($this->table)->where('id', $this->id)->pluck($field);\n\t}", "title": "" }, { "docid": "5d54446a438d91877b07b973538a401e", "score": "0.5380199", "text": "public function importField($field)\n {\n if (is_string($field)) {\n $field = $this->model->hasElement($field);\n }\n /** @type \\atk4\\data\\Field $field */\n\n if (!$field || !$field instanceof \\atk4\\data\\Field) {\n return;\n }\n\n // prepare name\n $name = $field->short_name;\n\n // prepare caption\n $caption = isset($field->ui['caption'])\n ? $field->ui['caption']\n : ucwords(str_replace('_', ' ', $name));\n\n // prepare value\n $value = $field->get();\n\n // if value is null, then just set empty string as value in template and break out\n if ($value === null) {\n $this->owner->template->setHTML(array($name => '', $name.'-caption' => $caption));\n return;\n }\n\n // take care of some special data types\n switch ($field->type) {\n case 'boolean':\n if ($value === true || $value === 1 || $value === 'Y') {\n $value = '<i class=\"icon-check\">&nbsp;'.$this->app->_('yes').'</i>';\n } else {\n $value = '<i class=\"icon-check-empty\">&nbsp;'.$this->app->_('no').'</i>';\n }\n break;\n case 'date':\n $value = $value->format($this->app->getConfig('locale/date', 'Y-m-d'));\n break;\n case 'datetime':\n $value = $value->format($this->app->getConfig('locale/datetime', 'Y-m-d H:i:s'));\n break;\n case 'time':\n $value = $value->format($this->app->getConfig('locale/time', 'H:i:s'));\n break;\n default:\n $value = $this->model->persistence->typecastsaveField($field, $value);\n }\n\n // support valueList\n if (isset($field->ui['valueList'][$value])) {\n $value = $field->ui['valueList'][$value];\n }\n\n // support hasOne\n if ($ref_field = $this->model->hasRef($name)) {\n $m = $ref_field->ref();\n $value = $m->get($m->title_field);\n }\n\n // fill template\n $data = array($name => $value, $name.'-caption' => $caption);\n $this->owner->template->setHTML($data);\n }", "title": "" }, { "docid": "9bab5743ec19fe75a0c20bff2322f715", "score": "0.53778565", "text": "final protected function saveToDatabase()\n\t\t{\n\t\t\n\t\t\t$data = get_object_vars($this);\n\t\t\t$dataArrayName = $this->getDataArrayFieldName();\n\t\t\t\n\t\t\tif (!is_null($dataArrayName))\n\t\t\t\t$data = array_merge($data, $this->$dataArrayName);\n\t\t\t\t\n\t\t\t$setString = '';\n\t\t\tforeach ($data as $name => $value)\n\t\t\t{\n\t\t\t\tif (in_array($name, $this->getExcludedFields()) or $name == $this->getIDFieldName() or is_array($value)) continue;\n\t\t\t\tif ($setString != '') $setString .= ', ';\n\t\t\t\t$setString .= \"`$name`='\" . mysql_real_escape_string($value, MySQL::getConnection()) . \"'\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"[$setString]\";\n\t\t\t\n\t\t\t\n\t\t\t//return; // TEMPORARY\n\t\t\n\t\t\t\n\t\t\t$idField = $this->getIDFieldName();\n\t\t\t$result = MySQL::executeQuery('SELECT * FROM ' . $this->getTableName() . ' WHERE ' . $this->getIDFieldName() . '=' . $this->$idField . ' LIMIT 1');\n\t\t\tif (mysql_num_rows($result) == 0)\n\t\t\t{\n\t\t\t\t// doesn't exist\n\t\t\t\tMySQL::executeQuery('INSERT INTO ' . $this->getTableName() . ' SET ' . $setString);\n\t\t\t\t$this->$idField = mysql_insert_id(MySQL::getConnection());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// exists\n\t\t\t\tMySQL::executeQuery('UPDATE ' . $this->getTableName() . ' SET ' . $setString . ' WHERE ' . $this->getIDFieldName() . '=' . $this->$idField . ' LIMIT 1');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3a6d046efba8bac2464e717698510c6d", "score": "0.5371225", "text": "public function addField(Field $field)\n {\n $this->fields[] = $field;\n $this->lastUpdated = new DateTime( \"now\" );\n }", "title": "" }, { "docid": "0361bd15153ec26c33e5477b0b6f63e4", "score": "0.53691906", "text": "function add_field($fieldName) {\n\t\t$this -> db -> insert('Field', $fieldName);\n\t\treturn $this -> db -> insert_id();\n\t}", "title": "" }, { "docid": "2c19d7a26ad7f659df76b74a509861dc", "score": "0.5363388", "text": "function\t\t\tstore();", "title": "" }, { "docid": "d6a3620d3f92c1f34a89583dc5e0f5cc", "score": "0.53565276", "text": "public function addQueryField($field, $boost){}", "title": "" }, { "docid": "d8c3756c921310acaef6fd522b39f173", "score": "0.53432274", "text": "public function addField($field)\n {\n $this->fields[] = $field;\n }", "title": "" }, { "docid": "53bc9bea46e020896c4d4623d218c857", "score": "0.533588", "text": "public function dbObject($fieldName);", "title": "" }, { "docid": "17418d82604cfbdda7ecf4013a530a05", "score": "0.53339374", "text": "function _encrypt($field)\n\t{\n\t\tif (!empty($this->{$field}))\n\t\t{\n\t\t\t$this->{$field} = create_hash($this->{$field});\n\t\t}\n\t}", "title": "" }, { "docid": "c0451e6070ca5ccc8398aa60f2f075a9", "score": "0.5329233", "text": "public function set($field, $value)\n\t{\n\t\t$this->data[$field] = new Entry($field, urldecode($value));\n\t}", "title": "" }, { "docid": "312d208969c7081e9437ffeff7627da4", "score": "0.5326426", "text": "public function setField(int $index, string|int|array|null $value = ''): bool\n {\n if ($index === 0) { // Do not allow changing 0th index, which is the name of the segment\n return false;\n }\n\n if ($this->isValueEmpty($value)) {\n return false;\n }\n\n // Fill in the blanks...\n for ($i = count($this->fields); $i < $index; $i++) {\n $this->fields[$i] = '';\n }\n\n $this->fields[$index] = $value;\n\n return true;\n }", "title": "" }, { "docid": "a73d95c0f03ce631b43a4bd2bbd57cc0", "score": "0.53253585", "text": "function value2db($record)\n {\n $record[$this->fieldName()] = $this->initialValue();\n return parent::value2db($record);\n }", "title": "" }, { "docid": "735632e1b32c79bff2b0f81a4caec147", "score": "0.53206736", "text": "public function __set($field, $value) {\r\n $this->entity->$field = $value;\r\n }", "title": "" }, { "docid": "735632e1b32c79bff2b0f81a4caec147", "score": "0.53206736", "text": "public function __set($field, $value) {\r\n $this->entity->$field = $value;\r\n }", "title": "" }, { "docid": "281d16502a95f21c936a8f882549ead2", "score": "0.53188956", "text": "public function setGatewaySpecificField($field, $value)\n\t{\n\t\t$this->transaction_info[$field] = $value;\n\t}", "title": "" }, { "docid": "cb48d19af501948ef2f4b98a4978da1e", "score": "0.5310773", "text": "public function setReadonly(): FieldContract;", "title": "" }, { "docid": "3ec1092f0589c5a4767d2312b84126fe", "score": "0.5297547", "text": "public function onFieldUpdate();", "title": "" }, { "docid": "561b0a1e7f1e7b457df7761510f2ce63", "score": "0.5297424", "text": "function setValueVirtually($field_name,$value){\n\t\t$this->setValuesVirtually(array(\"$field_name\" => $value));\n\t}", "title": "" }, { "docid": "a4de39f093d772a17cdb4ac7933c8776", "score": "0.52852", "text": "public function setTermsField($fieldname){}", "title": "" }, { "docid": "92c9c20313ad397380eb7702629b18ca", "score": "0.52800775", "text": "public function __set($name, $value) {\n\t\t/*\n\t\t * First we need to check if the field already exists. In the event of us\n\t\t * overwriting the field we need to remove it from the already existing \n\t\t * indexes\n\t\t */\n\t\tif (isset($this->fields[$name])) {\n\t\t\tunset($this->$name);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Check if the schema received a field. Because if that's not the case we\n\t\t * can't deal with it properly.\n\t\t */\n\t\tif (!$value instanceof Field) {\n\t\t\tthrow new PrivateException('Schema received something else than a field', 1710181717);\n\t\t}\n\t\t\n\t\t$value->setName($name);\n\t\t$value->setSchema($this);\n\t\t$this->fields[$name] = $value;\n\t\t\n\t}", "title": "" }, { "docid": "47a8bd523b74de17be3d2732ff754a86", "score": "0.5274345", "text": "public function setJobMetaField($id, $field, $value)\n {\n $this->redis->set(\"{$id}:{$field}\", serialize($value));\n }", "title": "" }, { "docid": "3b95830ea522df854f6c56bc95d8db30", "score": "0.52684397", "text": "private function setValDb() {\n foreach ($this->arrFields as $name => $fieldObj) {\n $val = $this->getValueDql($name);\n if ($val) {\n $this->arrFields[$name]->setValue($val);\n }\n }\n }", "title": "" }, { "docid": "f6518d589316f7bae217de059be9932e", "score": "0.52674526", "text": "function field($name, $value = null) {\n if(isset($value)) return $this->write_field($name, $value);\n return $this->read_field($name);\n }", "title": "" }, { "docid": "3cb4f850f8334b943118ca7aa8ed3061", "score": "0.5259515", "text": "public function addField($fieldName, $fieldValue, $fieldBoostValue){}", "title": "" }, { "docid": "9f74507b559c7acf217d77c60d548235", "score": "0.5258313", "text": "public function addToField( $field, $amount );", "title": "" }, { "docid": "f019a4a852ded71bb5448754e26cb65e", "score": "0.52408826", "text": "public function getOldFieldValue($field);", "title": "" }, { "docid": "88387f25329f0ed0ad12981573336367", "score": "0.5223681", "text": "public function store();", "title": "" }, { "docid": "0243bfed4cbc799cb613615937ecc0ef", "score": "0.5219042", "text": "public function set($table_field, $expression_or_literal){}", "title": "" }, { "docid": "aaa28c91bde2123bb6c6c5370bf65f94", "score": "0.5218827", "text": "public function appendField(Field $field) {\n $this->fields[] = $field;\n }", "title": "" }, { "docid": "a696ad3c20486a1738b1d47c856d2fe4", "score": "0.52154535", "text": "public function addField( Field $field ) {\n\t\t$this->_fields[ $field->name ] = $field;\n\t}", "title": "" }, { "docid": "6e98ac97832409e6c53884f1f0be49a3", "score": "0.5211745", "text": "private function _primaryKey( &$field )\n\t{\n\t\tif ( $field->primaryKey == false )\n\t\t{\n\t\t\t$this->_primaryKey[] =& $field;\n\t\t\t$field->primaryKey = true;\n\t\t}\n\t}", "title": "" }, { "docid": "109ce2603092f04b15901742ae20bc88", "score": "0.5203927", "text": "public function duplicate_field( $field )\n {\n return $field;\n }", "title": "" }, { "docid": "a00e4636b14b209674764b2039983fd3", "score": "0.5201305", "text": "function session_pgsql_set_field($value){}", "title": "" }, { "docid": "dc8357511edacc1d5f75d5beffebdfda", "score": "0.51997846", "text": "function store($key, $data);", "title": "" }, { "docid": "ccc86323e588fcf5b44b7913de1d2aa6", "score": "0.51857", "text": "public function save()\n {\n $fields = array_keys($this->getFields());\n $fieldTypes = $this->getFieldTypes();\n $data = [];\n foreach ($fields as $field) {\n $val = $this->$field;\n // continue if field not changed\n if (!$this->isNew && $val === $this->oldFields[$field]) {\n continue;\n }\n switch ($fieldTypes[$field]) {\n case self::FIELD_TYPE_INT:\n $val = (int)$val;\n break;\n\n case self::FIELD_TYPE_BOOL:\n $val = (int)(bool)$val;\n break;\n\n case self::FIELD_TYPE_FLOAT:\n $val = (float)$val;\n break;\n\n case self::FIELD_TYPE_ARRAY:\n $val = json_encode($val);\n break;\n\n case self::FIELD_TYPE_STRING:\n $val = (string)$val;\n break;\n\n case self::FIELD_TYPE_PK:\n default:\n break;\n }\n $data[$field] = $val;\n }\n if (empty($data)) {\n return true;\n }\n if ($this->isNew) {\n $newId = $this->getStorageEngine()->add($data, $this->getTableName());\n if ($newId > 0) {\n $this->{$this->getPrimaryKey()} = $newId;\n return true;\n }\n return false;\n }\n\n return $this->getStorageEngine()->update($this->params, $data, $this->getTableName() , 1);\n }", "title": "" }, { "docid": "ae062c91274404120d65fe04fac2f862", "score": "0.5181093", "text": "public function setValue($field, $value)\n {\n if (in_array($field, $this->fields)) {\n $this->suppliedData[$field] = $value;\n }\n }", "title": "" }, { "docid": "88853e348d7e49bd67f52de8dfc11769", "score": "0.5180089", "text": "public function set($collection_field, $expression_or_literal){}", "title": "" }, { "docid": "36bf64a1d433acdf44b987e1c845ee7a", "score": "0.5174942", "text": "public function saveValue(array $field, $model): void {\n try {\n $model[$this->data->get('column')] = new \\DateTime($field['value']);\n } catch (\\Exception $e) {\n abort(500, $e->getMessage());\n }\n }", "title": "" } ]
8235776fad35bf36f6a9a53f6ec5824d
Set what this page should do; "page", "data", or "redirect".
[ { "docid": "b2de8c85d1d92639ccac72d5ca94708f", "score": "0.0", "text": "public function set_mode($mode) {\n\t\t$this->mode = $mode;\n\t}", "title": "" } ]
[ { "docid": "4e35c0def0bc7a91b0b1e63d54de5d45", "score": "0.6779475", "text": "public function setPage($page);", "title": "" }, { "docid": "4e35c0def0bc7a91b0b1e63d54de5d45", "score": "0.6779475", "text": "public function setPage($page);", "title": "" }, { "docid": "7e2d9ea1a9bfcc2e29edbfc97f253ae1", "score": "0.6763065", "text": "public function set_page_data($data) {\n\t\t$this->page_data['page_data'] = $data;\n\t}", "title": "" }, { "docid": "f0181b5c7ce32d9167c842dea3c6ddcd", "score": "0.66018665", "text": "public function setPage($page)\n\t{\n\t $this->page = $page;\n\t}", "title": "" }, { "docid": "36d5912af8d7717f5657dadccd9d0b18", "score": "0.64029056", "text": "public function setCurrentPage($page){ }", "title": "" }, { "docid": "6b0487ce82506fa63d5d6d1e18506d88", "score": "0.6366502", "text": "public function setPage($page)\n {\n $this->parameters['page'] = $page;\n }", "title": "" }, { "docid": "28bcd68d587cf53369517781102ecee4", "score": "0.63007796", "text": "private function setCurrentPage()\r\n {\r\n if (isset($_GET['page'])) {\r\n $this->currentPage = (int) $_GET['page'];\r\n }\r\n }", "title": "" }, { "docid": "8e972dfb45dadcfca7be84bd677d441d", "score": "0.6279789", "text": "public function setPage() {\n $this->loadLoginBox();\n $this->loadBody();\n $this->loadFooter();\n \n }", "title": "" }, { "docid": "7ff879e58a4b6fa27a3ecbb50b213c31", "score": "0.6232581", "text": "public function setupPageData() {\n\t\tif ( isset($this->pageMeta) && is_array($this->pageMeta) ) {\n\t\t\tforeach ($this->pageMeta as $key => $value) {\n\t\t\t\t$this->$key = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b0f560db61137a232fb53204061002f2", "score": "0.6192613", "text": "private function setupPageInformation() {\n $this->logger->comment('Please provide the following information. Don\\'t worry, you can always change these settings later from the dashboard.');\n\n // Super Admin User\n $steps = $this->keepOldData ? 1 : 4;\n $this->logger->comment(\"Step 1/$steps: Creating the first admin user\");\n $this->setupAdmin();\n\n // Page Title\n $pageTitle = $this->settings['title'] ?? $this->ask('Step 2/4: Title of your page');\n $this->savePageInfo('title', $pageTitle);\n\n // Page Subtitle\n $pageSubtitle = $this->settings['subtitle'] ?? $this->ask('Step 3/4: Subtitle of your page', false);\n $this->savePageInfo('subtitle', $pageSubtitle);\n\n // Page Contact email address\n $pageEmail = $this->settings['email'] ??\n $this->ask('Step 4/4: The contact email address to use for the contact form', false);\n $technicalEmail = $this->settings['email_technical'] ?? $pageEmail;\n $this->savePageInfo('email', $pageEmail);\n $this->savePageInfo('email_technical', $technicalEmail);\n\n }", "title": "" }, { "docid": "34731fd0b066f40159a20255f4b35af0", "score": "0.6168802", "text": "public function setCurrentPage(Page $page);", "title": "" }, { "docid": "794d93ff02491590d4f5d1f509fb2a9c", "score": "0.61300206", "text": "public function amOnPagesPage(){\n $this->amOnPage($this->adminUrl . '/edit.php?post_type=page');\n }", "title": "" }, { "docid": "4091632d0f0096a7c3e88f9fb4a892fe", "score": "0.6122594", "text": "private function setAllPagesInfo() {\n // Show all next page URLs as a list with test buttons, so that the user can just click the button to test the next page.\n if ($allPageUrls = $this->postData->getAllPageUrls()) {\n $this->addInfo(\n _wpcc(\"Next Page URLs\"),\n Utils::view('site-tester/urls-with-test')->with([\n 'urls' => $allPageUrls,\n 'testType' => TestType::POST,\n 'hideThumbnails' => true\n ])->render()\n );\n }\n }", "title": "" }, { "docid": "1623f38ab73cedc46243ebbeef7d77c5", "score": "0.6119886", "text": "function setPage($pageNumber) {\n\t\t\n\t}", "title": "" }, { "docid": "e735333dbbdd62a60bb406a0e4240ac2", "score": "0.6095526", "text": "public function setHeaderData() {\n\t\t\t$this->assign('_PAGE_URL', PAGE_URL);\n\t\t\t$this->assign('_META', $this->_meta);\n\t\t\t$this->assign('_STYLES', $this->_styles);\n\t\t\t$this->assign('_SCRIPTS', $this->_scripts);\n\t\t}", "title": "" }, { "docid": "725d3136d63a4d0f4147c5b4e899ffad", "score": "0.60895896", "text": "function set_page () {\n if (isset($_POST['pagename'])) {\n $_SESSION['pagename'] = $_POST['pagename'];\n };\n\n if (isset($_SESSION['pagename'])) {\n $GLOBALS['pagename'] = $_SESSION['pagename'];\n } else {\n // POST Error\n // TODO create page var in config\n $GLOBALS['pagename'] = '../index.html';\n };\n\n // Get template (from pagename)\n // TODO FIX - to get\n // TODO to anoter f get/set +private template\n $GLOBALS['template'] = file_get_contents($GLOBALS['pagename']);\n\n //TODO same\n // Get HTML list\n $GLOBALS['html_list'] = glob(\"../*.html\");\n\n //TODO same\n // Parser\n // create HTML DOM\n $GLOBALS['html'] = file_get_html($GLOBALS['pagename']);\n }", "title": "" }, { "docid": "8c47ef9a45856af31a06ca99978f3b05", "score": "0.60520977", "text": "function set_target_page($value) {\n $this->target_page = $value;\n }", "title": "" }, { "docid": "4418ebd99b37258aa4425137cf4f7d9e", "score": "0.60269415", "text": "protected function setPages() {\n // Build array of pages from outline\n $chapters = $this->outline->xpath('chapter');\n $this->pages = $this->xmlObjToArray($chapters, 'pages');\n\n // See if page was requested and set if appropriate\n if(isset($_REQUEST['page'])) {\n // See if all was requested\n if($_REQUEST['page'] == 'all') {\n $this->currentPage = 'all';\n return;\n }\n if(in_array($_REQUEST['page'], $this->pages)) {\n $this->currentPage = $_REQUEST['page'];\n }\n }\n // Otherwise, set default\n if(!isset($this->currentPage)) $this->currentPage = $this->outline->defaultPage;\n\n // Find previus and next pages\n $curKey = null;\n foreach($this->pages as $key => $val) {\n if($val == $this->currentPage) {\n $curKey = $key;\n break;\n }\n }\n // Set values\n if($curKey > 0) $this->previousPage = $this->pages[$curKey - 1];\n if($curKey < (count($this->pages) - 1)) $this->nextPage = $this->pages[$curKey + 1];\n }", "title": "" }, { "docid": "cb5ceabc6177654fed8f926e90c531aa", "score": "0.59863687", "text": "public function prepare_page_data( &$data ) {\n\t\t$default_values = [\n\t\t\t'id' => '',\n\t\t\t'title' => '',\n\t\t\t'hook' => '',\n\t\t\t'required_capability' => 'manage_options',\n\t\t\t'file' => 'settings-page.php',\n\t\t];\n\t\t$data = wp_parse_args( $data, $default_values );\n\t\t$data['url'] = is_string( $this->menu['position'] ) ? admin_url( $this->menu['position'] ) : admin_url( 'admin.php' );\n\t\t$data['url'] .= strpos( $data['url'], '?' ) === false ? '?' : '&';\n\t\t$data['url'] .= http_build_query( ['page' => $data['id'] ] );\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0d773bf95ded497e11531dacfc51e64c", "score": "0.5983706", "text": "public static function set_page_type()\n\t{\n\t\t//idsabling this since DFP was acting up\n\t\t/*\n\t\tif(is_home())\n\t\t\t$page_type = 'home'; \t//home\n\t\telseif (is_tax('location'))\n\t\t\t$page_type = 'location';\t//special post types\n\t\telseif (in_category('events'))\n\t\t\t$page_type = 'events';\t//special post types\n\t\telseif (is_category())\n\t\t\t$page_type = 'category'; \t//category top page\n\t\telseif (is_single())\n\t\t\t$page_type = 'article';\t//blog post article\n\t\telse\n\t\t\t$page_type = 'default';\n\t\t*/\n\n\t\t$page_type = 'default';\n\t\tself::$page_type = $page_type;\n\t}", "title": "" }, { "docid": "082645524566eb70b57e0c6225c8b58e", "score": "0.59256625", "text": "protected function _preparePage()\n\t\t{\n\t\t\t$this->getCollection()->setPage(\n\t\t\t\t\t$this->getParam($this->_varNamePage, $this->_defaultPage),\n\t\t\t\t\t$this->getParam($this->_varNameLimit, $this->_defaultLimit));\n\t\t}", "title": "" }, { "docid": "680a01ae9c75b865289e4f5af3d2bb5c", "score": "0.59065074", "text": "function set_page_action() {\n\treturn PageAction::SetAction();\n}", "title": "" }, { "docid": "7ea3bbe354fd5027b09a5fd816c54ec0", "score": "0.5892886", "text": "public function init()\n\t{\n\t\tif($this->header===null)\n\t\t\t$this->header=Yii::t('yii','Go to page: ');\n\t\tif(!isset($this->htmlOptions['id']))\n\t\t\t$this->htmlOptions['id']=$this->getId();\n\t\tif($this->promptText!==null)\n\t\t\t$this->htmlOptions['prompt']=$this->promptText;\n\t\tif(!isset($this->htmlOptions['onchange']))\n\t\t\t$this->htmlOptions['onchange']=\"if(this.value!='') {window.location=this.value;};\";\n\t}", "title": "" }, { "docid": "08b27c81e9067e11af85ffcf2a60f143", "score": "0.5880963", "text": "private function definePage() {\n\t\t\t//aan de hand van de paginanaam om welke pagina het gaat.\n\t\t\t//Vervolgens wordt deze CONSTANTE: PAGE in de verdere applicatie gebruikt \n\t\t\t//om keuzes te maken.\n\t\t\t$url \t= $_SERVER['REQUEST_URI'];\n\t\t\t$page \t= pathinfo( parse_url( $url, PHP_URL_PATH ), PATHINFO_FILENAME );\n\t\t\t\n\t\t\tif($page == ROOTMAPNAME) { $page = \"index\"; }\n\t\t\t\n\t\t\tdefine(\"PAGE\", $page);\n\t\t}", "title": "" }, { "docid": "f5970aceada7ebac1c3b4e4a88db72ee", "score": "0.5877328", "text": "function about(&$page) {\r\n\t\r\n\t\t//naplnit $page->data->premenna datami pre sablonu\r\n\t\t$page->data->test = 'This is from About action!';\r\n\t\r\n\t}", "title": "" }, { "docid": "309d705bc8c0196bb26f70888beca623", "score": "0.58560485", "text": "protected function _page_changed () {}", "title": "" }, { "docid": "76f90886841ba728ba88edb936e3da4e", "score": "0.58534443", "text": "function FutonPage($args = false) {\n\t\t$this->data = (object)array('route' => '', 'title' => '', 'meta' => array(), 'layout' => '', 'styles' => array(), 'javascripts' => array(), 'widgets' => array(), 'custom' => array());\n\t\tif($args !== false) {\n\t\t\terror_log(print_r($args,true));\n\t\t\tlist($field, $value) = $args;\n\t\t\tswitch($field):\n\t\t\t\tcase 'id':\n\t\t\t\t\t$this->id = $value;\n\t\t\t\tcase 'route':\n\t\t\t\t\t$this->data->$field = $value;\n\t\t\t\t\t$this->get_page();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->data->$field = $value;\n\t\t\tendswitch;\n\t\t}\n\t}", "title": "" }, { "docid": "cad5936f2bd00de1a1c7ea2a5e48fb25", "score": "0.5849223", "text": "function Response(&$page) {\n\t\t\t@$this->_page = &$page;\n\t\t}", "title": "" }, { "docid": "bb11f60f9204ae3b5cb6b7e42dbed6d7", "score": "0.5837826", "text": "public function page($page)\n {\n \n }", "title": "" }, { "docid": "20bb3997c4bcc0db9d33f98a1114f8bf", "score": "0.5779664", "text": "public function facebook_set_page() {\n // List all facebook pages and render the form\n $response = $this->fb->get('/me?fields=id,name,accounts', $this->token);\n $user = $response->getGraphUser();\n $accounts = $user['accounts'];\n $sfid = $_POST['sfid'];\n\n $this->fez->load->view('sego/facebook',array('accounts'=>$accounts, 'sfid'=>$sfid));\n\n // Handle callback and process form\n if ($_POST['pageID']) {\n //SET FACEBOOK RECORD\n $this->fez->mongo->set(array(\n 'tokens.facebook.page_id'=>$_POST['pageID'],\n 'tokens.facebook.page_name'=>$_POST['page_name']\n ))\n ->in('records')\n ->where(array('sfid'=>$_POST['sfid']))\n ->go();\n }\n\n }", "title": "" }, { "docid": "d9fa519621801e00cc0160f188d9be42", "score": "0.57730335", "text": "public function setPage($page)\n {\n # Check if the passed value is empty.\n if (!empty($page)) {\n # Strip slashes, decode any html entities, strip any tags, and set the data member.\n $this->page = strip_tags(html_entity_decode(stripslashes($page), ENT_COMPAT, 'UTF-8'));\n } else {\n # Explicitly set the data member to NULL.\n $this->page = null;\n }\n }", "title": "" }, { "docid": "565a7f1790a93f43923e30af725b5e26", "score": "0.5762713", "text": "private function GetPageDetails()\r\n\t{\r\n\t\t$ReqURL = $_SERVER['REQUEST_URI']; // Requested URL we have to Parse\r\n\t\t$trimmed = trim($ReqURL,\"/\");\r\n\t\t$this->page = $trimmed;\r\n\t}", "title": "" }, { "docid": "de41eb7ecf7ff26c798d38356babaf0c", "score": "0.5758625", "text": "public function handleRedirects(&$page) { }", "title": "" }, { "docid": "b0bd0d9b2ed7c2835da15c3643f963a5", "score": "0.5751646", "text": "abstract public function page_config();", "title": "" }, { "docid": "6d0ed15e2c23508714a71d05b71f0c64", "score": "0.5722222", "text": "function set_current_page() {\n\t\t\n if( isset($_GET[ $this->parameterName ]) ){\n if( $_GET[ $this->parameterName ] > 0 ){\n $this->current_page = $_GET[ $this->parameterName ];\n }else{\n $this->current_page = 1;\n }\n }else{\n $this->current_page = 1;\n }\t\n\t\n }", "title": "" }, { "docid": "2d3202647e3fa13202e6ff1da05a5345", "score": "0.57162076", "text": "public function setRequestedPage()\n\t{\n\t\t$page = $this->getRequestedPage();\n\n\t\tPaginator::currentPageResolver(function() use ($page)\n\t\t{\n\t\t\treturn $page;\n\t\t});\n\t}", "title": "" }, { "docid": "b91c903d4b387d4b5d5fb2b51db0a4c9", "score": "0.5713899", "text": "public function setPage(Page $page) {\n\t\t$this->page = $page;\n\t\t$this->bookmarks->setPage($page);\n\t}", "title": "" }, { "docid": "2300627043524e26d2102e0a87e33eb4", "score": "0.5712147", "text": "public function setPageHeading($pageHead) { //set the page heading \n $this->pageHeading = $pageHead;\n }", "title": "" }, { "docid": "60955290720c8a11326d52b44714dc48", "score": "0.57042766", "text": "function page_pref($p){\n\t\t$p->frame('Preferences')->add('MVCForm')\n\t\t\t->setController('Controller_User');\n\t}", "title": "" }, { "docid": "4cf0ae81a37fcbfad5f9263fd9aa9c37", "score": "0.5703286", "text": "function db_setNewPage($in) { cleanup($in);\n\t\treturn db_MAIN(\"\n\t\t\tINSERT INTO `migrate_content`\n\t\t\t\t(`site`,`html`,`content`,`clean`,`page`)\n\t\t\tVALUES(\n\t\t\t\t{$in['site']},\n\t\t\t\t{$in['html']},\n\t\t\t\t{$in['content']},\n\t\t\t\t{$in['clean']},\n\t\t\t\t{$in['page']}\n\t\t\t)\n\t\t\");\n\t}", "title": "" }, { "docid": "c919b75f00006a85eae26764ffef2957", "score": "0.5703265", "text": "public function defaultAction(){\n \t$this->request->component = $this->defaultComponent;\n \t$this->request->task = $this->defaultTask;\n \t$this->request->params[\"pageType\"] = $this->defaultPageType;\n \t$this->request->params[\"page\"] = $this->defaultPage;\n\n }", "title": "" }, { "docid": "f7e93a29e0ab47e83d2202a924e02e27", "score": "0.5696823", "text": "function setDonePage($donepage) {\n $this->_donePage=$donepage;\n }", "title": "" }, { "docid": "b7758432232bced5fc8d042ca4498c37", "score": "0.56953746", "text": "public function setPages() {\r\n\r\n $this->pages = array(\r\n array(\r\n 'page_title' => 'Cser Plugin',\r\n 'menu_title' => 'Cser WP-Rest',\r\n 'capability' => 'manage_options',\r\n 'menu_slug' => 'cser_plugin',\r\n 'callback' => array( $this->callbacks, 'adminDashboard' ),\r\n 'icon_url' => 'dashicons-rest-api',\r\n 'position' => 110\r\n )\r\n );\r\n }", "title": "" }, { "docid": "859c196cd6acd7f5f7e7aaa5fa42589e", "score": "0.56934273", "text": "function put_page_data($name, $value)\n{\n return $_POST[PAGE_DATA_PREFIX . $name] = $value;\n}", "title": "" }, { "docid": "03ee9286a8ae7e7c74fbcef1a71cfd68", "score": "0.5689243", "text": "public function renderPageSettings(PageContract $page = null);", "title": "" }, { "docid": "fa05cb2f758c3245eb1cf5a38fb69157", "score": "0.56888306", "text": "public function setPage($page = 1)\n\t{\n\t\t$this->pagination['page'] = $page;\n\n\t\t$this->setRequestedPage();\n\t}", "title": "" }, { "docid": "95f89cfc22dc433d9086b216d24d94b3", "score": "0.56883126", "text": "function save_my_settings() {\n if ( ! parent::save_my_settings() ) { return; }\n switch ( $_REQUEST['page'] ) {\n case 'slp_general':\n $this->instantiate( 'Admin_General' );\n break;\n }\n\t}", "title": "" }, { "docid": "129e9c5af684b4a9b881063c9f397082", "score": "0.567487", "text": "public function onPage(&$page, &$pageData){\n\t\tif($page == \"example\" || $page == \"example/\"){\n\t\t\tprint_r(\"<h3>Example Listing of pages!</h3>\");\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "827d749964d995c3cb0e7a8f0682e5d5", "score": "0.5673403", "text": "public function beforeAction()\n {\n parent::beforeAction();\n $pageID = $this->actionParams['pageID'];\n if (!array_key_exists($pageID, $this->_pages)) {\n $this->addMessage('error', \"You are not authorized to view that page.\");\n $this->redirectApplyFirstPage();\n }\n if ($this->_applicant->isDeactivated() or $this->_applicant->isLocked() or ($this->_application->getClose() < new DateTime('now') and (!$this->_applicant->getDeadlineExtension() or $this->_applicant->getDeadlineExtension() < new \\DateTime('now')))) {\n $this->redirectApplyPath('status');\n }\n $this->addScript($this->path('resource/scripts/controllers/apply_page.controller.js'));\n $this->_page = $this->_pages[$pageID];\n $this->setVar('page', $this->_page);\n $this->setVar('currentAnswerID', false);\n }", "title": "" }, { "docid": "7dbf808fd87f30a1c8a577b540d1daa1", "score": "0.56686896", "text": "public function _edit_page()\n {\n $_id = get_param_wiki_chain('id');\n $id = intval($_id[0]);\n\n if (!has_category_access(get_member(), 'wiki_page', strval($id))) {\n access_denied('CATEGORY_ACCESS');\n }\n\n if (post_param_integer('delete', 0) == 1) {\n check_delete_permission('cat_low', null, array('wiki_page', $id));\n\n wiki_delete_page($id);\n\n require_code('fields');\n if (has_tied_catalogue('wiki_page')) {\n delete_form_custom_fields('wiki_page', strval($id));\n }\n\n $_url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF');\n $url = $_url->evaluate();\n } else {\n check_edit_permission('cat_low', null, array('wiki_page', $id));\n\n require_code('content2');\n $metadata = actual_metadata_get_fields('wiki_page', strval($id));\n\n require_code('permissions2');\n set_category_permissions_from_environment('wiki_page', strval($id), 'cms_wiki');\n wiki_edit_page($id, post_param_string('title'), post_param_string('post'), post_param_string('notes', ''), (get_option('wiki_enable_content_posts') == '1') ? post_param_integer('hide_posts', 0) : 1, post_param_string('meta_keywords', ''), post_param_string('meta_description', ''), $metadata['submitter'], $metadata['add_time'], $metadata['views']);\n\n require_code('fields');\n if (has_tied_catalogue('wiki_page')) {\n save_form_custom_fields('wiki_page', strval($id));\n }\n\n if (addon_installed('content_reviews')) {\n require_code('content_reviews2');\n content_review_set('wiki_page', strval($id));\n }\n\n if (addon_installed('awards')) {\n require_code('awards');\n handle_award_setting('wiki_page', strval($id));\n }\n\n $url = get_param_string('redirect');\n }\n\n // Show it worked / Refresh\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "title": "" }, { "docid": "f337e95d140e241a5b9ddd01e3bc72ec", "score": "0.56672615", "text": "public function add_page() {\n\t\tadd_options_page(\n\t\t\t'GraphQL Persited Queries',\n\t\t\t'GraphQL Persited Queries',\n\t\t\t'manage_options',\n\t\t\t$this->page,\n\t\t\t[ $this, 'render_settings' ]\n\t\t);\n\n\t}", "title": "" }, { "docid": "8dedac9790773bc312a27c71d4c0ad11", "score": "0.5660486", "text": "public function setMetaDataValues()\n {\n //based on the title strategy, the helper method will set the complete title\n if ($this->seoMetadata->getTitle() !== '') {\n $title = $this->createTitle();\n $this->sonataPage->setTitle($title);\n $this->sonataPage->addMeta('names', 'title', $title);\n }\n\n if ($this->seoMetadata->getMetaDescription() != '') {\n $this->sonataPage->addMeta(\n 'names',\n 'description',\n $this->createDescription()\n );\n }\n\n if ($this->seoMetadata->getMetaKeywords() != '') {\n $this->sonataPage->addMeta(\n 'names',\n 'keywords',\n $this->createKeywords()\n );\n }\n\n //if the strategy for duplicate content is canonical, the service will trigger an canonical link\n switch ($this->container->getParameter('cmf_seo.content.strategy')) {\n case 'canonical':\n $this->sonataPage->setLinkCanonical($this->seoMetadata->getOriginalUrl());\n break;\n case 'redirect':\n $this->setRedirect($this->seoMetadata->getOriginalUrl());\n break;\n }\n }", "title": "" }, { "docid": "cbcf8189d0656ce6e8be39da5224286c", "score": "0.56426424", "text": "public function setPages()\n {\n $demo_control = apply_filters(\"magicform_demo_check_license\",\"notdemo\",10,3);\n \n $submission_count = $this->new_submissions();\n $title = $submission_count > 0 ? sprintf('Magic Form <span class=\"awaiting-mod\">%d</span>', intval($submission_count)) : 'Magic Form';\n\n $page_title = \"Magic Form\";\n $slug = \"magicform_admin\";\n $capability = $demo_control != \"demo\"?\"manage_options\":\"edit_posts\";\n $icon = MAGICFORM_URL . \"assets/images/logo_light_square.svg\";\n $position = 42;\n $callback = null;\n\n /**\n * Main Menu\n */\n add_menu_page($page_title, $title, $capability, $slug, $callback, $icon, $position);\n\n /**\n * Dashboard Page\n * Subpage\n */\n add_submenu_page($slug, esc_html__(\"Dashboard\",\"magicform\"), esc_html__(\"Dashboard\",\"magicform\"), $capability, $slug, array($this, \"view\"));\n }", "title": "" }, { "docid": "8c85d8a960c16e382aa7aae2c73ea45c", "score": "0.5641392", "text": "protected function genericPage(\\Jazzee\\Entity\\Page $page, \\stdClass $data)\n {\n $page->tempId();\n $page->notGlobal();\n $page->setType($this->_em->getRepository('\\Jazzee\\Entity\\PageType')->find($data->typeId));\n //create a temporary application page so we can access the JazzeePage and do setup\n if ($data->status == 'new') {\n $applicationPage = new \\Jazzee\\Entity\\ApplicationPage();\n $applicationPage->setPage($page);\n $applicationPage->getJazzeePage()->setController($this);\n $applicationPage->getJazzeePage()->setupNewPage();\n unset($applicationPage);\n //give any created elements a temporary id so they will display in the form\n foreach ($page->getElements() as $element) {\n $element->tempId();\n foreach ($element->getListItems() as $item) {\n $item->tempId();\n }\n }\n }\n $page->setTitle($data->title);\n $page->setMin(empty($data->min) ? null : $data->min);\n $page->setMax(empty($data->max) ? null : $data->max);\n if ($data->isRequired) {\n $page->required();\n } else {\n $page->optional();\n }\n if ($data->answerStatusDisplay) {\n $page->showAnswerStatus();\n } else {\n $page->hideAnswerStatus();\n }\n $page->setInstructions(empty($data->instructions) ? null : $data->instructions);\n $page->setLeadingText(empty($data->leadingText) ? null : $data->leadingText);\n $page->setTrailingText(empty($data->trailingText) ? null : $data->trailingText);\n\n foreach ($data->variables as $v) {\n $page->setVar($v->name, $v->value);\n }\n foreach ($data->elements as $obj) {\n $element = new \\Jazzee\\Entity\\Element;\n $this->genericElement($element, $obj);\n $page->addElement($element);\n }\n foreach ($data->children as $obj) {\n $childPage = new \\Jazzee\\Entity\\Page();\n $this->genericPage($childPage, $obj);\n $page->addChild($childPage);\n }\n $this->_em->clear();\n }", "title": "" }, { "docid": "b249f96fd1e787bbff23dc07711f40e1", "score": "0.5638838", "text": "function setCurrentPage($currentPage);", "title": "" }, { "docid": "e37397cf541d1ed0fe606bf730291c41", "score": "0.5635177", "text": "protected function byGET()\n {\n if(!isset($_GET['page'])) {\n self::render();\n } else {\n switch ($_GET['page']) {\n case 'single':\n self::render('single.php',\n [\n \"title\" => \"Single Page\",\n \"activeWomen\" => \"header-menu__item_active\"\n ]);\n break;\n default:\n self::render();\n }\n }\n }", "title": "" }, { "docid": "b2b2daf2047c426d65613b6bb691b0c4", "score": "0.56346697", "text": "public function page();", "title": "" }, { "docid": "a46a710b4cbe12811dae56ef081766ff", "score": "0.56332296", "text": "public function definePage()\n {\n global $account_info, $lang, $config;\n\n $page = $this->cPage == 'index' ? '' : $this->cPage;\n\n $sql = \"SELECT * FROM `{db_prefix}pages` WHERE `Path` = CONVERT('{$page}' USING utf8) AND `Status` = 'active' LIMIT 1\";\n $pageInfo = $this->getRow($sql);\n\n /* system page request */\n if ($pageInfo) {\n if (\n ($pageInfo['Plugin'] && $pageInfo['Type'] == 'system' && !is_readable(RL_PLUGINS . $pageInfo['Plugin'] . RL_DS . $pageInfo['Controller'] . '.inc.php'))\n || (empty($pageInfo['Controller'])\n || $GLOBALS['sError']\n || (!$pageInfo['Plugin'] && !is_readable(RL_CONTROL . $pageInfo['Controller'] . '.inc.php'))\n //|| ($pageInfo['Menus'] == '2' && !isset($account_info['ID']))\n )\n ) {\n $page = 404;\n if ($config['404_header'] || !isset($config['404_header'])) {\n header(\"HTTP/1.0 404 Not Found\");\n }\n\n $sql = \"SELECT * FROM `{db_prefix}pages` WHERE `Key` = '{$page}' AND `Status` = 'active' LIMIT 1\";\n $pageInfo = $this->getRow($sql);\n }\n }\n /* account info request */\n else {\n $address = $this->cPage;\n\n $sql = \"SELECT `ID`, `Type` FROM `{db_prefix}accounts` WHERE `Own_address` = CONVERT('{$address}' USING utf8) LIMIT 1\";\n $account_details = $this->getRow($sql);\n\n $pageInfo = $this->fetch('*', array('Key' => 'at_' . $account_details['Type'], 'Status' => 'active'), null, 1, 'pages', 'row');\n\n $_GET['id'] = $account_details['ID'];\n\n if (empty($pageInfo['Controller'])\n || !is_readable(RL_CONTROL . $pageInfo['Controller'] . '.inc.php')\n || ($pageInfo['Menus'] == '2' && !isset($account_info['ID'])\n || $GLOBALS['sError']\n )\n ) {\n $page = 404;\n if ($config['404_header'] || !isset($config['404_header'])) {\n header(\"HTTP/1.0 404 Not Found\");\n }\n\n $sql = \"SELECT * FROM `{db_prefix}pages` WHERE `Key` = '{$page}' AND `Status` = 'active' LIMIT 1\";\n $pageInfo = $this->getRow($sql);\n }\n }\n\n if (!$pageInfo) {\n return false;\n }\n\n if ($pageInfo['Controller'] == 'listing_type' && ($_GET['listing_id'] || (!$config['mod_rewrite'] && $_GET['id']))) {\n $pageInfo['Key'] = 'view_details';\n }\n $pageInfo = $GLOBALS['rlLang']->replaceLangKeys($pageInfo, 'pages', array('name', 'title', 'meta_description', 'meta_keywords', 'h1'));\n\n return $pageInfo;\n }", "title": "" }, { "docid": "a3cd35652395d74bee9dd957f4fad41e", "score": "0.5614026", "text": "public function whatisthis()\n {\n $this->pageTitle = ' - WTF is this?';\n }", "title": "" }, { "docid": "68f21122ee024db1da1e145c47246b8f", "score": "0.56081796", "text": "public function getUrlPageControl(){\n\n //check page on the url\n if(isset($this->get['page'])){\n if(!is_numeric($this->get['page'])){\n throw new \\InvalidArgumentException('page value on the url is not valid');\n }\n }\n }", "title": "" }, { "docid": "f0d31ed077e2f3afb86ec9b354b874b3", "score": "0.5600766", "text": "public function setPage($content) {\n $VHome= USingleton::getInstance(\"VHome\");\n foreach ($content as $key => $value) {\n if($value){\n switch ($key) {\n case \"body\":\n $VHome->setBody($value);\n break;\n\n case \"header\":\n $VHome->setHeader($value);\n break;\n\n case \"footer\":\n $VHome->setFooter($value);\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "b038dfb12703fb4f660c17cee0e541f6", "score": "0.5593928", "text": "public function test_pagetype_defaults_to_script() {\n $this->assertEqual('admin-report-unittest-index', $this->testpage->pagetype);\n }", "title": "" }, { "docid": "0ab5f54e7dd7639bc12f7141bd02da26", "score": "0.5592211", "text": "public function addPage()\n {\n }", "title": "" }, { "docid": "e0792d64db50d0a940cb17c500a6f820", "score": "0.5586474", "text": "public function setPage($page)\n {\n if(is_numeric($page) && $page > 0) {\n $this->page = $page - 1;\n }else{\n $this->page = 0;\n }\n }", "title": "" }, { "docid": "504d02cd97dc85784369bccf21d45d20", "score": "0.5570517", "text": "public function prepareVars()\n {\n $this->page['user'] = $this->user();\n $this->page['canRegister'] = $this->canRegister();\n $this->page['loginAttribute'] = $this->loginAttribute();\n $this->page['loginAttributeLabel'] = $this->loginAttributeLabel();\n $this->page['updateRequiresPassword'] = $this->updateRequiresPassword();\n $this->page['rememberLoginMode'] = $this->rememberLoginMode();\n }", "title": "" }, { "docid": "9222c173de6241d72e3c1aeaf36f8a16", "score": "0.55524695", "text": "public function pre_run()\n {\n $type = get_param_string('type', 'browse');\n\n require_lang('wiki');\n require_code('wiki');\n\n set_helper_panel_tutorial('tut_wiki');\n\n if ($type == 'choose_page_to_edit') {\n set_helper_panel_text(comcode_lang_string('DOC_WIKI'));\n\n breadcrumb_set_self(do_lang_tempcode('PAGE'));\n\n $this->title = get_screen_title('WIKI_EDIT_PAGE');\n }\n\n if ($type == 'add_page') {\n $this->title = get_screen_title('WIKI_ADD_PAGE');\n }\n\n if ($type == '_add_page') {\n $this->title = get_screen_title('WIKI_ADD_PAGE');\n }\n\n if ($type == 'edit_page') {\n $breadcrumbs = wiki_breadcrumbs(get_param_string('id', false, true), null, true, true);\n breadcrumb_set_parents($breadcrumbs);\n breadcrumb_set_self(do_lang_tempcode('WIKI_EDIT_PAGE'));\n\n $this->title = get_screen_title('WIKI_EDIT_PAGE');\n }\n\n if ($type == '_edit_page') {\n $breadcrumbs = wiki_breadcrumbs(get_param_string('id', false, true), null, true, true);\n breadcrumb_set_parents(array_merge($breadcrumbs, array(array('_SELF:_SELF:edit_page', do_lang_tempcode('PAGE')))));\n\n if (post_param_integer('delete', 0) == 1) {\n $this->title = get_screen_title('WIKI_DELETE_PAGE');\n } else {\n $this->title = get_screen_title('WIKI_EDIT_PAGE');\n }\n }\n\n if ($type == 'edit_tree') {\n list($id, $chain) = get_param_wiki_chain('id');\n $breadcrumbs = wiki_breadcrumbs($chain, null, true, true);\n breadcrumb_set_parents($breadcrumbs);\n breadcrumb_set_self(do_lang_tempcode('WIKI_EDIT_TREE'));\n\n $pages = $GLOBALS['SITE_DB']->query_select('wiki_pages', array('*'), array('id' => $id), '', 1);\n if (!array_key_exists(0, $pages)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'wiki_page'));\n }\n $page = $pages[0];\n\n $page_title = get_translated_text($page['title']);\n $this->title = get_screen_title('_WIKI_EDIT_TREE', true, array(escape_html($page_title)));\n\n $this->id = $id;\n $this->chain = $chain;\n $this->page = $page;\n $this->page_title = $page_title;\n }\n\n return null;\n }", "title": "" }, { "docid": "832ab73b31d91fc8b43c03e950345d12", "score": "0.55418223", "text": "public function actionSpecialPageAction()\n {\n $data = json_decode($this->post['data']);\n $className = $this->post['className'];\n $result = null;\n\n //prepend build so its harder to expose functionality accidentally\n $methodName = 'build' . $this->post['actionName'];\n if (is_subclass_of($className, '\\Jazzee\\Interfaces\\Page') and method_exists($className, $methodName)) {\n $result = $className::$methodName($this, $data);\n }\n $this->setVar('result', $result);\n $this->loadView($this->controllerName . '/result');\n }", "title": "" }, { "docid": "2bf7171aa518db624c8dd7eaa5ec7bb1", "score": "0.5522995", "text": "public function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t\r\n\t\t$this->PageColumns = array(\"id\", \"name\", \"page_title\", \"seoname\", \"type\", \"template\");\r\n\t\t\r\n\t\t// Parse the bad out of the URl.\r\n\t\t$this->GetPageDetails();\r\n\t\t\r\n\t\t// We construct an array so that everyone gets what they want.\r\n\t\t$this->BuildPages();\r\n\t}", "title": "" }, { "docid": "5479bd77ca3f573e7f7c154d9234f9a6", "score": "0.55116886", "text": "public function setupAdminPage() \n\t{\n\n\t}", "title": "" }, { "docid": "df2d89ef7e797d3529a21abcd8e304e5", "score": "0.55097073", "text": "function setCurrentPage($i){\r\n\t\t\t$this->currentpage=$i;\r\n\t\t}", "title": "" }, { "docid": "ffeba5f7940fa40492eaa824f14a667c", "score": "0.55096567", "text": "private function setPageAccess()\n {\n // ------------- user logged in -------------\n if ($this->require_login && !isset($_SESSION[\"email\"])) {\n $this->page_access = false;\n storeErrorMsg(\"You must be logged in to view this page\");\n return;\n }\n\n // ------------- database object exists -------------\n $project_id = $core_id = $sample_id = $specimen_id = null;\n $required_array[\"project_id\"] = $this->require_project;\n $required_array[\"core_id\"] = $this->require_core;\n $required_array[\"sample_id\"] = $this->require_sample;\n $required_array[\"specimen_id\"] = $this->require_specimen;\n foreach ($required_array as $object_id => $object_is_required) {\n if ($object_is_required) {\n if (isset($_GET[$object_id])) {\n $$object_id = Mysql::SqlValue($_GET[$object_id]);\n } else {\n $this->page_access = false;\n storeErrorMsg(\"You must specify a $object_id in the URL\");\n return;\n }\n }\n }\n\n $db = new Mysql();\n // If trying to access a specimen\n if ($this->require_specimen && !$db->querySingleValue(\"SELECT specimen_id FROM specimens WHERE project_id=$project_id AND specimen_id=$specimen_id\")) {\n $this->page_access = false;\n storeErrorMsg(\"Specimen $specimen_id not found in database\");\n return;\n } // If trying to access a sample\n else if ($this->require_sample && !$db->querySingleValue(\"SELECT sample_id FROM samples WHERE project_id=$project_id AND core_id=$core_id AND sample_id=$sample_id\")) {\n $this->page_access = false;\n storeErrorMsg(\"Sample $sample_id not found in database\");\n return;\n } // If trying to access a core\n else if ($this->require_core && !$db->querySingleValue(\"SELECT core_id FROM cores WHERE project_id=$project_id AND core_id=$core_id\")) {\n $this->page_access = false;\n storeErrorMsg(\"Core $core_id not found in database\");\n return;\n } // If trying to access a project\n else if ($this->require_project && !$db->querySingleValue(\"SELECT project_id FROM projects WHERE project_id=$project_id\")) {\n $this->page_access = false;\n storeErrorMsg(\"Project $project_id not found in database\");\n return;\n }\n\n // ------------- user has correct access level -------------\n // If trying to access any page connected to a project (and the database object exists)\n if ($this->require_project) {\n $my_access_level = getAccessLevel();\n // If the user does not have access to that project (since objects are connected to a project)\n if (!$my_access_level) {\n $this->page_access = false;\n storeErrorMsg(\"You do not have access to project $project_id\");\n return;\n }\n }\n }", "title": "" }, { "docid": "8cd40b00300ddda5bd8550dc500c1d45", "score": "0.550649", "text": "public function initPage()\n {\n /**\n * Document template.\n *\n * @var \\TYPO3\\CMS\\Backend\\Template\\DocumentTemplate $doc\n */\n $doc = GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Backend\\\\Template\\\\DocumentTemplate');\n $doc->backPath = $this->getBackPath();\n $doc->setModuleTemplate('EXT:perm/Resources/Private/Templates/perm.html');\n $doc->form = '<form action=\"' . $this->getBackPath() . 'tce_db.php\" method=\"post\" name=\"editform\">';\n $doc->loadJavascriptLib('js/jsfunc.updateform.js');\n $doc->getPageRenderer()->loadPrototype();\n $doc->loadJavascriptLib(ExtensionManagementUtility::extRelPath('perm') . 'mod1/perm.js');\n // Setting up the context sensitive menu:\n $doc->getContextMenuCode();\n\n // override attributes of WebPermissions found in sysext/perm/mod1/perm.js\n $doc->JScode .= $doc->wrapScriptTags('\n WebPermissions.thisScript =\n TYPO3.settings.ajaxUrls[\"CommerceTeam_Commerce_PermissionAjaxController::dispatch\"];\n ');\n\n $this->doc = $doc;\n }", "title": "" }, { "docid": "ddf38a6ef1301abbbf0e24df580e61da", "score": "0.5504019", "text": "public function setPage_content($content){\n\t\t$this->page_content = $content;\n\t}", "title": "" }, { "docid": "833e9473a4234cea1c1afb582226875b", "score": "0.54891974", "text": "public function setPageTitle($pageTitle) { //set the page title \n $this->pageTitle = $pageTitle;\n }", "title": "" }, { "docid": "f6075089e1c3324fedb85902fb86e4b1", "score": "0.54884475", "text": "function changePage($pageName) {\n header(\"location: \" . $pageName);\n }", "title": "" }, { "docid": "98b6a9e3ac82c495b1c5a337a656b6a3", "score": "0.5466895", "text": "public function set($key, $value) {\n\t\t\n\t\tif(isset(self::$basePropertiesAlternates[$key])) $key = self::$basePropertiesAlternates[$key];\n\n\t\tif(($key == 'id' || $key == 'name') && $this->settings[$key] && $value != $this->settings[$key]) \n\t\t\tif(\t($key == 'id' && (($this->settings['status'] & Page::statusSystem) || ($this->settings['status'] & Page::statusSystemID))) ||\n\t\t\t\t($key == 'name' && (($this->settings['status'] & Page::statusSystem)))) {\n\t\t\t\t\tthrow new WireException(\"You may not modify '$key' on page '{$this->path}' because it is a system page\"); \n\t\t}\n\n\t\tswitch($key) {\n\t\t\t/** @noinspection PhpMissingBreakStatementInspection */\n\t\t\tcase 'id':\n\t\t\t\tif(!$this->isLoaded) Page::$loadingStack[(int) $value] = $this;\n\t\t\t\t// no break is intentional\n\t\t\tcase 'sort': \n\t\t\tcase 'numChildren': \n\t\t\t\t$value = (int) $value; \n\t\t\t\tif($this->settings[$key] !== $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\t$this->setStatus($value); \n\t\t\t\tbreak;\n\t\t\tcase 'statusPrevious':\n\t\t\t\t$this->statusPrevious = is_null($value) ? null : (int) $value; \n\t\t\t\tbreak;\n\t\t\tcase 'name':\n\t\t\t\t$this->setName($value);\n\t\t\t\tbreak;\n\t\t\tcase 'parent': \n\t\t\tcase 'parent_id':\n\t\t\t\tif(is_object($value) && $value instanceof Page) {\n\t\t\t\t\t// ok\n\t\t\t\t\t$this->setParent($value);\n\t\t\t\t} else if($value && !$this->_parent && \n\t\t\t\t\t($key == 'parent_id' || is_int($value) || (is_string($value) && ctype_digit(\"$value\")))) {\n\t\t\t\t\t// store only parent ID so that parent is lazy loaded,\n\t\t\t\t\t// but only if parent hasn't already been previously loaded\n\t\t\t\t\t$this->_parent_id = (int) $value;\t\n\t\t\t\t} else if($value && (is_string($value) || is_int($value))) {\n\t\t\t\t\t$value = $this->_pages('get', $value);\n\t\t\t\t\t$this->setParent($value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'parentPrevious':\n\t\t\t\tif(is_null($value) || $value instanceof Page) $this->parentPrevious = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'template': \n\t\t\tcase 'templates_id':\n\t\t\t\tif($key == 'templates_id' && $this->template && $this->template->id == $value) break;\n\t\t\t\tif($key == 'templates_id') $value = $this->wire('templates')->get((int)$value); \n\t\t\t\t$this->setTemplate($value); \n\t\t\t\tbreak;\n\t\t\tcase 'created': \n\t\t\tcase 'modified':\n\t\t\tcase 'published':\n\t\t\t\tif(is_null($value)) $value = 0;\n\t\t\t\tif(!ctype_digit(\"$value\")) $value = strtotime($value); \n\t\t\t\t$value = (int) $value; \n\t\t\t\tif($this->settings[$key] !== $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value;\n\t\t\t\tbreak;\n\t\t\tcase 'created_users_id':\n\t\t\tcase 'modified_users_id':\n\t\t\t\t$value = (int) $value;\n\t\t\t\tif($this->settings[$key] !== $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'createdUser':\n\t\t\tcase 'modifiedUser':\n\t\t\t\t$this->setUser($value, str_replace('User', '', $key));\n\t\t\t\tbreak;\n\t\t\tcase 'sortfield':\n\t\t\t\tif($this->template && $this->template->sortfield) break;\n\t\t\t\t$value = $this->wire('pages')->sortfields()->decode($value); \n\t\t\t\tif($this->settings[$key] != $value) $this->trackChange($key, $this->settings[$key], $value); \n\t\t\t\t$this->settings[$key] = $value; \n\t\t\t\tbreak;\n\t\t\tcase 'isLoaded': \n\t\t\t\t$this->setIsLoaded($value); \n\t\t\t\tbreak;\n\t\t\tcase 'pageNum':\n\t\t\t\t// note: pageNum is deprecated, use $input->pageNum instead\n\t\t\t\t/** @noinspection PhpDeprecationInspection */\n\t\t\t\t$this->pageNum = ((int) $value) > 1 ? (int) $value : 1; \n\t\t\t\tbreak;\n\t\t\tcase 'instanceID': \n\t\t\t\t$this->instanceID = $value; \n\t\t\t\tself::$instanceIDs[$value] = $this->settings['id']; \n\t\t\t\tbreak;\n\t\t\tcase 'loaderCache':\n\t\t\t\t$this->loaderCache = (bool) $value;\t\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tif(strpos($key, 'name') === 0 && ctype_digit(substr($key, 5)) && $this->wire('languages')) {\n\t\t\t\t\t// i.e. name1234\n\t\t\t\t\t$this->setName($value, $key);\n\t\t\t\t} else {\n\t\t\t\t\tif($this->quietMode && !$this->template) return parent::set($key, $value);\n\t\t\t\t\t$this->setFieldValue($key, $value, $this->isLoaded);\n\t\t\t\t}\n\t\t}\n\t\treturn $this; \n\t}", "title": "" }, { "docid": "20791a34f5009049ca840ceafc00af33", "score": "0.5456245", "text": "public function page($page): self\n {\n }", "title": "" }, { "docid": "20791a34f5009049ca840ceafc00af33", "score": "0.5456245", "text": "public function page($page): self\n {\n }", "title": "" }, { "docid": "2f787ca4798e3bcfc520fec31bb6a1ee", "score": "0.545608", "text": "function defineAllowedPages() {\n $this->addAllowedPages(array(\n 'index', 'intro', 'denied','logout','test','api','testapi','about',\n ));\n\n // For Guests\n if (!$this->currentUser()){\n $this->addAllowedPages(array(\n 'quotation','quotation2',\n ));\n if(!$this->isPageAllowed($this->page)){\n $this->redirect('index');\n }\n } else {\n if ($this->model_user_rights->canSeeDashboard()) $this->addAllowedPages(array('dashboard'));\n if ($this->model_user_rights->canSeeTasks()) $this->addAllowedPages(array('tasks'));\n if ($this->model_user_rights->canSeeQuotes()) $this->addAllowedPages(array('quotes'));\n if ($this->model_user_rights->canSeeProjects()) $this->addAllowedPages(array('projects'));\n if ($this->model_user_rights->canSeeClients()) $this->addAllowedPages(array('clients'));\n if ($this->model_user_rights->canSeeReports()) $this->addAllowedPages(array('reports'));\n if ($this->model_user_rights->canSeeDevelopers()) $this->addAllowedPages(array('developers'));\n if ($this->model_user_rights->canSeeDeleted()) $this->addAllowedPages(array('deleted'));\n if ($this->model_user_rights->canSeeUsers()) $this->addAllowedPages(array('users'));\n if ($this->model_user_rights->canSeeLogs()) $this->addAllowedPages(array('logs'));\n if ($this->model_user_rights->canSeeRates()) $this->addAllowedPages(array('rates'));\n if ($this->model_user_rights->canSeeSettings()) $this->addAllowedPages(array('account'));\n if ($this->model_user_rights->canSeeManager()) $this->addAllowedPages(array('manager'));\n $this->addAllowedPages(array('content','content_edit'));\n }\n }", "title": "" }, { "docid": "102346d827f5d52462c0a317f2d2c38f", "score": "0.54514986", "text": "public static function parse() {\n if (\\CMS::$_vars[3] == 'submit') {\n switch (\\CMS::$_vars[2]) {\n case 'edit':\n self::edit_page_submit();\n break;\n }\n }\n\n /* Post Action Handlers */\n if (\\CMS::$_vars[3] == 'submit') {\n switch (\\CMS::$_vars[2]) {\n case 'add':\n self::add_page_submit();\n break;\n }\n }\n \n /* Page Content Handlers */\n switch (\\CMS::$_vars[2]) {\n case 'add':\n self::$_pagemode = 'add';\n self::add_page();\n break;\n\n case 'edit':\n self::$_pagemode = 'edit';\n self::edit_page();\n break;\n\n case 'list':\n self::$_pagemode = 'list';\n self::edit_list();\n break;\n\n case 'confirmdelete':\n self::$_pagemode = 'confirmdelete';\n self::confirmdelete_page();\n break;\n\n case 'confirmpdelete':\n self::$_pagemode = 'confirmpdelete';\n self::confirmpdelete_page();\n break;\n\n case 'delete':\n self::$_pagemode = 'delete';\n self::delete_page();\n break;\n\n case 'restore':\n self::$_pagemode = 'restore';\n self::restore_page();\n break;\n\n case 'pdelete':\n self::$_pagemode = 'pdelete';\n self::permanently_remove_page();\n break;\n }\n \n\n if (self::$_status) {\n \\Html::set('{status}', self::$_status);\n }\n }", "title": "" }, { "docid": "54782f46cb7c23151e782fefcc61480f", "score": "0.5446934", "text": "public function setPageUrl($url) {\n\t\tif (filter_var($url, FILTER_VALIDATE_URL)) {\n\t\t\t$this->pageUrl = $url;\n\t\t}\n\t}", "title": "" }, { "docid": "53a6fc3d9b3929dcc9c19751b82500e3", "score": "0.5440732", "text": "function pagination( $which ) {\r\n\t\t$save_uri = $_SERVER['REQUEST_URI'];\r\n\t\t$_SERVER['REQUEST_URI'] = add_query_arg( MLA_Custom_Feed_List_Table::mla_submenu_arguments(), $save_uri );\r\n\t\tparent::pagination( $which );\r\n\t\t$_SERVER['REQUEST_URI'] = $save_uri;\r\n\t}", "title": "" }, { "docid": "e8feeb1b1b81f3b119c1e3920fd31e4c", "score": "0.54360616", "text": "public function setPage($page)\n {\n $this->properties['page'] = $page;\n return $this;\n }", "title": "" }, { "docid": "3565be8cadf2c9bdc69b0859bae7898c", "score": "0.54288894", "text": "public function startPage() { \n\n\t\t$args = func_get_args();\n\t\n\t\tswitch (count($args)) {\n\n\t\t\tcase 0: \n\t\t\t\t\t$pageTitle = $this->default_title;\n\t\t\t\t\t$pageCode = $this->default_pagecode;\n\t\t\t\t\tbreak;\n\n\t\t\tcase 1: \n\t\t\t\t\t$pageTitle = $args[0];\n\t\t\t\t\t$pageCode = $this->default_pagecode;\n\t\t\t\t\tbreak;\n\n\t\t\tcase 2: \n\t\t\t\t\t$pageTitle = $args[0];\n\t\t\t\t\t$pageCode = $args[1];\n\t\t\t\t\tbreak;\n\t }\n \n\t if (isset($_GET[\"view\"]) && $_GET[\"view\"] == \"pf\") { include (\"includes/header_pf.php\"); }\n \n\t else { include (\"includes/header.php\"); }\n\t\n\t}", "title": "" }, { "docid": "bf7999691d80b429ff7458d4b562fbd9", "score": "0.5421262", "text": "public function initPage(): void\n {\n // Register settings.\n $this->registerSettings();\n\n // Set page as current\n $this->setSettingsPage(self::SLUG);\n\n // Section: Site connection\n $this->addSettingsSection(\n 'site-connection',\n _x('Site connection', 'Settings section title', 'bc-security'),\n [$this, 'printSiteConnectionHint']\n );\n $this->addSettingsField(\n Settings::CONNECTION_TYPE,\n __('Connection type', 'bc-security'),\n [FormHelper::class, 'printSelect'],\n ['options' => $this->getConnectionOptions()]\n );\n\n // Section: Google API key\n $this->addSettingsSection(\n 'google-api',\n _x('Google API key', 'Settings section title', 'bc-security'),\n [$this, 'printGoogleAPIHint']\n );\n $this->addSettingsField(\n Settings::GOOGLE_API_KEY,\n __('Google API key', 'bc-security'),\n [FormHelper::class, 'printTextInput']\n );\n }", "title": "" }, { "docid": "91a80599402dd0d0306365bb8a69cbe1", "score": "0.5421009", "text": "function init_quick($data) {\n $this->type = $data->pagetype;\n $this->id = $data->pageid;\n }", "title": "" }, { "docid": "9cdd848aaf022b242cca343da5311992", "score": "0.5420278", "text": "public function addPage() {\n $this->_documentXMLFINAL .= $this->_documentXML;\n $this->_documentXML = $this->_documentXMLSEQ;\n }", "title": "" }, { "docid": "4a4f331362f5fceaeb685bb1b2d3484f", "score": "0.54200816", "text": "function main() {\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\t\t\t\tif (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\t\t\t\t\t\t$this->doc->styleSheetFile2 = '../typo3conf/ext/neustastaging/res/staging.css';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\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';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($GLOBALS['LANG']->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($GLOBALS['LANG']->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "046322d6f75daf4445dae192c7941213", "score": "0.5417011", "text": "private function save_page_data() {\n\t\tif ( ! count( $_POST ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$post = $_POST;\n\t\t$setting_pages = array_keys( $this->setting_pages );\n\t\tif ( ! ( isset( $post, $post['current_page'] ) && in_array( $post['current_page'], $setting_pages, true ) ) ) {\n\t\t\treturn false; // invalid page\n\t\t}\n\t\t$current_page = $post['current_page'];\n\t\tif ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'wp-mobile-settings-' . $current_page ) ) {\n\t\t\treturn false; // invalid request\n\t\t}\n\n\t\tdo_action( 'wp_mobile_settings_save_' . $current_page, $_POST );\n\t}", "title": "" }, { "docid": "2dbf0cbbe18aa3b86dab4900b76d4048", "score": "0.541639", "text": "public function setSettingsPage(string $page): void\n {\n $this->recent_page = $page;\n }", "title": "" }, { "docid": "cd5e10c93ac49d616051da4fa25da487", "score": "0.5416142", "text": "function gotoPage()\n\t{\n\t\t$this->ctrl->setParameter($this, \"activecommand\", \"gotoPage\");\n\t\t$this->ctrl->setParameter($this, \"qid\", $_GET[\"qid\"]);\n\t\t$this->ctrl->setParameter($this, \"direction\", \"0\");\n\t\t$this->ctrl->redirect($this, \"redirectQuestion\");\n\t}", "title": "" }, { "docid": "cac03cf0b738a6e1d92f4882a152e00e", "score": "0.54146", "text": "public function setCurrentPage()\n {\n $this->pageSize = 5;\n $this->currentPage = $this->request->get('page');\n\n if(empty($this->currentPage)) {\n $this->currentPage = 1;\n }\n $this->totalPages = ceil($this->totalRecords/$this->pageSize);\n if(($this->currentPage * $this->pageSize) > $this->totalRecords) {\n $this->currentPage = $this->totalPages;\n }\n\n if($this->currentPage > 1) {\n $this->offset = ($this->currentPage - 1) * $this->pageSize;\n } else {\n $this->offset = 0;\n }\n }", "title": "" }, { "docid": "1336c81663dcf64af90a28f051245fd4", "score": "0.54092425", "text": "function setpage($page)\n {\n die(\"<script>document.location.href='$page';</script>\");\n }", "title": "" }, { "docid": "35d5545a35028071fbd1c9770896dcd0", "score": "0.5404188", "text": "public function Pager($page=1){\n\t\t$this->page = $page;\n\t}", "title": "" }, { "docid": "2b198417ee686188bf6b3446f0f617fd", "score": "0.54020125", "text": "public function beforeRender() {\n\t\tparent::beforeRender();\n\n\t\t//ウィザード\n\t\tforeach ($this->helpers['NetCommons.Wizard']['navibar'] as &$actions) {\n\t\t\t$urlParam = $actions['url'];\n\t\t\t$urlParam = Hash::merge($urlParam, $this->request->params['named']);\n\t\t\tforeach ($this->request->params['pass'] as $passParam) {\n\t\t\t\t$urlParam[$passParam] = null;\n\t\t\t}\n\t\t\t$actions['url'] = $urlParam;\n\t\t}\n\t}", "title": "" }, { "docid": "e1cbe5b19d5e30669935d375b662cad4", "score": "0.5400423", "text": "public function setDefaults()\n {\n if ( !$this->getResponseCode() ) $this->setResponseCode(200);\n if ( !$this->getContentType() ) $this->setContentType('text/html');\n if ( !$this->getServer() ) $this->setServer('Skeetr 0.0.1');\n }", "title": "" }, { "docid": "a31acd860a5fa52757bf81b5b5b22adf", "score": "0.5395838", "text": "public function setPageClass($class) {\n\t\t$this->pageClass = $class;\n\t}", "title": "" }, { "docid": "c73b9f2c6f0ac7310194b6b4b82991a2", "score": "0.5389368", "text": "protected function initializeForPage() {\n\t}", "title": "" }, { "docid": "c52494e99fbb28013a81daf7abfc8a25", "score": "0.5388102", "text": "protected function _setDefaultVars()\n\t{\n\t\t// Mediawiki globals\n\t\tglobal $wgScript, $wgRequest;\n\t\t\n\t\t$this->action \t\t\t= $this->getAction();\n\t\t$this->issueId \t\t\t= $wgRequest->getText('bt_issueid');\n\t\t$this->pageKey \t\t\t= $this->getNamespace('dbKey');\n\t\t$this->pageTitle \t\t\t= $this->getNamespace('text');\n\t\t$this->typeArray \t\t\t= $this->_config->getIssueType();\n\t\t$this->statusArray \t\t\t= $this->_config->getIssueStatus();\n\t\t$this->formAction \t\t\t= $wgScript;\n\t\t$this->url \t\t\t= $wgScript . '?title=' . $this->pageKey . '&bt_action=';\n\t\t$this->editUrl \t\t\t= $this->url . 'edit&bt_issueid=' . $this->issueId;\n\t\t$this->deleteUrl \t\t\t= $this->url . 'archive&bt_issueid=' . $this->issueId;\n\t\t$this->undeleteUrl \t\t\t= $this->url . 'unarchive&bt_issueid=' . $this->issueId;\n\t\t$this->listUrl \t\t\t= $this->url . 'list';\n\t\t$this->isLoggedIn \t\t\t= $this->isLoggedIn();\n\t\t$this->hasArchivePerms \t\t= $this->hasPermission('archive');\n\t\t$this->hasUnArchivePerms \t= $this->hasPermission('unarchive');\n\t}", "title": "" }, { "docid": "252920dcdd6534e81157c81c7bf3c299", "score": "0.53868365", "text": "function initialize_page()\n\t{\n\t\t$cur_user = Users::GetCurrentUser();\n\t\t$blog = Blogs::FindByUser($cur_user->id);\n\t\t\n\t\t$post_action = \"\";\n\t\tif(isset($_POST['delete']))\n\t\t{\n\t\t\t$blog->delete(true);\n\t\t\tsetFlash(\"<h3>Blog Deleted</h3>\");\n\t\t\tredirect(\"/admin/list_pages\");\n\t\t}\n\t\t\n\t\tif(isset($_POST['submit']))\n\t\t{\n\t\t\t$post_action = $_POST['submit'];\n\t\t}\n\t\n\t\tif($post_action == \"Edit\")\n\t\t{\t\t\t\n\t\t\t$blog->name = $_POST['name'];\n\t\t\t$blog->slug = slug($_POST['name']);\n\t\t\tif (isset($_POST['user_id'])) { $blog->user_id = $_POST['user_id']; }\n\t\t\t$blog->save();\n\t\t\t\t\n\t\t\tsetFlash(\"<h3>Blog Edited</h3>\");\n\t\t}\n\t}", "title": "" }, { "docid": "c29728f509da2bd60eb5b35ed09e3f78", "score": "0.5386666", "text": "public function __construct($page)\n {\n $this->id = $page;\n $this->url = wl($page, '', true);\n $this->author = p_get_metadata($page)['last_change']['user'];\n $date = new DateTime();\n $this->lastEdit = $date->setTimestamp(p_get_metadata($page)['last_change']['date']);\n $this->metadata = p_get_metadata($page);\n // If no user was logged in, then no author is saved.\n // DokuWiki uses '(external edit)' as value, so we use it too.\n if (empty($this->author)) {\n $this->author = '(external edit)';\n }\n }", "title": "" } ]
05f9554611fa7f52c489b2ee103e3401
Checks if the member's password is expired
[ { "docid": "a2ba704681f5a21a104c71666912b001", "score": "0.6784099", "text": "function check_pass_life($ident) {\n $query=\"SELECT DATEDIFF(CURDATE(),LAST_PASS_CHANGE) AS DIFF FROM MEMBER WHERE CAPID='\".$this->capid.\"'\";\n $results = allResults(Query($query, $ident));\n $diff=$results[0]['DIFF'];\n if($diff>=PASSWORD_LIFE)\n return true;\n else \n return PASSWORD_LIFE-$diff;\n }", "title": "" } ]
[ { "docid": "6e37deca407f4ac874d54b4f12a5b125", "score": "0.82724065", "text": "public function isPasswordExpired()\n {\n return $this->getPasswordAge() >= $this->maxPassAge ? true : false;\n }", "title": "" }, { "docid": "dfdcad60228f56d52bf57ae2612c37da", "score": "0.81763947", "text": "public function isPasswordExpired(){\n $user = $this->getUserByEmail();\n\n // Only in case the user exists\n if (!$user instanceof User)\n return false;\n\n // Only in case it is not admin\n if ($user->hasAdminRole())\n return false;\n\n if(Option::getByName(Option::ENABLE_EXPIRED_PASSWORD_PROTECTION)){\n $criteria = new CDbCriteria(array('order' => 'createTime DESC', 'limit' => 10));\n $userPasswordHistory = UserPasswordHistory::model()->findByAttributes(array('user_id' => $user->id), $criteria);\n if ($userPasswordHistory === null) {\n $lastPassChangeTime = strtotime($user->registration_date);\n } else {\n $lastPassChangeTime = strtotime($userPasswordHistory->createTime);\n }\n \n $passwordExpPeriod = Option::getByName(Option::PASSWORD_EXPIRATION_PERIOD);\n if ($passwordExpPeriod < 1)\n return false;\n\n $now = new DateTime();\n return (($now->getTimestamp() - $lastPassChangeTime) > $passwordExpPeriod * 24 * 60 * 60);\n } else{\n return false;\n }\n }", "title": "" }, { "docid": "2542c50126c00629c5490854317e97a6", "score": "0.72581905", "text": "public static function hasPasswordExpired($userid) {\n\t\t\t$sql = \"SELECT id FROM user WHERE id= \" . esc($userid) . \" AND UNIX_TIMESTAMP()-UNIX_TIMESTAMP(pw_timestamp)>\" . User::$MAX_PASSWORD_AGE;\n\t\t\t$result = getDB()->query($sql);\n\t\t\treturn mysql_num_rows($result) == 1;\n\t\t}", "title": "" }, { "docid": "eb3858d33807281e7e97be63676dd2c8", "score": "0.72437847", "text": "public function isCredentialsExpired()\n {\n return !$this->isCredentialsNonExpired();\n }", "title": "" }, { "docid": "896b85f2f82679bd7ed9d826c89c14b8", "score": "0.72344476", "text": "public function isCredentialsNonExpired()\n {\n return ! $this->password_expired;\n }", "title": "" }, { "docid": "29d44c753bbf6573d43feb99459dd2d8", "score": "0.69804245", "text": "public function expirePassword()\r\n {\r\n $this->setPasswordExpired(true);\r\n $this->setResetTime(new \\DateTime());\r\n $this->resetResetCode();\r\n }", "title": "" }, { "docid": "58ef797a0b8c5b1f40181a842028baef", "score": "0.685427", "text": "public function isCredentialsNonExpired()\n {\n $password = $this->getUserPassword();\n\n if ($password) {\n $expiredDate = $password->getExpiredAt();\n $isExpired = (new \\DateTime() > $expiredDate);\n\n if ($password->getIsExpired() || ($expiredDate && $isExpired)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "f3a77988356cc432a8b7b3fad35eb53f", "score": "0.673475", "text": "public function isLoginExpired(): bool\n {\n $time = time();\n // custom \"last used\" session time updated on keepAliveAction\n $idle = $time - $this->requestStack->getSession()->get('pmiLastUsed', $time);\n $remaining = $this->env->values['sessionTimeOut'] - $idle;\n return $this->authorizationChecker->isGranted('IS_AUTHENTICATED_FULLY') && $remaining <= 0;\n }", "title": "" }, { "docid": "5e60fd78ed2db278c3c887d8585e952d", "score": "0.67098606", "text": "public function isExpired();", "title": "" }, { "docid": "df90a79249e65b86a5d6ea5f17eab786", "score": "0.664191", "text": "public function hasExpired();", "title": "" }, { "docid": "4d2c2d1d4099c1a5fdd1637286af6044", "score": "0.6636022", "text": "private function _verifyExistingPassword()\n\t{\n\t\t$currentUser = craft()->userSession->getUser();\n\n\t\tif (!$currentUser)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$currentHashedPassword = $currentUser->password;\n\t\t$currentPassword = craft()->request->getRequiredParam('password');\n\n\t\treturn craft()->users->validatePassword($currentHashedPassword, $currentPassword);\n\t}", "title": "" }, { "docid": "dbef3f4b9622bb55eebe50cae2e11358", "score": "0.6607054", "text": "public function isExpired()\n {\n return !$this->isAccountNonExpired();\n }", "title": "" }, { "docid": "8e94009fbcffa53f6f87c6b334c2ba2f", "score": "0.6606442", "text": "protected function isExpired() {\n // @todo: Build this functionality.\n }", "title": "" }, { "docid": "efa268ae2bc2614fcdd57dc89d04a65c", "score": "0.65830433", "text": "public function isTokenExpired();", "title": "" }, { "docid": "efa268ae2bc2614fcdd57dc89d04a65c", "score": "0.65830433", "text": "public function isTokenExpired();", "title": "" }, { "docid": "db3bec52f4689b7ced648e6de2a19a59", "score": "0.6576628", "text": "public function message_password_timeout()\n {\n $grant_time = $this->CI->session->userdata('message_password_granted');\n\n if ($grant_time !== NULL && $grant_time < (time() - $this->message_password_timeout)) {\n $this->CI->session->unset_userdata('message_password');\n $this->CI->session->unset_userdata('message_password_granted');\n }\n }", "title": "" }, { "docid": "05af704a6dea16800058d8e11f97356f", "score": "0.6543671", "text": "public function isExpired()\n {\n return $this->date_of_expiry < time();\n }", "title": "" }, { "docid": "07a644f80f0b048ef34849b5fc1075d2", "score": "0.64870036", "text": "public function isCredentialsNonExpired()\r\n {\r\n \treturn true;\r\n }", "title": "" }, { "docid": "6a35eb7ef2def07d89ccb6116aa3a7c9", "score": "0.64680094", "text": "public function isExpired(): bool;", "title": "" }, { "docid": "6a35eb7ef2def07d89ccb6116aa3a7c9", "score": "0.64680094", "text": "public function isExpired(): bool;", "title": "" }, { "docid": "6a35eb7ef2def07d89ccb6116aa3a7c9", "score": "0.64680094", "text": "public function isExpired(): bool;", "title": "" }, { "docid": "c1f6248bdab58e5df1aa2acecd181fe1", "score": "0.64671713", "text": "public function isExpired()\n {\n return $this->expireTime <= time();\n }", "title": "" }, { "docid": "b4f3fd3cb96b0f80a5c87f1289834731", "score": "0.646373", "text": "public function is_expired()\n {\n return $this->end_time() < time();\n }", "title": "" }, { "docid": "410f0dd3323531d29cd556fb12ade678", "score": "0.6450339", "text": "private function checkPasswordToken($record)\n {\n $error = false;\n\n if (empty($record)) {\n $error = 'Sorry! Your password token is invalid.';\n\n return $error;\n } else {\n $toTime = $record->created_at;\n $hoursPast = calculate_time_span($toTime);\n\n if ($hoursPast > 2) {\n $error = 'Sorry! Your password token has been expired.';\n }\n }\n\n return $error;\n }", "title": "" }, { "docid": "e2eead11b9b15f2325663067cfb9fb07", "score": "0.64216024", "text": "public function verifyOldPass() {\n\t\t$userId = $this->userAuth->getUserId();\n\t\t$user = $this->findById($userId);\n\t\t$oldpass=$this->userAuth->makePassword($this->data['User']['oldpassword'], $user['User']['salt']);\n\t\treturn ($user['User']['password']===$oldpass);\n\t}", "title": "" }, { "docid": "7509a435e12528b2287f625fe5331cb3", "score": "0.6404057", "text": "public function isExpired()\n {\n return (time() > (int) $this->getDateTimeObject('expires')->format('U'));\n }", "title": "" }, { "docid": "3a7321677694ce162e78c2474747299c", "score": "0.64007527", "text": "public function isExpired()\n {\n return $this->created_at->diffInMinutes(Carbon::now()) > static::EXPIRATION_TIME;\n }", "title": "" }, { "docid": "266829e5e1c62a577429358365a0c7f0", "score": "0.6400524", "text": "function test_it_knows_if_access_has_expired_if_valid_but_outside_expiry_buffer() {\n $this->cred->setAccessTokenExpiry(120);\n $this->cred->now = strtotime('+59 seconds');\n\n $this->assertFalse($this->cred->hasAccessTokenExpired());\n }", "title": "" }, { "docid": "43f2d69e4d9196e8c38fe267b0a4d34a", "score": "0.63994664", "text": "public function checkTokenExpired($token) {\n $queryStr = \"SELECT date_expires FROM access_tokens WHERE token = ? AND date_expires > NOW()\";\n $this->_registry->getObject('db')->execute($queryStr, [$token]);\n return ($this->_registry->getObject('db')->affectedRows() > 0) ? $this->_tokenExpired = false : $this->_tokenExpired = true;\n }", "title": "" }, { "docid": "0f82d11f797968daf405951cbc36be96", "score": "0.63803744", "text": "public function isCredentialsNonExpired()\n {\n // TODO: Implement isCredentialsNonExpired() method.\n }", "title": "" }, { "docid": "0f82d11f797968daf405951cbc36be96", "score": "0.63803744", "text": "public function isCredentialsNonExpired()\n {\n // TODO: Implement isCredentialsNonExpired() method.\n }", "title": "" }, { "docid": "bbebc15ced7b4c4c6495c81ba96c8222", "score": "0.6380042", "text": "function isExpired()\n\t{\n\t\treturn (time() > $this->expiration);\n\t}", "title": "" }, { "docid": "6d6ffe8e7ebffa34170192b8219a3fb5", "score": "0.6375752", "text": "public function isCredentialsNonExpired()\n {\n if (true === $this->user->getCredentialsExpired()) {\n return false;\n }\n\n if (null !== $this->user->getCredentialsExpireAt() && $this->user->getCredentialsExpireAt()->getTimestamp() < time()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "db4ac11ab1a2bcddb210c650acebc250", "score": "0.6368578", "text": "public function isEmailVerificationTimeoutExpired()\n {\n return !$this->isEmailVerified() && $this->{$this->getCreatedAtColumn()}->addMinutes(isset($this->emailVerificationTimeout) ? $this->emailVerificationTimeout : 0)->isPast();\n }", "title": "" }, { "docid": "b88282f41a18e0e28a257ddb89c2197a", "score": "0.6368418", "text": "function isExpired(): bool {\n return $this->expires && $this->expires < $this->now;\n }", "title": "" }, { "docid": "74300a0aeedd13ea7d67d02adc6c8eaa", "score": "0.6361692", "text": "public function isExpired()\n {\n $date = DateTime::createFromFormat('m/y H:i:s', $this->expiry . ' 23:59:59');\n $input = new DateTime($date->format('Y-m-t H:i:s'));\n\n return $input < new DateTime();\n }", "title": "" }, { "docid": "b14d2e0951962037f68beb1d4c3c5ef0", "score": "0.6346394", "text": "function isCredentialsNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "a919f143d90bf442a18a6499a184c7c8", "score": "0.6344698", "text": "public function isExpired()\n {\n return time() > $this->expires;\n }", "title": "" }, { "docid": "6c2f4368755cbe1d9c1950341cbe4cbd", "score": "0.6342987", "text": "public function isExpired(){\n\t\t$exp_ts = $this->getValue('expire_ts');\n\t\tif($exp_ts === null) return false;\n\t\treturn $exp_ts <= time();\n\t}", "title": "" }, { "docid": "fbcb493b7492eca2f78a1b06395672be", "score": "0.6341457", "text": "public function isExpired()\n {\n // 12 minutes before expired\n return $this->getCreatedAt()->getTimestamp() + 12 * 60\n <= (new DateTime())->getTimestamp();\n }", "title": "" }, { "docid": "39bee296f1f7292059db08b5f730152e", "score": "0.6332958", "text": "public function isPasswordRequestNonExpired($ttl);", "title": "" }, { "docid": "9cd69cd3e6876d87056fd43ce2a5bcb0", "score": "0.63134015", "text": "public function isExpired()\n\t{\n\t\treturn $this->expires < time();\n\t}", "title": "" }, { "docid": "840503312d542ce5529626df8d2b8529", "score": "0.6306632", "text": "function test_it_knows_if_access_has_expired_if_valid_but_within_expiry_buffer() {\n $this->cred->setAccessTokenExpiry(120);\n $this->cred->now = strtotime('+61 seconds');\n\n $this->assertTrue($this->cred->hasAccessTokenExpired());\n }", "title": "" }, { "docid": "5e674e8955b34f08b82c1550c095826c", "score": "0.6300345", "text": "public function hasExpired() {\r\n $expiry = date($this->expires_on);\r\n $now = date(\"Y-m-d H:i:s\");\r\n\r\n return $expiry < $now;\r\n }", "title": "" }, { "docid": "879f72955497d811a0447536c798b0de", "score": "0.6297141", "text": "public function checkExpirationDate()\r\n {\r\n if (Mage::getSingleton('customer/session')->getCustomer()->getWalletId()) {\r\n $exp = $this->getExpirationDate();\r\n $date_exp=substr($exp, 2).substr($exp,0,2);\r\n if (date('ym')<=$date_exp){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "e5acfa3fa2e53f1196e2d47c9e3a3d1b", "score": "0.62855583", "text": "public function isExpired()\n {\n return $this->expired;\n }", "title": "" }, { "docid": "c35136e144d98af61bcdde5e2a2031b2", "score": "0.6280562", "text": "public function ValidPassword()\n {\n return ($this->password != \"\" && $this->password >= 0 && $this->password < 8);\n }", "title": "" }, { "docid": "94776cf041bb6a8b74939868e7b844cb", "score": "0.6275116", "text": "public function isExpired($mid) {\n $member = $this->members[$mid];\n $expdate = str_replace('/', '-', $member->expdate);\n return date(\"Y-m-d\") > $expdate;\n }", "title": "" }, { "docid": "24f0f73a5affb956a59efe1e8faf8455", "score": "0.62724435", "text": "public function isExpired()\n {\n return $this->timerState == TimerState::EXPIRED;\n }", "title": "" }, { "docid": "799b0d656d3cdd04065fb4e998db8896", "score": "0.6265555", "text": "function checkKey() {\n global $username;\n global $key;\n global $conn;\n\n $sql = \"SELECT expiry FROM password_reset_keys WHERE username = ? AND reset_key = ?;\";\n\n if ($stmt = $conn->prepare($sql)) {\n $stmt->bind_param(\"ss\", $param_username, $param_key);\n $param_username = $username;\n $param_key = $key;\n\n $valid = false;\n if ($stmt->execute()) {\n $result = $stmt->get_result();\n\n if ($result->num_rows > 0) {\n $row = $result->fetch_assoc();\n $timestamp = $row['expiry'];\n $timestamp = strtotime($timestamp);\n $valid = $timestamp >= time();\n\n if (!$valid) {\n doError(\"This password reset request has expired\");\n }\n } else {\n doError(\"This password reset request no longer exists\");\n }\n } else {\n doSQLError($stmt->error);\n }\n\n $stmt->close();\n } else {\n doSQLError($conn->error);\n }\n }", "title": "" }, { "docid": "5db8f757ef97aad61f6e7386e389e2ca", "score": "0.6263991", "text": "public function isCredentialsNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "5db8f757ef97aad61f6e7386e389e2ca", "score": "0.6263991", "text": "public function isCredentialsNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "5db8f757ef97aad61f6e7386e389e2ca", "score": "0.6263991", "text": "public function isCredentialsNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "5db8f757ef97aad61f6e7386e389e2ca", "score": "0.6263991", "text": "public function isCredentialsNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "4c5babd1e0ae699ee507214beadfb901", "score": "0.62619066", "text": "protected static function invalid()\n\t{\n\t\t$lifetime = Config::$items['session']['lifetime'];\n\n\t\treturn (time() - static::$session['last_activity']) > ($lifetime * 60);\n\t}", "title": "" }, { "docid": "eaa27e5c0f798242db127edb8694a6ea", "score": "0.6251934", "text": "public function hasPassword(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "650174ccae693f57bd198b393b3dda17", "score": "0.62489825", "text": "public function getExpired() : bool\n {\n return $this->expired;\n }", "title": "" }, { "docid": "01c6d6b50289465ecd54dc77a4c3bb2e", "score": "0.62372994", "text": "public function isExpired():bool\n {\n return $this->getExpiresAt() <= (new \\DateTime('now'));\n }", "title": "" }, { "docid": "8adbb27bcb168665270468a5d4740692", "score": "0.6231681", "text": "static function current_password_valid () {\n\t\tif (password_verify(Inputter::get_raw('current_password'), self::$password_hash)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0e90ed7ad37cfc69b740430ded3f259d", "score": "0.6229663", "text": "public function isAccessTokenExpired()\n {\n return (new DateTime() > $this->getTokenExpirationDate());\n }", "title": "" }, { "docid": "8b0c271837b67ddcb133feb6c59bfced", "score": "0.6228494", "text": "public function isAccessTokenExpired()\n {\n\n return time() > $this->accessToken->created + $this->accessToken->expires_in;\n }", "title": "" }, { "docid": "59817fc3e45577e8ccc573aa6c191fad", "score": "0.62221676", "text": "public function isExpired() {\n\t\t//value doesn't expire\n\t\tif(!$this->expires) return false;\n\t\t\n\t\t//if it is after the expire time\n\t\treturn time() > $this->expires;\n\t}", "title": "" }, { "docid": "f302f5346ea4a2cc49b7382b02461fe2", "score": "0.621747", "text": "public function isExpired(): bool\n {\n return (new \\DateTime() > $this -> getExpiresAt());\n }", "title": "" }, { "docid": "01508ee033f78b5358209ed75ae29c49", "score": "0.62167877", "text": "public function forgotPassword() {\n $this->checkEmailField(); \n if (empty($this->_errors) && empty($this->_missingValues)) {\n $queryStr = \"SELECT user_id FROM users WHERE email = ? AND active IS NULL\";\n $this->_registry->getObject('db')->execute($queryStr, [$this->_sanitizedValues['email']]);\n $row = $this->_registry->getObject('db')->getRows();\n $user = $row['user_id'];\n if ($user) {\n $token = openssl_random_pseudo_bytes(32);\n $this->_passToken = bin2hex($token);\n $queryStr = \"REPLACE INTO access_tokens (user_id, token, date_expires) \"\n . \"VALUES (?, ?, DATE_ADD(NOW(), INTERVAL 15 MINUTE))\";\n $this->_registry->getObject('db')->execute($queryStr, [$user, $this->_passToken]);\n return ($this->_registry->getObject('db')->affectedRows() > 0) ? $this->_tokenInserted = true : $this->_tokenInserted = false;\n } else {\n $this->_tokenInserted = false;\n }\n }\n }", "title": "" }, { "docid": "08a0d1345eff051e843b7735b369412b", "score": "0.6210482", "text": "public function hasExpired()\n\t{\n\t\treturn $this->expired;\n\t}", "title": "" }, { "docid": "a51e5bb540cd172d6677eb5919bc4ad9", "score": "0.6209766", "text": "protected function isTokenExpired()\n {\n return $this->reader->getStatusCode() === self::TOKEN_EXPIRED_STATUS_CODE;\n }", "title": "" }, { "docid": "459410cbe2dff72f379737e6c3e990df", "score": "0.62014997", "text": "public function isSessionExpired()\n\t{\n\t\treturn Auth::check() ? 1 : 0;\n\t}", "title": "" }, { "docid": "f04cfb85cdd7e8fd2b6d9941d75fb7ea", "score": "0.61966187", "text": "static function password_reset_token_valid ($password_reset_token, $email_address) {\n\t\t$time = time();\n\n\t\t$stm = DB::get_pdo()->prepare('select count(*) from `user` where `email_address`=:email_address and `password_reset_token`=:password_reset_token and `password_reset_expire` > :time');\n\t\t$stm->bindParam(':email_address', $email_address);\n\t\t$stm->bindParam(':password_reset_token', $password_reset_token);\n\t\t$stm->bindParam(':time', $time);\n\t\t$stm->execute();\n\t\t$res = $stm->fetchColumn();\n\n\t\tif ($res > 0) {\n\t\t\t// reset token exists and hasn't expired\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\t// reset token does not exist or has expired\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "a56d42db287ff6c8e00346c5bab3b8ce", "score": "0.61831045", "text": "public function isCredentialsNonExpired()\n {\n if (true === $this->credentialsExpired) {\n return false;\n }\n\n if (null !== $this->credentialsExpireAt && $this->credentialsExpireAt->getTimestamp() < \\time()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "0b5185ed19862525701d9727940bd6a0", "score": "0.61798835", "text": "public function isExpiredByDate();", "title": "" }, { "docid": "0bca252d5c90f49e86c4bda7fd2c4631", "score": "0.61797786", "text": "public function isExpired()\n {\n $today = (24 * 3600) * floor(time() / (24 * 3600));\n return $this->expires < $today;\n }", "title": "" }, { "docid": "730a99affdb974f9ac8e64e9f5740fd2", "score": "0.61759055", "text": "function has_expired(){\r\n if ( ! $this->_wpc_expires || $this->_wpc_expires == '' ) {\r\n return false;\r\n }\r\n // current_time('timestamp')\r\n $time = microtime( true );\r\n return $time > $this->_wpc_expires ? true : false;\r\n }", "title": "" }, { "docid": "04231142c882ce7b7c69107e722fe184", "score": "0.61566323", "text": "public function isExpired()\n\t{\n\t\treturn $this->expires_at && new DateTime($this->expires_at) < new DateTime;\n\t}", "title": "" }, { "docid": "7357c868f6043e3a1799851cf7d2b8a2", "score": "0.6156254", "text": "public function checkPassword(Member $member, $password, ValidationResult &$result = null);", "title": "" }, { "docid": "40927aec76ea2ab28010a16f5a8fd473", "score": "0.6154395", "text": "public function passwordChecker(){\n\t\tif($this->data[$this->alias]['password'] != $this->data[$this->alias]['cpassword']){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "26de6f27733bd9805572a83237038b15", "score": "0.6154302", "text": "public function checkCurrentPassword() {\n\t\t$passwordHasher = new SimplePasswordHasher();\n\t\t$user = $this->findById($this->data['User']['id']);\n\t\treturn ($passwordHasher->hash($this->data['User']['current_password']) === $user['User']['password']);\n\t}", "title": "" }, { "docid": "75dce592bedd8d8959e3d14b961a2e6b", "score": "0.6150845", "text": "function auth_clean_expired_password_requests() {\n delete_records_sql('DELETE FROM {usr_password_request}\n WHERE expiry < ?', array(db_format_timestamp(time())));\n}", "title": "" }, { "docid": "52f23815d8738da0f9ba180c6bbbc4dd", "score": "0.61491543", "text": "function hasExpired(){\n\t\treturn $this->getPaymentStatus() == 2 ? true : false;\n\t}", "title": "" }, { "docid": "c817e21c0c9b3063655ca3e3f4d9080d", "score": "0.614479", "text": "function SetSessionPasswordExpired()\n{\n global $Security;\n if (isset($Security)) {\n $Security->setSessionPasswordExpired();\n } else {\n $_SESSION[SESSION_STATUS] = \"passwordexpired\";\n }\n}", "title": "" }, { "docid": "4ec9636515c9f8703de58b2affea4e57", "score": "0.6138802", "text": "function incorrectCurrentPassword($connection,$username,$current_password){\n $result = true;\n $userExists = userExists($connection,$username);\n //gets the hash of the password of user with given username\n $hashedPassword = $userExists[\"hash\"];\n //checks if inputed password is similar to password\n $checkedPassword = password_verify($current_password,$hashedPassword);\n if($checkedPassword==false){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n\n\n \n }", "title": "" }, { "docid": "f1974b30ac4bf9d3acba1d25e2e23c8c", "score": "0.6138035", "text": "abstract public function hasPassword();", "title": "" }, { "docid": "2d846598eca12f9426d0d64b0deddc84", "score": "0.6134948", "text": "public function isExpired()\n {\n return $this->getClient()->isAccessTokenExpired();\n }", "title": "" }, { "docid": "dd88f737b29978e331f10f6fe1b59a34", "score": "0.6134711", "text": "public function expired()\n {\n return $this->expires_at->lte(Carbon::now());\n }", "title": "" }, { "docid": "a6f8232d782f490eeff4d1c0aa23b04a", "score": "0.61215854", "text": "private function expired($name){\n \t\treturn (!empty($_SESSION[md5($this->hash.$name)][$name]) && (($_SESSION[md5($this->hash.$name)][$name]['created']+$this->expiration) < time()));\n \t}", "title": "" }, { "docid": "40b1bba0bdedb5cedb0325f6d09756af", "score": "0.610587", "text": "public function isExpired()\n\t {\n\t \tif ($this->isAvailable()) {\n\t \t\t$ed = new DateTime($this->get(\"expire_date\"));\n\t \t\t$now = new DateTime();\n\t \t\tif ($ed > $now) {\n\t \t\t\treturn false;\n\t \t\t}\n\t \t}\n\n\t \treturn true;\n\t }", "title": "" }, { "docid": "4f70b113b1fcbbf07e9f076e8a1f2b10", "score": "0.60948735", "text": "function isExpired() {\n $item = $this->getItem($this->itemName);\n if (! $item) return true;\n return ($this->the_age > $this->lifetime);\n }", "title": "" }, { "docid": "1eebfcb4afd53f93ce817779462d7a91", "score": "0.60906345", "text": "public function isLocked()\n {\n $attempts = $this->_module->passwordSettings['wrongAttempts'];\n return (!empty($attempts) && $this->password_fail_attempts > $attempts);\n }", "title": "" }, { "docid": "58754b442cc98eef4b60054da3e65839", "score": "0.6085503", "text": "public function isExpired()\n {\n return $this->created_at->addSeconds(static::EXPIRE_DURATION)->isPast();\n }", "title": "" }, { "docid": "80d882c0ec34d7c0dc5abc0c2ad21d57", "score": "0.6078814", "text": "public function passwordHasNotExpired($attribute, $params)\n {\n if (($behavior = $this->asa('expiredPasswordBehavior')) !== null) {\n return $behavior->passwordHasNotExpired($attribute, $params);\n }\n\n return true;\n }", "title": "" }, { "docid": "5ac516ef88ef54b7e6302fc12d55c561", "score": "0.60776", "text": "function CheckTimeOut()\n {\n $sessid = $this->app->DB->Select(\"SELECT sessionid FROM person_online,person WHERE\n login='1' AND sessionid='\".session_id().\"' AND person.id=person_online.person_id AND person.zustand='1' LIMIT 1\");\n \n if(session_id() == $sessid)\n { \n // check if time is expired\n $time = $this->app->DB->Select(\"SELECT UNIX_TIMESTAMP(time) FROM person_online,person WHERE\n login='1' AND sessionid='\".session_id().\"' AND person.id=person_online.person_id AND person.zustand='1' LIMIT 1\");\n\n if((time()-$time) > $this->app->WFconf[logintimeout])\n {\n\t$this->app->WF->ReBuildPageFrame();\n\t$this->Logout(\"Ihre Zeit ist abgelaufen, bitte melden Sie sich erneut an.\");\n\treturn false;\n }\n else {\n\t// update time\n\t $this->app->DB->Update(\"UPDATE person_online,person SET person_online.time=NOW() WHERE\n login='1' AND sessionid='\".session_id().\"' AND person.id=person_online.person_id AND person.zustand='1'\");\n\treturn true; \n }\n }\n\n }", "title": "" }, { "docid": "8011619fcce073b5cc329672434fcb27", "score": "0.60725427", "text": "private function validateIfExpire():bool\n {\n $sessionExpire = $this->getKeyInSession()['SessionExpiration'];\n $dateNow = Carbon::parse($sessionExpire);\n //Si es menor igual que la fecha de expiracion\n return $dateNow->lte($sessionExpire);\n\n }", "title": "" }, { "docid": "28eecf29c3b059f5bc6832ff05070ab3", "score": "0.6067112", "text": "public function isCredentialsNonExpired()\n {\n return $this->creadentialsNonExpired;\n }", "title": "" }, { "docid": "b1eb654ae051cd9c3c7efacc082367a4", "score": "0.6055649", "text": "public function checkExpirationDate()\n {\n return new DateTime($this->getAttribute('expired_date')) > new DateTime();\n }", "title": "" }, { "docid": "87ac8d7291bfd2eda96393c43c317719", "score": "0.6050734", "text": "public function hasExpired()\n {\n return (bool) Carbon::now()->greaterThan(Carbon::parse($this->expires_on));\n }", "title": "" }, { "docid": "679a82ba43ece97c53473b171b626db4", "score": "0.60422045", "text": "public function validatePassword(): bool\n {\n $password = $this->encode();\n\n return $password === $this->user{ConfigService::passwordField()};\n }", "title": "" }, { "docid": "383e6faa30e54ec610104d4dc8242909", "score": "0.60217875", "text": "public function validateMatchPassword()\n {\n $adminUser = $this->findByUsername($this->userName);\n $password = $adminUser['User']['password'];\n return AuthComponent::password($this->data['User']['old_password']) == $password;\n }", "title": "" }, { "docid": "bd418ccacf785756386b6cddad89c317", "score": "0.6018048", "text": "public function isAccountNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "bd418ccacf785756386b6cddad89c317", "score": "0.6018048", "text": "public function isAccountNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "bd418ccacf785756386b6cddad89c317", "score": "0.6018048", "text": "public function isAccountNonExpired()\n {\n return true;\n }", "title": "" }, { "docid": "3143076635f36bc9f01d1c8ea2fb8319", "score": "0.6013395", "text": "function _expired () {\n\t\t\n\t\tif ($this->usePHPEngine) {\n\t\t\tif (isset($_SESSION[$this->prefix.'_wpxTime_'.$this->sessionId])) {\n\t\t\t\tif ($_SESSION[$this->prefix.'_wpxTime_'.$this->sessionId] >= (time () - WPRO_SESS_LIFETIME)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t$this->file = $this->fs->fileName($this->getTempDir().$this->prefix.md5($this->ipHash.$this->sessionId).'.php');\n\t\t\t\n\t\t\tif (!$this->fs->fileExists($this->file)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tif ($this->fs->fileModTime($this->file) >= (time () - WPRO_SESS_LIFETIME)) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
b337de5df2d9b991285e0d2f920e9fc6
Version History Log Note by mainID and version number Get the version_history log note.
[ { "docid": "b9884e571b918c545bd12973927973fd", "score": "0.6452216", "text": "public function selectCurrentNoteForConstellation($mainID, $version)\n {\n $result = $this->sdb->query(\n 'select note from version_history where id=$1 and version=$2',\n array($mainID, $version));\n $row = $this->sdb->fetchrow($result);\n return $row['note'];\n }", "title": "" } ]
[ { "docid": "d359b8ec67327881b886653907db7339", "score": "0.66618496", "text": "public function getVersionLog();", "title": "" }, { "docid": "64d382baf4f5d2178000ef8549f053bc", "score": "0.6566403", "text": "public function getVersion() {\n $logRepo = \\Env::get('em')->getRepository('Cx\\Core\\ContentManager\\Model\\Entity\\LogEntry');\n return $logRepo->getLatestLog($this);\n }", "title": "" }, { "docid": "99f93a9ec5370b862535dbb7b589f855", "score": "0.62170404", "text": "public function getRevision();", "title": "" }, { "docid": "72828e418659265c33fc61445b54b047", "score": "0.61609495", "text": "public function getRevision() ;", "title": "" }, { "docid": "d05e7f72760072491330be8379170140", "score": "0.6147786", "text": "public function getRevision() {}", "title": "" }, { "docid": "6f1cc7027d8bf0fb6cd55cf3bcc44084", "score": "0.6136747", "text": "public function getVersionRecord() {}", "title": "" }, { "docid": "94eac3fa101ab67921bb4c01d2dc4533", "score": "0.59231085", "text": "public function insertVersionHistory($mainID, $userid, $role, $status, $note, $useridSecondary=null)\n {\n if (! $mainID)\n {\n $mainID = $this->selectID();\n }\n $qq = 'insert_version_history';\n // We need version_history.id and version_history.id returned.\n $this->sdb->prepare($qq,\n 'insert into version_history\n (id, user_id, role_id, status, is_current, note, user_id_secondary)\n values\n ($1, $2, $3, $4, $5, $6, $7)\n returning version');\n\n $result = $this->sdb->execute($qq, array($mainID, $userid, $role, $status, true, $note, $useridSecondary));\n $row = $this->sdb->fetchrow($result);\n $vhInfo['version'] = $row['version'];\n $vhInfo['ic_id'] = $mainID;\n $this->sdb->deallocate($qq);\n return $vhInfo;\n }", "title": "" }, { "docid": "4dca9ed67b54e036fb6e5ad7ed0a7894", "score": "0.5877805", "text": "public function getVersionID()\n {\n return $this->versionID;\n }", "title": "" }, { "docid": "956cb2e5912afb732fbbbf375bfd965d", "score": "0.5761961", "text": "public function updateVersionHistory($appUserID, $roleID, $status, $note, $ic_id)\n {\n /*\n * Note: query() as opposed to prepare() and execute()\n * query() has two args:\n * 1) a string (sql query)\n * 2) an array of the vars that match the query placeholders\n *\n */\n $result = $this->sdb->query('insert into version_history\n (id, user_id, role_id, status, is_current, note)\n values\n ($1, $2, $3, $4, $5, $6)\n returning version',\n array($ic_id, $appUserID, $roleID, $status, true, $note));\n $row = $this->sdb->fetchrow($result);\n return $row['version'];\n }", "title": "" }, { "docid": "4d9a138ded58bcaf4b528807b0ca12b4", "score": "0.5742214", "text": "public function getVersionId()\n {\n return $this->version_id;\n }", "title": "" }, { "docid": "4d9a138ded58bcaf4b528807b0ca12b4", "score": "0.5742214", "text": "public function getVersionId()\n {\n return $this->version_id;\n }", "title": "" }, { "docid": "c824c6dc2df653392fcbc2e8d6b9e8b6", "score": "0.573451", "text": "public function parseChangelog()\n\t\t{\n\t\t\t// Set the versioning array\n\t\t\t$info = array();\n\n\t\t\t// Set the Changelog file path\n\t\t\t$filename = file_get_contents(HOME_URI . '/CHANGELOG.md');\n\t\t\t$versions = explode(\"##\", $filename);\n\t\t\tarray_shift($versions);\n\t\t\t$idx = 0;\n\n\t\t\t// Get the version informations\n\t\t\tforeach($versions as $row => $item)\n\t\t\t{\n\t\t\t\t// Check if the data refers to the version and date or description\n\t\t\t\tif($row % 2 == 0) {\n\t\t\t\t\t// Separate version and date\n\t\t\t\t\t$temp = delete_all_between('(', ')', $item);\n\t\t\t\t\t$temp = explode('-', $temp, 2);\n\n\t\t\t\t\t// Version\n\t\t\t\t\t$info[$idx]['version'] = $temp[0];\n\n\t\t\t\t\t// Date\n\t\t\t\t\t$info[$idx]['date'] = $temp[1];\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\t// Clean-up the description\n\t\t\t\t\t$temp = trim(str_replace('# Commits', '', $item));\n\t\t\t\t\t$temp = preg_split('/(- |])/', $temp);\n\n\t\t\t\t\t// Initialize the description\n\t\t\t\t\t$info[$idx]['description'] = '';\n\n\t\t\t\t\tfor ($i = 1; $i < sizeof($temp); $i+=2) {\n\t\t\t\t\t\t// Link to commit\n\t\t\t\t\t\t$link = str_replace('(', '', $temp[($i + 1)]);\n\t\t\t\t\t\t$link = str_replace(')', '', $link);\n\n\t\t\t\t\t\t// Description\n\t\t\t\t\t\t$info[$idx]['description'] .= \"<a href=\" . $link . \" target='_blank'>- \" . $temp[$i] . \"]</a></br>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add the index\n\t\t\t\t\t$idx += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if there is some version\n\t\t\tif ( isset($info[0]) && strcmp($info[0]['description'], \"\") != 0 )\n\t\t\t{\n\t\t\t\treturn $info;\n\t\t\t} else {\n\t\t\t\treturn 'No activity available yet.';\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "8de2f12a8cf17244393e8ce2fb7c1df9", "score": "0.5685284", "text": "public function getRev() : string;", "title": "" }, { "docid": "3843306148c295a4a095dc1347d2d2d4", "score": "0.568438", "text": "public function selectCurrentVersion($mainID)\n {\n $result = $this->sdb->query(\n 'select max(version) as version\n from version_history\n where version_history.id=$1',\n array($mainID));\n $row = $this->sdb->fetchrow($result);\n return $row['version'];\n }", "title": "" }, { "docid": "8726c6b3eddf9be9edf9e0f7ae15052a", "score": "0.5682752", "text": "function print_phpWebNotes_version() {\r\n\t\tif ( ON == config_get( 'show_version' ) ) {\r\n\t\t\techo '<span class=\"version\">phpWebNotes - ' . config_get( 'phpWebNotes_version' ) . '</span><br />';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b2720e97e9835544e458fecdfc58b38d", "score": "0.566141", "text": "protected function getHistoryLink( Title $title ) {\n\t\t$user = $this->getUser();\n\t\t$isMainPage = $title->isMainPage();\n\t\t// Get rev_timestamp of current revision (preloaded by MediaWiki core)\n\t\t$timestamp = $this->getOutput()->getRevisionTimestamp();\n\t\t$mp = new MobilePage( $this->getTitle(), false );\n\t\t$mp->setLatestTimestamp( $timestamp );\n\t\t// Main pages tend to include transclusions (see bug 51924)\n\t\tif ( $isMainPage ) {\n\t\t\t$lastModified = $this->msg( 'mobile-frontend-history' )->plain();\n\t\t} else {\n\t\t\t$lastModified = $this->msg(\n\t\t\t\t'mobile-frontend-last-modified-date',\n\t\t\t\t$this->getLanguage()->userDate( $timestamp, $user ),\n\t\t\t\t$this->getLanguage()->userTime( $timestamp, $user )\n\t\t\t)->parse();\n\t\t}\n\t\t$edit = $mp->getLatestEdit();\n\t\t$link = [\n\t\t\t// Use $edit['timestamp'] (Unix format) instead of $timestamp (MW format)\n\t\t\t'data-timestamp' => $isMainPage ? '' : $edit['timestamp'],\n\t\t\t'href' => SpecialPage::getTitleFor( 'History', $title )->getLocalURL(),\n\t\t\t'text' => $lastModified,\n\t\t\t'data-user-name' => $edit['name'],\n\t\t\t'data-user-gender' => $edit['gender'],\n\t\t];\n\t\treturn $link;\n\t}", "title": "" }, { "docid": "093c271c8ef232f2476ef5264fe8c261", "score": "0.565248", "text": "public function getVersionId();", "title": "" }, { "docid": "e1898fa3de1e77356c7a1c617f1b4672", "score": "0.5631657", "text": "public function getRevisionNumber()\n {\n return $this->revision_number;\n }", "title": "" }, { "docid": "60bd40f5eeccf0ebd572a2b1bf5a87e4", "score": "0.562838", "text": "public function getRevisionID()\n {\n return $this->revisionid;\n }", "title": "" }, { "docid": "f60f1833c9140a2e00054b0aee6d7a8e", "score": "0.5623397", "text": "function getInfo($version_history_id)\n {\n global $conn, $feedback;\n\n $version_history_id = addslashes(htmlspecialchars(trim($version_history_id)));\n if ($version_history_id == '') {\n $feedback = \"Please Choose an article version\";\n return false;\n }\n\n //$q = \"SELECT ar.*, cc.campaign_name, cc.campaign_id, ck.copy_writer_id, ck.editor_id, ck.keyword, ck.article_type, ck.date_start, ck.date_end, ck.is_sent, ck.keyword_meta, ck.description_meta,ck.mapping_id \".\n $q = \"SELECT arvh.*, cc.campaign_name, cc.client_id, cc.campaign_id,ck.keyword \".\n \"FROM articles_version_history AS arvh \".\n \"LEFT JOIN campaign_keyword AS ck ON (arvh.keyword_id = ck.keyword_id) \".\n \"LEFT JOIN client_campaigns AS cc ON (cc.campaign_id = ck.campaign_id) \".\n \"WHERE arvh.version_history_id = '\". $version_history_id . \"' AND ck.status!='D' \";\n $ret = $conn->GetRow($q);\n $version = $ret['version_number'];\n if ($ret['created_by'] > 0) {\n $created_by = $ret['created_by'];\n if ($ret['created_role'] == 'client') {\n $sql = \"SELECT user_name FROM client WHERE client_id = \" . $created_by;\n } else {\n $sql = \"SELECT user_name FROM users WHERE user_id = \" . $created_by;\n }\n $ret['submitted_by'] = $conn->GetOne($sql);\n }\n $article_id = $ret['article_id'];\n $ret['richtext_body'] = html_entity_decode($ret['richtext_body'], ENT_QUOTES, \"UTF-8\");\n $q = \"SELECT coa.*, u.user_name AS creator, c.user_name AS ccreator \" . \n \"FROM comments_on_articles AS coa \".\n \"LEFT JOIN users AS u ON (u.user_id = coa.creation_user_id) \".\n \"LEFT JOIN client AS c ON (c. client_id = coa.creation_user_id) \".\n \"LEFT JOIN articles AS ar ON (ar.article_id = coa.article_id) \".\n \"LEFT JOIN campaign_keyword AS ck ON (ar.keyword_id = ck.keyword_id) \".\n \"WHERE coa.article_id = '\".$article_id.\"' AND coa.version_number='\" . $version. \"' ORDER BY coa.version_number, coa.creation_date\";\n $comments = $conn->GetAll($q);\n if (!empty($comments)) $ret['comment'] = $comments;\n return $ret;\n }", "title": "" }, { "docid": "9c08835b411dc078d41bbf623673a3e5", "score": "0.5619692", "text": "function VersionDetail()\n{\n\tglobal $txt, $context;\n\n\tisAllowedTo('admin_forum');\n\n\t// Call the function that'll get all the version info we need.\n\tloadSource('Subs-Admin');\n\n\t// Get a list of current server versions.\n\t$checkFor = array(\n\t\t'left' => array(\n\t\t\t'server',\n\t\t\t'php',\n\t\t\t'db_server',\n\t\t),\n\t\t'right_top' => array(\n\t\t\t'safe_mode',\n\t\t\t'gd',\n\t\t\t'ffmpeg',\n\t\t\t'imagick',\n\t\t),\n\t\t'right_bot' => array(\n\t\t\t'phpa',\n\t\t\t'apc',\n\t\t\t'memcache',\n\t\t\t'xcache',\n\t\t),\n\t);\n\tforeach ($checkFor as $key => $list)\n\t\t$context['current_versions'][$key] = getServerVersions($list);\n\n\t// Then we need to prepend some stuff into the left column - Wedge versions etc.\n\t$context['current_versions']['left'] = array(\n\t\t'yourVersion' => array(\n\t\t\t'title' => $txt['support_versions_forum'],\n\t\t\t'version' => WEDGE_VERSION,\n\t\t),\n\t\t'wedgeVersion' => array(\n\t\t\t'title' => $txt['support_versions_current'],\n\t\t\t'version' => '??',\n\t\t),\n\t\t'sep1' => '',\n\t) + $context['current_versions']['left'];\n\n\t// And combine the right\n\t$context['current_versions']['right'] = $context['current_versions']['right_top'] + array('sep2' => '') + $context['current_versions']['right_bot'];\n\tunset($context['current_versions']['right_top'], $context['current_versions']['right_bot']);\n\n\t// Now the file versions.\n\t$versionOptions = array(\n\t\t'include_ssi' => true,\n\t\t'include_subscriptions' => true,\n\t\t'sort_results' => true,\n\t);\n\t$version_info = getFileVersions($versionOptions);\n\n\t// Add the new info to the template context.\n\t$context += array(\n\t\t'file_versions' => $version_info['file_versions'],\n\t\t'default_template_versions' => $version_info['default_template_versions'],\n\t\t'template_versions' => $version_info['template_versions'],\n\t\t'default_language_versions' => $version_info['default_language_versions'],\n\t\t'default_known_languages' => array_keys($version_info['default_language_versions']),\n\t);\n\n\t// Make it easier to manage for the template.\n\t$context['forum_version'] = WEDGE_VERSION;\n\n\twetem::load('view_versions');\n\t$context['page_title'] = $txt['admin_version_check'];\n}", "title": "" }, { "docid": "bbeb00d75e75ecc0beeaafe45ca6b082", "score": "0.55848575", "text": "public function getResourceId()\n {\n return 'HistoryLogChanges';\n }", "title": "" }, { "docid": "1fcefa6cbe01188f93f13374c3a51d4f", "score": "0.5578625", "text": "public function getLastRevisionId()\n {\n $this->pull();\n $result = $this->execute('log', array('-n1'), array());\n foreach($result as $line)\n {\n if ('commit' == substr($line, 0, 6))\n {\n $parts = explode(' ', $line);\n return (string)$parts[1];\n }\n }\n }", "title": "" }, { "docid": "48b87cf5c5d13c4ebbca7eeff9997343", "score": "0.5575082", "text": "public function getLastRevision();", "title": "" }, { "docid": "2bba8f8ac8f5d787df311f27bdacc5ad", "score": "0.5563562", "text": "public function getVersionId() {\n\t\treturn $this->versionId;\n\t}", "title": "" }, { "docid": "9eee392fcc396ee3645b7d34c530579f", "score": "0.55144453", "text": "protected function getGitRevision() {}", "title": "" }, { "docid": "3f573d92f8e47c338d3095a8547f5b94", "score": "0.5501365", "text": "public function getVersionNo()\n {\n return $this->versionNo;\n }", "title": "" }, { "docid": "f6659f4b06b505416e24f3b654d35200", "score": "0.54973865", "text": "static function getHistoryEntry($data) {\n\n switch ($data['linked_action'] - Log::HISTORY_PLUGIN) {\n case 0:\n return __('History from plugin example', 'example');\n }\n\n return '';\n }", "title": "" }, { "docid": "685de3a5906b70405f33c4c48cc11ffe", "score": "0.5490924", "text": "function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}", "title": "" }, { "docid": "db969f727c1d09747a3f78652ad42241", "score": "0.5482138", "text": "public function getRevision()\n {\n return $this->_rev;\n }", "title": "" }, { "docid": "23323efd72ad27ec1d8e136ee3c46f54", "score": "0.547499", "text": "public static function getVersion()\r\n {\r\n \t$i = self::getVersionInfo();\r\n \treturn trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\r\n \t. \"-{$i['stability']}{$i['number']}\", '.-');\r\n }", "title": "" }, { "docid": "966f13e18f587b59fb498eed18236898", "score": "0.54737085", "text": "private function getChangelog($parent) {\n\t\t$file = $parent->getParent()->getPath('extension_administrator') .\n\t\t\t\t'/changelog.txt';\n\t\tif (! file_exists($file)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$changelog = file_get_contents($file);\n\t\t$changelog = preg_replace(\"#\\r#s\", '', $changelog);\n\n\t\t$parts = explode(\"\\n\\n\", $changelog);\n\t\tif (empty($parts)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$version = '';\n\t\t$changelog = array ();\n\n\t\tforeach ($parts as $part) {\n\t\t\t$part = trim($part);\n\n\t\t\t// changeloh eintrag ?!\n\t\t\tif (! preg_match('#.*(\\d+\\.\\d+\\.\\d+ - \\[.*\\]).*#i', $part)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// changelog version ermitteln\n\t\t\tif (preg_match('#.*(\\d+\\.\\d+\\.\\d+) - \\[.*\\].*#i', $part, $version)) {\n\t\t\t\t$version = $version[1];\n\t\t\t}\n\n\t\t\tif (version_compare($version, $this->fromVersion, '<=')) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$part = preg_replace('#.*(\\d+\\.\\d+\\.\\d+ - \\[.*\\]).*#', '<b>$1</b><pre style=\"line-height: 1.6em;\">', $part);\n\n\t\t\t$changelog[] = $part . '</pre>';\n\t\t}\n\n\t\t$changelog = implode(\"\\n\\n\", $changelog);\n\n\t\t// Change Type: @see changelog.txt\n\t\t$change_types = [ '+' => [ 'Addition', 'success' ],\n\t\t\t\t'-' => [ 'Removed', 'danger' ], '^' => [ 'Change', 'warning' ],\n\t\t\t\t'*' => [ 'Security Fix', 'info' ], '#' => [ 'Bug Fix', 'info' ],\n\t\t\t\t'!' => [ 'Note', 'info' ],\n\t\t\t\t'$' => [ 'Language fix or change', 'info' ] ];\n\t\tforeach ($change_types as $char => $type) {\n\t\t\t$changelog = preg_replace('#\\n' . preg_quote($char, '#') . ' #', \"\\n\" .\n\t\t\t\t\t'<span class=\"label label-sm label-' . $type[1] . '\" title=\"' .\n\t\t\t\t\t$type[0] . '\">' . $char . '</span> ', $changelog);\n\t\t}\n\t\t$changelog = preg_replace('#\\n #', \"\\n \", $changelog);\n\n\t\t$title = JText::sprintf('COM_CLM_TURNIER_CHANGELOG', $this->fromVersion);\n\n\t\treturn '<div style=\"max-height: 240px; padding-right: 20px; margin-right: -20px; overflow: auto;\">' .\n\t\t\t\t'<p><b>' . $title . '</b></p>' . $changelog . '</div>';\n\t}", "title": "" }, { "docid": "fd67015c2e3375d47858e0e74b7cb98c", "score": "0.5468021", "text": "public function getRevisionId() {\n return $this->revisionId;\n }", "title": "" }, { "docid": "00758b1a816ceb618691869038af1da9", "score": "0.5457714", "text": "public function selectVersionHistory($vhInfo,$listAll = false) {\n $limitHistory = 'and (v.status=\\'published\\' or v.status=\\'ingest cpf\\' or v.status=\\'deleted\\' or v.status=\\'tombstone\\' or v.status=\\'ingest cpf\\' or v.status=\\'merge split\\')';\n if ($listAll === true)\n $limitHistory = \"\";\n $result = $this->sdb->query(\n 'select v.*, to_char(v.timestamp, \\'YYYY-MM-DD\"T\"HH24:MI:SS\\') as update_date, a.username, a.fullname\n from version_history v, appuser a\n where v.user_id = a.id and v.id=$1 and v.version<=$2\n '.$limitHistory.'\n order by v.timestamp asc',\n array($vhInfo[\"ic_id\"], $vhInfo[\"version\"]));\n\n $all = array();\n while ($row = $this->sdb->fetchrow($result))\n {\n array_push($all, $row);\n }\n return $all;\n }", "title": "" }, { "docid": "07b6736a9a569e098101787c404a01d0", "score": "0.5443418", "text": "public function app_version_get(){\n $data = $this->model->getAllwhere('app_version_history','','versioncode,versionname','id','DESC','1');\n\n $resp = array('rccode' => 1, 'version' => !empty($data) ? $data[0]:[]); \n $this->response($resp);\n \n }", "title": "" }, { "docid": "c0b0e8fae529bcd161499bcfd73f0906", "score": "0.5416316", "text": "private function _log_version_number () {\n\t\t// Log the version number.\n\t\tupdate_option( $this->token . '-version', $this->version );\n\t}", "title": "" }, { "docid": "77e77ff5d75253e884bedb8e2044dccf", "score": "0.54138887", "text": "public function getRevision()\n {\n return $this->result[\"revision\"];\n }", "title": "" }, { "docid": "86637138e87a38f78c119f534f7116e6", "score": "0.5413002", "text": "public static function getVersionFromCHANGELOG($appName, $revOnly = false)\n {\n //-- Check if we have a .git/hooks/pre-commit generated version file\n $path = JPATH_ADMINISTRATOR.'/components/'.$appName.'/version.txt';\n\n if(file_exists($path))\n {\n $contents = file_get_contents($path);\n\n $parts = explode('-', $contents);\n\n if( ! isset($parts[1]))\n return trim($contents);\n\n //-- If the second part is '0' we have a tagged version\n return ('0' != $parts[1]) ? trim($contents) : $parts[0];\n }\n\n //-- Check for a SVN id in changelog\n // TODO change to getVersionFromFile\n\n $file = JPATH_ADMINISTRATOR.DS.'components'.DS.$appName.DS.'CHANGELOG.php';\n\n if( ! file_exists($file))\n {\n return false;\n }\n\n //--we do not use JFile here cause we only need one line which is\n //--normally at the beginning..\n $f = fopen($file, 'r');\n $ret = false;\n\n while($line = fgets($f, 1000))\n {\n if(false == strpos($line, '@version'))\n continue;\n\n $parts = explode('$', $line);\n\n if(count($parts) < 2)\n continue;\n\n $parts = explode(' ', $parts[1]);\n\n if(count($parts) < 3)\n continue;\n\n $svn_rev = $parts[2];\n $svn_date = date('d-M-Y', strtotime($parts[3]));\n $ret = $svn_rev;\n $ret .=($revOnly) ? '' : ' / '.$svn_date;\n\n break;\n\n }// while\n\n fclose($f);\n\n return $ret;\n }", "title": "" }, { "docid": "001ba512ca2bccf6040bf4979dbd3a5e", "score": "0.5404559", "text": "public function getRevision()\n {\n return $this->sys->getRevision();\n }", "title": "" }, { "docid": "d7a4ae607d878a8d15878d766f060bbf", "score": "0.54018253", "text": "public function revisionOverview(LogInterface $log) {\n $account = $this->currentUser();\n $langcode = $this->languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId();\n $langname = $this->languageManager()->getLanguageName($langcode);\n $languages = $log->getTranslationLanguages();\n $has_translations = (count($languages) > 1);\n $log_storage = $this->entityManager()->getStorage('log');\n $type = $log->getType();\n\n $build['#title'] = $has_translations ? $this->t('@langname revisions for %title', ['@langname' => $langname, '%title' => $log->label()]) : $this->t('Revisions for %title', ['%title' => $log->label()]);\n $header = array($this->t('Revision'), $this->t('Operations'));\n\n $revert_permission = (($account->hasPermission(\"revert $type revisions\") || $account->hasPermission('revert all revisions') || $account->hasPermission('administer logs')) && $log->access('update'));\n $delete_permission = (($account->hasPermission(\"delete $type revisions\") || $account->hasPermission('delete all revisions') || $account->hasPermission('administer logs')) && $log->access('delete'));\n\n $rows = array();\n\n $vids = $log_storage->revisionIds($log);\n\n $latest_revision = TRUE;\n\n foreach (array_reverse($vids) as $vid) {\n /** @var \\Drupal\\log\\LogInterface $revision */\n $revision = $log_storage->loadRevision($vid);\n if ($revision->hasTranslation($langcode) && $revision->getTranslation($langcode)->isRevisionTranslationAffected()) {\n $username = [\n '#theme' => 'username',\n '#account' => $revision->getRevisionAuthor(),\n ];\n\n // Use revision link to link to revisions that are not active.\n $date = $this->dateFormatter->format($revision->revision_timestamp->value, 'short');\n if ($vid != $log->getRevisionId()) {\n $link = $this->l($date, new Url('entity.log.revision', ['log' => $log->id(), 'log_revision' => $vid]));\n }\n else {\n $link = $log->link($date);\n }\n\n $row = [];\n $column = [\n 'data' => [\n '#type' => 'inline_template',\n '#template' => '{% trans %}{{ date }} by {{ username }}{% endtrans %}{% if message %}<p class=\"revision-log\">{{ message }}</p>{% endif %}',\n '#context' => [\n 'date' => $link,\n 'username' => $this->renderer->renderPlain($username),\n 'message' => ['#markup' => $revision->revision_log->value, '#allowed_tags' => Xss::getHtmlTagList()],\n ],\n ],\n ];\n // @todo Simplify once https://www.drupal.org/log/2334319 lands.\n $this->renderer->addCacheableDependency($column['data'], $username);\n $row[] = $column;\n\n if ($latest_revision) {\n $row[] = [\n 'data' => [\n '#prefix' => '<em>',\n '#markup' => $this->t('Current revision'),\n '#suffix' => '</em>',\n ],\n ];\n foreach ($row as &$current) {\n $current['class'] = ['revision-current'];\n }\n $latest_revision = FALSE;\n }\n else {\n $links = [];\n if ($revert_permission) {\n $links['revert'] = [\n 'title' => $this->t('Revert'),\n 'url' => $has_translations ?\n Url::fromRoute('log.revision_revert_translation_confirm', ['log' => $log->id(), 'log_revision' => $vid, 'langcode' => $langcode]) :\n Url::fromRoute('log.revision_revert_confirm', ['log' => $log->id(), 'log_revision' => $vid]),\n ];\n }\n\n if ($delete_permission) {\n $links['delete'] = [\n 'title' => $this->t('Delete'),\n 'url' => Url::fromRoute('log.revision_delete_confirm', ['log' => $log->id(), 'log_revision' => $vid]),\n ];\n }\n\n $row[] = [\n 'data' => [\n '#type' => 'operations',\n '#links' => $links,\n ],\n ];\n }\n\n $rows[] = $row;\n }\n }\n\n $build['log_revisions_table'] = array(\n '#theme' => 'table',\n '#rows' => $rows,\n '#header' => $header,\n '#attached' => array(\n 'library' => array('log/drupal.log.admin'),\n ),\n );\n\n return $build;\n }", "title": "" }, { "docid": "2670f65c2c27a2c04890c55620c0a739", "score": "0.540036", "text": "function ajan_get_version() {\n\t\treturn activitynotifications()->version;\n\t}", "title": "" }, { "docid": "2036bd3775afc7e5e2cd4212c0a014bf", "score": "0.5395279", "text": "public function getHistoryFields()\n {\n $owner = $this->owner;\n if (!$owner->isLatestVersion()) {\n return null;\n }\n\n $config = GridFieldConfig_RecordViewer::create()\n ->removeComponentsByType([\n GridFieldToolbarHeader::class,\n GridFieldSortableHeader::class,\n GridFieldPaginator::class,\n GridFieldPageCount::class,\n GridFieldViewButton::class\n ])\n ->addComponent(new GridFieldTitleHeader)\n ->addComponent(new GridFieldHistoryButton);\n $config->getComponentByType(GridFieldDetailForm::class)\n ->setItemRequestClass(HistoryGridFieldItemRequest::class);\n $config->getComponentByType(GridFieldDataColumns::class)\n ->setDisplayFields([\n 'Version' => '#',\n 'LastEdited.Nice' => _t(__CLASS__ . '.WHEN', 'When'),\n 'Title' => _t(__CLASS__ . '.TITLE', 'Title'),\n 'Author.Name' => _t(__CLASS__ . '.AUTHOR', 'Author')\n ]);\n\n return FieldList::create(\n GridField::create(\n 'History',\n '',\n Versioned::get_all_versions(\n $owner->ClassName,\n $owner->ID\n )\n ->sort('Version', 'DESC'),\n $config\n )\n ->addExtraClass('grid-field--history')\n );\n }", "title": "" }, { "docid": "14f37322600a2ee44e4174197d3a3df8", "score": "0.539453", "text": "public function getPreviousVersionID()\n {\n return $this->previousVersionID;\n }", "title": "" }, { "docid": "ccfa5874c51fe6a0865db09b5bc4e2bf", "score": "0.5368659", "text": "function readFileVersion()\n\t{\n\t\treset($this->lastfilecontent);\n\t\t$regs = array();\n\t\tforeach ($this->lastfilecontent as $row)\n\t\t{\n\t\t\tif (ereg(\"^<#([0-9]+)>\", $row, $regs))\n\t\t\t{\n\t\t\t\t$version = $regs[1];\n\t\t\t}\n\t\t}\n\n\t\t$this->fileVersion = (integer) $version;\n\t\treturn $this->fileVersion; \n\t}", "title": "" }, { "docid": "c680039ca72c334ee26056e9da024821", "score": "0.53667605", "text": "public function selectStatus($mainID, $version)\n {\n $result = $this->sdb->query(\n 'select status from version_history where id=$1 and version=$2',\n array($mainID, $version));\n $row = $this->sdb->fetchrow($result);\n return $row['status'];\n }", "title": "" }, { "docid": "fce1136c69d4b51c3bd1332221856ff8", "score": "0.5366585", "text": "public static function getVersionInfo();", "title": "" }, { "docid": "dd190672d080f1ccfc12649b4aac1767", "score": "0.5365774", "text": "function logAllToRevision($log)\n{\n $revisions = array();\n if ($log != \"\" && preg_match_all('/commit\\s+(\\w{40})\\n/i', $log, $matches)) {\n $data = preg_split('/commit\\s+\\w{40}\\n/i', $log);\n foreach ($matches[1] as $k => $match) {\n preg_match('/Author:\\s+([^\\n]+)\\n/i', $data[$k + 1], $author);\n if (isset($author[1])) {\n $author = htmlentities($author[1]);\n $data[$k + 1] = preg_replace('/Author:\\s+[^\\n]+\\n/i', '', $data[$k + 1]);\n } else $author = '';\n\n preg_match('/Date:\\s+([^\\n]+)\\n/i', $data[$k + 1], $date);\n if (isset($date[1])) {\n $date = $date[1];\n $data[$k + 1] = preg_replace('/Date:\\s+[^\\n]+\\n/i', '', $data[$k + 1]);\n } else $date = '';\n\n $comment = trim($data[$k + 1]);\n\n $revisions[$match] = array(\n 'hash' => $match,\n 'author' => $author,\n 'date' => $date, //date('Y-m-d H:i:s', strtotime($date))\n 'comment' => $comment\n );\n }\n }\n return $revisions;\n}", "title": "" }, { "docid": "7cee55181e97f39f7521a2f2cbc668e1", "score": "0.5354041", "text": "public function showChangelog()\n {\n $news_view = ee('Model')->get('MemberNewsView')\n ->filter('member_id', ee()->session->userdata('member_id'))\n ->first();\n\n if (! $news_view) {\n $news_view = ee('Model')->make(\n 'MemberNewsView',\n ['member_id' => ee()->session->userdata('member_id')]\n );\n }\n\n $news_view->version = APP_VER;\n $news_view->save();\n\n ee()->functions->redirect(\n ee()->cp->makeChangelogLinkForVersion(APP_VER)\n );\n }", "title": "" }, { "docid": "a8b9ba5c89834e42a2b271222efc7c04", "score": "0.5339927", "text": "private function _log_version_number () {\n\t\tupdate_option( $this->_token . '_version', $this->_version );\n\t}", "title": "" }, { "docid": "9d16d3dd17f8be21236bc803c6d55248", "score": "0.5336869", "text": "public static function get() {\n\t\t$commitHash = trim(exec('git log --pretty=\"%h\" -n1 HEAD'));\n\n\t\t// Get date and time information.\n\t\t$commitDate = new \\DateTime(trim(exec('git log -n1 --pretty=%ci HEAD')));\n\t\t$commitDate->setTimezone(new \\DateTimeZone('UTC'));\n\n\t\t// Format all information into a version identifier.\n\t\treturn sprintf('v%s.%s.%s-dev.%s (%s)', self::MAJOR, self::MINOR, self::PATCH, $commitHash, $commitDate->format('Y-m-d H:m:s'));\n\t}", "title": "" }, { "docid": "9000b3fba0c0170da014238af2bf31b7", "score": "0.5330972", "text": "function testRevisionHistory() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My First Revision\");\r\n\t\t$oid = $obj->save();\r\n\r\n\t\t$revid = $dbh->GetValue($dbh->Query(\"select id from object_revisions where object_id='$oid' and object_type_id='\".$obj->object_type_id.\"'\"));\r\n\t\t$this->assertTrue($revid > 0 && $revid !=null);\r\n\t\t//$this->assertEquals($dbh->GetValue($dbh->Query(\"select field_value from object_recurrence where id='\".$rp->id.\"'\")), 0);\r\n\t}", "title": "" }, { "docid": "60aadbf4e9e731532f2e6b0a78c8786d", "score": "0.5328046", "text": "public function getRevision()\n {\n return $this->revision;\n }", "title": "" }, { "docid": "bc51190705a4567b42e5501eb0acc2e7", "score": "0.5324818", "text": "public function getVersionById(int $versionId)\n {\n return Entry::find()\n ->revisions()\n ->id($versionId)\n ->anyStatus()\n ->one();\n }", "title": "" }, { "docid": "a18b3dc9bb44ada4deefa96ade18a0be", "score": "0.5324685", "text": "private function fetchChangelog($version)\n {\n $codice = new Codice();\n\n if (!$codice->isVersionStable()) {\n return trans('info.about.changelog-dev');\n }\n\n $releaseData = @file_get_contents(config('services.website.api') . \"/releases/v$version\");\n $changelog = @json_decode($releaseData, true)['changelog'];\n\n if (!$changelog) {\n return trans('info.about.changelog-error');\n }\n\n return (new CommonMarkConverter())->convertToHtml($changelog);\n }", "title": "" }, { "docid": "9fe134d06d895996d9048554cd5aaa89", "score": "0.53211236", "text": "public function showRevision($id)\n {\n }", "title": "" }, { "docid": "cdc0fa24e953b6c663b5c7ba92e3189a", "score": "0.5312674", "text": "function wp_get_footnotes_from_revision($revision_field, $field, $revision)\n {\n }", "title": "" }, { "docid": "e79d0461c933a18e783c06d1004571c8", "score": "0.5307162", "text": "public function getLogHistory() {\n\t\treturn $this->log;\n\t}", "title": "" }, { "docid": "f790f45e1a3cc94aa26355cf75e7cd67", "score": "0.5305188", "text": "public function insertIntoVH($vhInfo, $appUserID, $roleID, $status, $note)\n {\n $qq = 'insert_into_version_history';\n $this->sdb->prepare($qq,\n 'insert into version_history\n (version, id, user_id, role_id, status, is_current, note)\n values\n ($1, $2, $3, $4, $5, $6, $7)\n returning version, id as ic_id;');\n\n $result = $this->sdb->execute($qq,\n array($vhInfo['version'], $vhInfo['ic_id'], $appUserID, $roleID, $status, true, $note));\n $vhInfo = $this->sdb->fetchrow($result);\n $this->sdb->deallocate($qq);\n return $vhInfo;\n }", "title": "" }, { "docid": "7de080cec78ae211de2541b1ea5f989c", "score": "0.528103", "text": "function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }", "title": "" }, { "docid": "bdbc5eddc9b1b8c52b0084723f1fc84f", "score": "0.52713895", "text": "public function getRevision() {\n return $this->revision;\n }", "title": "" }, { "docid": "ce1f0fbfff1cce5dd567be33828b6138", "score": "0.5264103", "text": "public function history()\n\t{\n\t\t$res = $this->hasManyThrough(Revision::class, RevisionSet::class, 'id', 'revision_set_id', 'revision_set_id')\n\t\t\t->where(\n\t\t\t\tfunction ($query) {\n\t\t\t\t\treturn $query->where('revisions.created_at', '<', $this->created_at);\n\t\t\t\t})\n\t\t\t->select('revisions.id', 'revisions.title', 'revisions.created_at', 'revisions.layout_name', 'revisions.layout_version');\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "493efebbeba868d7fa9b0929894a8556", "score": "0.5261435", "text": "public function getRev()\n {\n return $this->data['fields']['rev'];\n }", "title": "" }, { "docid": "dbb4e3ffd18639e371021ceea0cfd5cf", "score": "0.52505213", "text": "public function _getOnlineVersionHistoryHashForDebug()\n {\n\n $remote_update_url = TextFormatter::makeEndsWith($this->Settings->getSetting('remote_update_url'), \"/\");\n\n $arrContextOptions = [\n \"ssl\" => [\n \"verify_peer\" => false,\n \"verify_peer_name\" => false,\n ],\n ];\n $versionHistoryHash = @file_get_contents($remote_update_url . \"version_history_hash.txt\", false, stream_context_create($arrContextOptions));\n\n return $versionHistoryHash;\n }", "title": "" }, { "docid": "96475801d1b27dcad3809ac3fa919fce", "score": "0.52501285", "text": "public function latest_version();", "title": "" }, { "docid": "4487bc390e9b774b8ca12e52ec023064", "score": "0.52346265", "text": "public function latestReleaseVersion()\n {\n // in order to correctly format relative URLs in the readme\n return Arr::get($this->latestRelease(), 'tag_name', 'master');\n }", "title": "" }, { "docid": "7fe9c6de72836948e450822fd546e1bd", "score": "0.522565", "text": "public function getVersionHistoryHashtxt()\n {\n $versionData = $this->getVersionHistoryJsn();\n $versionData = json_encode($versionData);\n $versionData = \\arajcany\\ToolBox\\Utility\\Security\\Security::encrypt64Url($versionData);\n\n return $versionData;\n }", "title": "" }, { "docid": "edeac971811857a135b5b8096e492e3d", "score": "0.52202624", "text": "public function currentVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->first();\n }", "title": "" }, { "docid": "1701ed375a8594b87859f3a1ced478bf", "score": "0.52081", "text": "private function _log_version_number () {\n update_option( $this->_token . '_version', $this->_version );\n }", "title": "" }, { "docid": "276a17c85af23d523d57f6a61d6a2e50", "score": "0.5198978", "text": "private function getChangeLog($targetVer, $ftpVersion) {\n\t\t\t$cmd = 'svn log --xml ' . $this->loginString . '-r 1:HEAD --limit 1 ' . $this->getRepositoryUrl();\n\t\t\t$xml = $this->getXMLForCommand($cmd);\n\t\t\t$availableRevision = (int) $xml->logentry['revision'];\n\n\t\t\tif ($availableRevision > $targetVer) {\n\t\t\t\tLogger::fatalError('you are trying to update to revision ' . $targetVer . ' but the first revision of your svn path is ' . $availableRevision);\n\t\t\t}\n\n\t\t\t// get diff between versions\n\t\t\t$cmd = 'svn diff --xml ' . $this->loginString . $this->getRepositoryUrl() . ' --summarize -r ' . $ftpVersion . ':' . $targetVer;\n\t\t\treturn $this->getXMLForCommand($cmd);\n\t\t}", "title": "" }, { "docid": "b10381c0bf4c3f0e8b711503e0160628", "score": "0.51947355", "text": "public function getVersionReference()\n {\n return $this->version;\n }", "title": "" }, { "docid": "69f7aa31493d4caefdb6792f9f8ec368", "score": "0.5191798", "text": "public function getVersionHistoryJsn()\n {\n $fileToRead = $this->getVersionHistoryJsnFullPath();\n if (is_file($fileToRead)) {\n $versionData = json_decode(file_get_contents($fileToRead), JSON_OBJECT_AS_ARRAY);;\n } else {\n $versionData = [$this->getDefaultVersionJsn()];\n $this->putVersionHistoryJsn($versionData);\n }\n\n return $versionData;\n }", "title": "" }, { "docid": "ad64f137bc7205f75e0b4ab31a69da86", "score": "0.5188818", "text": "public function getContentRecord ($version = 0)\r\n\t{\r\n\t\t$contentId = 'SitePage'.$this->id;\r\n\t\treturn Tg_Content::getContent($contentId, $version);\r\n\t}", "title": "" }, { "docid": "f66c7eac269344c46b9144187b0437bf", "score": "0.51866776", "text": "public function getAllRevisions()\n {\n // Retrieves username associated with an id. \n $this->ui_ids = array();\n\n /**\n * Retrieves list of previous versions of data dictionary.\n */\n $pid = $_GET[\"pid\"];\n $previous_versions = array();\n $sql = \"select p.pr_id, p.ts_approved, p.ui_id_requester, p.ui_id_approver,\n if(l.description = 'Approve production project modifications (automatic)',1,0) as automatic\n from redcap_metadata_prod_revisions p left join redcap_log_event l\n on p.project_id = l.project_id and p.ts_approved*1 = l.ts\n where p.project_id = $pid and p.ts_approved is not null order by p.pr_id\";\n\n if ($result = $this->query($sql))\n {\n // Cycle through results\n $rev_num = 0;\n $num_rows = $result->num_rows;\n while ($row = $result->fetch_object())\n {\n if ($rev_num == 0)\n {\n $previous_versions[] = array(\n \"id\" => $row->pr_id,\n \"label\" => \"Moved to Production\",\n \"requester\" => $this->getUsernameFirstLast($row->ui_id_requester),\n \"approver\" => $this->getUsernameFirstLast($row->ui_id_approver),\n \"automatic_approval\" => $row->automatic,\n \"ts_approved\" => $row->ts_approved,\n );\n }\n else\n {\n $previous_versions[] = array(\n \"id\" => $row->pr_id,\n \"label\" => \"Production Revision #$rev_num\",\n \"requester\" => $this->getUsernameFirstLast($row->ui_id_requester),\n \"approver\" => $this->getUsernameFirstLast($row->ui_id_approver),\n \"automatic_approval\" => $row->automatic,\n \"ts_approved\" => $row->ts_approved\n );\n }\n\n if ($rev_num == $num_rows - 1)\n {\n // Current revision will be mapped to timestamp and approver of last row\n $current_revision_ts_approved = $row->ts_approved;\n $current_revision_approver = $this->getUsernameFirstLast($row->ui_id_approver);\n $current_revision_requester = $this->getUsernameFirstLast($row->ui_id_requester);\n $current_revision_automatic = $row->automatic;\n }\n\n $rev_num++;\n }\n\n $result->close();\n \n // Sort by most recent version.\n $previous_versions = array_reverse($previous_versions);\n }\n\n // Shift timestamps, approvers, requesters, and automatic approval down by one,\n // as the correct info for each one is when the previous version was archived. \n $last_key = null;\n foreach($previous_versions as $key => $version)\n {\n if ($last_key !== null)\n {\n $previous_versions[$last_key][\"ts_approved\"] = $previous_versions[$key][\"ts_approved\"];\n $previous_versions[$last_key][\"requester\"] = $previous_versions[$key][\"requester\"];\n $previous_versions[$last_key][\"approver\"] = $previous_versions[$key][\"approver\"];\n $previous_versions[$last_key][\"automatic_approval\"] = $previous_versions[$key][\"automatic_approval\"];\n }\n $last_key = $key;\n }\n\n // Get correct production timestamp,\n // and the person who moved it to production\n if (!empty($previous_versions))\n {\n // Get correct production timestamp\n $sql = \"select production_time from redcap_projects where project_id = $pid\";\n if ($result = $this->query($sql))\n {\n while ($row = $result->fetch_object()){\n $timestamp = $row->production_time;\n $previous_versions[sizeof($previous_versions)-1][\"ts_approved\"] = $timestamp;\n }\n $result->close();\n }\n\n if (!empty($timestamp))\n {\n // Retrieve person who moved to production, as it's stored separately. \n $sql = \"select u.ui_id from redcap_user_information u, redcap_log_event l\n where u.username = l.user and l.description = 'Move project to production status' and l.project_id = $pid \n and l.ts = '\" . str_replace(array(' ',':','-'), array('','',''), $timestamp) . \"' order by log_event_id desc limit 1\";\n\n if ($result = $this->query($sql))\n {\n while ($row = $result->fetch_object()){\n $previous_versions[sizeof($previous_versions)-1][\"approver\"] = $this->getUsernameFirstLast($row->ui_id);\n }\n $result->close();\n }\n }\n }\n\n // Add current revision\n if (isset($current_revision_approver) && \n isset($current_revision_ts_approved) && \n isset($current_revision_automatic) && \n isset($current_revision_requester))\n {\n array_unshift($previous_versions, array(\n \"id\" => \"current\",\n \"label\" => \"Production Revision #$rev_num <b>(Current Revision)</b>\",\n \"requester\" => $current_revision_requester,\n \"approver\" => $current_revision_approver,\n \"automatic_approval\" => $current_revision_automatic,\n \"ts_approved\" => $current_revision_ts_approved\n ));\n }\n\n return $previous_versions;\n }", "title": "" }, { "docid": "09de78d696c1e3e13cf63d96e1efa9f9", "score": "0.517549", "text": "protected function getHistoryRecord() {\n\t\tif (!$this->model->isNew()) {\n\t\t\t/** @var HasHistory $model */\n\t\t\t$model = $this->model->getStoredCopy();\n\n\t\t\t// Using stored copy, in order to safeguard partial representations of\n\t\t\t// existing models.\n\t\t\t$this->historyRecord = $model->getHistory();\n\t\t}\n\n\t\tif (empty($this->historyRecord)) {\n\t\t\t$this->historyRecord = $this->createHistoryRecord();\n\t\t}\n\n\t\treturn $this->historyRecord;\n\t}", "title": "" }, { "docid": "b36f1b4381fcb631a419142583227619", "score": "0.5167973", "text": "function action_history()\n{\n\tglobal $pagestore, $page, $full, $HistMax;\n\n\t$history = $pagestore->history($page);\n\n\tgen_headers($history[0][0]);\n\n\n\t$text = '';\n\t$latest_auth = '';\n\t$previous_ver = 0;\n\t$is_latest = 1;\n\n\tfor($i = 0; $i < count($history); $i++)\n\t{\n\t\tif($latest_auth == '')\n\t\t{\n\t\t\t$latest_auth = ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $history[$i][3]);\n\t\t\t$latest_ver = $history[$i][2];\n\t\t}\n\n\t\tif($previous_ver == 0\n\t\t\t && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t : $history[$i][3]))\n\t\t\t{ $previous_ver = $history[$i][2]; }\n\n\t\tif($i < $HistMax || $full)\n\t\t{\n\t\t\t$text = $text . html_history_entry($page, $history[$i][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][0], $history[$i][1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $previous_ver == $history[$i][2] || !$full && $i == count($history)-1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $is_latest, $history[$i][4]);\n\t\t}\n\n\t\t$is_latest = 0;\n\t}\n\n\tif($i >= $HistMax && !$full)\n\t\t{ $text = $text . html_fullhistory($page, count($history)); }\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $previous_ver;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $latest_ver;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\ttemplate_history(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t\t 'history' => $text,\n\t\t\t\t\t\t\t\t\t\t\t\t 'diff' => diff_parse($diff)));\n}", "title": "" }, { "docid": "026f36eca28cc49c78140efcf9df5804", "score": "0.51651084", "text": "function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "7f50e15062c36a84179ae6004de1e1fa", "score": "0.51649475", "text": "public function getRevisionLabel(): string\n {\n return Craft::t('app', 'Revision {num}', [\n 'num' => $this->revisionNum,\n ]);\n }", "title": "" }, { "docid": "389ce2b31728ab01ab72a4cc757183de", "score": "0.51585245", "text": "function requirement_get_version_number( $req_id, $req_version_id ) {\n\n\tglobal $db;\n\t$tbl_req_ver\t\t\t\t= REQ_VERS_TBL;\n\t$f_version_id\t\t\t\t= $tbl_req_ver .\".\". REQ_VERS_UNIQUE_ID;\n\t$f_version_req_id\t\t\t= $tbl_req_ver .\".\". REQ_VERS_REQ_ID;\n\t$f_version_number\t\t\t= $tbl_req_ver .\".\". REQ_VERS_VERSION;\n\n\t$q = \"SELECT\n\t\t $f_version_number\n\t\t FROM $tbl_req_ver\n\t\t WHERE $f_version_req_id = '$req_id'\n\t\t AND $f_version_id = '$req_version_id'\";\n\n\t//print\"$q<br>\";\n\n\treturn db_get_one($db, $q);\n}", "title": "" }, { "docid": "7e1baefc9c692ea7b271798add03388b", "score": "0.5157248", "text": "public function getRevision(RepositoryEntry $repository, $branch);", "title": "" }, { "docid": "dfede6ca31f40287f5afcebfba8bf5c3", "score": "0.5153246", "text": "function getFileRevision() {\n\t\treturn $this->getData('fileRevision');\n\t}", "title": "" }, { "docid": "3f3b25ffc46e735e9191b2f93e3359ec", "score": "0.5146382", "text": "public function GetHistoryInfo()\n\t{\n\t if ($this->m_Stateless == \"Y\")\n\t return;\n\t if (!$this->m_NoHistoryInfo)\n\t {\n\t $histInfo[] = $this->m_RecordId;\n $histInfo[] = $this->m_CurrentPage;\n $histInfo[] = $this->m_SearchRule;\n $histInfo[] = $this->m_SortRule;\n\t return $histInfo;\n\t }\n\t return null;\n\t}", "title": "" }, { "docid": "db1a649031e448265f5fe96784ad2c77", "score": "0.5141473", "text": "function getJointSourceMetaTitleOfLatestRevision($titleId) {\n return \\ICA\\Contents\\getContentLanguagesOfLatestRevision($titleId);\n }", "title": "" }, { "docid": "d72067fa0b01e7a516b5c0abf49eaa95", "score": "0.51379395", "text": "public function\r\n get_revision_number()\r\n {\r\n #$cmd = self::get_svn_program() . ' info ' . $this->get_name();\r\n #$info = shell_exec($cmd);\r\n $info = $this->get_svn_info();\r\n \r\n foreach (explode(\"\\n\", $info) as $info_line) {\r\n if (preg_match('/^Revision: (\\d+)/', $info_line, $matches)) {\r\n return $matches[1];\r\n }\r\n }\r\n \r\n return 0;\r\n }", "title": "" }, { "docid": "3f1cb60e3bc88279e18e1c090e07e160", "score": "0.5129536", "text": "public function getRevision()\n {\n return $this->systemProperties->getRevision();\n }", "title": "" }, { "docid": "0e91cdfbdfcc879fea3a1cdc13fba5a7", "score": "0.51251966", "text": "public static function getCurrentRevision() {\n $settings = self::getSettings();\n return $settings->headrevision;\n }", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" }, { "docid": "c495535b92260b76af224b622b066900", "score": "0.5121452", "text": "public function getVersion();", "title": "" } ]
60d837d8e354b126947195877efa9467
Add a message to the page or a field.
[ { "docid": "fea4537158b26a346a6204f359a3ed8e", "score": "0.0", "text": "public static function Message($severity, $message, $fieldName = '__GLOBAL__')\n {\n if (!array_key_exists($fieldName, self::$messages))\n self::$messages[$fieldName] = array();\n self::$messages[$fieldName][] = new \\VGWS\\Content\\Message($severity, $message);\n }", "title": "" } ]
[ { "docid": "9c3ad8d538bfc25aad23816fad96b065", "score": "0.76371247", "text": "public function addMessage($message, $fieldName = '__GLOBAL__')\n {\n \\VGWS\\Content\\Page::Message('generic', $message, $fieldName);\n }", "title": "" }, { "docid": "0187fbec4a208fd90561b5a03ca2ff01", "score": "0.6639267", "text": "protected function add_message( $text )\r\n {\r\n $this->message = $text;\r\n }", "title": "" }, { "docid": "1d17d778aabe51a7a11faed456372688", "score": "0.6564179", "text": "function add_message($msg){\n\t\t$this->message[] = $msg;\n\t}", "title": "" }, { "docid": "f4d7a6ff480949bf8916a63d510d4d07", "score": "0.6490145", "text": "function addText($msg)\n\t{\n\t\t$this->message = (string) $msg;\n\t}", "title": "" }, { "docid": "70fb557e6280c89c22ee867f906b4511", "score": "0.6439599", "text": "public function addFlashMessage($type, $message, $field = \"no error\")\n {\n $this->session->getFlashBag()->add\n (\n $type,\n [\n \"field\" => $field,\n \"message\" => $message\n ]\n );\n }", "title": "" }, { "docid": "3536c261b2267c0e692e7c1bdd7af4f7", "score": "0.6423609", "text": "public function addMessage($message)\n {\n \\message::add(\"mystrom\", $message);\n }", "title": "" }, { "docid": "be4f6f4bc1741e1454ec9fabc71657c6", "score": "0.6405307", "text": "public function message($message) {\n if (!is_array($message)) {\n $message = ['text' => $message];\n }\n if ($class) {\n $message['class'] = $class;\n }\n $this->messages[] = $message;\n }", "title": "" }, { "docid": "be4f6f4bc1741e1454ec9fabc71657c6", "score": "0.6405307", "text": "public function message($message) {\n if (!is_array($message)) {\n $message = ['text' => $message];\n }\n if ($class) {\n $message['class'] = $class;\n }\n $this->messages[] = $message;\n }", "title": "" }, { "docid": "42a1fe403ba8729b137f41ca69035aa3", "score": "0.6381074", "text": "function add($message = '') {\n\t$add_pages = open_table_form('Add New Page','add_page',SITE_ADMIN_SSL_URL.'?sect=pages&mode=addcheck','post',$message);\n\t$add_pages .= $this->form();\n\t$add_pages .= close_table_form();\n return $add_pages;\n }", "title": "" }, { "docid": "810435e0c109b6b306b800511b8f8eed", "score": "0.6351882", "text": "public function addErrorMessage($message, $field = \"no field\")\n {\n $this->session->getFlashBag()->add\n (\n 'error',\n [\n 'field' => $field,\n 'message' => $message\n ]\n );\n }", "title": "" }, { "docid": "9f4a7bb82d899ce81b5bca256b134b8c", "score": "0.6325576", "text": "private function addMessage($message)\n {\n $this->messages[] = $message;\n }", "title": "" }, { "docid": "839e67f7aa0e582d31d98fe46f634771", "score": "0.6280409", "text": "public function setMessage( $message );", "title": "" }, { "docid": "08c278bc190f1779e079d0daee1ee6be", "score": "0.62683123", "text": "function add_message($message, $type = 'good', $class = '') {\r\n global $wpi_messages;\r\n if (!is_array($wpi_messages))\r\n $wpi_messages = array();\r\n\r\n array_push($wpi_messages, array('message' => $message, 'type' => $type, 'class' => $class));\r\n }", "title": "" }, { "docid": "2966c7d649e43bcc52108c4a7cd3ff6d", "score": "0.62529206", "text": "public function addMessage($message, $class);", "title": "" }, { "docid": "cb5ee5ab886974c60c7374acf08288f4", "score": "0.6229829", "text": "function add()\n\t{\n\t\t//Set the right view\n\t\tJRequest::setVar( 'view', 'message' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "54afb101602c672f594a1e6a545fe416", "score": "0.6196512", "text": "function set_message($level, $message){\r\n\tglobal $g_messages;\r\n\t$g_messages->insert($level, $message);\r\n}", "title": "" }, { "docid": "b52f7f8688f21acedba048ed57be2661", "score": "0.61734796", "text": "static function Add($message, $type = Message::Error) {\n\t\t$msg = \\lib\\Session::Get(\"messages\");\n\t\tif (!is_array($msg)) $msg = array();\n\t\t$msg[] = new Message($message, $type);\n\t\t\\lib\\Session::Set(\"messages\", $msg);\n\t}", "title": "" }, { "docid": "870f509cdac86073868245e4b998a924", "score": "0.6092878", "text": "public function setMessage($message);", "title": "" }, { "docid": "78e2d898f3b6cd7e90a72f3985a63575", "score": "0.60883236", "text": "abstract public function message($field);", "title": "" }, { "docid": "4e835a03d74fb689e95f48f4421ca7e8", "score": "0.6081356", "text": "public function add(string $field, string $message)\n {\n $this->messages[$field] = $message;\n\n return $this;\n }", "title": "" }, { "docid": "a35e37eb4a61a898b61a1f222f39d5c7", "score": "0.60755706", "text": "public function addMessagesForField($field, $messages)\n {\n $messages = (array) $messages;\n foreach ($messages as $message) {\n $this->add($field, $message);\n }\n }", "title": "" }, { "docid": "12befa93654a44aaf3c891575e8aa27b", "score": "0.6056364", "text": "public function addToMessage($text) {\n if (empty($text)) {\n throw new \\Exception(\"Sorry, you need to have some text to add\");\n } else {\n $this->message .= \"<br>$text<br>\";\n }\n }", "title": "" }, { "docid": "bc945f939bb9c6c6c997d739bb24393b", "score": "0.6045647", "text": "abstract public function addErrorMessage($message);", "title": "" }, { "docid": "6545a20788a9534ef0ebb4e954c22faa", "score": "0.6043731", "text": "public function addMessage(Message $message)\n {\n $this->dbIO->insertData($message);\n }", "title": "" }, { "docid": "1e7efaa9125e48f5d24338340a368bd3", "score": "0.60314965", "text": "function addToPageMessagesSource()\r\n\t\t{\r\n\t\t\t$this->defaultVideoMessagesSource();\r\n\r\n\t\t\t$this->assign(\"add\", $this->loadMessages('video.addtopage.addtialbum'));\r\n\t\t\t$this->assign(\"title\", $this->loadMessages('video.addtopage.title'));\r\n\t\t\t$this->assign(\"hint\", $this->loadMessages('video.addtopage.hint'));\r\n\t\t\t$this->assign('help', $this->loadMessages('video.help'));\r\n\t\t}", "title": "" }, { "docid": "e77e20d54cc71e63deed9fee4d3d4297", "score": "0.6016314", "text": "public function addMessage(Message $message){\n $this->Stack[] = $message;\n }", "title": "" }, { "docid": "56221e0ac7525327b117ddca8bd8e0ba", "score": "0.59768003", "text": "public function addMessage(Message $message)\n {\n $this->messageList[$message->getDate()->format('Ymdhis')] = $message;\n $this->addPersonsFromMessage($message);\n }", "title": "" }, { "docid": "772a207f2c11baf51b83fc19b96a7c24", "score": "0.5974996", "text": "public function insertNewMessage () {\n\t\t$this->autoRender = false;\n\n\t\tif ($this->Message->save($this->request->data))\n\t\t\techo 'save';\n\t}", "title": "" }, { "docid": "71eab0b8c42b123b4a8afbe6a9c31e41", "score": "0.5974506", "text": "public function add_message( $message = null, $type = 'info' ) {\n\n\t\t\t$messages = jdi_cache()->get( $type, 'log' );\n\n\t\t\tif ( empty( $messages ) || ! is_array( $messages ) ) {\n\t\t\t\t$messages = array();\n\t\t\t}\n\n\t\t\t$messages[] = $message;\n\t\t\tjdi_cache()->update( $type, $messages, 'log' );\n\t\t}", "title": "" }, { "docid": "89dbcdaada5a5d098d00c949fd45aa4c", "score": "0.5947063", "text": "function AddMessage($Title, $Text) {\n \t\t\t// is there some content?\n \t\t\tif($Title != '' && $Text != '') {\n \t\t\t\t$sql = \"INSERT INTO \" . DB_PREFIX . \"news (title, text, date, userid)\n \t\t\t\t\tVALUES ('$Title', '$Text', '\" . mktime() . \"', {$this->_User->ID})\";\n \t\t\t\t$this->_SqlConnection->SqlQuery($sql);\n \t\t\t}\n \t\t\t\n \t\t}", "title": "" }, { "docid": "c3ec32b10bb253052c299f3399f27999", "score": "0.59373903", "text": "public function addMessage($message) {\n\t\tif (!$message['room']) {\n\t\t\t$room = $this->getRoom();\n\t\t\t$message['room'] = $room['id'];\n\t\t}\n\t\t\n\t\t// vsetky message su pridavane k aktualnej hre\n\t\tif (!$message['game']) {\n\t\t\t$game = $this->getGame();\n\t\t\t$message['game'] = $game['id'];\n\t\t}\n\t\t\n\t\t// ak nie je urcene od koho je sprava tak je od systemu\n\t\tif (!$message['user']) {\n\t\t\t$message['user'] = User::SYSTEM;\n\t\t}\n\t\t\n\t\t$this->messages[] = $message;\n\t}", "title": "" }, { "docid": "b4d7b885ac203a8b5ab9f4ebc118a12d", "score": "0.59290075", "text": "function addmessage($clean_message_id = 0, $clean_career_id = 0){\r\n\tglobal $career_message_handler, $careerConfig, $icmsTpl;\r\n\t$career_career_handler = icms_getModuleHandler(\"career\", basename(dirname(__FILE__)), \"career\");\r\n\t$careerObj = $career_career_handler->get($clean_career_id);\r\n\t$career_message_handler = icms_getModuleHandler(\"message\", basename(dirname(__FILE__)), \"career\");\r\n\t$messageObj = $career_message_handler->get($clean_message_id);\r\n\tif(is_object(icms::$user)){\r\n\t\t$message_uid = icms::$user->getVar(\"uid\");\r\n\t} else {\r\n\t\t$message_uid = 0;\r\n\t}\r\n\tif ($messageObj->isNew()){\r\n\t\t$messageObj->setVar(\"message_date\", (time()-200));\r\n\t\t$messageObj->setVar(\"message_cid\", $clean_career_id);\r\n\t\t$messageObj->setVar('message_did', $careerObj->getVar(\"career_did\", \"e\"));\r\n\t\t$messageObj->setVar('message_submitter', $message_uid);\r\n\t\t$sform = $messageObj->getSecureForm(_MD_CAREER_MESSAGE, 'addmessage', CAREER_URL . \"submit.php?op=addmessage&career_id=\" . $careerObj->getVar(\"career_id\", \"e\") , 'OK', TRUE, TRUE);\r\n\t\t$sform->assign($icmsTpl, 'career_message_form');\r\n\t} else {\r\n\t\texit;\r\n\t}\r\n}", "title": "" }, { "docid": "360ffeb968f292197fc070d703d09caa", "score": "0.59227633", "text": "protected function message($message, $type='info')\n {\n $this->data['message'][$type] = $message;\n }", "title": "" }, { "docid": "93d10a7b56d2fe97e47d51d84df238c5", "score": "0.5903454", "text": "public function message()\n\t{\n\t\t$type = strip_tags($_GET['type']);\n\t\t$message = $_GET['message'];\n\n\t\t$this->page->set_output(\n\t\t\t$this->page->set_message($type, $message, TRUE)\n\t\t);\n\t}", "title": "" }, { "docid": "64455d06ed9726de6de5f502e4b2ef93", "score": "0.5892399", "text": "public function addWarning($message, $fieldName = '__GLOBAL__')\n {\n \\VGWS\\Content\\Page::Message('warning', $message, $fieldName);\n }", "title": "" }, { "docid": "6d044799d28a36a5db418a328c412253", "score": "0.58823186", "text": "public function add($msg,$level = null) {\n\t\t$this->msgs[] = new Message($msg, $level);\n\t}", "title": "" }, { "docid": "5d433b4e7985db4001a143a93f2f16c5", "score": "0.58361405", "text": "protected function addMessage( $message )\n {\n $this->Result[] = $message;\n }", "title": "" }, { "docid": "3c2603de2ad885f9e01510945e737d4c", "score": "0.5808548", "text": "public function addLogMessage($msg)\n\t{\n\t\t$this->log_messages[] = $msg;\n\t}", "title": "" }, { "docid": "a20344b5b697a9c7809c1cec36bf1ddc", "score": "0.5803524", "text": "public function add_hidden_message( $msg ) {\n\t\tif ( $msg ) {\n\t\t\t$this->hidden_messages[] = $msg;\n\t\t}\n\t}", "title": "" }, { "docid": "9df57c08900386e3a89c2d566bb310bd", "score": "0.5803316", "text": "public function add(Mage_Core_Model_Message_Abstract $message)\n {\n return $this->addMessage($message);\n }", "title": "" }, { "docid": "27188725b63ef7a08d8827cb0c09f8eb", "score": "0.57845247", "text": "protected function addMessage( $type, $value )\n {\n $messages = view()->shared( 'messages', [] );\n if ( empty( $messages ) ) {\n $messages = array_get( $this->context, 'messages', [] );\n }\n\n //Errors is the only 'message' that's got a plural name, let's check for the singular just in case.\n if ( $type == 'error' ) {\n $type = 'errors';\n }\n\n if ( !is_array( $messages[ $type ] ) ) {\n $newMessages = [];\n }\n if ( !empty( $messages[ $type ] ) ) {\n $newMessages[] = [ $messages[ $type ] ];\n }\n\n $newMessages[] = $value;\n $messages[ $type ] = $newMessages;\n\n return $this->addContext( 'messages', $messages );\n }", "title": "" }, { "docid": "035c7e2049593d82ca597168fe5921a7", "score": "0.57592446", "text": "public function message($message = NULL) {\n\t\t\n\t\t# Set up the View\n\t\t$this->template->content = View::instance('v_users_message');\n $this->template->title = $message;\n \n # Send to the view\n $this->template->content->message = $message;\n\n # Render template\n echo $this->template;\n\n }", "title": "" }, { "docid": "7596896136ef73e3b76599f2c3ea0fc9", "score": "0.5757471", "text": "public function addError($message, $fieldName = '__GLOBAL__')\n {\n \\VGWS\\Content\\Page::Message('error', $message, $fieldName);\n }", "title": "" }, { "docid": "0898c516021d6540f8b720eb4296c29e", "score": "0.57524", "text": "public static function addMessage($message, $type = self::SUCCESS){\n /* if there is no flash message key */\n if(!isset($_SESSION['flashMessage'])){\n $_SESSION['flashMessage'] = [];\n }\n $_SESSION['flashMessage'][] = [\n 'body' => $message,\n 'type' => $type\n ];\n }", "title": "" }, { "docid": "0011bd21efde2716a884a1a6f36eabc2", "score": "0.575233", "text": "function addMessage($type, $message) {\n\tif (! isset ( $_SESSION ['error_messages'] )) {\n\t\t$_SESSION ['error_messages'] = array ();\n\t}\n\t$_SESSION ['error_messages'] [$type] = $message;\n}", "title": "" }, { "docid": "b4253ad24ff01e2bf12744f72bd73d37", "score": "0.5713178", "text": "public static function addMessage($message, $mode = \"error\")\n\t{\n\t\tCore::getLanguage()->load(\"error\");\n\t\t$message = Core::getLanguage()->getItem($message);\n\t\t$message = \"<div class=\\\"\".$mode.\"\\\">\".$message.\"</div>\";\n\t\tHook::event(\"AddMessageToLog\", array(&$message));\n\t\tCore::getTPL()->addLogMessage($message);\n\t\treturn;\n\t}", "title": "" }, { "docid": "418f95092e0b5765fef4f91287ec095c", "score": "0.57103115", "text": "public function utter_message($text){\n\n $message = (object)[\"text\"=> $text];\n\n $this->messages[] = ($message);\n }", "title": "" }, { "docid": "42698e31fa33577658a7a509d67a81dd", "score": "0.56948036", "text": "public static function addMessage(string $message, int $type)\n {\n if ($type == self::M_MESSAGE) {\n if (!isset($_SESSION['messages'])) {\n $_SESSION['messages'] = [];\n }\n array_push($_SESSION['messages'], $message);\n }\n if ($type == self::M_ERROR) {\n //si le stockage de message n'existe pas on l'initialise (tableau vide)\n\n if (!isset($_SESSION['errors'])) {\n $_SESSION['errors'] = [];\n }\n array_push($_SESSION['errors'], $message);\n }\n }", "title": "" }, { "docid": "f73864f6c7d346e297ec7d0ff2190583", "score": "0.56909347", "text": "public function add_message($data) {\n $this->load->model(\"email_model\");\n // @todo use email model to verify email is correct\n // @todo if email exists, retrieve the id. Otherwise add email and get email id.\n\n // @todo add the message into contact_messages table\n\n }", "title": "" }, { "docid": "2e4394b3889898699da74064c890ba51", "score": "0.56877244", "text": "public static function add($type,$title, $message)\n {\n $_SESSION['flash_message'] = array(\n 'type' => $type,\n 'title' => $title,\n 'message' => $message\n );\n }", "title": "" }, { "docid": "d414a8090f9d90f6162152f17c588403", "score": "0.56769925", "text": "private function addFlashMessage($type, $message)\n {\n $this->get('session')->getFlashBag()->add(\n $type,\n $this->get('translator')->trans($message)\n );\n }", "title": "" }, { "docid": "f37909b345b31cfeeb69ff625897c09f", "score": "0.56671244", "text": "function addError( $error_field, $message )\n {\n $this->error = true;\n if( isset( $this->arErrorMessages[$error_field] ) )\n {\n if( is_array( $this->arErrorMessages[$error_field] ) )\n {\n if( !in_array( $message, $this->arErrorMessages[$error_field] ) )\n {\n $this->arErrorMessages[$error_field][] = $message;\n }\n }\n else\n {\n if( $message != $this->arErrorMessages[$error_field] )\n {\n $this->arErrorMessages[$error_field] = $this->arErrorMessages[$error_field].\"<br>\".$message;\n }\n }\n }\n else\n {\n $this->arErrorMessages[$error_field] = $message;\n }\n }", "title": "" }, { "docid": "cc132c477675bdffc5cfb0674314f3c4", "score": "0.56666255", "text": "function post_addItem() {\n if (isset($this->fields['level']) && $this->fields['level'] <= 3) {\n $message_type = \"\";\n if (isset($this->fields['type']) && $this->fields['type'] != 'system') {\n $message_type = \"[\".$this->fields['type'].\" \".$this->fields['id'].\"] \";\n }\n\n $full_message = \"[\".$this->fields['service'].\"] \".\n $message_type.\n $this->fields['level'].\": \".\n Toolbox::stripslashes_deep($this->fields['message']).\"\\n\";\n\n Toolbox::logInFile(\"event\", $full_message);\n }\n }", "title": "" }, { "docid": "539bd03cce6753b1115bdddb684f0cd2", "score": "0.5654892", "text": "public function addMessage($message, $label = 'info')\n {\n if ($this->hasCollector('messages')) {\n /** @var \\DebugBar\\DataCollector\\MessagesCollector $collector */\n $collector = $this->getCollector('messages');\n $collector->addMessage($message, $label);\n }\n }", "title": "" }, { "docid": "539bd03cce6753b1115bdddb684f0cd2", "score": "0.5654892", "text": "public function addMessage($message, $label = 'info')\n {\n if ($this->hasCollector('messages')) {\n /** @var \\DebugBar\\DataCollector\\MessagesCollector $collector */\n $collector = $this->getCollector('messages');\n $collector->addMessage($message, $label);\n }\n }", "title": "" }, { "docid": "c36ce0333022697023202f2f246709bc", "score": "0.56494284", "text": "public function messageAction($message=null)\n { \n $adminmessage = 'Du måste vara administratör för att komma in på den här sidan!';\n $wrongusermessage = 'Du har inte tillstånd att gå in på den här sidan!';\n $usermessage = \"Du måste <a href='../login'>logga in</a> för att gå in på den här sidan!\";\n $content = '';\n if($message == 'admin') {\n $content = $adminmessage;\n }\n else if($message == 'wronguser') {\n $content = $wrongusermessage;\n } else {\n $content = $usermessage;\n }\n \n $this->theme->setTitle(\"Meddelande\");\n $this->views->add('default/error', [\n 'title' => \"Meddelande\",\n 'content' => $content,\n ]); \n }", "title": "" }, { "docid": "1bf43a77810e50bcb8cb2d74d63f33f0", "score": "0.56442386", "text": "function AfterAdd(&$values, &$keys, $inline, &$pageObject)\r\n{\r\n\r\n\t\t\n//********** Display a message on the Web page ************\n\n\n\r\n;\t\t\r\n}", "title": "" }, { "docid": "f4848dd59984c78f2a763ea7be0a42fe", "score": "0.5641717", "text": "public function addMessage(Message $message) {\n\t\t$stack =\n\t\t\t$this->checkStackExists($message->clientId)\n\t\t\t?\n\t\t\t$this->getStackForClient($message->clientId)\n\t\t\t:\n\t\t\t$this->createStackForClient($message->clientId)\n\t\t;\n\t\t$stack->addMessage($message);\n\t}", "title": "" }, { "docid": "ba68aeeada52da6641649e888c24f508", "score": "0.56309575", "text": "public function addMessage($msg){\n\t\t$this->html .= ' <article class=\"msg\">' . PHP_EOL;\n\t\t$this->html .= ' <h6>titre</h6>'.PHP_EOL;\n\t\t$this->html .= ' <p>' . PHP_EOL . ' '. $msg['texte'] . PHP_EOL . ' </p>' . PHP_EOL . PHP_EOL;\n\n\n\t\tforeach($msg['images'] as $img){\n\t\t\t$this->html .= ' <img class=\"image_msg\" src=\"Contenu/Bdd_Images/' . $img .'\" alt=\"image\" ><br/><br/>' . PHP_EOL;\n\t\t}\n foreach($msg['tags'] as $tag){\n $this->html .= ' <a class=\"lien_tag\" href=\"index.php?c=Recherche&a=Afficher&tag=' . $tag . '&tri=defaut\">&#946;' . $tag . '</a>&ensp;' . PHP_EOL . PHP_EOL;\n }\n\t\t$this->html .= ' <form action=\"index.php?\" method=\"get\">' . PHP_EOL\n . ' <input type=\"hidden\" name=\"c\" value=\"Emoji\">' . PHP_EOL\n . ' <input type=\"hidden\" name=\"a\" value=\"Increment\">' .PHP_EOL\n . ' <input type=\"hidden\" name=\"id_msg\" value=\"' . $msg['id_msg'] . '\">' . PHP_EOL;\n\t\t\t \n\t\t$this->html .= ' <button type=\"submit\" class=\"boutonEmoji\" name=\"incrementEmoji\" value=\"love\">' . PHP_EOL;\n\t\t$this->html .= ' <img class=\"emoji\" src=\"Contenu/Images/emoji_love.png\" alt=\"emoji_love\"> : ' . $msg['emoji']['love'] . PHP_EOL . ' </button>' . PHP_EOL;\n\t\t\n\t\t$this->html .= ' <button type=\"submit\" class=\"boutonEmoji\" name=\"incrementEmoji\" value=\"cute\">' . PHP_EOL;\n\t\t$this->html .= ' <img class=\"emoji\" src=\"Contenu/Images/emoji_cute.png\" alt=\"emoji_cute\"> : ' . $msg['emoji']['cute'] . PHP_EOL . ' </button>' . PHP_EOL;\n\t\t\n\t\t$this->html .= ' <button type=\"submit\" class=\"boutonEmoji\" name=\"incrementEmoji\" value=\"trop_style\">' . PHP_EOL;\n\t\t$this->html .= ' <img class=\"emoji\" src=\"Contenu/Images/emoji_trop_style.png\" alt=\"emoji_trop_style\"> : ' . $msg['emoji']['trop_style'] . PHP_EOL . ' </button>' . PHP_EOL;\n\t\t\n\t\t$this->html .= ' <button type=\"submit\" class=\"boutonEmoji\" name=\"incrementEmoji\" value=\"swag\">' . PHP_EOL;\n\t\t$this->html .= ' <img class=\"emoji\" src=\"Contenu/Images/emoji_swag.png\" alt=\"emoji_swag\"> : ' . $msg['emoji']['swag'] . PHP_EOL . ' </button>' . PHP_EOL;\n\t\t\n\t\t\n\t\t$this->html .= ' </form>' . PHP_EOL .' </article>' . PHP_EOL . PHP_EOL;\n\t}", "title": "" }, { "docid": "01e989bdbcd337a9cf3ce39a480155ba", "score": "0.56141603", "text": "public function addMessage(MessageInterface $message, $group = null);", "title": "" }, { "docid": "63e25e9add67e899fcb3ac1c713a8d45", "score": "0.561234", "text": "public function addErrorMessage($msg) {\n $this->disableCaching();\n $this->addToView('errormsg', $msg );\n }", "title": "" }, { "docid": "f015e12aeda29ed371951c48b5b032b4", "score": "0.56118536", "text": "private function addErrorMessage($message)\n {\n $this->errorMessages[] = $message;\n }", "title": "" }, { "docid": "01fb512d92c3bdbd99aa82f9e08b9085", "score": "0.56005996", "text": "public function addMessages($value)\n\t{\n\t\tif (array_key_exists($value,$this->messages)) {\n\t\t\t$this->delMessages($value);\n\t\t}\t\t\n\t\t$this->messages[] = $value;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "6b62f9ca4daceb4e91d9b8f7a677ce36", "score": "0.55971533", "text": "public function addMessage(ConversationMessage $message) {\n\t\t$this->update([\n\t\t\t'lastPoster' => $message->username,\n\t\t\t'lastPostTime' => $message->time,\n\t\t\t'lastPosterID' => $message->userID,\n\t\t\t'replies' => $this->replies + 1,\n\t\t\t'attachments' => $this->attachments + $message->attachments\n\t\t]);\n\t}", "title": "" }, { "docid": "69b625e990509f30d9366bc11f0e7d6c", "score": "0.55955714", "text": "private function add_info_box($message) {\n $mform = &$this->_form;\n $mform->addElement(\n 'html',\n '<div class=\"form-group row fitem \">'\n . '<div class=\"col-md-3\"></div>'\n . '<div class=\"col-md-9 felement\">'\n . $message\n . '</div></div>'\n );\n }", "title": "" }, { "docid": "48ab9082eff447c2a9f5a4df2416359c", "score": "0.55770826", "text": "public function append($text) {\n\t\tif (!empty($text)) {\n\t\t\t$this->messages[] = $text;\n\t\t\t$this->isError = true;\n\t\t}\n\t}", "title": "" }, { "docid": "0ca2ca15e5dc1f86bae6b396a410919e", "score": "0.556798", "text": "public function add_message()\n\t{\n\t\t$this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('message_title', 'Title', 'required|trim');\n\t\t$this->form_validation->set_rules('message_content', 'Content', 'required|trim');\n\t\tif ($this->form_validation->run() === FALSE) \n\t\t{\n\t\t\t$this->add_message_form();\n\t\t\techo \"Try again!\";\n\t\t} \n\t\telse \n\t\t{\n\t\t\t\n\t\t\t$this->messages_model->add_message();\n\t\t\techo \"Succcess!\";\n\t\t\t\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "2789c716da71aa5dc9dec083758620e7", "score": "0.5552702", "text": "public function message($msg);", "title": "" }, { "docid": "216a2edc8d0cc42745a6f735a979f36e", "score": "0.55413747", "text": "protected function add($message, $options = [])\n {\n\n $this->messages[] = [\n 'message' => $message,\n 'options' => $options,\n ];\n $this->session->flash('notify::messages', $this->messages);\n }", "title": "" }, { "docid": "3d06457ae9bb90ff43a6a434afb8dfc4", "score": "0.5531531", "text": "public function setFieldMessage($fieldMessage)\n {\n $this->fieldMessage = (string) $fieldMessage;\n }", "title": "" }, { "docid": "aa0a8539a9f16b719462838b341de48c", "score": "0.55101526", "text": "private function addError(string $field, string $message) {\n $this->errors[$field] = $message;\n }", "title": "" }, { "docid": "8e4651c6a2073b34afb5e2ccb0956a78", "score": "0.55072796", "text": "function add_field() {}", "title": "" }, { "docid": "0ec7751fb58fb279f542e16d10ce1055", "score": "0.5499008", "text": "public function add($userid,$type,$title,$text) {\n $bean = new bMessages();\n $bean->userid = $userid;\n $bean->title = $title;\n $bean->messtype = $type;\n\t$bean->content = $text;\n return $bean->save();\n }", "title": "" }, { "docid": "017594c6a10d7c3dbc3142877bb517ae", "score": "0.5499003", "text": "public function add(Message $message, $priority = 1);", "title": "" }, { "docid": "b2d14e33d93dae3b8708b253d3cfebc8", "score": "0.54971045", "text": "public function addPage() {\n $content = [];\n // Only use message templates the user has access to.\n foreach ($this->entityManager()->getStorage('message_thread_template')->loadMultiple() as $template) {\n $access = $this->entityManager()\n ->getAccessControlHandler('message_thread')\n ->createAccess($template->id(), NULL, [], TRUE);\n if ($access->isAllowed()) {\n $content[$template->id()] = $template;\n }\n }\n\n // Bypass the message/add listing if only one message template is available.\n if (count($content) == 1) {\n $template = array_shift($content);\n return $this->redirect('message_thread.add', ['message_thread_template' => $template->id()]);\n }\n\n // Return build array.\n if (!empty($content)) {\n return ['#theme' => 'message_thread_add_list', '#content' => $content];\n }\n else {\n $url = Url::fromRoute('message_thread.template_add');\n return ['#markup' => 'There are no messages templates. You can create a new message template <a href=\"/' . $url->getInternalPath() . '\">here</a>.'];\n }\n }", "title": "" }, { "docid": "cbca842e0aaa41210af8c27c29ab4797", "score": "0.5486649", "text": "public static function addError($message)\n\t{\n\t\tself::addTemplate('messagebox-error', array('message' => $message));\n\t}", "title": "" }, { "docid": "44c8991e5ee1cc2412bf01abe278c6a3", "score": "0.54788405", "text": "function addMessage($inMessage) {\n\t\tif ( strlen($this->getMessages()) > 0 ) {\n\t\t\t$this->setMessages($this->getMessages().\"\\n\".$inMessage);\n\t\t} else {\n\t\t\t$this->setMessages($inMessage);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c903026bee02cec4c995c1f29704d93c", "score": "0.5471198", "text": "abstract public function addSuccessMessage($message);", "title": "" }, { "docid": "f3f53ffe1dfdd9560c4321a608462042", "score": "0.5469153", "text": "public static function message($message, $message_type = null)\n {\n static::$message = $message;\n if ($message_type)\n {\n static::$message_type = $message_type;\n }\n }", "title": "" }, { "docid": "9d557c666cd3caa8bc2313314680b5f4", "score": "0.54623806", "text": "public function setMessage($type = 'info', $message = null)\n\t{\n\t\t\\FlashMessage::put($type, $message);\n\n\t}", "title": "" }, { "docid": "0527d4b78e7f0d7a87fa16990fbac79a", "score": "0.5458766", "text": "public function addInfoMessage($message)\n {\n $this->session->getFlashBag()->add\n (\n 'info',\n [\n 'message' => $message\n ]\n );\n }", "title": "" }, { "docid": "2319ebfa26bc3086ed9de8369a7ee51f", "score": "0.5455025", "text": "public function to_add_page($model_name, $msg, $add_url)\r\n {\r\n $this->redirect($add_url);\r\n }", "title": "" }, { "docid": "2c279c01a927c4ca309f23afb9f33538", "score": "0.5443815", "text": "public function item($message)\n\t{\n\t\t$this->save($message);\n\t}", "title": "" }, { "docid": "39662f75c4c7adafc96687395e323a55", "score": "0.5443391", "text": "public function addMessage($from_id,$to_id,$message)\n\t{\n\t\tparent::insert(array('from_id'=>(int)$from_id,'to_id'=>(int)$to_id,'message'=>$message));\n\t}", "title": "" }, { "docid": "84eefba18f7b2effbef432490124d43a", "score": "0.54396033", "text": "public function addMessage(Mage_Core_Model_Message_Abstract $message)\n {\n if (!isset($this->_messages[$message->getType()])) {\n $this->_messages[$message->getType()] = array();\n }\n $this->_messages[$message->getType()][] = $message;\n $this->_lastAddedMessage = $message;\n return $this;\n }", "title": "" }, { "docid": "c76ccf1c4632c9f1395625671de8836c", "score": "0.5439184", "text": "public function display($message, $type = 'status') {\n \\Drupal::messenger()->addMessage($message, $type);\n }", "title": "" }, { "docid": "596daf3d598009e6745da1124cda2e1c", "score": "0.54380906", "text": "function add_message_post() \n {\n $stream = $this->post( 'stream' );\n $text_message = $this->post( 'text_message' );\n $from_user_id = $this->post( 'from_user_id' );\n $to_user_id = $this->post( 'to_user_id' );\n\n if( ! $stream || ! $text_message || ! $from_user_id || ! $to_user_id ){\n $error = array(\n 'error' => MISSING_ARGUMENT,\n 'responseMessage' => MISSING_ARGUMENT_MSG . \" - The message couldn't be added.\",\n );\n $this->response($error, HTTP_BAD_REQUEST);\n }\n\n $this->load->model('chat_message');\n $addedMessage = $this->chat_message->addMessage( $stream, $text_message, $from_user_id, $to_user_id );\n switch ( $addedMessage['error'] ) {\n case MISSING_ARGUMENT:\n case NO_ERROR:\n $this->response( $addedMessage, HTTP_OK );\n break;\n default:\n $error = array(\n 'error' => 1,\n 'responseMessage' => \"HTTP error 404. The message couldn't be added.\",\n );\n $this->response( $error, HTTP_NOT_FOUND );\n break;\n }\n\n }", "title": "" }, { "docid": "4f80fdb3994e3df26fceed187a021f5d", "score": "0.5436435", "text": "abstract protected function submitMessageText();", "title": "" }, { "docid": "b781f8d2663e967326984fb22f305966", "score": "0.54233444", "text": "protected function setMessage()\n {\n if ( ! isset( $_POST['message'] ) ) {\n $this->error = true;\n $this->data['error']['message'] = 'Please include a message.';\n return;\n }\n \n $this->message = strip_tags( trim( $_POST['message'] ) );\n \n if ( $this->message == '' ) {\n $this->error = true;\n $this->data['error']['message'] = 'Please include a message.';\n return;\n }\n \n $this->data['message'] = $this->message;\n }", "title": "" }, { "docid": "aa948366c090db0373793ddb7322da47", "score": "0.5420295", "text": "protected function addNewMessage($strMessage)\n\t{\n\t\t\\Message::addNew($strMessage);\n\t}", "title": "" }, { "docid": "96dc307e5826f1f02387f594df07ab56", "score": "0.5413441", "text": "public function setMessage($msg, $type = 'info')\n {\n /** @var Message $messages */\n $messages = $this->grav['messages'];\n $messages->add($msg, $type);\n }", "title": "" }, { "docid": "f616f1f4c69f312e7e97edb718a8b22b", "score": "0.53951734", "text": "public function set_message($message)\n\t{\n\t\t$messageLang = $this->lang->line($message) ? $this->lang->line($message) : $message ;\n\t\tparent::set_message( $messageLang );\n\t}", "title": "" }, { "docid": "70fac22bd6ab5e32cdb709ec5ba0010c", "score": "0.53945434", "text": "public function add_success_message( $msg ){\n\t\tif ( $msg ) {\n\t\t\t$this->success_messages[] = $msg;\n\t\t}\n\t}", "title": "" }, { "docid": "3fd3d2391dab5c2c69d6d15aaef3bde1", "score": "0.5389222", "text": "public function addMsg($message_text, $namespace = 'error'){\n\n\t\t$key = md5($message_text);\n\n\t\tif(array_key_exists($namespace, self::$stack)){\n\t\t\tif(!array_key_exists($key, self::$stack[$namespace])){\n\t\t\t\tself::$stack[$namespace][$key] = JText::_($message_text);\n\t\t\t}\n\t\t}else{\n\t\t\tself::$stack[$namespace] = array($key => JText::_($message_text));\n\t\t}\n\t}", "title": "" }, { "docid": "bd59ebb0e653093b8f1f172dfefe93e6", "score": "0.5378253", "text": "public function add($code, $message)\n {\n $type = $this->typeClass;\n $this->violations[] = new $type($this->field, $code, $message);\n }", "title": "" }, { "docid": "349b00093cf1541cf76395b73b7c0349", "score": "0.53769386", "text": "public function flashMessage($type, $message)\n {\n $this->session->getFlashBag()->add($type, $message);\n }", "title": "" }, { "docid": "67159e164591cf37187376cf43aeeb2f", "score": "0.5376822", "text": "public function addField($field) {\n\t\t$this->fields[] = $field;\n\t}", "title": "" }, { "docid": "11bb82144082e28ccf2ae6f94ba5cb1f", "score": "0.5376502", "text": "public function addError($message)\n {\n\n $this->hasError = true;\n $this->response->addError($message);\n\n }", "title": "" }, { "docid": "809815b7af44098ddf786511f4049c3a", "score": "0.5375753", "text": "public static function addMessage($type, $msg, $permanent=false) {\n\t\t$messages = Core\\Request::getParamGlobals(ProjectConstants::KEY_GLOBAL_SYSTEM_MSG);\n\t\tif (is_null($messages)) {\n\t\t\t$messages = [];\n\t\t\t\n\t\t}\n\t\t$messages[] = [\n\t\t\t'type' => $type,\n\t\t\t'msg' => $msg,\n\t\t\t'permanent' => $permanent\n\t\t];\n\t\tCore\\Request::setParamGlobals(ProjectConstants::KEY_GLOBAL_SYSTEM_MSG, $messages);\n\t}", "title": "" }, { "docid": "3f71d31064d1924fde0b35c22e1058f4", "score": "0.5364151", "text": "public function message(Intra_Object $object, $message='') {\n\n\t}", "title": "" }, { "docid": "1a46ad815c10756431d00c50f8fa1718", "score": "0.5356056", "text": "private function flashMessage($type, $message)\n\t{\n\t\t$this->getSession()->getFlashBag()->add($type, $message);\n\t}", "title": "" } ]
7d485ce12cc50923262a1aff315f9b79
Gets the minus sign.
[ { "docid": "dee6dd3c118343885eaa53740eb3ca25", "score": "0.90011966", "text": "public function getMinusSign(): string\n {\n return $this->minusSign;\n }", "title": "" } ]
[ { "docid": "b3b8a048e1e3ba533e365d90852eb417", "score": "0.69022346", "text": "private function minusExpression(): Expression\n {\n assert($this->scanner->peekChar() === '-');\n $next = $this->scanner->peekChar(1);\n\n if (Character::isDigit($next) || $next === '.') {\n return $this->number();\n }\n\n if ($this->lookingAtInterpolatedIdentifier()) {\n return $this->identifierLike();\n }\n\n return $this->unaryOperation();\n }", "title": "" }, { "docid": "96a87d7e53cc652085ed9f9fe7657dbe", "score": "0.66846037", "text": "public function getPlusSign(): string\n {\n return $this->plusSign;\n }", "title": "" }, { "docid": "2d6e1ddfc379b01d310f366918fb2273", "score": "0.64830786", "text": "protected function toText()\n\t{\n\t\treturn '-';\n\t}", "title": "" }, { "docid": "56ab4ef121d0c13be95c29f786d94265", "score": "0.64544296", "text": "private function getNegativeSignFromNumber(&$number)\n {\n if ( $number >= 0 ) {\n return '';\n }\n\n $number = (string) -1 * $number;\n\n return self::STR_NEGATIVE;\n }", "title": "" }, { "docid": "1433dadbdbe5088832c00d7ffc8f6142", "score": "0.63502103", "text": "public function isNegative()\n {\n return $this->negate;\n }", "title": "" }, { "docid": "ead4cbf3e0366164cec54117412b3772", "score": "0.6240976", "text": "public function subtract(){\n return $this->firstNumber-$this->secondNumber;\n\t\t}", "title": "" }, { "docid": "de06f8374a2ce8fd63d782cb6f668ad2", "score": "0.60528076", "text": "public function getPercentSign(): string\n {\n return $this->percentSign;\n }", "title": "" }, { "docid": "bcda9cef1ffcb404954ec32208a2b021", "score": "0.5975181", "text": "public function signum(): int { }", "title": "" }, { "docid": "8084b83219ab258877866166c492d44d", "score": "0.5819332", "text": "public function isNegative() : bool {\n return Calculator::compare($this->number, '0') == -1;\n }", "title": "" }, { "docid": "83caa20aa9d496da0ebc90f750f2b5fa", "score": "0.5739185", "text": "public function visitUnaryMinus(Node $node);", "title": "" }, { "docid": "e84cf21be719b9f40a05d50bf85116b0", "score": "0.56927586", "text": "public function getKeywordPlanNegativeKeyword()\n {\n return $this->keyword_plan_negative_keyword;\n }", "title": "" }, { "docid": "13eb648132759954f60e37cba7f07d33", "score": "0.5644805", "text": "public static function negation($a) { return -$a; }", "title": "" }, { "docid": "653f6c9ad6cbe7b9dd4d7ea696aefe2b", "score": "0.55269223", "text": "public function negate(): Decimal { }", "title": "" }, { "docid": "b024278775a7f3e64ec3c7dd7b027942", "score": "0.55233383", "text": "public function isSubtraction();", "title": "" }, { "docid": "a0fce2d5328f20ac70db1f0879b0fd3e", "score": "0.5520095", "text": "public function getSymbol()\n\t\t{\n\t\t\treturn $this->symbol;\n\t\t}", "title": "" }, { "docid": "14dab0fb9f62066df97966211fad40f0", "score": "0.55154836", "text": "public function sign($x)\n {\n if (!is_numeric($x)) {\n return NAN;\n } elseif ($x < 0) {\n return -1;\n } elseif ($x > 0) {\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "425fed22a48e9db8c6ae8ca3bcb79161", "score": "0.5514817", "text": "public function negative()\n\t{\n\t\t$this->positive = false;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4f2fc35b5940eb6be66b7888b29d5370", "score": "0.5490842", "text": "function get_signed()\r\n {\r\n return $this->get_additional_property(self :: PROPERTY_SIGNED);\r\n }", "title": "" }, { "docid": "56a1785686638dfd78676e822adfe01a", "score": "0.5477746", "text": "final public function abs(string $n) : string\n {\n return ($n[0] === '-') ? \\substr($n, 1) : $n;\n }", "title": "" }, { "docid": "025e90b745ff0078f55f0eb34d1e697d", "score": "0.54727966", "text": "public function getStopSignal() : string\n {\n return $this->stopSignal;\n }", "title": "" }, { "docid": "1a0ad3d8ae5ca17b6f5a34a885bd70c8", "score": "0.5471154", "text": "public function getSymbol()\n\t{\n\t\treturn $this->symbol;\n\t}", "title": "" }, { "docid": "aa7aaf3c3957cbdf031e98c45aad56da", "score": "0.54710937", "text": "public function getSymbol(): string\n\t{\n\t\treturn $this->symbol;\n\t}", "title": "" }, { "docid": "4fc4f2150b77f304613e9d07a4a1b03a", "score": "0.54628694", "text": "public function verPlus() {\n return $this->plus;\n }", "title": "" }, { "docid": "54241a949b11780db92731703ef579d8", "score": "0.5444928", "text": "function sign($n) {\n return ($n>0) - ($n<0);\n}", "title": "" }, { "docid": "1fbac0935c02b1ba40d4acfcf431934e", "score": "0.5417602", "text": "function unsign($i)\r\n{\r\n\treturn sprintf(\"%u\", $i);\r\n}", "title": "" }, { "docid": "ee2531a75700bcfb57e0cd0fa08eb016", "score": "0.5387541", "text": "public function isNegative(): bool\n {\n return $this->calculator->compare($this->getAmount(), '0') === -1;\n }", "title": "" }, { "docid": "c9e4fd81d7ed7caae1f86b1771d4d749", "score": "0.5376644", "text": "public function getS00()\n {\n return $this->s00;\n }", "title": "" }, { "docid": "1346b0a12f119090e0cf908fb801984e", "score": "0.5307407", "text": "static function abs($x) {\n return js_int( abs($x->toNumber()->value));\n }", "title": "" }, { "docid": "ad49c7fed99cea9879fa03162acc6d27", "score": "0.52821773", "text": "public function getSymbol() { return $this->symbol; }", "title": "" }, { "docid": "3c5d20f7e329590443ea4a1d30cdb8d6", "score": "0.528084", "text": "function minus($x, $y)\n{\n return ($x - $y);\n}", "title": "" }, { "docid": "0dc3b0e8ce3fc835d569e1dfbc855090", "score": "0.52786386", "text": "final public function subtract($input)\n {\n return $this->negative()->add($input)->negative();\n }", "title": "" }, { "docid": "4bce0d8d88fd3ee1bd234e4ed84774d0", "score": "0.5269983", "text": "static function abs($x) {\n return jss::js_int( abs($x->toNumber()->value));\n }", "title": "" }, { "docid": "3c6a3db13844346635650f31eb6a5971", "score": "0.52621204", "text": "public function getUnaryOperator() {\r\n\t\treturn $this->unaryOperator;\r\n\t}", "title": "" }, { "docid": "c4af6382ef67da693e106251d7040897", "score": "0.5260812", "text": "function sign($x) {\n if($x==0)\n return 0;\n else\n return $x / abs($x);\n}", "title": "" }, { "docid": "80be467f9b0ed1911fae9155eab181fa", "score": "0.52594894", "text": "public function obtenerNegocios(){\r\n return $this->negocios;\r\n }", "title": "" }, { "docid": "9d679932e2642ec50abdc179b34c2f93", "score": "0.5258648", "text": "public function getCoNegocio()\n\t{\n\t\treturn $this->co_negocio;\n\t}", "title": "" }, { "docid": "308c817c32cf9a367edbe0ebfcded4db", "score": "0.5255429", "text": "public function getNegativeKeywords()\n {\n return $this->negative_keywords;\n }", "title": "" }, { "docid": "b11f5be321e0e9df8d0f3cb3a872c316", "score": "0.52470195", "text": "public function getSignTemperature() : int\n {\n return intval(substr($this->raw_air_temperature, 1, 1));\n }", "title": "" }, { "docid": "1937fb99c7a7a595f6626a275dc29742", "score": "0.5237916", "text": "public static function neg(self $a) {\n return self::create(-$a->_value);\n }", "title": "" }, { "docid": "0f9822f4e623b9dc182b5940d0ee7765", "score": "0.5234133", "text": "public function getRpDes() {\n return $this->get(self::RP_DES);\n }", "title": "" }, { "docid": "dc72dc94f8489c478baefd36cce3ca6b", "score": "0.522376", "text": "public function getEi08226S() {\n\t\treturn $this->ei08226S;\n\t}", "title": "" }, { "docid": "b33ff695ce3217c531c2f758aecd60b9", "score": "0.5209131", "text": "public function getSymbol() : string\n {\n return $this->provider->getCurrency()->symbol;\n }", "title": "" }, { "docid": "840e3c499f03cb13e0899dcca72b7a84", "score": "0.52075744", "text": "public function getSignificantOther() : STRING;", "title": "" }, { "docid": "7a0f86c2fcbcf211998ca1a1e23a2e51", "score": "0.5195354", "text": "public function getNegate()\n\t{\n\t\treturn $this->negate;\n\t}", "title": "" }, { "docid": "da761a59192d0feb082cb2e521dc42cf", "score": "0.5190247", "text": "public function getDecimalSymbol() : string\n {\n return $this->decimalSymbol;\n }", "title": "" }, { "docid": "7711da70e54929c9a647cecb5f1e5c9f", "score": "0.5183907", "text": "public function getExp()\n {\n return $this->Exp;\n }", "title": "" }, { "docid": "ad4f6b82b0e1d91da30b8dd7b27f44a9", "score": "0.51743144", "text": "public function get()\n {\n $symbol = '$';\n\n switch( $this->currency )\n {\n case \"gbp\":\n $symbol = '£';\n }\n\n return $symbol;\n }", "title": "" }, { "docid": "cf7c05f74dfb1612f89473866ac18b0e", "score": "0.51667434", "text": "public function testCapacitanceValueNegative()\n {\n $value = new Zend_Measure_Capacitance('-100', Zend_Measure_Capacitance::STANDARD, 'de');\n $this->assertEquals(-100, $value->getValue(), 'Zend_Measure_Capacitance value expected to be a negative integer');\n }", "title": "" }, { "docid": "77fefbf1befbe9ac82b08d80d9d9d299", "score": "0.51654047", "text": "public function absolute()\n {\n return new Number(abs($this->content));\n }", "title": "" }, { "docid": "ae0514373309288b4db58f83908ecb06", "score": "0.51635444", "text": "public function getStopzettingText() {\n\t\treturn $this->stopzettingText;\n\t}", "title": "" }, { "docid": "82c116eea2e410ebfbd4d2716c388b90", "score": "0.51568514", "text": "public function getTrueNegativeCount()\n {\n return $this->true_negative_count;\n }", "title": "" }, { "docid": "6d34a6c599286efa7ba3727b1073221b", "score": "0.51402813", "text": "public function getSymbolX() {\n return $this->symbolX;\n }", "title": "" }, { "docid": "9e62ada5fad848c353ec1d4fa5955238", "score": "0.5130945", "text": "public function get_allow_negative_scores() {\n return $this->allow_negative_scores;\n }", "title": "" }, { "docid": "f04f93b4e52d60a2445e9772037ba86d", "score": "0.5126956", "text": "public function getEi08110S() {\n\t\treturn $this->ei08110S;\n\t}", "title": "" }, { "docid": "404eab1b8c75f90246b44a7a8394193e", "score": "0.51250815", "text": "public function getEi08202S() {\n\t\treturn $this->ei08202S;\n\t}", "title": "" }, { "docid": "6459e44742c6a49f74a02433fdf306a7", "score": "0.5121055", "text": "public function getShift() {\n return $this->data->shift;\n }", "title": "" }, { "docid": "41bbd20bfecca0c455203d37895da12d", "score": "0.5117876", "text": "public function getValue()\n {\n if ($this->value == \"..\") {\n return 0;\n }\n\n return $this->value;\n }", "title": "" }, { "docid": "0dd98ed4e610cb5b5c7514681e582f9c", "score": "0.51138204", "text": "public function providerNegativeNumbers()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray(\r\n\t\t\t\t\"-1,-3\",\r\n\t\t\t\t\"-1,2,-3\",\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"-3\",\r\n\t\t\t\t\"1,2,-3\",\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t\"-1,-2,-3\",\r\n\t\t\t\t\"-1,-2,-3\",\r\n\t\t\t),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "8137a81e619b2edea0ebb8c81ed67d54", "score": "0.51022327", "text": "public function getEi08111S() {\n\t\treturn $this->ei08111S;\n\t}", "title": "" }, { "docid": "46ebb34af77f141588d67db4c3536624", "score": "0.5095141", "text": "public static function isNegative($num){\n\n\t\t\t\treturn !self::isPositive($num);\n\n\t\t\t}", "title": "" }, { "docid": "11f86ab93d57af87edb11a1e5ffd42e7", "score": "0.50772345", "text": "public function setSignValue($value) {\n return (float) $value > 0 ? \"+\" . $value : $value;\n }", "title": "" }, { "docid": "3979290925c16c984c5b39ed0b15a75a", "score": "0.507341", "text": "public function alphaDash()\n {\n return $this->alpha_dash();\n }", "title": "" }, { "docid": "6d6937ad5df47e9a2f6d1c76cef2df7d", "score": "0.506785", "text": "public function getCurrencySymbol(){\r\n return Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();\r\n }", "title": "" }, { "docid": "671bc50bc8e72ebff7729def23aeb768", "score": "0.50624406", "text": "public function getEi03210S() {\n\t\treturn $this->ei03210S;\n\t}", "title": "" }, { "docid": "6b30ed3db449bdc2b11a0f6661de85a2", "score": "0.50622123", "text": "public function getEi08225S() {\n\t\treturn $this->ei08225S;\n\t}", "title": "" }, { "docid": "a259317e2a987392eff510bab775ebe6", "score": "0.50583154", "text": "public function getUntranslated(): int\n {\n return $this->total - $this->translated;\n }", "title": "" }, { "docid": "4f84b1284c38077c9fc227181ab66574", "score": "0.5055668", "text": "public function getEi08222S() {\n\t\treturn $this->ei08222S;\n\t}", "title": "" }, { "docid": "c043b32c067cf9a2d4f86a2480d2e7b6", "score": "0.50517875", "text": "public function getEi03208S() {\n\t\treturn $this->ei03208S;\n\t}", "title": "" }, { "docid": "d0e67faba855714e800765f8d3f930c2", "score": "0.5051498", "text": "public function getEnergy():string\n {\n return $this->energy;\n }", "title": "" }, { "docid": "b75a8b76cfa1ef8664cb075f3c8e7530", "score": "0.50445676", "text": "public function getEi08223S() {\n\t\treturn $this->ei08223S;\n\t}", "title": "" }, { "docid": "024f24a069faf981a4caa01076fe1658", "score": "0.50409794", "text": "public function getNegativeFeedbackPeriods()\n {\n return $this->negativeFeedbackPeriods;\n }", "title": "" }, { "docid": "22439b0d54da34f73d200f14b02115bb", "score": "0.50302935", "text": "public function getEi08110T() {\n\t\treturn $this->ei08110T;\n\t}", "title": "" }, { "docid": "a40802a696f4a3c85c0f07b74ad8bd9b", "score": "0.50291353", "text": "public function getCustomerNegativeCriterion()\n {\n return $this->customer_negative_criterion;\n }", "title": "" }, { "docid": "998d90cdff09559dfd06f6f4f2df6542", "score": "0.50283897", "text": "public function getFalseNegativeCount()\n {\n return $this->false_negative_count;\n }", "title": "" }, { "docid": "142cd24657bbd6c9b64e95f4ad181500", "score": "0.50221705", "text": "public function getEi08226T() {\n\t\treturn $this->ei08226T;\n\t}", "title": "" }, { "docid": "201e09015769d199bdf245fec99767b8", "score": "0.5020265", "text": "public function getEi08109S() {\n\t\treturn $this->ei08109S;\n\t}", "title": "" }, { "docid": "72211d2974f9f8c50729dee5875bd64a", "score": "0.5018281", "text": "public function getShift()\n {\n return $this->shift;\n }", "title": "" }, { "docid": "136c1ce1adc67cf3b21037b6da5ac321", "score": "0.50165087", "text": "public function getComplement()\n {\n return $this->complement;\n }", "title": "" }, { "docid": "5b51232bbce7d3d3eed2af5ad7a2d682", "score": "0.5011492", "text": "public function getEi08111T() {\n\t\treturn $this->ei08111T;\n\t}", "title": "" }, { "docid": "6b1749bd8a142a48b13a5e00ea21d1e4", "score": "0.5006373", "text": "public function getEi08117S() {\n\t\treturn $this->ei08117S;\n\t}", "title": "" }, { "docid": "5e0b67a4764a61cbff6070626015eaf4", "score": "0.5005159", "text": "public function getEi08104S() {\n\t\treturn $this->ei08104S;\n\t}", "title": "" }, { "docid": "2209ab908f8baaaa7a6cad7f5bce655f", "score": "0.50046945", "text": "public function getEi03207S() {\n\t\treturn $this->ei03207S;\n\t}", "title": "" }, { "docid": "dbcacdb4f3c73efb5b1afbc4b612be2b", "score": "0.50005627", "text": "public function getEi08112S() {\n\t\treturn $this->ei08112S;\n\t}", "title": "" }, { "docid": "baf657d82c6f827dbb9e76eab978c3eb", "score": "0.49971274", "text": "public function getEi08202T() {\n\t\treturn $this->ei08202T;\n\t}", "title": "" }, { "docid": "48a6ee2d416c5b8984b496aa9ac1d2f9", "score": "0.49963787", "text": "public function getProTriCanceled ()\n {\n\n return $this->pro_tri_canceled;\n }", "title": "" }, { "docid": "c3d881fb0daf8e81df02f0c7f93ea724", "score": "0.499455", "text": "public function getEi08113S() {\n\t\treturn $this->ei08113S;\n\t}", "title": "" }, { "docid": "88e47bb4ffe61e180981ed1f1b7accf5", "score": "0.49918577", "text": "public function get_data-subtract-height() {\n return $this->data-subtract-height;\n }", "title": "" }, { "docid": "62b961cff6a3f56d9d7df621e6acaa58", "score": "0.49901178", "text": "function absolute ($num){\n return abs($num);\n }", "title": "" }, { "docid": "443d993075a0af8317ed845f9328aaa3", "score": "0.4989216", "text": "public function getPosit()\n {\n return $this->posit;\n }", "title": "" }, { "docid": "60f989f004e865d791f50ad651c595cf", "score": "0.49868327", "text": "private function getCurrencySymbol()\n {\n $websiteId = $this->getSelectedWebsiteId();\n if ($websiteId) {\n $website = $this->storeManager->getWebsite($websiteId);\n $currencyCode = $website->getBaseCurrencyCode();\n } else {\n $store = $this->storeManager->getStore(\\Magento\\Store\\Model\\Store::DEFAULT_STORE_ID);\n $currencyCode = $store->getBaseCurrencyCode();\n }\n\n return $this->localeCurrency->getCurrency($currencyCode)->getSymbol();\n }", "title": "" }, { "docid": "fb8812d2ffd5929f61b063ce5a676df9", "score": "0.4985319", "text": "public function getEi03209S() {\n\t\treturn $this->ei03209S;\n\t}", "title": "" }, { "docid": "2ae43731a4ec116cfc85e4b7549acf69", "score": "0.4979328", "text": "public function negate(): self\n {\n return $this->changeAmount(-1 * $this->getAmount());\n }", "title": "" }, { "docid": "076cc20f997311323f09d4d6ac8d5796", "score": "0.4974537", "text": "public function getEi08116S() {\n\t\treturn $this->ei08116S;\n\t}", "title": "" }, { "docid": "4008ea7aeaa1709bf576d06f0de707f4", "score": "0.49718252", "text": "public function getEi08118S() {\n\t\treturn $this->ei08118S;\n\t}", "title": "" }, { "docid": "10f88efbcc6b585728f4e929da9812b3", "score": "0.49709946", "text": "public function getEi08205S() {\n\t\treturn $this->ei08205S;\n\t}", "title": "" }, { "docid": "7fad0a215442daa5c68085a469ed8ac7", "score": "0.49645796", "text": "public function getEi08217S() {\n\t\treturn $this->ei08217S;\n\t}", "title": "" }, { "docid": "5eb950e1fdcf5c2c0993fd7c9d1114a2", "score": "0.49608755", "text": "public function getValue()\n {\n $value = sprintf(\"%04d-%02d-%02d\", $this->year, $this->month, $this->day);\n \n return $value;\n }", "title": "" }, { "docid": "69d59a5e0fb1faa7baf87b10a4d44548", "score": "0.496032", "text": "public function getEi08225T() {\n\t\treturn $this->ei08225T;\n\t}", "title": "" }, { "docid": "fa05781fdafaf40c151f895a3464c5b8", "score": "0.49577975", "text": "public function getEi03214S() {\n\t\treturn $this->ei03214S;\n\t}", "title": "" }, { "docid": "20baa2a6669891569c8d5933930dd161", "score": "0.49515647", "text": "public function getEi08222T() {\n\t\treturn $this->ei08222T;\n\t}", "title": "" } ]
f86f75f41bd311dadb5d65840285b487
For Fetch All country List When pass null parameter
[ { "docid": "43edaf7d38a26194ce7c6c1d82a58cd2", "score": "0.6144607", "text": "public function testgetCountryList()\n {\n \t$bResult = Doctrine::getTable('Model_Country')->getCountryList();\n \t$this->assertInternalType('array',$bResult); \t\n }", "title": "" } ]
[ { "docid": "a52da3334533b8f052e90fa3212f25ba", "score": "0.7530522", "text": "public function getAllCountries();", "title": "" }, { "docid": "d8048d90ec03d145548a35d8b755feb9", "score": "0.7425096", "text": "public function CountryList();", "title": "" }, { "docid": "a5e1bb80d2935a7a275125d3ee2c0958", "score": "0.73196256", "text": "protected function getCountryList(): array {\n return $this->countryRepository->getList();\n }", "title": "" }, { "docid": "cebbcf88a4c5a0424efa0fe19b81ab2e", "score": "0.7303232", "text": "public function getAll()\n\t{\n\t\treturn $this->country->all();\n\t}", "title": "" }, { "docid": "5570da77559f2e3467dde7c74791a18c", "score": "0.7174979", "text": "function getAllCountries()\n {\n global $pdo;\n $query = 'SELECT * FROM Country;';\n return $pdo->query($query)->fetchAll();\n }", "title": "" }, { "docid": "a3a6402e307f980e1c783344dc22fb98", "score": "0.7121638", "text": "public function countryList() {\r\n\t\ttry {\r\n\t\t\t// get all country\r\n\t\t\t$Country = Country::select(\"id\", \"name\")->where(\"status\", \"AC\")->get();\r\n\t\t\tif ($Country->count() > 0) {\r\n\t\t\t\t$this->response = array(\r\n\t\t\t\t\t\"status\" => 200,\r\n\t\t\t\t\t\"message\" => ResponseMessages::getStatusCodeMessages(200),\r\n\t\t\t\t\t\"data\" => $Country,\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\t$this->response = array(\r\n\t\t\t\t\t\"status\" => 154,\r\n\t\t\t\t\t\"message\" => ResponseMessages::getStatusCodeMessages(154),\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t} catch (\\Exception $ex) {\r\n\t\t\t$this->response = array(\r\n\t\t\t\t\"status\" => 501,\r\n\t\t\t\t\"message\" => ResponseMessages::getStatusCodeMessages(501),\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t$this->shut_down();\r\n\t}", "title": "" }, { "docid": "b586f284d453cf66c7b79927ab524a7e", "score": "0.70913917", "text": "public function getCountriesList(){\n\t\ttry {\n\t\t\tparent::SetDatabaseConnection();\t\t\t\n\t\t\t$query = \"call SPgetcountries()\";\t\t\t\n\t\t\t$opt = Application_Model_Db::getResult($query);\n\t\t\treturn $opt;\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "2dc457b46585c1e7336d53e557250821", "score": "0.70600295", "text": "function CountryList() {\n $arrRes = $this->getArrayResult(\"SELECT country_id,name FROM \" . TABLE_COUNTRY . \" Order By name ASC\");\n return $arrRes;\n }", "title": "" }, { "docid": "737686984e958297eb9a9f64f034197a", "score": "0.7038988", "text": "public function fetchAllCountries(){\n\t\tApp::import('Model', 'Country');\n\t\t$this->Country = new Country();\n\n\t\t$countryArr = $this->Country->find('list', array('fields'=>array('Country.country_iso_code_3', 'Country.countries_name'), 'conditions'=>array('NOT'=>array('Country.country_iso_code_3'=>array('USA', 'CAN')))));\n\t\treturn $countryArr;\n\t}", "title": "" }, { "docid": "c141f25f83414a09c6ed06c2e050eca0", "score": "0.7032126", "text": "public function getCountryList()\n {\n\n $query = $this->db->get('country');\n return $query->result();\n }", "title": "" }, { "docid": "a312805c5ca22b6b013330056d8746e1", "score": "0.6999301", "text": "public function testgetCountryListWithOptionalParameter()\n {\n \t$bResult = Doctrine::getTable('Model_Country')->getCountryList($this->ssSortOn, $this->ssSortBy, $this->ssLang);\n \t$this->assertInternalType('array',$bResult);\n }", "title": "" }, { "docid": "341b1ee5792a6c1779a962d8e42ca0eb", "score": "0.69507015", "text": "public function getcountrylist() {\n\n $this->db->select('co.loc_id, co.country_name, co.created_at, co.updated_at, co.default,co.status');\n $this->db->from('location co');\n $this->db->where('co.status', '1');\n $query = $this->db->get();\n\n if ($query->num_rows() > 0) {\n\n $result = $query->result_array();\n return $result;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "590900e2a5342ffe0b782f210e8b4e65", "score": "0.691936", "text": "public static function getAll() \r\n\t{\r\n\t\treturn CountryManagerDB::getAll();\r\n\t}", "title": "" }, { "docid": "0a7cb93cc94e59a0c19d8f1bc6906179", "score": "0.68782127", "text": "public function getAllCountries(){\n\t\ttry {\n $sql = 'SELECT * FROM Countries as c ORDER BY c.name ASC';\n $statement = $this->getDi()->getDb()->prepare($sql);\n $exe = $this->getDi()->getDb()->executePrepared($statement, array(), array());\n return $exe->fetchAll(PDO::FETCH_ASSOC);\n \n } catch (PDOException $e) {\n return $e->getMessage();\n } \n\t\t\t\n\t}", "title": "" }, { "docid": "7ab3c5c77a6c7cbe5c9418bf05b50e6f", "score": "0.6817418", "text": "public function getCountries()\n {\n\n $db = $this->getDb();\n\n $sql = <<<SQL\nSELECT\n rowid as id,\n name as value,\n flag_main as cat_key\nFROM\n core_country\norder by\n flag_main,\n name;\nSQL;\n\n return $db->select($sql)->getAll();\n\n }", "title": "" }, { "docid": "1e90070971b4659da071269e4dca3713", "score": "0.67731935", "text": "public function AllCountries()\n {\n $query = new Query;\n $query->select('id, country_name_en')->from('country');\n $countries = $query->all();\n\n foreach ($countries as $key => $value){\n $result[$value['id']] = $value['country_name_en'];\n }\n if($result && $this->country){\n $this->current_country_name=$result[$this->country];\n }\n return $result;\n }", "title": "" }, { "docid": "678ac56cc3b70e5107c56257fdff9136", "score": "0.67518497", "text": "function tep_get_countries($default = '') {\n $countries = [];\n if ($default) {\n $countries[] = [\n 'id' => '',\n 'text' => $default];\n }\n $countries_query = tep_db_query(\"SELECT countries_id AS id, countries_name AS text FROM countries ORDER BY countries_name\");\n while ($country = $countries_query->fetch_assoc()) {\n $countries[] = $country;\n }\n\n return $countries;\n }", "title": "" }, { "docid": "b8db3a3a3203f0d6a6f533ea76ee058f", "score": "0.6740695", "text": "public function getCountries(){\t\t\n\t\t$this->loadModel('Country');\n\t\t$country = $this->Country->find('list',array('fields'=>array('Country.id','name'),'order'=>'name ASC'));\n\t\t$this->set('country',$country);\t\t\n\t}", "title": "" }, { "docid": "3fddc59967c551bb04fdc47ac047b439", "score": "0.673994", "text": "function eoddata_country_list(){\n\tglobal $client;\t\n\t# SOAP Call\n\t$param = array('Token' => MAHIWAGANG_TOKEN);\n\t$result = $client->call('CountryList', array('parameters' => $param), '', '', false, true);\n\t\n\tif ($client->fault) return 'Fault';\t\t// Check for a fault\n\t$err = $client->getError();\t\t\t\t// Check for errors\n\tif($err) return 'Error: ' . $err;\n\t\n\t# Check API Call's result\n\t$message = $result['CountryListResult']['!Message'];\n\tif($message !== 'Success') return 'Message: ' . $message;\n\t\n\t# reaching this line means no fault and zero error \n\t$list_raw = $result['CountryListResult']['COUNTRIES']['CountryBase'];\t\n\t\n\t# prepare final list\n\t$final_list = prepare_final_list($list_raw);\n\treturn $final_list;\n}", "title": "" }, { "docid": "6dcf6d5388c7ef394bf66fa0fb2297fd", "score": "0.67083466", "text": "public function get_countries()\n\n {\n\n \t$arr_data = $arr_resp = [];\n\n \t$obj_data = $this->SystemCityModel->where('status','=','1')->get();\n\n\n\n \tif($obj_data){\n\n \t\t$arr_data = $obj_data->toArray();\n\n \t}\n\n\n\n\t\t// $html = \"<div class='mobile-drop-section-select'>\n\n\t\t// \t\t\t<select name='add_country_id' data-rule-required='true' id='add_country_id' class='form-control'>\";\n\n\n\n\t\t$html = \"<option value='' >Select country</option>\";\n\n\t\tforeach ($arr_data as $key => $value) {\n\n\t\t\t$html .= \"<option value=\".$value['id'].\" >\".$value['country_english_name'].\"</option>\";\n\n\t\t}\n\n\n\n\t\t// $html .= \"</select>\n\n\t\t// \t\t</div>\";\n\n\t\t// $html .= \"<div class='mobile-drop-section-input'>\n\n\t\t// \t\t\t<input type='text' placeholder='Enter mobile number' id='add_mobile_number' name='add_mobile_number' data-rule-required='true' data-rule-number='true' class='form-control' autocomplete='off'>\n\n\t\t// \t\t\t</div>\";\n\n\n\n\t\tif($arr_data){\n\n\t\t\t$arr_resp['status'] \t= 'success';\n\n\t\t\t$arr_resp['data'] \t\t= $html;\n\n\t\t}else{\n\n\t\t\t$arr_resp['status'] \t= 'error';\n\n\t\t\t$arr_resp['data'] \t\t= $html;\n\n\t\t}\n\n\n\n\t\treturn $arr_resp;\n\n }", "title": "" }, { "docid": "a1708781e580355c63aabb94aac7bb8b", "score": "0.6676142", "text": "public function bookStoreGetCountriesData_get()\n {\n $countryid = $this->get('countryid');\n $response = $this->login->getCountryStates($countryid);\n if ($response['success'] == true)\n {\n //$output['status'] = REST_Controller::HTTP_OK;\n $output['data'] = $response['data'];\n $this->response($output,REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response(['status'=>REST_Controller::HTTP_BAD_REQUEST], REST_Controller::HTTP_CONFLICT);\n }\n }", "title": "" }, { "docid": "00182a414d924c12d2ca723e4e679482", "score": "0.6655824", "text": "public function getCountries() {\r\n\t\r\n\t\t$url = $this->_buildURL('countries');\r\n\t\treturn $this->_call($url);\r\n\t}", "title": "" }, { "docid": "ec0a1c05072b06a0e7d59b365d896c6a", "score": "0.6616574", "text": "public function getCountryList()\n {\n $countries = $this->countryAPIServices->getCountryList();\n\n return $this\n ->setStatusCode(200)\n ->setDataBag($countries)\n ->respond(true, trans('Country list'));\n }", "title": "" }, { "docid": "fda3e6e698f050300e8ffd2f8b2938e2", "score": "0.6610286", "text": "public function get_countries() {\n return $this->db->select('*')->get('upkepr_country')->result_array();\n }", "title": "" }, { "docid": "4957218ccbccf6c44167a33679b9b285", "score": "0.6595886", "text": "public function getCountriesForNonMjb(){\n $countries = $this->masterCountry->all(array('*'));\n return response()->json(array('success' => 'true','data' => $countries), 200);\n }", "title": "" }, { "docid": "b52cdd4fdc65fe428fc690f7e57d5ddb", "score": "0.6587996", "text": "public function getCountriesList()\n {\n $query = $this->_db->select();\n if ( $this->isAsAssoc() ) {\n $fields = array();\n $fields[] = ( $this->getAssocKey() === null ) ? 'zlcr.id' : $this->getAssocKey();\n $fields[] = ( $this->getAssocValue() === null ) ? 'zlcr.name' : $this->getAssocValue();\n $query->from(array('zgm' => 'zanby_groups__members'), $fields); \n } else {\n $query->from(array('zgm' => 'zanby_groups__members'), 'zlcr.id');\n }\n $query->joininner(array('zua' => 'zanby_users__accounts'), 'zua.id = zgm.user_id');\n $query->joinleft(array('zlc' => 'zanby_location__cities'), 'zua.city_id = zlc.id');\n $query->joinleft(array('zls' => 'zanby_location__states'), 'zlc.state_id = zls.id');\n $query->joinleft(array('zlcr' => 'zanby_location__countries'), 'zls.country_id = zlcr.id');\n \n if ( $this->getWhere() ) $query->where($this->getWhere()); \n $query->where('zgm.group_id = ?', $this->getGroupId());\n $query->where('zgm.is_approved IN (?)', $this->getMembersStatus());\n $query->where('zgm.status IN (?)', $this->getMembersRole());\n $query->where('zua.status IN (?)', 'active');\n if ( $this->getIncludeIds() ) $query->where('zlcr.id IN (?)', $this->getIncludeIds());\n if ( $this->getExcludeIds() ) $query->where('zlcr.id NOT IN (?)', $this->getExcludeIds());\n if ( $this->getUserIdsIn() ) $query->where('zua.id IN (?)', $this->getUserIdsIn());\n if ( $this->getUserIdsOut() ) $query->where('zua.id NOT IN (?)', $this->getUserIdsOut());\n if ( $this->getCountryIdsIn() ) $query->where('zls.country_id IN (?)', $this->getCountryIdsIn());\n if ( $this->getCountryIdsOut() ) $query->where('zls.country_id NOT IN (?)', $this->getCountryIdsOut());\n if ( $this->getStateIdsIn() ) $query->where('zlc.state_id IN (?)', $this->getStateIdsIn());\n if ( $this->getStateIdsOut() ) $query->where('zlc.state_id NOT IN (?)', $this->getStateIdsOut());\n if ( $this->getCityIdsIn() ) $query->where('zlc.id IN (?)', $this->getCityIdsIn());\n if ( $this->getCityIdsOut() ) $query->where('zlc.id IN (?)', $this->getCityIdsOut());\n \n if ( $this->getCurrentPage() !== null && $this->getListSize() !== null ) {\n $query->limitPage($this->getCurrentPage(), $this->getListSize());\n }\n if ( $this->getOrder() !== null ) $query->order($this->getOrder());\n else $query->order(array('zlcr.sort_order ASC', 'zlcr.name ASC'));\n \n if ( $this->isAsAssoc() ) {\n $items = $this->_db->fetchPairs($query);\n } else {\n $items = $this->_db->fetchCol($query);\n foreach ( $items as &$item ) $item = Warecorp_Location_Country::create($item);\n }\n return $items;\n }", "title": "" }, { "docid": "f305d98956fda49802909d08a19fe746", "score": "0.65726423", "text": "function getCountryList(){\n\n\t\t\t\t\t\t$data = $this->find('list', array(\n\t\t\t'conditions' => array('Country.status'=>Configure::read('App.Status.active')),\n\t\t\t'recursive'=>1,\n\t\t\t'joins'=>array(\n\t\t\t\t\t\tarray('table' => 'states',\n\t\t\t\t\t\t'alias' => 'State',\n\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'State.country_id = Country.id'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'type'=>'INNER'\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn $data;\n\t\t\t\t\t}", "title": "" }, { "docid": "2ebd5d3c6557f5b3beddbd3c35d025f5", "score": "0.6556714", "text": "function getALLLicenseCountry($countryCode){\n\t\t//$this->db->where('is_country', $countryCode);\n\t\t$q = $this->db->get('countries');\n\t\tif($q->num_rows()>0){\n\t\t\tforeach (($q->result()) as $row) {\n $data[] = $row;\n }\n\t\t\treturn $data;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2ebd5d3c6557f5b3beddbd3c35d025f5", "score": "0.6556714", "text": "function getALLLicenseCountry($countryCode){\n\t\t//$this->db->where('is_country', $countryCode);\n\t\t$q = $this->db->get('countries');\n\t\tif($q->num_rows()>0){\n\t\t\tforeach (($q->result()) as $row) {\n $data[] = $row;\n }\n\t\t\treturn $data;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "da002f5935b6609595365f727399701b", "score": "0.65364456", "text": "public function listCountries()\n {\n TheliaApiException::throwApiExceptionFaultUnless(\n $this->api->checkAccess('configuration',1,0),\n TheliaApiException::ERROR,\n TheliaApiException::E_unavailable);\n\n $query = 'SELECT pd.titre, p.id, p.isocode, p.isoalpha2, p.isoalpha3 FROM '.Pays::TABLE.' p LEFT JOIN '.Paysdesc::TABLE.' pd ON p.id = pd.pays WHERE pd.lang=1';\n\n $countries = $this->api->query_liste($query);\n\n TheliaApiTools::displayResult(array(\"status\" => \"ok\", \"countries\" => $countries));\n\n }", "title": "" }, { "docid": "09ad988b1bfb7c9c9a5f05944fd8ea52", "score": "0.65248275", "text": "public function getCountry(): string|null;", "title": "" }, { "docid": "a5e1c6872e5c8051831cb7b4aad2f42a", "score": "0.65216637", "text": "public function getListOfCountrys(){\n return $array = [\n [\n \"id\" => 237,\n \"name\" => \"Cameroon\",\n ],\n [\n \"id\" => 251,\n \"name\" => \"Ethiopia\",\n ],\n [\n \"id\" => 212,\n \"name\" => \"Morocco\",\n ],\n [\n \"id\" => 258,\n \"name\" => \"Mozambique\",\n ],\n [\n \"id\" => 256,\n \"name\" => \"Uganda\",\n ] \n ];\n }", "title": "" }, { "docid": "8f67e7846be337742e3596700dbc620f", "score": "0.6515959", "text": "public function allCountries()\n {\n $countriesAll = Country::all();\n return $countriesAll;\n }", "title": "" }, { "docid": "0648978e6d0dde756b57459cde95be3b", "score": "0.6514977", "text": "public function getCountries($language);", "title": "" }, { "docid": "85bf3622ba72373c0418d59bace7b430", "score": "0.65039444", "text": "function getCountry_get(){\n\t\t$data = $this->host_model->extractCountry();\t\n\t\techo json_encode($data);\t\t\n\t}", "title": "" }, { "docid": "b289bc1cd90dd2f720203f0d437ba4e9", "score": "0.6470545", "text": "function getcountries() {\r\n\t\t// import the country DB\r\n\t\t$country = array();\r\n\t\tApp::import(\"Model\",\"Country\");\r\n\t\t$this->Country=& new Country();\r\n\t\t$country = $this->Country->find('list', array('conditions'=>array('Country.status'=>'1'), 'fields'=>array('Country.id','Country.country_name')));\r\n\t\treturn $country;\r\n\t}", "title": "" }, { "docid": "d981b9886feb20b6106072c6e3eae6a5", "score": "0.6467718", "text": "function getCountriesList($countryid='')\n{\n\t$displayCountryDropdown=\"\";\n\t$getCountries=sprintf(\"select * from tbl_countries\");\n\t$getCountriesresult=$this->ExecuteQuery($getCountries);\n\twhile($getCountriesrecords=$this->FetchArray($getCountriesresult))\n\t{\n\t\tif($getCountriesrecords['CountryID']==$countryid)\n\t\t$displayCountryDropdown.='<option value=\"'.$getCountriesrecords['CountryID'].'\" selected=\"seleted\">'.$getCountriesrecords['CountryName'].'</option>';\n\t\telse\n\t\t$displayCountryDropdown.='<option value=\"'.$getCountriesrecords['CountryID'].'\">'.$getCountriesrecords['CountryName'].'</option>';\n\t}\n\treturn $displayCountryDropdown;\n}", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.64498705", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.64498705", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.64498705", "text": "public function getCountry();", "title": "" }, { "docid": "4db1a94d864ad671fa573b03e59725aa", "score": "0.64486897", "text": "public function testgetCountryByIdWhenNullParameter()\n {\n \t$bResult = Doctrine::getTable('Model_Country')->getCountryById();\n \t$this->assertFalse($bResult,\"Records not found because pass null parameter\");\n }", "title": "" }, { "docid": "dc9fc9924467cc25b6d8698ab475d467", "score": "0.64478767", "text": "public function listCountries($default=\"ZA\"){\r\n\t\t//FIRST FIND DEFAULT COUNTRY ID\r\n\t\t\r\n\t\t$sql = \"SELECT ID FROM countries WHERE Code= ? ORDER BY ID\";\r\n\t\t$results = $this->db->query( $sql, array($default) );\r\n\t\t//OUTPUT [ROW]\r\n\t\tforeach ($results->result() as $result) {\r\n\t\t\t$selectedCountry = $result->ID;\r\n\t\t}\r\n\t\t/**/\r\n\t\t//RUN PROVINCES QUERY\r\n\t\tif(empty($default) or empty($selectedCountry) ){\r\n\t\t\tthrow new Exception(\"Unsupported country!\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t$country_query = \"SELECT * FROM countries ORDER BY ID\";\r\n\t\t\t$countryResults = $this->db->query($country_query);\r\n\t\t\t/**\r\n\t\t\tif(class_exists('iDBug')){\r\n\t\t\t\t$debug = new iDBug();\r\n\t\t\t\t$debug->debug('countryResults',$countryResults->result());\r\n\t\t\t}\r\n\t\t\t/**/\r\n\t\t\treturn $countryResults->result();\r\n\t\t}\r\n\t\t/**/\r\n\t}", "title": "" }, { "docid": "17f2ea52dfdd2e2957fb7f8ae7009517", "score": "0.6413212", "text": "public function country_list(){\n\t\t$this->load->model('users');\n\t\t$this->load->helper('json');\n\t\t$data = $this->users->country_lists();\t\n\t\tprint_r(json_return('true',$data));\n\t\tdie();\n\t\t/*foreach($data as $key){\n\t\t\t$tata=array(\n\t\t\t'id' => $key->id,\n\t\t\t'name' => $key->name\n\t\t\t);\n\t\t}*/\n\t\t//echo json_encode($tata);\n\t\t\n\t\t//echo json_return(\"true\",$data[]->id);\n\t\t\n\t\t}", "title": "" }, { "docid": "c2c417db746a22d3fbd487da98f07177", "score": "0.6398082", "text": "public function entityCountry();", "title": "" }, { "docid": "e3e603943e25ed1b40769bd7da96e872", "score": "0.6392771", "text": "public function getCountries_post()\n {\n $CountryData = $this->Utility_model->getCountries(@$this->Post['Params'],$this->Post, TRUE, @$this->Post['PageNo'], @$this->Post['PageSize']); \n \n if (!empty($CountryData)) {\n $this->Return['Data'] = $CountryData['Data'];\n }\n }", "title": "" }, { "docid": "fad9f64c3526e92b9c362862d99461ed", "score": "0.6380717", "text": "function country(){\n\t\t\t\t//$idUser = @$session->getVar(\"userAccountID\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t$pageid = @$_REQUEST['pageid'];\n\t\t\t\t$this->sql = \"SELECT * FROM country\"; \n\t\t\t\t$this->query();\n\t\t\t\t\n\t\t\t\t\t$this->result = $this->loadAssoc();\n\t\t\t\t\treturn $this->result;\n\t\t\t}", "title": "" }, { "docid": "b4bef3caa2e059b06d907a1955d40cd5", "score": "0.6380127", "text": "public function testgetCountryByIdWhenBlankArrayAsParameter()\n {\n \t$bResult = Doctrine::getTable('Model_Country')->getCountryById($this->asBlankArray);\n \t$this->assertFalse($bResult,\"Records not found because pass blank array as parameter\");\n }", "title": "" }, { "docid": "9a0e4834453292736cc2960d270d23fe", "score": "0.6374497", "text": "public function testGetAllCountries()\n {\n $this->get('api/countries', ['Accept' => 'application/json']);\n\n $this->seeStatusCode(200);\n\n $this->seeJsonStructure(\n ['data' => [\n '*' => [\n 'id', 'type', 'attributes' => [\n 'name',\n 'region_code',\n 'wikipedia_title',\n 'initial_paragraphs',\n 'videos' => ['*' => ['title', 'description', 'thumbnails' => ['default']]]\n ]\n ]\n ]]\n );\n }", "title": "" }, { "docid": "987ea0bb582b1171b1b7ee6264fdda5c", "score": "0.6365489", "text": "public function index()\n {\n $countriesQuery = Country::active();\n\n $countries = filter($countriesQuery, new CountryTransformer)->defaultSort('name')->get();\n\n return $this->respondSuccess($countries,'country_list');\n }", "title": "" }, { "docid": "11d6dcaefd47a2396da711b34c60f331", "score": "0.63592726", "text": "public function dpGetCountriesQuery()\n {\n return array(\n array (\n 'params' => array('q' => 'Andorra'),\n 'items_per_page' => 1,\n 'count_items_query' => \"SELECT count(*) FROM ?:countries as a LEFT JOIN ?:country_descriptions as b\"\n . \" ON b.code = a.code AND b.lang_code = 'en'\"\n . \" WHERE 1 AND b.country LIKE '%Andorra%'\",\n 'total_query' => \"SELECT a.code, a.code_A3, a.code_N3, a.status, a.region, b.country\"\n . \" FROM ?:countries as a\"\n . \" LEFT JOIN ?:country_descriptions as b ON b.code = a.code AND b.lang_code = 'en'\"\n . \" WHERE 1 AND b.country LIKE '%Andorra%' ORDER BY b.country LIMIT 0, 1\"\n )\n );\n }", "title": "" }, { "docid": "4a2f9bedd4795958b72dead8766a2a12", "score": "0.6356568", "text": "public static function getCountryData() {\n return DB::query(\"SELECT c.id,group_concat(cc.country_name order by cc.lang_id) as countryName FROM \" . CFG::$tblPrefix . \"country as c, \" . CFG::$tblPrefix . \"country_content as cc where c.id=cc.country_id group by id\");\n }", "title": "" }, { "docid": "472fb415d88379d33471acc29e4eb1e0", "score": "0.6353103", "text": "function country($id = null) {\n\n $country = $this->Country->find('all', array(\n 'fields' => 'name',\n 'conditions' => array('Country.id' => $id)\n ));\n\n $country_list = array_shift($country);\n $this->set('country', $country_list);\n $this->set('regions_count', count($country_list['Region']));\n }", "title": "" }, { "docid": "0d63520b3ff812028887b12f7d31683b", "score": "0.6351187", "text": "function GetCountries() \n {\n\tglobal $user_id;\n\t$response = array();\n\t$db = new DbHandler();\n\n\t// fetching all countries\n\t$result = $db->getAllCountries();\n\t$num_rows = $result->num_rows;\n\n\t$response[\"error\"] = false;\n\t$response[\"countries\"] = array();\n\n\t// looping through result and preparing country array\n\tif ($num_rows > 0) //if data exist\n\t{\n\t\twhile ($country = $result->fetch_assoc()) {\n\t\t\t$tmp = array();\n\t\t\t$tmp[\"country_id\"] = $country[\"country_id\"];\n\t\t\t$tmp[\"country_name\"] = $country[\"country_name\"];\n\t\t\t$tmp[\"updated_on\"] = $country[\"updated_on\"];\n\t\t\t$tmp[\"updated_by\"] = $country[\"updated_by\"];\n\t\t\tarray_push($response[\"countries\"], $tmp);\n\t\t}\n\t}\n\telse\n\t{\n\t\t$response[\"error\"] = true;\n\t\t$response[\"message\"] = \"No Result Found.\";\n\t}\n\n\techoResponse(200, $response);\n }", "title": "" }, { "docid": "0dcf6bce09c3f0f20204b56a1d5ab662", "score": "0.63352686", "text": "public function Country_getCountries()\n\t{\n\t\treturn $this->db->select('*')\n\t\t\t\t\t\t->where($this->table . '_type', 'COUNTRY')\n\t\t\t\t\t\t->from($this->table)\n\t\t\t\t\t\t->order_by($this->table . '_label_fr')\n\t\t\t\t\t\t->get()\n\t\t\t\t\t\t->result_array();\n\t}", "title": "" }, { "docid": "018ba406c48a446d38dc39cd5435312e", "score": "0.6334839", "text": "public static function processCountrys ( ) \n\t{\n\t try {\n\t\t\t\treturn self::$_COUNTRIES; \n\t\t\t} catch ( Exception $e ) {\n\t\t\treturn null; \n\t\t } \n\t}", "title": "" }, { "docid": "65b2b3c7d556eba59182f977d0d9c582", "score": "0.63013655", "text": "static function selectCountryList($db_conn)\n {\n $query = \"select distinct\" . self::COUNTRYNAME_COL . \", countryid from country order by countryid \";\n return self::execute_SELECT_query_and_return($db_conn, $query);\n }", "title": "" }, { "docid": "275f3ba55bb5f6698f5376a2e03cee89", "score": "0.63000035", "text": "function countryList() {\n try {\n $pdo = new PDO(DBCONNSTRING,DBUSER,DBPASS);\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n $sql\t=\t\"SELECT imagedetails.CountryCodeISO, CountryName, ISO FROM imagedetails INNER JOIN countries ON imagedetails.CountryCodeISO = countries.ISO GROUP BY CountryName\";\n $result\t=\t$pdo->query($sql);\n while\t($row\t=\t$result->fetch())\t{\n echo '<option\tvalue=\"' . $row['ISO'] . '\">' . $row['CountryName'] . '</option>';\t\t\t\t\t\t\t\t \n }\n $pdo = null;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}", "title": "" }, { "docid": "e7cae008a3cc731a35a00bc9f28ded89", "score": "0.6284911", "text": "public function getCountries(){\n if(request()->searchTerm){\n $countries = Country::where('name','LIKE','%'.request()->searchTerm.'%')->get();\n }\n else{\n $countries = Country::get();\n }\n # States Found\n return response()->json([\n\t \"status\" => \"success\",\n\t \"message\" => trans('messages.country_found_success'),\n\t \"countries\" => $countries\n\t ],200,[],JSON_NUMERIC_CHECK\n\t );\n }", "title": "" }, { "docid": "596123fec995f2df508463e5ed9064b9", "score": "0.62638384", "text": "function getAllCountries($connection) {\n try {\n $sql = getCountrySQL() . \" ORDER BY CountryName\";\n $result = runQuery($connection, $sql, null);\n return $result;\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n}", "title": "" }, { "docid": "1363c9c3713906fce60fa8b8ad9ef0a8", "score": "0.62265235", "text": "public function getCountriesList()\n {\n $modelPlaceCountry = PlaceCountry::find()->asArray()->all();\n $countriesArray = ArrayHelper::map($modelPlaceCountry,\n 'iso2',\n function($modelPlaceCountry, $defaultValue) {\n return Yii::t('app', $modelPlaceCountry['short_name']).' +'.$modelPlaceCountry['calling_code'];\n }\n );\n\n return $countriesArray;\n }", "title": "" }, { "docid": "1f8656f4f74f82e473dd35f16cb80b97", "score": "0.62240595", "text": "public function testCountryEmpty()\n\t{\n\t\t$codes = ['',\n\t\t null];\n\n\t\tforeach ($codes as $code) {\n\t\t\t$b = new Builder();\n\t\t\t$b->country($code);\n\t\t\t$this->assertEquals('', $this->getProtectedMember($b, 'country_code'));\n\t\t}\n\t}", "title": "" }, { "docid": "57905d64d983c2564e250debb6576227", "score": "0.6216494", "text": "public function getShippingCountries() {\r\n $countryArray = array();\r\n\r\n $countryList = Mage::getModel('directory/country')->getResourceCollection()\r\n ->loadByStore()\r\n ->toOptionArray(true);\r\n foreach ($countryList as $country) {\r\n if ($country['label'] == '' || $country['value'] == '')\r\n continue;\r\n $c = array(\r\n \"name\" => $country['label'],\r\n \"code\" => $country['value'],\r\n \"states\" => $this->getStatesOfCountry($country['value']),\r\n );\r\n $countryArray[] = $c;\r\n }\r\n $this->_JSONencodeAndRespond($countryArray, \"200 OK\");\r\n return;\r\n }", "title": "" }, { "docid": "37cf695aba4935b1873f593f72b1fa73", "score": "0.61941385", "text": "public function getGenericCountry();", "title": "" }, { "docid": "a71a2d6ac51e6b8eb4faaa006c2030b7", "score": "0.6188886", "text": "function countries($id = false) {\n\n\t\tif(!cache()->value(\"countries\")) {\n\n\t\t\t$query = new Query();\n\t\t\t$query->sql(\"SELECT * FROM \".UT_COUNTRIES);\n\t\t\tcache()->value(\"countries\", $query->results());\n\t\t}\n\n\t\t// looking for specific country details\n\t\tif($id !== false) {\n\t\t\t$countries = cache()->value(\"countries\");\n\t\t\t$key = arrayKeyValue($countries, \"id\", $id);\n\t\t\tif($key !== false) {\n\t\t\t\treturn $countries[$key];\n\t\t\t}\n\t\t\t// invalid country requested - return default country\n\t\t\telse {\n\t\t\t\t$key = arrayKeyValue($countries, \"id\", $this->country());\n\t\t\t\treturn $countries[$key];\n\t\t\t}\n\t\t}\n\t\t// return complete array of countries\n\t\telse {\n\t\t\treturn cache()->value(\"countries\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "a76e7d1da8a4fae23d57a55c4c9a4e06", "score": "0.6186108", "text": "public function fetchAllAustraliaStates(){\n\t\tApp::import('Model', 'State');\n\t\t$this->State = new State();\n\t\t$ret = '';\n\n\t\t$stateArr = $this->State->find('list', array('fields'=>array('State.id', 'State.state')));\n\t\tif(!empty($stateArr))\n\t\t\t$ret = $stateArr;\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "0d176af62412a206abd9f5112e5ed061", "score": "0.6185488", "text": "function get_country(){\n return $this->db->select('country_id,name')->get('country')->result();\n }", "title": "" }, { "docid": "3fa27775a2e8461a752342a512accca7", "score": "0.6184779", "text": "public function listRegions($country = '%%%%', $zero = \">\", $order = \"region_name ASC\")\n {\n $key = md5(osc_base_url().(string)$country.(string)$zero.(string)$order);\n $found = null;\n $cache = osc_cache_get($key, $found);\n if($cache===false) {\n $order_split = explode(' ', $order);\n\n $this->dao->from( DB_TABLE_PREFIX.'t_region , '.$this->getTableName() );\n $this->dao->where( $this->getTableName().'.fk_i_region_id = '.DB_TABLE_PREFIX.'t_region.pk_i_id' );\n\n if( $order_split[0] == 'region_name' ) {\n $this->dao->select('STRAIGHT_JOIN '.$this->getTableName().'.fk_i_region_id as region_id, '.$this->getTableName().'.i_num_items as items, '.DB_TABLE_PREFIX.'t_region.s_name as region_name, '.DB_TABLE_PREFIX.'t_region.s_slug as region_slug');\n } else if( $order_split[0] == 'items') {\n $this->dao->select($this->getTableName().'.fk_i_region_id as region_id, '.$this->getTableName().'.i_num_items as items, '.DB_TABLE_PREFIX.'t_region.s_name as region_name');\n }\n\n $this->dao->where('i_num_items '.$zero.' 0' );\n if( $country != '%%%%') {\n $this->dao->where(DB_TABLE_PREFIX.'t_region.fk_c_country_code = \\''.$this->dao->connId->real_escape_string($country).'\\' ');\n }\n $this->dao->orderBy($order);\n\n $rs = $this->dao->get();\n\n if($rs === false) {\n return array();\n }\n $return = $rs->result();\n osc_cache_set($key, $return, OSC_CACHE_TTL);\n return $return;\n } else {\n return $cache;\n }\n\n }", "title": "" }, { "docid": "8fd7d0ee0b5516be82855d43c1aed572", "score": "0.6157571", "text": "function tep_get_country_list($name, $selected = '', $parameters = '') {\n $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));\n $countries = tep_get_countries('',true);\n\n for ($i=0, $n=sizeof($countries); $i<$n; $i++) {\n $countries_array[] = array('id' => $countries[$i]['countries_id'], \n\t \t\t\t\t\t\t\t 'text' => $countries[$i]['countries_name'],\n\t\t\t\t\t\t\t\t 'extra' => \"rel-isocode='\".$countries[$i]['countries_iso_code_2'].\"'\"\n\t\t\t\t\t\t\t\t );\n }\n\t\n return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);\n }", "title": "" }, { "docid": "8ff0a42bc1ca55a3e7e8c53ddd3a8ce4", "score": "0.61468035", "text": "public function __construct() {\n $this->countries = Country::getCountryDropdownList();\n }", "title": "" }, { "docid": "b219894f55660bbed37730e72616214d", "score": "0.614401", "text": "function getCountries()\n {\n $method = $this->newMethod(__FUNCTION__);\n return $this->call($method);\n }", "title": "" }, { "docid": "acd03bdcfe957721be6dff127c4d585f", "score": "0.6140768", "text": "public function callCountries(array $params = array());", "title": "" }, { "docid": "cbd7cd72cb1c889a18a57dbeee16cf7b", "score": "0.6138186", "text": "function get_all_countries()\n{\n $CI = & get_instance();\n return $CI->db->get('tblcountries')->result_array();\n}", "title": "" }, { "docid": "7bc29f1f5a633697b18cf20dd6229b03", "score": "0.61333084", "text": "function get_all_states()\n {\n $iCountryId = $this->uri->segment(3);\n $states = $this->state_model->get_states($iCountryId);\n $options = '';\n if(count($states) > 0)\n {\n for($i=0;$i<count($states);$i++)\n {\n $options .= '<option value=\"'.$states[$i]['iStateId'].'\">'.$states[$i]['vState'].'</option>';\n } \n }\n else\n {\n $options .= '<option value=\"\">-- Select State--</option>';\n }\n \n $json_lang = json_encode($options); \n print $json_lang;\n exit;\n }", "title": "" }, { "docid": "2037effd08db2086ff5f465cf2b9bf6a", "score": "0.6133199", "text": "static public function getCountriesList()\n\t{\n\t\tstatic $countriesList = null;\n\t\tif(is_null($countriesList))\n\t\t{\n\t\t\trequire_once \"DataFiles/Countries.php\";\n\t\t\t$countriesList = array_keys($GLOBALS['Piwik_CountryList']);\n\t\t}\n\t\treturn $countriesList;\n\t}", "title": "" }, { "docid": "92fec9aee640968677a37214cf395613", "score": "0.6103714", "text": "public function getAllCountriesListData()\n {\n $countries = $this->getAllCountries();\n\n return \\CHtml::listData($countries, 'id', 'name');\n }", "title": "" }, { "docid": "3b724bf1667abdbc2671160498d25d89", "score": "0.6100514", "text": "private function getCountryDetails()\n {\n if ($this->get_request_method() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int) $this->_request['regionid'];\n if ($id > 0) {\n $query = \"SELECT id as clientcountryid,name FROM countries WHERE region_id='$id'\";\n $r = $this->mysqli->query($query) or die($this->mysqli->error . __LINE__);\n if ($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n }\n $this->response($this->json($result), 200); // send user details\n }\n }\n $this->response('', 204); // If no records \"No Content\" status\n }", "title": "" }, { "docid": "15c55381cb238f1e32aebafa045bf8dc", "score": "0.61003554", "text": "function initCountries()\t{\r\n\r\n\t\t$names = array();\r\n\t\tif($this->typoVersion >= 3006000) {\r\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('cn_iso_3, cn_short_en', 'static_countries', '1=1');\r\n\t\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))\t{\r\n\t\t\t\t$names[$row['cn_iso_3']] = $this->pi_getLL('country_'.$row['cn_iso_3']);\r\n\t\t\t\tif( !$names[$row['cn_iso_3']] ) { $names[$row['cn_iso_3']] = $GLOBALS['TSFE']->csConv($row['cn_short_en'], $this->staticInfoCharset); }\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$query = 'SELECT cn_iso_3, cn_short_en'.' '.\r\n\t\t\t\t'FROM static_countries'.' '.\r\n\t\t\t\t'WHERE 1=1'.' ';\r\n\t\t\t$res = mysql(TYPO3_db,$query);\r\n\t\t\techo mysql_error();\r\n\t\t\twhile($row = mysql_fetch_assoc($res))\t{\r\n\t\t\t\t$names[$row['cn_iso_3']] = $this->pi_getLL('country_'.$row['cn_iso_3']);\r\n\t\t\t\tif( !$names[$row['cn_iso_3']] ) { $names[$row['cn_iso_3']] = $row['cn_short_en']; }\r\n\t\t\t}\r\n\t\t}\r\n\t\tuasort($names, 'strcoll');\r\n\t\treturn $names;\r\n\t}", "title": "" }, { "docid": "4ab1d169e5ef51ff639d3fba6f1f18d1", "score": "0.60977423", "text": "public static function getCountriesList(){\n $db = Database::getDB();\n $query = \"SELECT DISTINCT job_country FROM job_board \"\n . \"ORDER BY job_country\";\n $stm = $db->prepare($query);\n $stm->execute();\n $result = $stm->fetchAll(PDO::FETCH_ASSOC);\n $countries = array();\n foreach ($result as $row) {\n $countries[] = $row['job_country'];\n }\n\n return $countries;\n \n }", "title": "" }, { "docid": "bed9a34a85bc4b98f8f5bbd350ee198c", "score": "0.60869133", "text": "public function index()\n {\n return Country::orderBy('name')->paginate(10);\n }", "title": "" }, { "docid": "04a106923e9bf665f786c259f13cb379", "score": "0.6078856", "text": "function getCountryCodes() {\r\n\t\t// import the country DB\r\n\t\t$countryCode = array();\r\n\t\tApp::import(\"Model\",\"Country\");\r\n\t\t$this->Country=& new Country();\r\n\t\t$countryCode = $this->Country->find('list', array('conditions'=>array('Country.status'=>'1'), 'fields'=>array('Country.id','Country.country_code')));\r\n\t\treturn $countryCode;\r\n\t}", "title": "" }, { "docid": "3b683f14a02b9465c90cb202a96798cb", "score": "0.6076531", "text": "public function testgetCountryByIdWhenBlankValueAsParameter()\n {\n \t$bResult = Doctrine::getTable('Model_Country')->getCountryById('');\n \t$this->assertFalse($bResult,\"Records not found because pass blank value as a parameter\");\n }", "title": "" }, { "docid": "e3211ccf0125770e0e84b6ca4dced3f9", "score": "0.6069239", "text": "function getStatecountry_get(){\n\t\t$country_id = $this->get('country_id');\n\t\t$data['state'] = $this->host_model->extractStateCountry($country_id);\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "de29399ae881cb08c667b0191014c5d9", "score": "0.6068913", "text": "public function getDefaultCountry(): string|null;", "title": "" }, { "docid": "93672a2168f0f2113d3ed84b8959a227", "score": "0.6065978", "text": "public function fetchStateList()\n\t{\n\t\t$country_id = $this->input->post(\"country_id\");\n\t\t$states = $this->AFM->fetchStateList($country_id);\n\t\techo json_encode($states);\n\t\tdie();\n\t}", "title": "" }, { "docid": "33cb50296999edb5fce205560ac7bdbd", "score": "0.6065591", "text": "function getCountryList(){\n// <start>\n global $dbConn;\n $rs='';\n $Query = \"select `code`,`name`,`full_name` from cms_countries\";\n// $Result = db_query($Query);\n $select = $dbConn->prepare($Query);\n $Result = $select->execute();\n $row = $select->fetchAll();\n// while($row = db_fetch_array($Result)){\n foreach($row as $row_item){\n $rs[] = array('code'=> $row_item['code'],'name'=>$row_item['name'],'full_name'=>$row_item['full_name']);\n }\n return $rs;\n// Changed by Anthony Malak 13-05-2015 to PDO database\n// <end>\n}", "title": "" }, { "docid": "ab7dffd88579300222622c51c5210554", "score": "0.60647297", "text": "public function get_countries() {\n\t\treturn TariffCodeCountryQuery::create()->filterByCode($this->code)->find();\n\t}", "title": "" }, { "docid": "0f05bca6f231ca0cbcf07db4026b8034", "score": "0.603317", "text": "public function getCountry(){\n $pays = $_GET['pays'];\n\n $requete = $this->connexion->prepare(\"SELECT *, d.id as id_Code\n FROM daydata as d\n LEFT JOIN country as c\n ON d.code = c.code\n WHERE c.name = :pays\n ORDER BY Date DESC\");\n $requete->bindParam(':pays', $pays);\n $result = $requete->execute();\n $country = $requete->fetchAll(PDO::FETCH_ASSOC);\n return $country;\n }", "title": "" }, { "docid": "2760ae44b1cb83759ce049002c318269", "score": "0.603197", "text": "public function countrydetails()\n {\n ## fields_projection code added to support LAMP 7.0 and its mongo version 3.4.0\n $options=[\n 'projection'=>[\n '_id'=>1,\n 'country_name'=>1\n ]\n ];\n $result = $this->mongo_db->find(MDB_CSC, ['country_status' => 'A'],$options);\n $res = $result;\n $data = array();\n if(count($res) > 0){\n foreach($res as $val){\n $arr = $val;\n $arr['country_id'] = $val['_id'];\n $data[] = $arr;\n }\n }\n return $data;\n\n\n }", "title": "" }, { "docid": "83d783d61ade37d4108329c0d7c1cd06", "score": "0.6025084", "text": "public function getCountriesAction()\n {\n Configuration::setUICountryCode($this->getLocale());\n $warehouseController = new WarehouseController();\n\n $this->View()->assign('response', Response::dtoEntitiesResponse($warehouseController->getWarehouseCountries()));\n }", "title": "" }, { "docid": "9b13b0f95dab60d335100000e629251b", "score": "0.6006932", "text": "public function getCountries()\n {\n $client = new Client([ \n 'base_uri' => 'https://countriesnow.space/api/v0.1/', \n \n // You can set any number of default request options.\n 'timeout' => 10.0,\n ]);\n \n $response = $client->request('GET', 'countries');\n \n $countriesData = json_decode($response->getBody()->getContents());\n \n $countries = array_map(\n function ($country) {\n return $country->country;\n },\n $countriesData->data\n );\n \n return $countries;\n }", "title": "" }, { "docid": "d9241be86169d695c30a5d0e4d3809b3", "score": "0.6005683", "text": "public function LocationCitiesFetching($CountryCode)\n {\n // $Aramex_Countries = $Obj_Aramex->LocationCitiesFetching($CountryCode);\n // return $Aramex_Countries ;\n if( $CountryCode == 'JO')\n {\n return json_encode([\n 'Al Fanadik', 'Al Hashmyeh', 'Al Jafer', 'Al Omari Borders',\n 'Al Qaser', 'Al Qastal', 'Al Rosaifa', 'Al Sukhneh', 'Bereian',\n 'Der Allah', 'Free Zone', 'Ghour Al Safi', 'Ghweria', 'Maean',\n 'Moatah', 'Moghayam Hetein', 'Rashadyeh', 'Theban', 'Yajoz',\n \"Zarqa' Al Jadedeh\" \n ]);\n }\n else {\n return json_encode([ '' => 'only jordon is available' ]);\n }\n }", "title": "" }, { "docid": "02491584b2bd3e8ec712047a1ef8da51", "score": "0.60005873", "text": "public static function getISOCountryList()\n {\n $iclISOCountryList = new ISOCountryList();\n $iclISOCountryList->add(826, 'United Kingdom', 'GBR', 3, 'GB');\n $iclISOCountryList->add(840, 'United States', 'USA', 2, 'US');\n $iclISOCountryList->add(36, 'Australia', 'AUS', 1, '');\n $iclISOCountryList->add(124, 'Canada', 'CAN', 1, '');\n $iclISOCountryList->add(250, 'France', 'FRA', 1, '');\n $iclISOCountryList->add(276, 'Germany', 'DEU', 1, '');\n $iclISOCountryList->add(4, 'Afghanistan', 'AFG', 0, '');\n $iclISOCountryList->add(248, 'Aland Islands', 'ALA', 0, '');\n $iclISOCountryList->add(8, 'Albania', 'ALB', 0, '');\n $iclISOCountryList->add(12, 'Algeria', 'DZA', 0, '');\n $iclISOCountryList->add(16, 'American Samoa', 'ASM', 0, '');\n $iclISOCountryList->add(20, 'Andorra', 'AND', 0, '');\n $iclISOCountryList->add(24, 'Angola', 'AGO', 0, '');\n $iclISOCountryList->add(660, 'Anguilla', 'AIA', 0, '');\n $iclISOCountryList->add(10, 'Antarctica', 'ATA', 0, '');\n $iclISOCountryList->add(28, 'Antigua and Barbuda', 'ATG', 0, '');\n $iclISOCountryList->add(32, 'Argentina', 'ARG', 0, '');\n $iclISOCountryList->add(51, 'Armenia', 'ARM', 0, '');\n $iclISOCountryList->add(533, 'Aruba', 'ABW', 0, '');\n $iclISOCountryList->add(40, 'Austria', 'AUT', 0, '');\n $iclISOCountryList->add(31, 'Azerbaijan', 'AZE', 0, '');\n $iclISOCountryList->add(44, 'Bahamas', 'BHS', 0, '');\n $iclISOCountryList->add(48, 'Bahrain', 'BHR', 0, '');\n $iclISOCountryList->add(50, 'Bangladesh', 'BGD', 0, '');\n $iclISOCountryList->add(52, 'Barbados', 'BRB', 0, '');\n $iclISOCountryList->add(112, 'Belarus', 'BLR', 0, '');\n $iclISOCountryList->add(56, 'Belgium', 'BEL', 0, '');\n $iclISOCountryList->add(84, 'Belize', 'BLZ', 0, '');\n $iclISOCountryList->add(204, 'Benin', 'BEN', 0, '');\n $iclISOCountryList->add(60, 'Bermuda', 'BMU', 0, '');\n $iclISOCountryList->add(64, 'Bhutan', 'BTN', 0, '');\n $iclISOCountryList->add(68, 'Bolivia', 'BOL', 0, '');\n $iclISOCountryList->add(70, 'Bosnia and Herzegovina', 'BIH', 0, '');\n $iclISOCountryList->add(72, 'Botswana', 'BWA', 0, '');\n $iclISOCountryList->add(74, 'Bouvet Island', 'BVT', 0, '');\n $iclISOCountryList->add(76, 'Brazil Federative', 'BRA', 0, '');\n $iclISOCountryList->add(\n 86,\n 'British Indian Ocean Territory',\n 'IOT',\n 0,\n ''\n );\n $iclISOCountryList->add(96, 'Brunei', 'BRN', 0, '');\n $iclISOCountryList->add(100, 'Bulgaria', 'BGR', 0, '');\n $iclISOCountryList->add(854, 'Burkina Faso', 'BFA', 0, '');\n $iclISOCountryList->add(108, 'Burundi', 'BDI', 0, '');\n $iclISOCountryList->add(116, 'Cambodia', 'KHM', 0, '');\n $iclISOCountryList->add(120, 'Cameroon', 'CMR', 0, '');\n $iclISOCountryList->add(132, 'Cape Verde', 'CPV', 0, '');\n $iclISOCountryList->add(136, 'Cayman Islands', 'CYM', 0, '');\n $iclISOCountryList->add(140, 'Central African Republic', 'CAF', 0, '');\n $iclISOCountryList->add(148, 'Chad', 'TCD', 0, '');\n $iclISOCountryList->add(152, 'Chile', 'CHL', 0, '');\n $iclISOCountryList->add(156, 'China', 'CHN', 0, '');\n $iclISOCountryList->add(162, 'Christmas Island', 'CXR', 0, '');\n $iclISOCountryList->add(166, 'Cocos (Keeling) Islands', 'CCK', 0, '');\n $iclISOCountryList->add(170, 'Colombia', 'COL', 0, '');\n $iclISOCountryList->add(174, 'Comoros', 'COM', 0, '');\n $iclISOCountryList->add(180, 'Congo', 'COD', 0, '');\n $iclISOCountryList->add(178, 'Congo', 'COG', 0, '');\n $iclISOCountryList->add(184, 'Cook Islands', 'COK', 0, '');\n $iclISOCountryList->add(188, 'Costa Rica', 'CRI', 0, '');\n $iclISOCountryList->add(384, \"Cote d'Ivoire\", 'CIV', 0, '');\n $iclISOCountryList->add(191, 'Croatia', 'HRV', 0, '');\n $iclISOCountryList->add(192, 'Cuba', 'CUB', 0, '');\n $iclISOCountryList->add(196, 'Cyprus', 'CYP', 0, '');\n $iclISOCountryList->add(203, 'Czech Republic', 'CZE', 0, '');\n $iclISOCountryList->add(208, 'Denmark', 'DNK', 0, '');\n $iclISOCountryList->add(262, 'Djibouti', 'DJI', 0, '');\n $iclISOCountryList->add(212, 'Dominica', 'DMA', 0, '');\n $iclISOCountryList->add(214, 'Dominican Republic', 'DOM', 0, '');\n $iclISOCountryList->add(626, 'East Timor', 'TMP', 0, '');\n $iclISOCountryList->add(218, 'Ecuador', 'ECU', 0, '');\n $iclISOCountryList->add(818, 'Egypt', 'EGY', 0, '');\n $iclISOCountryList->add(222, 'El Salvador', 'SLV', 0, '');\n $iclISOCountryList->add(226, 'Equatorial Guinea', 'GNQ', 0, '');\n $iclISOCountryList->add(232, 'Eritrea', 'ERI', 0, '');\n $iclISOCountryList->add(233, 'Estonia', 'EST', 0, '');\n $iclISOCountryList->add(231, 'Ethiopia', 'ETH', 0, '');\n $iclISOCountryList->add(\n 238,\n 'Falkland Islands (Malvinas)',\n 'FLK',\n 0,\n ''\n );\n $iclISOCountryList->add(234, 'Faroe Islands', 'FRO', 0, '');\n $iclISOCountryList->add(242, 'Fiji', 'FJI', 0, '');\n $iclISOCountryList->add(246, 'Finland', 'FIN', 0, '');\n $iclISOCountryList->add(254, 'French Guiana', 'GUF', 0, '');\n $iclISOCountryList->add(258, 'French Polynesia', 'PYF', 0, '');\n $iclISOCountryList->add(\n 260,\n 'French Southern Territories',\n 'ATF',\n 0,\n ''\n );\n $iclISOCountryList->add(266, 'Gabon', 'GAB', 0, '');\n $iclISOCountryList->add(270, 'Gambia', 'GMB', 0, '');\n $iclISOCountryList->add(268, 'Georgia', 'GEO', 0, '');\n $iclISOCountryList->add(288, 'Ghana', 'GHA', 0, '');\n $iclISOCountryList->add(292, 'Gibraltar', 'GIB', 0, '');\n $iclISOCountryList->add(300, 'Greece', 'GRC', 0, '');\n $iclISOCountryList->add(304, 'Greenland', 'GRL', 0, '');\n $iclISOCountryList->add(308, 'Grenada', 'GRD', 0, '');\n $iclISOCountryList->add(312, 'Guadaloupe', 'GLP', 0, '');\n $iclISOCountryList->add(316, 'Guam', 'GUM', 0, '');\n $iclISOCountryList->add(320, 'Guatemala', 'GTM', 0, '');\n $iclISOCountryList->add(831, 'Guernsey', 'GGY', 0, '');\n $iclISOCountryList->add(324, 'Guinea', 'GIN', 0, '');\n $iclISOCountryList->add(624, 'Guinea-Bissau', 'GNB', 0, '');\n $iclISOCountryList->add(328, 'Guyana', 'GUY', 0, '');\n $iclISOCountryList->add(332, 'Haiti', 'HTI', 0, '');\n $iclISOCountryList->add(\n 334,\n 'Heard Island and McDonald Islands',\n 'HMD',\n 0,\n ''\n );\n $iclISOCountryList->add(340, 'Honduras', 'HND', 0, '');\n $iclISOCountryList->add(344, 'Hong Kong', 'HKG', 0, '');\n $iclISOCountryList->add(348, 'Hungary', 'HUN', 0, '');\n $iclISOCountryList->add(352, 'Iceland', 'ISL', 0, '');\n $iclISOCountryList->add(356, 'India', 'IND', 0, '');\n $iclISOCountryList->add(360, 'Indonesia', 'IDN', 0, '');\n $iclISOCountryList->add(364, 'Iran', 'IRN', 0, '');\n $iclISOCountryList->add(368, 'Iraq', 'IRQ', 0, '');\n $iclISOCountryList->add(372, 'Ireland', 'IRL', 0, '');\n $iclISOCountryList->add(833, 'Isle of Man', 'IMN', 0, '');\n $iclISOCountryList->add(376, 'Israel', 'ISR', 0, '');\n $iclISOCountryList->add(380, 'Italy', 'ITA', 0, '');\n $iclISOCountryList->add(388, 'Jamaica', 'JAM', 0, '');\n $iclISOCountryList->add(392, 'Japan', 'JPN', 0, '');\n $iclISOCountryList->add(832, 'Jersey', 'JEY', 0, '');\n $iclISOCountryList->add(400, 'Jordan', 'JOR', 0, '');\n $iclISOCountryList->add(398, 'Kazakhstan', 'KAZ', 0, '');\n $iclISOCountryList->add(404, 'Kenya', 'KEN', 0, '');\n $iclISOCountryList->add(296, 'Kiribati', 'KIR', 0, '');\n $iclISOCountryList->add(410, 'Korea', 'KOR', 0, '');\n $iclISOCountryList->add(408, 'Korea', 'PRK', 0, '');\n $iclISOCountryList->add(414, 'Kuwait', 'KWT', 0, '');\n $iclISOCountryList->add(417, 'Kyrgyzstan', 'KGZ', 0, '');\n $iclISOCountryList->add(418, 'Lao', 'LAO', 0, '');\n $iclISOCountryList->add(428, 'Latvia', 'LVA', 0, '');\n $iclISOCountryList->add(422, 'Lebanon', 'LBN', 0, '');\n $iclISOCountryList->add(426, 'Lesotho', 'LSO', 0, '');\n $iclISOCountryList->add(430, 'Liberia', 'LBR', 0, '');\n $iclISOCountryList->add(434, 'Libyan Arab Jamahiriya', 'LBY', 0, '');\n $iclISOCountryList->add(438, 'Liechtenstein', 'LIE', 0, '');\n $iclISOCountryList->add(440, 'Lithuania', 'LTU', 0, '');\n $iclISOCountryList->add(442, 'Luxembourg', 'LUX', 0, '');\n $iclISOCountryList->add(446, 'Macau', 'MAC', 0, '');\n $iclISOCountryList->add(807, 'Macedonia', 'MKD', 0, '');\n $iclISOCountryList->add(450, 'Madagascar', 'MDG', 0, '');\n $iclISOCountryList->add(454, 'Malawi', 'MWI', 0, '');\n $iclISOCountryList->add(458, 'Malaysia', 'MYS', 0, '');\n $iclISOCountryList->add(462, 'Maldives', 'MDV', 0, '');\n $iclISOCountryList->add(466, 'Mali', 'MLI', 0, '');\n $iclISOCountryList->add(470, 'Malta', 'MLT', 0, '');\n $iclISOCountryList->add(584, 'Marshall Islands', 'MHL', 0, '');\n $iclISOCountryList->add(474, 'Martinique', 'MTQ', 0, '');\n $iclISOCountryList->add(478, 'Mauritania Islamic', 'MRT', 0, '');\n $iclISOCountryList->add(480, 'Mauritius', 'MUS', 0, '');\n $iclISOCountryList->add(175, 'Mayotte', 'MYT', 0, '');\n $iclISOCountryList->add(484, 'Mexico', 'MEX', 0, '');\n $iclISOCountryList->add(583, 'Micronesia', 'FSM', 0, '');\n $iclISOCountryList->add(498, 'Moldova', 'MDA', 0, '');\n $iclISOCountryList->add(492, 'Monaco', 'MCO', 0, '');\n $iclISOCountryList->add(496, 'Mongolia', 'MNG', 0, '');\n $iclISOCountryList->add(499, 'Montenegro', 'MNE', 0, '');\n $iclISOCountryList->add(500, 'Montserrat', 'MSR', 0, '');\n $iclISOCountryList->add(504, 'Morocco', 'MAR', 0, '');\n $iclISOCountryList->add(508, 'Mozambique', 'MOZ', 0, '');\n $iclISOCountryList->add(104, 'Myanmar', 'MMR', 0, '');\n $iclISOCountryList->add(516, 'Namibia', 'NAM', 0, '');\n $iclISOCountryList->add(520, 'Nauru', 'NRU', 0, '');\n $iclISOCountryList->add(524, 'Nepal', 'NPL', 0, '');\n $iclISOCountryList->add(528, 'Netherlands', 'NLD', 0, '');\n $iclISOCountryList->add(530, 'Netherlands Antilles', 'ANT', 0, '');\n $iclISOCountryList->add(540, 'New Caledonia', 'NCL', 0, '');\n $iclISOCountryList->add(554, 'New Zealand', 'NZL', 0, '');\n $iclISOCountryList->add(558, 'Nicaragua', 'NIC', 0, '');\n $iclISOCountryList->add(562, 'Niger', 'NER', 0, '');\n $iclISOCountryList->add(566, 'Nigeria', 'NGA', 0, '');\n $iclISOCountryList->add(570, 'Niue', 'NIU', 0, '');\n $iclISOCountryList->add(574, 'Norfolk Island', 'NFK', 0, '');\n $iclISOCountryList->add(580, 'Northern Mariana Islands', 'MNP', 0, '');\n $iclISOCountryList->add(578, 'Norway', 'NOR', 0, '');\n $iclISOCountryList->add(512, 'Oman', 'OMN', 0, '');\n $iclISOCountryList->add(586, 'Pakistan', 'PAK', 0, '');\n $iclISOCountryList->add(585, 'Palau', 'PLW', 0, '');\n $iclISOCountryList->add(275, 'Palestine', 'PSE', 0, '');\n $iclISOCountryList->add(591, 'Panama', 'PAN', 0, '');\n $iclISOCountryList->add(598, 'Papua New Guinea', 'PNG', 0, '');\n $iclISOCountryList->add(600, 'Paraguay', 'PRY', 0, '');\n $iclISOCountryList->add(604, 'Peru', 'PER', 0, '');\n $iclISOCountryList->add(608, 'Philippines', 'PHL', 0, '');\n $iclISOCountryList->add(612, 'Pitcairn', 'PCN', 0, '');\n $iclISOCountryList->add(616, 'Poland', 'POL', 0, '');\n $iclISOCountryList->add(620, 'Portugal', 'PRT', 0, '');\n $iclISOCountryList->add(630, 'Puerto Rico', 'PRI', 0, '');\n $iclISOCountryList->add(634, 'Qatar', 'QAT', 0, '');\n $iclISOCountryList->add(638, 'Reunion', 'REU', 0, '');\n $iclISOCountryList->add(642, 'Romania', 'ROM', 0, '');\n $iclISOCountryList->add(643, 'Russian Federation', 'RUS', 0, '');\n $iclISOCountryList->add(646, 'Rwanda', 'RWA', 0, '');\n $iclISOCountryList->add(652, 'Saint Barthelemy', 'BLM', 0, '');\n $iclISOCountryList->add(654, 'Saint Helena', 'SHN', 0, '');\n $iclISOCountryList->add(659, 'Saint Kitts and Nevis', 'KNA', 0, '');\n $iclISOCountryList->add(662, 'Saint Lucia', 'LCA', 0, '');\n $iclISOCountryList->add(\n 663,\n 'Saint Martin (French part)',\n 'MAF',\n 0,\n ''\n );\n $iclISOCountryList->add(666, 'Saint Pierre and Miquelon', 'SPM', 0, '');\n $iclISOCountryList->add(\n 670,\n 'Saint Vincent and the Grenadines',\n 'VCT',\n 0,\n ''\n );\n $iclISOCountryList->add(882, 'Samoa', 'WSM', 0, '');\n $iclISOCountryList->add(674, 'San Marino', 'SMR', 0, '');\n $iclISOCountryList->add(\n 678,\n 'Sao Tome and Principe Democratic',\n 'STP',\n 0,\n ''\n );\n $iclISOCountryList->add(682, 'Saudi Arabia', 'SAU', 0, '');\n $iclISOCountryList->add(686, 'Senegal', 'SEN', 0, '');\n $iclISOCountryList->add(688, 'Serbia', 'SRB', 0, '');\n $iclISOCountryList->add(690, 'Seychelles', 'SYC', 0, '');\n $iclISOCountryList->add(694, 'Sierra Leone', 'SLE', 0, '');\n $iclISOCountryList->add(702, 'Singapore', 'SGP', 0, '');\n $iclISOCountryList->add(703, 'Slovakia', 'SVK', 0, '');\n $iclISOCountryList->add(705, 'Slovenia', 'SVN', 0, '');\n $iclISOCountryList->add(90, 'Solomon Islands', 'SLB', 0, '');\n $iclISOCountryList->add(706, 'Somalia', 'SOM', 0, '');\n $iclISOCountryList->add(710, 'South Africa', 'ZAF', 0, '');\n $iclISOCountryList->add(\n 239,\n 'South Georgia and the South Sandwich Islands',\n 'SGS',\n 0,\n ''\n );\n $iclISOCountryList->add(724, 'Spain', 'ESP', 0, '');\n $iclISOCountryList->add(144, 'Sri Lanka', 'LKA', 0, '');\n $iclISOCountryList->add(736, 'Sudan', 'SDN', 0, '');\n $iclISOCountryList->add(740, 'Suriname', 'SUR', 0, '');\n $iclISOCountryList->add(744, 'Svalbard and Jan Mayen', 'SJM', 0, '');\n $iclISOCountryList->add(748, 'Swaziland', 'SWZ', 0, '');\n $iclISOCountryList->add(752, 'Sweden', 'SWE', 0, '');\n $iclISOCountryList->add(756, 'Switzerland', 'CHE', 0, '');\n $iclISOCountryList->add(760, 'Syrian Arab Republic', 'SYR', 0, '');\n $iclISOCountryList->add(158, 'Taiwan,', 'TWN', 0, '');\n $iclISOCountryList->add(762, 'Tajikistan', 'TJK', 0, '');\n $iclISOCountryList->add(834, 'Tanzania', 'TZA', 0, '');\n $iclISOCountryList->add(764, 'Thailand', 'THA', 0, '');\n $iclISOCountryList->add(768, 'Togo', 'TGO', 0, '');\n $iclISOCountryList->add(772, 'Tokelau', 'TKL', 0, '');\n $iclISOCountryList->add(776, 'Tonga', 'TON', 0, '');\n $iclISOCountryList->add(780, 'Trinidad and Tobago', 'TTO', 0, '');\n $iclISOCountryList->add(788, 'Tunisia', 'TUN', 0, '');\n $iclISOCountryList->add(792, 'Turkey', 'TUR', 0, '');\n $iclISOCountryList->add(795, 'Turkmenistan', 'TKM', 0, '');\n $iclISOCountryList->add(796, 'Turks and Caicos Islands', 'TCA', 0, '');\n $iclISOCountryList->add(798, 'Tuvalu', 'TUV', 0, '');\n $iclISOCountryList->add(800, 'Uganda', 'UGA', 0, '');\n $iclISOCountryList->add(804, 'Ukraine', 'UKR', 0, '');\n $iclISOCountryList->add(784, 'United Arab Emirates', 'ARE', 0, '');\n $iclISOCountryList->add(\n 581,\n 'United States Minor Outlying Islands',\n 'UMI',\n 0,\n ''\n );\n $iclISOCountryList->add(858, 'Uruguay Eastern', 'URY', 0, '');\n $iclISOCountryList->add(860, 'Uzbekistan', 'UZB', 0, '');\n $iclISOCountryList->add(548, 'Vanuatu', 'VUT', 0, '');\n $iclISOCountryList->add(336, 'Vatican City State', 'VAT', 0, '');\n $iclISOCountryList->add(862, 'Venezuela', 'VEN', 0, '');\n $iclISOCountryList->add(704, 'Vietnam', 'VNM', 0, '');\n $iclISOCountryList->add(92, 'Virgin Islands, British', 'VGB', 0, '');\n $iclISOCountryList->add(850, 'Virgin Islands, U.S.', 'VIR', 0, '');\n $iclISOCountryList->add(876, 'Wallis and Futuna', 'WLF', 0, '');\n $iclISOCountryList->add(732, 'Western Sahara', 'ESH', 0, '');\n $iclISOCountryList->add(887, 'Yemen', 'YEM', 0, '');\n $iclISOCountryList->add(894, 'Zambia', 'ZMB', 0, '');\n $iclISOCountryList->add(716, 'Zimbabwe', 'ZWE', 0, '');\n\n return $iclISOCountryList;\n }", "title": "" }, { "docid": "77110f1c023a057d36d4ae7c123fa936", "score": "0.5993505", "text": "public function getAllUsStatesSelectList();", "title": "" }, { "docid": "a1cdf352620e6fd69fbec3893893c54a", "score": "0.59933895", "text": "public function countryserach(){\n\t\tif(!empty($_POST[\"country_id\"])) {\n $keyword = !empty($_POST['country_id']) ? $_POST['country_id']:''\t;\n $where_serach = \"(country_id = \".$keyword.\")\";\n $masteruniversity = $this->commonclass->retrive_records('university','id,universityname',$where_serach,array(\"id\" => \"DESC\"),'');\n\t\t}else{\n\t\t\t$masteruniversity = '';\n\t\t}\n\t\t$university = '';\n\t\t$res = array();\n\t\t$i = 0;\n\n\t\t //Display states list\n\t\t\tif(count($masteruniversity) > 0){\n\t\t\t$university .='<option value=\"\">Select university</option>';\n\t\t\t//fo($row = $query->fetch_assoc()){\n\t\t\tforeach ($masteruniversity as $row) {\n\t\t\t$university .='<option value=\"'.$row['id'].'\">'.$row['universityname'].'</option>';\n\t\t\t}\n\t\t\t}else{\n\t\t\t$university .= '<option value=\"\">university not available</option>';\n }\n\n\t echo $university;\n\t }", "title": "" }, { "docid": "7e816831379f285e204c017069edae6d", "score": "0.59875214", "text": "public function getAllUniqueVendorUsedCountries()\n {\n //return $this->model->vendor();\n //return $this->model->select('vendor_id')->groupBy('vendor_id')->get();\n $vendorUniqueData = $this->model->with(['vendor'])->select('vendor_id')->distinct()->get()->toArray();\n //dd($vendorUniqueData);\n $countryCodes = [];\n foreach($vendorUniqueData as $vid){\n $countryCodes[] = $vid['vendor']['country_code'];\n }\n //dd($countryCodes);\n\n $countries = \\App\\Country::whereIn('code',$countryCodes)->get();\n //lists('country','code');\n\n return $countries;\n \n }", "title": "" }, { "docid": "1adaf5303eb441f3513b80e87a5db4cf", "score": "0.59860516", "text": "public function getCountryCodes(): array\n {\n return $this->getListByUrlCache('countries');\n }", "title": "" }, { "docid": "925c05839b50b717f50fc8cc0a97550b", "score": "0.59832096", "text": "public function getCountryQuery($country)\n {\n\t\t$sql = $this->getQueryContent('SuggestCountryQuery');\n\t\t$params = $this->getQueryParams('SuggestCountryQuery');\n\t\t$sql = $this->bindSqlParams($sql,$params,$country);\n\t\treturn $this->db->fireSqlFetchAll($sql,'SuggestCountryQuery');\n\t}", "title": "" }, { "docid": "295bc1fd5f1b342f7c5b718388eb67c8", "score": "0.59764236", "text": "public static function selectAllBusiness(){\n $pdo = Data::connect();\n $sql = $pdo->prepare(\"SELECT id, ahs_id, name, phone, lat, lng FROM Business WHERE lat !=''\");\n $sql->execute();\n $result = $sql->fetchAll();\n $pdo = null;\n return $result;\n }", "title": "" }, { "docid": "2bbf1db782b66664694f6521445551bb", "score": "0.5975594", "text": "public function actionIndex(){\n\t\t\t$query = Country::find();\n\t\t\t//Select\n\n\t\t\t//Paginazione\n\t\t\t$pagination = new Pagination([\n\t\t\t'defaultPageSize' => 5,\n\t\t\t'totalCount' => $query->count(),\n\t\t\t]);\n\n\t\t\t$countries = $query->orderBy('name')\n\t\t\t\t\t\t\t->offset($pagination->offset)\n\t\t\t\t\t\t\t->limit($pagination->limit)\n\t\t\t\t\t\t\t->all();\n\n\t\t\treturn $this->render('index',[\n\t\t\t\t'countries' => $countries,\n\t\t\t\t'pagination' => $pagination,\n\t\t\t]);\n\n\t\t}", "title": "" }, { "docid": "f427aa4b0cc6d3128be8b041558e7d53", "score": "0.5972356", "text": "public function countryList() {\n //https://restcountries.eu/rest/v1/all\n $json = file_get_contents('data/countries.json');\n $obj = json_decode($json);\n $list = array();\n\n foreach($obj as $c) {\n $list[$c->altSpellings[0]] = [\n \"name\" => $c->name,\n \"short\" => $c->altSpellings[0],\n \"shortSmall\" => strtolower($c->altSpellings[0])\n ];\n }\n return json_decode (json_encode ($list), FALSE);\n }", "title": "" } ]
4a8da6b304821b1e98984aa9118b93db
Minimal config required by the Configuration class
[ { "docid": "3048f19f6a591536a66aa47a4c912c06", "score": "0.0", "text": "private function loadConfig(ContainerBuilder $container, array $config = array())\n {\n $defaultConfig = array(\n 'connections' => array('default' => null),\n );\n\n $extension = new SwarrotExtension();\n\n $extension->load(array($defaultConfig, $config), $container);\n }", "title": "" } ]
[ { "docid": "a1ab41f5a7f28f20a20beab671d1833e", "score": "0.76034355", "text": "public function configuration();", "title": "" }, { "docid": "935d9b0450614efa1be51eb895e15c99", "score": "0.7326978", "text": "abstract public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.7203833", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.7203833", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.7203833", "text": "public function getConfiguration();", "title": "" }, { "docid": "8b9488ac45b46ee54917cfb27223d734", "score": "0.70456517", "text": "private function configurate();", "title": "" }, { "docid": "dad8e69347fc7865305c526d6f70a7a6", "score": "0.69917005", "text": "public function getConfiguration()\n {\n }", "title": "" }, { "docid": "4cc635f052dc6a3a604b45abca5979f0", "score": "0.6827087", "text": "abstract function getConfigurationExample();", "title": "" }, { "docid": "3c560c2b45065d9b9b98edd19278fa3b", "score": "0.6688591", "text": "public function config()\n {\n }", "title": "" }, { "docid": "e72b102c2dab28484f99109b290b730a", "score": "0.66722935", "text": "abstract public function getConfig();", "title": "" }, { "docid": "73b9320448a7b123e003fd6e552c11d5", "score": "0.6671725", "text": "protected abstract function getRequiredConfig();", "title": "" }, { "docid": "54eab627f2945f8f5e3870a36ab65259", "score": "0.66448975", "text": "public function configuration()\n\t\t{\n\n\t\t\treturn [\n\t\t\t\t'allowsoftware' => false,\n\t\t\t\t'allowlocal' => false,\n\t\t\t\t'requireloggedin' => true\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "dc45190e6c7216ccadc7c5ed71c2c2cc", "score": "0.6641299", "text": "protected function setup_config() {\n\t\t}", "title": "" }, { "docid": "07d5b9c3211c006ef044c89f35038566", "score": "0.6598471", "text": "public function GetConfiguration();", "title": "" }, { "docid": "c863663245cef97f19dcc17091289559", "score": "0.65973717", "text": "public function asConfig();", "title": "" }, { "docid": "a1c4de0c82e84c220732bdcc256d5e00", "score": "0.6588998", "text": "public function configuration()\n {\n\n return array(\n 'allowsoftwares' => false,\n 'allowlocal' => false,\n 'requireloggedin' => true\n );\n }", "title": "" }, { "docid": "886c8a0d0e462a70088bdb66847b2fce", "score": "0.657269", "text": "public function __construct(){\n\t\t\t $this->configs = $this::getConfigurations();\n\t\t}", "title": "" }, { "docid": "0ce1279f920623f2046c4ec9e986e3bc", "score": "0.6565964", "text": "public function instance_allow_config() {\n return false;\n }", "title": "" }, { "docid": "6533560c0fc4bd8f4803a32b45624f5c", "score": "0.64925843", "text": "public function __construct() {\n\t\t$this->config=new Configuration();\n\t}", "title": "" }, { "docid": "4791c53ac97cdef96b5673475b4d531f", "score": "0.64821917", "text": "public function getBaseConfig();", "title": "" }, { "docid": "a8efadeda229dc133d19e10bcb2b2695", "score": "0.6481284", "text": "public function configure();", "title": "" }, { "docid": "a8efadeda229dc133d19e10bcb2b2695", "score": "0.6481284", "text": "public function configure();", "title": "" }, { "docid": "a8efadeda229dc133d19e10bcb2b2695", "score": "0.6481284", "text": "public function configure();", "title": "" }, { "docid": "67b532c8558774e59bd808ea301abeca", "score": "0.648096", "text": "protected function getConfiguration()\n {\n return ['required'=>false];\n }", "title": "" }, { "docid": "e8d8432523a5c8c90853b911d6f8f167", "score": "0.643976", "text": "public function getBasicConfig()\n {\n return new UsefulDataConfig();\n }", "title": "" }, { "docid": "49f20aedcfb8ff3ee13f62b1386837c6", "score": "0.6395551", "text": "public function testBasicConfiguration(): void\n {\n $configs = [\n [ 'marker' => [ 'file' => [ 'path' => './abc' ] ] ]\n ];\n\n $configuration = new Configuration();\n $processor = new Processor();\n $config = $processor->processConfiguration($configuration, $configs);\n\n $this->assertIsArray($config);\n $this->assertArrayHasKey('marker', $config);\n $this->assertIsArray($config['marker']);\n $this->assertArrayHasKey('file', $config['marker']);\n $this->assertIsArray($config['marker']['file']);\n $this->assertArrayHasKey('path', $config['marker']['file']);\n $this->assertEquals('./abc', $config['marker']['file']['path']);\n }", "title": "" }, { "docid": "691ab33d8250101d0a1023b153e7cdb2", "score": "0.6379898", "text": "function instance_allow_config() {\n return true;\n }", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.6360313", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.6360313", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.6360313", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.6360313", "text": "public function getConfig();", "title": "" }, { "docid": "190c4f09fa22852997b0be446dfaf333", "score": "0.6354594", "text": "public function GetCustomConfiguration();", "title": "" }, { "docid": "786118d960615fc72a1381c3079cc569", "score": "0.63542634", "text": "public function getConfig()\n {\n }", "title": "" }, { "docid": "b50be469f1941d71cf4448169e78fbe7", "score": "0.6321933", "text": "public function configuration()\n\t\t{\n\n\t\t\treturn [\n\t\t\t\t'uniquename' => 'riddle',\n\t\t\t\t'extension' => '.exe',\n\t\t\t\t'type' => 'riddle',\n\t\t\t\t'viewable' => true,\n\t\t\t\t'removable' => true,\n\t\t\t\t'installable' => true,\n\t\t\t\t'executable' => true,\n\t\t\t\t'keepdata' => true\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "e6edf76c22b48e962330c5d578c712b9", "score": "0.6301993", "text": "protected function getConfiguration ()\n {\n return new Configuration();\n }", "title": "" }, { "docid": "92d08f94b39f11d440f388d0b41715e2", "score": "0.62960875", "text": "private static function config() {\n return nil::get(Configuration::getValue('app'), array());\n }", "title": "" }, { "docid": "330d98448f7baa6a5b315cec0b60b356", "score": "0.6285449", "text": "protected function createFullConfiguration()\n {\n $this->configuration = new ContainerBuilder;\n $loader = new MremiDolistExtension;\n $config = $this->getFullConfig();\n $loader->load(array($config), $this->configuration);\n $this->assertTrue($this->configuration instanceof ContainerBuilder);\n }", "title": "" }, { "docid": "b91ee518dd580fe013039a2cb6b0c564", "score": "0.62658906", "text": "function stitches_configuration()\n{\n Config::define('debug.ip', null, 'IP addresses for the debug mode');\n Config::define('debug.enabled', false, 'Global debug mode');\n Config::define('debug.sql', true, 'Show SQL dumps in the debug mode?');\n Config::define('site.is-production', false, 'Production flag');\n}", "title": "" }, { "docid": "c11f748f5ad778d4d2644906fcf0efc0", "score": "0.6262794", "text": "protected function setUpConfig()\n {\n $source = dirname(__DIR__) . '/resources/config/shortable.php';\n if ($this->app instanceof LaravelApplication) {\n $this->publishes([$source => config_path('shortable.php')], 'config');\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->configure('shortable');\n }\n $this->mergeConfigFrom($source, 'shortable');\n }", "title": "" }, { "docid": "f1c2a64e52031e8c989027e1f3a67460", "score": "0.6254253", "text": "public function GetConfig ();", "title": "" }, { "docid": "5df68f338051b321dd13c8cf0caed056", "score": "0.6251512", "text": "protected abstract function configure();", "title": "" }, { "docid": "fff0153b76c82d2022a962ad2e60c5a4", "score": "0.62493545", "text": "public function default_config() : array {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "a2bb2db5bbe31338997e1d107eea297b", "score": "0.62277764", "text": "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// listen to\n\t\t\t'listen' => 'tcp://0.0.0.0',\n\t\t\t// default port\n\t\t\t'port' => 80,\n\t\t\t// log events\n\t\t\t'log-events' => 0,\n\t\t\t// log queue\n\t\t\t'log-queue' => 0,\n\t\t\t// @todo add description strings\n\t\t\t'send-file' => 0,\n\t\t\t'send-file-dir' => '/dev/shm',\n\t\t\t'send-file-prefix' => 'http-',\n\t\t\t'send-file-onlybycommand' => 0,\n\t\t\t// expose your soft by X-Powered-By string\n\t\t\t'expose' => 1,\n\t\t\t// @todo add description strings\n\t\t\t'keepalive' => new Daemon_ConfigEntryTime('0s'),\n\t\t\t'chunksize' => new Daemon_ConfigEntrySize('8k'),\n\t\t\t'defaultcharset' => 'utf-8',\n\t\t\t// disabled by default\n\t\t\t'enable' => 0,\n\t\t\t'wss-name' => '',\n\t\t\t'upload-max-size' => new Daemon_ConfigEntrySize(ini_get('upload_max_filesize')),\n\t\t\t//'responder' => default app\n\t\t);\n\t}", "title": "" }, { "docid": "34d922b301536d1c4aabda9a471bbd65", "score": "0.6218679", "text": "public static function default_config()\n {\n return array(\n 'zepto.environment' => 'dev',\n 'zepto.content_dir' => 'content',\n 'zepto.plugins_dir' => 'plugins',\n 'zepto.templates_dir' => 'templates',\n 'zepto.default_template' => 'base.twig',\n 'zepto.content_ext' => array('.md', '.markdown'),\n 'zepto.plugins_enabled' => false,\n 'site.site_root' => 'http://localhost:8888/zepto/',\n 'site.site_title' => 'Zepto',\n 'site.date_format' => 'jS M Y',\n 'site.excerpt_length' => '50',\n 'twig' => array(\n 'charset' => 'utf-8',\n 'cache' => 'cache',\n 'strict_variables' => false,\n 'autoescape' => false,\n 'auto_reload' => true\n )\n );\n }", "title": "" }, { "docid": "a611122fd9cdb818a35b049ed02ec0de", "score": "0.6218467", "text": "private function setDefaultConfig()\n {\n $default = array(\n 'default_params' => 'name!, email!, subject!, message!',\n 'separator' => ',',\n 'logs_count' => 10,\n 'use_honeypot' => true,\n 'min_sec_after_load' => '3',\n 'max_posts_by_hour' => '10',\n 'min_sec_between_posts' => '5',\n );\n foreach ($default as $key => $value) {\n if (empty($this->config->{$key})) {\n $this->config->{$key} = $value;\n }\n }\n }", "title": "" }, { "docid": "7849185cfb4e3b0b6eb80e66bd1d90be", "score": "0.62150455", "text": "abstract protected function configure();", "title": "" }, { "docid": "7849185cfb4e3b0b6eb80e66bd1d90be", "score": "0.62150455", "text": "abstract protected function configure();", "title": "" }, { "docid": "7849185cfb4e3b0b6eb80e66bd1d90be", "score": "0.62150455", "text": "abstract protected function configure();", "title": "" }, { "docid": "6d38114cb48fdd48dd3072e1e8e0587d", "score": "0.62027305", "text": "public function getConfigDefaults() {\n\t\treturn array(\n\t\t\t'noLoad' => array()\n\t\t);\n\t}", "title": "" }, { "docid": "297df712148aee91a10af0c56e83e525", "score": "0.62023187", "text": "public function getConfigurationProvider();", "title": "" }, { "docid": "2b48b28e18317d30db91cd405359c115", "score": "0.6187418", "text": "function SpawConfig()\r\n {\r\n // copy static config to this instance\r\n $this->config = SpawConfig::configVar();\r\n }", "title": "" }, { "docid": "96d95f92bbb87d58fa6b96dbe2f1e5d2", "score": "0.6187405", "text": "public static function config() : Configuration {\n $instaPerformance = static::getInstance();\n\n // return handler to configuration object\n return $instaPerformance->config;\n }", "title": "" }, { "docid": "ad5e60759f39144850001a69c1cfc940", "score": "0.61863387", "text": "function has_configuration() {\r\n return false;\r\n }", "title": "" }, { "docid": "5fc2e5cb664ca87c2ee320cfcd47b221", "score": "0.61839575", "text": "public function __construct()\r\n\t {\t /**\r\n\t \r\n\t if(isset($options['autoload']) && $options['autoload'] == true){\r\n\t\t\t\t$this->loadConfig();\r\n\t\t\t\treturn $this->siteconfig;\r\n\t\t\t}\r\n\t\t\t*/ \r\n\t }", "title": "" }, { "docid": "2b83426e4519a84eb9c8e3e322907f20", "score": "0.6140847", "text": "function config($key = null, $default = null)\n{\n return 2500;\n}", "title": "" }, { "docid": "d00a0f9ab3904add5c5dc86a34294199", "score": "0.61377645", "text": "private function _setDefaultConfig()\n {\n $this->_config[\"mysql_server\"] = 'localhost';\n $this->_config[\"mysql_user\"] = 'user';\n $this->_config[\"mysql_pass\"] = 'pass';\n $this->_config[\"mysql_db\"] = 'database';\n $this->_config[\"mysql_table\"] = 'table';\n $this->_config[\"mysql_name_column\"] = 'column';\n $this->_config[\"aws_key\"] = '';\n $this->_config[\"aws_pass\"] = '';\n $this->_config[\"aws_s3bucket\"] = '';\n }", "title": "" }, { "docid": "c2da58205fe8a4146d4721dd32f57277", "score": "0.61354303", "text": "protected function getConfigDefaults() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "309582b58590e0cdfb8f795156a60d82", "score": "0.61175257", "text": "public function __construct() {\n\t\t//echo \"CONFIG construct<br/>\";\n\t\trequire_once \"Spyc.php\";\n\t\t$this->data = \\Spyc::YAMLLoad('lib/config.yaml');\n\t\t$this->data['secu'] = \\Spyc::YAMLLoad('lib/secu.yaml');\n\t\t$this->data['aside'] = \\Spyc::YAMLLoad('lib/aside.yaml');\n\t\t\n\t\t//echo\"<br />Config <pre>\";print_r($this->data);echo\"<br /> fin chargement config</PRE>\";\n\t}", "title": "" }, { "docid": "a6fb1d21a0f77c1d3d49f2f95bdcb41b", "score": "0.61126184", "text": "public function __construct()\n {\n $this->config = $this->setConfig();\n }", "title": "" }, { "docid": "f8bb3ecdcabb40c8cd1e3385d6e57200", "score": "0.61107856", "text": "function tidy_get_config () {}", "title": "" }, { "docid": "8857e4a319e0c1f6e736bd41c7dabaac", "score": "0.61039114", "text": "function configuration() { \n\t\t$this->loadModel(\"Configuration\");\n\t\t$configurations = $this->Configuration->find(\"all\");\n\t\t$str = \"\";\n\t\tforeach($configurations as $key=>$val) {\n\t\t\tif(!defined($val['Configuration']['default_header'])) {\n\t\t\t\t//$str .= \"define('\".$val['Configuration']['default_header'].\"','\".$val['Configuration']['value'].\"');\".'\\n';\n\t\t\t\t$str .= 'define(\"'.$val['Configuration']['default_header'].'\",\"'.$val['Configuration']['value'].'\");'.\"\\n\";\n\t\t\t}\n\t\t}\n\t\tif(!empty($str)) {\n\t\t\t$str .= \"define('RETURN_URL','http://\".$_SERVER['SERVER_NAME'].$this->params->base.\"/');\\n\";\n\t\t\t$str .= \"define('CENCEL_URL','http://\".$_SERVER['SERVER_NAME'].$this->params->base.\"/');\\n\";\n\t\t\t$str = \"<?php \\n\".$str.\"?>\";\n\t\t\t$file = WWW_ROOT.\"custom/config.php\";\n\t\t\tif(file_exists($file)) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t\tfile_put_contents($file, $str, FILE_APPEND | LOCK_EX);\n\t\t}\n\t}", "title": "" }, { "docid": "be61946307027909102f0359ad93a516", "score": "0.6103801", "text": "protected function validateConfiguration()\n {\n }", "title": "" }, { "docid": "db810d0738b0bbec7d8121a4dafe9dff", "score": "0.6096584", "text": "function config($key = null, $default = null)\n {\n return config_v1();\n }", "title": "" }, { "docid": "d9be7138d6a5aa5070f7b4fa5e06d63f", "score": "0.6094295", "text": "static function configurationBootstrap()\r\n\t{\r\n\t\tglobal $auto_form_defaults;\r\n\t\t\r\n\t\t$afDefaults = Cache::get(\"auto_form_defaults\");\r\n\t\tif (!$afDefaults)\r\n\t\t{\r\n\t\t\t$afDefaults = array();\r\n\t\t\t$autoFormSettings = Query::create(Settings, \"WHERE component='settings' AND category='AutoForm'\")->execute();\r\n\t\t\t\r\n\t\t\tforeach($autoFormSettings as $setting)\r\n\t\t\t{\r\n\t\t\t\t$afDefaults[$setting->name] = $setting->value;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tCache::put(\"auto_form_defaults\", $afDefaults);\r\n\t\t}\r\n\t\t\r\n\t\tforeach($afDefaults as $name => $value)\r\n\t\t{\r\n\t\t\tif (!isset($auto_form_defaults[$name])) $auto_form_defaults[$name] = $value;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3f75313d7b32a6e4040b825f32457c5c", "score": "0.6085479", "text": "public function runtimeConfig();", "title": "" }, { "docid": "3f75313d7b32a6e4040b825f32457c5c", "score": "0.6085479", "text": "public function runtimeConfig();", "title": "" }, { "docid": "d6236c903da97e095628b6100b8fa0e5", "score": "0.6060061", "text": "public function getConfiguration() {\r\n return new Configuration($this);\r\n }", "title": "" }, { "docid": "45068e3f4f1426b3e3ee434f098f6e74", "score": "0.6059609", "text": "protected function createEmptyConfiguration()\n {\n $this->configuration = new ContainerBuilder;\n $loader = new MremiDolistExtension;\n $config = $this->getEmptyConfig();\n $loader->load(array($config), $this->configuration);\n $this->assertTrue($this->configuration instanceof ContainerBuilder);\n }", "title": "" }, { "docid": "e7865eda98474fd34cae1c2431c7955d", "score": "0.6043508", "text": "protected function on_configuring() {}", "title": "" }, { "docid": "472d5d18ecd38648ebc355954f1fe8ad", "score": "0.60366714", "text": "abstract public function getConfigClass();", "title": "" }, { "docid": "2fa5bda37b2a7b744619e883de971dde", "score": "0.6035554", "text": "protected function configure() {\n\t\tparent::configure();\n\t\t\n\t\t$this->disabled[] = 'archive';\n\t\t$this->disabled[] = 'extract';\n\t}", "title": "" }, { "docid": "410f458b1cbd4f19d0550b4ff2f28a54", "score": "0.6032187", "text": "public function configuration()\n\t\t{\n\n\t\t\treturn [\n\t\t\t\t'uniquename' => 'accountcracker',\n\t\t\t\t'extension' => '.acc',\n\t\t\t\t'type' => 'accountcracker',\n\t\t\t\t'installable' => true,\n\t\t\t\t'executable' => true,\n\t\t\t\t'localexecuteonly' => true,\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "ffedd595bf406d65e6258a7874dc15af", "score": "0.60320854", "text": "public function overwriteConfig()\n {\n\n }", "title": "" }, { "docid": "216525970899762564ef82b9cee52caa", "score": "0.6025716", "text": "function eleganto_configuration_sample() {\n\n\t$config[ 'color_back' ]\t\t = '#192429';\n\t$config[ 'color_accent' ]\t = '#008ec2';\n\t$config[ 'width' ]\t\t\t = '25%';\n\n\treturn $config;\n}", "title": "" }, { "docid": "f03b819e319e0aade6d1e6c0c65d04f1", "score": "0.6013247", "text": "protected function getConfigDefaults() {\n\t\treturn array(\n\t\t\t// listen to\n\t\t\t'listen' => 'tcp://0.0.0.0',\n\t\t\t// listen port\n\t\t\t'listenport' => 8047,\n\t\t\t// max allowed packet size\n\t\t\t'maxallowedpacket' => new Daemon_ConfigEntrySize('16k'),\n\t\t\t// disabled by default\n\t\t\t'enable' => 0\n\t\t);\n\t}", "title": "" }, { "docid": "10284a7f19294898499b985e731b1d32", "score": "0.6003682", "text": "public function __construct(array $config = array())\n {\n\n }", "title": "" }, { "docid": "7a68b7e15f73e6edd9bd982a4f151d7e", "score": "0.60008967", "text": "public function getConfiguration(): array;", "title": "" }, { "docid": "8e596f7dd37f49da3f254c018744d9d1", "score": "0.5986594", "text": "function shcp_default_config() {\n\n\t$default_config = array(\n\t\t'controls' => true,\n\t\t'progress' => true,\n\t\t'autoSlide' => 0, // milliseconds or 0 for off.\n\t\t'autoSlideStoppable' => false,\n\t\t'loop' => true,\n\t\t'transition' => 'slide', // none, fade, slide, convex, concave, zoom.\n\t\t'backgroundTransition' => 'none', // none, fade, slide, convex, concave, zoom.\n\t\t'transitionSpeed' => 'default', // default, fast, slow.\n\t\t'hash' => true,\n\t);\n\n\t$default_config = wp_json_encode( apply_filters( 'shcp_custom_config', $default_config ) );\n\n\treturn $default_config;\n}", "title": "" }, { "docid": "dd7ef1d998c516de22d2bd997fa108c9", "score": "0.5986394", "text": "public function getFullConfig()\r\n {\r\n $config = $this->config->getAll();\r\n $config['labels'] = $this->getLabels();\r\n $config['supports'] = $this->getFeatures();\r\n $config['capabilities'] = $this->getCapabilities();\r\n $config['taxonomies'] = $this->getTaxonomies();\r\n $config['rewrite'] = $this->getRewrite();\r\n\r\n return $config;\r\n }", "title": "" }, { "docid": "ce5358c95638fbb2d0428a6ef6247554", "score": "0.5985394", "text": "public function __construct()\n\t{\n\t\t$this->config();\n\t}", "title": "" }, { "docid": "2ea3eb5390ce9fd39d6e17ee0c37a725", "score": "0.5981041", "text": "function has_config() {\r\n return false;\r\n }", "title": "" }, { "docid": "6ed44172d2b1ca5a451613a7d999189c", "score": "0.5972367", "text": "public abstract function upConfig();", "title": "" }, { "docid": "e8c881f0aaf7e2261bf2a7d194624045", "score": "0.59689724", "text": "public function getDefaultConfigurationForStat(): array\n {\n return [\n 'cache_store' => false,\n 'time_to_live' => 60,\n 'only_get_from_cache' => false\n ];\n }", "title": "" }, { "docid": "5ee0123afe10aaa1d6119e3541c62c1c", "score": "0.59672135", "text": "public function getDefaultConfig() {\n return array();\n }", "title": "" }, { "docid": "8440f9eacc091527610ee16378be0e9e", "score": "0.5965426", "text": "function has_config() {\n return true;\n }", "title": "" }, { "docid": "8440f9eacc091527610ee16378be0e9e", "score": "0.5965426", "text": "function has_config() {\n return true;\n }", "title": "" }, { "docid": "68cbe557ebe65c5dab80296802dc2770", "score": "0.5963912", "text": "public function validateConfig();", "title": "" }, { "docid": "099539edcd434f9d990c3f838dbafd90", "score": "0.59622324", "text": "function has_config() {\n return false;\n }", "title": "" }, { "docid": "415a3b7f74e458a66a5cdc79220887c6", "score": "0.59601873", "text": "function utopia_config()\n\t{\n\t\tif (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]))\n\t\t{\n\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]))\n\t\t\t\t$this->_conf = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey];\n\t\t\telseif (!empty($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]))\n\t\t\t{\n\t\t\t\t$this->_conf = @unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\n\t\t\t\tif (($this->_conf === false) && ($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey] != serialize(false)))\n\t\t\t\t\t$this->_conf = array();\n\t\t\t}\n\t\t}\n\t\tif ($this->_conf == null)\n\t\t\t$this->_conf = array();\n\t\t$this->_conf = t3lib_div::array_merge_recursive_overrule(self::_defaultValues(), $this->_conf);\n\t}", "title": "" }, { "docid": "e2880eff20c70c9070e85c729a5079ec", "score": "0.59588414", "text": "function has_configuration() {\n\treturn true;\n}", "title": "" }, { "docid": "ad3115d5c75921be152bde2b40fe1251", "score": "0.59579635", "text": "public static function getDefaultConfiguration()\n {\n return self::$defaultConfiguration;\n }", "title": "" }, { "docid": "383b2d1d9a789dfd0d98b432bccc2574", "score": "0.5950324", "text": "private function _loadDefaultConfig()\n\t{\n\t\t$config['core']['errors'] = false;\n\t\t$config['core']['database'] = false;\n\t\t$config['core']['maintenance'] = false;\n\t\t$config['core']['debug'] = false;\n\t\t$config['core']['https']['a'] = true; // HTTPS available?\n\t\t$config['core']['https']['f'] = false; // Force HTTPS?\n\t\t$config['core']['cdn'] = '/';\n\t\t$config['mysql']['db'] = 'bwsc';\n\t\t$config['mysql']['r']['user'] = 'root';\n\t\t$config['mysql']['r']['pass'] = '';\n\t\t$config['mysql']['r']['serv'] = 'localhost';\n\t\t$config['mysql']['r']['port'] = '3306';\n\t\t$config['mysql']['w']['user'] = 'bwsc';\n\t\t$config['mysql']['w']['pass'] = '';\n\t\t$config['mysql']['w']['serv'] = 'localhost';\n\t\t$config['mysql']['w']['port'] = '3306';\n\t\t$config['reCAPTCHA']['pub'] = '';\n\t\t$config['reCAPTCHA']['priv'] = '';\n\t\t$config['days'][0] = 'Sunday';\n\t\t$config['days'][1] = 'Monday';\n\t\t$config['days'][2] = 'Tuesday';\n\t\t$config['days'][3] = 'Wednesday';\n\t\t$config['days'][4] = 'Thursday';\n\t\t$config['days'][5] = 'Friday';\n\t\t$config['days'][6] = 'Saturday';\n\t\t$config['days'][7] = 'Sunday';\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "6248510ad1cb783430e8b425426fd3d0", "score": "0.5944875", "text": "private function init_config()\n\t{\n\t\t$this->config = op5config::instance();\n\t\t$this->config->setConfig('auth', $this->default_config['auth']);\n\t\t$this->config->setConfig('auth_users', $this->default_config['auth_users']);\n\t\t$this->config->setConfig('auth_groups', $this->default_config['auth_groups']);\n\t\t$this->auth = op5auth::instance();\n\t}", "title": "" }, { "docid": "0d3f080d6d4b9d9a842e44e4b4158ad3", "score": "0.59433264", "text": "final protected function bootstrapConfig () {\n\t\t$this[\"app.config\"]\t= $this -> config_loader -> getAppConfig($this -> getBaselineConfig());\n\t}", "title": "" }, { "docid": "fbc068e24eeb71b8daacf19ab8c255ec", "score": "0.5942121", "text": "private static function getConfig() {\n return require __BASE__ . DS . 'config.php';\n }", "title": "" }, { "docid": "85fd6ff66083d25f198552b84d8a9305", "score": "0.59395444", "text": "public function configurationIncomplete(): void;", "title": "" }, { "docid": "44317cfce173550bba9a0709edccbcbd", "score": "0.59365904", "text": "private function __init_config() {\n if (!isset($this->config[\"shaper\"][\"queue\"][$this->id][\"queue\"])) {\n $this->config[\"shaper\"][\"queue\"][$this->id][\"queue\"] = [];\n }\n }", "title": "" }, { "docid": "8c560d628113b6066be8adb3c087b558", "score": "0.5933806", "text": "public static function getDefaultConfiguration()\n {\n return array(\n 'flexform' => array(\n 'registration' => array(\n 'disabledForThisInstance' => false,\n ),\n 'statistics' => array(\n 'disabledForThisInstance' => false,\n ),\n ),\n 'database' => array(\n 'FrequentlyAskedQuestion' => array(\n 'searchableColumns' => 'question, short_answer, answer',\n ),\n 'Product' => array(\n 'searchableColumns' => 'description',\n 'userAvailability' => array(\n 'useUsersAvailableColumn' => false,\n 'lookupTable' => 'fe_users',\n 'orderBy' => 'fe_users.name',\n 'columnToDetermineAvailability' => 'tx_ncgovpdc_availability_status',\n 'columnStatusesAvailable' => array(\n 'noMatch' => array(\n 'description' => 'Onbekend',\n 'icon' => 'EXT:ncgov_pdc/Resources/Public/Icons/status_unknown.jpg',\n ),\n 'available' => array(\n 'match' => '/IN/',\n 'description' => 'Aanwezig',\n 'icon' => 'EXT:ncgov_pdc/Resources/Public/Icons/status_available.jpg',\n ),\n 'unavailable' => array(\n 'match' => '/OUT/',\n 'description' => 'Afwezig',\n 'icon' => 'EXT:ncgov_pdc/Resources/Public/Icons/status_unavailable.jpg',\n ),\n 'busy' => array(\n 'match' => '/BUSY/',\n 'description' => 'Bezet',\n 'icon' => 'EXT:ncgov_pdc/Resources/Public/Icons/status_busy.jpg',\n ),\n ),\n 'displayColumns' => 'name, phone, www',\n ),\n ),\n ),\n 'wordsNotRelevantForSearch' => 'is,de,een,het,met,wat,en,ik,kan',\n 'controllers' => array(\n 'Product' => array(\n 'title' => array(\n 'useRecordAsPageTitle' => true,\n 'prefix' => '',\n 'postfix' => ''\n ),\n 'detail' => array(\n 'useTemplate' => '',\n 'image' => array(\n 'maxWidth' => 100,\n 'maxHeight' => 100,\n ),\n ),\n 'detailForPreconfiguredProduct' => array(\n 'preconfiguredProduct' => false,\n // FIXME These should all be NULL! Check if there is a \"=== FALSE\" used anywhere!\n ),\n 'dieOnOutputXml' => true,\n//\t\t\t\t\tFor use with Resources/Private/Templates/Product/Detail.sdu.html:\n//\t\t\t\t\tcombinedProperties {\n//\t\t\t\t\t\tdescription = hasFullDescription,hasFullTerms,referenceLaws\n//\t\t\t\t\t\tlaws = hasFullTerms,referenceLaws,referenceLocalLaws\n//\t\t\t\t\t\tother = referenceExternal,attachments,requestForm,source,relatedRegulatory\n//\t\t\t\t\t}\n 'combinedProperties' => false,\n 'limitResultsToThisAudience' => false,\n 'maximumNumberOfFrequentlyAskedQuestionsToShow' => false,\n 'restrictAccessToTips' => false,\n 'actions' => array(\n 'publishXml' => array(\n 'OWMS' => array(\n 'core' => array(\n 'spatial' => array(\n 'scheme' => 'overheid:Gemeente'\n ),\n 'authority' => array(\n 'scheme' => 'overheid:Gemeente'\n )\n )\n )\n )\n )\n ),\n 'FrequentlyAskedQuestion' => array(\n 'activeChannels' => 'generiek,website',\n 'showDestinations' => '',\n 'title' => array(\n 'useRecordAsPageTitle' => true,\n 'prefix' => '',\n 'postfix' => ''\n ),\n 'actions' => array(\n 'find' => array(\n 'location' => '',\n 'showSingleFrequentlyAskedQuestion' => false,\n // results count\n 'maxFrequentlyAskedQuestionResultCount' => false,\n 'maxFrequentlyAskedQuestionKeywordResultCount' => false,\n 'maxFrequentlyAskedQuestionProductResultCount' => false,\n 'maxFrequentlyAskedQuestionSynonymResultCount' => false,\n 'maxSamenwerkendeCatalogiResultCount' => false,\n 'maxProductResultCount' => false,\n 'maxResultPagesCount' => false,\n // show own searchbox?\n 'showSearchBox' => true,\n // needed for searching using another searchbox\n 'otherSearchFormElement' => false,\n 'otherSearchFormMethodIsPost' => false,\n //\n 'logSearchTimes' => false,\n 'searchOptions' => array(\n 'display' => array(\n 'matchExactPhrase' => false,\n 'includePrivateResults' => true,\n 'includeBusinessResults' => true,\n 'includeRemoteProducts' => true,\n ),\n 'defaultValues' => array(\n 'matchExactPhrase' => false,\n 'includePrivateResults' => true,\n 'includeBusinessResults' => true,\n 'includeRemoteProducts' => false,\n ),\n ),\n ),\n ),\n ),\n ),\n 'registration' => array(\n 'sessionTimeout' => 7200,\n 'expiredResult' => false,\n 'registerFrequentlyAskedQuestionForSearch' => true,\n 'enabled' => false,\n 'registerEmptySearch' => false,\n ),\n 'statistics' => array(\n 'className' => StatisticsManager::class,\n 'enabled' => false,\n 'timestampFormat' => 'Ym',\n 'topViewed' => array(\n 'numberOfItems' => 10,\n 'timeOffset' => '-1 month'\n ),\n 'top' => array( //\n ),\n ),\n 'produceCleanUrls' => true,\n 'debug' => false,\n 'contentMyQuestionWasNotAnswered' => false,\n 'contentNoResultsFound' => false,\n 'contentPoseQuestion' => false,\n 'minimumNumberOfNodeCount' => 5,\n 'import' => array(\n 'minimumNumberOfRecordsSafetyLimit' => 50,\n 'faq' => array(\n 'forceFullUpdate' => false,\n 'useCurl' => false,\n 'type' => 'xml',\n 'pagesToClearCacheFor' => '',\n 'maximumNumberOfRecordsToProcessLimit' => 150,\n//\t\t\t\t\t'defaultUserGroups' => '', // KCC or PDC group ID\n 'xml' => array(\n 'excludedItems' => '',\n 'skipDownload' => false,\n 'url' => false,\n 'tempFile' => 'typo3temp/FaqImport.xml',\n 'isPartialImport' => false,\n 'useAuthentication' => false,\n 'username' => '',\n 'password' => '',\n ),\n ),\n ),\n 'samenwerkendeCatalogi' => array(\n 'debug' => false,\n 'use' => true,\n 'spatial' => array(\n 'spatial' => '',\n 'scheme' => 'overheid:Andere',\n 'resourceIdentifier' => ''\n ),\n 'authority' => array(\n 'authority' => '',\n 'scheme' => 'overheid:Andere',\n 'resourceIdentifier' => ''\n )\n ),\n 'pages' => array(\n 'productAZIndexPage' => false,\n 'themeDetailPage' => false,\n 'productNotAvailablePage' => '404/',\n 'productDetailPage' => false,\n 'frequentlyAskedQuestionDetailPage' => false,\n 'closeRegistrationPage' => false,\n 'searchPage' => false,\n ),\n 'persistence' => array(\n 'storagePid' => false,\n ),\n );\n }", "title": "" }, { "docid": "997ad6e5cd36c737364a34ca8319be88", "score": "0.59273845", "text": "public static function getConfiguration()\n\t{\n\t\treturn self::$config;\n\t}", "title": "" }, { "docid": "b262042734f24e77c87aaa5eca2033ca", "score": "0.59177786", "text": "protected function getDefaultConfig()\n {\n return $this->aParentConfig;\n }", "title": "" }, { "docid": "c2d459071bd15605ef6de53ad26d98d4", "score": "0.5913594", "text": "public function __construct($config = array()) {\n\t\t$config += $this->_defaultConfig;\n\t\tparent::__construct($config);\n\t}", "title": "" } ]
61415b322d76236663ba1f3ea599aae3
Gets the public 'response_listener' shared service.
[ { "docid": "500cd0d5b5db140b42cac67efc0da017", "score": "0.7395126", "text": "protected function getResponseListenerService()\n {\n return $this->services['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }", "title": "" } ]
[ { "docid": "2dd8ded5ec6a387d1d023be5d6ccd11a", "score": "0.69161683", "text": "protected function getSymfonyResponseListenerService()\n {\n return $this->services['symfony_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8');\n }", "title": "" }, { "docid": "5c1f9dfa19b31176f727739c3879bf8e", "score": "0.68285775", "text": "protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }", "title": "" }, { "docid": "5c1f9dfa19b31176f727739c3879bf8e", "score": "0.68285775", "text": "protected function getSecurity_Rememberme_ResponseListenerService()\n {\n return $this->services['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener();\n }", "title": "" }, { "docid": "710bb93b44430ea12c9e532e43224226", "score": "0.6799842", "text": "protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }", "title": "" }, { "docid": "710bb93b44430ea12c9e532e43224226", "score": "0.6799842", "text": "protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }", "title": "" }, { "docid": "710bb93b44430ea12c9e532e43224226", "score": "0.6799842", "text": "protected function getStreamedResponseListenerService()\n {\n return $this->services['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener();\n }", "title": "" }, { "docid": "439eb53cd29048112192a674a8f16711", "score": "0.65975046", "text": "protected function getFosRest_ViewResponseListenerService()\n {\n return $this->services['fos_rest.view_response_listener'] = new \\FOS\\RestBundle\\EventListener\\ViewResponseListener(${($_ = isset($this->services['fos_rest.view_handler']) ? $this->services['fos_rest.view_handler'] : $this->get('fos_rest.view_handler')) && false ?: '_'}, true);\n }", "title": "" }, { "docid": "987bb8440dea0b7bb8b844f6040d66b4", "score": "0.63349575", "text": "protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener(${($_ = isset($this->services['translator']) ? $this->services['translator'] : $this->getTranslatorService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'});\n }", "title": "" }, { "docid": "c651998e122cba06c233f725564494d3", "score": "0.627734", "text": "protected function getTranslatorListenerService()\n {\n return $this->services['translator_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\TranslatorListener($this->get('translator'), $this->get('request_stack'));\n }", "title": "" }, { "docid": "0e126e365ba75c4f33d07e10567c2d51", "score": "0.60111094", "text": "public function getResponseHandler() {\n\t\treturn $this->responseHandler;\n\t}", "title": "" }, { "docid": "c0e77e557fb52aa1e6758930409dc0a8", "score": "0.5981801", "text": "public static function getInstance()\n\t{\n\t\tif( ! isset( $GLOBALS['_RPC_']['singleton']['response'] ) )\n\t\t{\n\t\t\t$c = __CLASS__;\n\t\t\t$GLOBALS['_RPC_']['singleton']['response'] = new $c;\n\t\t}\n\t\t\n\t\treturn $GLOBALS['_RPC_']['singleton']['response'];\n\t}", "title": "" }, { "docid": "4d0e07b91f42669b8fbbf3994a4d1d0d", "score": "0.59426486", "text": "protected function getRouter_ListenerService()\n {\n return $this->services['router.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), NULL, NULL, $this->get('request_stack'));\n }", "title": "" }, { "docid": "6a9a3d01f5fc7a4f22cc6fefab95f429", "score": "0.59254366", "text": "protected function getRouterListenerService()\n {\n return $this->privates['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(($this->services['router'] ?? $this->getRouterService()), ($this->services['request_stack'] ?? ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())), ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService()), ($this->privates['monolog.logger.request'] ?? $this->getMonolog_Logger_RequestService()), \\dirname(__DIR__, 4), false);\n }", "title": "" }, { "docid": "b4bab5655ef70d30d0569e76612c7510", "score": "0.5919118", "text": "public function getListener(){\n\t\treturn new RudimentaryPhpTest_Listener_Console(FALSE);\n\t}", "title": "" }, { "docid": "8de08054469d706e11948459a30c5f1c", "score": "0.58966184", "text": "private function getServiceEventSubscription()\n {\n return $this->container->get('app_service_event_subscription');\n }", "title": "" }, { "docid": "346c5ebedf9b1112fb7a4c327ee7ff44", "score": "0.5871939", "text": "protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }", "title": "" }, { "docid": "346c5ebedf9b1112fb7a4c327ee7ff44", "score": "0.5871939", "text": "protected function getSensioFrameworkExtra_Cache_ListenerService()\n {\n return $this->services['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener();\n }", "title": "" }, { "docid": "4d900f3dcb7af1ae8551e7ba43f0e5ad", "score": "0.58173925", "text": "protected function getSessionListenerService()\n {\n return $this->privates['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\Argument\\ServiceLocator($this->getService, [\n 'initialized_session' => ['services', 'session', NULL, true],\n 'request_stack' => ['services', 'request_stack', 'getRequestStackService', false],\n 'session' => ['services', 'session', 'getSessionService.php', true],\n 'session_storage' => ['privates', 'session.storage.native', 'getSession_Storage_NativeService.php', true],\n ], [\n 'initialized_session' => '?',\n 'request_stack' => '?',\n 'session' => '?',\n 'session_storage' => '?',\n ]));\n }", "title": "" }, { "docid": "696546941fe250b120aebd37dca84a7a", "score": "0.58113784", "text": "protected function getWebhookListenerService()\n {\n if ($this->webhookListenerService == null) {\n $this->webhookListenerService = new \\PostFinanceCheckout\\Sdk\\Service\\WebhookListenerService(\n PostFinanceCheckoutHelper::getApiClient()\n );\n }\n return $this->webhookListenerService;\n }", "title": "" }, { "docid": "3a65cc727fc837cfcb573175e7534cb2", "score": "0.57990754", "text": "protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->get('router')) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['monolog.logger.request']) ? $this->services['monolog.logger.request'] : $this->get('monolog.logger.request', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "255725798a5cced333bd498cddfe5e35", "score": "0.57840294", "text": "public function getEventsManager()\n {\n return $this->getDi()->getShared(ServiceMeta::SERVICE_EVENTS);\n }", "title": "" }, { "docid": "fcd5fe4f5d7587eeb2813239d1dc6eef", "score": "0.5767442", "text": "protected function getProfilerListenerService()\n {\n return $this->services['profiler_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener(${($_ = isset($this->services['profiler']) ? $this->services['profiler'] : $this->get('profiler')) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}, NULL, false, false);\n }", "title": "" }, { "docid": "7665dbdef023998a061e7a8fce2f449b", "score": "0.57657564", "text": "protected function getDispatcherService()\n {\n $this->services['dispatcher'] = $instance = new \\phpbb\\event\\dispatcher($this);\n\n $instance->addSubscriberService('kernel_exception_subscriber', 'phpbb\\\\install\\\\event\\\\kernel_exception_subscriber');\n $instance->addSubscriberService('kernel_terminate_subscriber', 'phpbb\\\\event\\\\kernel_terminate_subscriber');\n $instance->addSubscriberService('symfony_response_listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\ResponseListener');\n $instance->addSubscriberService('router.listener', 'Symfony\\\\Component\\\\HttpKernel\\\\EventListener\\\\RouterListener');\n $instance->addSubscriberService('console.exception_subscriber', 'phpbb\\\\console\\\\exception_subscriber');\n\n return $instance;\n }", "title": "" }, { "docid": "0a24720eb2b526b4c40988a608bb7f06", "score": "0.5757728", "text": "protected function getProfilerListenerService()\n {\n return $this->services['profiler_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener(${($_ = isset($this->services['profiler']) ? $this->services['profiler'] : $this->getProfilerService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, NULL, false, false);\n }", "title": "" }, { "docid": "680568b60d9314dcf7c4c99af16dc4b3", "score": "0.5756013", "text": "public function getGlobalEventsManager()\n {\n return Di::getDefault()->get(Services::EVENTS_MANAGER);\n }", "title": "" }, { "docid": "31532636a08d7108edc5bf4eb3ab05fb", "score": "0.5734562", "text": "protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener($this->get('router'), $this->get('router.request_context', ContainerInterface::NULL_ON_INVALID_REFERENCE), NULL, $this->get('request_stack'));\n }", "title": "" }, { "docid": "5a0c2e596dab4a07695c53026e546d0a", "score": "0.57305956", "text": "public function getResponse(): ResponseHandler\n {\n return $this->response;\n }", "title": "" }, { "docid": "7fd7b8bc4091eeaab8b4b3f768a1ac50", "score": "0.572052", "text": "public function &getResponse() : ResponseInterface\n {\n return $this->response;\n }", "title": "" }, { "docid": "f4858a57209c8478e1d3cc8da2777649", "score": "0.5714905", "text": "function response()\n {\n return DI::getInstance()->get('response');\n }", "title": "" }, { "docid": "2ada07ea7cef7e530695ccc61ef438c2", "score": "0.57094073", "text": "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->getSessionService()) && false ?: '_'};\n })));\n }", "title": "" }, { "docid": "448d2025bbe1ce2e16ca8c39d6176e9b", "score": "0.56934106", "text": "protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener(${($_ = isset($this->services['uri_signer']) ? $this->services['uri_signer'] : $this->get('uri_signer')) && false ?: '_'}, '/_fragment');\n }", "title": "" }, { "docid": "58bbcbc075626749374099106b0a336d", "score": "0.56852984", "text": "protected function getLocaleListenerService()\n {\n return $this->privates['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(($this->services['request_stack'] ?? ($this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack())), 'en', ($this->services['router'] ?? $this->getRouterService()));\n }", "title": "" }, { "docid": "e26de42519c447832a8724f6e71cc3b5", "score": "0.5677439", "text": "protected function getSessionListenerService()\n {\n return $this->services['session_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\SessionListener(new \\Symfony\\Component\\DependencyInjection\\ServiceLocator(array('session' => function () {\n return ${($_ = isset($this->services['session']) ? $this->services['session'] : $this->get('session', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'};\n })));\n }", "title": "" }, { "docid": "445577b9720e107f97d843e0ffac772a", "score": "0.56649363", "text": "protected function getRouterListenerService()\n {\n return $this->services['router_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\RouterListener(${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'}, ${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, ${($_ = isset($this->services['router.request_context']) ? $this->services['router.request_context'] : $this->getRouter_RequestContextService()) && false ?: '_'}, ${($_ = isset($this->services['monolog.logger.request']) ? $this->services['monolog.logger.request'] : $this->getMonolog_Logger_RequestService()) && false ?: '_'}, '/cocorico', true);\n }", "title": "" }, { "docid": "d4f0eed73440bf30fd8698e5971e8004", "score": "0.5661242", "text": "protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\EventDispatcher();\n\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['fos_rest.body_listener'] ?? $this->getFosRest_BodyListenerService());\n }, 1 => 'onKernelRequest'], 10);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['fos_rest.zone_matcher_listener'] ?? $this->getFosRest_ZoneMatcherListenerService());\n }, 1 => 'onKernelRequest'], 248);\n $instance->addListener('kernel.response', [0 => function () {\n return ($this->privates['App\\\\EventListener\\\\ApiHeadersListener'] ?? ($this->privates['App\\\\EventListener\\\\ApiHeadersListener'] = new \\App\\EventListener\\ApiHeadersListener()));\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.controller', [0 => function () {\n return ($this->privates['App\\\\EventListener\\\\BodyTooBigListener'] ?? ($this->privates['App\\\\EventListener\\\\BodyTooBigListener'] = new \\App\\EventListener\\BodyTooBigListener()));\n }, 1 => 'onKernelController'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['App\\\\EventListener\\\\ProfilerDisableListener'] ?? $this->getProfilerDisableListenerService());\n }, 1 => 'onKernelRequest'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['App\\\\EventListener\\\\UpdateUserRolesListener'] ?? $this->getUpdateUserRolesListenerService());\n }, 1 => 'onRequest'], 0);\n $instance->addListener('security.authentication.success', [0 => function () {\n return ($this->privates['App\\\\Security\\\\UserStateUpdater'] ?? $this->load('getUserStateUpdaterService.php'));\n }, 1 => 'updateUserState'], 0);\n $instance->addListener('kernel.controller', [0 => function () {\n return ($this->privates['sensio_framework_extra.controller.listener'] ?? $this->getSensioFrameworkExtra_Controller_ListenerService());\n }, 1 => 'onKernelController'], 0);\n $instance->addListener('kernel.controller', [0 => function () {\n return ($this->privates['sensio_framework_extra.converter.listener'] ?? $this->getSensioFrameworkExtra_Converter_ListenerService());\n }, 1 => 'onKernelController'], 0);\n $instance->addListener('kernel.controller', [0 => function () {\n return ($this->privates['sensio_framework_extra.view.listener'] ?? $this->getSensioFrameworkExtra_View_ListenerService());\n }, 1 => 'onKernelController'], -128);\n $instance->addListener('kernel.view', [0 => function () {\n return ($this->privates['sensio_framework_extra.view.listener'] ?? $this->getSensioFrameworkExtra_View_ListenerService());\n }, 1 => 'onKernelView'], 0);\n $instance->addListener('kernel.controller', [0 => function () {\n return ($this->privates['sensio_framework_extra.cache.listener'] ?? ($this->privates['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener()));\n }, 1 => 'onKernelController'], 0);\n $instance->addListener('kernel.response', [0 => function () {\n return ($this->privates['sensio_framework_extra.cache.listener'] ?? ($this->privates['sensio_framework_extra.cache.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener()));\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.controller_arguments', [0 => function () {\n return ($this->privates['sensio_framework_extra.security.listener'] ?? $this->getSensioFrameworkExtra_Security_ListenerService());\n }, 1 => 'onKernelControllerArguments'], 0);\n $instance->addListener('kernel.controller_arguments', [0 => function () {\n return ($this->privates['framework_extra_bundle.event.is_granted'] ?? $this->getFrameworkExtraBundle_Event_IsGrantedService());\n }, 1 => 'onKernelControllerArguments'], 0);\n $instance->addListener('console.command', [0 => function () {\n return ($this->privates['monolog.handler.console'] ?? $this->getMonolog_Handler_ConsoleService());\n }, 1 => 'onCommand'], 255);\n $instance->addListener('console.terminate', [0 => function () {\n return ($this->privates['monolog.handler.console'] ?? $this->getMonolog_Handler_ConsoleService());\n }, 1 => 'onTerminate'], -255);\n $instance->addListener('kernel.response', [0 => function () {\n return ($this->privates['response_listener'] ?? ($this->privates['response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener('UTF-8')));\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.response', [0 => function () {\n return ($this->privates['streamed_response_listener'] ?? ($this->privates['streamed_response_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener()));\n }, 1 => 'onKernelResponse'], -1024);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['locale_listener'] ?? $this->getLocaleListenerService());\n }, 1 => 'setDefaultLocale'], 100);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['locale_listener'] ?? $this->getLocaleListenerService());\n }, 1 => 'onKernelRequest'], 16);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ($this->privates['locale_listener'] ?? $this->getLocaleListenerService());\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['validate_request_listener'] ?? ($this->privates['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener()));\n }, 1 => 'onKernelRequest'], 256);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['.legacy_resolve_controller_name_subscriber'] ?? $this->get_LegacyResolveControllerNameSubscriberService());\n }, 1 => 'resolveControllerName'], 24);\n $instance->addListener('kernel.controller_arguments', [0 => function () {\n return ($this->privates['exception_listener'] ?? $this->getExceptionListenerService());\n }, 1 => 'onControllerArguments'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ($this->privates['exception_listener'] ?? $this->getExceptionListenerService());\n }, 1 => 'logKernelException'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ($this->privates['exception_listener'] ?? $this->getExceptionListenerService());\n }, 1 => 'onKernelException'], -128);\n $instance->addListener('console.error', [0 => function () {\n return ($this->privates['console.error_listener'] ?? $this->load('getConsole_ErrorListenerService.php'));\n }, 1 => 'onConsoleError'], -128);\n $instance->addListener('console.terminate', [0 => function () {\n return ($this->privates['console.error_listener'] ?? $this->load('getConsole_ErrorListenerService.php'));\n }, 1 => 'onConsoleTerminate'], -128);\n $instance->addListener('console.error', [0 => function () {\n return ($this->privates['console.suggest_missing_package_subscriber'] ?? ($this->privates['console.suggest_missing_package_subscriber'] = new \\Symfony\\Bundle\\FrameworkBundle\\EventListener\\SuggestMissingPackageSubscriber()));\n }, 1 => 'onConsoleError'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['session_listener'] ?? $this->getSessionListenerService());\n }, 1 => 'onKernelRequest'], 128);\n $instance->addListener('kernel.response', [0 => function () {\n return ($this->privates['session_listener'] ?? $this->getSessionListenerService());\n }, 1 => 'onKernelResponse'], -1000);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ($this->privates['session_listener'] ?? $this->getSessionListenerService());\n }, 1 => 'onFinishRequest'], 0);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['fragment.listener'] ?? $this->getFragment_ListenerService());\n }, 1 => 'onKernelRequest'], 48);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['debug.debug_handlers_listener'] ?? $this->getDebug_DebugHandlersListenerService());\n }, 1 => 'configure'], 2048);\n $instance->addListener('console.command', [0 => function () {\n return ($this->privates['debug.debug_handlers_listener'] ?? $this->getDebug_DebugHandlersListenerService());\n }, 1 => 'configure'], 2048);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['router_listener'] ?? $this->getRouterListenerService());\n }, 1 => 'onKernelRequest'], 32);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ($this->privates['router_listener'] ?? $this->getRouterListenerService());\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ($this->privates['router_listener'] ?? $this->getRouterListenerService());\n }, 1 => 'onKernelException'], -64);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['security.firewall'] ?? $this->getSecurity_FirewallService());\n }, 1 => 'configureLogoutUrlGenerator'], 8);\n $instance->addListener('kernel.request', [0 => function () {\n return ($this->privates['security.firewall'] ?? $this->getSecurity_FirewallService());\n }, 1 => 'onKernelRequest'], 8);\n $instance->addListener('kernel.finish_request', [0 => function () {\n return ($this->privates['security.firewall'] ?? $this->getSecurity_FirewallService());\n }, 1 => 'onKernelFinishRequest'], 0);\n $instance->addListener('kernel.response', [0 => function () {\n return ($this->privates['security.rememberme.response_listener'] ?? ($this->privates['security.rememberme.response_listener'] = new \\Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener()));\n }, 1 => 'onKernelResponse'], 0);\n $instance->addListener('kernel.exception', [0 => function () {\n return ($this->privates['fos_rest.exception_listener'] ?? $this->load('getFosRest_ExceptionListenerService.php'));\n }, 1 => 'onKernelException'], -100);\n $instance->addListener('kernel.view', [0 => function () {\n return ($this->privates['fos_rest.view_response_listener'] ?? $this->load('getFosRest_ViewResponseListenerService.php'));\n }, 1 => 'onKernelView'], 30);\n\n return $instance;\n }", "title": "" }, { "docid": "87620aa67792b17d9c5c5c66c4bc97e3", "score": "0.5627936", "text": "protected function getFragment_ListenerService()\n {\n return $this->services['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener(${($_ = isset($this->services['uri_signer']) ? $this->services['uri_signer'] : $this->services['uri_signer'] = new \\Symfony\\Component\\HttpKernel\\UriSigner('ThisTokenIsNotSoSecretChangeIt')) && false ?: '_'}, '/_fragment');\n }", "title": "" }, { "docid": "ddfa4577f46b519896a24d40aedc4297", "score": "0.56220245", "text": "function Response()\n{\n return $GLOBALS[\"Response\"];\n}", "title": "" }, { "docid": "fb3b768f7e503be4be30cd5c24dd5d0f", "score": "0.5548611", "text": "function response(){\n return Response::getInstance();\n}", "title": "" }, { "docid": "02319991c8d47ab65c817e088ce215b3", "score": "0.5527398", "text": "protected function getFragment_ListenerService()\n {\n return $this->privates['fragment.listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\FragmentListener(($this->privates['uri_signer'] ?? ($this->privates['uri_signer'] = new \\Symfony\\Component\\HttpKernel\\UriSigner($this->getEnv('APP_SECRET')))), '/_fragment');\n }", "title": "" }, { "docid": "ca65154d730259959c804e045bcc97ad", "score": "0.5511528", "text": "function get_response() {\n return $this->response;\n }", "title": "" }, { "docid": "defacb058420c692c2de8cfd0cd60b94", "score": "0.549848", "text": "protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}, 'en', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "69b6537d7e7c15beb4360ae281a0d459", "score": "0.549709", "text": "protected function getSwiftmailer_EmailSender_ListenerService()\n {\n return $this->services['swiftmailer.email_sender.listener'] = new \\Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener($this, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "b8d606851799df52a8d6d45a2e4c4fdd", "score": "0.5496746", "text": "public function getRunningListener()\r\n\t{\r\n\t\treturn $this->running_listener;\r\n\t}", "title": "" }, { "docid": "38929be492382a4f8622e00318f5006a", "score": "0.54841614", "text": "protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->services['request_stack'] = new \\Symfony\\Component\\HttpFoundation\\RequestStack()) && false ?: '_'}, 'fr', ${($_ = isset($this->services['router']) ? $this->services['router'] : $this->getRouterService()) && false ?: '_'});\n }", "title": "" }, { "docid": "12c011e7312b631a732b5b7def81ac31", "score": "0.54446125", "text": "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "title": "" }, { "docid": "12c011e7312b631a732b5b7def81ac31", "score": "0.54446125", "text": "protected function getValidateRequestListenerService()\n {\n return $this->services['validate_request_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener();\n }", "title": "" }, { "docid": "5f92d2134cbd86348a9342696084ef66", "score": "0.5443795", "text": "protected function getUpdateUserRolesListenerService()\n {\n return $this->privates['App\\\\EventListener\\\\UpdateUserRolesListener'] = new \\App\\EventListener\\UpdateUserRolesListener(($this->services['security.token_storage'] ?? $this->getSecurity_TokenStorageService()));\n }", "title": "" }, { "docid": "97b2d876f4d3a895499e74b923050e3d", "score": "0.54304564", "text": "public static function getServiceManager()\n\t{\n\t\treturn static::$serviceManager;\n\t}", "title": "" }, { "docid": "4ced3c3887051e4630d5751b8d37f959", "score": "0.5417228", "text": "protected function getCocorico_Review_ListenerService()\n {\n return $this->services['cocorico.review.listener'] = new \\Cocorico\\ReviewBundle\\Entity\\Listener\\ReviewListener();\n }", "title": "" }, { "docid": "8fb12acede89b8f2072c9b2c2e99243f", "score": "0.5415645", "text": "protected function getProfilerDisableListenerService()\n {\n return $this->privates['App\\\\EventListener\\\\ProfilerDisableListener'] = new \\App\\EventListener\\ProfilerDisableListener(($this->services['kernel'] ?? $this->get('kernel', 1)), ($this->privates['App\\\\Service\\\\DOMJudgeService'] ?? $this->getDOMJudgeServiceService()), NULL);\n }", "title": "" }, { "docid": "e4f4e080870e93754cf8b30fe7524be8", "score": "0.5407539", "text": "public function getResponse(): ResponseInterface\n {\n return $this->response;\n }", "title": "" }, { "docid": "e4f4e080870e93754cf8b30fe7524be8", "score": "0.5407539", "text": "public function getResponse(): ResponseInterface\n {\n return $this->response;\n }", "title": "" }, { "docid": "e4f4e080870e93754cf8b30fe7524be8", "score": "0.5407539", "text": "public function getResponse(): ResponseInterface\n {\n return $this->response;\n }", "title": "" }, { "docid": "3fa1ed168956bdbe4f060a52d261124b", "score": "0.54070985", "text": "protected function getLocaleListenerService()\n {\n return $this->services['locale_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener('en', $this->get('router', ContainerInterface::NULL_ON_INVALID_REFERENCE), $this->get('request_stack'));\n }", "title": "" }, { "docid": "d008ef2293f9a03bad8dc9081faf4f2b", "score": "0.5406966", "text": "public function service()\n {\n return $this->service;\n }", "title": "" }, { "docid": "d008ef2293f9a03bad8dc9081faf4f2b", "score": "0.5406966", "text": "public function service()\n {\n return $this->service;\n }", "title": "" }, { "docid": "d008ef2293f9a03bad8dc9081faf4f2b", "score": "0.5406966", "text": "public function service()\n {\n return $this->service;\n }", "title": "" }, { "docid": "c2656c098014de9275adc6fc8a9fbc93", "score": "0.5401821", "text": "public function getService()\n {\n return $this->subjectService;\n }", "title": "" }, { "docid": "0405f25b20e3bb806fbd12e32bc62641", "score": "0.5401176", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.53870666", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.53870666", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.53870666", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.53870666", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.53870666", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "23375ac00ccf2bc3aede6fac2bfcc1a3", "score": "0.53870666", "text": "public function getService()\n {\n return $this->service;\n }", "title": "" }, { "docid": "8ce24be5ab3ba30d79eeae85311f34b5", "score": "0.5386155", "text": "public static function instance()\n {\n if (!self::$instance) {\n\n /** @var Config $config */\n $config = ServiceLocator::instance()->get(Config::class);\n self::$listener = $config->get('eventListener');\n self::$instance = new self();\n\n if (!self::$listener) {\n self::$missingConfig = true;\n }\n\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "4bed6fa335b84598ab87c60f3871cbf5", "score": "0.53842765", "text": "protected function getLessonBackendBundle_JsonRequestListenerService()\n {\n return $this->services['lesson_backend_bundle.json_request_listener'] = new \\Lesson\\Bundle\\BackendBundle\\EventListener\\JsonRequestListener();\n }", "title": "" }, { "docid": "e8d1e2690437d6518f015245d29220e7", "score": "0.53838044", "text": "public function listens()\r\n {\r\n return $this->listen;\r\n }", "title": "" }, { "docid": "b0ef55e9b7119c280eb04cb8224dd7f5", "score": "0.5358419", "text": "protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener(${($_ = isset($this->services['sensio_framework_extra.converter.manager']) ? $this->services['sensio_framework_extra.converter.manager'] : $this->getSensioFrameworkExtra_Converter_ManagerService()) && false ?: '_'}, true);\n }", "title": "" }, { "docid": "14663940a17df92d2d859c51035c9eed", "score": "0.5356422", "text": "protected function getEventService()\n {\n return new \\Symfony\\Component\\EventDispatcher\\Event();\n }", "title": "" }, { "docid": "0773d3b0321b65522f55594b5faf6ca3", "score": "0.5344045", "text": "protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->privates['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(($this->privates['framework_extra_bundle.argument_name_convertor'] ?? $this->getFrameworkExtraBundle_ArgumentNameConvertorService()), new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ($this->privates['security.authentication.trust_resolver'] ?? ($this->privates['security.authentication.trust_resolver'] = new \\Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolver(NULL, NULL))), ($this->privates['security.role_hierarchy'] ?? $this->getSecurity_RoleHierarchyService()), ($this->services['security.token_storage'] ?? $this->getSecurity_TokenStorageService()), ($this->services['security.authorization_checker'] ?? $this->getSecurity_AuthorizationCheckerService()), ($this->privates['monolog.logger'] ?? $this->getMonolog_LoggerService()));\n }", "title": "" }, { "docid": "fb00bb0dce6f6b2208fda31a8493a37c", "score": "0.53246576", "text": "protected function getSensioFrameworkExtra_Controller_ListenerService()\n {\n return $this->privates['sensio_framework_extra.controller.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener(($this->privates['annotations.cached_reader'] ?? $this->getAnnotations_CachedReaderService()));\n }", "title": "" }, { "docid": "d06de83bb2fe04bf7a36d673bf34cd5d", "score": "0.5309686", "text": "public function get_response()\n\t{\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "7af3afcec11c57bdb9c1c56992c06af6", "score": "0.5306957", "text": "public function get_response()\n {\n return $this->response;\n }", "title": "" }, { "docid": "f349330e5efdabc9524627a34860489a", "score": "0.5303909", "text": "protected function getSensioFrameworkExtra_Security_ListenerService()\n {\n return $this->services['sensio_framework_extra.security.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener(NULL, new \\Sensio\\Bundle\\FrameworkExtraBundle\\Security\\ExpressionLanguage(), ${($_ = isset($this->services['security.authentication.trust_resolver']) ? $this->services['security.authentication.trust_resolver'] : $this->getSecurity_Authentication_TrustResolverService()) && false ?: '_'}, ${($_ = isset($this->services['security.role_hierarchy']) ? $this->services['security.role_hierarchy'] : $this->getSecurity_RoleHierarchyService()) && false ?: '_'}, ${($_ = isset($this->services['security.token_storage']) ? $this->services['security.token_storage'] : $this->get('security.token_storage', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'}, ${($_ = isset($this->services['security.authorization_checker']) ? $this->services['security.authorization_checker'] : $this->get('security.authorization_checker', ContainerInterface::NULL_ON_INVALID_REFERENCE)) && false ?: '_'});\n }", "title": "" }, { "docid": "2e12f9bd8f1dab07b3a4e96d1ab59515", "score": "0.5300909", "text": "public function getService()\n {\n return $this->Service;\n }", "title": "" }, { "docid": "edd4f22ef09586c7cd1a6cd1c41932cc", "score": "0.52867013", "text": "public function getEventsManager() {\n return myDI::getDefault()->get('eventsManager');\n }", "title": "" }, { "docid": "df4cb70686925954bf34c2cda1310d17", "score": "0.528555", "text": "protected function getDispatcherService()\n {\n return $this->services['dispatcher'] = new \\Symfony\\Component\\EventDispatcher\\EventDispatcher();\n }", "title": "" }, { "docid": "2e12c28afc07b8a34dfc098038b6bb41", "score": "0.52806425", "text": "protected function getSensioFrameworkExtra_Converter_ListenerService()\n {\n return $this->services['sensio_framework_extra.converter.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener(${($_ = isset($this->services['sensio_framework_extra.converter.manager']) ? $this->services['sensio_framework_extra.converter.manager'] : $this->get('sensio_framework_extra.converter.manager')) && false ?: '_'}, true);\n }", "title": "" }, { "docid": "977c7d55d4aafda1734b34a23a00f0b2", "score": "0.52763957", "text": "public function getResponse() : ResponseInterface\n {\n return $this->response;\n }", "title": "" }, { "docid": "b92fa9596195d14fcbe181228e54ee03", "score": "0.52725554", "text": "public function getListenerInstance(EventDispatcher $eventDispatcher = null, StreamableInterface $stream = null)\n {\n //instantiate the key matcher object\n $reflection = new \\ReflectionClass('\\\\Iber\\\\Phkey\\\\Environment\\\\' . $this->getEnvironment() . '\\\\Matcher');\n $matcher = $reflection->newInstance();\n\n $reflection = new \\ReflectionClass('\\\\Iber\\\\Phkey\\\\Environment\\\\' . $this->getEnvironment() . '\\\\Listener');\n\n if (null === $eventDispatcher) {\n $eventDispatcher = new EventDispatcher();\n }\n\n if (null === $stream) {\n $stream = new Stream();\n }\n\n $listener = $reflection->newInstance($matcher, $eventDispatcher, $stream);\n\n return $listener;\n }", "title": "" }, { "docid": "d5dc89a6b4406313c307b1f8b934b056", "score": "0.5269046", "text": "public function setResponses($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Firestore\\V1\\ListenResponse::class);\n $this->responses = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "aab94c3243e75d45d6b045b3fce32972", "score": "0.52632475", "text": "protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener('', NULL, '', NULL, true, NULL);\n }", "title": "" }, { "docid": "8e075395a40440b95f595e93f4b28a5d", "score": "0.5261421", "text": "public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }", "title": "" }, { "docid": "c6873c7c9369d4871bc21b566ebfa26f", "score": "0.5254726", "text": "public function getDefaultListener()\r\n\t{\r\n\t\treturn $this->default_listener;\r\n\t}", "title": "" }, { "docid": "dead2f678ca451807f010a6968163723", "score": "0.52517307", "text": "protected function getEventLogServiceService()\n {\n return $this->privates['App\\\\Service\\\\EventLogService'] = new \\App\\Service\\EventLogService(($this->privates['App\\\\Service\\\\DOMJudgeService'] ?? $this->getDOMJudgeServiceService()), ($this->services['App\\\\Service\\\\ConfigurationService'] ?? $this->getConfigurationServiceService()), ($this->services['doctrine.orm.default_entity_manager'] ?? $this->getDoctrine_Orm_DefaultEntityManagerService()), ($this->privates['monolog.logger'] ?? $this->getMonolog_LoggerService()));\n }", "title": "" }, { "docid": "30ffa176774cd404ea5610ff4f827d09", "score": "0.52322495", "text": "protected function getResponse(): Response\n {\n return $this->container->get('response');\n }", "title": "" }, { "docid": "1f570c8461f0f37b59f80dbb717388f8", "score": "0.5231263", "text": "protected function getSensioFrameworkExtra_View_ListenerService()\n {\n return $this->privates['sensio_framework_extra.view.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener(new \\Sensio\\Bundle\\FrameworkExtraBundle\\Templating\\TemplateGuesser(($this->services['kernel'] ?? $this->get('kernel', 1))), ($this->services['twig'] ?? $this->getTwigService()));\n }", "title": "" }, { "docid": "ae8935bb84e1164f21e4610c3d34d838", "score": "0.52239937", "text": "public function getServiceManager()\n {\n return $this->service_manager;\n }", "title": "" }, { "docid": "876acdbe79d6967a2c1702200234c130", "score": "0.5221307", "text": "public function getServiceManager ()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "f599628b31b916c6b73c92279a6ba1dd", "score": "0.52136755", "text": "public function getService()\r\n {\r\n return $this->getPlugin()->getService();\r\n }", "title": "" }, { "docid": "1e6ebb3562e715ad63bbf12c237ab350", "score": "0.5206653", "text": "public static function response()\n {\n return static::$app['api.http.response'];\n }", "title": "" }, { "docid": "83e5797b5febaf37256a4cfd3dadac5f", "score": "0.52043664", "text": "public function getLogListener(): ?callable\n {\n return $this->logListener;\n }", "title": "" }, { "docid": "c82f4f0504d57004b512d43191d21f14", "score": "0.51944524", "text": "protected function getSensioFrameworkExtra_Controller_ListenerService()\n {\n return $this->services['sensio_framework_extra.controller.listener'] = new \\Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->get('annotation_reader')) && false ?: '_'});\n }", "title": "" }, { "docid": "0c55e47ccbddb2cd715709e96da4e7a8", "score": "0.51923394", "text": "function GetResponse()\n {\n return $this->mResponse;\n }", "title": "" }, { "docid": "fdb3f6c3fba910e5abd5bf1fce30abaa", "score": "0.5184074", "text": "public function getServiceManager() {\n\t\treturn $this->serviceManager;\n\t}", "title": "" }, { "docid": "bec9f685d20b1b0a2cbf8fc5b75ede83", "score": "0.51813686", "text": "static function getResponse() {\n\t\treturn self::getObjectFromRegistry('PPI_Response');\n\n\t}", "title": "" }, { "docid": "9864faf0038815f923e1be90a0bf9664", "score": "0.51727563", "text": "function getService() {\r\n\t\t\r\n\t\tif ( !isset( $this->sessionToken ) ) {\r\n\t\t\tthrow new Exception('No sessionToken set when trying to call AuthSubber::createServiceObject()');\r\n\t\t}\r\n\t\t\r\n\t\t// Create a service object and set the session token for subsequent requests\r\n\t\t$this->s->$this->scope = new $this->scopeClass(null, $this->appName);\r\n\t\t$this->s->$this->scope->setAuthSubToken($this->sessionToken);\r\n\t\t\r\n\t\t// Return the service object\r\n\t\treturn $this->s->$this->scope;\r\n\t\t\r\n\t}", "title": "" } ]
65f68a985c9940865814758b1d2ebdec
Perform the HTTP request with the supplied body
[ { "docid": "5c92e0c8f6a04c5f69f90830a047a6cb", "score": "0.6514537", "text": "public function make(string $body = '')\n {\n $this->response = null;\n try{\n $query = $this->getQueryString();\n $reqUri = $this->url . $query;\n $response = $this->client->request($this->reqMethod, $reqUri, ['body' => $body, 'headers' => $this->headers]);\n $this->response = $response;\n return true;\n }\n catch(\\Throwable $e)\n {\n throw new HTTPRequestException($e->getMessage(), $e->getCode(), $e);\n }\n return false;\n }", "title": "" } ]
[ { "docid": "6267f8174530e02e7023f18ab5ac75ef", "score": "0.68492746", "text": "abstract public function request($url, $headers=null, $method='GET', $body=null);", "title": "" }, { "docid": "75f50aa108475d3c9f64dc0a443008fb", "score": "0.68043375", "text": "public function request($method, $path, array $query = array(), $body = NULL, \n $raw_body = FALSE, $headers = array());", "title": "" }, { "docid": "035a3971145f9a8cd21ad7e3a2f09618", "score": "0.6510839", "text": "protected function request($requestHeaders,$body){\n $ch = curl_init($this->getApiUrl());\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $body);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);\n $strResponse = curl_exec($ch);\n curl_close($ch);\n return $strResponse;\n }", "title": "" }, { "docid": "1ee5944b9ecf950b97af7f10d12fc38e", "score": "0.65092605", "text": "public function request($method, $location, array $headers = null, $body = null);", "title": "" }, { "docid": "0032ce43f2f09ee36a8ac4a350bff41d", "score": "0.6406817", "text": "abstract public function request($path, $method = 'GET', $body = null, array $extraHeaders = array());", "title": "" }, { "docid": "73bf1f617e2a788e1addfdae65d44d8d", "score": "0.63577116", "text": "private function performRequest($path = '', $method = 'GET', $body = '') {\r\n $meth = strtoupper($method);\r\n if(isset($this->apiurl))\r\n $fullURL = $this->apiurl . $path;\r\n else\r\n $fullURL = API_URL . $path;\r\n $this->conn = curl_init($fullURL);\r\n if (isset($this->proxyurl)) {\r\n curl_setopt($this->conn, CURLOPT_PROXY, $this->proxyurl);\r\n }\r\n\r\n curl_setopt($this->conn, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($this->conn, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($this->conn, CURLOPT_SSL_VERIFYHOST, false);\r\n //curl_setopt($this->conn, CURLOPT_TIMEOUT_MS, $this->timeout);\r\n curl_setopt($this->conn, CURLOPT_FAILONERROR, false);\r\n curl_setopt($this->conn, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\r\n curl_setopt($this->conn, CURLOPT_USERPWD, \"$this->apikey:$this->apisecret\");\r\n curl_setopt($this->conn, CURLOPT_HTTPHEADER, array(\r\n \"Accept:application/json\",\r\n \"Content-type: application/json\",\r\n ));\r\n\r\n curl_setopt($this->conn, CURLOPT_CUSTOMREQUEST, $meth);\r\n if ($meth == 'POST' || $meth == 'PUT') {\r\n curl_setopt($this->conn, CURLOPT_POSTFIELDS, json_encode($body));\r\n }\r\n\r\n $res = curl_exec($this->conn);\r\n return self::handleResponse(json_decode($res), $meth, $path);\r\n }", "title": "" }, { "docid": "9c93e8fb5a4badcd6ce66e65cf5b814f", "score": "0.61513853", "text": "private function sendRequest($url, $body, $method = \"POST\")\n {\n $client = new \\GuzzleHttp\\Client();\n try {\n if (strtoupper($method) == \"GET\") {\n $response = $client->request('GET', $this->BASE_URL.$url, [\n 'headers' => [\n 'user-access-token' => $this->userAccessToken,\n 'client-id' => $this->clientId\n ]\n ]);\n } else {\n $response = $client->request('POST', $this->BASE_URL.$url, [\n 'headers' => [\n 'user-access-token' => $this->userAccessToken,\n 'client-id' => $this->clientId\n ],\n 'form_params' => $body\n ]);\n }\n\n if ($response->getStatusCode() == 200) {\n return json_decode($response->getBody(), true);\n }\n } catch (\\Exception $th) {\n throw new NebbixClientException($th->getResponse()->getBody(true));\n }\n }", "title": "" }, { "docid": "9f6938804e934ca0da9970952c32a4a4", "score": "0.6086832", "text": "protected function doRequest($httpVerb, $path, $requestBody = null) {\n if (strpos($path, $this->url) === 0) {\n $path = substr($path, strlen($this->url) - 1);\n }\n\n $curl = $this->getConnection();\n curl_setopt($curl, CURLOPT_TIMEOUT, 60);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpVerb);\n curl_setopt($curl, CURLOPT_URL, $this->url . $path);\n curl_setopt($curl, CURLOPT_ENCODING, 'gzip');\n curl_setopt($curl, CURLOPT_HTTPHEADER, array_merge(array(\n 'Accept: application/json',\n 'Content-Type: application/json',\n 'User-Agent: Websupport PHP Library',\n ), $this->aditionalHeaders));\n\n if ($this->publicKey !== null && $this->privateKey !== null) {\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($curl, CURLOPT_USERPWD, $this->publicKey . ':' . $this->privateKey);\n }\n\n if ($this->ssl) {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);\n if ($this->caFile) {\n curl_setopt($curl, CURLOPT_CAINFO, $this->caFile);\n }\n } else {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n }\n\n if (!empty($requestBody)) {\n curl_setopt($curl, CURLOPT_POSTFIELDS, $requestBody);\n }\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n if ($httpStatus == 0) {\n $errorMessage = curl_error($curl);\n throw new RestException($errorMessage);\n }\n\n if (!$this->persistent) {\n curl_close($curl);\n }\n\n return array($response, $httpStatus);\n }", "title": "" }, { "docid": "3d131893df691935aeee3e40f3bdfe85", "score": "0.6065327", "text": "public function curl_request($url, $body = NULL)\n\t{\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $body); \n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/json')); \n\t\t\n\t\t$output = curl_exec($ch);\n\t\t\n\t\tcurl_close($ch);\t\n\t\t\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "4bab58044ee372fddd38b876d959d568", "score": "0.59784555", "text": "public function requestPost(string $path, string $body): bool;", "title": "" }, { "docid": "6c25164b742e77b7164c7730561ba918", "score": "0.5930934", "text": "public function get(string $body): \\Psr\\Http\\Message\\ResponseInterface\n {\n }", "title": "" }, { "docid": "0b253799a1258cf8d4964899a2613e36", "score": "0.59104913", "text": "protected function updateBillOfLadingRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateBillOfLading'\n );\n }\n\n $resourcePath = '/beta/billOfLading';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "29ac2d2e0066087036c5ad9178b6c993", "score": "0.59028614", "text": "protected function spamcheckPutRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling spamcheckPut'\n );\n }\n\n $resourcePath = '/spamcheck';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "63dd52e8ca8f03155e354796ff2a80af", "score": "0.58996725", "text": "protected function addBillOfLadingRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addBillOfLading'\n );\n }\n\n $resourcePath = '/beta/billOfLading';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4851d25c589f8b5a13830e3b06c72c27", "score": "0.5842806", "text": "private function request()\n {\n $this->response = $this->client->request($this->httpMethod,$this->uri);\n }", "title": "" }, { "docid": "855bce6e797da4a561a2b37c842c97d0", "score": "0.58093625", "text": "protected function addOrderSourceRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addOrderSource'\n );\n }\n\n $resourcePath = '/beta/orderSource';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e81b493b0e6aeb067946b3c0b543799d", "score": "0.58011067", "text": "public function request($uri, $method = 'GET', array $headers = array(), array $data = array());", "title": "" }, { "docid": "1b928e323b4e8a817b7872f76f5e031a", "score": "0.5780202", "text": "protected function updateOrderSourceRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateOrderSource'\n );\n }\n\n $resourcePath = '/beta/orderSource';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "787833faadfc982952a6f21a5b267637", "score": "0.57746446", "text": "public function request(string $username, string $secret, string $method, string $path, string $body): ResponseInterface;", "title": "" }, { "docid": "b97a97e6e1f28ef9045986348727967c", "score": "0.5771136", "text": "public function sendHttpRequest($requestBody)\n\t{\n\t\t//build eBay headers using variables passed via constructor\n\t\t\n\t\t$headers = $this->buildEbayHeaders();\n\t\t//Log::write(\"\\r\\ntimeX:\".time().\"\\r\\n\");\n\t\t//initialise a CURL session\n\t\t$connection = curl_init();\n\t\t//set the server we are using (could be Sandbox or Production server)\n\t\t\n\t\t//curl_setopt($connection, CURLOPT_CONNECTTIMEOUT, 60);\t//设置超时时间\n\t\tcurl_setopt($connection, CURLOPT_URL, $this->serverUrl);\n\t\tcurl_setopt($connection, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\t\tcurl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($connection, CURLOPT_HTTPHEADER, $headers);\n\t\tcurl_setopt($connection, CURLOPT_POST, 1);\n\t\tcurl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody);\n\t\tcurl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);\n\n\t\t$response = curl_exec($connection);\n\t\t$curl_info\t=\tcurl_getinfo($connection);\n\t\t$x\t=\tvar_export($curl_info, true);\n\t\t//Log::write(\"\\r\\ncurl:\".$x.\"\\r\\n\");\n\t\t//close the connection\n\t\tcurl_close($connection);\n\t\t//Log::write(\"\\r\\ntimeY:\".time().\"\\r\\n\");\n\t\t//return the response\n\t\t//print_r($response);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "3fb9a02bef54bf1d2c540b6c34716653", "score": "0.57666034", "text": "protected function mailingsPostRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingsPost'\n );\n }\n\n $resourcePath = '/mailings';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7c694acab5c990559a8771856a783912", "score": "0.57516825", "text": "protected function mailingsPutRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingsPut'\n );\n }\n\n $resourcePath = '/mailings';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e2c35be1038c1ae66ab3f5325d0873d9", "score": "0.5743598", "text": "public function sendHttpRequest($requestBody)\n\t{\n\t\t//Build eBay headers using variables passed via constructor\n\t\t$headers = $this->buildEbayHeaders();\n\t\t\n\t\t//Initialise a CURL session\n\t\t$connection = curl_init();\n\t\t//Set the server we are using (could be Sandbox or Production server)\n\t\tcurl_setopt($connection, CURLOPT_URL, $this->serverUrl);\n\t\t\n\t\t//Stop CURL from verifying the peer's certificate\n\t\tcurl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\n\t\t//Set the headers using the array of headers\n\t\tcurl_setopt($connection, CURLOPT_HTTPHEADER, $headers);\n\t\t\n\t\t//Set method as POST\n\t\tcurl_setopt($connection, CURLOPT_POST, 1);\n\t\t\n\t\t//Set the XML body of the request\n\t\tcurl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody);\n\t\t\n\t\t//Set it to return the transfer as a string from curl_exec\n\t\tcurl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);\n \n\t\t//Send the Request\n\t\t$response = curl_exec($connection);\n\t\t\n\t\t//Close the connection\n\t\tcurl_close($connection);\n\t\t\n\t\t//Return the response\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "a513b2f8838265b7a1a9b4abca74f1b9", "score": "0.5739441", "text": "public function call($path) {\n if($this->method === '') {\n throw new Exception(\"Method not set\");\n }\n if($this->method !== 'GET' && $this->params === '') {\n throw new Exception(\"Body parameters expected but none binded, use bind(params)\");\n }\n\n $error = '';\n curl_setopt($this->ch, CURLOPT_URL, $this->apihost . $path);\n $response = curl_exec($this->ch);\n $error = curl_error($this->ch);\n $errno = curl_errno($this->ch);\n if (0 !== $errno) {\n throw new Exception($error . \" \" . $errno);\n }\n\n return json_decode($response);\n\n }", "title": "" }, { "docid": "fa63c353bad527aec74516d739d6425a", "score": "0.5739053", "text": "private static function makeRequest($ch, $url, $body, $headers)\n {\n $url = static::getHost() . $url;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));\n }", "title": "" }, { "docid": "bd95e2e718eed86da0559bde3967e6c4", "score": "0.5667343", "text": "public function getRequestBody();", "title": "" }, { "docid": "856a3c9723c1935ef2f5f974aabaa23d", "score": "0.5665341", "text": "abstract protected function request( $method, $path, $data, $raw = false );", "title": "" }, { "docid": "55b8b9771661971171da5209476ce59d", "score": "0.5664937", "text": "public function request($method, $url = '', $body = null, $headers = array()) {\n\n $url = $this->getAbsoluteUrl($url);\n\n $curlSettings = array(\n CURLOPT_RETURNTRANSFER => true,\n // Return headers as part of the response\n CURLOPT_HEADER => true,\n\n // For security we cast this to a string. If somehow an array could\n // be passed here, it would be possible for an attacker to use @ to\n // post local files.\n CURLOPT_POSTFIELDS => (string)$body,\n // Automatically follow redirects\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_MAXREDIRS => 5,\n );\n\n if($this->verifyPeer !== null) {\n $curlSettings[CURLOPT_SSL_VERIFYPEER] = $this->verifyPeer;\n }\n\n if($this->trustedCertificates) {\n $curlSettings[CURLOPT_CAINFO] = $this->trustedCertificates;\n }\n\n switch ($method) {\n case 'HEAD' :\n\n // do not read body with HEAD requests (this is necessary because cURL does not ignore the body with HEAD\n // requests when the Content-Length header is given - which in turn is perfectly valid according to HTTP\n // specs...) cURL does unfortunately return an error in this case (\"transfer closed transfer closed with\n // ... bytes remaining to read\") this can be circumvented by explicitly telling cURL to ignore the\n // response body\n $curlSettings[CURLOPT_NOBODY] = true;\n $curlSettings[CURLOPT_CUSTOMREQUEST] = 'HEAD';\n break;\n\n default:\n $curlSettings[CURLOPT_CUSTOMREQUEST] = $method;\n break;\n\n }\n\n // Adding HTTP headers\n $nHeaders = array();\n foreach($headers as $key=>$value) {\n\n $nHeaders[] = $key . ': ' . $value;\n\n }\n $curlSettings[CURLOPT_HTTPHEADER] = $nHeaders;\n\n if ($this->proxy) {\n $curlSettings[CURLOPT_PROXY] = $this->proxy;\n }\n\n if ($this->userName && $this->authType) {\n $curlType = 0;\n if ($this->authType & self::AUTH_BASIC) {\n $curlType |= CURLAUTH_BASIC;\n }\n if ($this->authType & self::AUTH_DIGEST) {\n $curlType |= CURLAUTH_DIGEST;\n }\n $curlSettings[CURLOPT_HTTPAUTH] = $curlType;\n $curlSettings[CURLOPT_USERPWD] = $this->userName . ':' . $this->password;\n }\n\n list(\n $response,\n $curlInfo,\n $curlErrNo,\n $curlError\n ) = $this->curlRequest($url, $curlSettings);\n\n $headerBlob = substr($response, 0, $curlInfo['header_size']);\n $response = substr($response, $curlInfo['header_size']);\n\n // In the case of 100 Continue, or redirects we'll have multiple lists\n // of headers for each separate HTTP response. We can easily split this\n // because they are separated by \\r\\n\\r\\n\n $headerBlob = explode(\"\\r\\n\\r\\n\", trim($headerBlob, \"\\r\\n\"));\n\n // We only care about the last set of headers\n $headerBlob = $headerBlob[count($headerBlob)-1];\n\n // Splitting headers\n $headerBlob = explode(\"\\r\\n\", $headerBlob);\n\n $headers = array();\n foreach($headerBlob as $header) {\n $parts = explode(':', $header, 2);\n if (count($parts)==2) {\n $headers[strtolower(trim($parts[0]))] = trim($parts[1]);\n }\n }\n\n $response = array(\n 'body' => $response,\n 'statusCode' => $curlInfo['http_code'],\n 'headers' => $headers\n );\n\n if ($curlErrNo) {\n throw new Exception('[CURL] Error while making request: ' . $curlError . ' (error code: ' . $curlErrNo . ')');\n }\n\n if ($response['statusCode']>=400) {\n switch ($response['statusCode']) {\n case 400 :\n throw new Exception\\BadRequest('Bad request');\n case 401 :\n throw new Exception\\NotAuthenticated('Not authenticated');\n case 402 :\n throw new Exception\\PaymentRequired('Payment required');\n case 403 :\n throw new Exception\\Forbidden('Forbidden');\n case 404:\n throw new Exception\\NotFound('Resource not found.');\n case 405 :\n throw new Exception\\MethodNotAllowed('Method not allowed');\n case 409 :\n throw new Exception\\Conflict('Conflict');\n case 412 :\n throw new Exception\\PreconditionFailed('Precondition failed');\n case 416 :\n throw new Exception\\RequestedRangeNotSatisfiable('Requested Range Not Satisfiable');\n case 500 :\n throw new Exception('Internal server error');\n case 501 :\n throw new Exception\\NotImplemented('Not Implemented');\n case 507 :\n throw new Exception\\InsufficientStorage('Insufficient storage');\n default:\n throw new Exception('HTTP error response. (errorcode ' . $response['statusCode'] . ')');\n }\n }\n\n return $response;\n\n }", "title": "" }, { "docid": "e13a12f6b7b4cfbc8ed4ec5a80f16d69", "score": "0.5657509", "text": "protected function _doRequest($path, $httpMethod = self::HTTP_METHOD_GET, $params = array(), $attachment = '', $timeout = null)\n {\n $url = $this->_buildUrl($path, $params);\n\n $ch = curl_init();\n\n if ($httpMethod == self::HTTP_METHOD_POST) {\n curl_setopt($ch, CURLOPT_POST, true);\n }\n\n if (strlen($attachment) > 0) {\n curl_setopt($ch, CURLOPT_POSTFIELDS, array(\n 'file' => '@' . realpath($attachment)\n ));\n }\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT_MS, $this->_connectTimeout);\n curl_setopt($ch, CURLOPT_TIMEOUT_MS, !is_null($timeout) ? $timeout : $this->_timeout);\n\n $output = curl_exec($ch);\n $httpStatusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $error = curl_error($ch);\n $errorNumber = curl_errno($ch);\n\n curl_close($ch);\n\n if (false === $output) {\n \n if ($this->_reportSender) {\n $message = 'cURL error = ' . $error . ' - Error number = ' . $errorNumber;\n\n $this->_reportSender->sendReport($url, $httpMethod, $this->_apiKey, $this->_language, $this->_storeCode, $message);\n }\n\n throw new Bitbull_Tooso_Exception('cURL error = ' . $error, $errorNumber);\n\n } else if ($httpStatusCode != 200) {\n\n if ($this->_reportSender) {\n $message = 'API unavailable, HTTP STATUS CODE = ' . $httpStatusCode;\n\n $response = json_decode($output);\n if (isset($response->ToosoError) && isset($response->ToosoError->DebugInfo)) {\n $message .= \"\\n\\nDebugInfo: \" . $response->ToosoError->DebugInfo;\n }\n\n $this->_reportSender->sendReport($url, $httpMethod, $this->_apiKey, $this->_language, $this->_storeCode, $message);\n }\n\n throw new Bitbull_Tooso_Exception('API unavailable, HTTP STATUS CODE = ' . $httpStatusCode, 0);\n\n } else {\n $response = json_decode($output);\n\n if (isset($response->ToosoError)) {\n $e = new Bitbull_Tooso_Exception($response->ToosoError->Description, $response->Code);\n $e->setDebugInfo($response->ToosoError->DebugInfo);\n\n if ($this->_reportSender) {\n $message = 'Error description = ' . $response->ToosoError->Description . \"\\n\"\n . \"Error code = \" . $response->Code . \"\\n\"\n . \"Debug info = \" . $response->ToosoError->DebugInfo;\n\n $this->_reportSender->sendReport($url, $httpMethod, $this->_apiKey, $this->_language, $this->_storeCode, $message);\n }\n\n throw $e;\n } else {\n return $response;\n }\n }\n }", "title": "" }, { "docid": "9f7970527874f7dfa6fc35d9333effad", "score": "0.56426907", "text": "public function post(string $body): \\Psr\\Http\\Message\\ResponseInterface\n {\n }", "title": "" }, { "docid": "6e3d1631ea1e8ddf1b3d1594a11e8b2f", "score": "0.56386197", "text": "static private function makeRequest($method, $url, $body = array()) {\n\t\tif(!function_exists('curl_init') || !function_exists('curl_setopt')) {\n\t\t\t// Check are curl functions exist or not\n\t\t\tself::setErrorData('message', 'Service need a cURL support');\n\t\t\treturn false;\n\t\t}\n\t\t// Set request status\n\t\t$result = true;\n\t\t// Init curl\n\t\t$ch = curl_init();\n\t\t// Set curl options\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\t\t// request url\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\t\t\t// http headers\n\t\t\t'Accept: application/vnd.api+json',\n\t\t\t'Content-Type: application/vnd.api+json',\n\t\t\t'Authorization: apikey ' . self::$apiKey\n\t\t));\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\t\t// return an request answer as a result of curl_exec() if it is success\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, true);\t\t\t// put additional data to STDERR stream\n\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\t\t\t\t// include headers to output\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, self::$timeout);\t// timeout for curl_exec() execution\n\t\tcurl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\t// set HTTP version to use\n\t\tcurl_setopt($ch, CURLOPT_ENCODING, '');\t\t\t\t\t\t\t// set any encoding types for request headers\n\t\tcurl_setopt($ch, CURLINFO_HEADER_OUT, true);\t\t\t\t\t// track of handle's request string\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\t\t\t\t// apply using of custom request methods\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($body));\t\t// body of HTTP request\n\t\t// Send curl request\n\t\t$responseContent = curl_exec($ch);\n\n\t\tif($responseContent === false) {\n\t\t\t// Handle curl error\n\t\t\t$result = false;\n\t\t\t$errorMsg = 'cURL error: '. curl_error($ch);\n\t\t\tself::setErrorData('message', $errorMsg);\n\t\t} else {\n\t\t\t// Get request headers and body\n\t\t\t$responseHeaders = curl_getinfo($ch);\n\t\t\t$responseBody = substr($responseContent, $responseHeaders['header_size']);\n\t\t\t// Decode body data\n\t\t\tself::$response['data'] = json_decode($responseBody, true);\n\t\t\tif($responseHeaders['http_code'] != 200) {\n\t\t\t\t// Handle request error\n\t\t\t\t$result = false;\n\t\t\t\tself::setErrorData('message', 'Request error: '. self::$response['data']['title']. '. '. self::$response['data']['detail']);\n\t\t\t}\n\t\t}\n\t\t// Close curl session\n\t\tcurl_close($ch);\n\t\t// Return result of request sending\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "a4c00dcdd741e86fcbf2f6712694e8a8", "score": "0.56381243", "text": "protected function linkIdentityRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling linkIdentity'\n );\n }\n\n $resourcePath = '/v1/identities';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "97688bc8bedd98d44bc6956d1ff19370", "score": "0.5625913", "text": "public function __doRequest($requestBody, $location, $action, $version, $oneWay = 0)\n {\n [, $action] = explode('#', $action) + ['/dev/null', 'none'];\n $serviceUrl = $location . '?' . $action;\n\n $this->logger()->info(\n 'Performing request',\n [\n 'function' => $this->lastFunction,\n 'arguments' => $this->formatArguments($this->lastFunction, $this->lastArguments),\n 'location' => $serviceUrl,\n ]\n );\n\n [$responseHeaders, $responseBody] = $this->performCurlRequest($serviceUrl, $action, $version, [], $requestBody);\n $this->logger()->debug('Request finished', $this->lastRequestInfo);\n\n $this->extractCookies($responseHeaders);\n\n return $oneWay && !$this->isWaitingForOneWay() ? '' : $responseBody;\n }", "title": "" }, { "docid": "e3bb0f76499d91ad9830ce8b642ce6b1", "score": "0.5616868", "text": "private function doRequest($params,$url,$requestMethod,$body){\r\n\r\n\r\n\t\t$oAuthRequester = new OAuthRequester($url, $requestMethod,'');\r\n\t\t// Initialize the secrets.\r\n\t\t$this->setSecrets();\r\n\r\n\t\tif (!is_null($this->privateKey))\r\n\t\t\t$oAuthRequester->privateKey = $this->privateKey;\r\n\t\telse\r\n\t\t{\r\n\t\t\t$oAuthRequester->keyStorePath = $this->keystorePath;\r\n\t\t\t$oAuthRequester->keyStorePassword = $this->keystorePassword;\r\n\t\t}\r\n\t\t\t\r\n\t\t// Set all connection parameters\r\n\t\tforeach ($params as $key => $value)\r\n\t\t{\r\n\t\t\t$oAuthRequester->setParam($key, $value);\r\n\t\t}\r\n\r\n\t\tif($body != null){\r\n\t\t\t$oAuthRequester->setBody($body);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$oAuthRequester->realm = $this->realm;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t$requestInfo = $oAuthRequester->doRequest($this->oauthSecrets);\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\t$this->saveConnectionData($oAuthRequester);\r\n\t\t\tthrow $this->checkForErrors($e);\r\n\t\t}\r\n\t\t$this->saveConnectionData($oAuthRequester);\r\n\t\treturn $requestInfo[Connector::BODY];\r\n\t}", "title": "" }, { "docid": "c226ad20e4c1ff7cf81e8439d4ae167a", "score": "0.5614009", "text": "protected static function _request($method, $body = array())\n\t{\n\t\t$ch = curl_init();\n\t\t\n\t\t$url = self::ENDPOINT . '/v' . self::VERSION . '/' . $method;\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\n\t\t// Merge in the API Key\n\t\t$body = array_merge($body, array( 'apikey' => self::$_apikey ));\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($body));\n\t\t\n\t\t$response = curl_exec($ch);\n\t\t\n\t\tif ($error = curl_error($ch))\n\t\t{\n\t\t\tthrow new Twtmore_Exception_CurlError($error);\n\t\t}\n\t\t\n\t\t$response_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t\n\t\tif ($response_status != 200)\n\t\t{\n\t\t\tswitch ($response_status)\n\t\t\t{\n\t\t\t\tcase 401:\n\t\t\t\t\tthrow new Twtmore_Exception_Unauthorized('Invalid API Key');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 400:\n\t\t\t\t\tthrow new Twtmore_Exception_BadRequest('Bad Request');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 404:\n\t\t\t\t\tthrow new Twtmore_Exception_NotFound('Method / Version not found');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 500:\n\t\t\t\t\tthrow new Twtmore_Exception_InternalError('Internal Error');\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Twtmore_Exception('API Returned != OK response: ' . $response_status);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn self::_decode($response, self::$_format);\n\t}", "title": "" }, { "docid": "7bbd970abaa67dea3c52a1e507fc583b", "score": "0.560828", "text": "abstract protected function makeRequest();", "title": "" }, { "docid": "2923a2a52105eca4276bacc3d9bec691", "score": "0.560745", "text": "public static function curl($options, $body = null)\n {\n # If the options weren't passed as an array then it is just a simple url request\n if (!is_array($options)) {\n $options = [\"url\" => $options];\n }\n\n $options = Helper::getOptions($options, [\n \"url\" => null,\n \"headers\" => null,\n \"connect\" => 0,\n \"timeout\" => 0,\n \"follow\" => true,\n \"verifyssl\" => true,\n \"cookies\" => null,\n \"put\" => false,\n \"custom\" => false,\n \"nobody\" => false,\n \"useragent\" => \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0\",\n \"returnheaders\" => false,\n \"curlopts\" => [],\n ]);\n\n if (!$url = trim($options[\"url\"])) {\n throw new \\Exception(\"No url specified\");\n }\n\n # If an array of post data has been passed then convert it into a query string\n if (is_array($body)) {\n $body = http_build_query($body);\n }\n\n $curlopts = [\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_NOBODY => $options[\"nobody\"],\n ];\n\n if ($options[\"put\"]) {\n $file = fopen(\"php://memory\", \"w\");\n fwrite($file, $body);\n rewind($file);\n\n $curlopts[CURLOPT_PUT] = true;\n $curlopts[CURLOPT_INFILE] = $file;\n $curlopts[CURLOPT_INFILESIZE] = strlen($body);\n } elseif ($body) {\n $curlopts[CURLOPT_POST] = true;\n $curlopts[CURLOPT_POSTFIELDS] = $body;\n }\n\n if ($custom = $options[\"custom\"]) {\n $curlopts[CURLOPT_CUSTOMREQUEST] = $custom;\n }\n\n if ($headers = $options[\"headers\"]) {\n $header = [];\n foreach ($headers as $key => $val) {\n $header[] = $key . \": \" . $val;\n }\n $curlopts[CURLOPT_HTTPHEADER] = $header;\n }\n\n $curlopts[CURLOPT_CONNECTTIMEOUT] = round($options[\"connect\"]);\n $curlopts[CURLOPT_TIMEOUT] = round($options[\"timeout\"]);\n\n if ($options[\"follow\"]) {\n $curlopts[CURLOPT_FOLLOWLOCATION] = true;\n }\n\n if (!$options[\"verifyssl\"]) {\n $curlopts[CURLOPT_SSL_VERIFYPEER] = false;\n }\n\n if ($cookies = $options[\"cookies\"]) {\n $curlopts[CURLOPT_COOKIEFILE] = $cookies;\n $curlopts[CURLOPT_COOKIEJAR] = $cookies;\n }\n\n if ($useragent = $options[\"useragent\"]) {\n $curlopts[CURLOPT_USERAGENT] = $useragent;\n }\n\n if ($options[\"returnheaders\"]) {\n $curlopts[CURLOPT_HEADER] = true;\n }\n\n if (count($options[\"curlopts\"]) > 0) {\n foreach ($options[\"curlopts\"] as $key => $val) {\n $curlopts[$key] = $val;\n }\n }\n\n $curl = curl_init();\n\n curl_setopt_array($curl, $curlopts);\n\n $result = curl_exec($curl);\n\n $error = curl_error($curl);\n\n if ($options[\"returnheaders\"]) {\n $info = curl_getinfo($curl);\n }\n\n curl_close($curl);\n\n if ($result === false) {\n throw new \\Exception($error);\n }\n\n if ($options[\"returnheaders\"]) {\n $header = substr($result, 0, $info[\"header_size\"]);\n $lines = explode(\"\\n\", $header);\n $status = array_shift($lines);\n $headers = [];\n foreach ($lines as $line) {\n if (!trim($line)) {\n continue;\n }\n $bits = explode(\":\", $line);\n $key = array_shift($bits);\n $headers[$key] = trim(implode(\":\", $bits));\n }\n $body = substr($result, $info[\"header_size\"]);\n return [\n \"status\" => $status,\n \"headers\" => $headers,\n \"body\" => $body,\n \"response\" => $result,\n ];\n }\n\n return $result;\n }", "title": "" }, { "docid": "dcf3e8d9e8fb61f9b85efbd0b61baae3", "score": "0.56012493", "text": "protected function jobsPostRequest($authorization, $body) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsPost'\n );\n }\n // Verify the required parameter 'body' is set.\n if ($body === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling jobsPost'\n );\n }\n\n $resourcePath = '/jobs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // For HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "605acbb3e496e23beba6e907bbaf6194", "score": "0.5569987", "text": "private function httpRequest($path, $method, $body = false)\n {\n $headers = ['X-Requested-With: XMLHttpRequest', 'Content-Type: application/json', 'Accept: application/json'];\n $ch = curl_init($this->apiUrl . $path);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);\n if ($body) {\n curl_setopt($ch, CURLOPT_POSTFIELDS, $body);\n $headers[] = 'Content-Length: ' . strlen($body);\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n $response = curl_exec($ch);\n $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if (curl_errno($ch)) {\n $this->makeResponse(['error' => curl_error($ch)], $status ?: 500);\n }\n curl_close($ch);\n $data = $this->isValidJSON($response);\n return ['status' => $status, 'response' => $data, 'json' => $response];\n }", "title": "" }, { "docid": "72532b5601d3f1d73376e961c276d02e", "score": "0.5564033", "text": "protected function addClientRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addClient'\n );\n }\n\n $resourcePath = '/clients/v2/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f75426acf3f41d8f299c9124057cbc99", "score": "0.554563", "text": "private function _call($method, $url, $body, $type)\n {\n $url = $this->buildURL();\n $request = new Request($method, $url, $body, $type);\n\n return $request->call($this->call);\n }", "title": "" }, { "docid": "10f07e8b56e474639aaa8e88c8718d12", "score": "0.5543956", "text": "private function makeHttpRequest()\n {\n try {\n $options = [\n $this->httpBodyParam => $this->post->toArray(),\n ];\n\n if ($this->fraudnetId) {\n $options['headers'] = [\n 'PAYPAL-CLIENT-METADATA-ID' => $this->fraudnetId,\n ];\n }\n\n return $this->client->post($this->apiUrl, $options)->getBody();\n } catch (Throwable $t) {\n throw new RuntimeException($t->getRequest().' '.$t->getResponse());\n }\n }", "title": "" }, { "docid": "d1b2a9c68eb3adf21eca41ab3ee251f0", "score": "0.5532593", "text": "abstract public function request();", "title": "" }, { "docid": "0537aaf3363f3bdaa6de08580d10a399", "score": "0.54908735", "text": "public function request($url, $body = null, $method = null)\n\t{\n\t\tif ($this->test_mode)\n\t\t\treturn array('url' => $url, 'body' => $body, 'method' => $method);\n\t\t\n\t\t// Generate cache filename\n\t\t$cache = $this->cache_path . get_class() . '_' . md5($url.$body.$method) . '.cache';\n\t\t\n\t\t// If cache exists, and is still valid, load it\n\t\tif($this->cache_mode && file_exists($cache) && (time() - filemtime($cache)) < $this->cache_ttl)\n\t\t{\n\t\t\t$response = json_decode(file_get_contents($cache));\n\t\t\t\n\t\t\t// Add notice that this is a cached file\n\t\t\tif (is_object($response))\n\t\t\t\t$response->_cached = true;\n\t\t\telseif (is_array($response))\n\t\t\t\t$response['_cached'] = true;\n\t\t\t\n\t\t\treturn $response;\n\t\t}\n\t\t\n\t\tif (!class_exists('RequestCore'))\n\t\t\tthrow new Exception('This class requires RequestCore. http://requestcore.googlecode.com');\n\t\t\n\t\t$http = new RequestCore($url);\n\t\t\n\t\t$http->set_useragent(TUMBLR_USERAGENT);\n\t\t\n\t\tif (!empty($method))\n\t\t \t$http->set_method($method);\n\n\t\tif (!empty($body))\n\t\t\t$http->set_body($body);\n\t\t\n\t\t$http->send_request();\n\t\t\n\t\t// $response->header = $http->get_response_header();\n\t\t$status = $http->get_response_code();\n\n\t\tif ($status == 200)\n\t\t\t$response = $this->parse_response($http->get_response_body());\n\t\t\t\n\t\telse if ($status == 404)\n\t\t\t$response = 'Not Found';\n\t\t\t\n\t\telse \n\t\t\t$response = $http->get_response_body();\n\n\t\t// SimpleXMLElement currently doesn't allow assigning complext types to properties\n\t\tif ($this->header_mode && get_class($response) != 'SimpleXMLElement')\n\t\t{\n\t\t\tif (is_object($response))\n\t\t\t\t$response->_header = $http->get_response_header();\n\t\t\telseif (is_array($response))\n\t\t\t\t$response['_header'] = $http->get_response_header();\n\t\t}\n\t\t\n\t\t// Cache only successfuly requests, check if http code begins with 2 (eg. 200,201,etc.)\n\t\tif ($this->cache_mode && $status == 200)\n\t\t{\n\t\t\tfile_put_contents($cache . '_tmp', json_encode($response));\n\t\t\trename($cache . '_tmp', $cache);\n\t\t}\n\t\t\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "2890a9a293119bf50b148fbc991818be", "score": "0.5481571", "text": "protected function updateAsnRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateAsn'\n );\n }\n\n $resourcePath = '/beta/asn';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e68b53a92ebde9ea2a14b1d9d0e53dc1", "score": "0.54800874", "text": "protected function addVoucherRequest($body) {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addVoucher'\n );\n }\n\n $resourcePath = '/Voucher';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f9b8adba20e160ac80949f84f297a96f", "score": "0.5477922", "text": "public function request($method, $uri, array $params = []);", "title": "" }, { "docid": "b8493f966689d43fa23b948019ad755d", "score": "0.54698825", "text": "public function make_request( $method, $url, $request_body = null, $request_headers = null ) {\n\t\tif ( isset( $request_headers ) ) {\n\t\t\t$this->request_headers = array_merge( $this->request_headers, $request_headers );\n\t\t}\n\t\tif ( isset( $request_body ) ) {\n\t\t\t$request_body = json_encode( $request_body );\n\t\t\t$content_type = array( 'Content-Type' => 'application/json' );\n\t\t\t$this->request_headers = array_merge( $this->request_headers, $content_type );\n\t\t}\n\n\t\t$args = array(\n\t\t\t'headers' => $this->request_headers,\n\t\t\t'timeout' => 15,\n\t\t\t'body' => $request_body,\n\t\t\t'sslverify' => false,\n\t\t);\n\n\t\tswitch ( strtoupper( $method ) ) {\n\t\t\tcase 'PUT':\n\t\t\t\t$args['method'] = 'PUT';\n\t\t\t\t$result = tve_dash_api_remote_post( $url, $args );\n\t\t\t\tbreak;\n\t\t\tcase 'POST':\n\t\t\t\t$result = tve_dash_api_remote_post( $url, $args );\n\t\t\t\tbreak;\n\t\t\tcase 'GET':\n\t\t\tdefault:\n\t\t\t\tif ( empty( $request_body ) ) {\n\t\t\t\t\t$request_body = array();\n\t\t\t\t}\n\n\t\t\t\t$url .= ( strpos( $url, '?' ) !== false ? '&' : '?' ) . http_build_query( $request_body );\n\n\t\t\t\t$result = tve_dash_api_remote_get( $url, $args );\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( $result instanceof WP_Error ) {\n\t\t\tthrow new Thrive_Dash_Api_SendGrid_Exception( 'Failed connecting: ' . $result->get_error_message() );\n\t\t}\n\n\t\t$status_code = $result['response']['code'];\n\t\t$response_body = json_decode( $result['body'] );\n\t\t$response_header = $result['headers'];\n\n\t\tif ( ! ( $status_code == 200 || $status_code == 201 || $status_code == 202 ) ) {\n\t\t\tthrow new Thrive_Dash_Api_SendGrid_Exception( 'Invalid request', $status_code );\n\t\t}\n\n\t\treturn new Thrive_Dash_Api_SendGrid_Response( $status_code, $response_body, $response_header );\n\t}", "title": "" }, { "docid": "58d57478e502307b2eb3116759caf914", "score": "0.54678524", "text": "public function request(array $params) :IResponse", "title": "" }, { "docid": "7962d728a845f8e56ae931549994b2f4", "score": "0.5458579", "text": "public function sendRequest($action, array $body)\n {\n $endpoint = $this->getEndpoint($action);\n return $this->root->handleRequest($endpoint, $body);\n }", "title": "" }, { "docid": "66d4e9d395b43015048949d4d25cb8d9", "score": "0.5453055", "text": "protected function addAsnRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addAsn'\n );\n }\n\n $resourcePath = '/beta/asn';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2071384aae521d0abf33ceb75fbcc619", "score": "0.5449983", "text": "public function send($url,$method,$body,array $headers,$timeout);", "title": "" }, { "docid": "dbd4fee0fb8491c918af65a28a71b156", "score": "0.54484403", "text": "public function make()\n {\n $url = $this->buildRequestUrl();\n $post = empty($_POST) ? array() : $_POST; \n $headers = $this->buildRequestHeader();\n $method = $this->buildRequestMethod();\n $remoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null;\n $remoteHost = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : null;\n $rawBody = file_get_contents('php://input');\n return new \\Vine\\Component\\Http\\Request($url, $post, $headers, $method, $remoteAddr, $remoteHost, $rawBody);\n }", "title": "" }, { "docid": "1619f710cad8489d845e8758d301a199", "score": "0.54388005", "text": "protected function createOAuth2ClientRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createOAuth2Client'\n );\n }\n\n $resourcePath = '/clients';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "059e7b6e8ae71388ee0d1a9db9ecfa3e", "score": "0.5431449", "text": "protected function curlRequest(array $body, string $url)\n {\n /*\n * HttpRequest with cURL protocol\n * */\n\n\n $curl = curl_init();\n\n curl_setopt_array($curl, [\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode($body),\n CURLOPT_HTTPHEADER => self::HEADERS,\n ]);\n\n $response = curl_exec($curl);\n\n curl_close($curl);\n if($response){\n return json_decode($response);\n } else {\n $x = new HttpResponseException($response);\n Log::useDailyfiles(storage_path() . '/logs/httpRequestErrors.log');\n Log::info([\n 'error' => $x,\n ]);\n return null;\n }\n }", "title": "" }, { "docid": "8902ed17d25883d269f30e096b50a214", "score": "0.54281133", "text": "abstract public function sendRequest(HTTP_Request2 $request);", "title": "" }, { "docid": "3937826e8b65516653b6849e921ea971", "score": "0.5412696", "text": "protected function createClientRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createClient'\n );\n }\n\n $resourcePath = '/v1/clients';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/links+json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/links+json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // // this endpoint requires Bearer token\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "49bb30dbe9b74049bd64612390a1849a", "score": "0.54124784", "text": "private function _postRequest($url, $headers, $body) {\n\t\t$url = $this->_base . $url;\n\n\t\t$auth = base64_encode('api:' . $this->_apikey);\n\t\t$headers[] = \"Authorization: Basic $auth\";\n\n\t\t$httpClient = new HttpClient();\n\t\treturn $httpClient->post($url, $headers, $body);\n\t}", "title": "" }, { "docid": "d7a94480decefb092ad33504fc56cf61", "score": "0.540971", "text": "function sendRequest($in_method = NULL, $in_body = NULL) {\r\n\t\tif ($this->_readyState != CHTTP_READYSTATE_UNINITIALIZED) {\r\n\t\t\t$this->_DP('can not re-use this object. fix your code.');\r\n\t\t}\r\n\t\tif ($in_method) {\r\n\t\t\t$this->_method = strtoupper($in_method);\r\n\t\t}\r\n\t\tif ($in_body) {\r\n\t\t\t$this->setHeader('Content-Length', strlen($in_body));\r\n\t\t}\r\n\t\t$request_line = $this->_parsedUrl['path'];\r\n\t\tif (array_key_exists('query', $this->_parsedUrl)) {\r\n\t\t\t$request_line .= \"?{$this->_parsedUrl['query']}\";\r\n\t\t}\r\n\t\tif ($this->_proxy) {\r\n\t\t\tif ($this->_parsedUrl['scheme'] == 'https') {\r\n\t\t\t\t$this->_DP('https & proxy are not supported at the same time. fix your code.');\r\n\t\t\t} else {\r\n\t\t\t\t$host = \"tcp://{$this->_proxy['host']}\";\r\n\t\t\t\t$port = $this->_proxy['port'];\r\n\t\t\t}\r\n\t\t\t$this->_rawRequest = \"{$this->_method} {$this->_parsedUrl['scheme']}://{$this->_parsedUrl['host']}{$request_line} HTTP/1.1\" . CRLF;\r\n\t\t} else {\r\n\t\t\tif ($this->_parsedUrl['scheme'] == 'https') {\r\n\t\t\t\t$host = \"ssl://{$this->_parsedUrl['host']}\";\r\n\t\t\t\t$port = 443;\r\n\t\t\t} else {\r\n\t\t\t\t$host = \"tcp://{$this->_parsedUrl['host']}\";\r\n\t\t\t\t$port = 80;\r\n\t\t\t}\r\n\t\t\t$this->_rawRequest = \"{$this->_method} {$request_line} HTTP/1.1\" . CRLF;\r\n\t\t}\r\n\t\t$host = str_replace('://localhost', '://127.0.0.1', $host);\r\n\t\tif (!$this->_streamOpen($host, $port)) {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\tforeach ($this->_headers as $key => $val) {\r\n\t\t\t$this->_rawRequest .= \"{$key}: {$val}\" . CRLF;\r\n\t\t}\r\n\t\t$this->_rawRequest .= CRLF;\r\n\t\tif ($in_body) {\r\n\t\t\t$this->_rawRequest .= $in_body;\r\n\t\t}\r\n\t\tif ($this->_streamPuts($this->_rawRequest)) {\r\n\t\t\t$this->_readyState = CHTTP_READYSTATE_LOADING_H;\r\n\t\t\treturn TRUE;\r\n\t\t} else {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8959e26cbed812f928ad5a75a764d23c", "score": "0.5408008", "text": "public function createRequest($method, $uri, $body = null, array $headers = [], $version = '1.1');", "title": "" }, { "docid": "9b83a02f8a18dff7049c67c8f6a78981", "score": "0.5390595", "text": "public function performRequest(RestRequest $request)\n\t{\n\t\t$ch = curl_init();\n\t\t$opts = array(\n\t\t\t\tCURLOPT_URL => $request->getURL(),\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\t\tCURLINFO_HEADER_OUT => true,\n\t\t\t\tCURLOPT_HEADER => $this->includeHeaders,\n\t\t\t);\n\n\t\tif($request->getMethod() === RestRequest::METHOD_POST)\n\t\t{\n\t\t\t$opts[CURLOPT_POST] = true;\n\t\t\t$opts[CURLOPT_POSTFIELDS] = $request->getData();\n\t\t}\n\t\telseif($request->getMethod() !== RestRequest::METHOD_GET)\n\t\t{\n\t\t\t$opts[CURLOPT_CUSTOMREQUEST] = $request->getMethod();\n\t\t\t$data = $request->getData();\n\t\t\tif(!empty($data))\n\t\t\t{\n\t\t\t\t$opts[CURLOPT_POSTFIELDS] = $data;\n\t\t\t}\n\t\t}\n\n\t\t$headers = $request->getHeaders();\n\t\tif(!empty($headers) && is_array($headers))\n\t\t{\n\t\t\t$opts[CURLOPT_HTTPHEADER] = $headers;\n\t\t}\n\n\t\t$userpass = $request->getUserpass();\n\t\tif(!empty($userpass))\n\t\t{\n\t\t\t$opts[CURLOPT_USERPWD] = $userpass;\n\t\t}\n\n\t\tif((double)$this->timeout > 0)\n\t\t{\n\t\t\tif(defined('CURLOPT_TIMEOUT_MS'))\n\t\t\t{\n\t\t\t\t$opts[CURLOPT_TIMEOUT_MS] = (int)((double)$this->timeout * 1000);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$opts[CURLOPT_TIMEOUT] = (int)$this->timeout;\n\t\t\t}\n\t\t}\n\t\tcurl_setopt_array($ch, $opts);\n\t\t$body = curl_exec($ch);\n\t\t$errno = curl_errno($ch);\n\t\t$error = curl_error($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\t\tif($errno > 0)\n\t\t{\n\t\t\tswitch($errno)\n\t\t\t{\n\t\t\t\tcase CURLE_OPERATION_TIMEOUTED:\n\t\t\t\t\tthrow new RestTimeoutException(sprintf('%d - %s', $errno, $error));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RestException(sprintf('%d - %s', $errno, $error));\n\t\t\t}\n\t\t}\n\t\t$response = new RestCurlResponse($info['http_code'], $body, $this->includeHeaders);\n\t\t$response->setCurlInfo($info);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "f3e21c02d4ee23f86b1bb9c8fbb59425", "score": "0.5390283", "text": "public function execute()\n {\n if ($this->http) {\n\n /**\n * Make Request ID to HTTP request header.\n * Request ID is a unique code to easily\n * developer to debuging they request\n */\n\n array_push($this->http_headers_array, 'request-id: #' . rand(10,1024));\n\n switch (strtoupper($this->selected_http_method)) {\n case 'GET':\n\n $get = new GET();\n $execute = $get->GET(\n $this->url_destination, \n $this->http_headers_array\n );\n break;\n\n case 'POST':\n\n $body = http_build_query($this->body_data);\n\n $post = new POST();\n $execute = $post->POST(\n $this->url_destination, \n $body,\n $this->http_headers_array\n );\n break;\n\n case 'PUT':\n $body = http_build_query($this->body_data);\n\n $put = new PUTS();\n $execute = $put->PUTS(\n $this->url_destination, \n $body,\n $this->http_headers_array,\n \"PUT\"\n );\n break;\n\n case 'PATCH':\n $body = http_build_query($this->body_data);\n \n $put = new PUTS();\n $execute = $put->PUTS(\n $this->url_destination, \n $body,\n $this->http_headers_array,\n \"PATCH\"\n );\n break;\n\n case 'DELETE':\n \n $delete = new DELETE();\n $execute = $delete->DELETE(\n $this->url_destination, \n $this->http_headers_array,\n );\n break;\n \n default:\n throw new Exception($this->selected_http_method . ' HTTP Methods not found!', 1);\n break;\n }\n \n } else {\n throw new Exception(\"Please start HTTP class first! \", 1);\n }\n }", "title": "" }, { "docid": "771b9f1a54c69df57df5cff5ca899123", "score": "0.5360694", "text": "public function request($method, $url='', $body=null, array $headers=array()) {\n\n $url = $this->baseUri . $url;\n\n $curlSettings = array(\n CURLOPT_RETURNTRANSFER => true,\n // Return headers as part of the response\n CURLOPT_HEADER => true,\n CURLOPT_POSTFIELDS => $body,\n // Automatically follow redirects\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_MAXREDIRS => 5,\n );\n\n $curlSettings[CURLOPT_CUSTOMREQUEST] = $method;\n\n // Adding HTTP headers\n $nHeaders = array();\n foreach($headers as $key=>$value) {\n\n $nHeaders[] = $key . ': ' . $value;\n\n }\n $curlSettings[CURLOPT_HTTPHEADER] = $nHeaders;\n\n if ($this->proxy) {\n $curlSettings[CURLOPT_PROXY] = $this->proxy;\n }\n\n // initialising curl & doing the request itself\n $curl = curl_init($url);\n curl_setopt_array($curl, $curlSettings);\n\n $response = curl_exec($curl);\n $curlInfo = curl_getinfo($curl);\n $curlErrNo = curl_errno($curl);\n $curlError = curl_error($curl);\n\n // dividing the response\n $headerBlob = substr($response, 0, $curlInfo['header_size']);\n $response = substr($response, $curlInfo['header_size']);\n\n // In the case of 100 Continue, or redirects we'll have multiple lists\n // of headers for each separate HTTP response. We can easily split this\n // because they are separated by \\r\\n\\r\\n\n $headerBlob = explode(\"\\r\\n\\r\\n\", trim($headerBlob, \"\\r\\n\"));\n\n // We only care about the last set of headers\n $headerBlob = $headerBlob[count($headerBlob)-1];\n\n // Splitting headers\n $headerBlob = explode(\"\\r\\n\", $headerBlob);\n\n $headers = array();\n foreach($headerBlob as $header) {\n $parts = explode(':', $header, 2);\n if (count($parts)==2) {\n $headers[strtolower(trim($parts[0]))] = trim($parts[1]);\n }\n }\n\n $response = array(\n 'body' => $response,\n 'statusCode' => $curlInfo['http_code'],\n 'headers' => $headers\n );\n\n if ($curlErrNo) {\n throw new \\Exception('[CURL] Error while making request: ' . $curlError . ' (error code: ' . $curlErrNo . ')');\n }\n\n if ($response['statusCode']>=400) {\n switch ($response['statusCode']) {\n case 400 :\n throw new \\Exception('Bad request', $response['statusCode']);\n case 401 :\n throw new \\Exception('Not authenticated', $response['statusCode']);\n case 402 :\n throw new \\Exception('Payment required', $response['statusCode']);\n case 403 :\n throw new \\Exception('Forbidden', $response['statusCode']);\n case 404:\n throw new \\Exception('Resource not found', $response['statusCode']);\n case 405 :\n throw new \\Exception('Method not allowed', $response['statusCode']);\n case 409 :\n throw new \\Exception('Conflict', $response['statusCode']);\n case 412 :\n throw new \\Exception('Precondition failed', $response['statusCode']);\n case 416 :\n throw new \\Exception('Requested Range Not Satisfiable', $response['statusCode']);\n case 500 :\n throw new \\Exception('Internal server error', $response['statusCode']);\n case 501 :\n throw new \\Exception('Not Implemented', $response['statusCode']);\n case 507 :\n throw new \\Exception('Insufficient storage', $response['statusCode']);\n default:\n throw new \\Exception('HTTP error response', $response['statusCode']);\n }\n }\n\n return $response;\n\n }", "title": "" }, { "docid": "1b677d71ca8c8029c00f8eb50345c487", "score": "0.53596336", "text": "private function _curlRequest($httpMethod, $requestBody = null)\n {\n $this->_responseHeader = array(); \n $curl = curl_init();\n curl_setopt($curl, CURLOPT_TIMEOUT, 60);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpMethod);\n curl_setopt($curl, CURLOPT_URL, $this->_endpoint);\n curl_setopt($curl, CURLOPT_ENCODING, 'gzip');\n curl_setopt($curl, CURLOPT_HEADERFUNCTION, array($this,'_responseHeader'));\n\n if($this->_httpHeader)\n curl_setopt($curl, CURLOPT_HTTPHEADER, $this->_httpHeader);\n\n // curl_setopt($curl, CURLOPT_HEADER, 1);\n // curl_setopt($curl, CURLOPT_VERBOSE, true);\n\n # If SSL flag is true\n if ($this->_config && $this->_config['ssl']){\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($curl, CURLOPT_CAINFO, $this->_config['caFile']);\n }\n\n if(!empty($requestBody)) {\n //print_r($requestBody);\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($requestBody));\n }\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n $header = substr($response, 0, $header_size);\n curl_close($curl);\n\n if ($this->_config && $this->_config['ssl']){\n if ($httpStatus == 0) {\n throw new HttpException('Http code is 0', 1);\n }\n }\n\n return array('status' => $httpStatus, 'body' => $response,'header'=>$this->_responseHeader);\n }", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.53491396", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.53491396", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.53491396", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.53491396", "text": "public function setBody($body);", "title": "" }, { "docid": "f693b0804e9362407d24065d21148c4b", "score": "0.53491396", "text": "public function setBody($body);", "title": "" }, { "docid": "f2af0c78fe672300a34320bc3aeeb804", "score": "0.53373384", "text": "protected function updateStandardBusinessDaysRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateStandardBusinessDays'\n );\n }\n\n $resourcePath = '/beta/standardBusinessDays';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a1cff69281330d8302421267e5a74db3", "score": "0.5333882", "text": "public function call($method, SearchSpring_Manager_Entity_SearchRequestBody $requestBody)\n\t{\n\t\t$url = $this->buildUrl($method);\n\t\treturn $this->request(Zend_Http_Client::GET, $url, (string)$requestBody);\n\t}", "title": "" }, { "docid": "e416f1d57c6aa2fa4e16b8454453a33b", "score": "0.53247356", "text": "protected function _doRequest($url, $query, $options = array()) {\n if (strlen($query) < 3000) {\n $this->request->setMethod(HTTP_METH_POST);\n $this->request->setRawPostData((string) $query);\n } else {\n $this->request->setMethod(HTTP_METH_GET);\n $this->request->setQueryData((string) $query);\n }\n\n if (! empty($options)) {\n $this->request->setOptions($options);\n }\n //$this->request->setHeaders($headers);\n $this->request->setUrl($url);\n \n try {\n //Send the request\n $response = $this->request->send();\n //echo $this->request->getRawRequestMessage();\n //On successfull response, return the content of the response, otherwise, null\n if ($this->request->getResponseCode() == 200) {\n return $this->request->getResponseBody();\n } else {\n return null;\n }\n } catch (HttpException $ex) {\n error_log(\"Error requesting Solr: \". $url. PHP_EOL . \"Description: \".$ex->getMessage());\n return null;\n }\n }", "title": "" }, { "docid": "51d4c63dc3d895c9e861790b4bb3ea48", "score": "0.531336", "text": "public function request($url, $data = array(), $method = 'GET', $options = array());", "title": "" }, { "docid": "3f58ef979397287e61c9e53ac256057e", "score": "0.5293195", "text": "public function createFeedRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createFeed'\n );\n }\n\n $resourcePath = '/feeds/2021-06-30/feeds';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d85740560478a454e2857417e51ccba9", "score": "0.5292028", "text": "public function makeRequest($method, $url, $body = null, $headers = null)\n {\n $curl = curl_init($url);\n $curlOptionsTemp = [\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HEADER => 1,\n CURLOPT_FRESH_CONNECT => true,\n CURLOPT_CUSTOMREQUEST => strtoupper($method),\n CURLOPT_SSL_VERIFYPEER => false,\n // CURLOPT_STDERR => fopen('php://stderr', 'w')\n ] + $this->curlOptions;\n \n curl_setopt_array($curl, $curlOptionsTemp);\n if(isset($this->clientId) && isset($this->clientSecret)){\n $hmacSignature = $this->CalculateHmacSignature($method, $url, $body); \n $this->headers = array_merge($this->headers, [\"Authorization: hmacauth \" . $hmacSignature]);\n if(isset($this->logger)){\n $this->logger->addInfo(\"HmacSignature: \" . $hmacSignature);\n }\n }\n \n if (isset($headers)) {\n $this->headers = array_merge($this->headers, $headers);\n }\n if (isset($body)) {\n $encodedBody = str_replace(\"\\\\\", \"\", json_encode($body));\n curl_setopt($curl, CURLOPT_POSTFIELDS, $encodedBody);\n $this->headers = array_merge($this->headers, ['Content-Type: application/json; charset=UTF-8']);\n if(isset($this->logger)){\n $this->logger->addInfo(\"Body: \" . $encodedBody);\n }\n }\n \n curl_setopt($curl, CURLOPT_HTTPHEADER, $this->headers);\n $response = $this->curl_exec_utf8($curl);\n if(isset($this->logger)){\n $this->logger->addInfo(\"Response: \" . $response);\n }\n\n $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n $responseBody = substr($response, $headerSize);\n $responseHeaders = substr($response, 0, $headerSize);\n\n $responseHeaders = explode(\"\\n\", $responseHeaders);\n $responseHeaders = array_map('trim', $responseHeaders);\n curl_close($curl);\n \n\n return new HttpResponse($statusCode, $responseBody, $responseHeaders);\n }", "title": "" }, { "docid": "8d1cca8e0eee4e6f214d39507479a208", "score": "0.5287715", "text": "private function _request(\n $url,\n $additionalHeader,\n $requestBody,\n $method = \\Zend_Http_Client::POST,\n $decodeResponseBody = true\n ) {\n $client = $this->_httpClientFactory->create();\n $client->setUri($url);\n $client->setConfig([\n 'maxredirects' => $this->_maxRedirects,\n 'timeout' => $this->_connectionTimeout\n ]\n );\n $headers = ['Content-Type: application/json'];\n if ($additionalHeader) {\n $headers = array_merge(\n $headers,\n $additionalHeader\n );\n }\n $client->setHeaders($headers);\n $client->setMethod($method);\n $client->setRawData(utf8_encode($this->_serializer->serialize($requestBody)));\n\n $responseBody = $client->request($method)->getBody();\n if ($decodeResponseBody) {\n $responseBody = $this->_serializer->unserialize($responseBody);\n }\n\n return $responseBody;\n }", "title": "" }, { "docid": "d5fb7db0f9a63e948bb3b46a8f7cab43", "score": "0.5285361", "text": "protected function addStandardBusinessDaysRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addStandardBusinessDays'\n );\n }\n\n $resourcePath = '/beta/standardBusinessDays';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "205120197bb88fdbe4a987ed232e9d63", "score": "0.52792025", "text": "public function doRequest()\r\n{\r\nif ($this->getPostData())\r\n{\r\n$url = $this->getApiUrl();\r\n/*$data = $this->getPostData();*/\r\n\r\n/*$str_data = http_build_query($data);*/\r\n\r\n$api_url = $url;\r\n\r\n/*if (function_exists('curl_version'))\r\n{\r\n$ch = curl_init();\r\nif ($this->request_type == self::REQUEST_TYPE_GET)\r\n\r\n$api_url .= '?'.$str_data;\r\n\r\nelse\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $str_data);\r\n\r\ncurl_setopt($ch, CURLOPT_URL, $api_url);\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\n$result = curl_exec($ch);\r\ncurl_close($ch);\r\n}*/\r\n$result = $api_url;\r\n$arr_result = Tools::json_decode($result, true);\r\n\r\nif ($this->validateResult($arr_result)) return $this->_processResult($arr_result);\r\n}\r\n}", "title": "" }, { "docid": "be1b0275d634539552df313da2c94dc6", "score": "0.5271698", "text": "public function createRequest(\n $method,\n $uri,\n $protocolVersion = '1.1',\n array $headers = [],\n $body = null\n );", "title": "" }, { "docid": "3ec8fb4b8982e1308a941ccc9dd85877", "score": "0.527168", "text": "protected function post($body = [])\n {\n $method = 'POST';\n $environment = Environment::mock([\n 'REQUEST_METHOD' => $method,\n 'REQUEST_URI' => '/shorten',\n 'CONTENT_TYPE' => 'application/x-www-form-urlencoded',\n ]);\n\n $uri = Uri::createFromEnvironment($environment);\n $headers = Headers::createFromEnvironment($environment);\n $request = new Request($method, $uri, $headers, [], $environment->all(), new RequestBody());\n $request = $request->withParsedBody($body);\n\n $this->container['request'] = $request;\n\n return $this->app->run(true);\n }", "title": "" }, { "docid": "297a956561803fd15010220889329685", "score": "0.5268314", "text": "public function sendRequest($verb, $path, $body = null)\n {\n $this->logger->info('Module: ' . __CLASS__);\n\n if ($body instanceof Model) {\n $body = $body->toJSON(true);\n }\n\n $headers = [\n 'Authorization' => 'ApiKey ' . $this->config->apiKey,\n 'Request-ID' => uniqid('api-request-'),\n 'Content-Type' => 'application/json',\n ];\n\n $this->logger->info('HTTP Request: ' . strtoupper($verb) . ' ' . $this->config->apiEndpoint . $path);\n $this->logger->debug(\"Request Headers:\\n\" . print_r($headers, true));\n\n if (isset($body)) {\n $this->logger->debug(\"Request Body:\\n\" . $body);\n }\n\n $response = $this->http->request(strtoupper($verb), trim($this->config->apiEndpoint . $path), [\n 'body' => $body,\n 'headers' => $headers\n ]);\n\n $this->logger->info('HTTP Code: ' . $response->getStatusCode());\n $responseBody = $response->getBody()->getContents();\n $this->logger->debug('Return Body: ' . $responseBody);\n return $responseBody;\n }", "title": "" }, { "docid": "44c51e2d3844d74172dc296920683f47", "score": "0.52588403", "text": "public function call()\n\t{\n\t\ttry {\n\n $response = $this->client->request(\n $this->method,\n $this->url,\n [\n 'json' => $this->payload,\n 'query' => $this->query,\n 'headers' => $this->headers\n ]\n );\n\n return $this->successResponse($response);\n\n } catch (ClientException $e) {\n\n return $this->failedResponse($e->hasResponse(), $e);\n\n } catch (ServerException $e) {\n\n return $this->failedResponse($e->hasResponse(), $e);\n\n } catch (RequestException $e) {\n\n return $this->failedResponse($e->hasResponse(), $e);\n\n }\n\t}", "title": "" }, { "docid": "c41fd9bfc5e8cf1b58fc8c7c13ee5597", "score": "0.52548754", "text": "function curl_raw( $opts = array() ) {\n\n\t\tif (isset($opts[CURLOPT_HTTPHEADER]))\n\t\t{\n\t\t\t$header = $opts[CURLOPT_HTTPHEADER];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$header = array();\n\t\t}\n\n\t\t$ch \t\t= curl_init();\n\t\t$method\t\t= $this->getMethod();\n\t\t$url\t\t= $this->getRequestUrl();\n\t\t$header[]\t= $this->getAuthorizationHeader();\n\t\t$query\t\t= $this->getQueryString();\n\t\t$body\t\t= $this->getBody();\n\n\t\t// Params (the oAuth tokens) have to be sent in the body\n\t\tif ( is_array( $body ) && is_array( $this->param ) ) {\n\t\t\t$body = array_merge( $body, $this->param );\n\t\t}\n\n\t\t$has_content_type = false;\n\t\tforeach ($header as $h)\n\t\t{\n\t\t\tif (strncasecmp($h, 'Content-Type:', 13) == 0)\n\t\t\t{\n\t\t\t\t$has_content_type = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!is_null($body))\n\t\t{\n\t\t\tif ($method == 'TRACE')\n\t\t\t{\n\t\t\t\tthrow new OAuthException2('A body can not be sent with a TRACE operation');\n\t\t\t}\n\n\t\t\t// PUT and POST allow a request body\n\t\t\tif (!empty($query))\n\t\t\t{\n\t\t\t\t$url .= '?'.$query;\n\t\t\t}\n\n\t\t\t// Make sure that the content type of the request is ok\n\t\t\tif (!$has_content_type)\n\t\t\t{\n\t\t\t\t$header[] = 'Content-Type: application/octet-stream';\n\t\t\t\t$has_content_type = true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// a 'normal' request, no body to be send\n\t\t\tif ($method == 'POST')\n\t\t\t{\n\t\t\t\tif (!$has_content_type)\n\t\t\t\t{\n\t\t\t\t\t$header[] = 'Content-Type: application/x-www-form-urlencoded';\n\t\t\t\t\t$has_content_type = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!empty($query))\n\t\t\t\t{\n\t\t\t\t\t$url .= '?'.$query;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$header = array_merge( $header, $opts );\n\n\t\t$request_args = array(\n\t\t\t'method' => $method,\n\t\t\t'timeout' => 30,\n\t\t\t'user-agent' => 'anyMeta/OAuth 1.0 - ($LastChangedRevision: 174 $)',\n\t\t\t'header' => $header,\n\t\t\t'body' => $body\n\t\t);\n\n\t\t$request = wp_remote_request( $url, $request_args );\n\n\t\tif ( is_wp_error( $request ) ) {\n\t\t\tthrow new OAuthException2('CURL error: ' . $error);\n\t\t}\n\n\t\t// Tell the logger what we requested and what we received back\n\t\t$data = $method . \" $url\\n\".implode(\"\\n\",$header);\n\t\tif (is_string($body))\n\t\t{\n\t\t\t$data .= \"\\n\\n\".$body;\n\t\t}\n\t\telse if ($method == 'POST')\n\t\t{\n\t\t\t$data .= \"\\n\\n\".$query;\n\t\t}\n\t\treturn $request;\n\n\t\tOAuthRequestLogger::setSent($data, $body);\n\t\tOAuthRequestLogger::setReceived($retval);\n\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "382b2a4fba6a4169ed3be3904f5cc2dd", "score": "0.5243468", "text": "public function execute()\n {\n $url = $this->getRequestURL();\n $params = $this->getParameters();\n\n //echo \"url: $url & params: \"; print_r($params); die(\"\\n\");\n\n if ($this->method === \"GET\") {\n $url = self::appendParamsToUrl($url, $params);\n $params = array();\n }\n\n $connection = self::getHttpClientHandler();\n\n $connection->addRequestHeader('User-Agent', 'idc-' . self::CLIENT_VERSION);\n $connection->addRequestHeader('Accept-Encoding', '*'); // Support all available encodings. \n\n // Should throw `Exception` exception on HTTP client error.\n // Don't catch to allow it to bubble up.\n $result = $connection->send(\n $url,\n $this->method,\n $params,\n array(\n 'chkbasicAuth' => $this->chkbasicAuth,\n //'username' => $this->username,\n //'passwd' => $this->passwd,\n 'username' => self::$username,\n 'passwd' => self::$passwd,\n )\n );\n static::$requestCount++;\n //$etagHit = 304 == $connection->getResponseHttpStatusCode();\n $headers = $connection->getResponseHeaders();\n return $result;\n }", "title": "" }, { "docid": "65be80bb23028eedad51233a821111df", "score": "0.52392703", "text": "public function createFeedDocumentRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createFeedDocument'\n );\n }\n\n $resourcePath = '/feeds/2021-06-30/documents';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "bd794c1f6f27856bc5613f6771502c7d", "score": "0.52386594", "text": "public function sendRequest();", "title": "" }, { "docid": "bd794c1f6f27856bc5613f6771502c7d", "score": "0.52386594", "text": "public function sendRequest();", "title": "" }, { "docid": "8b9ef4c50275830b39de83f9d8193718", "score": "0.52364707", "text": "public function request($method, $url, array $data = array(), array $extra = array());", "title": "" }, { "docid": "1a0bb4ec6933c56e53691fd225bbf030", "score": "0.5233551", "text": "protected function request($post=null) {\n\t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL\t\t\t\t=> $this->API,\n\t\t\tCURLOPT_RETURNTRANSFER\t=> 1,\n\t\t\tCURLOPT_VERBOSE\t\t\t=> 1,\n\t\t\tCURLOPT_SSL_VERIFYHOST\t=> 0,\n\t\t\tCURLOPT_SSL_VERIFYPEER\t=> 0\n\t\t));\n\t\tif($post) {\n\t\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $post);\n\t\t}\n\t\t$data = curl_exec($curl);\n\t\t$data = json_decode($data, 1);\n\t\tcurl_close($curl);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f8d205f499cad69764a8db4cd3b8a451", "score": "0.5231299", "text": "public function submitAcknowledgementRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling submitAcknowledgement'\n );\n }\n\n $resourcePath = '/vendor/directFulfillment/orders/2021-12-28/acknowledgements';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c85520c0867e66217b9ed23b6ab6820d", "score": "0.52304906", "text": "public function createShipmentRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createShipment'\n );\n }\n\n $resourcePath = '/mfn/v0/shipments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "fd0bb63331f6b314984058b7448a636e", "score": "0.5229855", "text": "protected function submitJobRequest($body, $naked = 'true')\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling submitJob'\n );\n }\n\n $resourcePath = '/jobs/v2/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($naked !== null) {\n $queryParams['naked'] = ObjectSerializer::toQueryValue($naked);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2bdbb2a676b2f42bacc9ab3bfb6c1b0f", "score": "0.5228177", "text": "public function testAssertRequestWithBodyParams()\n {\n $this->mockResponse();\n $this->httpClient()->request('http://localhost/demo', 'PUT', ['body' => 'test body content']);\n $this->assertRequestWasSent('http://localhost/demo', 'PUT', ['body' => 'test body content']);\n }", "title": "" }, { "docid": "be40932395250bf39de5f0b60e7b039b", "score": "0.52272046", "text": "public function request($method, $urlPath = '', $queryParams = null, $body = null, $multipart = false)\n { \n // Check if API Key is set\n if (!$this->apiKey) {\n $message = 'No API key provided. (HINT: set your API key using \"Adyo::setApiKey({API_KEY})\".';\n \n throw new Exception\\UnauthorizedException($message);\n }\n\n // Build our full url for the request\n $fullUrl = $this->buildUrl($urlPath, $queryParams);\n \n // Setup required headers\n $headers['X-Adyo-ApiKey'] = $this->apiKey;\n $headers['Accept'] = 'application/json';\n $headers['Accept-Encoding'] = 'gzip';\n\n $encodedBody = null;\n\n // Execute\n try {\n\n // Setup request\n $request = null;\n\n // Check if multipart or not\n if ($multipart) {\n\n if (!empty($body)) {\n \n // Create stream\n $multipart = new MultipartStream($body);\n }\n\n $request = new Request($method, $fullUrl, $headers, $multipart);\n\n } else {\n\n if (!empty($body)) {\n $headers['Content-Type'] = 'application/json';\n $encodedBody = json_encode($body);\n }\n\n $request = new Request($method, $fullUrl, $headers, $encodedBody); \n }\n \n $response = $this->httpClient()->send($request);\n\n return $this->handleResponse($response);\n\n } catch (GuzzleClientException $e) {\n $response = $e->getResponse();\n\n $this->handleErrorResponse($response);\n } catch (GuzzleServerException $e) {\n\n // Server related exception\n $message = $e->getMessage();\n $response = $e->getResponse();\n $message = $e->getMessage();\n $statusCode = 500;\n \n if ($response) {\n $statusCode = $response->getStatusCode();\n }\n\n throw new Exception\\ApiException($e->getMessage(), $statusCode, $message);\n }\n }", "title": "" }, { "docid": "7d0305e5c1d1c8297b4127813a4f86a8", "score": "0.5225672", "text": "public static function getRequestBody()\n {\n }", "title": "" }, { "docid": "dfae25eb8ead004862a04f9a4f2eca8f", "score": "0.5221124", "text": "protected function makeRequest($http_verb, $method, $args = array(), $timeout = self::TIMEOUT)\n {\n $url = $this->api_endpoint . '/' . $method;\n\n $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout);\n\n $httpHeader = array(\n 'Accept: application/json',\n 'Content-Type: application/json',\n // TrustedShops needs the X-Requested-With header to works properly.\n 'X-Requested-With: XMLHttpRequest'\n );\n\n if (isset($args['language'])) {\n $httpHeader[] = 'Accept-Language: ' . $args['language'];\n }\n\n if ($http_verb === 'put') {\n $httpHeader[] = 'Allow: PUT, PATCH, POST';\n }\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeader);\n curl_setopt($curl, CURLOPT_USERAGENT, 'Antistatique/TrustedShops-PHP-SDK (github.com/antistatique/trustedshops-php-sdk)');\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_VERBOSE, true);\n curl_setopt($curl, CURLOPT_HEADER, true);\n curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl);\n curl_setopt($curl, CURLOPT_ENCODING, '');\n curl_setopt($curl, CURLINFO_HEADER_OUT, true);\n\n // Set credentials when given.\n if ($this->api_credentials_user && $this->api_credentials_pass) {\n curl_setopt($curl, CURLOPT_USERPWD, $this->api_credentials_user . ':' . $this->api_credentials_pass);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n }\n\n switch ($http_verb) {\n case 'post':\n curl_setopt($curl, CURLOPT_POST, true);\n $this->attachRequestPayload($curl, $args);\n break;\n\n case 'get':\n $query = http_build_query($args, '', '&');\n curl_setopt($curl, CURLOPT_URL, $url . '?' . $query);\n break;\n\n case 'delete':\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');\n break;\n\n case 'patch':\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH');\n $this->attachRequestPayload($curl, $args);\n break;\n\n case 'put':\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');\n $this->attachRequestPayload($curl, $args);\n break;\n }\n\n $response_content = curl_exec($curl);\n $response['headers'] = curl_getinfo($curl);\n $response = $this->setResponseState($response, $response_content, $curl);\n $formattedResponse = $this->formatResponse($response);\n\n curl_close($curl);\n\n $isSuccess = $this->determineSuccess($response, $formattedResponse['response'], $timeout);\n return is_array($formattedResponse['response']) ? $formattedResponse['response'] : $isSuccess;\n }", "title": "" }, { "docid": "dfcc40f17185a5836fb5ee32294732d8", "score": "0.5216723", "text": "public function post($uri, $headers = array(), $body = null);", "title": "" }, { "docid": "cad997294d35cad3877b8fae682def3b", "score": "0.52163154", "text": "public function request($http_verb, $method, $args = array());", "title": "" }, { "docid": "7a714589b0820c1a994fd31836ced6bb", "score": "0.52149826", "text": "protected function makeReservationRequest($body = null)\n {\n\n $resourcePath = '/meeting-rooms/reservation';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-Access-Token');\n if ($apiKey !== null) {\n $headers['X-Access-Token'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6e62158037f0baf4082433096dc9f13f", "score": "0.5212729", "text": "protected function request($method, $url, array $headers = [], $body = null)\n {\n $debug = getenv('DEBUG_SDK') || defined('DEBUG_SDK');\n\n if ($debug) {\n $methodDebug = str_pad($method, 7, ' ', STR_PAD_LEFT);\n $debugHeaders = json_encode($headers);\n echo <<<DEBUG_BODY\nDEBUG MODE: Request\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n{$methodDebug} : {$url}\nHeaders : $debugHeaders\n Body : {$body}\n\\n\nDEBUG_BODY;\n }\n\n switch ($method) {\n case Method::GET:\n $response = $this->connector->get($url, $headers);\n break;\n case Method::POST:\n $response = $this->connector->post($url, $body, $headers);\n break;\n case Method::PUT:\n $response = $this->connector->put($url, $body, $headers);\n break;\n case Method::DELETE:\n $response = $this->connector->delete($url, $body, $headers);\n break;\n case Method::PATCH:\n $response = $this->connector->patch($url, $body, $headers);\n break;\n default:\n throw new \\RuntimeException('Unknown request method ' + $method);\n }\n\n if ($debug) {\n $debugHeaders = json_encode($response->getHeaders());\n echo <<<DEBUG_BODY\nDEBUG MODE: Response\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\nHeaders : $debugHeaders\n Body : {$response->getBody()}\n\\n\nDEBUG_BODY;\n }\n\n $location = $response->getLocation();\n if (!empty($location)) {\n $this->setLocation($location);\n }\n \n return new ResponseValidator($response);\n }", "title": "" } ]
921c29e66c218e6e26932e2f86e06c36
Check if the current user is assigned to the specified user group
[ { "docid": "c7cf0a35ea0aa04a8e560dd8fb62d3e6", "score": "0.6144216", "text": "function checkgroup($group, $all4superadmin = true) {\n\t// webmaster is member of everything exept anonymous\n\tif (iSUPERADMIN && $all4superadmin && ($group != \"100\")) { return true; }\n\t// check the webmasters try memberships if all4superadmin = false!\n\telseif (iSUPERADMIN && ($group == \"0\" || $group == \"101\" || $group == \"102\" || $group == \"103\")) { return true; }\n\telseif (iADMIN && ($group == \"0\" || $group == \"101\" || $group == \"102\")) { return true; }\n\telseif (iMEMBER && ($group == \"0\" || $group == \"101\")) { return true; }\n\telseif (iGUEST && ($group == \"0\" || $group == \"100\")) { return true; }\n\telseif (iMEMBER && !empty($group) && in_array($group, explode(\".\", iUSER_GROUPS))) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" } ]
[ { "docid": "3e677592f71adb45fd7d650b75d075c3", "score": "0.73793674", "text": "public function currentUserHasGroup($group) {\n\t\t$user = $this->getCurrentUser();\n\t\tif($user != null) {\n\t\t\t$groups = $user->getGroups();\n\t\t\tif(in_array($group, $groups)) {\n\t\t\t\treturn true;\n\t\t\t}\t\t\n\t\t}\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "e51d5505eaf175fe53a30ac885fd15b1", "score": "0.7373111", "text": "public function isMemberOf($group)\n\t{\n\t\t$cursor = $this->site->db->query(\"SELECT * FROM user_group\n\t\t\t\t\t\t\t\t\t\t WHERE group_name = '\".$this->site->db->escape($group).\"'\n\t\t\t\t\t\t\t\t\t\t AND user_id = '\".$this->get($this->primaryKey).\"'\");\n\t\tif ($cursor->num_rows > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "4b11522f8d4745500c3e5a78d675a490", "score": "0.7148795", "text": "public function useringroup()\n\t{\n\t\tif ($this->auth_ad->in_group($username, $groupname))\n\t\t{\n\t\t\t// the user is a member of the group\n\t\t}\n\t\telse \n\t\t{\n\t\t\t// nope, not a member\n\t\t}\n\t}", "title": "" }, { "docid": "cf31dd4e45c261d19ab901442e317bb9", "score": "0.7133968", "text": "public function isUserInGroup($userId, $group)\n {\n \t\t// get user_id and then add this user\n\t\t$this->db->select('user_id');\n\t\t$this->db->where('title', $group);\n\t\t$this->db->from('groups');\n\t\t$query=$this->db->get();\n\t\t\n\t\t$row = $query->row(); \n\t\t$user_ids = $row->user_id;\n\t\t\n\t\t// search user_id access to see if new user_id already exists in the list\n\t\t$accessList = explode(',', $user_ids);\n\t\t\n\t\tforeach($accessList as $key) { \n\t\t\tif ($key == $userId) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn FALSE;\n }", "title": "" }, { "docid": "c3b3689e19bfd5977f7b06f559094211", "score": "0.6944187", "text": "function checkGroup($group){\n $ci=&get_instance();\n return $ci->ion_auth->in_group($group);\n}", "title": "" }, { "docid": "0b51e0c282c78cafec63f7ef8d22c335", "score": "0.6847667", "text": "function group_responsible($groupid, $userid) {\n global $DB, $USER;\n \n if (!isset($userid)) {\n $userid = $USER->id;\n }\n \n group_exists($groupid);\n user_exists($userid);\n \n return $DB->record_exists(\n 'tool_epman_group',\n array(\n 'id' => $groupid,\n 'responsibleid' => $userid\n )\n );\n}", "title": "" }, { "docid": "bbe01d7d2386416f772a9e3efcd471cc", "score": "0.68078786", "text": "function inGroup($user_name, $group_id)\r\n{\r\n global $db;\r\n\r\n $sql = \"SELECT * from \" . $group_id . \" where user_name='$user_name'\";\r\n $result = $db->query($sql);\r\n $num_rows = $db->num_rows($result);\r\n\r\n if ($num_rows == 0)\r\n return false;\r\n else\r\n return true;\r\n}", "title": "" }, { "docid": "8645a8287998fc847732ac4fcc9d6990", "score": "0.67890525", "text": "public function isAdmin()\n\t{\n\t\t// The group people must be a part of to administer the application.\n\t\t// \n\t\t$needle = Config::get('accounting.approval_group');\n\n\t\t// Fetch the groups the user is a part of.\n\t\t// \n\t\t$haystack = json_decode(Auth::user()->groups);\n\n\t\t// Now see if the $needle is in the $haystack.\n\t\t// \n\t\treturn in_array($needle, $haystack);\n\t}", "title": "" }, { "docid": "1e3a2ca5099a49f5d7ff702e98aaa13e", "score": "0.6755905", "text": "public function is_user_can($group_id=null){\n\t\tif($group_id==null) return false;\n\t\t$query=$this->db->get_results(\"\tSELECT `user_level`\n\t\t\t\t\t\t\t\t\t\tFROM `\".$this->db->prefix.\"lms_group_users`\n\t\t\t\t\t\t\t\t\t\tWHERE `user_id`=\".$this->user->ID.\"\n\t\t\t\t\t\t\t\t\t\tAND `group_id`=\".$group_id);\n\t\tif(!$query) return false;\n\t\tif($query[0]->user_level>0) return true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "781f47e660c94fe82a9266a0bb91b29c", "score": "0.67359847", "text": "public function inGroup($userId)\n {\n $userGroup = new UserGroupModel($this->getDb());\n $userGroup = $this->getDb()->find($userGroup, array(\n 'group_id' => $this->id,\n 'user_id' => $userId\n ));\n return ($userGroup->id !== null) ? true : false;\n }", "title": "" }, { "docid": "00b09bb6ff67be41f8238d771def9396", "score": "0.672428", "text": "public static function user_is_in_group(User $user, Group $group): bool\n {\n $ug = UserGroup::where('user_id', $user->id)->where('adminx_group_id', $group->id)->first();\n if ($ug !== null) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "ce4cad4222f7d1b3e8c00652a904c1e7", "score": "0.6706282", "text": "function checkUserIsGroupmember($username,$groupname,$grouplist)\t\n{\t\n $anzgroup = sizeof($grouplist);\t\n for($group = 0; $group < $anzgroup; $group++)//Schleife ueber alle Gruppen\t\t\n if($groupname == $grouplist[$group][0])\t\t\t\n for($member = 1; $member < sizeof($grouplist[$group]); $member++)//Schleife ueber alle Mitglieder der Gruppe\t\t\t\t\n if($username == $grouplist[$group][$member])//User in Gruppe gefunden\t\t\t\t\t\n return true;\t\n return false;\t\n}", "title": "" }, { "docid": "95904d8d09d7113204ce4fb79be1f488", "score": "0.6674119", "text": "function assign_user_to_group($user_id,$group_id){\n\t\t$mapping_exists = Crud::verify_existing_mapping($user_id,$group_id);\n\t\tif(!$mapping_exists){\n\t\t\tCrud::map_user_group($user_id,$group_id);\n\t\t}else{\n\t\t\t$username = Crud::get_name_by_id($user_id,'users');\n\t\t\t$groupname = Crud::get_name_by_id($user_id,'groups');\n\t\t\tdie(\"'\".$username.\"' is already into the '\" .$groupname. \"' Group!\");\n\t\t}\n\t}", "title": "" }, { "docid": "020a438ce0b41c171cf186af97dba81f", "score": "0.6671626", "text": "public function checkUserOrGroupAssignedTask (\\Users $objUser)\n {\n $permissions = $this->getProcessPermissions ();\n\n if ( !isset ($permissions['master']) || empty ($permissions['master']) )\n {\n return false;\n }\n\n if ( isset ($permissions['master']['user']) && !empty ($permissions['master']['user']) )\n {\n $userList = explode (\",\", $permissions['master']['user']);\n\n if ( trim ($objUser->getUserId ()) !== \"\" && in_array (!empty ($objUser->getUserId ()), $userList) )\n {\n return true;\n }\n }\n\n if ( isset ($permissions['master']['team']) && !empty ($permissions['master']['team']) )\n {\n $teamList = explode (\",\", $permissions['master']['team']);\n\n if ( trim ($objUser->getTeam_id ()) !== \"\" && in_array (trim ($objUser->getTeam_id ()), $teamList) )\n {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "bdba1be4cd92da1b82756eb05963d5d7", "score": "0.6632784", "text": "function assign_user_group()\n {\n // Test user group\n $user_group_id = 1;\n return $user_group_id;\n }", "title": "" }, { "docid": "cb90b9f70f2b3535264535fdbf060b65", "score": "0.6631973", "text": "function is_admin() {\n if (isset($_SESSION) && isset($_SESSION['user_group_id']) && $_SESSION['user_group_id'] == 2) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "cb90b9f70f2b3535264535fdbf060b65", "score": "0.6631973", "text": "function is_admin() {\n if (isset($_SESSION) && isset($_SESSION['user_group_id']) && $_SESSION['user_group_id'] == 2) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "20629c902ca78e1b0ad25d5c73f9e910", "score": "0.6622718", "text": "function is_aom() {\n if (isset($_SESSION) && isset($_SESSION['user_group_id']) && $_SESSION['user_group_id'] >= 4) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "f96c0e91ab836630c8779902d9d22344", "score": "0.66215444", "text": "function isSubbedToGroup($user, $group) {\n $link = conectarDB();\n $sql = \"SELECT users.name, suscripcion_grupo.rol FROM users, suscripcion_grupo,\"\n . \" `grupo` WHERE '$user' = suscripcion_grupo.user_id AND\"\n . \" suscripcion_grupo.grupo_id = '$group' AND users.username = \"\n . \"suscripcion_grupo.user_id and suscripcion_grupo.grupo_id = grupo.id\";\n $res = mysqli_query($link, $sql);\n $ret = false;\n if (mysqli_num_rows($res) > 0) {\n $ret = true;\n }\n cerrarDB();\n return $ret;\n}", "title": "" }, { "docid": "47f7dab53a66c0c8171fa57789b8dc13", "score": "0.66087943", "text": "function isAdmin($group_id = null, $user_id = null) {\n if(empty($group_id)) {\n $group_id = JRequest::getVar(\"group_id\");\n }\n if(empty($user_id)) {\n $user =& JFactory::getUser();\n $user_id = $user->id;\n }\n\n $db = & JFactory::getDBO();\n $query = \"SELECT admin FROM groups WHERE group_id = \".$group_id.\" and user_id = \".$user_id;\n $db->setQuery($query);\n return $db->loadResult();\n }", "title": "" }, { "docid": "e89237650e7d5cc0897791e448080a72", "score": "0.65440613", "text": "function user_access($group = NULL)\n{\n\t$CI =& get_instance();\n\t//\n\t!is_array($group) && strpos($group, \",\") === 0 ? $group = explode(',',$group) : '';\n\t// get user group\n\t$user_group = $CI->authentication->get('group');\n\t// check for acceptable group\n\tif( $user_group == $group || \n\t\t( is_array($group) && in_array($user_group, $group) ) || \n\t\t( $group == 'x' && $user_group == false ) || \n\t\t$group == null || \n\t\t( ($group == '*' || (is_array($group) && $group[key($group)] == '*') ) && $user_group != null ) \n\t)\n\t{\n\t\treturn TRUE;\n\t}\n\telse\n\t{\n\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "228f6c54ffa8dc5537ea8d4164aa9ba5", "score": "0.6533341", "text": "public function checkGroup($group, $user = false ) {\n\t\treturn $this->checkGroupId($this->_groupNametoId($group), $user);\n\t}", "title": "" }, { "docid": "0f472ee501ba53303d923dbbf51577f7", "score": "0.65324956", "text": "function _allowed($userId = null) {\n if ($userId == null) {\n return $this->Auth->user('group_id') >= 2;\n } else {\n $user = $this->User->read($userId);\n if ($this->Auth->user('id') == $userId\n || ($this->Auth->user('group_id') >= 2\n && $this->Auth->user('group_id') >= $user['User']['group_id'])) {\n return true;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "cd918564031e31ed7dc8c5878f07ab97", "score": "0.65238917", "text": "public function testAddToGroupToNotAssigned()\n {\n $myUtils = oxUtils::getInstance();\n $myDB = oxDb::getDB();\n\n $sUserID = $this->_aUsers[ $this->_aShops[ rand(0, count( $this->_aShops ) - 1 ) ] ][ rand( 0, count( $this->_aUsers[ 0 ] ) - 1 ) ];\n $oUser = oxNew( 'oxuser' );\n $oUser->load( $sUserID );\n\n // looking for not assigned group\n $sNewGroup = $myDB->getOne( 'select oxid from oxgroups where oxid not in ( select oxgroupsid from oxobject2group where oxobjectid=\"'.$sUserID.'\" ) ' );\n\n // checking before insert\n $this->assertEquals( 1, count( $oUser->getUserGroups() ) );\n\n // assigning to some group\n $this->assertTrue( $oUser->addToGroup( $sNewGroup ) );\n\n // checking DB\n $sCnt = $myDB->getOne( 'select count(*) from oxobject2group where oxobjectid=\"'.$sUserID.'\" and oxgroupsid=\"'.$sNewGroup.'\" ' );\n $this->assertEquals( 1, $sCnt );\n\n $oGroups = $oUser->getUserGroups();\n // checking group count after adding to new one\n $this->assertEquals( 2, count( $oGroups ) );\n\n // #0003218: validating loaded groups\n $this->assertEquals( true, isset($oGroups[$sNewGroup]) );\n $this->assertEquals( $sNewGroup, $oGroups[$sNewGroup]->getId() );\n }", "title": "" }, { "docid": "790be9cf6993c5cf9c1c9beb58a300e9", "score": "0.6505495", "text": "public static function is_user_in_group($user_id, $group_id)\n {\n $member = self :: is_subscribed($user_id, $group_id);\n $tutor = self :: is_tutor_of_group($user_id, $group_id);\n if ($member || $tutor) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3969247a08f54d13013e63a7b741edd6", "score": "0.6486784", "text": "public function hasJoined($group_id, $user_id)\n {\n return $this->isApproved($group_id, $user_id);\n }", "title": "" }, { "docid": "3b67656b09f16e3a78280239b0e09ee6", "score": "0.64854383", "text": "function ychange_can_create_groups(\\ElggUser $user)\n{\n return elgg_is_admin_logged_in() || ychange_is_teacher($user);\n}", "title": "" }, { "docid": "9b36ae47c5901121f050a79bec3283ab", "score": "0.64751947", "text": "function granted2update_group($usrgrpids){\n\t\tglobal $USER_DETAILS;\n\t\tzbx_value2array($usrgrpids);\n\n\t\t$users = get_userid_by_usrgrpid($usrgrpids);\n\t\t$result=(!isset($users[$USER_DETAILS['userid']]));\n\n\treturn $result;\n\t}", "title": "" }, { "docid": "fbf667a583ba2f1b09f8d8b41bd5ad91", "score": "0.6468847", "text": "protected function is_group($group)\n\t{\n\t\t$usergroup = $this->getUserGroup();\n\t\t\n\t\treturn $usergroup->group == $group;\n\t}", "title": "" }, { "docid": "add135ff4a4b360fd19b3c350fc9ad04", "score": "0.64679164", "text": "function checkAccessGroup()\n {\n // Get parameters as an array\n $groups = func_get_args();\n if(!in_array($this->session->userdata('group'), $groups)){\n if(!$this->input->is_ajax_request()){\n $message = _l(\"Unfortunately you do not have permission to this part of system.\", $this);\n $this->showError($message, 100, _l(\"Denied access\", $this));\n }else{\n $this->systemError(\"Unfortunately you do not have permission to this part of system.\", base_url());\n }\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "f9675d2c4050bb526e39212a3f3760fd", "score": "0.6464085", "text": "public function testAddToGroupToAssigned()\n {\n $myUtils = oxUtils::getInstance();\n $myDB = oxDb::getDB();\n\n $sUserID = $this->_aUsers[ $this->_aShops[ rand(0, count( $this->_aShops ) - 1 ) ] ][ rand( 0, count( $this->_aUsers[ 0 ] ) - 1 ) ];\n $oUser = oxNew( 'oxuser' );\n $oUser->load( $sUserID );\n\n $sGroupId = $myDB->getOne( 'select oxgroupsid from oxobject2group where oxobjectid=\"'.$sUserID.'\" ' );;\n\n // assigning to some group\n $this->assertEquals( false, $oUser->addToGroup( $sGroupId ) );\n }", "title": "" }, { "docid": "448b24e376ebe9a426ab0365870a28b0", "score": "0.6458496", "text": "public function isAdmin($key){\n\t\t$req = $this->db->exec('SELECT user_group FROM users WHERE users.key=\"'. $key.'\" AND users.user_group =\"1\"');\n\t\t$response = (count($req) < 1)?false:true;\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "5ee9dbb02e71fc85a3778b6562935841", "score": "0.6444539", "text": "function user_is_enrolled_in_group($user_id)\n {\n // get all peerassessmentgroups for this publication\n $publication_id = $this->get_publication_id();\n\n $condition = new EqualityCondition(\n new PropertyConditionVariable(\n PeerAssessmentGroupTracker::class_name(),\n PeerAssessmentGroupTracker::PROPERTY_PUBLICATION_ID),\n new StaticConditionVariable($publication_id));\n $groups = new PeerAssessmentGroupTracker();\n\n $groups_array = DataManager::retrieves(\n PeerAssessmentGroupTracker::class_name(),\n new DataClassRetrievesParameters($condition))->as_array();\n\n // get_all peerassessmentgroup subscriptions for user\n $condition = new EqualityCondition(\n new PropertyConditionVariable(\n PeerAssessmentGroupSubscriptionTracker::class_name(),\n PeerAssessmentGroupSubscriptionTracker::PROPERTY_USER_ID),\n new StaticConditionVariable($user_id));\n $users = new PeerAssessmentGroupSubscriptionTracker();\n\n $user_subscription_array = DataManager::retrieves(\n PeerAssessmentGroupSubscriptionTracker::class_name(),\n new DataClassRetrievesParameters($condition))->as_array();\n\n foreach ($user_subscription_array as $user_subscription)\n {\n $user_groups[] = $user_subscription->get_group_id();\n }\n\n // return true if there is a match\n foreach ($groups_array as $group)\n {\n if (in_array($group->get_id(), $user_groups))\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "aca2c271ba541fe7032127de9f078355", "score": "0.6411742", "text": "function group_assistant($groupid, $userid) {\n global $DB, $USER;\n \n if (!isset($userid)) {\n $userid = $USER->id;\n }\n \n group_exists($groupid);\n user_exists($userid);\n \n return $DB->record_exists(\n 'tool_epman_group_assistant',\n array(\n 'groupid' => $groupid,\n 'uerid' => $userid\n )\n );\n}", "title": "" }, { "docid": "9f6e9eb58a6290f9ea47d3b525e1d7aa", "score": "0.64054793", "text": "public function hasGroup($group);", "title": "" }, { "docid": "8de0e1ca5eba3317dc3c338c19a221ba", "score": "0.64008373", "text": "function userIsMember($user,$group) {\n\t\tif (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\t$user = strtolower($user);\n\t\t$group = $this->getDNAttrValues($group);\n\n\t\t# If you are using groupOfNames objectClass\n\t\tif (array_key_exists('member',$group) && ! is_array($group['member']))\n\t\t\t$group['member'] = array($group['member']);\n\n\t\tif (array_key_exists('member',$group) &&\n\t\t\tin_array($user,arrayLower($group['member'])))\n\n\t\t\treturn true;\n\n\t\t# If you are using groupOfUniqueNames objectClass\n\t\tif (array_key_exists('uniquemember',$group) && ! is_array($group['uniquemember']))\n\t\t\t$group['uniquemember'] = array($group['uniquemember']);\n\n\t\tif (array_key_exists('uniquemember',$group) &&\n\t\t\tin_array($user,arrayLower($group['uniquemember'])))\n\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cc52141357ea20da7dfc0ecf813f1a49", "score": "0.6393058", "text": "function group_student($groupid, $userid) {\n global $DB, $USER;\n \n if (!isset($userid)) {\n $userid = $USER->id;\n }\n \n group_exists($groupid);\n user_exists($userid);\n \n return $DB->record_exists(\n 'tool_epman_group_student',\n array(\n 'groupid' => $groupid,\n 'uerid' => $userid\n )\n );\n}", "title": "" }, { "docid": "96c79e8378f446818e482cae8225be75", "score": "0.638871", "text": "private function verifyGroup(string $groupName): bool\n {\n $groupUser = $this->roles->getGroup($this->user_info->role);\n $groupAccess = $this->roles->getGroup($groupName);\n \n if ($groupUser->id >= $groupAccess->id) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a1d9cdf6d3f2338d3f2e5a63737d66cd", "score": "0.6374641", "text": "function isMemberOf($groups) {\n global $modx;\n if ($groups == 'all') {\n return true;\n } else {\n $webgroups = explode(',', $groups);\n if ($modx->user->isMember($webgroups)) {\n return true;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "031e9fcf3bf761bf9a34f16aa5a0f7c5", "score": "0.6373159", "text": "protected function checkIfuserIsMemberOf()\n {\n $log = sfContext::getInstance()->getLogger();\n $result = array();\n $log->log('{sfSSOValidator} check if user has an authorized CN');\n if( is_array(sfConfig::get('app_sf_guard_sso_authorized_cn')) )\n {\n $groups = sfConfig::get('app_sf_guard_sso_authorized_cn');\n foreach($groups as $group)\n {\n if(sfPlexcel::isMemberOf($group))\n {\n $log->log('{sfSSOValidator} user is a member of '.$group);\n return true;\n }\n $log->log('{sfSSOValidator} user is NOT a member of '.$group);\n }\n throw new sfValidatorError($this, 'invalid_groups_not_authorized');\n }\n $log->log('{sfSSOValidator} user not a member of authorized groups');\n return false;\n }", "title": "" }, { "docid": "083e3f7fb80b4e76200284d5536416f1", "score": "0.6370911", "text": "function cns_may_control_group($group_id, $member_id, $group_row = null)\n{\n if ($group_row === null) {\n $leader = cns_get_group_property($group_id, 'group_leader');\n $is_super_admin = cns_get_group_property($group_id, 'is_super_admin');\n } else {\n $leader = $group_row['g_group_leader'];\n $is_super_admin = $group_row['g_is_super_admin'];\n }\n return (($member_id === $leader) || ($GLOBALS['CNS_DRIVER']->is_super_admin($member_id)) || ((has_privilege($member_id, 'control_usergroups')) && ($is_super_admin == 0)));\n}", "title": "" }, { "docid": "bef8e3841db67b25f304139bfe4c06f5", "score": "0.6367949", "text": "function is_member_of($group_id)\n {\n $int_val = intval($group_id);\n if(is_string($group_id)){\n $group = new Group();\n $group->where('name', $group_id)->get();\n $group_id = $group->id;\n }\n\n foreach($this->groups as $entry)\n {\n if($entry == $group_id)\n return true;\n }\n \n return false; \n }", "title": "" }, { "docid": "7c430e5c78fd1c6b4f344b9eb648cbb9", "score": "0.6365639", "text": "public function inGroup($group)\n {\n $group = ($group instanceof UserGroup) ? $group->id() : $group;\n\n return $this->groups()->has($group);\n }", "title": "" }, { "docid": "a88f90ec3cb318d3d050ed83fb563698", "score": "0.63613415", "text": "function checkusergroup($user_id, $group_id) {\n\tglobal $groups, $db_prefix;\n\n\t// result cache\n\tstatic $resultcache;\n\tif (isset($resultcache[$user_id][$group_id])) {\n\t\treturn $resultcache[$user_id][$group_id];\n\t}\n\n\t$check = false;\n\tif ($group_id == \"101\") {\n\t\t// every user is a member\n\t\t$check = true;\n\t} else {\n\t\t// get the group rights from the user record\n\t\t$result = dbquery(\"SELECT user_groups, user_level FROM \".$db_prefix.\"users WHERE user_id = '\".$user_id.\"'\");\n\t\tif ($data = dbarray($result)) {\n\t\t\t// check if the requested group matches a user level\n\t\t\tif ($group_id == $data['user_level']) {\n\t\t\t\t$check = true;\n\t\t\t} else {\n\t\t\t\t// if group memberships are defined, get the users own group memberships into an array\n\t\t\t\tif (!empty($data['user_groups'])) {\n\t\t\t\t\t$groups = explode(\".\", substr($data['user_groups'], 1));\n\t\t\t\t\tforeach ($groups as $group) {\n\t\t\t\t\t\t// check if this groups has subgroups. If so, add them to the array\n\t\t\t\t\t\tgetsubgroups($group);\n\t\t\t\t\t}\n\t\t\t\t\t// now that we have all groups, check for a match\n\t\t\t\t\tforeach ($groups as $group) {\n\t\t\t\t\t\tif ($group == $group_id) {\n\t\t\t\t\t\t\t$check = true;\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}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!isset($resultcache[$user_id])) $resultcache[$user_id] = array();\n\t$resultcache[$user_id][$group_id] = $check;\n\n\treturn $check;\n}", "title": "" }, { "docid": "afca801d591f9d576962fada66fa440c", "score": "0.63547814", "text": "public function isGroupMember($id)\n\t{\n\t\t$user = R::load(\"user\", $this->user_id);\n\t\t$groups = R::related($user, \"group\");\n\t\t\n\t\t$group = R::load(\"user\", $id);\n\t\t\n\t\treturn in_array($group, $groups);\n\t}", "title": "" }, { "docid": "6e42f0d01a1918f6c4216c30ab16ad29", "score": "0.6348505", "text": "public function isGroupOwner($group)\n {\n $criteria = Criteria::create();\n $criteria->andWhere(Criteria::expr()->eq('group', $group));\n $criteria->andWhere(Criteria::expr()->lte('status', UserInGroup::IS_OWNER));\n $criteria = $this->handleCriteria($criteria, array(), 1, null);\n\n if ($this->groups->matching($criteria)->count() === 0) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "98e6770ebeea540127782e627dfd7881", "score": "0.6347846", "text": "public function addMember(User $user, Group $group)\n {\n return $user->hasRole(config('users.roles.group_manager')) && in_array($group->id, $user->group_ids);\n }", "title": "" }, { "docid": "a61ddc7725dfbbdaaf8cb57068131816", "score": "0.6344563", "text": "function isGroupAllowed ( $username ) {\r\n\t\tglobal $wgSMFGroupName;\r\n\r\n\t\tif(isset($wgSMFGroupName) && !empty($wgSMFGroupName))\r\n\t\t{\r\n\t\t\tif(!is_array($wgSMFGroupName))\r\n\t\t\t\t$wgSMFGroupName = array($wgSMFGroupName);\r\n\r\n\t\t\t// Administrators always allowed.\r\n\t\t\tif($this->isGroupMember($username, null, 1))\r\n\t\t\t\treturn true;\r\n\r\n\t\t\t// Search through all groups, if match they're allowed.\r\n\t\t\tforeach($wgSMFGroupName as $group)\r\n\t\t\t\tif($this->isGroupMember($username, $group))\r\n\t\t\t\t\treturn true;\r\n\r\n\t\t\t// No go!\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Groups not defined or empty allow them.\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "9e0b3b92a5552618036e0641528654a9", "score": "0.6336766", "text": "protected function _checkAttemptForGroup(Group $group, User $user)\n {\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n\n $qb\n ->select('putsches')\n ->from('MongoboxJukeboxBundle:Putsch', 'putsches')\n ->where('putsches.group = :group')\n ->andWhere('putsches.user != :user')\n ->andWhere('putsches.response is null')\n ->setParameters(array(\n 'group' => $group,\n 'user' => $user\n ))\n ->setMaxResults(1)\n ->getQuery()\n ;\n\n $query = $qb->getQuery();\n\n try {\n $result = $query->getSingleResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n $result = false;\n }\n\n if ($result === false) {\n return true;\n } else {\n return array(\n 'result' => 'deny',\n 'fail' => 'group'\n );\n }\n }", "title": "" }, { "docid": "7a1193d951ef88e18b053f9f44ba2e5a", "score": "0.633427", "text": "public function isAssignableByUser()\n {\n return strpos($this->assignRole,'ROLE_USER') !== false ? true : false;\n }", "title": "" }, { "docid": "ccb767a9830f1a6406a4d58334f9f1b3", "score": "0.6332868", "text": "public function hasUser($userId){\n\t\treturn GO_Base_Model_AclUsersGroups::model()->findByPk(array(\n\t\t\t\t'acl_id'=>$this->id,\n\t\t\t\t'group_id'=>0,\n\t\t\t\t'user_id'=>$userId\n\t\t\t\t\t\t));\n\t}", "title": "" }, { "docid": "85c84beded0ba37bf1adb8b015e275df", "score": "0.6321884", "text": "function does_user_has_access($uid,$uri,$action){\n $user_groups = get_user_groups($uid);\n $permission_sets = get_permission_sets($uri, $action);\n $permission_set_groups = get_permission_set_groups($permission_sets);\n\n foreach($user_groups as $id) {\n\n if(in_array($id,$permission_set_groups)) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "dc48624c0d85d35b20879abcde59e84e", "score": "0.6321733", "text": "public static function hasGroup($id_user){\n if(self::where(\"student\",$id_user)->count() == 0)\n return false;\n\n return true;\n }", "title": "" }, { "docid": "854541a4a97d8a5d0102fbf8f1fb42fe", "score": "0.6310574", "text": "public function testInGroupWrongGroup()\n { // non existing group\n $myUtils = oxUtils::getInstance();\n $myDB = oxDb::getDB();\n $myConfig = oxConfig::getInstance();\n\n $sUserID = $this->_aUsers[ $this->_aShops[ rand(0, count( $this->_aShops ) - 1 ) ] ][ rand( 0, count( $this->_aUsers[ 0 ] ) - 1 ) ];\n $oUser = oxNew( 'oxuser' );\n $oUser->load( $sUserID );\n\n // assigned to some group ?\n $this->assertEquals( false, $oUser->inGroup( 'oxtestgroup' ) );\n }", "title": "" }, { "docid": "f125a8856cd2b84ad8dc81ee5c1298cf", "score": "0.6303215", "text": "public function userIsInGroup($groups = NULL) {\r\n\t\t$this->ensureSession();\r\n\t\t// Ensure that we're working with an array.\r\n\t\t// TODO: Determine whether this is necessary.\r\n\t\tif (!is_array($groups)) {\r\n\t\t\t$groups = array($groups);\r\n\t\t}\r\n\t\t// Find out the whether the user's groups and the argument groups have IDs in common.\r\n\t\t$intersection = array_intersect($this->session->userGroups, $groups);\r\n\t\treturn count($intersection) > 1;\r\n\t}", "title": "" }, { "docid": "c980a32b0a706e49963765c91acbddf0", "score": "0.62939024", "text": "public function doesUserExistInGroup($userId) {\n $query = \"SELECT memberId as id\n FROM groupMembers\n WHERE groupMembers.memberId=?\n\n UNION\n\n SELECT invitedId as id \n FROM groupInvitations\n WHERE groupInvitations.invitedId=?\";\n\n $stmt = $this->databaseConnection->prepare($query);\n $stmt->bind_param(\"ds\", $userId, $userId);\n $result = $stmt->execute();\n\n $return = [];\n $num = $stmt->get_result()->num_rows;\n\n return $num > 0;\n }", "title": "" }, { "docid": "7637680dff41a1d7ce6ad57841229af1", "score": "0.6291742", "text": "public function isGroupAdmin($group)\n {\n $criteria = Criteria::create();\n $criteria->andWhere(Criteria::expr()->eq('group', $group));\n $criteria->andWhere(Criteria::expr()->lte('status', UserInGroup::IS_ADMIN));\n $criteria = $this->handleCriteria($criteria, array(), 1, null);\n\n if ($this->groups->matching($criteria)->count() === 0) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d6704af0a2422efb7bce9f5d4c36347e", "score": "0.62758106", "text": "public function isOwnedBy($groupId, $userId) {\n $gt = TableRegistry::get('GroupsUsers');\n return $gt->exists(['group_id' => $groupId, 'user_id' => $userId, 'gm' => true]);\n }", "title": "" }, { "docid": "59f818009360463e4791b7951c3b1f17", "score": "0.6263869", "text": "public function isInGroup($group, $isUser = true)\n {\n $criteria = Criteria::create();\n $criteria->andWhere(Criteria::expr()->eq('group', $group));\n\n if ($isUser) {\n $criteria->andWhere(Criteria::expr()->lte('status', UserInGroup::IN_GROUP));\n }\n\n $criteria = $this->handleCriteria($criteria, array(), 1, null);\n\n $userInGroups = $this->groups->matching($criteria);\n\n if ($userInGroups->count() !== 0) {\n return $userInGroups->first();\n }\n\n return false;\n }", "title": "" }, { "docid": "12744c78d706e81dfb83409504b0262e", "score": "0.62516266", "text": "function hasLDAPGroup( $group ) {\n $this->printDebug(\"Entering hasLDAPGroup\",1);\n\n return in_array( strtolower( $group ), $this->userLDAPGroups );\n }", "title": "" }, { "docid": "3e83f97b62f429140c6988092baf9659", "score": "0.624249", "text": "function isGroupMember ( $username, $groupName, $groupID = null ) {\r\n\t\tglobal $smf_settings, $smf_map;\r\n\r\n\t\t$conn = $this->connect();\r\n\t\t$request = $this->query(\"\r\n\t\t\tSELECT $smf_map[id_group], $smf_map[additional_groups], $smf_map[id_post_group]\r\n\t\t\tFROM $smf_settings[db_prefix]members\r\n\t\t\tWHERE $smf_map[member_name] = '{$username}'\r\n\t\t\tLIMIT 1\", $conn);\r\n\r\n\t\t$groups = array();\r\n\t\twhile($row = mysql_fetch_assoc($request))\r\n\t\t{\r\n\t\t\t$groups[] = $row[$smf_map['id_group']];\r\n\t\t\tif(!empty($row[$smf_map['additional_groups']]))\r\n\t\t\t\t$groups = array_merge($groups, explode(',', $row[$smf_map['additional_groups']]));\r\n\t\t\tif(!empty($row[$smf_map['id_post_group']]))\r\n\t\t\t\t$groups = array_merge($groups, explode(',', $row[$smf_map['id_post_group']]));\r\n\t\t}\r\n\r\n\t\tmysql_free_result($request);\r\n\r\n\t\tif(isset($groupName))\r\n\t\t{\r\n\t\t\t$request = $this->query(\"\r\n\t\t\t\tSELECT $smf_map[id_group]\r\n\t\t\t\tFROM $smf_settings[db_prefix]membergroups\r\n\t\t\t\tWHERE $smf_map[group_name] = '{$groupName}'\r\n\t\t\t\tLIMIT 1\", $conn);\r\n\r\n\t\t\tlist($groupID) = mysql_fetch_row($request);\r\n\t\t\tmysql_free_result($request);\r\n\r\n\t\t\t// Invalid group, error out!\r\n\t\t\tif(!isset($groupID))\r\n\t\t\t\tdie ('Unable to find SMF group called \"' . $groupName . '\" set in LocalSettings.php!');\r\n\t\t}\r\n\r\n\t\t// Is there a match?\r\n\t\tif(in_array($groupID, $groups))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "74ce817e7fdb807e878c395543fdef9b", "score": "0.6241908", "text": "public function group_user_check_admin($gpid,$uid)\r\n\t{\r\n\t\t$dbobj=new ta_dboperations();\r\n\t\t$res=$dbobj->dbquery(\"SELECT * FROM \".tbl_members_attached::tblname.\" WHERE \".tbl_members_attached::col_gpid.\"='$gpid' AND \".tbl_members_attached::col_uid.\"='$uid' AND (\".tbl_members_attached::col_memrole.\"='3' OR \".tbl_members_attached::col_memrole.\"='2')\", tbl_members_attached::dbname);\r\n\t\tif(count($res)!=0)\r\n\t\t{\r\n\t\t\treturn BOOL_SUCCESS;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn BOOL_FAILURE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "69213de5060d2211fbe44dac2f04bb84", "score": "0.62417537", "text": "function groupunameExists($uname)\n {\n $group = User_group::staticGet('uname', $uname);\n\n if (!empty($group)) {\n return true;\n }\n\n $alias = Group_alias::staticGet('alias', $uname);\n\n if (!empty($alias)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5f70d4c6f8bfdca997ce4b1f5a17bc12", "score": "0.6224273", "text": "public function isGroupLeader() {\n\t\tif (MODULE_MODERATED_USER_GROUP == 1) {\n\t\t\treturn $this->getPermission('wcf.group.isGroupLeader');\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "391228b86b469b42e7b93b6a6daa8a8e", "score": "0.6223677", "text": "public function check($group_expr) {\n\t\t$msg = \"\";\n\t\tif($this->session_service->has(\"current_user\")) {\n\t\t\t$user = $this->session_service->get(\"current_user\");\n\t\t\tif($user = $this->verify($user)) {\n\t\t\t\t$groups = $user->getGroups();\n\t\t\t\tif(in_array($group_expr, $groups)) {\n\t\t\t\t\t$this->current_user = $user;\n\t\t\t\t\treturn $this->current_user;\n\t\t\t\t} else {\n\t\t\t\t\t$msg = \"You don't have the permission to do this.<br> Either log in as a permitted user or <br> <a href='javascript:history.back()'>Go Back</a>\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->session_service->del(\"current_user\");\n\t\t\t\t$msg = \"Could not be logged in\";\n\t\t\t}\n\t\t} else {\n\t\t\t$msg = \"You have to be logged in to see this\";\n\t\t\t$request = $this->routing_service->getRequest();\n\t\t\t$prev_url = array($request->getRouteName(), $request->getRouteParams());\n\t\t\t$this->session_service->set(\"redirect_after_login\", $prev_url);\n\t\t}\n\t\t$this->setLastMessage($msg);\n\t\t$this->routing_service->redirect($this->login_route_name, array());\n\t\tthrow new \\Exception($msg);\n\n\t}", "title": "" }, { "docid": "b274a811355eb415e6442c37592be1f4", "score": "0.6222102", "text": "public function testAssigningToGroup()\n\t{\n\t\t\\App\\User::setCurrentUserId(\\App\\User::getActiveAdminId());\n\t\t$groups = \\App\\User::getCurrentUserModel()->getGroupNames();\n\t\t$groupId = \\key($groups);\n\t\t$chat = \\App\\Chat::getInstance('group', $groupId);\n\t\t$this->assertTrue($chat->isRoomExists(), \"The chat room does not exist '{$groups[$groupId]}'\");\n\t\t$this->assertFalse($chat->isAssigned(), \"The user should not be assigned '{$groups[$groupId]}'\");\n\t\t$chat->addToFavorites();\n\t\t$this->assertTrue($chat->isRoomExists(), \"The chat room does not exist '{$groups[$groupId]}'\");\n\t\t$this->assertTrue($chat->isAssigned(), \"The user should be assigned '{$groups[$groupId]}'\");\n\t\t$row = (new \\App\\Db\\Query())\n\t\t\t->from(\\App\\Chat::TABLE_NAME['room'][$chat->getRoomType()])\n\t\t\t->where(['userid' => \\App\\User::getCurrentUserId()])\n\t\t\t->andWhere([\\App\\Chat::COLUMN_NAME['room'][$chat->getRoomType()] => $groupId])\n\t\t\t->one();\n\t\t$this->assertNotFalse($row, 'Problem with methods \"addToFavorites\"');\n\t\t$this->assertIsInt($row['last_message'], 'Problem with methods \"addToFavorites\"');\n\t}", "title": "" }, { "docid": "c64c72313ebe37fb2e0cc82a151d890f", "score": "0.6222088", "text": "public static function is_tutor_of_group($user_id, $group_id)\n {\n $table_group_tutor = Database :: get_course_table(TABLE_GROUP_TUTOR);\n $user_id = intval($user_id);\n $group_id = intval($group_id);\n $course_id = api_get_course_int_id();\n\n $sql = \"SELECT * FROM $table_group_tutor\n WHERE \n c_id = $course_id AND \n user_id = $user_id AND \n group_id = $group_id\";\n $result = Database::query($sql);\n if (Database::num_rows($result) > 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c8a7250a968674c51bae2ea60412aaac", "score": "0.6214973", "text": "public function has_access()\n {\n $this->get_settings();\n if (! is_array($this->settings['group_access'])) {\n $this->settings['group_access'] = array();\n }\n return (ee()->session->userdata['group_id'] == '1' or in_array(ee()->session->userdata['group_id'], $this->settings['group_access'])) ? true : false;\n }", "title": "" }, { "docid": "3d9a4a10d0e248685a57d1ae462f2a6d", "score": "0.6203737", "text": "function check_group($check_groups = NULL)\n\t{\n\t\tif ( is_array($check_groups) )\n\t\t{\n\t\t\tforeach ($check_groups as $group)\n\t\t\t{\n\t\t\t\tif (!$this->user_groups || $this->user_groups == NULL)\n\t\t\t\t{\n\t\t\t\t\terror_log(\"No user groups listed, from page: \" . 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t\t\t\t}\n\t\t\t\tif ( in_array($group, $this->user_groups) )\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (in_array($check_groups, $this->user_groups))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6e70d62d9e7f76076aae29c3a3972860", "score": "0.6184515", "text": "public function group_user_check($gpid,$uid)\r\n\t{\r\n\t\t$dbobj=new ta_dboperations();\r\n\t\t$res=$dbobj->dbquery(\"SELECT * FROM \".tbl_members_attached::tblname.\" WHERE \".tbl_members_attached::col_gpid.\"='$gpid' AND \".tbl_members_attached::col_uid.\"='$uid' AND \".tbl_members_attached::col_memflag.\"='1'\", tbl_members_attached::dbname);\r\n\t\tif(count($res)!=0)\r\n\t\t{\r\n\t\t\treturn BOOL_SUCCESS;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn BOOL_FAILURE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "88a98567fd765eb8240a5c5401e20612", "score": "0.6180947", "text": "function isMemberOf( $gid, $inRelationTo = -1 )\n\t{\n\t\t/* special cases */\n\n\t\t// super user\n\t\tif( $this->id === SUPER_USER )\n\t\t\treturn true;\n\t\t\n\t\t// evreryone\n\t\tif( $gid == -1 )\n\t\t\treturn true;\n\t\t\t\t\n\t\t/* database */\n\t\t\n\t\treturn Database::select(\n\t\t\t'GroupMembers',\n\t\t\t'count(*)',\n\t\t\tarray(\n\t\t\t\t'where' => array(\n\t\t\t\t\t'gid' => $gid,\n\t\t\t\t\t'uid' => $this->id ),\n\t\t\t\t'single' => true ) ) == 1;\n\t}", "title": "" }, { "docid": "a571e1a6be411ca002724dd7a70d4b7f", "score": "0.6178378", "text": "private function isInAllowedUserGroup($userId)\n\t{\n\t\t$allowedUserGroups = $this->getAllowedUserGroups();\n\n\t\t$user = JFactory::getUser($userId);\n\n\t\tif ($user->id != $userId)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($user->guest)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// No specifically allowed user groups: allow ALL user groups.\n\t\tif (empty($allowedUserGroups))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t$groups = $user->getAuthorisedGroups();\n\t\t$intersection = array_intersect($groups, $allowedUserGroups);\n\n\t\treturn !empty($intersection);\n\t}", "title": "" }, { "docid": "e3c04dbb321702ea0b61661c22cc5b5e", "score": "0.6177233", "text": "function user_can($acl_name, $group_id = 0)\n{\n\tglobal $d_groups, $user;\n\n\tif($group_id == 0)\n\t{\n\t\t$group_id = $user->data['group_id'];\n\t}\n\n\treturn (bool) $d_groups[$group_id]['acls'][$acl_name];\n}", "title": "" }, { "docid": "0cca3d809ad296b55cd74dc22f014d67", "score": "0.6160004", "text": "function members_cap_group_exists( $name ) {\n\n\treturn members_cap_group_registry()->exists( $name );\n}", "title": "" }, { "docid": "b8d1fd7bfa4337fb4ad8e39139a2dc5c", "score": "0.61548716", "text": "function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {\n\n $isValid = False; \n //Cuando el usuario tiene ingreso, la variable Session MM_Username es igual a la de acceso del usuario, es decir su número de identificación.\n //Por otro lado, se sabe que el usario no esta con Login si la variable esta en blanco.\n if (!empty($UserName)) { \n //Se puede restringir el acceso a ciertos ID, mediante el login accedido.\n // Convierte los strings restringidos en arrays.\n $arrUsers = Explode(\",\", $strUsers); \n $arrGroups = Explode(\",\", $strGroups); \n if (in_array($UserName, $arrUsers)) { \n $isValid = true; \n } \n \n if (in_array($UserGroup, $arrGroups)) { \n $isValid = true; \n } \n if (($strUsers == \"\") && true) { \n $isValid = true; \n } \n } \n return $isValid; \n}", "title": "" }, { "docid": "818a51794d4d36824e98c06158286b7f", "score": "0.61444134", "text": "public function checkGroupId($group_id, $user = false) {\n\t\treturn $this->_foundInSet($group_id, $this->getGroups($user));\n\t}", "title": "" }, { "docid": "0eda8534c0bbea55cb50e6fb21b5dc54", "score": "0.6142954", "text": "public function groupExists($gid){\n\t\treturn in_array($gid, $this->getGroups());\n\t}", "title": "" }, { "docid": "f9935835a0aeefa412b7f86c380d8482", "score": "0.61324084", "text": "function checkGroupAdminExist($groupname, $groupadminlist)\t\n{\t\n $anzgroup = sizeof($groupadminlist);\t\n for($i = 0; $i < $anzgroup; $i++)\t\t\n if(strtolower($groupname) == strtolower($groupadminlist[$i][0]))\t\t\t\n return true;\t\n return false;\t\n}", "title": "" }, { "docid": "305dbe2e30fc7c8c32e83b88e89dd5c0", "score": "0.6127811", "text": "function requestAccessGroup()\n {\n if(!$this->session->has_userdata('group')){\n echo json_encode(array(\n 'status'=>\"error\",\n 'error'=>\"Unfortunately you do not have permission to this part of system.\",\n ));\n return false;\n }\n // Get parameters as an array\n $groups = func_get_args();\n if(!in_array($this->session->userdata('group'), $groups)){\n echo json_encode(array(\n 'status'=>\"error\",\n 'error'=>\"Unfortunately you do not have permission to this part of system.\",\n ));\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "a7be4a22e8f7c6666a60cfaeb6188c53", "score": "0.612112", "text": "public function inGroup($group) : bool\n {\n $id = ($group instanceof GroupInterface) ? $group->getID() : $group;\n return isset($this->groups[$id]);\n }", "title": "" }, { "docid": "e3a99aeb0e10566d7c6ebbe235257b96", "score": "0.61181587", "text": "public function isGroupPublic($group)\n {\n \t\t// get user_id and then add this user\n\t\t$this->db->select('openness');\n\t\t$this->db->where('title', $group);\n\t\t$this->db->from('groups');\n\t\t$query=$this->db->get();\n\t\t\n\t\t$row = $query->row(); \n\t\t$openness = $row->openness;\n\t\t\n\t\tif ($openness == 'public') {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n }", "title": "" }, { "docid": "316e8d2627870ae414f56b4546568eee", "score": "0.61160487", "text": "public static function user_is_in_group ($user, $groups) {\n\n\t\tif (is_string($groups)) {\n\t\t\t$groups = array_filter(explode(\",\", $groups));\n\t\t}\n\n\t\tif ($groups && count($groups)) {\n\n\t\t\tforeach ($groups as $group) {\n\n\t\t\t\t$users = self::get_users($group);\n\n\t\t\t\tif ($users && in_array($user, $users)) {\n\t\t\t\t\treturn $group;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// no group found\n\t\t\treturn false;\n\t\t}\n\n\t\t// empty group list -> grant\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\n\t}", "title": "" }, { "docid": "2ede97cfda85feff0ed4d341cfed8f17", "score": "0.6110067", "text": "function lobby_groupsapi_isOwner($args) \n{\n \t$id = (int)$args['id'];\n \t$uid = (int)$args['uid'];\n \tif (!($id > 0) || !($uid > 0)) {\n\t\treturn false;\n\t} else {\n\t\t$group = DBUtil::selectObjectByID('lobby_groups',$id);\n\t\treturn ($group['uid'] == $uid);\n\t}\n}", "title": "" }, { "docid": "295bc52b9bb5605b4e6782900d7ed886", "score": "0.61013347", "text": "public function check_user_group($intUserID){\n\t\tif (!$this->db) return false;\n\t\t\n\t\t$groups = explode(',', $this->config->get('cmsbridge_groups'));\n\t\t\n\t\tif ($this->check_function('user_group')){\n\t\t\t$method_name = $this->data['user_group']['FUNCTION'];\n\t\t\treturn $this->$method_name($intUserID, $groups);\n\t\t} else {\n\n\t\t\tif ($this->check_query('user_group')){\n\t\t\t\t$strQuery = $this->check_query('user_group').$this->db->escape($intUserID);\n\t\t\t} else {\n\t\t\t\t$strQuery = \"SELECT \".$this->data['user_group']['group'].' as group_id \n\t\t\t\t\t\t\tFROM '.$this->prefix.$this->data['user_group']['table'].' \n\t\t\t\t\t\t\tWHERE '.$this->data['user_group']['user'].\" = '\".$this->db->escape($intUserID).\"'\";\n\t\t\t}\n\t\t\t$result = $this->db->fetch_array($strQuery);\n\t\t\tif ($result && is_array($result)){\n\t\t\t\tforeach ($result as $row){\n\t\t\t\t\tif (is_array($groups) && in_array($row['group_id'], $groups)){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "16fbdce0c8a513037b16ac564a7a4bc3", "score": "0.6096187", "text": "private function callAuthCheckGroup($group) {\n return Wee()->auth->currentUserCheckGroup($group);\n }", "title": "" }, { "docid": "2d70f0e2b98648283ea7f6f4c0ff9c44", "score": "0.6064158", "text": "public function isAssignee() {\n\t\treturn $this->_auth_user_id == $this->field('assignee_id');\n\t}", "title": "" }, { "docid": "3364d3934173752909f8a19fbea34888", "score": "0.6055699", "text": "function checkGroup($data, $field) {\n\t\t$validGroups = array('admin', 'poweruser', 'user');\n\t\tif ($this->hasField($field) && in_array($data[$field], $validGroups)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "35e23747a469e19a8e26ec4c28c441b8", "score": "0.60529035", "text": "public function inGroup($groupId)\n {\n $find = ['user_id' => $this->id];\n if (!is_numeric($groupId)) {\n $g = Gatekeeper::findGroupByName($groupId);\n $groupId = $g->id;\n }\n $find['group_id'] = $groupId;\n\n $userGroup = new UserGroupModel($this->getDb());\n $userGroup = $this->getDb()->find($userGroup, $find);\n if ($userGroup->id === null) {\n return false;\n }\n return ($userGroup->id !== null && $userGroup->groupId == $groupId) ? true : false;\n }", "title": "" }, { "docid": "3185dd643699c13adaceb2a4cbc4a461", "score": "0.6052009", "text": "public function hasGroup() : bool\n {\n return isset($this->group);\n }", "title": "" }, { "docid": "59d87e83ae3e6e769a5ae868f7814886", "score": "0.6047798", "text": "function find_by_groupName($val)\n {\n global $db;\n $sql = \"SELECT group_name FROM user_groups WHERE group_name = '{$db->escape($val)}' LIMIT 1 \";\n $result = $db->query($sql);\n return($db->num_rows($result) === 0 ? true : false);\n }", "title": "" }, { "docid": "59d87e83ae3e6e769a5ae868f7814886", "score": "0.6047798", "text": "function find_by_groupName($val)\n {\n global $db;\n $sql = \"SELECT group_name FROM user_groups WHERE group_name = '{$db->escape($val)}' LIMIT 1 \";\n $result = $db->query($sql);\n return($db->num_rows($result) === 0 ? true : false);\n }", "title": "" }, { "docid": "030ab1ba54e026dd9cd7726253f9efda", "score": "0.60321957", "text": "public function hasGroup($groupId){\n\t\treturn GO_Base_Model_AclUsersGroups::model()->findByPk(array(\n\t\t\t\t'acl_id'=>$this->id,\n\t\t\t\t'group_id'=>$groupId,\n\t\t\t\t'user_id'=>0\n\t\t\t\t\t\t));\n\t}", "title": "" }, { "docid": "c911214028be5054a5263bcb1ebdd371", "score": "0.60256296", "text": "function CheckAuthGroupAccess($groups,$groupsList,$userid) {\n\t\t$groupaccess = \"denied\";\n\t\t$checkme = $this->GetBetween(\"(\",\")\",\"$groups\");\n\t\t$checkthis = explode(\",\",$checkme);\n\t\t$allow = array(\"Staff\",\"Faculty\",\"Emeritus\");\n\t\tforeach($checkthis as $item) {\n\t\t\tif($item === \"\" || $item === \" \") { continue; }\n\t\t\tif(in_array(\"$item\",$allow)) {\n\t\t\t\t$groupaccess = \"allowed\";\n\t\t\t}\t\t\n\t\t}\n\t\t// this will add any users present in the userlevel function below, ie for special admins that are not faculy/staff\n\t\tif($this->UserLevel($userid)!==\"none\"){\n\t\t\t$groupaccess = \"allowed\";\n\t\t}\n\n\t\t// logic to only accept beta users\n\t\t$betalist = array(\"mbarone\",\n\t\t\t\t\t\t\t\"sls-mb\",\n\t\t\t\t\t\t\t\"sls-ckm\",\n\t\t\t\t\t\t\t\"yvera\",\n\t\t\t\t\t\t\t\"cvera\",\n\t\t\t\t\t\t\t\"mkay\",\n\t\t\t\t\t\t\t\"shawn.sumner\",\n\t\t\t\t\t\t\t\"mark.wilson\",\n\t\t\t\t\t\t\t\"rodrigue\",\n\t\t\t\t\t\t\t\"atcs-04\",\n\t\t\t\t\t\t\t\"atcs-03\",\n\t\t\t\t\t\t\t\"tuffer\",\n\t\t\t\t\t\t\t\"mayedac\",\n\t\t\t\t\t\t\t\"vasst\",\n\t\t\t\t\t\t\t\"odonnell\",\n\t\t\t\t\t\t\t\"chris.boosalis\",\n\t\t\t\t\t\t\t\"qian\",\n\t\t\t\t\t\t\t\"nelsen\",\n\t\t\t\t\t\t\t\"munguia\",\n\t\t\t\t\t\t\t\"ryan\",\n\t\t\t\t\t\t\t\"wes\",\n\t\t\t\t\t\t\t\"lmurphy\",\n\t\t\t\t\t\t\t\"michael.elfant\",\n\t\t\t\t\t\t\t\"carolyng\",\n\t\t\t\t\t\t\t\"fdillon\",\n\t\t\t\t\t\t\t\"tashirol\",\n\t\t\t\t\t\t\t\"smckay\",\n\t\t\t\t\t\t\t\"iko\",\n\t\t\t\t\t\t\t\"travis\",\n\t\t\t\t\t\t\t\"binod.pokhrel\",\n\t\t\t\t\t\t\t\"ekee\",\n\t\t\t\t\t\t\t\"lojom\",\n\t\t\t\t\t\t\t\"sjperez\",\n\t\t\t\t\t\t\t\"dahlquid\",\n\t\t\t\t\t\t\t\"mikelee\",\n\t\t\t\t\t\t\t\"jane.bruner\",\n\t\t\t\t\t\t\t\"ck852\",\n\t\t\t\t\t\t\t\"storres\",\n\t\t\t\t\t\t\t\"welkleyd\",\n\t\t\t\t\t\t\t\"castagna\"\n\t\t\t\t\t\t);\n\t\tif(in_array(\"$userid\",$betalist)) {\n\t\t\t$groupaccess = \"allowed\";\n\t\t} else {\n\t\t\t$groupaccess = \"deniednobeta\";\t\n\t\t}\n\n\n\t\t/*\n\t\t// logic to deny specific users\n\t\t$denylist = array(\"saclinks\");\n\t\tif(in_array(\"$userid\",$denylist)) {\n\t\t\t$groupaccess = \"denied\";\n\t\t}\n\t\t*/\n\n\t\t/*\n\t\t * this might be causing false negatives, some faculty/staff are also students\n\t\tif($groupaccess === \"allowed\") {\n\t\t\t$deny = array(\"Student\",\"Applicant\");\n\t\t\tforeach($checkthis as $item) {\n\t\t\t\tif($item === \"\" || $item === \" \") { continue; }\n\t\t\t\tif(in_array(\"$item\",$deny)) {\n\t\t\t\t\t$groupaccess = \"deniednobeta\";\n\t\t\t\t}\n\t\t\t}\n\t\t}*/\n\t\t// $asdf = array(\"univ-tbl-irt-managers\",\"irt-managers\");\n\t\t// array_push($asdf, \"irt-staff\",\"IRT-LeadershipTeam\",\"irt-exec\",\"irt-acs-managers\",\"IRT-LeadershipTeam\");\n\t\t$asdf = array(\"atcs-sacct-static\",\"atcs-sacct-static1\");\n\t\tforeach($asdf as $item) {\n\t\t\tif (strpos($groupsList, \"$item\") !== false) {\n\t\t\t\t//echo \"<br>this person<br>has $item\";\n\t\t\t\t//$groupaccess=\"deniednobeta\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif($groupaccess==='allowed'){\n\t\t\tif(!isset($_SESSION['loggedin']) || $_SESSION['loggedin']==='0') {\n\t\t\t\t$this->log->LogInfo(\"User $userid has been $groupaccess access to SMS\");\n\t\t\t\t$this->UserLoggedIn($userid,$groupaccess);\n\t\t\t\t$this->sessionAddUsername($userid,$groupaccess);\n\t\t\t\t$_SESSION['userid']=\"$userid\";\n\t\t\t\t$_SESSION['loggedin']='1';\n\t\t\t}\n\t\t}else{\n\t\t\t$_SESSION['userid']=\"$userid\";\n\t\t\t$this->log->LogWarn(\"User $userid has been $groupaccess access to SMS\");\n\t\t\t$this->UserLoggedIn($userid,$groupaccess);\n\t\t\t$this->sessionAddUsername($userid,$groupaccess);\n\t\t}\n\t\treturn $groupaccess;\t\t\n\t}", "title": "" }, { "docid": "231b02723a1e3ff17ae24fddf7e02be3", "score": "0.6022883", "text": "public static function currentUserMatchesGroups($groups = []) {\n /**\n * There are no groups. This matches anyone.\n */\n if (count($groups) === 0) {\n return true;\n }\n\n /**\n * This is not a logged-in user. Their only chance to match this group set is if it has \"Hide at login\"\n */\n if (!static::userSessionExists()) {\n return in_array(static::PSEUDO_GROUP_HIDE_AT_LOGIN, $groups);\n }\n\n /**\n * There is a current user with groups on it\n */\n if (in_array(static::PSEUDO_GROUP_SHOW_AT_ANY_LOGIN, $groups)) {\n return true;\n }\n\n /**\n * Does user have one of the groups in the list?\n */\n if (count(array_intersect(static::currentUserGroups(), $groups)) > 0) {\n return true;\n }\n\n /**\n * No more chance to survive; make your time.\n */\n return false;\n }", "title": "" }, { "docid": "5ad89238eccf628cb1ec4b600ff563f6", "score": "0.60028565", "text": "abstract public function isMember(\n AbstractUserGroup $userGroup,\n bool $lockRecursive,\n $objectId,\n ?AssignmentInformation &$assignmentInformation = null\n ): bool;", "title": "" }, { "docid": "6c60047a43dcdd43ab462dee5dc137d1", "score": "0.60004646", "text": "function promoteUser() {\n $groupvpn = $this->loadGroup();\n if(!$groupvpn) {\n return false;\n }\n\n $user =& JFactory::getUser();\n if(!$this->isAdmin($groupvpn->group_id, $user->id)) {\n JError::raiseError(403, JText::_('Access Forbidden'));\n }\n\n $db = & JFactory::getDBO();\n $query = \"UPDATE groups SET admin = 1 \".\n \"WHERE user_id = \".$user->id.\" and group_id = \".$groupvpn->group_id;\n if($db->query($query)) {\n return true;\n }\n\n JError::raiseWarning(500, JText::_('Unable to promote...'));\n return false;\n }", "title": "" }, { "docid": "0aea37feb5da776138f4e5f294d62f19", "score": "0.5982812", "text": "public function regUserGroup($group){\n\n $id = $this->db->getLastId();\n\n $this->setUserParams($id);\n\n $this->db->query('INSERT INTO group_users (user_id, group_id) VALUES (:user_id, :group_id)');\n $this->db->bind(':user_id', $id);\n $this->db->bind(':group_id', $group);\n\n if($this->db->execute()){\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "title": "" }, { "docid": "61f53fe00a8315a00b579ad1b939fd8d", "score": "0.5976361", "text": "public function view(?User $user, Group $group)\n {\n // fetch optional sanctum user\n if ( $user == null ) {\n $user = sanctumUser();\n }\n\n // if group is not private\n if ( $group->private != '1' && $group->private != 'true' && $group->private != true ) {\n return true;\n }\n\n // all cases below are checked only if the group is private\n\n // if guest\n if ( $user == null ) {\n return false;\n }\n\n // if user's the group owner\n if ( $group->owner_id == $user->id ) {\n return true;\n }\n\n // if user belongs to the group\n if ( $group->members->contains($user) ) {\n return true;\n }\n\n // if there's an admin accepted invitation for the user\n $invitation = $group->invitations\n ->where('user_id', $user->id)\n ->where('admin_accepted', true)\n ->first();\n\n if ( $invitation != null ) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "78f35a57e7be064ad72c2766bbb29d25", "score": "0.5975187", "text": "function addToGroup($group) {\n global $Controller;\n if(is_a($group, 'Base')) $group = $group->ID;\n if(is_numeric($group) && !in_array($group, $this->groups(false))) {\n if($g = $Controller->{(string)$group}('Group')) {\n if($g->addMember($this))\n {\n $this->_mygroupIds[$group] = $group;\n Log::write('Added user \\'' . $this->username . '\\' (id=' . $this->ID . ') to group \\''.$g->Name . '\\' (id=' . $g->ID . ')', 10);\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "bea981c12a3cfab747a0d4577cf9535a", "score": "0.5970262", "text": "function user_belong_to_same_group($user1id,$user2id,$courseid) {\n\techo $user1id;\n\techo '<br/>';\n\techo $user2id;\n\t$groupids1=get_records('groups_members','userid',$user1id);\n\t$groupids2=get_records('groups_members','userid',$user2id);\n\t$check=0;\n\tforeach($groupids1 as $groupid1) {\n\t\tforeach($groupids2 as $groupid2) {\n\t\t\tif ($groupid1->groupid==$groupid2->groupid) {\n\t\t\t\t$check=1;\n\t\t\t}\n\t\t}\n\t}\n\tif($check==1) {\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "title": "" } ]
4bbd1f285e0c2dfd6792085a2a8b20dd
Returns the migration path to create the migration in.
[ { "docid": "3c30900d96b1114c0a897e9a33ea0b2d", "score": "0.6275811", "text": "protected function getMigrationPath(InputInterface $input, OutputInterface $output)\n {\n // First, try the non-interactive option:\n $path = $input->getOption('path');\n\n if (!empty($path)) {\n return $path;\n }\n\n $paths = $this->getConfig()->getMigrationPaths();\n\n // No paths? That's a problem.\n if (empty($paths)) {\n throw new Exception('No migration paths set in your Phinx configuration file.');\n }\n\n $paths = Util::globAll($paths);\n\n if (empty($paths)) {\n throw new Exception(\n 'You probably used curly braces to define migration path in your Phinx configuration file, ' .\n 'but no directories have been matched using this pattern. ' .\n 'You need to create a migration directory manually.'\n );\n }\n\n // Only one path set, so select that:\n if (count($paths) === 1) {\n return array_shift($paths);\n }\n\n /** @var \\Symfony\\Component\\Console\\Helper\\QuestionHelper $helper */\n $helper = $this->getHelper('question');\n $question = $this->getSelectMigrationPathQuestion($paths);\n\n return $helper->ask($input, $output, $question);\n }", "title": "" } ]
[ { "docid": "958dbe4f8a545dfc162900a463d1304f", "score": "0.843273", "text": "private function getMigrationPath()\n\t{\n\t\treturn join('/', [$this->getBasePath(), 'migrations']);\n\t}", "title": "" }, { "docid": "926d919ef217053741184609fd2ee704", "score": "0.80284965", "text": "public static function getMigrationPath() {\n // TODO: SSv4: Move to YAML configuration instead.\n if (defined(\"MIGRATION_PATH\")) {\n // Migration path defined by constant.\n $migrationPath = MIGRATION_PATH;\n\n } else {\n // Attempt to infer this path automatically based on the project name.\n $project = project();\n if (empty($project)) throw new MigrationException(\"Please either define a global '\\$project' variable or define a MIGRATION_PATH constant in order to setup a path for migration files to live.\");\n\n // Build path.\n $migrationPath = join(DIRECTORY_SEPARATOR, array(BASE_PATH, $project, \"code\", \"migrations\"));\n }\n\n return $migrationPath;\n }", "title": "" }, { "docid": "582f8b9d4a703eae50a038598954b12b", "score": "0.78678966", "text": "protected function getMigrationPath(): string\n {\n if (! \\is_null($targetPath = $this->input->getOption('path'))) {\n return ! $this->usingRealPath()\n ? $this->preset->basePath().'/'.$targetPath\n : $targetPath;\n }\n\n return $this->preset->migrationPath();\n }", "title": "" }, { "docid": "9545d8e387086ac34c5f3faa242004f4", "score": "0.78271383", "text": "protected function getMigrationPath()\n {\n if (! is_null($targetPath = $this->input->getOption('path'))) {\n return ! $this->usingRealPath()\n ? $this->laravel->basePath().'/'.$targetPath\n : $targetPath;\n }\n\n return parent::getMigrationPath();\n }", "title": "" }, { "docid": "753883b606b85f98c2a5a5072c8ef3bd", "score": "0.7625498", "text": "public static function getMigrationsPath()\n {\n $path = config('codegenerator.migrations_path', 'database/migrations');\n\n return Helpers::getPathWithSlash($path);\n }", "title": "" }, { "docid": "910555fafdba6dab1a8d7931a9eb6623", "score": "0.7616929", "text": "protected function getMigrationPath()\n {\n $defaultPath = BASE_PATH . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR . 'mongodb';\n $path = $this->getConfig()['migration']['path'] ?? $defaultPath;\n return $path;\n }", "title": "" }, { "docid": "b83df792461d2c1a4679fa19ac535446", "score": "0.7602556", "text": "protected function getMigrationPath()\n {\n if (null !== $moduleName = $this->input->getOption('module')) {\n try {\n $module = Modules::getByName($moduleName);\n } catch (ModuleNotFoundException $exception) {\n throw new InvalidArgumentException(\"Module {$moduleName} not found.\", 0, $exception);\n }\n $path = $module->getPath('src/Database/Migrations');\n if (!is_dir($path) && !mkdir($path, 0755, true)) {\n throw new InvalidArgumentException(\"Can not create directory {$path}\");\n }\n\n return $path;\n }\n\n return parent::getMigrationPath();\n }", "title": "" }, { "docid": "b8dbbe43d5be2216ca27679b63479de0", "score": "0.7515157", "text": "protected function getMigrationsSrcPath()\n {\n return realpath(__DIR__.'/../database/migrations');\n }", "title": "" }, { "docid": "9dfa46547d8eb9e97a5466f0f7a54f07", "score": "0.7464127", "text": "protected function getMigrationPath()\n {\n return LaravelPackage::path(PathRepository::getMigrationPath());\n }", "title": "" }, { "docid": "b6e2de9ad6abb53bb52f3ee3db2960d8", "score": "0.73862696", "text": "protected function targetMigrationPath()\n {\n return config('bagpack.path', $this->getMigrationPath());\n }", "title": "" }, { "docid": "3e0620dee1ea7b9c687bba6e65c6aa5a", "score": "0.7345489", "text": "protected function getMigrationsDestPath()\n {\n return realpath(database_path('migrations'));\n }", "title": "" }, { "docid": "4e0c0035c492b89e3c52327c909c43a4", "score": "0.7316383", "text": "public function getMigrationPath($table = null)\n {\n $path = $this->get('migration.path');\n return $table? $path.'/'.date('Y_m_d_His').'_create_'.$table.'_table.php' : $path;\n }", "title": "" }, { "docid": "02c9dac88f3fb1a5785f72f4e4529aef", "score": "0.72934544", "text": "public function migrationPaths()\n {\n return [\n dirname(__DIR__, 3) . '/database/migrations',\n ];\n }", "title": "" }, { "docid": "5fe93cdf7e8c3ac35592a1e3dc0624c2", "score": "0.7050582", "text": "protected function getMigrationsSrcPath()\n {\n return realpath(dirname(__DIR__) . '/src/Migrations');\n }", "title": "" }, { "docid": "b46c92015868d6547a9508f052a2a160", "score": "0.6841942", "text": "protected function getFileGenerationPath()\n\t{\n\t\t$path = $this->getPathByOptionOrConfig('path', 'migration_target_path');\n\t\t$fileName = $this->getDatePrefix() . '_' . $this->migrationName . '.php';\n\n\t\treturn \"{$path}/{$fileName}\";\n\t}", "title": "" }, { "docid": "fe22af92569b8c4acf09564d905b2f07", "score": "0.6599814", "text": "protected function _getDirectory()\n {\n $dir = './scripts/migrations';\n return realpath($dir);\n }", "title": "" }, { "docid": "cbe49bed070860fc850029b136a06b30", "score": "0.6575023", "text": "protected function getMigrateDirectory() {\n return variable_get('hedley_migrate_directory', FALSE) ? variable_get('hedley_migrate_directory') : drupal_get_path('module', 'hedley_migrate');\n }", "title": "" }, { "docid": "a5a27a7b010fe9079ae2207fd8c35563", "score": "0.649632", "text": "protected function getMigrationPaths()\n {\n if (null === $this->migrationPath) {\n $this->migrationPath = uniqid('phinx', true);\n }\n\n return [$this->migrationPath];\n }", "title": "" }, { "docid": "b39bf8ae75522c5351c26db95f550126", "score": "0.6481877", "text": "public function getMigrationName()\n {\n return $this->migration_name;\n }", "title": "" }, { "docid": "85d7dcb8a26ed992a1bba287a56b9827", "score": "0.6454725", "text": "public function getMigration() {\n return $this->migration;\n }", "title": "" }, { "docid": "bafcfaeab73a0b90d337934947b2317b", "score": "0.6353884", "text": "protected function getMigrationPath($slug)\n\t{\n $module = $this->laravel['veemo.modules']->getManager()->info($slug);\n\t\t$path = $module['path'];\n\n\t\treturn $path.'/Database/Migrations/';\n\t}", "title": "" }, { "docid": "2d7fe7f5cbf5b9635a63325f5cb53c1f", "score": "0.63196427", "text": "protected function getPath($name)\n {\n return './database/migrations/'.date('Y_m_d_His').'_'.$name.'.php';\n }", "title": "" }, { "docid": "0f6fd39578f7245d9a44fcc06a801647", "score": "0.62716246", "text": "public function stubPath()\n {\n return __DIR__ . '/Stubs/Migration';\n }", "title": "" }, { "docid": "0cfeacc499bda9bb9c696c0050e27ff8", "score": "0.6253201", "text": "private function getMigrationTable() {\n $table='tbl_migration';\n if(Yii::app() instanceof CConsoleApplication) {\n /* @var $app CConsoleApplication */\n $app=Yii::app();\n $command=$app->command;\n if($command instanceof MigrateCommand) {\n /* @var $command MigrateCommand */\n $table=$command->migrationTable;\n }\n } \n return $table;\n }", "title": "" }, { "docid": "109490cbdf508ce3c2ee3e7defd55d23", "score": "0.62070006", "text": "protected function getModuleMigrationPath(string $module): string\n {\n // Get the base directory where migrations should go\n $dir = $this->moduleManager->getModuleDirectory($module) . \"/Database/Migrations\";\n\n // If the directory does not exist, create it with rwrwr access\n if (!is_dir($dir)) {\n $this->files->makeDirectory($dir, 0755, true);\n }\n\n return $dir;\n }", "title": "" }, { "docid": "d61a77e070b85ea98d2c2bcdc95839bd", "score": "0.61757576", "text": "protected function getMigrationTemplateFile()\n {\n return APP_SCAFFOLD_TEMPLATE_DIR . self::DEFAULT_MIGRATION_TEMPLATE;\n }", "title": "" }, { "docid": "42516ab6b5fc25d4c261c0e3e1fb7998", "score": "0.6125669", "text": "abstract protected function getMigrationClass(): string;", "title": "" }, { "docid": "49b68e282a18f23b2c0ce442de720d85", "score": "0.6110935", "text": "public function generate()\n {\n $name = '';\n if (!empty($this->name)) {\n $name = str_replace(' ', '', ucwords(str_replace('_', ' ', $this->name)));\n }\n\n $className = 'Version' . date('YmdHis', time()) . $name;\n $classPath = $this->migrationsDir . DIRECTORY_SEPARATOR . $className . '.php';\n\n if (file_exists($classPath)) {\n throw new MigrationException(sprintf('Migration %s exists!', $className));\n }\n file_put_contents($classPath, $this->getTemplate($className));\n\n return $classPath;\n }", "title": "" }, { "docid": "b83cda11cd85ae2b4868837021504271", "score": "0.60998696", "text": "public function getName()\n {\n return 'MigrationDirectory';\n }", "title": "" }, { "docid": "2f53e430146509ae68fcc6a4b6c5266c", "score": "0.60952574", "text": "protected function getMigrationFileName()\n {\n $childClassName = get_called_class();\n $reflection = new \\ReflectionClass($childClassName);\n $fileInfo = pathinfo($reflection->getFileName());\n\n return $fileInfo['filename'];\n }", "title": "" }, { "docid": "519a2b1206bf122a248269d179c3778d", "score": "0.6066213", "text": "public function provider_get_filename_from_migration()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'myapp/1293214439_initial-setup.php',\n\t\t\t\tarray(\n\t\t\t\t\t'group' => 'myapp',\n\t\t\t\t\t'timestamp' => '1293214439',\n\t\t\t\t\t'description' => 'initial-setup',\n\t\t\t\t\t'id' => 'myapp:1293214439'\n\t\t\t\t),\n\t\t\t\t'myapp',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "a9aae857174f3c2a1a283932998f43aa", "score": "0.60184336", "text": "public function migrationsPath($relative = false)\n {\n $path = $this->normalizePath($this->config->migrationsPath());\n\n return $relative ? $path : $this->directory() . DIRECTORY_SEPARATOR . $path;\n }", "title": "" }, { "docid": "d9cc6ba372add686590f5499b130eadc", "score": "0.5941736", "text": "public static function getRelativeDatabasePath()\n {\n return 'projects/' . self::getConfig('projectId') . '/databases/' . self::getConfig('database');\n }", "title": "" }, { "docid": "df1d2bea4f412815acd01c87952a21f5", "score": "0.5837748", "text": "protected function createMigration()\n {\n $table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));\n if ($this->option('pivot')) {\n return parent::createMigration();\n }\n $this->call('make:migration-sdk', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n ]);\n }", "title": "" }, { "docid": "2cbd6516e0a7e6c017f43f4e5a11703b", "score": "0.58251435", "text": "protected function getFileGenerationPath()\n {\n $path = $this->getPathByOptionOrConfig('path', 'model_target_path');\n\n return $path. '/' . ucwords($this->argument('modelName')) . '.php';\n }", "title": "" }, { "docid": "8e420b39debdc837cf5a05a465f6bc1d", "score": "0.5800593", "text": "protected function getTemplatePath()\n\t{\n\t\treturn $this->getPathByOptionOrConfig('templatePath', 'migration_template_path');\n\t}", "title": "" }, { "docid": "f3b7daf719981513e9f6d87b36db9045", "score": "0.5750445", "text": "protected function createMigration(): void\n {\n $table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));\n\n if ($this->option('pivot')) {\n $table = Str::singular($table);\n }\n\n $this->call('module:make-migration', [\n 'module' => $this->getModuleInput(),\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n '--fullpath' => true,\n ]);\n }", "title": "" }, { "docid": "ee886e7c834dfd9aa9a8464e0d708d5d", "score": "0.57406133", "text": "protected function getDatabasePath(): string\n {\n return __DIR__ . '/../files/database';\n }", "title": "" }, { "docid": "1ffddef7fa5074c822c16e1501a06171", "score": "0.5729195", "text": "public function getMigrationName($path)\n {\n return str_replace('.php', '', basename($path));\n }", "title": "" }, { "docid": "7a34de761e5ba566f57c91d75a5d9c48", "score": "0.57177824", "text": "public static function getSqlPath() {\n return '';\n }", "title": "" }, { "docid": "befa6b4efbd7b5c1ef07858a2ae149c0", "score": "0.57173526", "text": "protected function seederPath()\n {\n return $this->getPath('LaratrustSeeder');\n }", "title": "" }, { "docid": "f4e138093d8d4b53eb254ca9dd2a5ccd", "score": "0.57158506", "text": "protected function getMigrations()\n {\n $formatted_date = date('Y_m_d_His');\n $path = base_path() . '/database/migrations/';\n $files = [\n 'MigrationActivations' => $path . $formatted_date . '_create_user_activations_table.php',\n 'MigrationUsers' => $path . $formatted_date . '_add_boolean_column_to_users_table.php'\n ];\n\n return $files;\n }", "title": "" }, { "docid": "dd5808b998739d9ce9c52e2a0c045deb", "score": "0.5712178", "text": "private function createMigration()\n {\n try {\n $model = Str::plural(class_basename($this->resourceName)); // Якщо Blog то Blogs\n\n return $this->call('make:module-migration', [\n 'module' => $this->moduleName,\n 'migrationName' => \"create_{$model}_table\",\n 'table' => \"$model\"\n ]);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "3e6521f9ea70dd84d1449233a80a71e0", "score": "0.57018495", "text": "protected function getMigrationPaths(): array\n {\n // Here, we will check to see if a path option has been defined. If it has we will\n // use the path relative to the root of the installation folder so our database\n // migrations may be run for any customized path from within the application.\n if ($this->input->hasOption('path') && $this->input->getOption('path')) {\n return collect($this->input->getOption('path'))->map(function ($path) {\n return ! $this->usingRealPath()\n ? BASE_PATH . DIRECTORY_SEPARATOR . $path\n : $path;\n })->all();\n }\n\n return array_merge(\n $this->paths(),\n [$this->getMigrationPath()]\n );\n }", "title": "" }, { "docid": "600b5de67479631034bd5b9f6e30c3bb", "score": "0.56602544", "text": "public function getMigrationName(string $path): string\n {\n return str_replace('.php', '', basename($path));\n }", "title": "" }, { "docid": "2e76de5fd62fa5c8e8b4801b8c78ad8b", "score": "0.56564945", "text": "public function migrationTableName(){\n return strtolower($this->getClass()).'s';\n }", "title": "" }, { "docid": "8905397aa14b084334d1f5f8d8985a9d", "score": "0.56557924", "text": "function getSqlPath()\n {\n return dirname(__FILE__).'/sql/'.__CLASS__;\n }", "title": "" }, { "docid": "8905397aa14b084334d1f5f8d8985a9d", "score": "0.56557924", "text": "function getSqlPath()\n {\n return dirname(__FILE__).'/sql/'.__CLASS__;\n }", "title": "" }, { "docid": "e192e4524e756f2aaef07a5d02844b17", "score": "0.5639314", "text": "public function migrationID() {\n return hash('crc32b', $this->uuid());\n }", "title": "" }, { "docid": "0cc1b07f2833f09250cf4ee31c00352f", "score": "0.5616368", "text": "public function file() {\n return database_path('seeds/' . $this->crud->getPluralFullStudly() . 'TableSeeder.php');\n }", "title": "" }, { "docid": "a19804d5750bd9c970e12664d1a6d861", "score": "0.56051874", "text": "public function migrate()\n {\n $migrationPath = $this->basePath . '/migrations';\n if (is_dir($migrationPath)) {\n \\humhub\\commands\\MigrateController::webMigrateUp($migrationPath);\n }\n }", "title": "" }, { "docid": "8297669b5872cb946831e97095ffb47f", "score": "0.5597064", "text": "public function addMigration(string $migrationPath);", "title": "" }, { "docid": "6194d719888fba2c893b15bd95998c02", "score": "0.5519734", "text": "public function getFabricatorSourcePath()\n {\n return implode(DIRECTORY_SEPARATOR,[$this->getFabricatorDirectoryPath(),\n ucfirst($this->arguments['fabricator'])]);\n }", "title": "" }, { "docid": "44f05bb38c4a48250a06042b86817277", "score": "0.55089384", "text": "public function provider_get_migration_from_filename()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'group' => 'myapp',\n\t\t\t\t\t'description' => 'initial-setup',\n\t\t\t\t\t'timestamp' => '1293214439',\n\t\t\t\t\t'id' => 'myapp:1293214439',\n\t\t\t\t),\n\t\t\t\t'migrations/myapp/1293214439_initial-setup.php',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "5cd39f1f646c455bdf2531643d15ed6e", "score": "0.5480445", "text": "protected function createMigration()\n {\n $table = str_plural(snake_case(class_basename($this->argument('name'))));\n\n $this->call('package:migration', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "3f462ca965da0c69685b054e32fd520d", "score": "0.54702634", "text": "protected function getMigrationFileName(Filesystem $filesystem): string\n {\n $timestamp = date('Y_m_d_His');\n\n return Collection::make($this->app->databasePath() . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR)\n ->flatMap(function ($path) use ($filesystem) {\n return $filesystem->glob($path . '*_create_customized_form_tables.php');\n })->push($this->app->databasePath() . \"/migrations/{$timestamp}_create_customized_form_tables.php\")\n ->first();\n }", "title": "" }, { "docid": "7abda20eec568244ab547a0e5cb7bd08", "score": "0.5466834", "text": "protected function getMigrationFileName(Filesystem $filesystem): string\n {\n $timestamp = date('Y_m_d_His');\n\n return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR)\n ->flatMap(function ($path) use ($filesystem) {\n return $filesystem->glob($path.'*_create_connectips_table.php');\n })->push($this->app->databasePath().\"/migrations/{$timestamp}_create_connectips_table.php\")\n ->first();\n }", "title": "" }, { "docid": "7b1a015451268398b7a645b1affa3117", "score": "0.5464627", "text": "public function databasePath(string $module): string;", "title": "" }, { "docid": "20c30de13b4cd5f463f18f7eaed26495", "score": "0.5463341", "text": "public function newMigration()\n {\n $fileName = (isset($this->arguments[1])) ? $this->arguments[1] : null;\n $this->migrateManager->newMigration($fileName);\n }", "title": "" }, { "docid": "9930024e068ff1a645fe3c0c4b0e44c7", "score": "0.5455211", "text": "public function getMigrationStub(): string\n {\n return file_get_contents($this->stubsPath . '/migrations/migration.stub');\n }", "title": "" }, { "docid": "a32b3380a4b0ae6f05e475cdcef32a7d", "score": "0.54466367", "text": "protected function createMigration()\n {\n $table = Str::plural(Str::snake(class_basename($this->argument('name'))));\n\n $this->call('make:migration', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n ]);\n }", "title": "" }, { "docid": "a32b3380a4b0ae6f05e475cdcef32a7d", "score": "0.54466367", "text": "protected function createMigration()\n {\n $table = Str::plural(Str::snake(class_basename($this->argument('name'))));\n\n $this->call('make:migration', [\n 'name' => \"create_{$table}_table\",\n '--create' => $table,\n ]);\n }", "title": "" }, { "docid": "37ffab3378a794efdbd8d8b78cd5aebb", "score": "0.54418755", "text": "public function migrate()\n\t{\n\t\t$migrationPath = $this->getMigrationPath();\n\t\tif (is_dir($migrationPath)) {\n\t\t\t\\app\\commands\\MigrateController::webMigrateUp($migrationPath);\n }\n\t}", "title": "" }, { "docid": "2bc2682aa8e76633fefde6cdfabb8749", "score": "0.5438663", "text": "public static function migrationDirs()\n {\n $migrationDirs = [];\n\n foreach (app('migrator')->paths() as $path) {\n // Excludes the migrations within \"vendor\" folder:\n if (! Str::startsWith($path, [base_path('vendor')])) {\n $migrationDirs[] = FilePath::normalize($path);\n }\n }\n\n $migrationDirs[] = app()->databasePath().DIRECTORY_SEPARATOR.'migrations';\n\n return $migrationDirs;\n }", "title": "" }, { "docid": "3320efe1f69d1c1c9e7feb4ec336f921", "score": "0.5401981", "text": "public static function getMigrations(): ?string\n {\n return null;\n }", "title": "" }, { "docid": "ba9c97f88c08e9d432d72dfaa9e0dfd2", "score": "0.5399242", "text": "protected function getMigrationFileName(Filesystem $filesystem): string\n {\n $timestamp = date('Y_m_d_His');\n\n return Collection::make($this->app->databasePath() . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR)\n ->flatMap(function ($path) use ($filesystem) {\n return $filesystem->glob($path . '*_create_tenants_table.php');\n })->push($this->app->databasePath() . \"/migrations/{$timestamp}_create_tenants_table.php\")\n ->first();\n }", "title": "" }, { "docid": "9a82dfe972c5fed2a220045dba140359", "score": "0.5384784", "text": "public function provider_get_migration()\n\t{\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'timestamp' => '20101215164400',\n\t\t\t\t\t'description' => 'create-tables',\n\t\t\t\t\t'group' => 'app',\n\t\t\t\t\t'applied' => '1',\n\t\t\t\t\t'id' => 'app:20101215164400'\n\t\t\t\t),\n\t\t\t\t'app',\n\t\t\t\t'20101215164400',\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "2f143125defd7e4f01243c554b733601", "score": "0.53756833", "text": "private function getDefaultSchemaFilePath(string $migrationsPath): string\n {\n return $migrationsPath . DIRECTORY_SEPARATOR . 'schema.php';\n }", "title": "" }, { "docid": "98a03310a5f2ef3809cb92961e9d2a23", "score": "0.5375093", "text": "public function path()\n {\n return $this->projectPath().DIRECTORY_SEPARATOR.'app';\n }", "title": "" }, { "docid": "215062bc5d61cac5d922d5d1cdbead25", "score": "0.5373567", "text": "public function getInternalDatabasePath()\n {\n return $this->preprendBaseDir($this->configValues['internal_db']);\n }", "title": "" }, { "docid": "3152df50b8bd3f7948464240e4cde3f5", "score": "0.536479", "text": "public function migrationExists()\n {\n if ( $this->params->m2m ) {\n return FileSystem::hasMigration(\"{$this->params->parent->lower}_{$this->params->model->lower}\");\n }\n\n return FileSystem::hasMigration($this->params->model->lower_plural);\n }", "title": "" }, { "docid": "62ccf2dd668281f69359d1d38bb172d1", "score": "0.5356489", "text": "private function migrations()\n {\n $create_bdd_domains_table = __DIR__ . '/../../database/migrations/0001_create_bdd_domains_table.php.stub';\n $create_bdd_features_table = __DIR__ . '/../../database/migrations/0002_create_bdd_features_table.php.stub';\n $create_bdd_stories_table = __DIR__ . '/../../database/migrations/0003_create_bdd_scenarios_table.php.stub';\n $create_bdd_lines_table = __DIR__ . '/../../database/migrations/0004_create_bdd_lines_table.php.stub';\n\n $this->publishes([\n $create_bdd_domains_table => $this->getMigrationFileName(new Filesystem(), 'create_bdd_domains_table'),\n $create_bdd_features_table => $this->getMigrationFileName(new Filesystem(), 'create_bdd_features_table'),\n $create_bdd_stories_table => $this->getMigrationFileName(new Filesystem(), 'create_bdd_scenarios_table'),\n $create_bdd_lines_table => $this->getMigrationFileName(new Filesystem(), 'create_bdd_z_lines_table')\n ]);\n }", "title": "" }, { "docid": "3c9cef3ff4563ee4b6b023b9ef0fc754", "score": "0.5346946", "text": "public function getMappingPath()\n {\n return $this->laravel->databasePath().DIRECTORY_SEPARATOR.'mappings';\n }", "title": "" }, { "docid": "3403b23ec0c0f0aede7a1b6f1a0ce49d", "score": "0.5334078", "text": "protected function getPath($name, $unixTime = 0)\n {\n return database_path('migrations') . '/' . $this->getDatePrefix($unixTime) . '_' . $name . '.php';\n }", "title": "" }, { "docid": "c84abff01dfb0761261e0457d4fbbfee", "score": "0.5327977", "text": "public function getPath()\n {\n\n $return = $this->getBasePath() . '/' . $this->getConfigGeneratorClassPath($this->getClassType(), true) . '/'. 'web.php';\n // Log::debug($return);\n return $return;\n }", "title": "" }, { "docid": "d0bbd2387c368e07c88c5b3d2e6804cb", "score": "0.5317808", "text": "public static function getDatabasePath(): string\n {\n return self::getAppPath() . 'Database' . DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "53342ff75ed5cb3349b004aaa1631085", "score": "0.53150713", "text": "public static function tableName()\n {\n return 'example_migration';\n }", "title": "" }, { "docid": "f3b9d0444045d93622c2581af3fe844e", "score": "0.5314107", "text": "public function webHookPath(): string {\n return route('project.deploy', ['project' => $this->uuid]);\n }", "title": "" }, { "docid": "46fae572ab2fd7c41dee551d16eeb16a", "score": "0.53126955", "text": "public function getMigrationClass($table)\n {\n $className = ucfirst(camel_case($table));\n return 'Create'.$className.'Table';\n }", "title": "" }, { "docid": "d2ab2eb48f1d112f3ff62696f2643d2c", "score": "0.53098565", "text": "public function createMigration()\n { \n // We get the contents of the stub and replace the class name and table name\n $migrationContent = str_replace(\n [\n '{{className}}',\n '{{tableName}}'\n ], \n [\n $this->names['migration_name'], \n $this->names['table_name']\n ], \n file_get_contents(__DIR__ . '/stubs/migration.stub') \n );\n\n // Then we write the contents to the file\n file_put_contents(getcwd() . '/database/migrations/' . date('Y_m_d_His') . '_create_' . $this->names['table_name'] . '_table.php', $migrationContent);\n \n return true;\n }", "title": "" }, { "docid": "5bf010bb51a9181d3f5bc9beb19ece52", "score": "0.52974814", "text": "protected function getSqlFile()\n {\n if (!is_null($this->input->getOption('filename'))) {\n return $this->input->getOption('filename');\n }\n\n throw new Exception('No file passed as migration. Add it using the -f option.');\n }", "title": "" }, { "docid": "f438fd6f8826ead115192db734956c3f", "score": "0.52954936", "text": "private function foreignMigration()\n {\n $migrationTexts = [];\n\n foreach ($this->relations as $tableName => $relations) {\n foreach ($relations as $relation) {\n $createForeign = sprintf(\n '->foreign(\\'%s\\')->references(\\'%s\\')->on(\\'%s\\')',\n array_get($relation, 'foreign'),\n array_get($relation, 'references'),\n array_get($relation, 'on')\n );\n\n if (array_get($relation, 'onDelete')) {\n $createForeign .= sprintf(\"->onDelete('%s')\", array_get($relation, 'onDelete'));\n }\n\n $dropForeign = sprintf(\n '->dropForeign([\\'%s\\'])',\n array_get($relation, 'foreign')\n );\n\n $migrationTexts[$tableName]['up'][] = '$table' . $createForeign . ';';\n $migrationTexts[$tableName]['down'][] = '$table' . $dropForeign . ';';\n }\n }\n\n foreach ($migrationTexts as $tableName => $migrationText) {\n $fileName = $this->makeForeignMigrationFileName($tableName);\n $className = $this->makeClassName($fileName);\n $template = $this->templateConstraintText;\n\n $start = 'Schema::table($this->table, function (Blueprint $table) {';\n $end = PHP_EOL . ' ' . '});';\n\n $upText = '';\n foreach ($migrationText['up'] as $text) {\n $upText .= PHP_EOL . ' ' . $text;\n }\n\n $downText = '';\n foreach (array_reverse($migrationText['down']) as $text) {\n $downText .= PHP_EOL . ' ' . $text;\n }\n\n $upText = $start . $upText . $end;\n $downText = $start . $downText . $end;\n\n $template = str_replace('_CLASS_NAME_', $className, $template);\n $template = str_replace('_TABLE_NAME_', $tableName, $template);\n $template = str_replace('_UP_', $upText, $template);\n $template = str_replace('_DROP_', $downText, $template);\n\n $filePath = $this->getPath($fileName, 2);\n $this->writeMigration($filePath, $template);\n }\n }", "title": "" }, { "docid": "9f672a16dee59ea172ed188cec0cd2d0", "score": "0.5285619", "text": "public function get_settings_path() {\n return BACKUP_MIGRATE_MENU_PATH . $this->settings_path . $this->type_name;\n }", "title": "" }, { "docid": "88bc9724f25431e3f19005edc56fb8a6", "score": "0.5279842", "text": "protected function path(): string\n {\n $path = resource_path('views' . DIRECTORY_SEPARATOR . str_replace('.', DIRECTORY_SEPARATOR, $this->view) . '.blade.php');\n\n $directory = dirname($path);\n\n if (!is_dir($directory)) {\n \\File::makeDirectory($directory, 0755, true);\n }\n\n return $path;\n }", "title": "" }, { "docid": "3ee0088b5897e30145a122886b34b3d9", "score": "0.5273863", "text": "public function getMigrationTemplateFile()\n {\n if (!isset($this->values['migration']['template'])) {\n return false;\n }\n\n return $this->values['migration']['template'];\n }", "title": "" }, { "docid": "282503879f9d87c8ff9ff443619b3af7", "score": "0.5271199", "text": "protected function getMigrationCreator(): MigrationCreator\n {\n if (! isset($this->migrationCreator)) {\n $this->migrationCreator = new MigrationCreator($this->files);\n }\n\n return $this->migrationCreator;\n }", "title": "" }, { "docid": "b332a72dd9db327b2f106a9a65e57a8c", "score": "0.52683693", "text": "protected function getMigrationFileName(Filesystem $filesystem): string\n {\n $timestamp = date('Y_m_d_His');\n\n return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR)\n ->flatMap(function ($path) use ($filesystem) {\n return $filesystem->glob($path.'*_add_fullname_to_users_table.php');\n })->push($this->app->databasePath().\"/migrations/{$timestamp}_add_fullname_to_users_table.php\")\n ->first();\n }", "title": "" }, { "docid": "fdc58a8c5d9203714ee7c7a51eb2394a", "score": "0.5219143", "text": "protected function getMigrationName($resource)\n {\n return \"create_\" . str_plural($resource) . \"_table\";\n }", "title": "" }, { "docid": "0dc64eec7d327eae013e18f06475b6e5", "score": "0.5201879", "text": "function getSourceFilesPath() {\n return drupal_get_path('module', static::$cfx_module_name) . '/migrate/import/';\n }", "title": "" }, { "docid": "910b2f7c913cc7c875b33f2fa0f49069", "score": "0.51945823", "text": "protected function getPathResource()\r\n {\r\n $meta = $this->scaffoldCommandObj->getMeta();\r\n $module_base_dir = './app/Modules/' . $meta['Module'];\r\n return $module_base_dir . '/resources/views/';\r\n }", "title": "" }, { "docid": "9b21bc7bb6c1d3bb443e25eb73c2520a", "score": "0.5172165", "text": "public function get_path();", "title": "" }, { "docid": "b8618bfd292c93eb3e18f041e1618a0c", "score": "0.51625764", "text": "public function databasePath()\n {\n return $this->databasePath ?: $this->basePath.DIRECTORY_SEPARATOR.'database';\n }", "title": "" }, { "docid": "af615c985955982dd971968e50fa9a85", "score": "0.5151298", "text": "public function generateMigration(string $table, string $action): string\n {\n if (!in_array($action, $this->actions)) {\n throw MigrationException::unsupportedAction($action);\n }\n\n $migrationName = $action . '_table_' . strtolower($table) . '_' . time();\n\n $migrationTemplate = MigrationTemplate::{$action}($migrationName, strtolower($table));\n\n $this->fs->put($this->migrationFolder . DS . $migrationName . '.php', $migrationTemplate);\n\n return $migrationName;\n }", "title": "" }, { "docid": "c24eebb476f42de5e64ca273702a4501", "score": "0.515014", "text": "protected\n function getUpStub()\n {\n switch ($this->action) {\n case 'add':\n case 'insert':\n $upMethod = $this->file->get(GeneratorsServiceProvider::getTemplatePath(self::$templatesDir, 'migration-up.txt'));\n $fields = $this->fields ? $this->setFields('addColumn') : '';\n break;\n\n case 'remove':\n case 'drop':\n case 'delete':\n $upMethod = $this->file->get(GeneratorsServiceProvider::getTemplatePath(self::$templatesDir, 'migration-up.txt'));\n $fields = $this->fields ? $this->setFields('dropColumn') : '';\n break;\n\n case 'pivot':\n $upMethod = $this->file->get(GeneratorsServiceProvider::getTemplatePath(self::$templatesDir, 'migration-up-pivot.txt'));\n $fields = $this->fields ? $this->setFields('addColumn') : '';\n break;\n\n case 'destroy':\n $upMethod = $this->file->get(GeneratorsServiceProvider::getTemplatePath(self::$templatesDir, 'migration-up-drop.txt'));\n $fields = $this->fields ? $this->setFields('dropColumn') : '';\n break;\n\n case 'create':\n case 'make':\n default:\n $upMethod = $this->file->get(GeneratorsServiceProvider::getTemplatePath(self::$templatesDir, 'migration-up-create.txt'));\n $fields = $this->fields ? $this->setFields('addColumn') : '';\n break;\n }\n\n // Replace the tableName in the template\n $upMethod = str_replace('{{tableName}}', $this->tableName, $upMethod);\n\n // Insert the schema into the up method\n return str_replace('{{methods}}', $fields, $upMethod);\n }", "title": "" }, { "docid": "5a90ce1bb0e4f570beb1c7ad7071d7d8", "score": "0.5130802", "text": "public function path()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'app';\n }", "title": "" }, { "docid": "edc75269e7fcaabc374121d7ab93e8b0", "score": "0.5127157", "text": "protected function getGeneratedContentPath()\n {\n return __DIR__ . DIRECTORY_SEPARATOR . 'Generated';\n }", "title": "" }, { "docid": "fee2ae40ebc3123ed1fc3daf6dfa88c9", "score": "0.51137304", "text": "protected function getMigrateCommand()\n {\n return new MigrateCommand($this->app['migrator']);\n }", "title": "" }, { "docid": "995908dfdb34927dc8f99a0320255a56", "score": "0.5104347", "text": "protected static function getMigrations()\n {\n return array();\n }", "title": "" }, { "docid": "c968e5e09536fdba443e62fbb71b5c38", "score": "0.50800663", "text": "protected function path()\n {\n return base_path(\"routes/{$this->routesFile}\");\n }", "title": "" }, { "docid": "01cb27a8c99dc1629b92fe911b0b7244", "score": "0.50691444", "text": "public static function getPath() {\n\t\tif (!self::$path) {\n\t\t\t$backupBase = App::getBackupBase();\n\t\t\t$currentVersion = \\OCP\\Config::getSystemValue('version', '0.0.0');\n\t\t\t$path = $backupBase . $currentVersion . '-';\n\n\t\t\tdo {\n\t\t\t\t$salt = substr(md5(time()), 0, 8);\n\t\t\t} while (file_exists($path . $salt));\n\n\t\t\tself::$path = $path . $salt;\n\t\t}\n\t\treturn self::$path;\n\t}", "title": "" } ]
4999f20bbf6a4cb161110aaf6e078b25
/ Enables support for featured images.
[ { "docid": "7ccaf33640c9980118e9865eb70f72d6", "score": "0.82073486", "text": "function enable_featured_images() {\n\tadd_theme_support ( 'post-thumbnails' );\n}", "title": "" } ]
[ { "docid": "dab66e05eac29ec894fad796e33ee41e", "score": "0.7551653", "text": "function rx_featured_image() {\n $post_types = array('post', 'page');\n \n // bail early if the current post type if not the one we want to customize.\n if ( ! in_array( get_post_type(), $post_types ) ) {\n return;\n }\n \n // Disable featured image.\n add_filter( 'astra_featured_image_enabled', '__return_false' );\n }", "title": "" }, { "docid": "1dd3033f59df0e5607d988d82a5cd4b1", "score": "0.73837584", "text": "function avada_featured_images_for_pages() {\r\n\t\tavada_singular_featured_image();\r\n\t}", "title": "" }, { "docid": "4a3d46399c8f6e92d1a0bffbec92ebe9", "score": "0.73213965", "text": "function play_autoset_featured() {\n\tglobal $post;\n\n\tif ( isset( $post->ID ) ) {\n\t\t$already_has_thumb = has_post_thumbnail( $post->ID );\n\n\t\tif ( ! $already_has_thumb ) {\n\t\t\t$attached_image = get_children( 'post_parent=' . $post->ID . '&post_type=attachment&post_mime_type=image&numberposts=1' );\n\n\t\t\tif ( $attached_image ) {\n\t\t\t\tforeach ( $attached_image as $attachment_id => $attachment ) {\n\t\t\t\t\tset_post_thumbnail( $post->ID, $attachment_id );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f791e27ade9ff391b3efbd9be2076fb5", "score": "0.73167837", "text": "function vortex_featured_image_pd() {\t\t\t\n\t\t\treturn array( 'manual' => __( 'Use Featured Image', 'vortex' ), 'auto' => __( 'Use Featured Image Automatically', 'vortex' ), 'no' => __( 'No Featured Image', 'vortex' ) );\t\t\t\n\t\t}", "title": "" }, { "docid": "f766e261cf85c00ff40d4bd5b3fbf820", "score": "0.7018728", "text": "function register_block_core_post_featured_image() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/post-featured-image',\n\t\tarray(\n\t\t\t'render_callback' => 'render_block_core_post_featured_image',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "1b4203d7608c74818ebf99134e867de5", "score": "0.6924404", "text": "function pfd_add_featured_image_metabox(){\r\n\tif ( class_exists( 'MultiPostThumbnails' ) ) :\r\n\t\tnew MultiPostThumbnails(\r\n\t\t\tarray(\r\n\t\t\t\t'label' => 'Desktop Page Banner',\r\n\t\t\t\t'id' => 'desktop-image',\r\n\t\t\t\t'post_type' => 'page'\r\n\t\t\t)\r\n\t\t);\r\n\t\tnew MultiPostThumbnails(\r\n\t\t\tarray(\r\n\t\t\t\t'label' => 'Mobile Page Banner',\r\n\t\t\t\t'id' => 'mobile-image',\r\n\t\t\t\t'post_type' => 'page'\r\n\t\t\t)\r\n\t\t);\r\n\t\tnew MultiPostThumbnails(\r\n\t\t\tarray(\r\n\t\t\t\t'label' => 'Additional Image',\r\n\t\t\t\t'id' => 'additional-image',\r\n\t\t\t\t'post_type' => 'page'\r\n\t\t\t)\r\n\t\t);\r\n\tendif;\r\n}", "title": "" }, { "docid": "76b23deefdbe243b5ac8a8ea0fda56f5", "score": "0.6839586", "text": "function autoset_featured_image() {\n global $post;\n $already_has_thumb = has_post_thumbnail($post->ID);\n if (!$already_has_thumb) {\n $attached_image = get_children( \"post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1\" );\n if ($attached_image) {\n foreach ($attached_image as $attachment_id => $attachment) {\n set_post_thumbnail($post->ID, $attachment_id);\n }\n }\n }\n}", "title": "" }, { "docid": "30378fd062996c010d50fd4d81bf219e", "score": "0.6795578", "text": "function blujay_add_image_sizes() {\n add_image_size( 'featured', '350', '200', true );\n}", "title": "" }, { "docid": "e5e6673b780a702af9bc5bb021a57da1", "score": "0.6776595", "text": "function mobilefirst_featured_image( $post_id = false, $size = '', $class = '' ) {\n\n\tif ( ! has_post_thumbnail() || post_password_required() ) {\n\t\t// Exit early if there's no need to show a featured image\n\t\treturn;\n\t}\n\n\t$thumbnail_size = 'post-thumbnail';\n\t$class = esc_attr($class);\n\n\t// Show a full width featured image\n\tif ( apply_filters('fullwidth_featured_image', false) ) {\n\t\t$thumbnail_size = 'fullwidth';\n\t}\n\n\t// But change the featured image size to the prefered size if specified\n\tif ( $size ) {\n\t\t$thumbnail_size = $size;\n\t}\n\n\tif ( ! $post_id ) {\n\t\t$post_id = get_the_id();\n\t}\n\n\t// Show the featured image\n\tif ( is_singular() ) {\n?>\n\t<div class=\"fi featured-image<?php if ( $class ) { echo ' ' . $class; } ?>\"><?php echo get_the_post_thumbnail($post_id, $thumbnail_size); ?></div>\n<?php\n\t} else {\n?>\n\t<a class=\"fi featured-image<?php if ( $class ) { echo ' ' . $class; } ?>\" href=\"<?php echo get_permalink(); ?>\"><?php echo get_the_post_thumbnail($post_id, $thumbnail_size); ?></a>\n<?php\n\t}\n\n}", "title": "" }, { "docid": "468114110f849d873912f3b2f8a60e0c", "score": "0.6742774", "text": "function register_featured_image_check() {\n Checklist\\register_prepublish_check(\n 'featured_image',\n array(\n 'type' => array(\n 'post',\n 'page',\n 'verhalen',\n 'inspiratie',\n get_post_types([], 'names')\n ),\n 'run_check' => function ( array $post, array $meta, array $terms ) : Status {\n\n if ( ! has_post_thumbnail() ) {\n //add_filter( 'altis.publication-checklist.block_on_failing', '__return_true' );\n return new Status( Status::INCOMPLETE, __( 'Voeg uitgelichte afbeelding toe', 'smdzr' ) );\n } else {\n\n $img = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );\n\n $width = $img[1];\n $height = $img[2];\n\n $required_width = 1100;\n $required_height = 800;\n\n $filetype = wp_check_filetype( wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' )[0] );\n\n if ( $width >= $required_width && $height >= $required_height ) {\n return new Status( Status::COMPLETE, __( 'Add a featured image of at least 1200x630px', 'Lf_Mu' ) );\n } else {\n //add_filter( 'altis.publication-checklist.block_on_failing', '__return_true' );\n return new Status( Status::INCOMPLETE, __( 'Uitgelichte afbeelding moet minimaal', 'Lf_Mu' ) );\n }\n\n// if ( has_category( 'news' ) ) {\n// return new Status( Status::COMPLETE, __( 'Add a featured image to the post', 'Lf_Mu' ) );\n// } else {\n//\n// if ( 'svg' == $filetype['ext'] ) {\n// return new Status( Status::INCOMPLETE, __( 'Add a featured image that is not an SVG (SVGs only work for \"News\" posts)', 'Lf_Mu' ) );\n// } else {\n// if ( $width >= $required_width && $height >= $required_height ) {\n// return new Status( Status::COMPLETE, __( 'Add a featured image of at least 1200x630px', 'Lf_Mu' ) );\n// } else {\n// return new Status( Status::INCOMPLETE, __( 'Add a featured image of at least 1200x630px', 'Lf_Mu' ) );\n// }\n// }\n// }\n }\n\n return new Status( Status::INCOMPLETE, __( 'Add a featured image to begin checks', 'Lf_Mu' ) );\n },\n )\n );\n}", "title": "" }, { "docid": "f8af9ba0da14fb314bac2b053babd5f1", "score": "0.6733362", "text": "function set_featured_image_for_posts() {\n // Get all posts so set higher number,\n // you can increase to any number if you have big amount of posts\n $args = array( 'numberposts' => 5000);\n // all posts\n $all_posts = get_posts( $args );\n foreach($all_posts as $k=>$v) {\n $args = array(\n 'numberposts' => 1,\n 'order'=> 'ASC',\n 'post_mime_type' => 'image',\n 'post_parent' => $v->ID,\n 'post_type' => 'attachment'\n );\n // Get attachments\n $attachments = get_children( $args );\n $i=0;\n foreach($attachments as $attach)\n {\n // Get only first image\n if($i==0)\n $attachmentsid = $attach->ID;\n $i++;\n }\n // Set Featured image\n set_post_thumbnail($v->ID,$attachmentsid);\n }\n}", "title": "" }, { "docid": "4583fea39184d5011cc20a0474a0d074", "score": "0.67327976", "text": "function support_post_thumbnails()\n{\n add_theme_support('post-thumbnails');\n}", "title": "" }, { "docid": "89ba6583497cf5dee3655fde49f10281", "score": "0.6691129", "text": "function cpflex_featured_size() {\n add_image_size( 'cpflex_featured', 400, 300, true );\n}", "title": "" }, { "docid": "6f8e20e2c0c26b07e9a70866c9cd095b", "score": "0.6658736", "text": "function add_post_thumbnails_support() {\n add_theme_support('post-thumbnails');\n}", "title": "" }, { "docid": "fd9db275559d567bb04d0d44354e88cd", "score": "0.6628558", "text": "function theme_supports(){\n\tadd_theme_support( 'post-thumbnails' );\n}", "title": "" }, { "docid": "7c109e02fb8d3e4182df673f46e56761", "score": "0.6624119", "text": "function hwcoe_ufl_post_featured_image(){\n\tglobal $post;\n\t$html = '';\n\t$details = array(\n\t\t'id' => '',\n\t\t'caption' => '',\n\t\t'description' => '',\n\t);\n\t\n\t// Get the image id, caption, and description\n\t$id = get_post_thumbnail_id();\n\t$image = get_post( $id );\n\t$details['id'] = $id;\n\t$details['caption'] = $image->post_excerpt;\n\t$details['description'] = $image->post_content;\n\t\n\t// Get custom field values\n\t$custom_meta = get_post_custom( $post->ID );\n\t$img_full_width = ( isset($custom_meta['full_width_featured_image']) )? $custom_meta['full_width_featured_image'][0]:NULL;\n\t$post_hide_featured = ( isset($custom_meta['hide_featured_image']) )? $custom_meta['hide_featured_image'][0]:false;\n\t$details['size'] = ( $img_full_width )? 'full_width_thumb':'half-width-thumb';\n\t$details['classes'] = ( $img_full_width )? array('full-width','img-responsive'):array('alignleft');\n\t\n\tif ( !$post_hide_featured ) {\n\t\t$html .= get_the_post_thumbnail( $post->ID, $details['size'] );\n\t\t$html .= sprintf( '<figcaption>%s</figcaption>', $details['caption'] );\n\t\t$html = sprintf( '<figure class=\"%s\">%s</figure>', implode(' ', $details['classes']), $html );\n\t}\n\n\treturn $html;\n}", "title": "" }, { "docid": "af08cd92f4875716f470d783e4c90709", "score": "0.66160244", "text": "function add_my_theme_support() {\n\tadd_theme_support( 'menus' );\n\tadd_theme_support( 'post-thumbnails' );\n\t\n\t// thumbnails\n\tadd_image_size( 'services-front', 270, 172, true );\n\tadd_image_size( 'slider', 1500, 530, true );\n\tadd_image_size( 'team-large', 270, 370, true );\n\tadd_image_size( 'team-small', 170, 233, true );\n \n // featured image size\n set_post_thumbnail_size( 200, 167, true );\n}", "title": "" }, { "docid": "9af7fb9d90f9bf10441aa7f424769952", "score": "0.65903246", "text": "public function hasFeaturedImage()\n {\n if($this->featuredImage) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a782317ba4dac6b0cdf4aa82bcf5784f", "score": "0.6544696", "text": "function leadtesting_features() {\n add_theme_support('title-tag');\n add_theme_support('post-thumbnails');\n add_image_size('bannerLogo', 600, 143, true);\n add_image_size('pageBanner', 1500, 350, true);\n add_image_size('resourceImage', 1600, 1066, true);\n}", "title": "" }, { "docid": "7957b0ba4973c6f0b40f5fade8f2d31d", "score": "0.651054", "text": "function navigation_full_featured_image() {\n\n\t$image = genesis_get_image();\n\n\tif ( genesis_site_layout() === 'full-width-content' && $image && is_singular() ) {\n\n\t\t// Relocates the singular image and adds a wrapper.\n\t\tremove_action( 'genesis_entry_header', 'genesis_do_singular_image', 1 );\n\t\tadd_action( 'genesis_after_header', 'navigation_singular_image_wrap_open', 11 );\n\t\tadd_action( 'genesis_after_header', 'genesis_do_singular_image', 12 );\n\t\tadd_action( 'genesis_after_header', 'navigation_singular_image_wrap_close', 13 );\n\n\t\t// Changes the featured image size.\n\t\tadd_filter( 'genesis_singular_image_size', 'navigation_full_image_size' );\n\n\t}\n\n}", "title": "" }, { "docid": "cd6f75935f12f18ecaba21bed854fd7c", "score": "0.6493198", "text": "public function add_theme_support() {\n add_theme_support( 'post-thumbnails' );\n }", "title": "" }, { "docid": "9f4612a1892e784b7c43caf9291f2667", "score": "0.6493138", "text": "function rest_setup_theme()\n{\n\t// Enable featured image\n\tadd_theme_support( 'post-thumbnails' );\n\n\t// Thumbnail sizes\n\t//add_image_size( 'slug-image', 520, 245, true );\n}", "title": "" }, { "docid": "dbee468921287704ab99930776f0a97a", "score": "0.64929694", "text": "public function enableFeaturedImages(array $postTypes = []): self\n {\n add_action('after_setup_theme', function () use ($postTypes) {\n // Enable for all post types\n if (count($postTypes) === 0) {\n add_theme_support('post-thumbnails');\n } else {\n // Enable only for the give post types\n $postTypes = array_map(\n fn ($postType) => ($postType instanceof PostType)\n ? $postType->getName()\n : $postType,\n $postTypes\n );\n\n add_theme_support('post-thumbnails', $postTypes);\n }\n });\n\n return $this;\n }", "title": "" }, { "docid": "eb117bfa7ca3e4185e08fb1c3a91380c", "score": "0.6442094", "text": "function wyatt_featured_image() {\n\t$image = array();\n\n\tif (get_the_post_thumbnail() != '') {\n\t\t// get the URL of the featured image\n\t\t$header_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'page-header');\n\t\t$image['url'] = $header_image[0];\n\t\t$image['width'] = $header_image[1];\n\t\t$image['height'] = $header_image[2];\n\t}\n\n\treturn (!empty($image)) ? $image : false;\n}", "title": "" }, { "docid": "af0db518a335caba35053419dfa7d8fe", "score": "0.64397275", "text": "function jetpack_has_featured_image( $post = null ) {\n\treturn (bool) get_the_post_thumbnail( $post );\n}", "title": "" }, { "docid": "f686c6fab07a52fe3a24ca5b722f0993", "score": "0.64197797", "text": "function theme_setup() {\n\tadd_theme_support('post-thumbnails');\n}", "title": "" }, { "docid": "edd2de67563ed5372e06a73a1d994844", "score": "0.638273", "text": "function ava_product_featured_img( $post_id ) {\n\t\tglobal $post;\n\n\t\t$feat_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'mark-port-grid' );\n\n\t\t$feat_image = 'background-image: url(' . esc_url( $feat_image[0] ) . ');';\n\t\t$feat_image = '<div class=\"thumb thumb--first\" style=\"' . esc_attr( $feat_image ) . '\"></div>';\n\t\treturn $feat_image;\n\t}", "title": "" }, { "docid": "d9070b66b261844434f384fb6ca62c12", "score": "0.6380846", "text": "function show_featured_image_column( $defaults ) {\r\n $defaults['featuredimage'] = __('Featured Image') ;\r\n \treturn $defaults;\r\n}", "title": "" }, { "docid": "8f81201d0ee473c2056aa84d6e2477d6", "score": "0.6379447", "text": "function kyber_shift_featured_image_metabox() {\n\tremove_meta_box( 'postimagediv', 'media', 'side' );\n\tadd_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 'media', 'normal', 'high');\n\n\tremove_meta_box( 'postimagediv', 'people', 'side' );\n\tadd_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', 'people', 'normal', 'high');\n}", "title": "" }, { "docid": "0528e730f3d33d98631d77310927dbcc", "score": "0.636425", "text": "function setup_thumbnails() {\n\n\tadd_theme_support('post-thumbnails');\n\tset_post_thumbnail_size(150, 150);\n}", "title": "" }, { "docid": "90d2903b0b0b043b4f53a54eb7bb0b1d", "score": "0.63489294", "text": "protected function _testFeaturedImage() {\n\t\t$actor = $this->openBrowserPage();\n\n\t\t$actor->login();\n\n\t\t$actor->moveTo( 'wp-admin/post-new.php' );\n\n\t\t$actor->click( '.nux-dot-tip__disable' );\n\n\t\t$actor->typeInField( '#post-title-0', 'Test Post Image' );\n\n\t\t$elements = $actor->getElements( '.components-panel__body-toggle' );\n\n\t\tforeach ( $elements as $element ) {\n\t\t\t$actor->click( $element );\n\t\t}\n\n\t\t$actor->waitUntilElementVisible( '.editor-post-featured-image__toggle' );\n\n\t\t$actor->click( '.editor-post-featured-image__toggle' );\n\n\t\t$actor->waitUntilElementVisible( '.upload-ui' );\n\n\t\t$actor->attachFile( '.media-modal-content input[type=\"file\"]', __DIR__ . '/img/10up-logo.jpg' );\n\n\t\t$actor->waitUntilElementEnabled( '.media-button-select' );\n\n\t\t$actor->click( '.media-button-select' );\n\n\t\t$actor->waitUntilElementVisible( '.editor-post-publish-panel__toggle' );\n\n\t\t$actor->waitUntilElementEnabled( '.editor-post-publish-panel__toggle' );\n\n\t\t$actor->click( '.editor-post-publish-panel__toggle' );\n\n\t\t$actor->waitUntilElementVisible( '.editor-post-publish-button' );\n\n\t\t$actor->waitUntilElementEnabled( '.editor-post-publish-button' );\n\n\t\t$actor->click( '.editor-post-publish-button' );\n\n\t\t$actor->waitUntilElementVisible( '.components-notice' );\n\n\t\t$actor->seeText( 'Post published', '.components-notice__content' );\n\n\t\t$actor->waitUntilElementVisible( '.editor-post-featured-image img' );\n\n\t\t$actor->seeElement( '.editor-post-featured-image img' );\n\t}", "title": "" }, { "docid": "681921453ae58a0455cb1169df075ce9", "score": "0.6301493", "text": "function isabella_theme_support() {\n\n\t// Add WP Thumbnail Support\n\tadd_theme_support( 'post-thumbnails' );\n\t\n\t// Default thumbnail size\n add_image_size( 'blog', 800, 1020, true );\t\n\t\t\n}", "title": "" }, { "docid": "e52f15a95559a55bbc6a50fcbfb75ea8", "score": "0.62892795", "text": "function set_featured_image_width_media_sideload($url, $post_id, $desc = \"\") {\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 \n media_sideload_image($url, $post_id, $desc);\n \n // get the newly uploaded image\n $attachments = get_posts( array(\n 'post_type' => 'attachment',\n 'number_posts' => 1,\n 'post_parent' => $post_id,\n 'orderby' => 'post_date',\n 'order' => 'DESC',) \n );\n $attachment_id = $attachments[0]->ID;\n // Set featured image to post\n update_post_meta($post_id, '_thumbnail_id', $attachment_id);\n $attachment_data = array(\n 'ID' => $attachment_id\n );\n wp_update_post($attachment_data);\n \n return $attachment_id;\n}", "title": "" }, { "docid": "0ac5070136388e80c34e05c9508baac1", "score": "0.62780035", "text": "protected function landing_featured(){\r\n\t\t\r\n\t\t/* Get data */\r\n\t\t$itemsModel = $this->getModel('items');\r\n\t\t$featuredArticle = $itemsModel->getIndexFeatured($this->_itemtype);\r\n\t\t\r\n\t\t/* Load template */\r\n\t\tinclude(BLUPATH_TEMPLATES.'/articles/landing/featured.php');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ae7d2434b9636f069134cca40f20ea97", "score": "0.62774515", "text": "public function isFeatured();", "title": "" }, { "docid": "177856d8ae5cc3208017628e09290c28", "score": "0.6277126", "text": "function custom_theme_setup() {\n\tadd_theme_support( 'post-thumbnails' );\n}", "title": "" }, { "docid": "01740127ce36cccf8c4173fb9ed72877", "score": "0.6266245", "text": "public function featured()\r\n\t{\r\n\t\t$db \t\t= &JFactory::getDBO();\r\n\t\t$object_image_id \t= JRequest::getInt( 'object_image_id', 0 );\r\n\t\t$value \t\t= JRequest::getInt( 'value', 0 );\r\n\r\n\t\t$user \t\t= &JFactory::getUser();\r\n\t\t$user_id \t= (int) $user->get( 'id' );\r\n\r\n\t\tif( !$user->authorise( 'core.edit', 'com_di' ) )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif( $user_id && $object_image_id )\r\n\t\t{\r\n\t\t\t$query = \"\r\n\t\t\t\tSELECT\r\n\t\t\t\t\tobject_id\r\n\t\t\t\tFROM\r\n\t\t\t\t\t#__di_images\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tobject_image_id = '$object_image_id'\r\n\t\t\t\";\r\n\t\t\t$db->setQuery( $query );\r\n\t\t\t$object_id = $db->loadResult();\r\n\r\n\t\t\t// unset featured for same object_id images\r\n\t\t\t$query = \"\r\n\t\t\t\tUPDATE\r\n\t\t\t\t\t#__di_images\r\n\t\t\t\tSET\r\n\t\t\t\t\t`featured` = '0'\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tobject_id = '$object_id'\r\n\t\t\t\";\r\n\t\t\t$db->setQuery( $query );\r\n\t\t\t$db->query();\r\n\r\n\t\t\t// set featured\r\n\t\t\t$query = \"\r\n\t\t\t\tUPDATE\r\n\t\t\t\t\t#__di_images\r\n\t\t\t\tSET\r\n\t\t\t\t\t`featured` = '$value'\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tobject_image_id = '$object_image_id'\r\n\t\t\t\";\r\n\t\t\t$db->setQuery( $query );\r\n\t\t\t$db->query();\r\n\r\n\t\t\t$this->setResponse( 'status', $db->getAffectedRows() );\r\n\t\t\t$this->setResponse( 'message', 'SUCCESS' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dd89fe9e42e2a1a3a17010ab4719af6c", "score": "0.6254937", "text": "function _s_custom_image_sizes() {\n\n\t/**\n\t * Add featured image sizes\n\t *\n\t * Sizes are optimized and cropped for landscape aspect ratio\n\t * and optimized for HiDPI displays on 'small' and 'medium' screen sizes.\n\t */\n\t// add_image_size( 'featured-small', 640, 200, true );\n\t// add_image_size( 'featured-medium', 1280, 400, true );\n\t// add_image_size( 'featured-large', 1440, 400, true );\n\t// add_image_size( 'featured-xlarge', 1920, 400, true );\n\n\t/**\n\t * Add additional image sizes\n\t */\n\tadd_image_size( '_s-small', 640 );\n\tadd_image_size( '_s-medium', 1024 );\n\tadd_image_size( '_s-large', 1200 );\n\tadd_image_size( '_s-xlarge', 1920 );\n\n}", "title": "" }, { "docid": "1896a569a9e5936bb66cbc1814d6336c", "score": "0.62373954", "text": "function samfujera_home_featured_image() {\n\tglobal $post;\n\t$image = get_the_post_thumbnail( $post->ID, 'original', array( 'alt' => the_title_attribute( 'echo=0' ), 'title' => the_title_attribute( 'echo=0' ) ) );\n\techo $image;\n}", "title": "" }, { "docid": "f9902f95fc582f4c3693ec504b62ade8", "score": "0.6232936", "text": "function getFeaturedImage($id, $size)\n{\n $size = ($size) ? $size : 'small';\n\n $tub = get_the_post_thumbnail($id, $size);\n\n if (empty($tub)) {\n return \"<img src='\"\n . get_template_directory_uri()\n . \"/images/preload/featured_image_placeholder.png' alt='Placeholder image' />\";\n } else {\n return $tub;\n }\n}", "title": "" }, { "docid": "de84b265e2d55dfeaab09016093f3403", "score": "0.62286496", "text": "function wpse_setup_theme() {\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_image_size( 'custom-post-thumb', 460, 300 );\n }", "title": "" }, { "docid": "837d9bff3694ce2008e88009be1eee38", "score": "0.62217504", "text": "function braces_picturefill_add_image_sizes() {\n\t/* @1x images */\n\tadd_image_size( 'featured-mobile', 400, 300, true );\n\tadd_image_size( 'featured-tablet', 600, 450, true );\n\tadd_image_size( 'featured', 800, 600, true );\n\n\t/* @2x images */\n\tadd_image_size( 'featured-mobile-2x', 800, 600, true );\n\tadd_image_size( 'featured-tablet-2x', 1200, 900, true );\n\tadd_image_size( 'featured-desktop-2x', 1600, 1200, true );\n}", "title": "" }, { "docid": "d06b15fad4c0fc4f0489f149e73399f7", "score": "0.61967033", "text": "function jm_add_featured_meta()\r\n{\r\n\tadd_meta_box(\r\n\t\t'jm-featured', \r\n\t\t'Featured', \r\n\t\t'jm_show_featured_box', \r\n\t\t'post', \r\n\t\t'side',\r\n\t\t'high');\r\n}", "title": "" }, { "docid": "5bd9f0cf018ee0e815a68fdb6555ffa8", "score": "0.619427", "text": "function vuyiroli_setup() {\n require( get_stylesheet_directory() . '/inc/template-tags.php' );\n add_image_size( 'front-slides', 840, 320, true);\n}", "title": "" }, { "docid": "b74fc79109495d932975f27646233c76", "score": "0.617467", "text": "function wpdocs_theme_setup() {\n\t//add_image_size( 'thumb-150', 150, 150, true);\n\n}", "title": "" }, { "docid": "d929417c3c6b5d7ad2cae5addb7ff133", "score": "0.6151799", "text": "function bones_theme_support() {\n\n\t// wp thumbnails (sizes handled in functions.php)\n\tadd_theme_support( 'post-thumbnails', array( 'post', 'page', 'article', 'series' ));\n\n\t// default thumb size\n\tset_post_thumbnail_size(125, 125, true);\n\n\t// rss thingy\n\tadd_theme_support('automatic-feed-links');\n\n\t// to add header image support go here: http://themble.com/support/adding-header-background-image-support/\n\n\t// wp menus\n}", "title": "" }, { "docid": "965614e5ec8c5daad1e49c43761501e3", "score": "0.6147308", "text": "function my_post_thumbnail_setup() {\n\tadd_theme_support( 'post-thumbnails' );\n\tadd_image_size( 'slide', 940, 640, true );\n\tadd_image_size( 'testimonial', 80, 40, false );\n\tadd_image_size( 'photos', 800, 500, false );\n\tadd_image_size( 'product-thumb', 350, 200, true );\n}", "title": "" }, { "docid": "f325d52591b3caed94d5b5a16255faee", "score": "0.61456436", "text": "function getFeaturedImage(): string {\n\tif ( ! has_post_thumbnail() ) {\n\t\treturn '';\n\t}\n\n\t// Don't show featured images if \"hide featured image\" meta is checked on.\n\tif ( get_post_meta( get_the_ID(), '_hide_featured_image', true ) ) {\n\t\treturn '';\n\t}\n\n\tob_start();\n\tthe_post_thumbnail( 'full', array( 'class' => 'aligncenter' ) );\n\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "0b3baeb13bfb9a58d2e2fcc703446f2d", "score": "0.6141187", "text": "function saarbakt_features() {\n\tregister_nav_menu('headerMenuLocation', 'Header Menu Location');\n\tregister_nav_menu('footerMenuLocation', 'Footer Menu Location');\n\tadd_theme_support('title-tag');\n\tadd_theme_support( 'post-thumbnails');\n\tadd_image_size('thumbnailimage', 150, auto, false);\n\tadd_image_size('header_mobile', 768, auto, false);\n\tadd_image_size('header_full', 2500, auto, false);\n\tadd_image_size('thumbnailimagesingle', 300, auto, true);\n\tadd_post_type_support( 'page', 'excerpt' );\n}", "title": "" }, { "docid": "9a8817ecc2899458f30aa484e3745a4e", "score": "0.6125431", "text": "function wpdesign_setup() {\n\t/**\n\t * add_theme_support will be used to add some functionalities\n\t * \n\t * @see https://developer.wordpress.org/reference/functions/add_theme_support/\n\t * @see https://developer.wordpress.org/block-editor/developers/themes/theme-support/\n\t */\n\tadd_theme_support( 'post-thumbnails' );\n}", "title": "" }, { "docid": "c31f72d5ecb69fa5250dd31487608df7", "score": "0.61088645", "text": "public function resizeFeaturedImg(){\n $sizes = $this->getSize();\n foreach ($sizes as $size){\n if(!empty($size[0]) && !empty($size[1])){\n $this->resize($size[0], $size[1]);\n }\n }\n }", "title": "" }, { "docid": "e8767c2cbf88997d29dc7c45c7f42e14", "score": "0.60746896", "text": "function custom_setup() {\n add_filter('show_admin_bar', '__return_false');\n\n // Executa as função ao instalar o tema\n add_action('init', 'custom_init');\n\n // Insere a opção de imagens destacadas\n add_theme_support('post-thumbnails');\n add_image_size('home-thumbnails', 480, 480, array('center','bottom'));\n add_image_size('sidebar-thumbnails', 300, 195, true);\n add_image_size('post-thumbnails', 1000, 500, array('left','top'));\n\n // Insere a opção de menus\n add_theme_support('menus');\n\n\n /* Carrega scripts e estilos personalizados */\n add_action('wp_enqueue_scripts', 'custom_formats');\n}", "title": "" }, { "docid": "a9b9fd473fa9a42c341530e64714b029", "score": "0.6073251", "text": "function post_featured_image_json( $data, $post, $context ) {\n $featured_image_id = $data->data['featured_media'];\n $featured_image_url = wp_get_attachment_image_src( $featured_image_id, 'original' );\n if( $featured_image_url ) {\n $data->data['featured_image_url'] = $featured_image_url[0];\n }\n return $data;\n }", "title": "" }, { "docid": "35dc2317c493b4a8db11e79188165494", "score": "0.60706866", "text": "function themeName_setup() {\n add_theme_support('post-thumbnails');\n}", "title": "" }, { "docid": "2cf814e702e8193e6e732794bad13e00", "score": "0.6067998", "text": "function ap_setup(){\n //size of thumbnails\n add_image_size('medium', 510, 340, true);\n add_image_size('square_medium', 350, 350, true);\n //featured image\n add_theme_support('post-thumbnails');\n add_theme_support('custom-logo');\n add_theme_support('title-tag');\n //nav menu\n register_nav_menus(\n array(\n 'main_menu' => esc_html__('Main Menu', 'alexportfolio')\n\n ));\n}", "title": "" }, { "docid": "dda7b94b57d841768422b91c4d4fa90f", "score": "0.6065992", "text": "function acf_set_featured_image( $value, $post_id, $field ) {\n if ($value != '') {\n\t //Add the value which is the image ID to the _thumbnail_id meta data for the current post\n\t update_post_meta($post_id, '_thumbnail_id', $value);\n }\n return $value;\n}", "title": "" }, { "docid": "6d064c3ff3e264b208c9885cc6a5dabe", "score": "0.6060623", "text": "public function featured($img_id)\n {\n $result = 0;\n $images_model = new \\models\\Images();\n $images_model->setImgId($img_id);\n if($images_model->featured())\n {\n $result = 1;\n }\n echo $result;\n }", "title": "" }, { "docid": "8923e0854b726792a836bef50e5527ed", "score": "0.6055925", "text": "protected function _testFeaturedImagePreGutenberg() {\n\t\t$actor = $this->openBrowserPage();\n\n\t\t$actor->login();\n\n\t\t$actor->moveTo( 'wp-admin/post-new.php' );\n\n\t\t$actor->fillField( '#title', 'Test Post' );\n\n\t\t$actor->click( '#set-post-thumbnail' );\n\n\t\t$actor->waitUntilElementVisible( '.media-modal-content' );\n\n\t\t$actor->attachFile( '.media-modal-content input[type=\"file\"]', __DIR__ . '/img/10up-logo.jpg' );\n\n\t\t$actor->waitUntilElementEnabled( '.media-modal-content .media-button-select' );\n\n\t\t$actor->click( '.media-modal-content .media-button-select' );\n\n\t\t$actor->waitUntilElementVisible( '#remove-post-thumbnail' );\n\n\t\t$actor->scrollTo( 0, 0 );\n\n\t\t$actor->click( '#publish' );\n\n\t\t$actor->waitUntilElementVisible( '#wpadminbar' );\n\n\t\t$actor->seeElement( '#postimagediv img' );\n\t}", "title": "" }, { "docid": "d94582021afb9b33c1469f4f250d0ef9", "score": "0.6042353", "text": "function render_block_core_post_featured_image( $attributes, $content, $block ) {\n\tif ( ! isset( $block->context['postId'] ) ) {\n\t\treturn '';\n\t}\n\t$post_ID = $block->context['postId'];\n\n\t// Check is needed for backward compatibility with third-party plugins\n\t// that might rely on the `in_the_loop` check; calling `the_post` sets it to true.\n\tif ( ! in_the_loop() && have_posts() ) {\n\t\tthe_post();\n\t}\n\n\t$is_link = isset( $attributes['isLink'] ) && $attributes['isLink'];\n\t$size_slug = isset( $attributes['sizeSlug'] ) ? $attributes['sizeSlug'] : 'post-thumbnail';\n\t$attr = get_block_core_post_featured_image_border_attributes( $attributes );\n\t$overlay_markup = get_block_core_post_featured_image_overlay_element_markup( $attributes );\n\n\tif ( $is_link ) {\n\t\tif ( get_the_title( $post_ID ) ) {\n\t\t\t$attr['alt'] = trim( strip_tags( get_the_title( $post_ID ) ) );\n\t\t} else {\n\t\t\t$attr['alt'] = sprintf(\n\t\t\t\t// translators: %d is the post ID.\n\t\t\t\t__( 'Untitled post %d' ),\n\t\t\t\t$post_ID\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( ! empty( $attributes['height'] ) ) {\n\t\t$extra_styles = \"height:{$attributes['height']};\";\n\t\tif ( ! empty( $attributes['scale'] ) ) {\n\t\t\t$extra_styles .= \"object-fit:{$attributes['scale']};\";\n\t\t}\n\t\t$attr['style'] = empty( $attr['style'] ) ? $extra_styles : $attr['style'] . $extra_styles;\n\t}\n\n\t$featured_image = get_the_post_thumbnail( $post_ID, $size_slug, $attr );\n\tif ( ! $featured_image ) {\n\t\treturn '';\n\t}\n\tif ( $is_link ) {\n\t\t$link_target = $attributes['linkTarget'];\n\t\t$rel = ! empty( $attributes['rel'] ) ? 'rel=\"' . esc_attr( $attributes['rel'] ) . '\"' : '';\n\t\t$height = ! empty( $attributes['height'] ) ? 'style=\"' . esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . '\"' : '';\n\t\t$featured_image = sprintf(\n\t\t\t'<a href=\"%1$s\" target=\"%2$s\" %3$s %4$s>%5$s%6$s</a>',\n\t\t\tget_the_permalink( $post_ID ),\n\t\t\tesc_attr( $link_target ),\n\t\t\t$rel,\n\t\t\t$height,\n\t\t\t$featured_image,\n\t\t\t$overlay_markup\n\t\t);\n\t} else {\n\t\t$featured_image = $featured_image . $overlay_markup;\n\t}\n\n\t$width = ! empty( $attributes['width'] ) ? esc_attr( safecss_filter_attr( 'width:' . $attributes['width'] ) ) . ';' : '';\n\t$height = ! empty( $attributes['height'] ) ? esc_attr( safecss_filter_attr( 'height:' . $attributes['height'] ) ) . ';' : '';\n\tif ( ! $height && ! $width ) {\n\t\t$wrapper_attributes = get_block_wrapper_attributes();\n\t} else {\n\t\t$wrapper_attributes = get_block_wrapper_attributes( array( 'style' => $width . $height ) );\n\t}\n\treturn \"<figure {$wrapper_attributes}>{$featured_image}</figure>\";\n}", "title": "" }, { "docid": "0815bda5cd6d6c4cf8f62da9c2f90bfc", "score": "0.60107404", "text": "function vortex_field_featured_image_control_fn() {\n\t\t\t\n\t\t\t$vortex_options = get_option( 'vortex_options' );\n\t\t\t$items = $this->vortex_featured_image_pd();\n\t\t\t\n\t\t\techo '<select id=\"vortex_featured_image_control\" name=\"vortex_options[vortex_featured_image_control]\">';\n\t\t\tforeach( $items as $key => $val ) {\n\t\t\t?>\n <option value=\"<?php echo $key; ?>\" <?php selected( $key, $vortex_options['vortex_featured_image_control'] ); ?>><?php echo $val; ?></option>\n <?php\n\t\t\t}\n\t\t\techo '</select>';\n\t\t\techo '<div><small>'. __( '<strong>Use Featured Image:</strong> which is set in the post.', 'vortex' ) .'</small></div>';\n\t\t\techo '<div><small>'. __( '<strong>Use Featured Image Automatically:</strong> from the images uploaded to the post.', 'vortex' ) .'</small></div>';\n\t\t\techo '<div><small>'. __( '<strong>No Featured Image:</strong> for the post.', 'vortex' ) .'</small></div>';\n\t\t\n\t\t}", "title": "" }, { "docid": "c1d55cd428792a87785be9e51ca582b8", "score": "0.6005381", "text": "function set_featured_image_width_media_handle($file, $post_id) {\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 $attachment_id = media_handle_upload($file, $post_id);\n // Set featured image to post\n update_post_meta($post_id, '_thumbnail_id', $attachment_id);\n $attachment_data = array(\n 'ID' => $attachment_id\n );\n wp_update_post($attachment_data);\n return $attachment_id;\n}", "title": "" }, { "docid": "9887863b39245e8ad29934b2d4003046", "score": "0.6004257", "text": "function supports() {\n\t/**\n\t * Enable support for Post Thumbnails on posts and pages.\n\t *\n\t * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails\n\t */\n\tadd_theme_support( 'post-thumbnails' );\n\n\t/**\n\t * Enable support for Title Tag on posts and pages.\n\t *\n\t * @link https://codex.wordpress.org/Title_Tag\n\t */\n\tadd_theme_support( 'title-tag' );\n}", "title": "" }, { "docid": "777b59614747c9a071d21887701584e5", "score": "0.5996025", "text": "public function setup() {\n /**\n * Set cross origin request filters to enable\n * Gravity Forms AJAX Postback in cross origin I-frames.\n */\n header(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE\");\n header(\"Access-Control-Allow-Headers: Origin, Content-Type, Accept\");\n\n if('OPTIONS' == $_SERVER['REQUEST_METHOD']) {\n \tstatus_header(200);\n \texit();\n }\n\n\t\t//add additional featured image sizes\n\t\t//NOTE: avoid hyphens in names as they could create errors in frontend\n if ( function_exists( 'add_image_size' ) ) {\n \tadd_image_size( 'xs', 300, 300, false );\n \tadd_image_size( 'sm', 600, 600, false );\n \tadd_image_size( 'md', 900, 900, false );\n \tadd_image_size( 'lg', 1200, 1200, false );\n \tadd_image_size( 'xl', 1920, 1920, false );\n \tadd_image_size( 'facebook_small', 600, 315, true );\n \tadd_image_size( 'facebook', 1200, 630, true );\n \tadd_image_size( 'person', 500, 500, true );\n \tadd_image_size( 'hero_small', 560, 179, true );\n \tadd_image_size( 'hero', 1680, 550, true );\n \tadd_image_size( 'newshero', 1280, 960, false ); \t\n }\n\n if ( function_exists( 'add_theme_support' ) ) {\n \tadd_theme_support( 'post-thumbnails' );\n }\n\n\n\n\t\t//register post types\n\t\t//optional - include a custom icon, list of icons available at https://developer.wordpress.org/resource/dashicons/\n\n\t\t//people\n register_post_type( 'people',\n \tarray(\n \t\t'labels' => array(\n \t\t\t'name' => 'People',\n \t\t\t'singular_name' =>'Person',\n \t\t\t'add_new' => 'Add New',\n \t\t\t'add_new_item' => 'Add New Person',\n \t\t\t'edit_item' => 'Edit Person',\n \t\t\t'new_item' => 'New Person',\n \t\t\t'all_items' => 'All People',\n \t\t\t'view_item' => 'View Person',\n \t\t\t'search_items' => 'Search People',\n \t\t\t'not_found' => 'No People found',\n \t\t\t'not_found_in_trash' => 'No People found in Trash',\n \t\t),\n \t\t'public' => true,\n \t\t'has_archive' => true,\n \t\t'rewrite' => array('slug' => 'people'),\n \t\t'show_in_rest' => true,\n \t\t'rest_base' => 'people',\n \t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n \t\t'supports' => array( 'title', 'thumbnail'),\n \t\t'menu_icon' => 'dashicons-id'\n \t));\n\n register_taxonomy(\n \t'people_categories',\n \t'people',\n \tarray(\n \t\t'hierarchical' => true,\n \t\t'label' => 'People Categories',\n \t\t'query_var' => true,\n \t\t'rewrite' => array('slug' => 'people_categories'),\n \t\t'rest_base' => 'people_categories',\n \t\t'rest_controller_class' => 'WP_REST_Terms_Controller',\n \t)\n );\n global $wp_taxonomies;\n $taxonomy_name = 'people_categories';\n if ( isset( $wp_taxonomies[ $taxonomy_name ] ) ) {\n \t$wp_taxonomies[ $taxonomy_name ]->show_in_rest = true;\n \t$wp_taxonomies[ $taxonomy_name ]->rest_base = $taxonomy_name;\n \t$wp_taxonomies[ $taxonomy_name ]->rest_controller_class = 'WP_REST_Terms_Controller';\n }\n\n\t\t//news\n register_post_type( 'news',\n \tarray(\n \t\t'labels' => array(\n \t\t\t'name' => 'News',\n \t\t\t'singular_name' =>'News Story',\n \t\t\t'add_new' => 'Add New',\n \t\t\t'add_new_item' => 'Add New News Story',\n \t\t\t'edit_item' => 'Edit News Story',\n \t\t\t'new_item' => 'New News Story',\n \t\t\t'all_items' => 'All News Stories',\n \t\t\t'view_item' => 'View News Stories',\n \t\t\t'search_items' => 'Search News Stories',\n \t\t\t'not_found' => 'No News Stories found',\n \t\t\t'not_found_in_trash' => 'No News Stories found in Trash',\n \t\t),\n \t\t'public' => true,\n \t\t'has_archive' => true,\n \t\t'rewrite' => array('slug' => 'news'),\n \t\t'show_in_rest' => true,\n \t\t'rest_base' => 'news',\n \t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n \t\t'supports' => array( 'title', 'thumbnail', 'editor'),\n \t\t'menu_icon'\t=>\t'dashicons-welcome-widgets-menus'\n \t));\n\n register_taxonomy(\n \t'news_categories',\n \t'news',\n \tarray(\n \t\t'hierarchical' => true,\n \t\t'label' => 'News Categories',\n \t\t'query_var' => true,\n \t\t'rewrite' => array('slug' => 'news_categories'),\n \t\t'rest_base' => 'news_categories',\n \t\t'rest_controller_class' => 'WP_REST_Terms_Controller',\n \t)\n );\n global $wp_taxonomies;\n $taxonomy_name = 'news_categories';\n if ( isset( $wp_taxonomies[ $taxonomy_name ] ) ) {\n \t$wp_taxonomies[ $taxonomy_name ]->show_in_rest = true;\n \t$wp_taxonomies[ $taxonomy_name ]->rest_base = $taxonomy_name;\n \t$wp_taxonomies[ $taxonomy_name ]->rest_controller_class = 'WP_REST_Terms_Controller';\n }\n\n\t\t//jobs\n register_post_type( 'jobs',\n \tarray(\n \t\t'labels' => array(\n \t\t\t'name' => 'Jobs',\n \t\t\t'singular_name' => 'Job',\n \t\t\t'add_new' => 'Add New',\n \t\t\t'add_new_item' => 'Add New Job',\n \t\t\t'edit_item' => 'Edit Job',\n \t\t\t'new_item' => 'New Job',\n \t\t\t'all_items' => 'All Jobs',\n \t\t\t'view_item' => 'View Job',\n \t\t\t'search_items' => 'Search Jobs',\n \t\t\t'not_found' => 'No Jobs found',\n \t\t\t'not_found_in_trash' => 'No Jobs found in Trash',\n \t\t),\n \t\t'public' => true,\n \t\t'has_archive' => true,\n \t\t'rewrite' => array('slug' => 'jobs'),\n \t\t'show_in_rest' => true,\n \t\t'rest_base' => 'jobs',\n \t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n \t\t'supports' => array( 'title', 'thumbnail', 'editor'),\n \t\t'menu_icon' => 'dashicons-clipboard'\n \t));\n\n\t\t//form pages\n register_post_type( 'form_pages',\n \tarray(\n \t\t'labels' => array(\n \t\t\t'name' => 'Form Pages',\n \t\t\t'singular_name' => 'Form Page',\n \t\t\t'add_new' => 'Add New',\n \t\t\t'add_new_item' => 'Add New Form Page',\n \t\t\t'edit_item' => 'Edit Form Page',\n \t\t\t'new_item' => 'New Form Page',\n \t\t\t'all_items' => 'All Form Pages',\n \t\t\t'view_item' => 'View Form Page',\n \t\t\t'search_items' => 'Search Form Pages',\n \t\t\t'not_found' => 'No Form Pages found',\n \t\t\t'not_found_in_trash' => 'No Form Pages found in Trash',\n \t\t),\n \t\t'public' => true,\n \t\t'has_archive' => true,\n \t\t'rewrite' => array('slug' => 'forms'),\n \t\t'show_in_rest' => true,\n \t\t'rest_base' => 'forms',\n \t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n \t\t'supports' => array( 'title'),\n \t\t'menu_icon' => 'dashicons-editor-table'\n \t));\n\n\t\t//newsletter\n register_post_type( 'newsletters',\n \tarray(\n \t\t'labels' => array(\n \t\t\t'name' => 'Newsletters',\n \t\t\t'singular_name' => 'Newsletter',\n \t\t\t'add_new' => 'Add New',\n \t\t\t'add_new_item' => 'Add New Newsletter',\n \t\t\t'edit_item' => 'Edit Newsletter',\n \t\t\t'new_item' => 'New Newsletter',\n \t\t\t'all_items' => 'All Newsletters',\n \t\t\t'view_item' => 'View Newsletter',\n \t\t\t'search_items' => 'Search Newsletters',\n \t\t\t'not_found' => 'No Newsletters found',\n \t\t\t'not_found_in_trash' => 'No Newsletters found in Trash',\n \t\t),\n \t\t'public' => true,\n \t\t'has_archive' => true,\n \t\t'rewrite' => array('slug' => 'newsletters'),\n \t\t'show_in_rest' => true,\n \t\t'rest_base' => 'newsletters',\n \t\t'rest_controller_class' => 'WP_REST_Posts_Controller',\n \t\t'supports' => array( 'title'),\n \t\t'menu_icon' => 'dashicons-images-alt2'\n \t));\n\n\t\t//add ACF options pages\n\t\t//optional - include a custom icon, list of icons available at https://developer.wordpress.org/resource/dashicons/\n if( function_exists('acf_add_options_page') ) {\n \t$option_page = acf_add_options_page(array(\n \t\t'page_title' \t=> 'Home Page',\n \t\t'menu_title' \t=> 'Home Page',\n \t\t'menu_slug' \t=> 'home-page',\n \t\t'icon_url' => 'dashicons-admin-home',\n \t\t'position'\t\t=> '50.1',\n \t));\n \t$option_page = acf_add_options_page(array(\n \t\t'page_title' \t=> 'Site Options',\n \t\t'menu_title' \t=> 'Site Options',\n \t\t'menu_slug' \t=> 'site-options',\n \t\t'icon_url' => 'dashicons-location',\n \t\t'position'\t\t=> '50.3'\n \t));\n }\n\n }", "title": "" }, { "docid": "341aedb3ceaa1a91671c10c2a0c7469d", "score": "0.5995162", "text": "public function getFeaturedImage()\n {\n // waiting for tom: https://trac.aas.duke.edu/ticket/270\n foreach ($this->getAttachedMedia() as $media)\n {\n if ($media->type = 'image')\n {\n $image = array();\n $image['src'] = $media->originalImage;\n $image['alt'] = $media->slug;\n $image['width'] = $media->width;\n $image['height'] = $media->height;\n \n return $image;\n }\n }\n \n if ($embedded_images = $this->getEmbeddedImages())\n {\n return $embedded_images[0];\n }\n \n return false;\n }", "title": "" }, { "docid": "534c175820b5264ea7b4eb882e967e45", "score": "0.59824073", "text": "function _wp_post_thumbnail_class_filter_add( $attr ) {\n\tadd_filter( 'wp_get_attachment_image_attributes', '_wp_post_thumbnail_class_filter' );\n}", "title": "" }, { "docid": "8b21dbb99ade7021c972376a12b82a4a", "score": "0.5979887", "text": "function category_featured_image($params) {\n if( ( $category_image = category_image_src( $params, false ) ) != null ):\n return $category_image;\n endif;\n}", "title": "" }, { "docid": "338935343ca97c012b69cf12e6feb297", "score": "0.5970702", "text": "public function featureImage()\n {\n return $this->getFirstMedia('hotel_feature');\n }", "title": "" }, { "docid": "b121365ec34f8a0f4c32c7bc6639ec74", "score": "0.5968552", "text": "function get_rest_featured_image($object, $field_name, $request)\n{\n if ($object['featured_media']) {\n $img = wp_get_attachment_image_src($object['featured_media'], 'full');\n return $img[0];\n }\n return false;\n}", "title": "" }, { "docid": "15098e7691d635a7b7b20b079b0ccf40", "score": "0.5963299", "text": "function bunchy_show_entry_featured_media( $show = true ) {\n\t$options = get_post_meta( get_the_ID(), '_bunchy_single_options', true );\n\n\t// If not set, global setting will be used.\n\tif ( ! empty( $options ) && ! empty( $options['featured_media'] ) ) {\n\t\t$show = 'none' !== $options['featured_media'];\n\t}\n\n\treturn apply_filters( 'bunchy_show_entry_featured_media', $show );\n}", "title": "" }, { "docid": "59d542adbf7156a28476ab188b912ad5", "score": "0.5962421", "text": "function set_featured_image_width_handle_sideload($file_array, $post_id) {\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\n // do the validation and storage stuff\n $attachment_id = media_handle_sideload( $file_array, $post_id );\n\n // Unlink temp file\n @unlink($file_array['tmp_name']);\n \n if ( is_wp_error($attachment_id) ) {\n return $attachment_id;\n }\n // Set featured image to post\n update_post_meta($post_id, '_thumbnail_id', $attachment_id);\n $attachment_data = array(\n 'ID' => $attachment_id\n );\n // Update attachment file\n wp_update_post($attachment_data);\n \n return $attachment_id;\n}", "title": "" }, { "docid": "a4aa403bf753e3592278fdfdb7791f3b", "score": "0.5954279", "text": "public function set_featured( $featured ) {\n\t\t$this->set_prop( 'featured', cs_string_to_bool( $featured ) );\n\t}", "title": "" }, { "docid": "2e3498ca6198ec1a12577cc2facf3213", "score": "0.5948467", "text": "function fusion_get_image_data( $post_id, $post_featured_image_sizes = [], $post_permalink = '', $display_placeholder_image = false, $display_woo_price = false, $display_woo_buttons = false, $display_post_categories = 'default', $display_post_title = 'default', $type = '', $gallery_id = '', $display_rollover = 'yes', $display_woo_rating = false ) {\n\n\tglobal $product;\n\n\t// Get the featured images.\n\t$featured_images = [];\n\tforeach ( $post_featured_image_sizes as $post_featured_image_size ) {\n\n\t\tif ( 'related' === $type && 'fixed' === $post_featured_image_size && get_post_thumbnail_id( $post_id ) ) {\n\n\t\t\t$image = Fusion_Image_Resizer::image_resize(\n\t\t\t\t[\n\t\t\t\t\t'width' => '500',\n\t\t\t\t\t'height' => '383',\n\t\t\t\t\t'url' => wp_get_attachment_url( get_post_thumbnail_id( $post_id ) ),\n\t\t\t\t\t'path' => get_attached_file( get_post_thumbnail_id( $post_id ) ),\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t$scrset = ( isset( $image['retina_url'] ) && $image['retina_url'] ) ? ' srcset=\"' . $image['url'] . ' 1x, ' . $image['retina_url'] . ' 2x\"' : '';\n\t\t\t$featured_image = '<img src=\"' . esc_url_raw( $image['url'] ) . '\" alt=\"' . the_title_attribute( 'post=' . $post_id ) . '\" />';\n\n\t\t} else {\n\n\t\t\tif ( has_post_thumbnail( $post_id ) ) {\n\t\t\t\t$featured_image = get_the_post_thumbnail( $post_id, $post_featured_image_size );\n\n\t\t\t} elseif ( fusion_get_option( 'video' ) ) {\n\n\t\t\t\t$image_size_class .= ' fusion-video';\n\n\t\t\t\t$featured_image = '<div class=\"full-video\">';\n\t\t\t\t$featured_image .= fusion_get_option( 'video' );\n\t\t\t\t$featured_image .= '</div>';\n\n\t\t\t} elseif ( $display_placeholder_image ) {\n\t\t\t\tob_start();\n\t\t\t\tdo_action( 'avada_placeholder_image', $post_featured_image_size );\n\t\t\t\t$featured_image = ob_get_clean();\n\t\t\t}\n\t\t}\n\t\tif ( isset( $featured_image ) ) {\n\t\t\t$featured_images[ $post_featured_image_size ] = $featured_image;\n\t\t}\n\t}\n\t$enable_rollover = apply_filters( 'fusion_builder_image_rollover', true );\n\n\t// Portfolio defaults.\n\t$link_icon_target = apply_filters( 'fusion_builder_link_icon_target', '', $post_id );\n\t$video_url = apply_filters( 'fusion_builder_video_url', '', $post_id );\n\n\t// Blog defaults.\n\t$link_icon_url = apply_filters( 'fusion_builder_link_icon_url', '', $post_id );\n\t$post_links_target = apply_filters( 'fusion_builder_post_links_target', '', $post_id );\n\n\t// Set defaults for Fusion Builder ( Theme Options ).\n\t$cats_image_rollover = apply_filters( 'fusion_builder_cats_image_rollover', false );\n\t$title_image_rollover = apply_filters( 'fusion_builder_title_image_rollover', false );\n\t// Portfolio defaults.\n\t$portfolio_link_icon_target = apply_filters( 'fusion_builder_portfolio_link_icon_target', false, $post_id );\n\n\t// Retrieve the permalink if it is not set.\n\t$post_permalink = ( ! $post_permalink ) ? get_permalink( $post_id ) : $post_permalink;\n\n\t// Check if theme options are used as base or if there is an override for post categories.\n\tif ( 'default' === $display_post_categories ) {\n\t\t$display_post_categories = fusion_library()->get_option( 'cats_image_rollover' );\n\t} elseif ( 'enable' === $display_post_categories ) {\n\t\t$display_post_categories = true;\n\t} elseif ( 'disable' === $display_post_categories ) {\n\t\t$display_post_categories = false;\n\t} else {\n\t\t$display_post_categories = $cats_image_rollover;\n\t}\n\n\t// Check if theme options are used as base or if there is an override for post title.\n\tif ( 'default' === $display_post_title ) {\n\t\t$display_post_title = fusion_library()->get_option( 'title_image_rollover' );\n\t} elseif ( 'enable' === $display_post_title ) {\n\t\t$display_post_title = true;\n\t} elseif ( 'disable' === $display_post_title ) {\n\t\t$display_post_title = false;\n\t} else {\n\t\t$display_post_title = $title_image_rollover;\n\t}\n\n\t// Set the link and the link text on the link icon to a custom url if set in page options.\n\tif ( $link_icon_url ) {\n\t\t$icon_permalink = $link_icon_url;\n\t\t$icon_permalink_title = $link_icon_url;\n\t} else {\n\t\t$icon_permalink = $post_permalink;\n\t\t$icon_permalink_title = get_the_title( $post_id );\n\t}\n\n\t// Set the link target to blank if the option is set.\n\t$link_target = ( 'yes' === $link_icon_target || 'yes' === $post_links_target || ( 'avada_portfolio' === get_post_type() && $portfolio_link_icon_target && 'default' === $link_icon_target ) ) ? ' target=\"_blank\"' : '';\n\n\t$post_type = get_post_type( $post_id );\n\n\t$image_size_class = '';\n\n\t$full_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'full' );\n\tif ( ! is_array( $full_image ) ) {\n\t\t$full_image = [\n\t\t\t0 => '',\n\t\t];\n\t}\n\t$full_image = $full_image[0];\n\tif ( $video_url ) {\n\t\t$full_image = $video_url;\n\t\t$image_size_class .= ' fusion-video';\n\t}\n\n\t$lightbox_content = ( 'individual' === fusion_library()->get_option( 'lightbox_behavior' ) ) ? avada_featured_images_lightbox( $post_id ) : '';\n\t$data_rel = ( 'individual' === fusion_library()->get_option( 'lightbox_behavior' ) ) ? 'iLightbox[gallery' . $post_id . ']' : 'iLightbox[gallery' . $gallery_id . ']';\n\n\t$title = get_the_title( $post_id );\n\n\t// Determine the correct taxonomy.\n\t$post_taxonomy = '';\n\tif ( 'post' === get_post_type( $post_id ) ) {\n\t\t$post_taxonomy = 'category';\n\t} elseif ( 'avada_portfolio' === get_post_type( $post_id ) ) {\n\t\t$post_taxonomy = 'portfolio_category';\n\t} elseif ( 'product' === get_post_type( $post_id ) ) {\n\t\t$post_taxonomy = 'product_cat';\n\t}\n\t$terms = get_the_term_list( $post_id, $post_taxonomy, '<div class=\"fusion-rollover-categories\">', ', ', '</div>' );\n\n\t$price = false;\n\t$rating = false;\n\t$buttons = false;\n\t$cart_url = false;\n\n\tif ( class_exists( 'WooCommerce' ) && method_exists( $product, 'is_purchasable' ) && $product->is_purchasable() ) {\n\t\tob_start();\n\t\tfusion_wc_get_template( 'loop/rating.php' );\n\t\t$rating = ob_get_clean();\n\n\t\tob_start();\n\t\tfusion_wc_get_template( 'loop/price.php' );\n\t\t$price = ob_get_clean();\n\n\t\tob_start();\n\t\tdo_action( 'avada_woocommerce_buttons_on_rollover' );\n\t\t$buttons = ob_get_clean();\n\n\t\t$items_in_cart = [];\n\t\t$wc_cart_items = method_exists( WC()->cart, 'get_cart' ) ? WC()->cart->get_cart() : [];\n\n\t\tif ( ! empty( $wc_cart_items ) ) {\n\t\t\tforeach ( $wc_cart_items as $cart ) {\n\t\t\t\t$items_in_cart[] = $cart['product_id'];\n\t\t\t}\n\t\t}\n\n\t\t$cart_url = esc_url_raw( wc_get_cart_url() );\n\t}\n\n\treturn [\n\t\t'post_id' => $post_id,\n\t\t'post_featured_image_size' => $post_featured_image_size,\n\t\t'post_permalink' => $post_permalink,\n\t\t'featured_images' => $featured_images,\n\t\t'enable_rollover' => $enable_rollover,\n\t\t'image_size_class' => $image_size_class,\n\t\t'display_placeholder_image' => $display_placeholder_image,\n\t\t'display_woo_price' => $display_woo_price,\n\t\t'display_woo_buttons' => $display_woo_buttons,\n\t\t'display_post_categories' => $display_post_categories,\n\t\t'display_post_title' => $display_post_title,\n\t\t'type' => $type,\n\t\t'gallery_id' => $gallery_id,\n\t\t'display_rollover' => $display_rollover,\n\t\t'display_woo_rating' => $display_woo_rating,\n\t\t'items_in_cart' => $items_in_cart,\n\t\t'title' => $title,\n\t\t'terms' => $terms,\n\t\t'lightbox_content' => $lightbox_content,\n\t\t'data_rel' => $data_rel,\n\t\t'full_image' => $full_image,\n\t\t'post_type' => $post_type,\n\t\t'link_target' => $link_target,\n\t\t'image_rollover_icons' => apply_filters( 'fusion_builder_image_rollover_icons', fusion_get_option( 'image_rollover_icons', false, $post_id ) ),\n\t\t'icon_permalink' => $icon_permalink,\n\t\t'icon_permalink_title' => $icon_permalink_title,\n\t\t'link_icon_target' => $link_icon_target,\n\t\t'video_url' => $video_url,\n\t\t'link_icon_url' => $link_icon_url,\n\t\t'post_links_target' => $post_links_target,\n\t\t'cats_image_rollover' => $cats_image_rollover,\n\t\t'title_image_rollover' => $title_image_rollover,\n\t\t'portfolio_link_icon_target' => $portfolio_link_icon_target,\n\t\t'rating' => $rating,\n\t\t'price' => $price,\n\t\t'buttons' => $buttons,\n\t\t'cart_url' => $cart_url,\n\t];\n}", "title": "" }, { "docid": "97afcab5b2eb62b186daa68242da3a84", "score": "0.594564", "text": "function bunchy_render_entry_featured_media( $args = array() ) {\n\techo bunchy_capture_entry_featured_media( $args );\n}", "title": "" }, { "docid": "89ca735be91859cda04135dac2924a79", "score": "0.5931811", "text": "function admin_add_image() {\n\t\t//\n\t}", "title": "" }, { "docid": "6b51cfba7a1d2f3fdf9aa8e7e427b946", "score": "0.59281147", "text": "function get_featured_image($post_id=false) {\n\t// global $post;\n\t// echo '1 id:'.$post_id.'<br>';\n\tif(!$post_id) {\n\t\tglobal $post;\n\t\t$post_thumbnail_id = get_post_thumbnail_id( $post );\n\t\t// echo '>>>global<br>';\n\t}\n\telse {\n\t\t$post=get_post($post_id);\n\t\t$post_thumbnail_id = $post->ID;\n\t\t// echo '>>>from id<br>';\n\t}\n\t// echo '2 id:'.$post->ID.'<br><br>';\n\t$sizes = array('medium_large', 'medium_crop', 'fp-small', 'fp-medium', 'fp-large', 'letterbox');// 'letterbox-medium', \n\t\n\t$image=false;\n\tif ( has_post_thumbnail() ) :\n \t\t$image = array(); \n\t\t$post_thumbnail_id = get_post_thumbnail_id( $post );\n\t\t$thumb = get_post( $post_thumbnail_id );\n\t $image['title'] = $thumb->post_title;\n\t // echo $image['title'].'<br>';\n\t // echo 'thumbid '.$thumb->ID.'<br>';\n\t $image['alt'] = get_post_meta( $thumb->ID, '_wp_attachment_image_alt', true ); //alt text\n\t $image['caption'] = $thumb->post_excerpt;\n\t $image['description'] = $thumb->post_content;\n \t$thumb_url_array = wp_get_attachment_image_src($post_thumbnail_id, 'thumbnail', true);\n \t$image['sizes']['thumbnail'] = $thumb_url_array[0]; \n \t$medium_url_array = wp_get_attachment_image_src($post_thumbnail_id, 'medium', true);\n \t$image['sizes']['medium'] = $medium_url_array[0]; \n \t$large_url_array = wp_get_attachment_image_src($post_thumbnail_id, 'large', true);\n \t$image['sizes']['large'] = $large_url_array[0];\n \t \t$large_width=$large_url_array[1]; \n \t$large_height=$large_url_array[2]; \n \tif($large_height>$large_width) {\n \t\t$image['orientation']='portrait'; \n \t}\n \telse {\n \t\t$image['orientation']='landscape'; \n \t}\n \tif($large_height>1000) {\n \t\t$image['fullsize']=' fullsize'; \n \t}\n \telse {\n \t\t$image['fullsize']=''; \n \t} \n \t$image['url'] = $thumb->guid;\n \tforeach ($sizes as $size) {\n\t\t\t$large_url_array = wp_get_attachment_image_src($post_thumbnail_id, $size, true);\n\t\t\t$image['sizes'][$size] = $large_url_array[0]; \n \t}\n\tendif;\n\treturn $image;\n}", "title": "" }, { "docid": "a502e4326f82a14e881ff0fded654a95", "score": "0.5917564", "text": "function jm_store_featured( $post_id )\r\n{\r\n\t// Check to ensure this is not an auto save\r\n\tif(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)\r\n\t\treturn;\r\n\r\n\t// Check permissions first\r\n\tif(isset($_POST['post_type']) && ('post' != $_POST['post_type'] || !current_user_can('edit_post', $post_id)))\r\n\t\treturn;\r\n\r\n\t// TO-DO: ADD NONCE CHECK!\r\n\t$data = \"\";\r\n\tif(isset($_POST['featured_post']))\r\n\t\t$data = $_POST['featured_post'];\r\n\r\n\t// Update if this is featured\r\n\tupdate_post_meta( $post_id, 'jm_featured', $data);\r\n}", "title": "" }, { "docid": "ed9324900896bcb6f928d08b958dc8cb", "score": "0.59160185", "text": "function customized_featured_image( $post_id, $img_src, $width, $height, $image_alignment = 'alignleft', $linked = true ) {\n $the_image_html = '<img src=\"'.betterwork_process_image( $img_src, $width, $height, 1, 100 ).'\" alt=\"' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '\" />';\n if ( $linked ) $the_image_html = '<a href=\"'.get_permalink( $post_id ).'\" title=\"' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '\">'.$the_image_html.'</a>';\n $html = '<span class=\"custom-frame '.$image_alignment.'\">'.$the_image_html.'</span>';\n if( $image_alignment == 'aligncenter' ) $html = '<div style=\"text-align:center;\">'.$html.'</div>';\n return $html;\n}", "title": "" }, { "docid": "6b611bd4f2f3b503293fdf22edfef262", "score": "0.5914648", "text": "function bn_garage_sale_and_event_save_featured_image( $post_id ) {\n\tif ( get_post_type( $post_id ) != 'event' && get_post_type( $post_id ) != 'garage_sale' ) return;\n\t\n\t$featured_image_id = (int) get_field( 'featured_image', $post_id, false );\n\t\n\t// Make the featured image field in ACF update the post thumbnail.\n\tif ( $featured_image_id && get_post_type( $featured_image_id ) == 'attachment' ) {\n\t\tif ( set_post_thumbnail( $post_id, $featured_image_id ) ) {\n\t\t\t// Thumbnail updated successfully.\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// Did not update thumbnail, remove it.\n\tdelete_post_meta( $post_id, '_thumbnail_id' );\n}", "title": "" }, { "docid": "3729fdd995f957e426377a6c1e907323", "score": "0.5914484", "text": "public function is_featured() {\n\t\treturn true === $this->get_featured();\n\t}", "title": "" }, { "docid": "663968dbc9edf69c08d6ce53e7920717", "score": "0.5899014", "text": "function localshop_show_product_images() {\n wc_get_template( 'single-product/product-image.php' );\n }", "title": "" }, { "docid": "c848a1a45dd6298f86977f8904102345", "score": "0.5885898", "text": "public function featuredImage()\n {\n return $this->belongsTo(BlogImage::class, \"blog_image_id\");\n }", "title": "" }, { "docid": "7bc158d8a11400f45f19ae342299cc1e", "score": "0.58831185", "text": "public function handleImageThumbs() {\n return true;\n }", "title": "" }, { "docid": "99cf03886426b46340d873e619f91409", "score": "0.5880532", "text": "function lf_newsroom_block_register_rest_fields() {\n\t// Add Featured image.\n\tregister_rest_field(\n\t\t'post',\n\t\t'featured_image_src',\n\t\tarray(\n\t\t\t'get_callback' => 'lf_newsroom_block_get_image_src_landscape',\n\t\t\t'update_callback' => null,\n\t\t\t'schema' => null,\n\t\t)\n\t);\n}", "title": "" }, { "docid": "ebacbb6444c8b97792684e4c5488e616", "score": "0.58673275", "text": "function custom_image_sizes(){\n\t\t// Enable post thumbnail support\n\t\tadd_theme_support( 'post-thumbnails' );\n\t\tset_post_thumbnail_size( 960, 540, false ); // Normal post thumbnails\n\t\tadd_image_size( 'social-preview', 600, 315, true ); // Square thumbnail used by sharethis and facebook\n\t\tadd_image_size( 'medium-preview', 1280, 720, false ); // Square thumbnail used by sharethis and facebook\n\t\tadd_image_size( 'fullscreen', 1920, 1080, false ); // Fullscreen image size\n\t}", "title": "" }, { "docid": "7d00e315605ca7158bb048085c9a6cfb", "score": "0.5861021", "text": "function BH_shop_single_product_images() {\r\n\r\n\tget_template_part( 'views/woocommerce/single-product/single-product-section1', 'images' );\r\n\r\n}", "title": "" }, { "docid": "29c601dbcf781de1d9ac4dd2a2068db6", "score": "0.585888", "text": "public function featureAction()\n {\n //Get params\n $blog_id = $this->_getParam('blog_id');\n $featured = $this->_getParam('good');\n\n //Get blog need to set featured\n $table = Engine_Api::_()->getItemTable('blog');\n $select = $table->select()->where(\"blog_id = ?\",$blog_id);\n $blog = $table->fetchRow($select);\n\n //Set featured/unfeatured\n if($blog){\n $blog->is_featured = $featured;\n $blog->save();\n }\n }", "title": "" }, { "docid": "6532a8d8653ba9e3b71efbd14259b8ff", "score": "0.5856747", "text": "function montheme_setup() {\n\tadd_theme_support( 'post-thumbnails', array( 'post','page', 'champagne') );\n\tset_post_thumbnail_size( 600, 600, true ); // largeur int, hauteur int, recadrage boolean\n\tadd_image_size( 'square-small', 500, 500, true );\n\tadd_image_size( 'bandeau', 1920, 600, true );\n\tadd_image_size( 'cards', 500, 280, true );\n\tadd_image_size( 'bouteille', 400, 1000, false );\n\tadd_image_size( 'cards-list', 400, 400, false );\n\tadd_image_size( 'full-parallax', 2000, 1333, true );\n}", "title": "" }, { "docid": "be3b346bacbf57c869555de9f7f74ef0", "score": "0.58493596", "text": "function __themesetup(){\n\tadd_theme_support( 'title-tag' );\n\t/**\n\t * Add thumbnail functionality\n\t */\n\tadd_theme_support('post-thumbnails');\t\n\n}", "title": "" }, { "docid": "62821b239dd0590251d802b09f5ae78b", "score": "0.5839234", "text": "function featured_img_upload() {\n check_ajax_referer( 'wpuf_featured_img', 'nonce' );\n\n $upload_data = array(\n 'name' => $_FILES['wpuf_featured_img']['name'],\n 'type' => $_FILES['wpuf_featured_img']['type'],\n 'tmp_name' => $_FILES['wpuf_featured_img']['tmp_name'],\n 'error' => $_FILES['wpuf_featured_img']['error'],\n 'size' => $_FILES['wpuf_featured_img']['size']\n );\n\n $attach_id = wpuf_upload_file( $upload_data );\n\n if ( $attach_id ) {\n $html = wpuf_feat_img_html( $attach_id );\n\n $response = array(\n 'success' => true,\n 'html' => $html,\n );\n\n echo json_encode( $response );\n exit;\n }\n\n $response = array('success' => false);\n echo json_encode( $response );\n exit;\n }", "title": "" }, { "docid": "b568985108b249c30ce7c176d56fc56d", "score": "0.58369964", "text": "function snax_quiz_show_featured_media() {\n\t// We have both types, get first and use it as a default. Now both quiz types have one common setting.\n\t$default = snax_get_legacy_show_featured_media_setting( 'trivia_quiz' );\n\n\treturn 'standard' === apply_filters( 'snax_quiz_show_featured_media', get_option( 'snax_quiz_show_featured_media', $default ) );\n}", "title": "" }, { "docid": "dd712c4a2f9da5322078d223b47fa2da", "score": "0.5834027", "text": "function wpfs_get_featured_image($post_ID) { \n $post_thumbnail_id = get_post_thumbnail_id($post_ID); \n\t if ($post_thumbnail_id) { \n\t $post_thumbnail_img = wp_get_attachment_image_src($post_thumbnail_id, 'featured_preview'); \n\t return $post_thumbnail_img[0]; \n\t } \n\t}", "title": "" }, { "docid": "60cb3ece52d2fb3e111d213890dce8f0", "score": "0.583326", "text": "public function setIsFeatured($isFeatured);", "title": "" }, { "docid": "eddc41dafa15186127dcd0d87233e91f", "score": "0.58267933", "text": "public function featuredAction($dbpath, $news_id){\n $this->_db->update('news', 'id', $news_id, array(\n 'featuredImage' => $dbpath\n ));\n return true;\n }", "title": "" }, { "docid": "41d67d83eddafaa4d80cdd9f190a75bf", "score": "0.5821831", "text": "public static function image_tags()\n {\n }", "title": "" }, { "docid": "d9201d7dfc751044cde98dd37cda79d4", "score": "0.5817007", "text": "function custom_image_sizes() {\n add_image_size('header', 1200, 300, true);\n add_image_size('thumbnail-big', 300, 300, true);\n\n update_option('medium_size_w', 560);\n update_option('medium_size_h', 0);\n\n update_option('large_size_w', 1024);\n update_option('large_size_h', 0);\n}", "title": "" }, { "docid": "37c373b86e317466d65f7c0c13b59fc8", "score": "0.5814153", "text": "function exa_setup() {\n\n\t/* Register different size thumbnail images */\t\n\tadd_theme_support('post-thumbnails');\n\n\t/* Include custom editor styles, so the backend looks like\n\t * the front end. */\n\tadd_editor_style( 'assets/css/fontastic/styles.css' );\n\tadd_editor_style( 'assets/css/editor-style.css' );\n\n\t/* Adds RSS feed links to <head> for posts and comments. */\n\tadd_theme_support( 'automatic-feed-links' );\n\n\t/* This theme uses a custom image size for featured images, displayed on\n\t * \"standard\" posts and pages. */\n\tadd_theme_support( 'post-thumbnails' );\n\tset_post_thumbnail_size( 860, 470, true );\n\n}", "title": "" }, { "docid": "197f6cbc4d9c0a0ad6e97d4899425141", "score": "0.5809674", "text": "function fusion_component_featured_slider() {\n\n\tglobal $fusion_settings;\n\n\tfusion_builder_map(\n\t\tfusion_builder_frontend_data(\n\t\t\t'FusionTB_Featured_Slider',\n\t\t\t[\n\t\t\t\t'name' => esc_attr__( 'Featured Images Slider', 'fusion-builder' ),\n\t\t\t\t'shortcode' => 'fusion_tb_featured_slider',\n\t\t\t\t'icon' => 'fusiona-featured-images',\n\t\t\t\t'class' => 'hidden',\n\t\t\t\t'component' => true,\n\t\t\t\t'templates' => [ 'content' ],\n\t\t\t\t'components_per_template' => 1,\n\t\t\t\t'callback' => [\n\t\t\t\t\t'function' => 'fusion_ajax',\n\t\t\t\t\t'action' => 'get_fusion_featured_slider',\n\t\t\t\t\t'ajax' => true,\n\t\t\t\t],\n\n\t\t\t\t// Map subfields to their parent.\n\t\t\t\t'subparam_map' => [\n\t\t\t\t\t'width' => 'dimensions',\n\t\t\t\t\t'height' => 'dimensions',\n\t\t\t\t],\n\t\t\t\t'params' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_html__( 'Show First Featured Image', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_html__( \"Turn on if you don't want to display first featured image.\", 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'show_first_featured_image',\n\t\t\t\t\t\t'default' => 'yes',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'yes' => esc_html__( 'Yes', 'fusion-builder' ),\n\t\t\t\t\t\t\t'no' => esc_html__( 'No', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'callback' => [\n\t\t\t\t\t\t\t'function' => 'fusion_ajax',\n\t\t\t\t\t\t\t'action' => 'get_fusion_featured_slider',\n\t\t\t\t\t\t\t'ajax' => true,\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\t'type' => 'select',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Hover Type', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Select the hover effect type.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'hover_type',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'none' => esc_attr__( 'None', 'fusion-builder' ),\n\t\t\t\t\t\t\t'zoomin' => esc_attr__( 'Zoom In', 'fusion-builder' ),\n\t\t\t\t\t\t\t'zoomout' => esc_attr__( 'Zoom Out', 'fusion-builder' ),\n\t\t\t\t\t\t\t'liftup' => esc_attr__( 'Lift Up', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'callback' => [\n\t\t\t\t\t\t\t'function' => 'fusion_ajax',\n\t\t\t\t\t\t\t'action' => 'get_fusion_featured_slider',\n\t\t\t\t\t\t\t'ajax' => true,\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\t'type' => 'dimension',\n\t\t\t\t\t\t'remove_from_atts' => true,\n\t\t\t\t\t\t'heading' => esc_attr__( 'Image Size Dimensions', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Dimensions in percentage (%) or pixels (px).', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'dimensions',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'width' => '100%',\n\t\t\t\t\t\t\t'height' => '100%',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'callback' => [\n\t\t\t\t\t\t\t'function' => 'fusion_ajax',\n\t\t\t\t\t\t\t'action' => 'get_fusion_featured_slider',\n\t\t\t\t\t\t\t'ajax' => true,\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\t'type' => 'checkbox_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Element Visibility', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'hide_on_mobile',\n\t\t\t\t\t\t'value' => fusion_builder_visibility_options( 'full' ),\n\t\t\t\t\t\t'default' => fusion_builder_default_visibility( 'array' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t'fusion_margin_placeholder' => [\n\t\t\t\t\t\t'param_name' => 'margin',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'margin_top' => '',\n\t\t\t\t\t\t\t'margin_right' => '',\n\t\t\t\t\t\t\t'margin_bottom' => '',\n\t\t\t\t\t\t\t'margin_left' => '',\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}", "title": "" }, { "docid": "92b31f21362edc13b73b0ad2bbd6eed8", "score": "0.5799464", "text": "function dukece_responsive_mobile_first_background_images() {\n\n global $post;\n\n if ( ! has_post_thumbnail( $post->ID ) ) return; //exit if there is no featured image\n\n $theme_handle = 'custom-style'; //the theme handle used for the main style.css file\n $property = '.featured-img'; //the property\n $css = '';\n\n //small image\n $small_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'highlight' );\n $small_style = '\n ' . $property . ' { background-image: url(' . esc_url( $small_img[0] ) . '); }\n ';\n $css .= $small_style;\n\n //large image\n $large_img = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full-banner' );\n $large_style = '\n ' . $property . ' { background-image: url(' . esc_url( $large_img[0] ) . '); }\n ';\n $css .= '@media (min-width: 1000px) { '. $large_style . ' }';\n\n //minify \n $css = str_replace( array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $css );\n\n //add it\n echo '<style>' . $css . '</style>';\n\n}", "title": "" }, { "docid": "47b25548646eb966e3b1eee91cac79c5", "score": "0.5796829", "text": "function wrny_the_post_thumbnail( $content ) {\n\t\n\tglobal $post;\n\n\tif( in_category('picks', $post ) ) {\n\t\treturn $content;\n\t}\n\n\tif( is_single() && has_post_thumbnail() && !get_post_meta( get_the_ID(), 'hide_top_featured_image', true ) ) {\n\t\n\t\t// check if this is a Bump Envy post\n\t\t$is_bump_envy = false;\n\t\t$categories = get_the_category();\n\t\tforeach( $categories as $category ) {\n\t\t\tif( $category->cat_name == 'Bump Envy' ) $is_bump_envy = true;\n\t\t}\n\t\t\n\t\t$img_url = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );\n\t\t\n\t\tif( get_post_meta( get_the_ID(), 'display_vertical_image', true ) || $is_bump_envy ) {\n\t\t\n\t\t\t// right floated vertical image\n\t\t\t$content = '<img class=\"entry-vertical-image\" src=\"' . $img_url . '\">' . $content;\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\t// full width image\n\t\t\t$content = '<div class=\"featured-image\"><img src=\"' . $img_url . '\"></div>' . $content;\n\n\t\t}\n\t\t\n\t}\n\t\n\treturn $content;\n\n}", "title": "" }, { "docid": "582a38657b47c8d93bd27131ae81aa1d", "score": "0.5789149", "text": "function followdave_theme_support(){\n add_theme_support('title-tag');\n add_theme_support('custom-logo');\n add_theme_support('post-thumbnails');\n\n}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "0d0136a6ca064b781408e946a5d3cdec", "score": "0.0", "text": "public function show($id)\n {\n return $this->clientInterface->getClientById($id);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "c8985097bcf4925e7728ae219257fd22", "score": "0.7436983", "text": "public function show(Resource $resource)\n {\n //\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "2be2e33b028463d829f3ad558d64a222", "score": "0.69994664", "text": "public function showResponse($resource)\n {\n return $this->sendResource(Response::HTTP_OK, $this->getMessage('show'), $resource);\n }", "title": "" }, { "docid": "06f46038d7d48cf182d18bc5edbfc5da", "score": "0.6790781", "text": "public function viewResourceAction() {\n \t$idRole = intval($this->request->get('idRole'));\n \tif(empty($idRole)) {\n \t\t$this->flashSession->error($this->_(\"idRole is invalid\"));\n \t\treturn $this->redirect('index');\n \t}\n \t\n \t$role = AclRole::findFirst($idRole);\n \tif(empty($role)) {\n \t\t$this->flashSession->error($this->_(\"Role is null\"));\n \t\treturn $this->redirect('index');\n \t}\n \t\n \t$this->pageTitle = $this->_(\"Resources of: \". $role->name);\n \t\n \t$grid = new AclRoleResourceGrid('RoleResource', $idRole);\n \t$grid->run();\n \t$this->view->setVars(array(\n \t\t\t'grid' => $grid,\n \t\t\t'idRole' => $idRole\n \t));\n }", "title": "" }, { "docid": "a94412ebc56a8b9c8b86edf47e219db0", "score": "0.6742745", "text": "function display($resource_name = NULL, $cache_id = null, $compile_id = null, $parent_NEW = null)\n {\n //parent::fetch($resource_name, $cache_id, $compile_id, null, true);\n $this->assign(\"ekv_resource_name\", $resource_name);\n parent::display($resource_name, $cache_id, $compile_id, $parent_NEW);\n }", "title": "" }, { "docid": "70779c6e695ace5c3b533f7cdb8ab654", "score": "0.6645966", "text": "public function show($id)\n\t{\n\t\t$res = Resource::find($id);\n\t\treturn view('admin.resource.show')->withResource($res);\n\t}", "title": "" }, { "docid": "2f1ee001008252acd3fc8ca44e10c7ef", "score": "0.6579253", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n }", "title": "" }, { "docid": "24a493f88aace02c9d9e0c9868203a87", "score": "0.6480713", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn view('admin.resources.show', compact('resource'));\n\t}", "title": "" }, { "docid": "6299a7038c61853b945c92febd2b2e95", "score": "0.6455255", "text": "public function show()\n\t{\n\t\t$this->display('show');\n\t}", "title": "" }, { "docid": "52cf037df527a27f63b97a9bf996fa6f", "score": "0.6444057", "text": "public function showAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('VMBResourceBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n \n\t\t$official = ($request->query->get('official') == 1) ? true : 'all';\n\t\t$personal = ($request->query->get('personal') == 1);\n\t\t$search = $request->query->get('search');\n\t\t$topic = $request->query->get('topic');\n\t\tif($topic != null) {\n\t\t\t$topic = $em->getRepository('VMBPresentationBundle:Topic')->find($topic);\n\t\t}\n\t\t\n\t\t$prev = $next = null;\n\t\t$position = intval($request->query->get('position'));\n\t\tif($position > 0) {\n\t\t\tif($position > 1) {\n\t\t\t\t$prev = $em->getRepository('VMBResourceBundle:Resource')->getResources($position - 1, 1, $topic, $official, ($personal ? $this->getUser() : null), $search);\n\t\t\t}\n\t\t\t$next = $em->getRepository('VMBResourceBundle:Resource')->getResources($position + 1, 1, $topic, $official, ($personal ? $this->getUser() : null), $search);\n\t\t}\n\t\t$rend_args = array(\n 'entity' => $entity,\n 'mainTitle' => $entity->getTitle(),\n 'editButtonUrl' => $this->generateUrl('resource_edit', array('id' => $id)),\n 'backButtonUrl' => $this->get('vmb_presentation.previous_url')->getPreviousUrl($request),\n 'saveToCaddy' => 'resource',\n 'inCaddy' => $this->getUser()->resourceIsInCaddy($entity),\n 'hasPlaybackFunction' => true,\n 'prev' => $prev,\n 'next' => $next,\n 'position' => $position);\n\n\t\t$typ = $entity->getType(); \n\t\tif($typ == 'text' || $typ == 'image'){\n\t\t\t$rend_args['exportAssetUrl'] = $entity->getResourcePath();\n\t\t}\n\n return $this->render('VMBResourceBundle:Resource:show.html.twig', $rend_args\n );\n }", "title": "" }, { "docid": "8bc888f15a301ee0d4c90637d0ad33da", "score": "0.64228344", "text": "public function show(Resource $resource): View\n {\n $resource->load([\n 'activities.causer:id,name' => function ($query) {\n $query->oldest();\n },\n ]);\n\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "c95c378ad1f1707c12f0b8d8a8d8233a", "score": "0.6391138", "text": "public function displayAction()\n {\n $type = $this->params('type', '');\n $uid = $this->params('uid', '');\n $data = array();\n\n switch (strtolower($type)) {\n case 'register':\n $title = __('Register Activation');\n $data['uid'] = $uid;\n break;\n default:\n return $this->jumpTo404('Required resource is not found');\n }\n\n $this->view()->assign(array(\n 'type' => $type,\n 'title' => $title,\n 'data' => $data,\n ));\n }", "title": "" }, { "docid": "e154b7665e505aad324ddb7cf7317913", "score": "0.6275971", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.view', compact('resource', 'reservations', 'calendar_details'));\n }", "title": "" }, { "docid": "eff9ec7980076b0e265db437d0eb54fc", "score": "0.6211072", "text": "public function displayAction() {\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\n $q = Doctrine_Query::create()\n ->from('Tripjacks_Model_Info i')\n ->where('i.infoid = ?', $input->id);\n $result = $q->fetchArray();\n\n\n if (count($result) == 1) {\n $this->view->info = $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": "2eccd420459e21b72d8ac89abaad92f7", "score": "0.6102424", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n\n return view('resource.show', compact('resource'));\n }", "title": "" }, { "docid": "d4fc50ff2fe29ccb40447e93ee5dafea", "score": "0.6099861", "text": "public function show(ResourceFile $resourcefile)\n {\n return $resourcefile;\n }", "title": "" }, { "docid": "357ac69da20938e9aa830ac9a6c2dcdf", "score": "0.6059893", "text": "public function show($id)\n\t{\n\t\tif (!$this->api) return view('resources.show');\n\t\t$resource = Resource::with('translations', 'links', 'organization.translations')->find($id);\n\n\t\treturn $this->reply(fractal()->item($resource)->transformWith(new ResourcesTransformer()));\n\t}", "title": "" }, { "docid": "dd595e2401a651c870eaf18d7e9760a3", "score": "0.60493153", "text": "public function edit(Resource $resource)\n {\n //\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "dca0890d7f2fa9cf58976e540c377c87", "score": "0.6048981", "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_Main m')\n ->where('m.mainid = ?', $input->id);\n\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->main = $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": "3cb8c14bbdae8dbf60fa13c36bdc635e", "score": "0.6045665", "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_Player p')\n ->where('p.playerid = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->user_info= $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": "9cce40711cb8c9d6f267f8a6c80ef284", "score": "0.60362315", "text": "public function showAction()\n {\n $photo = Photo::findById($this->route_params['id']);\n View::render('Photos/show.html.twig', ['photo' => $photo]);\n }", "title": "" }, { "docid": "5c22086562e6ef1114becad746f7e5bc", "score": "0.6027262", "text": "public function display() {\n\t\tif(isset($this->template)) {\n\t\t\t\\httprequest\\request::includepage($this->template, $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "c3803fff905d316392a4c6647bee0c1e", "score": "0.6006611", "text": "public function show($id)\n {\n /* Check if logged user is authorized to view resources */\n $this->authorize('view', [$this->model, $id]);\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Displays the specified resource page */\n return view('admin.' . $this->name . '.show')\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "title": "" }, { "docid": "4699678dcf8e1179c0197353cd91326b", "score": "0.5996761", "text": "public function edit(Resource $resource)\n {\n /* dd($resource); */\n return view('resource.edit' , compact('resource'));\n }", "title": "" }, { "docid": "ae23d75d023c0002ab4f3c08bd35003e", "score": "0.598104", "text": "function display()\r\n\t\t{\r\n\t\t\techo $this->get();\r\n\t\t}", "title": "" }, { "docid": "3eb4767e2aa80380caab65bad4b694b3", "score": "0.5977898", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Rio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Rio entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Rio:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "095acd4bfd018fc9654389112444b778", "score": "0.5974061", "text": "public function get($resource, $id);", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "12f7159ffd60dd85817fce0dc957727b", "score": "0.5945383", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n\n $view_data = [\n 'resource' => $resource,\n ];\n\n return view('resource.show', $view_data);\n }", "title": "" }, { "docid": "899d8520a922358d52a57df80a573629", "score": "0.5932012", "text": "public function show($id)\n {\n return view('visitor.resources.show', [\n 'resource' => $this->resourceService->retrieve($id)\n ]);\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "521678534e38ace8f31ee2c7c31109ce", "score": "0.5921381", "text": "public function editResource(Resource $resource)\n {\n if ($resource->type == 'CLASSROOM') {\n $types = ResourceType::where('type', 'CLASSROOM')->get();\n $rcharacteristics = Characteristic::where('type', 'CLASSROOM')->get();\n return view('SpecificViews.Admin.Resource.edit', compact('types', 'rcharacteristics', 'resource'));\n } else {\n $rcharacteristics = Characteristic::where('type', 'INSTRUMENT')->get();\n $types = ResourceType::where('type', 'INSTRUMENT')->get();\n return view('SpecificViews.Admin.Resource.edit', compact('types', 'rcharacteristics', 'resource'));\n }\n\n }", "title": "" }, { "docid": "bcb977896a739f96ffa1ee77c63f7425", "score": "0.5882477", "text": "public function view($id) {\n return $this->get(self::RESOURCE_BASE . \"/$id\"); \n }", "title": "" }, { "docid": "85ba0fc4060f5c163e861d508048ba63", "score": "0.58799505", "text": "function show(){\n\t\t$this->render(\"show\");\n\t}", "title": "" }, { "docid": "6bd8f8db3e80e5caf1e6d908931a7ed8", "score": "0.58641636", "text": "public function show()\n {\n $this->api->showImage();\n }", "title": "" }, { "docid": "7da450b6668a2933f5d4b964d20aceb6", "score": "0.58210504", "text": "public function actionShow()\n {\n return $this->render('show');\n }", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "69f75cee35bd031e6f2e92ddebba0c83", "score": "0.5805522", "text": "public function open(Resource $resource);", "title": "" }, { "docid": "2eba268133f89808c76c1ce885d900d0", "score": "0.5801889", "text": "public function showAction()\n {\n $id = (int) $this->param('id');\n $propertyId = (int) $this->param($this->view->translate('propertyId'));\n $picture = $this->service->retrievePictureByIdAndPropertyId($id, $propertyId);\n if (!$picture) {\n $this->flash('error')->addMessage('picture.not.found');\n $this->redirectToRoute(\n 'list',\n [$this->view->translate('page') => 1]\n );\n } else {\n $this->view->picture = $picture;\n $this->view->propertyId = $propertyId;\n }\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "9fb145e59d646ec786be543f7cd0c2f1", "score": "0.5796356", "text": "public function displayTask()\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$resource = Request::getInt('resource', 0);\n\n\t\tif (!$resource)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('No resource ID provided.') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t$row = Entry::oneOrFail($resource);\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Allow for temp resource uploads\n\t\tif (!$row->get('created') || $row->get('created') == '0000-00-00 00:00:00')\n\t\t{\n\t\t\t$row->set('created', Date::format('Y-m-d 00:00:00'));\n\t\t}\n\n\t\t$path = $row->filespace() . DS . 'media';\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 (('cvs' == strtolower($name))\n\t\t\t\t\t || ('.svn' == strtolower($name)))\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('resource', $resource)\n\t\t\t->set('row', $row)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('path', $path)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "04e64116f27859f875629d6268d95953", "score": "0.5784402", "text": "public function show($id)\n {\n $instance = $this->getRepository()->find($id);\n\n $this->addBreadcrumb($instance, 'show');\n $this->authorize('view', $instance);\n\n return $this->view('show')\n ->with('type', $this->resourceType)\n ->with('instance', $instance);\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.5781528", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "765678d75db620af12e826ffe74dec55", "score": "0.57683015", "text": "public function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "9af2cfa61b52fe58f98d0f97a39ef817", "score": "0.5754341", "text": "public function display()\n {\n $this->component->display();\n }", "title": "" }, { "docid": "4898c94933e2ace69aa1f6e40d88637c", "score": "0.57537615", "text": "public function show(RestRequestInterface $request, string $identifier);", "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": "e7aba3353509209c795adfc8ada3dbba", "score": "0.5747122", "text": "protected function showAction()\n {\n $id = $this->request->query->get('id');\n if (!$item = $this->em->getRepository($this->entity['class'])->find($id)) {\n throw $this->createNotFoundException(sprintf('Unable to find entity (%s #%d).', $this->entity['name'], $id));\n }\n\n $fields = $this->entity['show']['fields'];\n $deleteForm = $this->createDeleteForm($this->entity['name'], $id);\n\n return $this->render('@EasyAdmin/show.html.twig', array(\n 'item' => $item,\n 'fields' => $fields,\n 'view' => 'show',\n 'delete_form' => $deleteForm->createView(),\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": "fd520119113e4b5bb0cfabb16e87eaf7", "score": "0.57244605", "text": "private static function DisplayResourceBase($resources)\n {\n echo \"<div class='row'>\";\n\n #Variable declaration\n $res_name = $res_file_type = $res_file_link = $res_description = \"\";\n $res_id = 0;#resource id;\n\n #Loop through each resource item\n foreach($resources as $res_found):\n #Variable init\n $res_id = $res_found[\"resource_id\"];\n $res_name = $res_found['resource_name'];\n $res_file_type = $res_found['file_type'];\n $res_file_link = $res_found[\"file_link\"];\n $res_description = $res_found['description'];\n\n //Loop through each resource and add the html below\n?>\n <div class=\"col s12 m6 l4\">\n <div class=\"card white res_container\" data-res-id=\"<?php echo $res_id?>\">\n <div class=\"card-content\">\n <span class=\"card-title truncate\" title=\"<?php echo $res_name;?>\"><?php echo $res_name;?></span>\n <div class=\"resource-details-container\">\n <p><span class=\"grey-text\">Description: </span> <?php echo empty($res_description) ? '<span class=\"grey-text\">Not written</span>' : $res_description; ?></p>\n </div>\n <h6 class=\"grey-text uppercase text-lighten-2 \"><?php echo explode(\".\",explode(\"/\",$res_found['file_type'])\n [count(explode(\"/\",$res_found['file_type'])) - 1]\n )[count(explode(\".\",explode(\"/\",$res_found['file_type'])\n [count(explode(\"/\",$res_found['file_type'])) - 1]\n )) - 1]; ?></h6>\n </div>\n <div class=\"card-action\">\n <!--TODO: Make this display the file regardless of type in a new tab-->\n <a class=\"\" href=\"<?php echo $res_file_link; ?>\" target=\"_blank\">OPEN</a>\n\n<!-- <a class=\"btn btn-flat right viewResourceDetails\" href=\"javascript:void(0)\">DETAILS</a>-->\n </div>\n </div>\n </div> \n<?php \n endforeach; #end foreach($resources as $resource_found)\n echo \"</div>\";#close row\n }", "title": "" }, { "docid": "5bdab5e82bdae8704b426d50a0c819ca", "score": "0.5723754", "text": "public function show()\n {\n return route($this->route().'.show', $this->parameters());\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": "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": "c9c0812c7f53687f586de3cff87efe45", "score": "0.57175046", "text": "public function show(Human $human)\n {\n //\n }", "title": "" }, { "docid": "f2d9ca8da2ec54369857c7069cea0429", "score": "0.57117283", "text": "public function show()\n\t{\n\t}", "title": "" }, { "docid": "f8b0001b7f866699434e6efd5bb1c552", "score": "0.5703033", "text": "public function show()\n {\n if (Auth::user()){\n return new UserDetailsResource(Auth::user());\n }\n \n return [\n 'error_type' => 'URLNotAllowed',\n 'error_message' => 'You are not allowed on this page!'\n ];\n }", "title": "" }, { "docid": "e4a89f706eb5e843d96f3664b44e5847", "score": "0.57028013", "text": "public function display() \n {\n $content = $this->getContent();\n echo $content;\n }", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3fafbb0ed6199e00843d744b099c53fb", "score": "0.56941324", "text": "public function display()\n {\n echo $this->getContent();\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "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": "" } ]